diff options
566 files changed, 5038 insertions, 28199 deletions
diff --git a/canvas/prj/build.lst b/canvas/prj/build.lst index cacbdb5bb894..2adfe155e0b1 100644 --- a/canvas/prj/build.lst +++ b/canvas/prj/build.lst @@ -1,4 +1,4 @@ -cv canvas : javaunohelper comphelper cppuhelper offuh unoil tools svtools vcl AGG:agg basegfx CAIRO:cairo NULL +cv canvas : javaunohelper comphelper cppuhelper offuh unoil tools svtools vcl AGG:agg basegfx CAIRO:cairo LIBXSLT:libxslt NULL cv canvas usr1 - all cv_mkout NULL cv canvas\inc nmake - all cv_inc NULL cv canvas\source\tools nmake - all cv_tools cv_inc NULL diff --git a/canvas/source/vcl/backbuffer.cxx b/canvas/source/vcl/backbuffer.cxx index 3820c4e42657..36888d038ceb 100644 --- a/canvas/source/vcl/backbuffer.cxx +++ b/canvas/source/vcl/backbuffer.cxx @@ -48,7 +48,7 @@ namespace vclcanvas // switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and // is not required to do AA. It would need to be adapted to use it correctly // (especially gradient painting). This will need extra work. - maVDev->SetAntialiasing( maVDev->GetAntialiasing() & !ANTIALIASING_ENABLE_B2DDRAW); + maVDev->SetAntialiasing( maVDev->GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW); #endif } } diff --git a/canvas/source/vcl/bitmapbackbuffer.cxx b/canvas/source/vcl/bitmapbackbuffer.cxx index 31c78283a128..c09721a5cfaf 100644 --- a/canvas/source/vcl/bitmapbackbuffer.cxx +++ b/canvas/source/vcl/bitmapbackbuffer.cxx @@ -138,7 +138,7 @@ namespace vclcanvas // switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and // is not required to do AA. It would need to be adapted to use it correctly // (especially gradient painting). This will need extra work. - mpVDev->SetAntialiasing(mpVDev->GetAntialiasing() & !ANTIALIASING_ENABLE_B2DDRAW); + mpVDev->SetAntialiasing(mpVDev->GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW); #endif } } diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx index 4c0ea4fd6d3b..46561bc3f835 100644 --- a/canvas/source/vcl/spritedevicehelper.cxx +++ b/canvas/source/vcl/spritedevicehelper.cxx @@ -67,7 +67,7 @@ namespace vclcanvas // switch off AA for WIN32 and UNIX, the VCLCanvas does not look good with it and // is not required to do AA. It would need to be adapted to use it correctly // (especially gradient painting). This will need extra work. - mpBackBuffer->getOutDev().SetAntialiasing(mpBackBuffer->getOutDev().GetAntialiasing() & !ANTIALIASING_ENABLE_B2DDRAW); + mpBackBuffer->getOutDev().SetAntialiasing(mpBackBuffer->getOutDev().GetAntialiasing() & ~ANTIALIASING_ENABLE_B2DDRAW); #endif } diff --git a/comphelper/inc/comphelper/documentconstants.hxx b/comphelper/inc/comphelper/documentconstants.hxx index b78150586e28..73b90d72cc8a 100644 --- a/comphelper/inc/comphelper/documentconstants.hxx +++ b/comphelper/inc/comphelper/documentconstants.hxx @@ -111,3 +111,41 @@ #define ODFVER_012_TEXT ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ODFVER_012_TEXT_ASCII ) ) #endif +// filter flags +// TODO/LATER: The flags should be part of the UNO specification +#define SFX_FILTER_IMPORT 0x00000001L +#define SFX_FILTER_EXPORT 0x00000002L +#define SFX_FILTER_TEMPLATE 0x00000004L +#define SFX_FILTER_INTERNAL 0x00000008L +#define SFX_FILTER_TEMPLATEPATH 0x00000010L +#define SFX_FILTER_OWN 0x00000020L +#define SFX_FILTER_ALIEN 0x00000040L +#define SFX_FILTER_USESOPTIONS 0x00000080L + +#define SFX_FILTER_DEFAULT 0x00000100L +#define SFX_FILTER_EXECUTABLE 0x00000200L +#define SFX_FILTER_SUPPORTSSELECTION 0x00000400L +#define SFX_FILTER_MAPTOAPPPLUG 0x00000800L +#define SFX_FILTER_NOTINFILEDLG 0x00001000L +#define SFX_FILTER_NOTINCHOOSER 0x00002000L +#define SFX_FILTER_ASYNC 0x00004000L +#define SFX_FILTER_CREATOR 0x00008000L +#define SFX_FILTER_OPENREADONLY 0x00010000L +#define SFX_FILTER_MUSTINSTALL 0x00020000L +#define SFX_FILTER_CONSULTSERVICE 0x00040000L + +#define SFX_FILTER_STARONEFILTER 0x00080000L +#define SFX_FILTER_PACKED 0x00100000L +#define SFX_FILTER_SILENTEXPORT 0x00200000L + +#define SFX_FILTER_BROWSERPREFERED 0x00400000L + +#define SFX_FILTER_ENCRYPTION 0x01000000L +#define SFX_FILTER_PASSWORDTOMODIFY 0x02000000L + +#define SFX_FILTER_PREFERED 0x10000000L + +#define SFX_FILTER_VERSION_NONE 0 +#define SFX_FILTER_NOTINSTALLED SFX_FILTER_MUSTINSTALL | SFX_FILTER_CONSULTSERVICE + + diff --git a/comphelper/inc/comphelper/mediadescriptor.hxx b/comphelper/inc/comphelper/mediadescriptor.hxx index 01fa8059b284..e92a6c4650f6 100644 --- a/comphelper/inc/comphelper/mediadescriptor.hxx +++ b/comphelper/inc/comphelper/mediadescriptor.hxx @@ -128,10 +128,6 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap //------------------------------------------- // interface public: - /** Value type of the 'ComponentData' property. - */ - typedef ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > ComponentDataSequence; - //--------------------------------------- /** @short these ctors do nothing - excepting that they forward the given parameters to the base class ctors. @@ -205,8 +201,9 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap /** Returns a value from the sequence contained in the property 'ComponentData' of this media descriptor. - @descr The property 'ComponentData' should be empty or should - contain a value of type ComponentDataSequence (see above). + @descr The property 'ComponentData' should be empty, or should + contain a value of type sequence<com.sun.star.beans.NamedValue> + or sequence<com.sun.star.beans.PropertyValue>. @return The value with the specified name, if existing in the sequence of the 'ComponentData' property, otherwise an empty @@ -219,10 +216,11 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap /** Inserts a value into the sequence contained in the property 'ComponentData' of the media descriptor. - @descr The property 'ComponentData' should be empty or should - contain a value of type ComponentDataSequence (see above). The - passed value will be inserted into the sequence, or, if already - existing, will be overwritten. + @descr The property 'ComponentData' should be empty, or should + contain a value of type sequence<com.sun.star.beans.NamedValue> + or sequence<com.sun.star.beans.PropertyValue>. The passed value + will be inserted into the sequence, or, if already existing, + will be overwritten. @param rName The name of the value to be inserted into the sequence of the 'ComponentData' property. @@ -238,10 +236,10 @@ class COMPHELPER_DLLPUBLIC MediaDescriptor : public SequenceAsHashMap /** Removes a value from the sequence contained in the property 'ComponentData' of the media descriptor. - @descr The property 'ComponentData' should be empty or should - contain a value of type ComponentDataSequence (see above). The - value with the passed name will be removed from the sequence, - if existing. + @descr The property 'ComponentData' should be empty, or should + contain a value of type sequence<com.sun.star.beans.NamedValue> + or sequence<com.sun.star.beans.PropertyValue>. The value with + the passed name will be removed from the sequence, if existing. @param rName The name of the value to be removed from the sequence of the 'ComponentData' property. diff --git a/comphelper/inc/comphelper/mimeconfighelper.hxx b/comphelper/inc/comphelper/mimeconfighelper.hxx index 5e02d4761cb1..16a0a159d5a4 100644 --- a/comphelper/inc/comphelper/mimeconfighelper.hxx +++ b/comphelper/inc/comphelper/mimeconfighelper.hxx @@ -32,6 +32,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/container/XContainerQuery.hpp> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/embed/VerbDescriptor.hpp> @@ -50,6 +51,8 @@ class COMPHELPER_DLLPUBLIC MimeConfigurationHelper ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xVerbsConfig; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xMediaTypeConfig; + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xFilterFactory; + public: MimeConfigurationHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory ); @@ -106,6 +109,10 @@ public: ::rtl::OUString GetFactoryNameByMediaType( const ::rtl::OUString& aMediaType ); // typedetection related + ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > GetFilterFactory(); + + sal_Int32 GetFilterFlags( const ::rtl::OUString& aFilterName ); + ::rtl::OUString UpdateMediaDescriptorWithFilterName( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aMediaDescr, sal_Bool bIgnoreType ); @@ -117,6 +124,14 @@ public: ::rtl::OUString GetDefaultFilterFromServiceName( const ::rtl::OUString& aServName, sal_Int32 nVersion ); + ::rtl::OUString GetExportFilterFromImportFilter( const ::rtl::OUString& aImportFilterName ); + + static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SearchForFilter( + const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerQuery >& xFilterQuery, + const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aSearchRequest, + sal_Int32 nMustFlags, + sal_Int32 nDontFlags ); + static sal_Bool ClassIDsEqual( const ::com::sun::star::uno::Sequence< sal_Int8 >& aClassID1, const ::com::sun::star::uno::Sequence< sal_Int8 >& aClassID2 ); static ::com::sun::star::uno::Sequence< sal_Int8 > GetSequenceClassID( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3, diff --git a/comphelper/inc/comphelper/sequenceasvector.hxx b/comphelper/inc/comphelper/sequenceasvector.hxx index 263b68b24c7c..48dfe50b1645 100644 --- a/comphelper/inc/comphelper/sequenceasvector.hxx +++ b/comphelper/inc/comphelper/sequenceasvector.hxx @@ -86,6 +86,17 @@ class SequenceAsVector : public ::std::vector< TElementType > {} //--------------------------------------- + /** @short creates a new vector with the given length. + + @param nLength + the number of elements for the new vector. + */ + explicit SequenceAsVector(sal_Int32 nLength) : + ::std::vector< TElementType >( static_cast< size_t >( nLength ) ) + { + } + + //--------------------------------------- /** @short creates a new deque from the given uno sequence. @param lSource diff --git a/comphelper/prj/build.lst b/comphelper/prj/build.lst index 793d8bf30e09..91e836cabd68 100644 --- a/comphelper/prj/build.lst +++ b/comphelper/prj/build.lst @@ -1,4 +1,4 @@ -ph comphelper : cppuhelper ucbhelper offuh vos salhelper NULL +ph comphelper : cppuhelper ucbhelper offuh vos salhelper LIBXSLT:libxslt NULL ph comphelper usr1 - all ph_mkout NULL ph comphelper\inc nmake - all ph_inc NULL ph comphelper\source\container nmake - all ph_container ph_inc NULL diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx index 143f8ba4dfa2..e0b3e797264a 100644 --- a/comphelper/source/misc/mediadescriptor.cxx +++ b/comphelper/source/misc/mediadescriptor.cxx @@ -28,6 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_comphelper.hxx" #include <comphelper/mediadescriptor.hxx> +#include <comphelper/namedvaluecollection.hxx> #include <comphelper/stillreadwriteinteraction.hxx> #include <com/sun/star/ucb/XContent.hpp> @@ -483,27 +484,30 @@ sal_Bool MediaDescriptor::isStreamReadOnly() const css::uno::Any MediaDescriptor::getComponentDataEntry( const ::rtl::OUString& rName ) const { - SequenceAsHashMap aCompDataMap( getUnpackedValueOrDefault( PROP_COMPONENTDATA(), ComponentDataSequence() ) ); - SequenceAsHashMap::iterator aIt = aCompDataMap.find( rName ); - return (aIt == aCompDataMap.end()) ? css::uno::Any() : aIt->second; + css::uno::Any aEntry; + SequenceAsHashMap::const_iterator aPropertyIter = find( PROP_COMPONENTDATA() ); + if( aPropertyIter != end() ) + return NamedValueCollection( aPropertyIter->second ).get( rName ); + return css::uno::Any(); } void MediaDescriptor::setComponentDataEntry( const ::rtl::OUString& rName, const css::uno::Any& rValue ) { if( rValue.hasValue() ) { - // get or craete the 'ComponentData' property entry + // get or create the 'ComponentData' property entry css::uno::Any& rCompDataAny = operator[]( PROP_COMPONENTDATA() ); - // check type, insert the value - OSL_ENSURE( !rCompDataAny.hasValue() || rCompDataAny.has< ComponentDataSequence >(), - "MediaDescriptor::setComponentDataEntry - incompatible 'ComponentData' property in media descriptor" ); - if( !rCompDataAny.hasValue() || rCompDataAny.has< ComponentDataSequence >() ) + // insert the value (retain sequence type, create NamedValue elements by default) + bool bHasNamedValues = !rCompDataAny.hasValue() || rCompDataAny.has< css::uno::Sequence< css::beans::NamedValue > >(); + bool bHasPropValues = rCompDataAny.has< css::uno::Sequence< css::beans::PropertyValue > >(); + OSL_ENSURE( bHasNamedValues || bHasPropValues, "MediaDescriptor::setComponentDataEntry - incompatible 'ComponentData' property in media descriptor" ); + if( bHasNamedValues || bHasPropValues ) { // insert or overwrite the passed value SequenceAsHashMap aCompDataMap( rCompDataAny ); aCompDataMap[ rName ] = rValue; - // write back the sequence (sal_False = use NamedValue instead of PropertyValue) - rCompDataAny = aCompDataMap.getAsConstAny( sal_False ); + // write back the sequence (restore sequence with correct element type) + rCompDataAny = aCompDataMap.getAsConstAny( bHasPropValues ); } } else @@ -518,18 +522,20 @@ void MediaDescriptor::clearComponentDataEntry( const ::rtl::OUString& rName ) SequenceAsHashMap::iterator aPropertyIter = find( PROP_COMPONENTDATA() ); if( aPropertyIter != end() ) { - OSL_ENSURE( aPropertyIter->second.has< ComponentDataSequence >(), - "MediaDescriptor::clearComponentDataEntry - incompatible 'ComponentData' property in media descriptor" ); - if( aPropertyIter->second.has< ComponentDataSequence >() ) + css::uno::Any& rCompDataAny = aPropertyIter->second; + bool bHasNamedValues = rCompDataAny.has< css::uno::Sequence< css::beans::NamedValue > >(); + bool bHasPropValues = rCompDataAny.has< css::uno::Sequence< css::beans::PropertyValue > >(); + OSL_ENSURE( bHasNamedValues || bHasPropValues, "MediaDescriptor::clearComponentDataEntry - incompatible 'ComponentData' property in media descriptor" ); + if( bHasNamedValues || bHasPropValues ) { // remove the value with the passed name - SequenceAsHashMap aCompDataMap( aPropertyIter->second ); + SequenceAsHashMap aCompDataMap( rCompDataAny ); aCompDataMap.erase( rName ); // write back the sequence, or remove it completely if it is empty if( aCompDataMap.empty() ) erase( aPropertyIter ); else - aPropertyIter->second = aCompDataMap.getAsConstAny( sal_False ); + rCompDataAny = aCompDataMap.getAsConstAny( bHasPropValues ); } } } diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index b677c977739e..5be9df3d61b6 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -35,6 +35,7 @@ #include <comphelper/mimeconfighelper.hxx> #include <comphelper/classids.hxx> #include <comphelper/sequenceashashmap.hxx> +#include <comphelper/documentconstants.hxx> using namespace ::com::sun::star; @@ -187,6 +188,46 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo return m_xMediaTypeConfig; } + +//----------------------------------------------------------------------- +uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetFilterFactory() +{ + osl::MutexGuard aGuard( m_aMutex ); + + if ( !m_xFilterFactory.is() ) + m_xFilterFactory.set( + m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ), + uno::UNO_QUERY ); + + return m_xFilterFactory; +} + +//----------------------------------------------------------------------- +sal_Int32 MimeConfigurationHelper::GetFilterFlags( const ::rtl::OUString& aFilterName ) +{ + sal_Int32 nFlags = 0; + try + { + if ( aFilterName.getLength() ) + { + uno::Reference< container::XNameAccess > xFilterFactory( + GetFilterFactory(), + uno::UNO_SET_THROW ); + + uno::Any aFilterAny = xFilterFactory->getByName( aFilterName ); + uno::Sequence< beans::PropertyValue > aData; + if ( aFilterAny >>= aData ) + { + SequenceAsHashMap aFilterHM( aData ); + nFlags = aFilterHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ), (sal_Int32)0 ); + } + } + } catch( uno::Exception& ) + {} + + return nFlags; +} + //------------------------------------------------------------------------- ::rtl::OUString MimeConfigurationHelper::GetDocServiceNameFromFilter( const ::rtl::OUString& aFilterName ) { @@ -195,8 +236,8 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo try { uno::Reference< container::XNameAccess > xFilterFactory( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ), - uno::UNO_QUERY_THROW ); + GetFilterFactory(), + uno::UNO_SET_THROW ); uno::Any aFilterAnyData = xFilterFactory->getByName( aFilterName ); uno::Sequence< beans::PropertyValue > aFilterData; @@ -668,36 +709,17 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( uno::Sequence< beans::PropertyValue >& aMediaDescr ) { + sal_Bool bResult = sal_False; + ::rtl::OUString aFilterName = UpdateMediaDescriptorWithFilterName( aMediaDescr, sal_False ); if ( aFilterName.getLength() ) { - try - { - uno::Reference< container::XNameAccess > xFilterFactory( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ), - uno::UNO_QUERY_THROW ); - - uno::Any aFilterAnyData = xFilterFactory->getByName( aFilterName ); - uno::Sequence< beans::PropertyValue > aFilterData; - if ( aFilterAnyData >>= aFilterData ) - { - for ( sal_Int32 nInd = 0; nInd < aFilterData.getLength(); nInd++ ) - if ( aFilterData[nInd].Name.equalsAscii( "Flags" ) ) - { - uno::Any aVal = aFilterData[nInd].Value; - sal_Int32 nFlags = 0; - // check the OWN flag - if ( ( aFilterData[nInd].Value >>= nFlags ) && ( nFlags & 0x20 ) ) - return sal_True; - break; - } - } - } - catch( uno::Exception& ) - {} + sal_Int32 nFlags = GetFilterFlags( aFilterName ); + // check the OWN flag + bResult = ( nFlags & SFX_FILTER_OWN ); } - return sal_False; + return bResult; } //----------------------------------------------------------- @@ -709,7 +731,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( try { uno::Reference< container::XContainerQuery > xFilterQuery( - m_xFactory->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ), + GetFilterFactory(), uno::UNO_QUERY_THROW ); uno::Sequence< beans::NamedValue > aSearchRequest( 2 ); @@ -734,14 +756,15 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( (sal_Int32)0 ); // that should be import, export, own filter and not a template filter ( TemplatePath flag ) - if ( ( ( nFlags & 0x23L ) == 0x23L ) && !( nFlags & 0x10 ) ) + sal_Int32 nRequired = ( SFX_FILTER_OWN | SFX_FILTER_EXPORT | SFX_FILTER_IMPORT ); + if ( ( ( nFlags & nRequired ) == nRequired ) && !( nFlags & SFX_FILTER_TEMPLATEPATH ) ) { // if there are more than one filter the preffered one should be used // if there is no preffered filter the first one will be used - if ( !aResult.getLength() || ( nFlags & 0x10000000L ) ) + if ( !aResult.getLength() || ( nFlags & SFX_FILTER_PREFERED ) ) aResult = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Name" ), ::rtl::OUString() ); - if ( nFlags & 0x10000000L ) + if ( nFlags & SFX_FILTER_PREFERED ) break; // the preffered filter was found } } @@ -752,6 +775,116 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( return aResult; } + +//------------------------------------------------------------------------- +::rtl::OUString MimeConfigurationHelper::GetExportFilterFromImportFilter( const ::rtl::OUString& aImportFilterName ) +{ + ::rtl::OUString aExportFilterName; + + try + { + if ( aImportFilterName.getLength() ) + { + uno::Reference< container::XNameAccess > xFilterFactory( + GetFilterFactory(), + uno::UNO_SET_THROW ); + + uno::Any aImpFilterAny = xFilterFactory->getByName( aImportFilterName ); + uno::Sequence< beans::PropertyValue > aImpData; + if ( aImpFilterAny >>= aImpData ) + { + SequenceAsHashMap aImpFilterHM( aImpData ); + sal_Int32 nFlags = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ), + (sal_Int32)0 ); + + if ( !( nFlags & SFX_FILTER_IMPORT ) ) + { + OSL_ENSURE( sal_False, "This is no import filter!" ); + throw uno::Exception(); + } + + if ( nFlags & SFX_FILTER_EXPORT ) + { + aExportFilterName = aImportFilterName; + } + else + { + ::rtl::OUString aDocumentServiceName = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "DocumentService" ), ::rtl::OUString() ); + ::rtl::OUString aTypeName = aImpFilterHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Type" ), ::rtl::OUString() ); + + OSL_ENSURE( aDocumentServiceName.getLength() && aTypeName.getLength(), "Incomplete filter data!" ); + if ( aDocumentServiceName.getLength() && aTypeName.getLength() ) + { + uno::Sequence< beans::NamedValue > aSearchRequest( 2 ); + aSearchRequest[0].Name = ::rtl::OUString::createFromAscii( "Type" ); + aSearchRequest[0].Value <<= aTypeName; + aSearchRequest[1].Name = ::rtl::OUString::createFromAscii( "DocumentService" ); + aSearchRequest[1].Value <<= aDocumentServiceName; + + uno::Sequence< beans::PropertyValue > aExportFilterProps = SearchForFilter( + uno::Reference< container::XContainerQuery >( xFilterFactory, uno::UNO_QUERY_THROW ), + aSearchRequest, + SFX_FILTER_EXPORT, + SFX_FILTER_INTERNAL ); + + if ( aExportFilterProps.getLength() ) + { + SequenceAsHashMap aExpPropsHM( aExportFilterProps ); + aExportFilterName = aExpPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Name" ), ::rtl::OUString() ); + } + } + } + } + } + } + catch( uno::Exception& ) + {} + + return aExportFilterName; +} + +//------------------------------------------------------------------------- +// static +uno::Sequence< beans::PropertyValue > MimeConfigurationHelper::SearchForFilter( + const uno::Reference< container::XContainerQuery >& xFilterQuery, + const uno::Sequence< beans::NamedValue >& aSearchRequest, + sal_Int32 nMustFlags, + sal_Int32 nDontFlags ) +{ + uno::Sequence< beans::PropertyValue > aFilterProps; + uno::Reference< container::XEnumeration > xFilterEnum = + xFilterQuery->createSubSetEnumerationByProperties( aSearchRequest ); + + // the first default filter will be taken, + // if there is no filter with flag default the first acceptable filter will be taken + if ( xFilterEnum.is() ) + { + while ( xFilterEnum->hasMoreElements() ) + { + uno::Sequence< beans::PropertyValue > aProps; + if ( xFilterEnum->nextElement() >>= aProps ) + { + SequenceAsHashMap aPropsHM( aProps ); + sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ), + (sal_Int32)0 ); + if ( ( ( nFlags & nMustFlags ) == nMustFlags ) && !( nFlags & nDontFlags ) ) + { + if ( ( nFlags & SFX_FILTER_DEFAULT ) == SFX_FILTER_DEFAULT ) + { + aFilterProps = aProps; + break; + } + else if ( !aFilterProps.getLength() ) + aFilterProps = aProps; + } + } + } + } + + return aFilterProps; +} + + //------------------------------------------------------------------------- sal_Bool MimeConfigurationHelper::ClassIDsEqual( const uno::Sequence< sal_Int8 >& aClassID1, const uno::Sequence< sal_Int8 >& aClassID2 ) { @@ -764,7 +897,8 @@ sal_Bool MimeConfigurationHelper::ClassIDsEqual( const uno::Sequence< sal_Int8 > return sal_True; } -//---------------------------------------------- + +//------------------------------------------------------------------------- uno::Sequence< sal_Int8 > MimeConfigurationHelper::GetSequenceClassID( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3, sal_uInt8 b8, sal_uInt8 b9, sal_uInt8 b10, sal_uInt8 b11, sal_uInt8 b12, sal_uInt8 b13, sal_uInt8 b14, sal_uInt8 b15 ) @@ -789,6 +923,8 @@ uno::Sequence< sal_Int8 > MimeConfigurationHelper::GetSequenceClassID( sal_uInt3 return aResult; } + +//------------------------------------------------------------------------- uno::Sequence<sal_Int8> MimeConfigurationHelper::GetSequenceClassIDFromObjectName(const ::rtl::OUString& _sObjectName) { uno::Sequence<sal_Int8> aClassId; diff --git a/dtrans/prj/build.lst b/dtrans/prj/build.lst index bd9c73582361..e30eccd59d7e 100644 --- a/dtrans/prj/build.lst +++ b/dtrans/prj/build.lst @@ -1,4 +1,4 @@ -dr dtrans : unotools offapi offuh rdbmaker vos stoc NULL +dr dtrans : unotools offapi offuh rdbmaker vos stoc LIBXSLT:libxslt NULL dr dtrans usr1 - all dr_mkout NULL dr dtrans\inc nmake - all dr_inc NULL dr dtrans\source\cnttype nmake - all dr_cnttype dr_generic dr_inc NULL diff --git a/i18npool/prj/build.lst b/i18npool/prj/build.lst index 24e9607596ac..22609becbe86 100644 --- a/i18npool/prj/build.lst +++ b/i18npool/prj/build.lst @@ -1,4 +1,4 @@ -inp i18npool : bridges sax stoc comphelper ICU:icu i18nutil regexp NULL +inp i18npool : bridges sax stoc comphelper ICU:icu i18nutil regexp LIBXSLT:libxslt NULL inp i18npool usr1 - all inp_mkout NULL inp i18npool\inc nmake - all inp_inc NULL inp i18npool\source\registerservices nmake - all inp_rserv inp_inc NULL diff --git a/l10ntools/inc/export.hxx b/l10ntools/inc/export.hxx index d1474503882f..222cd3bf5cb8 100644 --- a/l10ntools/inc/export.hxx +++ b/l10ntools/inc/export.hxx @@ -452,7 +452,6 @@ public: const ByteString &rTitle ) { - sText[ nId ] = rText; bTextFirst[ nId ] = true; sQuickHelpText[ nId ] = rQuickHelpText; @@ -508,39 +507,33 @@ public: class MergeDataFile { -private: - BOOL bErrorLog; - ByteString sErrorLog; - SvFileStream aErrLog; - ByteStringSet aLanguageSet; - MergeDataHashMap aMap; - ByteStringHashMap aLanguageMap; - std::vector<ByteString> aLanguageList; - ByteStringHashMap aFilenames; - - -public: - MergeDataFile( const ByteString &rFileName, const ByteString& rFile , BOOL bErrLog, CharSet aCharSet, bool bCaseSensitive = false ); - ~MergeDataFile(); - - - std::vector<ByteString> GetLanguages(); - MergeData *GetMergeData( ResData *pResData , bool bCaseSensitve = false ); - - PFormEntrys *GetPFormEntrys( ResData *pResData ); - PFormEntrys *GetPFormEntrysCaseSensitive( ResData *pResData ); - - void InsertEntry( const ByteString &rTYP, const ByteString &rGID, const ByteString &rLID, - const ByteString &rPFO, - const ByteString &nLang , const ByteString &rTEXT, - const ByteString &rQHTEXT, const ByteString &rTITLE , - const ByteString &sFilename , bool bCaseSensitive - ); - static USHORT GetLangIndex( USHORT nId ); - static ByteString CreateKey( const ByteString& rTYP , const ByteString& rGID , const ByteString& rLID , const ByteString& rFilename , bool bCaseSensitive = false ); - - ByteString Dump(); - void WriteError( const ByteString &rLine ); + private: + BOOL bErrorLog; + ByteString sErrorLog; + SvFileStream aErrLog; + MergeDataHashMap aMap; + std::set<ByteString> aLanguageSet; + + MergeData *GetMergeData( ResData *pResData , bool bCaseSensitve = false ); + void InsertEntry( const ByteString &rTYP, const ByteString &rGID, const ByteString &rLID, + const ByteString &rPFO, + const ByteString &nLang, const ByteString &rTEXT, + const ByteString &rQHTEXT, const ByteString &rTITLE, + const ByteString &sFilename, bool bCaseSensitive + ); + ByteString Dump(); + void WriteError( const ByteString &rLine ); + + public: + MergeDataFile( const ByteString &rFileName, const ByteString& rFile , BOOL bErrLog, CharSet aCharSet, bool bCaseSensitive = false ); + ~MergeDataFile(); + + std::vector<ByteString> GetLanguages(); + + PFormEntrys *GetPFormEntrys( ResData *pResData ); + PFormEntrys *GetPFormEntrysCaseSensitive( ResData *pResData ); + + static ByteString CreateKey( const ByteString& rTYP , const ByteString& rGID , const ByteString& rLID , const ByteString& rFilename , bool bCaseSensitive = false ); }; diff --git a/l10ntools/scripts/tool/l10ntool.py b/l10ntools/scripts/tool/l10ntool.py index f1630027ccdc..b65c262b6020 100644 --- a/l10ntools/scripts/tool/l10ntool.py +++ b/l10ntools/scripts/tool/l10ntool.py @@ -116,6 +116,11 @@ class AbstractL10nTool: return self._options.inputfile[0] == '@' def copy_file(self, inputfilename, outputfilename): + try: + os.remove(outputfilename) + except: + pass + try: shutil.copy(inputfilename, outputfilename) except IOError: diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx index eb68215c791e..8c06d5a28171 100644 --- a/l10ntools/source/merge.cxx +++ b/l10ntools/source/merge.cxx @@ -35,18 +35,29 @@ using namespace std; +namespace +{ + static ::rtl::OString lcl_NormalizeFilename(const ::rtl::OString& rFilename) + { + return rFilename.copy( + ::std::max( + rFilename.lastIndexOf( "\\" ), + rFilename.lastIndexOf( "/" ))+1); + }; +} + extern void ConvertHalfwitdhToFullwidth( String& rString ); // // class PFormEntrys // -ByteString PFormEntrys::Dump(){ +ByteString PFormEntrys::Dump() +{ ByteString sRet( "PFormEntrys\n" ); - //sRet.Append( Export::DumpMap( ByteString("sText") , sText ) ); - //sRet.Append("\n"); ByteString a("sText"); - if ( sText.size() ) Export::DumpMap( a , sText ); + if(sText.size()) + Export::DumpMap(a , sText); return sRet; } @@ -69,21 +80,8 @@ BOOL PFormEntrys::GetTransex3Text( ByteString &rReturn, /*****************************************************************************/ BOOL PFormEntrys::GetText( ByteString &rReturn, USHORT nTyp, const ByteString &nLangIndex, BOOL bDel ) -/*****************************************************************************/ { - /*printf("DBG: PFormEntrys::GetText(nId=%s)\n",nLangIndex.GetBuffer() ); - - // DEBUG****************** - ByteStringHashMap::const_iterator idbg; - std::cout << "HASHKEYS : \n"; - for( idbg = sText.begin() ; idbg != sText.end(); ++idbg ) - std::cout << (idbg->first).GetBuffer() << "\n"; - std::cout << "\n\n"; - std::cout << "String sText[ nLangIndex ] = " << sText[ nLangIndex ].GetBuffer() << "\n"; - // DEBUG****************** -*/ - BOOL bReturn=TRUE; switch ( nTyp ) { case STRING_TYP_TEXT : @@ -111,7 +109,6 @@ BOOL PFormEntrys::GetText( ByteString &rReturn, bTitleFirst[ nLangIndex ] = FALSE; break; } - //printf("Returning '%s'\n",rReturn.GetBuffer()); return bReturn; } @@ -120,68 +117,53 @@ BOOL PFormEntrys::GetText( ByteString &rReturn, // class MergeData // -/*****************************************************************************/ MergeData::~MergeData() -/*****************************************************************************/ { } -/*****************************************************************************/ -PFormEntrys* MergeData::GetPFormEntrys( ResData *pResData ) -/*****************************************************************************/ +PFormEntrys* MergeData::GetPFormEntrys(ResData*) { - - (void) pResData; // FIXME - if( aMap.find( ByteString("HACK") ) != aMap.end() ){ - return aMap[ ByteString("HACK") ]; - } - else{ - return 0; - } + if( aMap.find( ByteString("HACK") ) != aMap.end() ) + return aMap[ ByteString("HACK") ]; + return NULL; } -void MergeData::Insert( const ByteString& rPFO , PFormEntrys* pfEntrys ){ - (void) rPFO; // FIXME +void MergeData::Insert(const ByteString&, PFormEntrys* pfEntrys ) +{ aMap.insert( PFormEntrysHashMap::value_type( ByteString("HACK") , pfEntrys ) ); - } + ByteString MergeData::Dump(){ ByteString sRet( "MergeData\n" ); printf("MergeData sTyp = %s , sGid = %s , sLid =%s , sFilename = %s\n",sTyp.GetBuffer(),sGID.GetBuffer(),sLID.GetBuffer(), sFilename.GetBuffer() ); PFormEntrysHashMap::const_iterator idbg; - for( idbg = aMap.begin() ; idbg != aMap.end(); ++idbg ){ + for( idbg = aMap.begin() ; idbg != aMap.end(); ++idbg ) + { printf("aMap[ %s ] = " ,idbg->first.GetBuffer()); ( (PFormEntrys*)(idbg->second) )->Dump(); - printf("\n") ; + printf("\n"); } - printf("\n") ; + printf("\n"); return sRet; } PFormEntrys* MergeData::GetPFObject( const ByteString& rPFO ){ - if( aMap.find( ByteString("HACK") ) != aMap.end() ){ + if( aMap.find( ByteString("HACK") ) != aMap.end() ) return aMap[ rPFO ]; - } - else{ - return 0; - } + return NULL; } -/*****************************************************************************/ PFormEntrys *MergeData::InsertEntry( const ByteString &rPForm ) -/*****************************************************************************/ { PFormEntrys* pFEntrys = new PFormEntrys( rPForm ); aMap.insert( PFormEntrysHashMap::value_type( rPForm , pFEntrys ) ); return pFEntrys; } -/*****************************************************************************/ BOOL MergeData::operator==( ResData *pData ) -/*****************************************************************************/ { ByteString sResTyp_upper( pData->sResTyp ); sResTyp_upper.ToUpperAscii(); @@ -202,130 +184,96 @@ BOOL MergeData::operator==( ResData *pData ) #define FFORMAT_NEW 0x0001 #define FFORMAT_OLD 0x0002 -/*****************************************************************************/ -MergeDataFile::MergeDataFile( const ByteString &rFileName, const ByteString& sFile ,BOOL bErrLog, -// CharSet aCharSet, BOOL bUTF8 , bool bCaseSensitive ) - CharSet aCharSet, bool bCaseSensitive ) -/*****************************************************************************/ - : bErrorLog( bErrLog ) +MergeDataFile::MergeDataFile( + const ByteString &rFileName, + const ByteString& sFile, + BOOL bErrLog, + CharSet aCharSet, + bool bCaseSensitive) + : bErrorLog( bErrLog ) { - SvFileStream aInputStream( String( rFileName, RTL_TEXTENCODING_ASCII_US ), STREAM_STD_READ ); aInputStream.SetStreamCharSet( aCharSet ); ByteString sLine; -// printf("\nReading localize.sdf ...\n"); - ByteString sTYP; - ByteString sGID; - ByteString sLID; - ByteString sPFO; - ByteString nLANG; - ByteString sTEXT; - ByteString sQHTEXT; - ByteString sTITLE; - ByteString sHACK("HACK"); + const ByteString sHACK("HACK"); + const ::rtl::OString sFileNormalized(lcl_NormalizeFilename(sFile)); + const bool isFileEmpty = sFileNormalized.getLength(); - const ByteString sEmpty(""); - - if( !aInputStream.IsOpen() ) { + if( !aInputStream.IsOpen() ) + { printf("Warning : Can't open %s\n", rFileName.GetBuffer()); - //exit( -1 ); return; } - while ( !aInputStream.IsEof()) { + while ( !aInputStream.IsEof()) + { xub_StrLen nToks; aInputStream.ReadLine( sLine ); sLine = sLine.Convert( RTL_TEXTENCODING_MS_1252, aCharSet ); nToks = sLine.GetTokenCount( '\t' ); - if ( nToks == 15 ) { + if ( nToks == 15 ) + { // Skip all wrong filenames - ByteString filename = sLine.GetToken( 1 , '\t' ); - filename = filename.Copy( filename.SearchCharBackward( "\\" )+1 , filename.Len() ); + const ::rtl::OString filename = lcl_NormalizeFilename(sLine.GetToken( 1 , '\t' )); - if( sFile.Equals( sEmpty ) || ( !sFile.Equals( sEmpty ) && filename.Equals( sFile ) ) ) + if(isFileEmpty || (!isFileEmpty && filename.equals(sFileNormalized))) { - 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 - + xub_StrLen rIdx = 0; + const ByteString sTYP = sLine.GetToken( 3, '\t', rIdx ); + const ByteString sGID = sLine.GetToken( 0, '\t', rIdx ); // 4 + const ByteString sLID = sLine.GetToken( 0, '\t', rIdx ); // 5 + ByteString sPFO = sLine.GetToken( 1, '\t', rIdx ); // 7 + sPFO = sHACK; + ByteString nLANG = sLine.GetToken( 1, '\t', rIdx ); // 9 nLANG.EraseLeadingAndTrailingChars(); + const ByteString sTEXT = sLine.GetToken( 0, '\t', rIdx ); // 10 + const ByteString sQHTEXT = sLine.GetToken( 1, '\t', rIdx ); // 12 + const ByteString sTITLE = sLine.GetToken( 0, '\t', rIdx ); // 13 + #ifdef MERGE_SOURCE_LANGUAGES - if( true ){ + if( true ) #else - if ( !nLANG.EqualsIgnoreCaseAscii("en-US") ){ + if( !nLANG.EqualsIgnoreCaseAscii("en-US") ) #endif - 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 - aLanguageList.push_back( nLANG ); - } else - aLANG = lit->first; - - InsertEntry( sTYP, sGID, sLID, sPFO, aLANG, sTEXT, sQHTEXT, sTITLE , filename , bCaseSensitive ); + { + aLanguageSet.insert(nLANG); + InsertEntry( sTYP, sGID, sLID, sPFO, nLANG, sTEXT, sQHTEXT, sTITLE, filename, bCaseSensitive ); } } } - else if ( nToks == 10 ) { + else if ( nToks == 10 ) + { printf("ERROR: File format is obsolete and no longer supported!\n"); } } aInputStream.Close(); } -/*****************************************************************************/ + MergeDataFile::~MergeDataFile() -/*****************************************************************************/ { } -/*****************************************************************************/ -//void MergeDataFile::WriteErrorLog( const ByteString &rFileName ) -/*****************************************************************************/ -//{ -// DEAD -//} - ByteString MergeDataFile::Dump(){ ByteString sRet( "MergeDataFile\n" ); - //sRet.Append( Export::DumpMap( "aLanguageSet" , aLanguageSet ) ); - //sRet.Append( Export::DumpMap( "aLanguageList" , aLanguageList ) ); printf("MergeDataFile\n"); MergeDataHashMap::const_iterator idbg; - for( idbg = aMap.begin() ; idbg != aMap.end(); ++idbg ){ - /*sRet.Append( "aMap[" ); - sRet.Append( idbg->first ); - sRet.Append( "]= " ); - sRet.Append( ((MergeData*) (idbg->second))->Dump() ); - sRet.Append("\n");*/ - + for( idbg = aMap.begin() ; idbg != aMap.end(); ++idbg ) + { printf("aMap[ %s ] = ",idbg->first.GetBuffer()); ((MergeData*) (idbg->second))->Dump(); printf("\n"); } printf("\n"); - //sRet.Append("\n"); return sRet; } -/*****************************************************************************/ void MergeDataFile::WriteError( const ByteString &rLine ) -/*****************************************************************************/ { - if ( bErrorLog ) { + if ( bErrorLog ) + { if ( !aErrLog.IsOpen()) aErrLog.Open( String( sErrorLog, RTL_TEXTENCODING_ASCII_US ), STREAM_STD_WRITE | STREAM_TRUNC ); aErrLog.WriteLine( rLine ); @@ -333,45 +281,39 @@ void MergeDataFile::WriteError( const ByteString &rLine ) else fprintf( stderr, "%s\n", rLine.GetBuffer()); } + std::vector<ByteString> MergeDataFile::GetLanguages(){ - return aLanguageList; + return std::vector<ByteString>(aLanguageSet.begin(),aLanguageSet.end()); } -/*****************************************************************************/ MergeData *MergeDataFile::GetMergeData( ResData *pResData , bool bCaseSensitive ) -/*****************************************************************************/ { ByteString sOldG = pResData->sGId; ByteString sOldL = pResData->sId; ByteString sGID = pResData->sGId; ByteString sLID; - if ( !sGID.Len()) + if(!sGID.Len()) sGID = pResData->sId; else sLID = pResData->sId; pResData->sGId = sGID; pResData->sId = sLID; - //printf("MergeData:: Search gid=%s lid=%s filename=%s \n", pResData->sGId.GetBuffer(),pResData->sId.GetBuffer(),pResData->sFilename.GetBuffer() ); + ByteString sKey = CreateKey( pResData->sResTyp , pResData->sGId , pResData->sId , pResData->sFilename , bCaseSensitive ); - //printf("DBG: Searching [%s]\n",sKey.GetBuffer()); - if( aMap.find( sKey ) != aMap.end() ){ + if(aMap.find( sKey ) != aMap.end()) + { pResData->sGId = sOldG; pResData->sId = sOldL; - //printf("DBG: Found[%s]\n",sKey.GetBuffer()); return aMap[ sKey ]; } - //Dump(); pResData->sGId = sOldG; pResData->sId = sOldL; - //printf("DBG: Found[%s]\n",sKey.GetBuffer()); return NULL; } -/*****************************************************************************/ PFormEntrys *MergeDataFile::GetPFormEntrys( ResData *pResData ) -/*****************************************************************************/ { // search for requested PFormEntrys MergeData *pData = GetMergeData( pResData ); @@ -380,9 +322,7 @@ PFormEntrys *MergeDataFile::GetPFormEntrys( ResData *pResData ) return NULL; } -/*****************************************************************************/ PFormEntrys *MergeDataFile::GetPFormEntrysCaseSensitive( ResData *pResData ) -/*****************************************************************************/ { // search for requested PFormEntrys MergeData *pData = GetMergeData( pResData , true ); @@ -390,70 +330,58 @@ PFormEntrys *MergeDataFile::GetPFormEntrysCaseSensitive( ResData *pResData ) return pData->GetPFormEntrys( pResData ); return NULL; } -/*****************************************************************************/ + void MergeDataFile::InsertEntry( - const ByteString &rTYP, const ByteString &rGID, - const ByteString &rLID, const ByteString &rPFO, - const ByteString &nLANG, const ByteString &rTEXT, - const ByteString &rQHTEXT, const ByteString &rTITLE , - const ByteString &rInFilename , bool bCaseSensitive - ) -/*****************************************************************************/ + const ByteString &rTYP, const ByteString &rGID, + const ByteString &rLID, const ByteString &rPFO, + const ByteString &nLANG, const ByteString &rTEXT, + const ByteString &rQHTEXT, const ByteString &rTITLE , + const ByteString &rInFilename , bool bCaseSensitive + ) { MergeData *pData; - BOOL bFound = FALSE; - - // 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; // search for MergeData - - ByteString sKey = CreateKey( rTYP , rGID , rLID , aFilename , bCaseSensitive ); + ByteString sKey = CreateKey( rTYP , rGID , rLID , rInFilename , bCaseSensitive ); MergeDataHashMap::const_iterator mit; mit = aMap.find( sKey ); - if( mit != aMap.end() ){ + if( mit != aMap.end() ) + { pData = mit->second; - }else{ - pData = new MergeData( rTYP, rGID, rLID, aFilename ); + } + else + { + pData = new MergeData( rTYP, rGID, rLID, rInFilename ); aMap.insert( MergeDataHashMap::value_type( sKey, pData ) ); } - bFound = FALSE; PFormEntrys *pFEntrys = 0; // search for PFormEntrys - pFEntrys = pData->GetPFObject( rPFO ); - if( !pFEntrys ){ + if( !pFEntrys ) + { // create new PFormEntrys, cause no one exists with current properties pFEntrys = new PFormEntrys( rPFO ); pData->Insert( rPFO , pFEntrys ); } // finaly insert the cur string - pFEntrys->InsertEntry( nLANG , rTEXT, rQHTEXT, rTITLE ); - - //printf("DBG: MergeDataFile::Insert[]=( sKey=%s,nLang=%s,rTEXT=%s)\n",sKey2.GetBuffer(),nLANG.GetBuffer(),rTEXT.GetBuffer()); } -ByteString MergeDataFile::CreateKey( const ByteString& rTYP , const ByteString& rGID , const ByteString& rLID , const ByteString& rFilename , bool bCaseSensitive ){ - - ByteString sKey( rTYP ); - sKey.Append( '-' ); - sKey.Append( rGID ); - sKey.Append( '-' ); - sKey.Append( rLID ); - sKey.Append( '-' ); - sKey.Append( rFilename ); - - if( bCaseSensitive ) return sKey; // officecfg case sensitive identifier - else return sKey.ToUpperAscii(); -} - +ByteString MergeDataFile::CreateKey( const ByteString& rTYP , const ByteString& rGID , const ByteString& rLID , const ByteString& rFilename , bool bCaseSensitive ) +{ + static const ::rtl::OString sStroke('-'); + ::rtl::OString sKey( rTYP ); + sKey += sStroke; + sKey += rGID; + sKey += sStroke; + sKey += rLID; + sKey += sStroke; + sKey += lcl_NormalizeFilename(rFilename); + OSL_TRACE("created key: %s", sKey.getStr()); + if(bCaseSensitive) + return sKey; // officecfg case sensitive identifier + return sKey.toAsciiUpperCase(); +} diff --git a/rsc/inc/rscsfx.hxx b/rsc/inc/rsc/rscsfx.hxx index 830bbcf37baa..830bbcf37baa 100644 --- a/rsc/inc/rscsfx.hxx +++ b/rsc/inc/rsc/rscsfx.hxx diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index 51461cf356d6..cbdf5a326a43 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -142,7 +142,6 @@ class RscTypCont Atom nTopImageId; Atom nNoLabelId; Atom nVertId; - Atom nSingleLineId; Atom nSysWinId; void Init(); // Initialisiert Klassen und Tabelle diff --git a/rsc/inc/vclrsc.hxx b/rsc/inc/vclrsc.hxx index d4084f2bc239..11b3f57c1dd2 100644 --- a/rsc/inc/vclrsc.hxx +++ b/rsc/inc/vclrsc.hxx @@ -30,154 +30,9 @@ #include <sal/types.h> #include <tools/solar.h> - -// --------------- -// - Window-Bits - -// --------------- - -// from vcl/inc/wintypes.hxx -typedef sal_Int64 WinBits; - -// Window-Bits fuer Window -#define WB_CLIPCHILDREN ((WinBits)0x00000001) -#define WB_DIALOGCONTROL ((WinBits)0x00000002) -#define WB_NODIALOGCONTROL ((WinBits)0x00000004) -#define WB_BORDER ((WinBits)0x00000008) -#define WB_NOBORDER ((WinBits)0x00000010) -#define WB_SIZEABLE ((WinBits)0x00000020) -#define WB_3DLOOK ((WinBits)0x00000040) -#define WB_AUTOSIZE ((WinBits)0x00000080) - -// Window-Bits fuer SystemWindows -#define WB_MOVEABLE ((WinBits)0x00000100) -#define WB_ROLLABLE ((WinBits)0x00000200) -#define WB_CLOSEABLE ((WinBits)0x00000400) -#define WB_STANDALONE ((WinBits)0x00000800) -#define WB_APP ((WinBits)0x00001000) -#define WB_PINABLE ((WinBits)0x00002000) -#define WB_SYSTEMWINDOW ((WinBits)0x40000000) -#define WB_SIZEMOVE (WB_SIZEABLE | WB_MOVEABLE) - -// Standard-Window-Bits fuer ChildWindows -#define WB_TABSTOP ((WinBits)0x00000100) -#define WB_NOTABSTOP ((WinBits)0x00000200) -#define WB_GROUP ((WinBits)0x00000400) -#define WB_NOGROUP ((WinBits)0x00000800) -#define WB_HORZ ((WinBits)0x00001000) -#define WB_VERT ((WinBits)0x00002000) -#define WB_LEFT ((WinBits)0x00004000) -#define WB_CENTER ((WinBits)0x00008000) -#define WB_RIGHT ((WinBits)0x00010000) -#define WB_TOP ((WinBits)0x00020000) -#define WB_VCENTER ((WinBits)0x00040000) -#define WB_BOTTOM ((WinBits)0x00080000) -#define WB_DRAG ((WinBits)0x00100000) -#define WB_SPIN ((WinBits)0x00200000) -#define WB_REPEAT ((WinBits)0x00400000) -#define WB_NOPOINTERFOCUS ((WinBits)0x00800000) -#define WB_WORDBREAK ((WinBits)0x01000000) -#define WB_NOLABEL ((WinBits)0x02000000) -#define WB_SORT ((WinBits)0x04000000) -#define WB_DROPDOWN ((WinBits)0x08000000) -#define WB_AUTOHSCROLL ((WinBits)0x10000000) -#define WB_DOCKABLE ((WinBits)0x20000000) -#define WB_AUTOVSCROLL ((WinBits)0x40000000) - -#define WB_HIDE ((WinBits)0x80000000) -#define WB_HSCROLL WB_HORZ -#define WB_VSCROLL WB_VERT -#define WB_TOPIMAGE WB_TOP - -// Window-Bits for PushButtons -#define WB_DEFBUTTON ((WinBits)0x10000000) -#define WB_NOLIGHTBORDER ((WinBits)0x20000000) -#define WB_RECTSTYLE ((WinBits)0x08000000) -#define WB_SMALLSTYLE ((WinBits)0x04000000) - -// Window-Bits for FixedText -#define WB_INFO ((WinBits)0x20000000) -#define WB_PATHELLIPSIS ((WinBits)0x00100000) - -// Window-Bits for Edit -#define WB_PASSWORD ((WinBits)0x01000000) -#define WB_READONLY ((WinBits)0x02000000) -#define WB_NOHIDESELECTION ((WinBits)SAL_CONST_INT64(0x1000000000)) - -// Window-Bits for MultiLineEdit -#define WB_IGNORETAB ((WinBits)0x20000000) - -// Window-Bits for ListBox and MultiListBox -#define WB_SIMPLEMODE ((WinBits)0x20000000) - -// Window-Bits for FixedBitmap -#define WB_FAST ((WinBits)0x04000000) -#define WB_SCALE ((WinBits)0x08000000) -#define WB_TOPLEFTVISIBLE ((WinBits)0x10000000) - -// Window-Bits for ToolBox -#define WB_LINESPACING ((WinBits)0x01000000) -#define WB_SCROLL ((WinBits)0x02000000) - -// Window-Bits for TabControl -#define WB_SINGLELINE ((WinBits)0x02000000) - -// Window-Bits for DockingWindows -#define WB_DOCKBORDER ((WinBits)0x00001000) - -// Window-Bits for SplitWindow -#define WB_NOSPLITDRAW ((WinBits)0x01000000) -#define WB_FLATSPLITDRAW ((WinBits)0x02000000) - -// Window-Bits for MessageBoxen -#define WB_OK ((WinBits)0x00100000) -#define WB_OK_CANCEL ((WinBits)0x00200000) -#define WB_YES_NO ((WinBits)0x00400000) -#define WB_YES_NO_CANCEL ((WinBits)0x00800000) -#define WB_RETRY_CANCEL ((WinBits)0x01000000) -#define WB_DEF_OK ((WinBits)0x02000000) -#define WB_DEF_CANCEL ((WinBits)0x04000000) -#define WB_DEF_RETRY ((WinBits)0x08000000) -#define WB_DEF_YES ((WinBits)0x10000000) -#define WB_DEF_NO ((WinBits)0x20000000) -#define WB_ABORT_RETRY_IGNORE ((WinBits)SAL_CONST_INT64(0x1000000000)) -#define WB_DEF_IGNORE ((WinBits)SAL_CONST_INT64(0x2000000000)) - -// Standard-WinBits -#define WB_STDWORK (WB_SIZEMOVE | WB_CLOSEABLE) -#define WB_STDMDI (WB_CLOSEABLE) -#define WB_STDDOCKWIN (WB_DOCKABLE | WB_MOVEABLE | WB_CLOSEABLE) -#define WB_STDFLOATWIN (WB_SIZEMOVE | WB_CLOSEABLE | WB_ROLLABLE) -#define WB_STDDIALOG (WB_MOVEABLE | WB_CLOSEABLE) -#define WB_STDMODELESS (WB_STDDIALOG) -#define WB_STDMODAL (WB_STDDIALOG) -#define WB_STDTABDIALOG (WB_STDDIALOG) -#define WB_STDTABCONTROL 0 - -// For TreeListBox -#define WB_HASBUTTONS ((WinBits)0x00800000) -#define WB_HASLINES ((WinBits)0x01000000) -#define WB_HASLINESATROOT ((WinBits)0x02000000) - -// -------------- -// - Help-Types - -// -------------- - -#if 0 -// from vcl/inc/help.hxx -#define OOO_HELP_INDEX ".help:index" -#define OOO_HELP_HELPONHELP ".help:helponhelp" -#endif - -// -------------- -// - FieldTypes - -// -------------- - -// from vcl/inc/fldunit.hxx -enum FieldUnit { FUNIT_NONE, FUNIT_MM, FUNIT_CM, FUNIT_M, FUNIT_KM, - FUNIT_TWIP, FUNIT_POINT, FUNIT_PICA, - FUNIT_INCH, FUNIT_FOOT, FUNIT_MILE, FUNIT_CUSTOM, - FUNIT_PERCENT, FUNIT_100TH_MM }; - +#include <tools/wintypes.hxx> +#include <tools/fldunit.hxx> +#include <tools/mapunit.hxx> // from vcl/inc/vclenum.hxx #ifndef ENUM_TIMEFIELDFORMAT_DECLARED @@ -217,25 +72,6 @@ enum KeyFuncType { KEYFUNC_DONTKNOW, KEYFUNC_NEW, KEYFUNC_OPEN, KEYFUNC_SAVE, #endif -// ------------ -// - TriState - -// ------------ - -// from vcl/inc/wintypes.hxx -enum TriState { STATE_NOCHECK, STATE_CHECK, STATE_DONTKNOW }; - -// ----------------- -// - MapMode-Types - -// ----------------- - -// from vcl/inc/mapmod.hxx -enum MapUnit { MAP_100TH_MM, MAP_10TH_MM, MAP_MM, MAP_CM, - MAP_1000TH_INCH, MAP_100TH_INCH, MAP_10TH_INCH, MAP_INCH, - MAP_POINT, MAP_TWIP, MAP_PIXEL, MAP_SYSFONT, MAP_APPFONT, - MAP_RELATIVE, MAP_REALAPPFONT }; - -// Das Resourcesystem benutzt den Wert 0xFFFF (freihalten) - // -------------------------- // - Bits fuer ToolBoxItems - @@ -272,14 +108,6 @@ typedef sal_uInt16 WindowBorderStyle; #define WINDOW_BORDER_MENU ((WindowBorderStyle)0x0010) #define WINDOW_BORDER_NOBORDER ((WindowBorderStyle)0x1000) -// --------------- -// - WindowAlign - -// --------------- - -// from vcl/inc/wintypes.hxx -enum WindowAlign { WINDOWALIGN_LEFT, WINDOWALIGN_TOP, WINDOWALIGN_RIGHT, WINDOWALIGN_BOTTOM }; -enum ImageAlign { IMAGEALIGN_LEFT, IMAGEALIGN_TOP, IMAGEALIGN_RIGHT, IMAGEALIGN_BOTTOM }; - // -------------- // - Menu-Types - // -------------- @@ -338,9 +166,6 @@ typedef sal_uInt16 SymbolType; #define SYMBOL_DOCK ((SymbolType)32) #define SYMBOL_HIDE ((SymbolType)33) #define SYMBOL_HELP ((SymbolType)34) -#define SYMBOL_OS2CLOSE ((SymbolType)35) -#define SYMBOL_OS2FLOAT ((SymbolType)36) -#define SYMBOL_OS2HIDE ((SymbolType)37) #define SYMBOL_NOSYMBOL (SYMBOL_DONTKNOW) diff --git a/rsc/prj/d.lst b/rsc/prj/d.lst index e59c9b2e9f3a..e79c03d9bb63 100644 --- a/rsc/prj/d.lst +++ b/rsc/prj/d.lst @@ -6,4 +6,4 @@ ..\%__SRC%\bin\rscpp %_DEST%\bin%_EXT%\rscpp mkdir: %_DEST%\inc%_EXT%\rsc -..\inc\rscsfx.hxx %_DEST%\inc%_EXT%\rsc\rscsfx.hxx +..\inc\rsc/rscsfx.hxx %_DEST%\inc%_EXT%\rsc\rscsfx.hxx diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx index 05f7210fd357..af176fe24934 100644 --- a/rsc/source/parser/rscdb.cxx +++ b/rsc/source/parser/rscdb.cxx @@ -903,7 +903,7 @@ ERRTYPE RscTypCont :: WriteHxx( FILE * fOutput, ULONG nFileKey ) fprintf( fOutput, "#include <vcl/fixed.hxx>\n" ); fprintf( fOutput, "#include <vcl/group.hxx>\n" ); fprintf( fOutput, "#include <vcl/image.hxx>\n" ); - fprintf( fOutput, "#include <vcl/imagebtn.hxx>\n" ); + fprintf( fOutput, "#include <vcl/button.hxx>\n" ); fprintf( fOutput, "#include <vcl/keycod.hxx>\n" ); fprintf( fOutput, "#include <vcl/lstbox.hxx>\n" ); fprintf( fOutput, "#include <vcl/mapmod.hxx>\n" ); @@ -1113,3 +1113,4 @@ sal_uInt32 RscTypCont::PutTranslatorKey( sal_uInt64 nKey ) aIdTranslator[ nKey ] = nFilePos; return nPMId++; } + diff --git a/rsc/source/parser/rscibas.cxx b/rsc/source/parser/rscibas.cxx index 1a896c897e27..a60db4f54d2f 100644 --- a/rsc/source/parser/rscibas.cxx +++ b/rsc/source/parser/rscibas.cxx @@ -102,7 +102,7 @@ void RscLangEnum::Init( RscNameTable& rNames ) while ( NULL != ( pLangEntry = MsLangId::getIsoLangEntry( nIndex )) && ( pLangEntry->mnLang != LANGUAGE_DONTKNOW )) { #if OSL_DEBUG_LEVEL > 2 - fprintf( stderr, "ISO Language in : %d %d %s\n", + fprintf( stderr, "ISO Language in : %d\n", (int)nIndex, pLangEntry->mnLang, MsLangId::convertLanguageToIsoByteString( pLangEntry->mnLang ).getStr() ); @@ -200,7 +200,7 @@ Atom RscLangEnum::AddLanguage( const char* pLang, RscNameTable& rNames ) mnLangId++; } #if OSL_DEBUG_LEVEL > 2 - fprintf( stderr, "AddLanguage( %s ) = 0x%lx\n", pLang, nResult ); + fprintf( stderr, "AddLanguage( %s ) = %d\n", pLang, nResult ); #endif return nResult; } diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx index 1942711a4a47..8b9a088c76cc 100644 --- a/rsc/source/parser/rscicpx.cxx +++ b/rsc/source/parser/rscicpx.cxx @@ -40,7 +40,7 @@ #include <rscclass.hxx> #include <rsccont.hxx> #include <rscdb.hxx> -#include <rscsfx.hxx> +#include <rsc/rscsfx.hxx> #include "rsclex.hxx" #include <yyrscyacc.hxx> @@ -2277,7 +2277,6 @@ RscTop * RscTypCont::InitClassTabControl( RscTop * pSuper, pClassTabControl->SetVariable( nId, pCont, NULL, 0, RSC_TABCONTROL_ITEMLIST ); - INS_WINBIT( pClassTabControl, SingleLine ); INS_WINBIT( pClassTabControl, DropDown ); } diff --git a/rsc/source/parser/rscinit.cxx b/rsc/source/parser/rscinit.cxx index 54a56a3840d2..aded8db5f865 100644 --- a/rsc/source/parser/rscinit.cxx +++ b/rsc/source/parser/rscinit.cxx @@ -372,8 +372,6 @@ void RscTypCont::Init() aWinBits.SetConstant( nNoLabelId, sal::static_int_cast<INT32>(WB_NOLABEL) ); nVertId = pHS->getID( "WB_VERT" ); aWinBits.SetConstant( nVertId, sal::static_int_cast<INT32>(WB_VERT) ); - nSingleLineId = pHS->getID( "WB_SINGLELINE" ); - aWinBits.SetConstant( nSingleLineId, sal::static_int_cast<INT32>(WB_SINGLELINE) ); nSysWinId = pHS->getID( "WB_SYSTEMWINDOW" ); aWinBits.SetConstant( nSysWinId, sal::static_int_cast<INT32>(WB_SYSTEMWINDOW) ); } diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 15d26318875b..54073563403d 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -66,12 +66,14 @@ #include <rschash.hxx> #include <osl/file.h> +#include <osl/file.hxx> #include <osl/process.h> #include <rtl/strbuf.hxx> #include <rtl/tencinfo.h> #include <rtl/textenc.h> #include <vector> +#include <algorithm> using namespace rtl; @@ -724,7 +726,7 @@ ERRTYPE RscCompiler :: IncludeParser( ULONG lFileKey ) *************************************************************************/ ERRTYPE RscCompiler :: ParseOneFile( ULONG lFileKey, const RscCmdLine::OutputFile* pOutputFile, - const WriteRcContext* pContext ) + const WriteRcContext* pContext ) { FILE * finput = NULL; ERRTYPE aError; @@ -802,13 +804,36 @@ ERRTYPE RscCompiler :: ParseOneFile( ULONG lFileKey, |* *************************************************************************/ -static OString do_prefix( const char* pPrefix, const OUString& rFile ) +namespace { - OStringBuffer aBuf(256); - aBuf.append( pPrefix ); - aBuf.append( ":" ); - aBuf.append( OUStringToOString( rFile, RTL_TEXTENCODING_MS_1252 ) ); - return aBuf.makeStringAndClear(); + using namespace ::osl; + class RscIoError { }; + static inline OUString lcl_getAbsoluteUrl(const OUString& i_sBaseUrl, const OString& i_sPath) + { + OUString sRelUrl, sAbsUrl; + if(FileBase::getFileURLFromSystemPath(OStringToOUString(i_sPath, RTL_TEXTENCODING_MS_1252), sRelUrl) != FileBase::E_None) + throw RscIoError(); + if(FileBase::getAbsoluteFileURL(i_sBaseUrl, sRelUrl, sAbsUrl) != FileBase::E_None) + throw RscIoError(); + return sAbsUrl; + }; + static inline OString lcl_getSystemPath(const OUString& i_sUrl) + { + OUString sSys; + if(FileBase::getSystemPathFromFileURL(i_sUrl, sSys) != FileBase::E_None) + throw RscIoError(); + OSL_TRACE("temporary file: %s", OUStringToOString(sSys, RTL_TEXTENCODING_UTF8).getStr()); + return OUStringToOString(sSys, RTL_TEXTENCODING_MS_1252); + }; + static inline OString lcl_getTempFile(OUString& sTempDirUrl) + { + // get a temp file name for the rc file + OUString sTempUrl; + if(FileBase::createTempFile(&sTempDirUrl, NULL, &sTempUrl) != FileBase::E_None) + throw RscIoError(); + OSL_TRACE("temporary url: %s", OUStringToOString(sTempUrl, RTL_TEXTENCODING_UTF8).getStr()); + return lcl_getSystemPath(sTempUrl); + }; } ERRTYPE RscCompiler::Link() @@ -817,12 +842,6 @@ ERRTYPE RscCompiler::Link() ERRTYPE aError; RscFile* pFName; -#ifdef UNX -#define PATHSEP '/' -#else -#define PATHSEP '\\' -#endif - if( !(pCL->nCommands & NOLINK_FLAG) ) { ::std::list<RscCmdLine::OutputFile>::const_iterator it; @@ -840,87 +859,55 @@ ERRTYPE RscCompiler::Link() } } - // rc-Datei schreiben - ByteString aDir( it->aOutputRc ); - aDir.SetToken( aDir.GetTokenCount( PATHSEP )-1, PATHSEP, ByteString() ); - if( ! aDir.Len() ) - { - char aBuf[1024]; - if( getcwd( aBuf, sizeof( aBuf ) ) ) - { - aDir = aBuf; - aDir.Append( PATHSEP ); - } - } - // work dir for absolute Urls - OUString aCWD, aTmpUrl; - osl_getProcessWorkingDir( &aCWD.pData ); - // get two temp file urls OString aRcTmp, aSysListTmp, aSysList; - OUString aSysPath, aUrlDir; - aSysPath = OStringToOUString( aDir, RTL_TEXTENCODING_MS_1252 ); - if( osl_getFileURLFromSystemPath( aSysPath.pData, &aUrlDir.pData ) != osl_File_E_None ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), do_prefix( "url conversion", aUrlDir ) ); - - if( osl_getAbsoluteFileURL( aCWD.pData, aUrlDir.pData, &aTmpUrl.pData ) != osl_File_E_None ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), do_prefix( "absolute url", aUrlDir ) ); - aUrlDir = aTmpUrl; + try + { + OUString sPwdUrl; + osl_getProcessWorkingDir( &sPwdUrl.pData ); + OUString sRcUrl = lcl_getAbsoluteUrl(sPwdUrl, it->aOutputRc); + // TempDir is either the directory where the rc file is located or pwd + OUString sTempDirUrl = sRcUrl.copy(0,sRcUrl.lastIndexOf('/')); + OSL_TRACE("rc directory URL: %s", OUStringToOString(sTempDirUrl, RTL_TEXTENCODING_UTF8).getStr()); + + aRcTmp = lcl_getTempFile(sTempDirUrl); + OSL_TRACE("temporary rc file: %s", aRcTmp.getStr()); + + OUString sOilDirUrl; + if(pCL->aILDir.Len()) + sOilDirUrl = lcl_getAbsoluteUrl(sPwdUrl, pCL->aILDir); + else + sOilDirUrl = sTempDirUrl; + OSL_TRACE("ilst directory URL: %s", OUStringToOString(sOilDirUrl, RTL_TEXTENCODING_UTF8).getStr()); - // create temp file for rc target - if( osl_createTempFile( aUrlDir.pData, NULL, &aTmpUrl.pData ) != osl_File_E_None ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), do_prefix( "temp file creation", aUrlDir ) ); + aSysListTmp = lcl_getTempFile(sOilDirUrl); + OSL_TRACE("temporary ilst file: %s", aSysListTmp.getStr()); - if( osl_getSystemPathFromFileURL( aTmpUrl.pData, &aSysPath.pData ) != osl_File_E_None ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), do_prefix( "sys path conversion", aTmpUrl ) ); - aRcTmp = OUStringToOString( aSysPath, RTL_TEXTENCODING_MS_1252 ); + OUString sIlstUrl, sIlstSys; + sIlstUrl = sRcUrl.copy(sRcUrl.lastIndexOf('/')+1); + sIlstUrl = sIlstUrl.copy(0,sIlstUrl.lastIndexOf('.')); + sIlstUrl += OUString::createFromAscii(".ilst"); + sIlstUrl = lcl_getAbsoluteUrl(sOilDirUrl, OUStringToOString(sIlstUrl, RTL_TEXTENCODING_UTF8)); - if ( NULL == (fExitFile = foutput = fopen( aRcTmp.getStr(), "wb" )) ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aRcTmp.getStr() ); - - // make absolute path from IL dir (-oil switch) - // if no -oil was given, use the same dir as for rc file - if( pCL->aILDir.Len() ) + aSysList = lcl_getSystemPath(sIlstUrl); + OSL_TRACE("ilst file: %s", aSysList.getStr()); + } + catch (RscIoError&) { - aSysPath = OStringToOUString( pCL->aILDir, RTL_TEXTENCODING_MS_1252 ); - if( osl_getFileURLFromSystemPath( aSysPath.pData, &aTmpUrl.pData ) != osl_File_E_None ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), do_prefix( "url conversion", aSysPath ) ); - if( osl_getAbsoluteFileURL( aCWD.pData, aTmpUrl.pData, &aUrlDir.pData ) != osl_File_E_None ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), do_prefix( "absolute url", aTmpUrl ) ); + OString sMsg("Error with paths:\n"); + sMsg += "temporary rc file: " + aRcTmp + "\n"; + sMsg += "temporary ilst file: " + aSysListTmp + "\n"; + sMsg += "ilst file: " + aSysList + "\n"; + pTC->pEH->FatalError(ERR_OPENFILE, RscId(), sMsg); } - - if( osl_getSystemPathFromFileURL( aUrlDir.pData, &aSysPath.pData ) != osl_File_E_None ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), do_prefix( "sys path conversion", aUrlDir ) ); - - aSysList = OUStringToOString( aSysPath, RTL_TEXTENCODING_MS_1252 ); - aSysList = aSysList + "/"; - xub_StrLen nLastSep = it->aOutputRc.SearchBackward( PATHSEP ); - if( nLastSep == STRING_NOTFOUND ) - nLastSep = 0; - xub_StrLen nLastPt = it->aOutputRc.Search( '.', nLastSep ); - if( nLastPt == STRING_NOTFOUND ) - nLastPt = it->aOutputRc.Len()+1; - aSysList = aSysList + it->aOutputRc.Copy( nLastSep+1, nLastPt - nLastSep-1 ); - aSysList = aSysList + ".ilst"; - // create temp file for sys list target - if( osl_createTempFile( aUrlDir.pData, NULL, &aTmpUrl.pData ) != osl_File_E_None ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), do_prefix( "temp file creation", aUrlDir ) ); - - if( osl_getSystemPathFromFileURL( aTmpUrl.pData, &aSysPath.pData ) != osl_File_E_None ) - pTC->pEH->FatalError( ERR_OPENFILE, RscId(), do_prefix( "sys path conversion", aTmpUrl ) ); - aSysListTmp = OUStringToOString( aSysPath, RTL_TEXTENCODING_MS_1252 ); - - pTC->pEH->StdOut( "Generating .rc file\n" ); - - rtl_TextEncoding aEnc = RTL_TEXTENCODING_UTF8; - //if( it->aLangName.CompareIgnoreCaseToAscii( "de", 2 ) == COMPARE_EQUAL ) - // aEnc = RTL_TEXTENCODING_MS_1252; + if ( NULL == (fExitFile = foutput = fopen( aRcTmp.getStr(), "wb" )) ) + pTC->pEH->FatalError( ERR_OPENFILE, RscId(), aRcTmp.getStr() ); // Schreibe Datei sal_Char cSearchDelim = ByteString( DirEntry::GetSearchDelimiter(), RTL_TEXTENCODING_ASCII_US ).GetChar( 0 ); sal_Char cAccessDelim = ByteString( DirEntry::GetAccessDelimiter(), RTL_TEXTENCODING_ASCII_US ).GetChar( 0 ); pTC->ChangeLanguage( it->aLangName ); - pTC->SetSourceCharSet( aEnc ); + pTC->SetSourceCharSet( RTL_TEXTENCODING_UTF8 ); pTC->ClearSysNames(); ByteString aSysSearchPath( it->aLangSearchPath ); xub_StrLen nIndex = 0; @@ -936,9 +923,7 @@ ERRTYPE RscCompiler::Link() aSysSearchPath.Append( cSearchDelim ); aSysSearchPath.Append( aToken ); } -#if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "setting search path for language %s: %s\n", it->aLangName.GetBuffer(), aSysSearchPath.GetBuffer() ); -#endif + OSL_TRACE( "setting search path for language %s: %s\n", it->aLangName.GetBuffer(), aSysSearchPath.GetBuffer() ); pTC->SetSysSearchPath( aSysSearchPath ); WriteRcContext aContext; @@ -1153,7 +1138,7 @@ void RscCompiler::OpenInput( const ByteString& rInput ) |*************************************************************************/ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile, - const WriteRcContext& rContext, + const WriteRcContext& rContext, const ByteString& rBaseFileName, ByteString& rImagePath, FILE* pSysListFile ) @@ -1243,9 +1228,9 @@ bool RscCompiler::GetImageFilePath( const RscCmdLine::OutputFile& rOutputFile, // ------------------------------------------------------------------------------ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile, - const WriteRcContext& rContext, - const DirEntry& rSrsInPath, - const DirEntry& rSrsOutPath ) + const WriteRcContext& rContext, + const DirEntry& rSrsInPath, + const DirEntry& rSrsOutPath ) { SvFileStream aIStm( rSrsInPath.GetFull(), STREAM_READ ); SvFileStream aOStm( rSrsOutPath.GetFull(), STREAM_WRITE | STREAM_TRUNC ); @@ -1353,7 +1338,7 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile, } aOStm.WriteLine( "};" ); - } + } else aOStm.WriteLine( aLine ); } @@ -1382,3 +1367,4 @@ void RscCompiler::PreprocessSrsFile( const RscCmdLine::OutputFile& rOutputFile, if( pSysListFile ) fclose( pSysListFile ); } + diff --git a/sax/prj/build.lst b/sax/prj/build.lst index 653d77ce9e25..849700087ae7 100644 --- a/sax/prj/build.lst +++ b/sax/prj/build.lst @@ -1,4 +1,4 @@ -ax sax : offapi cppuhelper EXPAT:expat comphelper NULL +ax sax : offapi cppuhelper EXPAT:expat comphelper LIBXSLT:libxslt NULL ax sax usr1 - all ax_mkout NULL ax sax\source\expatwrap nmake - all ax_expatwrap NULL ax sax\source\tools nmake - all ax_tools NULL diff --git a/sax/source/tools/fshelper.cxx b/sax/source/tools/fshelper.cxx index 743f499fb4f0..6956e5b32bf3 100644 --- a/sax/source/tools/fshelper.cxx +++ b/sax/source/tools/fshelper.cxx @@ -12,8 +12,9 @@ namespace sax_fastparser { FastSerializerHelper::FastSerializerHelper(const Reference< io::XOutputStream >& xOutputStream ) : mpSerializer(new FastSaxSerializer()) { - Reference< lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory(); - mxTokenHandler = Reference<xml::sax::XFastTokenHandler> ( xFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.FastTokenHandler") ) ), UNO_QUERY_THROW ); + Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext(), UNO_SET_THROW ); + Reference< lang::XMultiComponentFactory > xFactory( xContext->getServiceManager(), UNO_SET_THROW ); + mxTokenHandler.set( xFactory->createInstanceWithContext( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.FastTokenHandler") ), xContext ), UNO_QUERY_THROW ); mpSerializer->setFastTokenHandler( mxTokenHandler ); mpSerializer->setOutputStream( xOutputStream ); @@ -23,11 +24,7 @@ FastSerializerHelper::FastSerializerHelper(const Reference< io::XOutputStream >& FastSerializerHelper::~FastSerializerHelper() { mpSerializer->endDocument(); - - if (mpSerializer) { - delete mpSerializer; - mpSerializer = NULL; - } + delete mpSerializer; } void FastSerializerHelper::startElement(const char* elementName, ...) diff --git a/sot/inc/absdev.hxx b/sot/inc/sot/absdev.hxx index 3d251d98e0b6..3d251d98e0b6 100644 --- a/sot/inc/absdev.hxx +++ b/sot/inc/sot/absdev.hxx diff --git a/sot/inc/agg.hxx b/sot/inc/sot/agg.hxx index 2f8cc7587458..2f8cc7587458 100644 --- a/sot/inc/agg.hxx +++ b/sot/inc/sot/agg.hxx diff --git a/sot/inc/clsids.hxx b/sot/inc/sot/clsids.hxx index a64df510dd07..a64df510dd07 100644 --- a/sot/inc/clsids.hxx +++ b/sot/inc/sot/clsids.hxx diff --git a/sot/inc/sot/factory.hxx b/sot/inc/sot/factory.hxx index 08dd21a88aa5..7b7feb0e9ebe 100644 --- a/sot/inc/sot/factory.hxx +++ b/sot/inc/sot/factory.hxx @@ -73,7 +73,6 @@ public: void PutSuperClass( const SotFactory * ); virtual void * CreateInstance( SotObject ** ppObj = NULL ) const; void * CastAndAddRef( SotObject * ) const; - void * AggCastAndAddRef( SotObject * ) const; BOOL Is( const SotFactory * pSuperClass ) const; const SotFactory * GetSuper( USHORT nPos ) const diff --git a/sot/inc/filelist.hxx b/sot/inc/sot/filelist.hxx index 4c6c55534319..4c6c55534319 100644 --- a/sot/inc/filelist.hxx +++ b/sot/inc/sot/filelist.hxx diff --git a/sot/inc/sot/object.hxx b/sot/inc/sot/object.hxx index db2ac3b30ffc..563c90d89a54 100644 --- a/sot/inc/sot/object.hxx +++ b/sot/inc/sot/object.hxx @@ -381,22 +381,17 @@ SotFactory * ClassName::pFactory = NULL; \ #pragma warning(disable: 4250) #endif -class SvAggregateMemberList; struct IUnknown; class SOT_DLLPUBLIC SotObject : virtual public SvRefBase { friend class SotFactory; friend class SvObject; - SvAggregateMemberList * pAggList; // fuer Aggregation, erstes ist das MainObj USHORT nStrongLockCount; USHORT nOwnerLockCount; BOOL bOwner:1, bSVObject:1, // Ist Proxy, dann TRUE wenn andere Seite SV ist bInClose:1; // TRUE, im DoClose - void * DownAggCast( const SotFactory * pFact ); - void RemoveInterface( ULONG ); - void RemoveInterface( SotObject * ); #if defined (GCC) && (defined (C281) || defined (C290) || defined (C291)) public: #else @@ -414,25 +409,10 @@ public: virtual IUnknown * GetInterface( const SvGlobalName & ); BOOL Owner() const { return bOwner; } - BOOL IsSvObject() const; - - // Methoden fuer die Aggregation (siehe OLE2-Spec) - BOOL ShouldDelete(); - virtual void QueryDelete(); - SvAggregateMemberList & GetAggList(); - void AddInterface( SotObject * ); - void AddInterface( SotFactory * ); - virtual SotObjectRef CreateAggObj( const SotFactory * ); - void * AggCast( const SotFactory * pFact ); - void * CastAndAddRef( const SotFactory * pFact ); - SotObject * GetMainObj() const; - - // !!! Read the Manual !!! - virtual USHORT FuzzyLock( BOOL bLock, BOOL bIntern, BOOL bClose ); - void Lock( BOOL bLock ) - { - FuzzyLock( bLock, TRUE, TRUE ); - } + + void* CastAndAddRef( const SotFactory * pFact ); + + USHORT Lock( BOOL bLock ); // affects nStrongLockCount USHORT GetOwnerLockCount() const { return nOwnerLockCount; } USHORT GetStrongLockCount() const { return nStrongLockCount; } @@ -450,18 +430,6 @@ private: //==================class SotObjectRef====================================== SV_IMPL_REF(SotObject) -inline SotObjectRef::SotObjectRef( SotObject * pObjP, SvCastEnum ) -{ - if( pObjP ) - { - pObj = (SotObject *)pObjP->AggCast( SotObject::ClassFactory() ); - if( pObj ) - pObj->AddRef(); - } - else - pObj = NULL; -} - //==================class SotObject*List==================================== SV_DECL_REF_LIST(SotObject,SotObject*) SV_IMPL_REF_LIST(SotObject,SotObject*) diff --git a/sot/inc/sot/sotref.hxx b/sot/inc/sot/sotref.hxx index ae03032e286e..a6728627ef2c 100644 --- a/sot/inc/sot/sotref.hxx +++ b/sot/inc/sot/sotref.hxx @@ -33,14 +33,12 @@ #endif //======================================================================== -enum SvCastEnum { SV_AGGREGATION_CAST }; #ifndef SVT_DECL_SOTOBJECT_DEFINED #define SVT_DECL_SOTOBJECT_DEFINED class SotObject; class SotObjectRef { PRV_SV_DECL_REF(SotObject) - inline SotObjectRef( SotObject * pObjP, SvCastEnum ); }; #endif @@ -52,7 +50,6 @@ class ClassName##Ref \ PRV_SV_DECL_REF(ClassName) \ inline ClassName##Ref( const SotObjectRef & ); \ inline ClassName##Ref( SotObject * pObjP ); \ - inline ClassName##Ref( SotObject * pObjP, SvCastEnum ); \ }; #define SO2_IMPL_REF(ClassName) \ @@ -64,12 +61,9 @@ inline ClassName##Ref::ClassName##Ref( const SotObjectRef & r ) \ inline ClassName##Ref::ClassName##Ref( SotObject * pObjP ) \ { \ pObj = (ClassName *)ClassName::ClassFactory()->CastAndAddRef( pObjP );\ -} \ -inline ClassName##Ref::ClassName##Ref( SotObject * pObjP, SvCastEnum ) \ -{ \ - pObj = (ClassName *)ClassName::ClassFactory()->AggCastAndAddRef( pObjP );\ } + #define SO2_DECL_IMPL_REF(ClassName) \ SO2_DECL_REF(ClassName) \ SO2_IMPL_REF(ClassName) diff --git a/sot/inc/stg.hxx b/sot/inc/sot/stg.hxx index 84373e26d596..84373e26d596 100644 --- a/sot/inc/stg.hxx +++ b/sot/inc/sot/stg.hxx diff --git a/sot/inc/storinfo.hxx b/sot/inc/sot/storinfo.hxx index dab1f6d4540e..dab1f6d4540e 100644 --- a/sot/inc/storinfo.hxx +++ b/sot/inc/sot/storinfo.hxx diff --git a/sot/prj/build.lst b/sot/prj/build.lst index a5ebff311e9c..9d6e785898a5 100644 --- a/sot/prj/build.lst +++ b/sot/prj/build.lst @@ -1,4 +1,4 @@ -to sot : tools ucbhelper unotools NULL +to sot : LIBXSLT:libxslt tools ucbhelper unotools NULL to sot usr1 - all sot_mkout NULL to sot\inc nmake - all sot_inc NULL to sot\prj get - all sot_prj NULL diff --git a/sot/prj/d.lst b/sot/prj/d.lst index 10bed8c9fe5e..ec3166bbea1a 100644 --- a/sot/prj/d.lst +++ b/sot/prj/d.lst @@ -1,20 +1,7 @@ mkdir: %_DEST%\inc%_EXT%\sot -..\inc\clsids.hxx %_DEST%\inc%_EXT%\sot\clsids.hxx -..\inc\sot\object.hxx %_DEST%\inc%_EXT%\sot\object.hxx -..\inc\sot\factory.hxx %_DEST%\inc%_EXT%\sot\factory.hxx -..\inc\sot\sotdata.hxx %_DEST%\inc%_EXT%\sot\sotdata.hxx -..\inc\agg.hxx %_DEST%\inc%_EXT%\sot\agg.hxx -..\inc\sot\storage.hxx %_DEST%\inc%_EXT%\sot\storage.hxx -..\inc\storinfo.hxx %_DEST%\inc%_EXT%\sot\storinfo.hxx -..\inc\sot\sotref.hxx %_DEST%\inc%_EXT%\sot\sotref.hxx -..\inc\sot\exchange.hxx %_DEST%\inc%_EXT%\sot\exchange.hxx -..\inc\sot\formats.hxx %_DEST%\inc%_EXT%\sot\formats.hxx -..\inc\absdev.hxx %_DEST%\inc%_EXT%\sot\absdev.hxx -..\inc\stg.hxx %_DEST%\inc%_EXT%\sot\stg.hxx -..\inc\filelist.hxx %_DEST%\inc%_EXT%\sot\filelist.hxx -..\inc\sot\sotdllapi.h %_DEST%\inc%_EXT%\sot\sotdllapi.h +..\inc\sot/*.hxx %_DEST%\inc%_EXT%\sot\*.hxx +..\inc\sot\*.h %_DEST%\inc%_EXT%\sot\*.h -..\%__SRC%\inc\sdintern.hxx %_DEST%\inc%_EXT%\sot\sdintern.hxx ..\%__SRC%\lib\sot.lib %_DEST%\lib%_EXT%\sot.lib ..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT% ..\%__SRC%\lib\lib*.so.* %_DEST%\lib%_EXT% diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx index 67c2b64f105f..d860c8b0f572 100644 --- a/sot/source/base/exchange.cxx +++ b/sot/source/base/exchange.cxx @@ -37,7 +37,7 @@ #include <sot/sotdata.hxx> #include <sot/exchange.hxx> #include <sot/formats.hxx> -#include <clsids.hxx> +#include <sot/clsids.hxx> #include <rtl/instance.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/datatransfer/DataFlavor.hpp> diff --git a/sot/source/base/factory.cxx b/sot/source/base/factory.cxx index 4934f99e78c6..3c034a980578 100644 --- a/sot/source/base/factory.cxx +++ b/sot/source/base/factory.cxx @@ -36,7 +36,7 @@ #include <tools/string.hxx> #include <sot/object.hxx> #include <sot/sotdata.hxx> -#include <clsids.hxx> +#include <sot/clsids.hxx> #include <rtl/instance.hxx> #include <com/sun/star/datatransfer/DataFlavor.hpp> @@ -344,45 +344,6 @@ void * SotFactory::CastAndAddRef return pObj ? pObj->CastAndAddRef( this ) : NULL; } -//========================================================================= -void * SotFactory::AggCastAndAddRef -( - SotObject * pObj /* Das Objekt von dem der Typ gepr"uft wird. */ -) const -/* [Beschreibung] - - Ist eine Optimierung, damit die Ref-Klassen k"urzer implementiert - werden k"onnen. pObj wird auf den Typ der Factory gecastet. - In c++ (wenn es immer erlaubt w"are) w"urde der void * wie im - Beispiel gebildet. - Factory der Klasse SvPersist. - void * p = (void *)(SvPersist *)pObj; - Hinzu kommt noch, dass ein Objekt aus meheren c++ Objekten - zusammengesetzt sein kann. Diese Methode sucht nach einem - passenden Objekt. - - [R"uckgabewert] - - void *, NULL, pObj war NULL oder das Objekt war nicht vom Typ - der Factory. - Ansonsten wird pObj zuerst auf den Typ der Factory - gecastet und dann auf void *. - - [Querverweise] - - <SvObject::AggCast> -*/ -{ - void * pRet = NULL; - if( pObj ) - { - pRet = pObj->AggCast( this ); - if( pRet ) - pObj->AddRef(); - } - return pRet; -} - /************************************************************************* |* SotFactory::Is() |* diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx index 4f854add304d..048f19e65bd7 100644 --- a/sot/source/base/filelist.cxx +++ b/sot/source/base/filelist.cxx @@ -33,7 +33,7 @@ #include<tools/string.hxx> #include<tools/rtti.hxx> #include<sot/exchange.hxx> -#include<filelist.hxx> +#include<sot/filelist.hxx> #include <osl/thread.h> TYPEINIT1_AUTOFACTORY( FileList, SvDataCopyStream ); diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx index baddde6e716f..58b08fb53f18 100644 --- a/sot/source/base/formats.cxx +++ b/sot/source/base/formats.cxx @@ -34,8 +34,8 @@ #include <sot/exchange.hxx> #include <sot/formats.hxx> -#include "filelist.hxx" -#include "clsids.hxx" +#include "sot/filelist.hxx" +#include "sot/clsids.hxx" #include <tools/globname.hxx> #include <com/sun/star/datatransfer/DataFlavor.hpp> diff --git a/sot/source/base/object.cxx b/sot/source/base/object.cxx index 403a1c6bb61d..70792a325d31 100644 --- a/sot/source/base/object.cxx +++ b/sot/source/base/object.cxx @@ -33,11 +33,7 @@ #include <tools/debug.hxx> #include <sot/object.hxx> #include <sot/factory.hxx> -#include <agg.hxx> - -/************** class SvAggregateMemberList *****************************/ -/************************************************************************/ -PRV_SV_IMPL_OWNER_LIST(SvAggregateMemberList,SvAggregate); +#include <sot/agg.hxx> /************** class SotObject ******************************************/ class SotObjectFactory : public SotFactory @@ -84,8 +80,7 @@ void SotObject::TestMemberInvariant( BOOL /*bPrint*/ ) |* Beschreibung *************************************************************************/ SotObject::SotObject() - : pAggList ( NULL ) - , nStrongLockCount( 0 ) + : nStrongLockCount( 0 ) , nOwnerLockCount( 0 ) , bOwner ( TRUE ) , bSVObject ( FALSE ) @@ -119,246 +114,11 @@ IUnknown * SotObject::GetInterface( const SvGlobalName & ) } /************************************************************************* -|* SotObject::IsSvClass() -|* -|* Beschreibung -*************************************************************************/ -BOOL SotObject::IsSvObject() const -{ - return Owner() || bSVObject; -} - -/************************************************************************* -|* SotObject::QueryDelete() -|* -|* Beschreibung: Bei allen aggregierten Objekte muss der RefCount auf -|* 0 gehen, damit das Gesammt-Objekt zerstoert wird. Das -|* zerst�ren von Teilen ist verboten. Da der Aggregator -|* (oder Cast-Verwalter) den Zaehler der aggregierten -|* Objekte um 1 erhoeht, muss dies bei der Berechnung -|* des 0-RefCounts beruecksichtigt werden. -*************************************************************************/ -BOOL SotObject::ShouldDelete() -{ - if( !pAggList ) - return TRUE; - - SvAggregate & rMO = pAggList->GetObject( 0 ); - if( rMO.bMainObj ) - { - AddRef(); - pAggList->GetObject( 0 ).pObj->ReleaseRef(); - return FALSE; - } - - ULONG i; - for( i = 1; i < pAggList->Count(); i++ ) - { - SvAggregate & rAgg = pAggList->GetObject( i ); - // Groesser 1, wegen AddRef() bei AddInterface - if( !rAgg.bFactory && rAgg.pObj->GetRefCount() > 1 ) - { - // den eigenen hochzaehelen - AddRef(); - // einen Aggregierten runterzaehlen - rAgg.pObj->ReleaseRef(); - return FALSE; - } - } - AddNextRef(); // rekursion stoppen - for( i = pAggList->Count() -1; i > 0; i-- ) - { - // Referenzen aufloesen - DBG_ASSERT( !pAggList->GetObject( i ).bMainObj, "main object reference is opened" ); - RemoveInterface( i ); - } - delete pAggList; - pAggList = NULL; - // und zerstoeren, dies ist unabhaengig vom RefCount - return TRUE; -} - -/************************************************************************* -|* SotObject::QueryDelete() -|* -|* Beschreibung -*************************************************************************/ -void SotObject::QueryDelete() -{ - if( ShouldDelete() ) - SvRefBase::QueryDelete(); -} - - - -/************************************************************************* -|* SotObject::GetAggList() -|* -|* Beschreibung -*************************************************************************/ -SvAggregateMemberList & SotObject::GetAggList() -{ - if( !pAggList ) - { - pAggList = new SvAggregateMemberList( 2, 1 ); - pAggList->Append( SvAggregate() ); - } - return *pAggList; -} - - -/************************************************************************* -|* SotObject::RemoveInterface() -|* -|* Beschreibung -*************************************************************************/ -void SotObject::RemoveInterface( ULONG nPos ) -{ - SvAggregate & rAgg = pAggList->GetObject( nPos ); - if( !rAgg.bFactory ) - { - DBG_ASSERT( rAgg.pObj->pAggList, "no aggregation list" ); - DBG_ASSERT( rAgg.pObj->pAggList->GetObject( 0 ).pObj == this, - "not owner of aggregated object" ); - // sich selbst als Cast-Verwalter austragen - rAgg.pObj->pAggList->GetObject( 0 ) = SvAggregate(); - // Referenz aufloesen - rAgg.pObj->ReleaseRef(); - // Aus der eigenen List austragen - pAggList->Remove( nPos ); - } -} - -/************************************************************************* -|* SotObject::RemoveInterface() -|* -|* Beschreibung -*************************************************************************/ -void SotObject::RemoveInterface( SotObject * pObjP ) -{ - DBG_ASSERT( pObjP, "null pointer" ); - DBG_ASSERT( pAggList, "no aggregation list" ); - ULONG i; - for( i = 0; i < pAggList->Count(); i++ ) - { - SvAggregate & rAgg = pAggList->GetObject( i ); - if( !rAgg.bFactory && pObjP == rAgg.pObj ) - RemoveInterface( i ); - } - DBG_ASSERT( i < pAggList->Count(), "object not found" ); -} - -/************************************************************************* -|* SotObject::AddInterface() -|* -|* Beschreibung -*************************************************************************/ -void SotObject::AddInterface( SotObject * pObjP ) -{ - pObjP->AddRef(); // Objekt festhalten - GetAggList(); - pAggList->Append( SvAggregate( pObjP, FALSE ) ); - - // sich selbst als Typecast-Verwalter eintragen - SvAggregateMemberList & rAList = pObjP->GetAggList(); - DBG_ASSERT( !rAList.GetObject( 0 ).bMainObj, "try to aggregate twice" ); - rAList[ 0 ] = SvAggregate( this, TRUE ); -} - -/************************************************************************* -|* SotObject::AddInterface() -|* -|* Beschreibung -*************************************************************************/ -void SotObject::AddInterface( SotFactory * pFactP ) -{ - GetAggList(); - pAggList->Append( SvAggregate( pFactP ) ); -} - -/************************************************************************* -|* SotObject::CreateAggObj() -|* -|* Beschreibung -*************************************************************************/ -SotObjectRef SotObject::CreateAggObj( const SotFactory * ) -{ - return SotObjectRef(); -} - - -/************************************************************************* -|* SotObject::DownAggCast() -|* -|* Beschreibung -*************************************************************************/ -void * SotObject::DownAggCast( const SotFactory * pFact ) -{ - void * pCast = NULL; - // geht den Pfad nur Richtung aggregierte Objekte - if( pAggList ) - { - for( ULONG i = 1; !pCast || i < pAggList->Count(); i++ ) - { - SvAggregate & rAgg = pAggList->GetObject( i ); - if( rAgg.bFactory ) - { - if( rAgg.pFact->Is( pFact ) ) - { - // On-Demand erzeugen, wenn Typ gebraucht - SotObjectRef aObj( CreateAggObj( rAgg.pFact ) ); - rAgg.bFactory = FALSE; - rAgg.pObj = aObj; - rAgg.pObj->AddRef(); - - // sich selbst als Typecast-Verwalter eintragen - SvAggregateMemberList & rAList = rAgg.pObj->GetAggList(); - DBG_ASSERT( !rAList.GetObject( 0 ).bMainObj, "try to aggregate twice" ); - rAList[ 0 ] = SvAggregate( this, TRUE ); - } - } - if( !rAgg.bFactory ) - { - // muss der (void *) auf Klasse pFact sein - pCast = rAgg.pObj->Cast( pFact ); - if( !pCast ) - pCast = rAgg.pObj->DownAggCast( pFact ); - if( pCast ) - break; - } - } - } - return pCast; -} - -/************************************************************************* -|* SotObject::AggCast() -|* -|* Beschreibung -*************************************************************************/ -void * SotObject::AggCast( const SotFactory * pFact ) -{ - void * pCast = NULL; - if( pAggList ) - { - SvAggregate & rAgg = pAggList->GetObject( 0 ); - if( rAgg.bMainObj ) - return rAgg.pObj->AggCast( pFact ); - pCast = Cast( pFact ); - if( !pCast ) - pCast = DownAggCast( pFact ); - } - else - pCast = Cast( pFact ); - return pCast; -} - -/************************************************************************* |* SotObject::CastAndAddRef() |* |* Beschreibung *************************************************************************/ -void * SotObject::CastAndAddRef( const SotFactory * pFact ) +void* SotObject::CastAndAddRef( const SotFactory * pFact ) { void * pCast = Cast( pFact ); if( pCast ) @@ -366,49 +126,8 @@ void * SotObject::CastAndAddRef( const SotFactory * pFact ) return pCast; } -/************************************************************************* -|* SotObject::GetMainObj() -|* -|* Beschreibung -*************************************************************************/ -SotObject * SotObject::GetMainObj() const -{ - if( pAggList ) - { - if( pAggList->GetObject( 0 ).bMainObj ) - return pAggList->GetObject( 0 ).pObj->GetMainObj(); - } - return (SotObject *)this; -} - //========================================================================= -USHORT SotObject::FuzzyLock -( - BOOL bLock, /* TRUE, lock. FALSE, unlock. */ - BOOL /*bIntern*/, /* TRUE, es handelt sich um einen internen Lock. - FALSE, der Lock kam von aussen (Ole2, Ipc2) */ - BOOL bClose /* TRUE, Close aufrufen wenn letzte Lock */ -) -/* [Beschreibung] - - Erlaubte Parameterkombinationen: - ( TRUE, TRUE, * ) -> interner Lock. - ( FALSE, TRUE, TRUE ) -> interner Unlock mit Close, - wenn LockCount() == 0 - ( TRUE, FALSE, * ) -> externer Lock. - ( FALSE, FALSE, TRUE ) -> externer Unlock mit Close, - wenn LockCount() == 0 - ( FALSE, FALSE, FALSE ) -> externer Unlock - - F"ur !Owner() wird der Aufruf an das externe Objekt weitergeleitet. - F"ur diese muss das <IOleItemContainer>-Interface zur Vef"ugung stehen. - bIntern und bClose werden dann ignoriert. - Wenn der LockCount auf 0 wechselt, wird <SotObject::DoClose> - gerufen, wenn kein OwnerLock besteht. - - [Anmerkung] - -*/ +USHORT SotObject::Lock( BOOL bLock ) { SotObjectRef xHoldAlive( this ); USHORT nRet; @@ -423,8 +142,9 @@ USHORT SotObject::FuzzyLock ReleaseRef(); } - if( !nRet && bClose && !nOwnerLockCount ) + if( !nRet && !nOwnerLockCount ) DoClose(); + return nRet; } diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx index 1c749aa05cb8..c057b2d0aac0 100644 --- a/sot/source/sdstor/stg.cxx +++ b/sot/source/sdstor/stg.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sot.hxx" -#include <storinfo.hxx> +#include <sot/storinfo.hxx> #include <osl/file.hxx> #include <tools/tempfile.hxx> #include <tools/ownlist.hxx> @@ -42,7 +42,7 @@ #include <tools/pstm.hxx> #include <tools/debug.hxx> -#include "stg.hxx" +#include "sot/stg.hxx" #include "stgelem.hxx" #include "stgcache.hxx" #include "stgstrms.hxx" diff --git a/sot/source/sdstor/stgcache.cxx b/sot/source/sdstor/stgcache.cxx index 88a8187ee9dd..f4461383c0ba 100644 --- a/sot/source/sdstor/stgcache.cxx +++ b/sot/source/sdstor/stgcache.cxx @@ -41,7 +41,7 @@ #include <osl/endian.h> #include <tools/string.hxx> -#include "stg.hxx" +#include "sot/stg.hxx" #include "stgelem.hxx" #include "stgcache.hxx" #include "stgstrms.hxx" diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx index 039a29fd2683..8c553d0f8a32 100644 --- a/sot/source/sdstor/stgdir.cxx +++ b/sot/source/sdstor/stgdir.cxx @@ -30,7 +30,7 @@ #include <string.h> // memcpy() -#include "stg.hxx" +#include "sot/stg.hxx" #include "stgelem.hxx" #include "stgcache.hxx" #include "stgstrms.hxx" diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx index 46d7f1803140..b140c7fb27e2 100644 --- a/sot/source/sdstor/stgelem.cxx +++ b/sot/source/sdstor/stgelem.cxx @@ -32,7 +32,7 @@ #include <rtl/ustring.hxx> #include <com/sun/star/lang/Locale.hpp> #include <unotools/charclass.hxx> -#include "stg.hxx" +#include "sot/stg.hxx" #include "stgelem.hxx" #include "stgcache.hxx" #include "stgstrms.hxx" diff --git a/sot/source/sdstor/stgelem.hxx b/sot/source/sdstor/stgelem.hxx index 7a5b7bc52b26..951d3503adbc 100644 --- a/sot/source/sdstor/stgelem.hxx +++ b/sot/source/sdstor/stgelem.hxx @@ -35,7 +35,7 @@ #include <tools/solar.h> #endif -#include <stg.hxx> +#include <sot/stg.hxx> class StgIo; class SvStream; diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx index 545a5eba9c74..f2fe58165e23 100644 --- a/sot/source/sdstor/stgio.cxx +++ b/sot/source/sdstor/stgio.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sot.hxx" -#include "stg.hxx" +#include "sot/stg.hxx" #include "stgelem.hxx" #include "stgcache.hxx" #include "stgstrms.hxx" diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx index 148f1e87585c..0bb5887eed76 100644 --- a/sot/source/sdstor/stgole.cxx +++ b/sot/source/sdstor/stgole.cxx @@ -31,7 +31,7 @@ #include "rtl/string.h" #include "rtl/string.h" #include "stgole.hxx" -#include "storinfo.hxx" // Read/WriteClipboardFormat() +#include "sot/storinfo.hxx" // Read/WriteClipboardFormat() #include <tools/debug.hxx> #if defined(_MSC_VER) && (_MSC_VER>=1400) diff --git a/sot/source/sdstor/stgole.hxx b/sot/source/sdstor/stgole.hxx index 346f21035f06..a9eebe1aae68 100644 --- a/sot/source/sdstor/stgole.hxx +++ b/sot/source/sdstor/stgole.hxx @@ -30,7 +30,7 @@ #include <string.h> // memset() -#include "stg.hxx" +#include "sot/stg.hxx" #include "stgelem.hxx" class StgInternalStream : public SvStream diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx index dd6ba6202bbe..840f2cf2bba8 100644 --- a/sot/source/sdstor/stgstrms.cxx +++ b/sot/source/sdstor/stgstrms.cxx @@ -34,7 +34,7 @@ #include <tools/tempfile.hxx> #include <tools/debug.hxx> -#include "stg.hxx" +#include "sot/stg.hxx" #include "stgelem.hxx" #include "stgcache.hxx" #include "stgstrms.hxx" diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx index 136abb29a98e..e09c5fc864fc 100644 --- a/sot/source/sdstor/storage.cxx +++ b/sot/source/sdstor/storage.cxx @@ -35,8 +35,8 @@ #include <rtl/digest.h> #include <osl/file.hxx> -#include <stg.hxx> -#include <storinfo.hxx> +#include <sot/stg.hxx> +#include <sot/storinfo.hxx> #include <sot/storage.hxx> #include <sot/formats.hxx> #include <sot/exchange.hxx> diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx index 2aaaadd5a151..f912dc6fc83f 100644 --- a/sot/source/sdstor/storinfo.cxx +++ b/sot/source/sdstor/storinfo.cxx @@ -28,8 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sot.hxx" -#include <stg.hxx> -#include <storinfo.hxx> +#include <sot/stg.hxx> +#include <sot/storinfo.hxx> #include <sot/exchange.hxx> diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index ea3b656272db..4f265490a05e 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -66,12 +66,12 @@ #include <cppuhelper/implbase2.hxx> #include <ucbhelper/commandenvironment.hxx> -#include "stg.hxx" -#include "storinfo.hxx" +#include "sot/stg.hxx" +#include "sot/storinfo.hxx" #include <sot/storage.hxx> #include <sot/exchange.hxx> #include <sot/formats.hxx> -#include "clsids.hxx" +#include "sot/clsids.hxx" #include "unostorageholder.hxx" diff --git a/sot/source/sdstor/unostorageholder.cxx b/sot/source/sdstor/unostorageholder.cxx index 55c205557648..6224925c1820 100644 --- a/sot/source/sdstor/unostorageholder.cxx +++ b/sot/source/sdstor/unostorageholder.cxx @@ -36,7 +36,7 @@ #include <comphelper/processfactory.hxx> #include "unostorageholder.hxx" -#include <storinfo.hxx> +#include <sot/storinfo.hxx> using namespace ::com::sun::star; diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx index 1780e45c5ed6..45baf9eed4c5 100644 --- a/sot/source/unoolestorage/xolesimplestorage.cxx +++ b/sot/source/unoolestorage/xolesimplestorage.cxx @@ -39,7 +39,7 @@ #include <cppuhelper/exc_hlp.hxx> -#include <storinfo.hxx> +#include <sot/storinfo.hxx> #include "xolesimplestorage.hxx" diff --git a/sot/source/unoolestorage/xolesimplestorage.hxx b/sot/source/unoolestorage/xolesimplestorage.hxx index c9f1b5c68b0a..18bd6ee64f9e 100644 --- a/sot/source/unoolestorage/xolesimplestorage.hxx +++ b/sot/source/unoolestorage/xolesimplestorage.hxx @@ -43,7 +43,7 @@ #include <osl/mutex.hxx> -#include <stg.hxx> +#include <sot/stg.hxx> class OLESimpleStorage : public ::cppu::WeakImplHelper3 diff --git a/sot/util/makefile.mk b/sot/util/makefile.mk index 72d17db189be..453dbddc5857 100644 --- a/sot/util/makefile.mk +++ b/sot/util/makefile.mk @@ -57,16 +57,16 @@ SHL1DEF= $(MISC)$/$(SHL1TARGET).def DEF1NAME =$(SHL1TARGET) DEF1DEPN =$(MISC)$/$(SHL1TARGET).flt \ - $(PRJ)$/inc$/absdev.hxx \ - $(PRJ)$/inc$/agg.hxx \ + $(PRJ)$/inc$/sot/absdev.hxx \ + $(PRJ)$/inc$/sot/agg.hxx \ $(PRJ)$/inc$/sot$/exchange.hxx \ $(PRJ)$/inc$/sot$/factory.hxx \ $(PRJ)$/inc$/sot$/object.hxx \ $(PRJ)$/inc$/sot$/sotdata.hxx \ $(PRJ)$/inc$/sot$/sotref.hxx \ - $(PRJ)$/inc$/stg.hxx \ + $(PRJ)$/inc$/sot/stg.hxx \ $(PRJ)$/inc$/sot$/storage.hxx \ - $(PRJ)$/inc$/storinfo.hxx + $(PRJ)$/inc$/sot/storinfo.hxx DEFLIB1NAME =$(TARGET) DEF1DES =StarObjectsTools diff --git a/svl/inc/makefile.mk b/svl/AllLangResTarget_svl.mk index a99cf8acc0d2..6759202a5fa4 100644 --- a/svl/inc/makefile.mk +++ b/svl/AllLangResTarget_svl.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2000, 2010 Oracle and/or its affiliates. +# Copyright 2009 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,35 +14,36 @@ # # 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 +# 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 +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # #************************************************************************* -PRJ=.. -PRJNAME=svl -TARGET=inc +$(eval $(call gb_AllLangResTarget_AllLangResTarget,svl)) -# --- Settings ----------------------------------------------------- +$(eval $(call gb_AllLangResTarget_add_srs,svl,\ + svl/res \ +)) -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svl.pmk +$(eval $(call gb_SrsTarget_SrsTarget,svl/res)) -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- +$(eval $(call gb_SrsTarget_set_include,svl/res,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc \ + -I$(SRCDIR)/svl/source/inc \ + -I$(SRCDIR)/svl/inc/ \ + -I$(SRCDIR)/svl/inc/svl \ +)) -.INCLUDE : target.mk +$(eval $(call gb_SrsTarget_add_files,svl/res,\ + svl/source/misc/mediatyp.src \ + svl/source/items/cstitem.src \ +)) -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" diff --git a/svl/Library_fsstorage.mk b/svl/Library_fsstorage.mk new file mode 100644 index 000000000000..93ca50a2d9f4 --- /dev/null +++ b/svl/Library_fsstorage.mk @@ -0,0 +1,93 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,fsstorage)) + +$(eval $(call gb_Library_set_componentfile,fsstorage,svl/source/fsstor/fsstorage)) + +$(eval $(call gb_Library_set_include,fsstorage,\ + $$(SOLARINC) \ + -I$(WORKDIR)/inc/svl \ + -I$(WORKDIR)/inc/ \ + -I$(SRCDIR)/svl/inc \ + -I$(SRCDIR)/svl/inc/svl \ + -I$(SRCDIR)/svl/source/inc \ + -I$(SRCDIR)/svl/inc/pch \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_add_linked_libs,fsstorage,\ + comphelper \ + cppu \ + cppuhelper \ + sal \ + stl \ + tl \ + ucbhelper \ + utl \ +)) + +$(eval $(call gb_Library_add_linked_system_libs,fsstorage,\ + dl \ + icuuc \ + m \ + pthread \ +)) + +$(eval $(call gb_Library_add_exception_objects,fsstorage,\ + svl/source/fsstor/fsfactory \ + svl/source/fsstor/fsstorage \ + svl/source/fsstor/oinputstreamcontainer \ + svl/source/fsstor/ostreamcontainer \ +)) + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,fsstorage,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Library_add_linked_libs,fsstorage,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +endif +# vim: set noet sw=4 ts=4: diff --git a/svl/Library_passwordcontainer.mk b/svl/Library_passwordcontainer.mk new file mode 100644 index 000000000000..a0fbe88be93d --- /dev/null +++ b/svl/Library_passwordcontainer.mk @@ -0,0 +1,89 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,passwordcontainer)) + +$(eval $(call gb_Library_set_componentfile,passwordcontainer,svl/source/passwordcontainer/passwordcontainer)) + +$(eval $(call gb_Library_set_include,passwordcontainer,\ + $$(SOLARINC) \ + -I$(WORKDIR)/inc/svl \ + -I$(WORKDIR)/inc/ \ + -I$(SRCDIR)/svl/inc \ + -I$(SRCDIR)/svl/inc/svl \ + -I$(SRCDIR)/svl/source/inc \ + -I$(SRCDIR)/svl/inc/pch \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_add_linked_libs,passwordcontainer,\ + cppu \ + cppuhelper \ + sal \ + stl \ + ucbhelper \ + utl \ +)) + +$(eval $(call gb_Library_add_linked_system_libs,passwordcontainer,\ + icuuc \ + dl \ + m \ + pthread \ +)) + +$(eval $(call gb_Library_add_exception_objects,passwordcontainer,\ + svl/source/passwordcontainer/passwordcontainer \ + svl/source/passwordcontainer/syscreds \ +)) + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,passwordcontainer,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Library_add_linked_libs,passwordcontainer,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +endif +# vim: set noet sw=4 ts=4: diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk new file mode 100644 index 000000000000..5181983b8bc1 --- /dev/null +++ b/svl/Library_svl.mk @@ -0,0 +1,203 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,svl)) + +$(eval $(call gb_Library_add_package_headers,svl,svl_inc)) + +$(eval $(call gb_Library_add_precompiled_header,svl,$(SRCDIR)/svl/inc/pch/precompiled_svl)) + +$(eval $(call gb_Library_set_componentfile,svl,svl/util/svl)) + +$(eval $(call gb_Library_set_include,svl,\ + $$(SOLARINC) \ + -I$(WORKDIR)/inc/svl \ + -I$(WORKDIR)/inc/ \ + -I$(SRCDIR)/svl/inc \ + -I$(SRCDIR)/svl/source/inc \ + -I$(SRCDIR)/svl/inc/pch \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_set_defs,svl,\ + $$(DEFS) \ + -DSVL_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_linked_libs,svl,\ + basegfx \ + comphelper \ + cppu \ + cppuhelper \ + i18nisolang1 \ + i18nutil \ + jvmfwk \ + sal \ + sot \ + stl \ + tl \ + ucbhelper \ + utl \ + vos3 \ +)) + +$(eval $(call gb_Library_add_linked_system_libs,svl,\ + dl \ + icuuc \ + m \ + pthread \ +)) + + +$(eval $(call gb_Library_add_exception_objects,svl,\ + svl/inc/pch/precompiled_svl \ + svl/source/config/asiancfg \ + svl/source/config/cjkoptions \ + svl/source/config/ctloptions \ + svl/source/config/itemholder2 \ + svl/source/config/languageoptions \ + svl/source/config/srchcfg \ + svl/source/filepicker/pickerhistory \ + svl/source/filerec/filerec \ + svl/source/items/aeitem \ + svl/source/items/cenumitm \ + svl/source/items/cintitem \ + svl/source/items/cntwall \ + svl/source/items/ctypeitm \ + svl/source/items/custritm \ + svl/source/items/dateitem \ + svl/source/items/eitem \ + svl/source/items/flagitem \ + svl/source/items/globalnameitem \ + svl/source/items/ilstitem \ + svl/source/items/imageitm \ + svl/source/items/intitem \ + svl/source/items/itemiter \ + svl/source/items/itempool \ + svl/source/items/itemprop \ + svl/source/items/itemset \ + svl/source/items/lckbitem \ + svl/source/items/macitem \ + svl/source/items/poolcach \ + svl/source/items/poolio \ + svl/source/items/poolitem \ + svl/source/items/ptitem \ + svl/source/items/rectitem \ + svl/source/items/rngitem \ + svl/source/items/sfontitm \ + svl/source/items/sitem \ + svl/source/items/slstitm \ + svl/source/items/srchitem \ + svl/source/items/stritem \ + svl/source/items/style \ + svl/source/items/stylepool \ + svl/source/items/szitem \ + svl/source/items/visitem \ + svl/source/items/whiter \ + svl/source/memtools/svarray \ + svl/source/misc/PasswordHelper \ + svl/source/misc/adrparse \ + svl/source/misc/documentlockfile \ + svl/source/misc/filenotation \ + svl/source/misc/folderrestriction \ + svl/source/misc/fstathelper \ + svl/source/misc/inethist \ + svl/source/misc/inettype \ + svl/source/misc/lngmisc \ + svl/source/misc/lockfilecommon \ + svl/source/misc/ownlist \ + svl/source/misc/restrictedpaths \ + svl/source/misc/sharecontrolfile \ + svl/source/misc/strmadpt \ + svl/source/misc/svldata \ + svl/source/misc/urihelper \ + svl/source/notify/brdcst \ + svl/source/notify/broadcast \ + svl/source/notify/hint \ + svl/source/notify/isethint \ + svl/source/notify/listener \ + svl/source/notify/listenerbase \ + svl/source/notify/listeneriter \ + svl/source/notify/lstner \ + svl/source/notify/smplhint \ + svl/source/numbers/numfmuno \ + svl/source/numbers/numhead \ + svl/source/numbers/numuno \ + svl/source/numbers/supservs \ + svl/source/numbers/zforfind \ + svl/source/numbers/zforlist \ + svl/source/numbers/zformat \ + svl/source/numbers/zforscan \ + svl/source/svsql/converter \ + svl/source/undo/undo \ + svl/source/uno/pathservice \ + svl/source/uno/registerservices \ +)) + +ifeq ($(OS),WNT) +$(eval $(call gb_Library_add_exception_objects,svl,\ + svl/source/svdde/ddecli \ + svl/source/svdde/ddedata \ + svl/source/svdde/ddeinf \ + svl/source/svdde/ddestrg \ + svl/source/svdde/ddesvr \ + svl/source/svdde/ddewrap \ +)) + +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,svl,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + mingwex \ + advapi32 \ + kernel32 \ + gdi32 \ + msvcrt \ + shell32 \ + user32 \ +)) +else +$(eval $(call gb_Library_add_linked_libs,svl,\ + advapi32 \ + kernel32 \ + gdi32 \ + msvcrt \ + shell32 \ + user32 \ + uwinapi \ +)) +endif +else +$(eval $(call gb_Library_add_exception_objects,svl,\ + svl/unx/source/svdde/ddedummy \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/svl/Makefile b/svl/Makefile new file mode 100644 index 000000000000..a79aff831024 --- /dev/null +++ b/svl/Makefile @@ -0,0 +1,38 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif + +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk + +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) + +# vim: set noet sw=4 ts=4: diff --git a/svl/Module_svl.mk b/svl/Module_svl.mk new file mode 100644 index 000000000000..6bba7a0836f7 --- /dev/null +++ b/svl/Module_svl.mk @@ -0,0 +1,42 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Module_Module,svl)) + +$(eval $(call gb_Module_add_targets,svl,\ + AllLangResTarget_svl \ + Library_fsstorage \ + Library_passwordcontainer \ + Library_svl \ + Package_inc \ +)) + +#todo: dde platform dependent +#todo: package_inc +#todo: map file + +# vim: set noet ts=4 sw=4: diff --git a/svl/Package_inc.mk b/svl/Package_inc.mk new file mode 100644 index 000000000000..888cdc38cfa6 --- /dev/null +++ b/svl/Package_inc.mk @@ -0,0 +1,129 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,svl_inc,$(SRCDIR)/svl/inc)) + + +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/PasswordHelper.hxx,svl/PasswordHelper.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/adrparse.hxx,svl/adrparse.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/aeitem.hxx,svl/aeitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/asiancfg.hxx,svl/asiancfg.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/brdcst.hxx,svl/brdcst.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/broadcast.hxx,svl/broadcast.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/broadcast.hxx,svl/broadcast.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/cenumitm.hxx,svl/cenumitm.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/cintitem.hxx,svl/cintitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/cjkoptions.hxx,svl/cjkoptions.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/cntnrsrt.hxx,svl/cntnrsrt.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/cntwall.hxx,svl/cntwall.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/cntwids.hrc,svl/cntwids.hrc)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/converter.hxx,svl/converter.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/ctloptions.hxx,svl/ctloptions.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/ctypeitm.hxx,svl/ctypeitm.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/custritm.hxx,svl/custritm.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/dateitem.hxx,svl/dateitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/documentlockfile.hxx,svl/documentlockfile.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/eitem.hxx,svl/eitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/filenotation.hxx,svl/filenotation.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/filerec.hxx,svl/filerec.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/flagitem.hxx,svl/flagitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/folderrestriction.hxx,svl/folderrestriction.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/fstathelper.hxx,svl/fstathelper.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/globalnameitem.hxx,svl/globalnameitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/hint.hxx,svl/hint.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/httpcook.hxx,svl/httpcook.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/ilstitem.hxx,svl/ilstitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/imageitm.hxx,svl/imageitm.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/inetdef.hxx,svl/inetdef.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/inethist.hxx,svl/inethist.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/inetmsg.hxx,svl/inetmsg.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/inetstrm.hxx,svl/inetstrm.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/inettype.hxx,svl/inettype.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/instrm.hxx,svl/instrm.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/intitem.hxx,svl/intitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/isethint.hxx,svl/isethint.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/itemiter.hxx,svl/itemiter.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/itempool.hxx,svl/itempool.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/itemprop.hxx,svl/itemprop.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/itemset.hxx,svl/itemset.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/languageoptions.hxx,svl/languageoptions.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/lckbitem.hxx,svl/lckbitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/listener.hxx,svl/listener.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/listeneriter.hxx,svl/listeneriter.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/lngmisc.hxx,svl/lngmisc.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/lockfilecommon.hxx,svl/lockfilecommon.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/lstner.hxx,svl/lstner.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/macitem.hxx,svl/macitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/mailenum.hxx,svl/mailenum.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/memberid.hrc,svl/memberid.hrc)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/metitem.hxx,svl/metitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/nfkeytab.hxx,svl/nfkeytab.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/nfsymbol.hxx,svl/nfsymbol.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/nfversi.hxx,svl/nfversi.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/nranges.hxx,svl/nranges.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/numuno.hxx,svl/numuno.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/ondemand.hxx,svl/ondemand.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/outstrm.hxx,svl/outstrm.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/ownlist.hxx,svl/ownlist.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/pickerhelper.hxx,svl/pickerhelper.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/pickerhistory.hxx,svl/pickerhistory.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/pickerhistoryaccess.hxx,svl/pickerhistoryaccess.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/poolcach.hxx,svl/poolcach.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/poolitem.hxx,svl/poolitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/ptitem.hxx,svl/ptitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/rectitem.hxx,svl/rectitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/restrictedpaths.hxx,svl/restrictedpaths.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/rngitem.hxx,svl/rngitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/sfontitm.hxx,svl/sfontitm.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/sharecontrolfile.hxx,svl/sharecontrolfile.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/slstitm.hxx,svl/slstitm.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/smplhint.hxx,svl/smplhint.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/solar.hrc,svl/solar.hrc)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/srchcfg.hxx,svl/srchcfg.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/srchdefs.hxx,svl/srchdefs.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/srchitem.hxx,svl/srchitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/stritem.hxx,svl/stritem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/strmadpt.hxx,svl/strmadpt.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/style.hrc,svl/style.hrc)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/style.hxx,svl/style.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/stylepool.hxx,svl/stylepool.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svarray.hxx,svl/svarray.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svdde.hxx,svl/svdde.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svl.hrc,svl/svl.hrc)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svldata.hxx,svl/svldata.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svldllapi.h,svl/svldllapi.h)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/svstdarr.hxx,svl/svstdarr.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/szitem.hxx,svl/szitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/undo.hxx,svl/undo.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/urihelper.hxx,svl/urihelper.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/urlbmk.hxx,svl/urlbmk.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/urlfilter.hxx,svl/urlfilter.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/visitem.hxx,svl/visitem.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/whiter.hxx,svl/whiter.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/xmlement.hxx,svl/xmlement.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/zforlist.hxx,svl/zforlist.hxx)) +$(eval $(call gb_Package_add_file,svl_inc,inc/svl/zformat.hxx,svl/zformat.hxx)) diff --git a/svl/inc/PasswordHelper.hxx b/svl/inc/svl/PasswordHelper.hxx index da9bc5da99ea..da9bc5da99ea 100644 --- a/svl/inc/PasswordHelper.hxx +++ b/svl/inc/svl/PasswordHelper.hxx diff --git a/svl/inc/adrparse.hxx b/svl/inc/svl/adrparse.hxx index f2a85b9cacd5..f2a85b9cacd5 100644 --- a/svl/inc/adrparse.hxx +++ b/svl/inc/svl/adrparse.hxx diff --git a/svl/inc/broadcast.hxx b/svl/inc/svl/broadcast.hxx index 2acddb5e4f6b..2acddb5e4f6b 100644 --- a/svl/inc/broadcast.hxx +++ b/svl/inc/svl/broadcast.hxx diff --git a/svl/inc/svl/cancel.hxx b/svl/inc/svl/cancel.hxx deleted file mode 100644 index d268044a611d..000000000000 --- a/svl/inc/svl/cancel.hxx +++ /dev/null @@ -1,142 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SFXCANCEL_HXX -#define _SFXCANCEL_HXX - -#include "svl/svldllapi.h" -#include <tools/string.hxx> -#include <tools/ref.hxx> -#include <svl/brdcst.hxx> -#include <svl/smplhint.hxx> - -class SfxCancellable; - -#ifdef _SFX_CANCEL_CXX -#include <svl/svarray.hxx> - -SV_DECL_PTRARR( SfxCancellables_Impl, SfxCancellable*, 0, 4 ) - -#else - -typedef SvPtrarr SfxCancellables_Impl; - -#endif - -//------------------------------------------------------------------------- - -class SVL_DLLPUBLIC SfxCancelManager: public SfxBroadcaster -, public SvWeakBase - -/* [Beschreibung] - - An Instanzen dieser Klasse k"onnen nebenl"aufige Prozesse angemeldet - werden, um vom Benutzer abbrechbar zu sein. Werden abbrechbare - Prozesse (Instanzen von <SfxCancellable>) an- oder abgemeldet, wird - dies durch einen <SfxSimpleHint> mit dem Flag SFX_HINT_CANCELLABLE - gebroadcastet. - - SfxCancelManager k"onnen hierarchisch angeordnet werden, so k"onnen - z.B. Dokument-lokale Prozesse getrennt gecancelt werden. - - [Beispiel] - - SfxCancelManager *pMgr = new SfxCancelManager; - StartListening( pMgr ); - pMailSystem->SetCancelManager( pMgr ) -*/ - -{ - SfxCancelManager* _pParent; - SfxCancellables_Impl _aJobs; - -public: - SfxCancelManager( SfxCancelManager *pParent = 0 ); - ~SfxCancelManager(); - - BOOL CanCancel() const; - void Cancel( BOOL bDeep ); - SfxCancelManager* GetParent() const { return _pParent; } - - void InsertCancellable( SfxCancellable *pJob ); - void RemoveCancellable( SfxCancellable *pJob ); - USHORT GetCancellableCount() const - { return _aJobs.Count(); } - SfxCancellable* GetCancellable( USHORT nPos ) const - { return (SfxCancellable*) _aJobs[nPos]; } -}; - -SV_DECL_WEAK( SfxCancelManager ) -//------------------------------------------------------------------------- - -class SVL_DLLPUBLIC SfxCancellable - -/* [Beschreibung] - - Instanzen dieser Klasse werden immer an einem Cancel-Manager angemeldet, - der dadurch dem Benutzer signalisieren kann, ob abbrechbare Prozesse - vorhanden sind und der die SfxCancellable-Instanzen auf 'abgebrochen' - setzen kann. - - Die im Ctor "ubergebene <SfxCancelManger>-Instanz mu\s die Instanz - dieser Klasse "uberleben! - - [Beispiel] - - { - SfxCancellable aCancel( pCancelMgr ); - while ( !aCancel && GetData() ) - Reschedule(); - } - -*/ - -{ - SfxCancelManager* _pMgr; - BOOL _bCancelled; - String _aTitle; - -public: - SfxCancellable( SfxCancelManager *pMgr, - const String &rTitle ) - : _pMgr( pMgr ), - _bCancelled( FALSE ), - _aTitle( rTitle ) - { pMgr->InsertCancellable( this ); } - - virtual ~SfxCancellable(); - - void SetManager( SfxCancelManager *pMgr ); - SfxCancelManager* GetManager() const { return _pMgr; } - - virtual void Cancel(); - BOOL IsCancelled() const { return _bCancelled; } - operator BOOL() const { return _bCancelled; } - const String& GetTitle() const { return _aTitle; } -}; - -#endif - diff --git a/svl/inc/svl/cnclhint.hxx b/svl/inc/svl/cnclhint.hxx deleted file mode 100644 index 17a6627f31b6..000000000000 --- a/svl/inc/svl/cnclhint.hxx +++ /dev/null @@ -1,48 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SFXCNCLHINT_HXX -#define _SFXCNCLHINT_HXX - -#include <svl/hint.hxx> -#include <svl/cancel.hxx> -#include <tools/rtti.hxx> - -#define SFXCANCELHINT_REMOVED 1 - -class SfxCancelHint: public SfxHint -{ -private: - SfxCancellable* pCancellable; - USHORT nAction; -public: - TYPEINFO(); - SfxCancelHint( SfxCancellable*, USHORT nAction ); - USHORT GetAction() const { return nAction; } - const SfxCancellable& GetCancellable() const { return *pCancellable; } -}; - -#endif diff --git a/svl/inc/cntnrsrt.hxx b/svl/inc/svl/cntnrsrt.hxx index 48ebef50ea58..48ebef50ea58 100644 --- a/svl/inc/cntnrsrt.hxx +++ b/svl/inc/svl/cntnrsrt.hxx diff --git a/svl/inc/cntwids.hrc b/svl/inc/svl/cntwids.hrc index 01a965c38652..01a965c38652 100644 --- a/svl/inc/cntwids.hrc +++ b/svl/inc/svl/cntwids.hrc diff --git a/svl/inc/converter.hxx b/svl/inc/svl/converter.hxx index 062feafe6f29..062feafe6f29 100644 --- a/svl/inc/converter.hxx +++ b/svl/inc/svl/converter.hxx diff --git a/svl/inc/filenotation.hxx b/svl/inc/svl/filenotation.hxx index 65f28659e056..65f28659e056 100644 --- a/svl/inc/filenotation.hxx +++ b/svl/inc/svl/filenotation.hxx diff --git a/svl/inc/folderrestriction.hxx b/svl/inc/svl/folderrestriction.hxx index 66a99a4d49d1..66a99a4d49d1 100644 --- a/svl/inc/folderrestriction.hxx +++ b/svl/inc/svl/folderrestriction.hxx diff --git a/svl/inc/fstathelper.hxx b/svl/inc/svl/fstathelper.hxx index 17fa62c5bbeb..17fa62c5bbeb 100644 --- a/svl/inc/fstathelper.hxx +++ b/svl/inc/svl/fstathelper.hxx diff --git a/svl/inc/inetdef.hxx b/svl/inc/svl/inetdef.hxx index 533530838700..533530838700 100644 --- a/svl/inc/inetdef.hxx +++ b/svl/inc/svl/inetdef.hxx diff --git a/svl/inc/inetmsg.hxx b/svl/inc/svl/inetmsg.hxx index bcfc4ad714ad..bcfc4ad714ad 100644 --- a/svl/inc/inetmsg.hxx +++ b/svl/inc/svl/inetmsg.hxx diff --git a/svl/inc/inetstrm.hxx b/svl/inc/svl/inetstrm.hxx index efb6c35a1b68..efb6c35a1b68 100644 --- a/svl/inc/inetstrm.hxx +++ b/svl/inc/svl/inetstrm.hxx diff --git a/svl/inc/instrm.hxx b/svl/inc/svl/instrm.hxx index d7585c13c3b7..d7585c13c3b7 100644 --- a/svl/inc/instrm.hxx +++ b/svl/inc/svl/instrm.hxx diff --git a/svl/inc/listener.hxx b/svl/inc/svl/listener.hxx index 3107f5ceee56..3107f5ceee56 100644 --- a/svl/inc/listener.hxx +++ b/svl/inc/svl/listener.hxx diff --git a/svl/inc/listeneriter.hxx b/svl/inc/svl/listeneriter.hxx index 3bfb6380acaa..3bfb6380acaa 100644 --- a/svl/inc/listeneriter.hxx +++ b/svl/inc/svl/listeneriter.hxx diff --git a/svl/inc/lngmisc.hxx b/svl/inc/svl/lngmisc.hxx index 5143d147227d..5143d147227d 100644 --- a/svl/inc/lngmisc.hxx +++ b/svl/inc/svl/lngmisc.hxx diff --git a/svl/inc/nfsymbol.hxx b/svl/inc/svl/nfsymbol.hxx index 8886f0e47f85..8886f0e47f85 100644 --- a/svl/inc/nfsymbol.hxx +++ b/svl/inc/svl/nfsymbol.hxx diff --git a/svl/inc/numuno.hxx b/svl/inc/svl/numuno.hxx index 425cff60763d..425cff60763d 100644 --- a/svl/inc/numuno.hxx +++ b/svl/inc/svl/numuno.hxx diff --git a/svl/inc/outstrm.hxx b/svl/inc/svl/outstrm.hxx index f80f6f2c9616..f80f6f2c9616 100644 --- a/svl/inc/outstrm.hxx +++ b/svl/inc/svl/outstrm.hxx diff --git a/tools/win/inc/parser.hxx b/svl/inc/svl/pickerhelper.hxx index 08b0d7968d54..307031b578d1 100644 --- a/tools/win/inc/parser.hxx +++ b/svl/inc/svl/pickerhelper.hxx @@ -24,25 +24,46 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#ifndef _PARSER_HXX -#define _PARSER_HXX -#if defined WNT +#ifndef _PICKERHELPER_HXX +#define _PICKERHELPER_HXX -#include <tools/string.hxx> -#include <winshell.hxx> +#include "svl/svldllapi.h" +#include "sal/types.h" +#include "com/sun/star/uno/Reference.hxx" -void * NewBinaryFromString( const String & rBinStr ); -String CreateStringFromData( const void *pData, ULONG nBytes ); +namespace com +{ + namespace sun + { + namespace star + { + namespace ui + { + namespace dialogs + { + class XFilePicker; + class XFolderPicker; + } + } + } + } +} -String CreateStringFromItemIDList( const CItemIDList & rIDList ); -String GetURLFromHostNotation( const String & rPath ); -String GetHostNotationFromURL( const String & rURL ); +namespace svt +{ -CItemIDList MakeIDToken( const String &rToken ); -CItemIDList ParseSpecialURL( const String & rURL ); + SVL_DLLPUBLIC void SetDialogHelpId( + ::com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFilePicker > _mxFileDlg, + sal_Int32 _nHelpId ); -#endif + SVL_DLLPUBLIC void SetDialogHelpId( + ::com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFolderPicker > _mxFileDlg, + sal_Int32 _nHelpId ); + +} -#endif // _PARSER_HXX +//----------------------------------------------------------------------------- + +#endif diff --git a/svl/inc/pickerhistory.hxx b/svl/inc/svl/pickerhistory.hxx index af282e72513d..af282e72513d 100644 --- a/svl/inc/pickerhistory.hxx +++ b/svl/inc/svl/pickerhistory.hxx diff --git a/svl/inc/pickerhistoryaccess.hxx b/svl/inc/svl/pickerhistoryaccess.hxx index 1a4e8ced8381..1a4e8ced8381 100644 --- a/svl/inc/pickerhistoryaccess.hxx +++ b/svl/inc/svl/pickerhistoryaccess.hxx diff --git a/svl/inc/poolcach.hxx b/svl/inc/svl/poolcach.hxx index 78bdca8177e6..78bdca8177e6 100644 --- a/svl/inc/poolcach.hxx +++ b/svl/inc/svl/poolcach.hxx diff --git a/svl/inc/strmadpt.hxx b/svl/inc/svl/strmadpt.hxx index 76ecf0223543..76ecf0223543 100644 --- a/svl/inc/strmadpt.hxx +++ b/svl/inc/svl/strmadpt.hxx diff --git a/svl/inc/stylepool.hxx b/svl/inc/svl/stylepool.hxx index b820c9442229..b820c9442229 100644 --- a/svl/inc/stylepool.hxx +++ b/svl/inc/svl/stylepool.hxx diff --git a/svl/inc/urihelper.hxx b/svl/inc/svl/urihelper.hxx index ab2ae5878cc2..ab2ae5878cc2 100644 --- a/svl/inc/urihelper.hxx +++ b/svl/inc/svl/urihelper.hxx diff --git a/svl/inc/urlbmk.hxx b/svl/inc/svl/urlbmk.hxx index 9a37184c8ec1..9a37184c8ec1 100644 --- a/svl/inc/urlbmk.hxx +++ b/svl/inc/svl/urlbmk.hxx diff --git a/svl/inc/whiter.hxx b/svl/inc/svl/whiter.hxx index 83a3e21e2b0e..83a3e21e2b0e 100644 --- a/svl/inc/whiter.hxx +++ b/svl/inc/svl/whiter.hxx diff --git a/svl/inc/xmlement.hxx b/svl/inc/svl/xmlement.hxx index d2680fbbf404..d2680fbbf404 100644 --- a/svl/inc/xmlement.hxx +++ b/svl/inc/svl/xmlement.hxx diff --git a/svl/prj/build.lst b/svl/prj/build.lst index d5897d9e9883..09acc768cb13 100644 --- a/svl/prj/build.lst +++ b/svl/prj/build.lst @@ -1,26 +1,4 @@ -sl svl : l10n rsc offuh ucbhelper unotools cppu cppuhelper comphelper sal sot NULL +sl svl : l10n rsc offuh ucbhelper unotools cppu cppuhelper comphelper sal sot LIBXSLT:libxslt NULL sl svl usr1 - all svl_mkout NULL -sl svl\inc nmake - all svl_inc NULL -sl svl\unx\source\svdde nmake - u svl_usdde svl_inc NULL -sl svl\unx\source\svdde nmake - p svl_psdde svl_inc NULL -sl svl\source\config nmake - all svl_conf svl_inc NULL -sl svl\source\filepicker nmake - all svl_filepick svl_inc NULL -sl svl\source\filerec nmake - all svl_file svl_inc NULL -sl svl\source\items nmake - all svl__item svl_inc NULL -sl svl\source\memtools nmake - all svl_mem svl_inc NULL -sl svl\source\misc nmake - all svl__misc svl_inc NULL -sl svl\source\notify nmake - all svl_not svl_inc NULL -sl svl\source\numbers nmake - all svl_num svl_inc NULL -sl svl\source\svdde nmake - all svl__dde svl_inc NULL -sl svl\source\svsql nmake - all svl_sql svl_inc NULL -sl svl\source\undo nmake - all svl_undo svl_inc NULL -sl svl\source\uno nmake - all svl_uno svl_inc NULL -sl svl\util nmake - all svl_util svl_usdde.u svl_psdde.p svl_conf svl_filepick svl_file svl__item svl_mem svl__misc svl_not svl_num svl__dde svl_sql svl_undo svl_uno NULL -sl svl\source\fsstor nmake - all svl_fsstor svl_inc NULL -sl svl\source\passwordcontainer nmake - all svl_passcont svl_inc NULL - -# complex test for ConfigItems are marked as defect -# sl svl\qa\complex\ConfigItems\helper nmake - all svl_qa_complex_help svl_util svl_passcont NULL -# sl svl\qa\complex\ConfigItems nmake - all svl_qa_complex svl_qa_complex_help svl_util svl_passcont NULL -sl svl\qa\complex\passwordcontainer nmake - all svl_qa_complex svl_util svl_passcont NULL - +sl svl\prj nmake - all svl_prj NULL +sl svl\qa\complex\passwordcontainer nmake - all svl_qa_complex_passwordcontainer NULL diff --git a/svl/prj/d.lst b/svl/prj/d.lst index d79346c16087..e69de29bb2d1 100644 --- a/svl/prj/d.lst +++ b/svl/prj/d.lst @@ -1,25 +0,0 @@ -mkdir: %COMMON_DEST%\bin%_EXT%\hid -mkdir: %COMMON_DEST%\res%_EXT% -mkdir: %_DEST%\inc%_EXT%\svl - -..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid -..\%__SRC%\lib\isvl.lib %_DEST%\lib%_EXT%\isvl.lib -..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\* -..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\* -..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\* -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\* - -..\inc\svl\*.hrc %_DEST%\inc%_EXT%\svl\*.hrc -..\inc\svl\*.hxx %_DEST%\inc%_EXT%\svl\*.hxx -..\inc\svl\*.h %_DEST%\inc%_EXT%\svl\*.h -..\inc\*.hrc %_DEST%\inc%_EXT%\svl\*.hrc -..\inc\*.hxx %_DEST%\inc%_EXT%\svl\*.hxx -..\inc\*.h %_DEST%\inc%_EXT%\svl\*.h - -dos: sh -c "if test %OS% = MACOSX; then macosx-create-bundle %_DEST%\bin%_EXT%\bmp=%__PRJROOT%\%__SRC%\bin%_EXT%; fi" - -*.xml %_DEST%\xml%_EXT%\*.xml - -..\%__SRC%\misc\fsstorage.component %_DEST%\xml%_EXT%\fsstorage.component -..\%__SRC%\misc\passwordcontainer.component %_DEST%\xml%_EXT%\passwordcontainer.component -..\%__SRC%\misc\svl.component %_DEST%\xml%_EXT%\svl.component diff --git a/tools/source/inet/makefile.mk b/svl/prj/makefile.mk index 1e0bdfdd2391..c73a3d944bbf 100644 --- a/tools/source/inet/makefile.mk +++ b/svl/prj/makefile.mk @@ -25,21 +25,16 @@ # #************************************************************************* -PRJ = ..$/.. -PRJNAME = tools -TARGET = inet +PRJ=.. +TARGET=prj -.INCLUDE: settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk +.INCLUDE : settings.mk -SLOFILES=\ - $(SLO)$/inetmime.obj \ - $(SLO)$/inetmsg.obj \ - $(SLO)$/inetstrm.obj +.IF "$(VERBOSE)"!="" +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF -OBJFILES=\ - $(OBJ)$/inetmime.obj \ - $(OBJ)$/inetmsg.obj \ - $(OBJ)$/inetstrm.obj - -.INCLUDE: target.mk +all: + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) diff --git a/svl/qa/complex/ConfigItems/helper/makefile.mk b/svl/qa/complex/ConfigItems/helper/makefile.mk deleted file mode 100644 index 95f2e456fab3..000000000000 --- a/svl/qa/complex/ConfigItems/helper/makefile.mk +++ /dev/null @@ -1,74 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=../../../.. - -PRJNAME= svl -TARGET= ConfigItemTest -USE_DEFFILE= TRUE -ENABLE_EXCEPTIONS= TRUE -NO_BSYMBOLIC= TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Generate ----------------------------------------------------- - -INCPOST += $(PRJ)/source/inc - -# --- light services library ---------------------------------------------------- - -SHL1TARGET= svt_$(TARGET) - -SHL1OBJS= \ - $(SLO)/UserOptTest.obj \ - $(SLO)/HistoryOptTest.obj \ - $(SLO)/ConfigItemTest.obj - -# $(SLO)/PrintOptTest.obj -# $(SLO)/AccessibilityOptTest.obj - -SHL1STDLIBS= \ - $(SVLIB) \ - $(SVLLIB) \ - $(UNOTOOLSLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -#SHL1DEPN= $(SHL1IMPLIBN) $(SHL1TARGETN) - -DEF1NAME= $(SHL1TARGET) - -SHL1VERSIONMAP= $(SOLARENV)/src/component.map - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/svl/qa/makefile.mk b/svl/qa/makefile.mk deleted file mode 100644 index 7e8c7ee795cc..000000000000 --- a/svl/qa/makefile.mk +++ /dev/null @@ -1,101 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = .. -PRJNAME=svl -TARGET = qa - -ENABLE_EXCEPTIONS = true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CFLAGSCXX += $(CPPUNIT_CFLAGS) - -# BEGIN ---------------------------------------------------------------- -# auto generated Target:job by codegen.pl -SHL1OBJS= \ - $(SLO)$/test_URIHelper.obj - -SHL1TARGET= URIHelper -SHL1STDLIBS=\ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) \ - $(SVLLIB) \ - $(TOOLSLIB) \ - $(UNOTOOLSLIB) \ - $(TESTSHL2LIB) \ - $(CPPUNITLIB) - -SHL1IMPLIB= i$(SHL1TARGET) -DEF1NAME =$(SHL1TARGET) -SHL1VERSIONMAP= export.map -# auto generated Target:job -# END ------------------------------------------------------------------ - -#------------------------------- All object files ------------------------------- -# do this here, so we get right dependencies -# SLOFILES=$(SHL1OBJS) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk -.INCLUDE : _cppunit.mk - -# LLA: old stuff -# USE_DEFFILE = true -# -# .INCLUDE: settings.mk -# -# .IF "$(OS)" == "WNT" -# REGEXP = "s/^[\#].*$$//" -# .ELSE # OS, WNT -# REGEXP = 's/^[\#].*$$//' -# .ENDIF # OS, WNT -# -# SHL1TARGET = URIHelper -# SHL1OBJS = \ -# $(SLO)$/test_URIHelper.obj -# SHL1STDLIBS = \ -# $(CPPULIB) \ -# $(CPPUHELPERLIB) \ -# $(SALLIB) \ -# $(SVTOOLLIB) \ -# $(TOOLSLIB) \ -# $(UNOTOOLSLIB) -# -# DEF1NAME = $(SHL1TARGET) -# DEF1EXPORTFILE = $(MISC)$/$(SHL1TARGET).dxp -# -# .INCLUDE: target.mk -# -# $(MISC)$/$(SHL1TARGET).dxp: sce$/$(SHL1TARGET).sce -# + $(TYPE) $< | sed $(REGEXP) > $@ -# + $(TYPE) $@ | sed "s/^/test_/" > $(MISC)$/$(SHL1TARGET).tst -# + $(TYPE) $(MISC)$/$(SHL1TARGET).tst | sed "/test_./ w $@" diff --git a/svl/source/config/makefile.mk b/svl/source/config/makefile.mk deleted file mode 100644 index beb696c0feaf..000000000000 --- a/svl/source/config/makefile.mk +++ /dev/null @@ -1,52 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=svl -TARGET=config - -ENABLE_EXCEPTIONS := TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svl.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/asiancfg.obj \ - $(SLO)$/cjkoptions.obj \ - $(SLO)$/ctloptions.obj \ - $(SLO)$/srchcfg.obj \ - $(SLO)$/itemholder2.obj \ - $(SLO)$/languageoptions.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/svl/source/filepicker/makefile.mk b/svl/source/filepicker/makefile.mk deleted file mode 100644 index b3c2a829cf54..000000000000 --- a/svl/source/filepicker/makefile.mk +++ /dev/null @@ -1,46 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=svl -TARGET=filepicker -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svl.pmk - -# --- Files -------------------------------------------------------------- - -SLOFILES =\ - $(SLO)$/pickerhistory.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svl/source/filepicker/pickerhistory.cxx b/svl/source/filepicker/pickerhistory.cxx index 4c372c48163d..27a217f1688c 100644 --- a/svl/source/filepicker/pickerhistory.cxx +++ b/svl/source/filepicker/pickerhistory.cxx @@ -27,8 +27,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svl.hxx" -#include "pickerhistory.hxx" -#include "pickerhistoryaccess.hxx" +#include <svl/pickerhistory.hxx> +#include <svl/pickerhistoryaccess.hxx> #include <cppuhelper/weakref.hxx> #include <vector> diff --git a/svl/source/fsstor/makefile.mk b/svl/source/fsstor/makefile.mk deleted file mode 100644 index 1dd5d2307037..000000000000 --- a/svl/source/fsstor/makefile.mk +++ /dev/null @@ -1,74 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=svl -TARGET=fsstorage.uno -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -DLLPRE= - -# --- Files ------------------------------------- - -SLOFILES=\ - $(SLO)$/fsfactory.obj \ - $(SLO)$/fsstorage.obj \ - $(SLO)$/oinputstreamcontainer.obj \ - $(SLO)$/ostreamcontainer.obj - -SHL1TARGET= $(TARGET) -SHL1IMPLIB= i$(TARGET) -SHL1OBJS= $(SLOFILES) -SHL1STDLIBS=\ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(COMPHELPERLIB) \ - $(UCBHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -SHL1VERSIONMAP=$(SOLARENV)/src/component.map -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -DEF1NAME= $(SHL1TARGET) - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - - -ALLTAR : $(MISC)/fsstorage.component - -$(MISC)/fsstorage.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - fsstorage.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt fsstorage.component diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index a79e5195187a..540db537be46 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -34,9 +34,6 @@ #include <cstdarg> #endif -#ifndef GCC -#endif - #define _SVSTDARR_USHORTS #define _SVSTDARR_ULONGS @@ -44,7 +41,7 @@ #include <svl/itemset.hxx> #include <svl/itempool.hxx> #include <svl/itemiter.hxx> -#include "whiter.hxx" +#include <svl/whiter.hxx> #include <svl/nranges.hxx> #include "whassert.hxx" diff --git a/svl/source/items/makefile.mk b/svl/source/items/makefile.mk deleted file mode 100644 index da602391239a..000000000000 --- a/svl/source/items/makefile.mk +++ /dev/null @@ -1,84 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=svl -TARGET=items -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svl.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES=\ - $(SLO)$/aeitem.obj \ - $(SLO)$/cenumitm.obj \ - $(SLO)$/cintitem.obj \ - $(SLO)$/cntwall.obj \ - $(SLO)$/ctypeitm.obj \ - $(SLO)$/custritm.obj \ - $(SLO)$/dateitem.obj \ - $(SLO)$/eitem.obj \ - $(SLO)$/flagitem.obj \ - $(SLO)$/globalnameitem.obj \ - $(SLO)$/ilstitem.obj \ - $(SLO)$/imageitm.obj \ - $(SLO)$/intitem.obj \ - $(SLO)$/itemiter.obj \ - $(SLO)$/itempool.obj \ - $(SLO)$/itemprop.obj \ - $(SLO)$/itemset.obj \ - $(SLO)$/lckbitem.obj \ - $(SLO)$/macitem.obj \ - $(SLO)$/poolcach.obj \ - $(SLO)$/poolio.obj \ - $(SLO)$/poolitem.obj \ - $(SLO)$/ptitem.obj \ - $(SLO)$/rectitem.obj \ - $(SLO)$/rngitem.obj \ - $(SLO)$/sfontitm.obj \ - $(SLO)$/sitem.obj \ - $(SLO)$/slstitm.obj \ - $(SLO)$/srchitem.obj \ - $(SLO)$/stritem.obj \ - $(SLO)$/style.obj \ - $(SLO)$/stylepool.obj \ - $(SLO)$/szitem.obj \ - $(SLO)$/visitem.obj \ - $(SLO)$/whiter.obj - -SRS1NAME=$(TARGET) -SRC1FILES=\ - cstitem.src - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svl/source/items/poolcach.cxx b/svl/source/items/poolcach.cxx index fee18724bcc2..ab2bdfb91c84 100644 --- a/svl/source/items/poolcach.cxx +++ b/svl/source/items/poolcach.cxx @@ -35,7 +35,7 @@ #include <svl/itempool.hxx> #include <svl/itemset.hxx> -#include "poolcach.hxx" +#include <svl/poolcach.hxx> // STATIC DATA ----------------------------------------------------------- diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx index 8bf8f2b2434b..a3d87ca76e5d 100644 --- a/svl/source/items/poolio.cxx +++ b/svl/source/items/poolio.cxx @@ -241,7 +241,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const const SfxPoolItem *pItem = (*pArr)->operator[](j); if ( pItem && pItem->GetRefCount() ) //! siehe anderes MI-REF { - aItemsRec.NewContent(j, 'X' ); + aItemsRec.NewContent((USHORT)j, 'X' ); if ( pItem->GetRefCount() == SFX_ITEMS_SPECIAL ) rStream << (USHORT) pItem->GetKind(); diff --git a/svl/source/items/stylepool.cxx b/svl/source/items/stylepool.cxx index 8a9f16052a8a..6d8799967650 100644 --- a/svl/source/items/stylepool.cxx +++ b/svl/source/items/stylepool.cxx @@ -34,7 +34,7 @@ #include <vector> #include <map> -#include "stylepool.hxx" +#include <svl/stylepool.hxx> #include <svl/itemiter.hxx> #include <svl/itempool.hxx> diff --git a/svl/source/items/whiter.cxx b/svl/source/items/whiter.cxx index ec0e10d8e3d7..b50d9bc32a79 100644 --- a/svl/source/items/whiter.cxx +++ b/svl/source/items/whiter.cxx @@ -28,10 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svl.hxx" // INCLUDE --------------------------------------------------------------- -#ifndef GCC -#endif -#include "whiter.hxx" +#include <svl/whiter.hxx> #include <svl/itemset.hxx> DBG_NAME(SfxWhichIter) diff --git a/svl/source/memtools/makefile.mk b/svl/source/memtools/makefile.mk deleted file mode 100644 index e19667214d13..000000000000 --- a/svl/source/memtools/makefile.mk +++ /dev/null @@ -1,46 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svl -TARGET=svarray - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svl.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES=\ - $(SLO)$/svarray.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svl/source/misc/PasswordHelper.cxx b/svl/source/misc/PasswordHelper.cxx index 05e9e8a65897..73e1c6c050a0 100644 --- a/svl/source/misc/PasswordHelper.cxx +++ b/svl/source/misc/PasswordHelper.cxx @@ -28,10 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svl.hxx" - -#ifndef GCC -#endif -#include "PasswordHelper.hxx" +#include <svl/PasswordHelper.hxx> #include <rtl/digest.h> #include <tools/string.hxx> diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx index fc230856ef7d..1a349e47d9bf 100644 --- a/svl/source/misc/adrparse.cxx +++ b/svl/source/misc/adrparse.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svl.hxx" #include <tools/inetmime.hxx> -#include <adrparse.hxx> +#include <svl/adrparse.hxx> namespace unnamed_svl_adrparse {} using namespace unnamed_svl_adrparse; diff --git a/svl/source/misc/filenotation.cxx b/svl/source/misc/filenotation.cxx index abec6bb310fc..61c98bf5a851 100644 --- a/svl/source/misc/filenotation.cxx +++ b/svl/source/misc/filenotation.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svl.hxx" -#include "filenotation.hxx" +#include <svl/filenotation.hxx> #include <osl/file.h> #include <osl/diagnose.h> #include <tools/urlobj.hxx> diff --git a/svl/source/misc/folderrestriction.cxx b/svl/source/misc/folderrestriction.cxx index ae50ed3cd55a..e854b64b7830 100644 --- a/svl/source/misc/folderrestriction.cxx +++ b/svl/source/misc/folderrestriction.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svl.hxx" -#include "folderrestriction.hxx" +#include <svl/folderrestriction.hxx> #include "osl/process.h" #include "tools/urlobj.hxx" #include "unotools/localfilehelper.hxx" diff --git a/svl/source/misc/fstathelper.cxx b/svl/source/misc/fstathelper.cxx index 329912f9d997..f39093f2e311 100644 --- a/svl/source/misc/fstathelper.cxx +++ b/svl/source/misc/fstathelper.cxx @@ -32,8 +32,7 @@ #include <tools/string.hxx> #include <ucbhelper/content.hxx> #include <com/sun/star/util/DateTime.hpp> - -#include <fstathelper.hxx> +#include <svl/fstathelper.hxx> using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx index 488e317c6f58..1324a8fa842c 100644 --- a/svl/source/misc/lngmisc.cxx +++ b/svl/source/misc/lngmisc.cxx @@ -27,15 +27,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svl.hxx" - -#include <lngmisc.hxx> +#include <svl/lngmisc.hxx> #include <tools/solar.h> #include <tools/string.hxx> #include <tools/debug.hxx> #include <rtl/ustrbuf.hxx> #include <rtl/ustring.hxx> - using namespace rtl; namespace linguistic diff --git a/svl/source/misc/makefile.mk b/svl/source/misc/makefile.mk deleted file mode 100644 index a68cb396f22c..000000000000 --- a/svl/source/misc/makefile.mk +++ /dev/null @@ -1,70 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=svl -TARGET=misc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svl.pmk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES=\ - $(SLO)$/documentlockfile.obj \ - $(SLO)$/folderrestriction.obj \ - $(SLO)$/fstathelper.obj \ - $(SLO)$/lockfilecommon.obj \ - $(SLO)$/ownlist.obj \ - $(SLO)$/restrictedpaths.obj \ - $(SLO)$/sharecontrolfile.obj \ - $(SLO)$/strmadpt.obj \ - $(SLO)$/svldata.obj \ - $(SLO)$/urihelper.obj - -SLOFILES=\ - $(EXCEPTIONSFILES) \ - $(SLO)$/adrparse.obj \ - $(SLO)$/filenotation.obj \ - $(SLO)$/inethist.obj \ - $(SLO)$/inettype.obj \ - $(SLO)$/lngmisc.obj \ - $(SLO)$/PasswordHelper.obj - -SRS1NAME=$(TARGET) -SRC1FILES=\ - mediatyp.src - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - - - - diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx index 9811618eb571..c2347ef6fc0c 100644 --- a/svl/source/misc/strmadpt.cxx +++ b/svl/source/misc/strmadpt.cxx @@ -35,9 +35,9 @@ #include <set> #include <rtl/alloc.h> #include <rtl/memory.h> -#include <instrm.hxx> -#include <outstrm.hxx> -#include <strmadpt.hxx> +#include <svl/instrm.hxx> +#include <svl/outstrm.hxx> +#include <svl/strmadpt.hxx> using namespace com::sun::star; diff --git a/svl/source/misc/svldata.cxx b/svl/source/misc/svldata.cxx index 35c9fca3aef2..f4eae26d2276 100644 --- a/svl/source/misc/svldata.cxx +++ b/svl/source/misc/svldata.cxx @@ -75,7 +75,7 @@ SimpleResMgr* ImpSvlData::GetSimpleRM(const ::com::sun::star::lang::Locale& rLoc = (*static_cast< SimpleResMgrMap * >(m_pThreadsafeRMs))[aISOcode]; if (!rResMgr) { - rResMgr = new SimpleResMgr(CREATEVERSIONRESMGR_NAME(svs), rLocale ); + rResMgr = new SimpleResMgr(CREATEVERSIONRESMGR_NAME(svl), rLocale ); } return rResMgr; } diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx index 46063564193d..656000fceae3 100644 --- a/svl/source/misc/urihelper.cxx +++ b/svl/source/misc/urihelper.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svl.hxx" -#include <urihelper.hxx> +#include <svl/urihelper.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include "com/sun/star/lang/WrappedTargetRuntimeException.hpp" #include "com/sun/star/lang/XMultiComponentFactory.hpp" diff --git a/svl/source/notify/broadcast.cxx b/svl/source/notify/broadcast.cxx index 0179ceaebc34..e6a76132be6a 100644 --- a/svl/source/notify/broadcast.cxx +++ b/svl/source/notify/broadcast.cxx @@ -32,9 +32,9 @@ #endif #include <tools/debug.hxx> -#include "listener.hxx" -#include "listeneriter.hxx" -#include "broadcast.hxx" +#include <svl/listener.hxx> +#include <svl/listeneriter.hxx> +#include <svl/broadcast.hxx> #include <svl/smplhint.hxx> diff --git a/svl/source/notify/cancel.cxx b/svl/source/notify/cancel.cxx deleted file mode 100644 index ffa5c87a26be..000000000000 --- a/svl/source/notify/cancel.cxx +++ /dev/null @@ -1,201 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svl.hxx" -#define _SFX_CANCEL_CXX -#include <svl/cancel.hxx> - -#include <vos/mutex.hxx> -#include <tools/debug.hxx> - -#include <svl/smplhint.hxx> -#include <svl/cnclhint.hxx> -#include <rtl/instance.hxx> - -namespace { struct lclMutex : public rtl::Static< ::vos::OMutex, lclMutex >{}; } - -//========================================================================= - -SfxCancelManager::SfxCancelManager( SfxCancelManager *pParent ) -: _pParent( pParent ) -{ -} - -//------------------------------------------------------------------------- - -SfxCancelManager::~SfxCancelManager() -{ - DBG_ASSERT( _pParent || !_aJobs.Count(), "deleting SfxCancelManager in use" ); - for ( USHORT n = _aJobs.Count(); n--; ) - _aJobs.GetObject(n)->SetManager( _pParent ); -} - -//------------------------------------------------------------------------- - -BOOL SfxCancelManager::CanCancel() const - -/* [Beschreibung] - - Liefert TRUE wenn an diesem CancelManager oder an einem Parent - ein Job l"auft. -*/ - -{ - ::vos::OGuard aGuard( lclMutex::get() ); - return _aJobs.Count() > 0 || ( _pParent && _pParent->CanCancel() ); -} - -//------------------------------------------------------------------------- - -void SfxCancelManager::Cancel( BOOL bDeep ) - -/* [Beschreibung] - - Diese Methode markiert alle angemeldeten <SfxCancellable>-Instanzen - als suspendiert. -*/ - -{ - ::vos::OGuard aGuard( lclMutex::get() ); - SfxCancelManagerWeak xWeak( this ); - for ( USHORT n = _aJobs.Count(); n-- && xWeak.Is(); ) - if ( n < _aJobs.Count() ) - _aJobs.GetObject(n)->Cancel(); - if ( xWeak.Is() && _pParent ) - _pParent->Cancel( bDeep ); -} - -//------------------------------------------------------------------------- - -void SfxCancelManager::InsertCancellable( SfxCancellable *pJob ) - -/* [Beschreibung] - - Diese interne Methode tr"agt 'pJob' in die Liste der unterbrechbaren - Jobs ein und Broadcastet dies. Jeder <SfxCancellable> darf nur - maximal einmal angemeldet sein, dies geschiet in seinem Ctor. -*/ - -{ -#ifdef GPF_ON_EMPTY_TITLE - if ( !pJob->GetTitle() ) - { - DBG_ERROR( "SfxCancellable: empty titles not allowed (Vermummungsverbot)" ) - *(int*)0 = 0; - } -#endif - - ::vos::OClearableGuard aGuard( lclMutex::get() ); - _aJobs.C40_INSERT( SfxCancellable, pJob, _aJobs.Count() ); - - aGuard.clear(); - Broadcast( SfxSimpleHint( SFX_HINT_CANCELLABLE ) ); -} - -//------------------------------------------------------------------------- - - -void SfxCancelManager::RemoveCancellable( SfxCancellable *pJob ) - -/* [Beschreibung] - - Diese interne Methode tr"agt 'pJob' aus die Liste der unterbrechbaren - Jobs aus und Broadcastet dies. Dieser Aufruf mu\s paarig nach einem - <InsertCancellable> erfolgen und wird im Dtor des <SfxCancellable> - ausgel"ost. -*/ - -{ - ::vos::OClearableGuard aGuard( lclMutex::get() ); - const SfxCancellable *pTmp = pJob; - USHORT nPos = _aJobs.GetPos( pTmp ); - if ( nPos != 0xFFFF ) - { - _aJobs.Remove( nPos , 1 ); - aGuard.clear(); - Broadcast( SfxSimpleHint( SFX_HINT_CANCELLABLE ) ); - Broadcast( SfxCancelHint( pJob, SFXCANCELHINT_REMOVED ) ); - } -} - -//------------------------------------------------------------------------- - -SfxCancellable::~SfxCancellable() -{ - SfxCancelManager* pMgr = _pMgr; - if ( pMgr ) - pMgr->RemoveCancellable( this ); -} - -//------------------------------------------------------------------------- - -void SfxCancellable::Cancel() - -/* [Description] - - This virtual function is called when the user hits the cancel-button. - If you overload it, you can stop your activities. Please always call - 'SfxCancellable::Cancel()'. -*/ - -{ -#ifdef GFP_ON_NO_CANCEL - if ( _bCancelled < 5 ) - ++_bCancelled; - else - { - delete this; - } -#else - _bCancelled = TRUE; -#endif -} - -//------------------------------------------------------------------------- - -void SfxCancellable::SetManager( SfxCancelManager *pMgr ) -{ - SfxCancelManager* pTmp = _pMgr; - if ( pTmp ) - pTmp->RemoveCancellable( this ); - _pMgr = pMgr; - if ( pMgr ) - pMgr->InsertCancellable( this ); -} - -//------------------------------------------------------------------------- - -TYPEINIT1(SfxCancelHint, SfxHint); - -SfxCancelHint::SfxCancelHint( SfxCancellable* pJob, USHORT _nAction ) -{ - pCancellable = pJob; - nAction = _nAction; -} - - diff --git a/svl/source/notify/listener.cxx b/svl/source/notify/listener.cxx index 0269894bff81..44e3e187ff38 100644 --- a/svl/source/notify/listener.cxx +++ b/svl/source/notify/listener.cxx @@ -27,17 +27,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svl.hxx" -#ifndef GCC -#endif -#ifndef DEBUG_HXX #include <tools/debug.hxx> -#endif - -#include "broadcast.hxx" -#include "listener.hxx" +#include <svl/broadcast.hxx> +#include <svl/listener.hxx> #include "listenerbase.hxx" -#include "listeneriter.hxx" +#include <svl/listeneriter.hxx> //==================================================================== diff --git a/svl/source/notify/listenerbase.cxx b/svl/source/notify/listenerbase.cxx index ec899ee9d70b..4dedd24cbe0e 100644 --- a/svl/source/notify/listenerbase.cxx +++ b/svl/source/notify/listenerbase.cxx @@ -27,17 +27,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svl.hxx" -#ifndef GCC -#endif -#ifndef DEBUG_HXX #include <tools/debug.hxx> -#endif - #include "listenerbase.hxx" -#include "listeneriter.hxx" -#include "listener.hxx" -#include "broadcast.hxx" +#include <svl/listeneriter.hxx> +#include <svl/listener.hxx> +#include <svl/broadcast.hxx> SvtListenerBase::SvtListenerBase( SvtListener& rLst, diff --git a/svl/source/notify/listeneriter.cxx b/svl/source/notify/listeneriter.cxx index 5dda8d0433b4..2078393822cb 100644 --- a/svl/source/notify/listeneriter.cxx +++ b/svl/source/notify/listeneriter.cxx @@ -27,14 +27,12 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svl.hxx" -#ifndef GCC -#endif #include <tools/debug.hxx> #include "listenerbase.hxx" -#include "listeneriter.hxx" -#include "broadcast.hxx" -#include "listener.hxx" +#include <svl/listeneriter.hxx> +#include <svl/broadcast.hxx> +#include <svl/listener.hxx> SvtListenerIter* SvtListenerIter::pListenerIters = 0; diff --git a/svl/source/notify/makefile.mk b/svl/source/notify/makefile.mk deleted file mode 100644 index c2e6648907e5..000000000000 --- a/svl/source/notify/makefile.mk +++ /dev/null @@ -1,62 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svl -TARGET=notify - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svl.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/smplhint.obj \ - $(SLO)$/hint.obj \ - $(SLO)$/lstner.obj \ - $(SLO)$/isethint.obj \ - $(SLO)$/brdcst.obj \ - $(SLO)$/listener.obj \ - $(SLO)$/listenerbase.obj \ - $(SLO)$/listeneriter.obj \ - $(SLO)$/broadcast.obj - -HXX1TARGET= notify -HXX1EXT= hxx -HXX1FILES= $(INC)$/hint.hxx \ - $(INC)$/smplhint.hxx \ - $(INC)$/lstner.hxx \ - $(INC)$/brdcst.hxx -HXX1EXCL= -E:*include* - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svl/source/numbers/makefile.mk b/svl/source/numbers/makefile.mk deleted file mode 100644 index 87a367566a8b..000000000000 --- a/svl/source/numbers/makefile.mk +++ /dev/null @@ -1,74 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svl -TARGET=numbers -LIBTARGET=NO - -PROJECTPCH= -PROJECTPCHSOURCE= - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svl.pmk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES= \ - $(SLO)$/numuno.obj \ - $(SLO)$/numfmuno.obj \ - $(SLO)$/supservs.obj \ - $(SLO)$/zforlist.obj - -SLOFILES = \ - $(EXCEPTIONSFILES) \ - $(SLO)$/zforfind.obj \ - $(SLO)$/zformat.obj \ - $(SLO)$/zforscan.obj \ - $(SLO)$/numhead.obj - -LIB1TARGET= $(SLB)$/$(TARGET).uno.lib -LIB1OBJFILES= \ - $(SLO)$/numfmuno.obj \ - $(SLO)$/supservs.obj - -LIB2TARGET= $(SLB)$/$(TARGET).lib -LIB2OBJFILES= \ - $(SLO)$/zforfind.obj \ - $(SLO)$/zforlist.obj \ - $(SLO)$/zformat.obj \ - $(SLO)$/zforscan.obj \ - $(SLO)$/numuno.obj \ - $(SLO)$/numhead.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx index f40b367ae2af..6aea37653633 100644 --- a/svl/source/numbers/numfmuno.cxx +++ b/svl/source/numbers/numfmuno.cxx @@ -40,7 +40,7 @@ #include <com/sun/star/beans/PropertyAttribute.hpp> #include "numfmuno.hxx" -#include "numuno.hxx" +#include <svl/numuno.hxx> #include <svl/zforlist.hxx> #include <svl/zformat.hxx> #include <svl/itemprop.hxx> diff --git a/svl/source/numbers/numuno.cxx b/svl/source/numbers/numuno.cxx index a6208657406e..94f535c48b02 100644 --- a/svl/source/numbers/numuno.cxx +++ b/svl/source/numbers/numuno.cxx @@ -38,7 +38,7 @@ #include <osl/mutex.hxx> #include <rtl/uuid.h> -#include "numuno.hxx" +#include <svl/numuno.hxx> #include "numfmuno.hxx" #include <svl/zforlist.hxx> diff --git a/svl/source/numbers/supservs.cxx b/svl/source/numbers/supservs.cxx index 90d41977e974..93e6051a21ce 100644 --- a/svl/source/numbers/supservs.cxx +++ b/svl/source/numbers/supservs.cxx @@ -34,8 +34,8 @@ #include <tools/debug.hxx> #include <vos/mutex.hxx> #include <tools/stream.hxx> -#include <strmadpt.hxx> -#include "instrm.hxx" +#include <svl/strmadpt.hxx> +#include <svl/instrm.hxx> using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; diff --git a/svl/source/numbers/supservs.hxx b/svl/source/numbers/supservs.hxx index 45f6b3a8e285..85c5456beb01 100644 --- a/svl/source/numbers/supservs.hxx +++ b/svl/source/numbers/supservs.hxx @@ -28,7 +28,7 @@ #ifndef _SVTOOLS_NUMBERS_SUPPLIERSERVICE_HXX_ #define _SVTOOLS_NUMBERS_SUPPLIERSERVICE_HXX_ -#include "numuno.hxx" +#include <svl/numuno.hxx> #include <svl/zforlist.hxx> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 97f06171a4fc..3d943fef230c 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -47,13 +47,13 @@ #define _ZFORMAT_CXX #include <svl/zformat.hxx> -#include "zforscan.hxx" +#include <zforscan.hxx> #include "zforfind.hxx" #include <svl/zforlist.hxx> #include "numhead.hxx" #include <unotools/digitgroupingiterator.hxx> -#include "nfsymbol.hxx" +#include <svl/nfsymbol.hxx> #include <cmath> diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx index fb59e4289ad1..ab68d8309159 100644 --- a/svl/source/numbers/zforscan.cxx +++ b/svl/source/numbers/zforscan.cxx @@ -45,7 +45,7 @@ #define _ZFORSCAN_CXX #include "zforscan.hxx" #undef _ZFORSCAN_CXX -#include "nfsymbol.hxx" +#include <svl/nfsymbol.hxx> using namespace svt; const sal_Unicode cNonBreakingSpace = 0xA0; diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx index d623a3f50026..176da84b652e 100644 --- a/svl/source/numbers/zforscan.hxx +++ b/svl/source/numbers/zforscan.hxx @@ -32,7 +32,7 @@ #include <i18npool/lang.h> #include <tools/color.hxx> #include <svl/nfkeytab.hxx> -#include "nfsymbol.hxx" +#include <svl/nfsymbol.hxx> class SvNumberFormatter; struct ImpSvNumberformatInfo; diff --git a/svl/source/passwordcontainer/makefile.mk b/svl/source/passwordcontainer/makefile.mk deleted file mode 100644 index 626a6ffc5830..000000000000 --- a/svl/source/passwordcontainer/makefile.mk +++ /dev/null @@ -1,70 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=svl -TARGET=passwordcontainer.uno -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -DLLPRE= - -# --- Files ------------------------------------- - -SLOFILES= \ - $(SLO)$/passwordcontainer.obj\ - $(SLO)$/syscreds.obj - -SHL1TARGET= $(TARGET) -SHL1IMPLIB= i$(TARGET) -SHL1OBJS= $(SLOFILES) -SHL1STDLIBS=\ - $(UNOTOOLSLIB) \ - $(UCBHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -SHL1VERSIONMAP=$(SOLARENV)/src/component.map -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -DEF1NAME= $(SHL1TARGET) - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - - -ALLTAR : $(MISC)/passwordcontainer.component - -$(MISC)/passwordcontainer.component .ERRREMOVE : \ - $(SOLARENV)/bin/createcomponent.xslt passwordcontainer.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt passwordcontainer.component diff --git a/svl/source/svdde/ddeml1.cxx b/svl/source/svdde/ddeml1.cxx deleted file mode 100644 index dd9cc2abdaa7..000000000000 --- a/svl/source/svdde/ddeml1.cxx +++ /dev/null @@ -1,2658 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svl.hxx" - -/* - ToDo / Bugs: - - - DdeInitiate: Eigener Thread? - - Timeout bei Disconnects (IBM:nicht auf Ack warten!) - - Konzept Errorhandling (globale/lokale Fehler) - - Bedeutung/Anwendung Conversation-Contexte - - Bei Zugriffen auf ConversationHandles WindowHandles checken - - Namen der Partner-App ermitteln - - Codepage-Geraffel -*/ -#define INCL_DOSPROCESS - -#include "ddemlimp.hxx" - -#define LOGFILE -#define STATUSFILE -#define DDEDATAFILE -#include "ddemldeb.hxx" - - -#if defined (OS2) && defined (__BORLANDC__) -#pragma option -w-par -#endif - -// static -inline BOOL ImpDdeMgr::MyWinDdePostMsg( HWND hWndTo, HWND hWndFrom, - USHORT nMsg, PDDESTRUCT pData, ULONG nFlags ) -{ - BOOL bSuccess = WinDdePostMsg( hWndTo,hWndFrom,nMsg,pData,nFlags); - if( !bSuccess ) - { - WRITELOG("WinDdePostMsg:Failed!") - if ( !(nFlags & DDEPM_NOFREE) ) - { - MyDosFreeMem( pData,"MyWinDdePostMsg" ); - } - } - return bSuccess; -} - - -// ********************************************************************* -// ImpDdeMgr -// ********************************************************************* - -USHORT ImpDdeMgr::nLastErrInstance = 0; - -// -// Conversation-WndProc -// Steuert Transaktionen eines Conversationhandles -// -MRESULT EXPENTRY ConvWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2) -{ -#if defined(DBG_UTIL) && defined(OV_DEBUG) - if( nMsg >= WM_DDE_FIRST && nMsg <= WM_DDE_LAST) - { - ////WRITELOG("::ConvWndProc:DDE-Msg received") - } -#endif - ImpConvWndData* pObj = (ImpConvWndData*)WinQueryWindowULong( hWnd, 0 ); - return pObj->pThis->ConvWndProc( hWnd, nMsg, nPar1, nPar2 ); -} - -// -// Server-WndProc -// DDE-Server-Window der App -// -MRESULT EXPENTRY ServerWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2) -{ -#if defined(DBG_UTIL) && defined(OV_DEBUG) - if( nMsg >= WM_DDE_FIRST && nMsg <= WM_DDE_LAST) - { - ////WRITELOG("::ServerWndProc:DDE-Msg received") - } -#endif - ImpDdeMgr* pObj = (ImpDdeMgr*)WinQueryWindowULong( hWnd, 0 ); - return pObj->SrvWndProc( hWnd, nMsg, nPar1, nPar2 ); -} - - -inline HDDEDATA ImpDdeMgr::Callback( USHORT nTransactionType, - USHORT nClipboardFormat, HCONV hConversationHandle, HSZ hsz1, - HSZ hsz2, HDDEDATA hData, ULONG nData1, ULONG nData2 ) -{ - HDDEDATA hRet = (HDDEDATA)0; - if( pCallback ) - hRet = (*pCallback)(nTransactionType, nClipboardFormat, - hConversationHandle, hsz1, hsz2, hData, nData1, nData2); - return hRet; -} - - - -ImpDdeMgr::ImpDdeMgr() -{ - nLastErrInstance = DMLERR_NO_ERROR; - pCallback = 0; - nTransactFilter = 0; - nServiceCount = 0; - pServices = 0; - pAppTable = 0; - pConvTable = 0; - pTransTable = 0; - bServFilterOn = TRUE; - bInSyncTrans = FALSE; - - CreateServerWnd(); - pData = InitAll(); - if ( !pData ) - nLastErrInstance = DMLERR_MEMORY_ERROR; - else - RegisterDDEMLApp(); -} - -ImpDdeMgr::~ImpDdeMgr() -{ - CleanUp(); - DestroyServerWnd(); -// Named Shared Mem vom BS loeschen lassen, da nicht bekannt ist, -// wieviele DDEML-Instanzen die App erzeugt hat, und OS/2 -// keinen App-Referenzzaehler fuer shared mem fuehrt. -// if ( pData ) -// DosFreeMem( pData ); -} - - -BOOL ImpDdeMgr::IsSameInstance( HWND hWnd ) -{ - TID tid; PID pid; - WinQueryWindowProcess( hWnd, &pid, &tid ); - return (BOOL)(pid == pidThis); -} - -HSZ ImpDdeMgr::GetAppName( HWND hWnd ) -{ - return 0; -} - -// static -ImpDdeMgr* ImpDdeMgr::GetImpDdeMgrInstance( HWND hWnd ) -{ - ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData(); - if( !pData ) - return 0; - - ImpDdeMgr* pResult = 0; - TID tid; PID pidApp; - WinQueryWindowProcess( hWnd, &pidApp, &tid ); - HWND* pApp = ImpDdeMgr::GetAppTable( pData ); - USHORT nCurApp = 0; - while( nCurApp < pData->nMaxAppCount ) - { - HWND hCurWin = *pApp; - if( hCurWin ) - { - PID pidCurApp; - WinQueryWindowProcess( hCurWin, &pidCurApp, &tid ); - if( pidCurApp == pidApp ) - { - pResult = (ImpDdeMgr*)WinQueryWindowULong( hCurWin, 0 ); - break; - } - } - pApp++; - nCurApp++; - } - return pResult; -} - - - - - -void ImpDdeMgr::CleanUp() -{ - DisconnectAll(); - ImpService* pPtr = pServices; - if( pPtr ) - { - for( USHORT nIdx = 0; nIdx < nServiceCount; nIdx++, pPtr++ ) - { - HSZ hStr = pPtr->hBaseServName; - if( hStr ) - DdeFreeStringHandle( hStr ); - hStr = pPtr->hInstServName; - if( hStr ) - DdeFreeStringHandle( hStr ); - } - nServiceCount = 0; - delete pServices; - pServices = 0; - } - bServFilterOn = TRUE; // default setting DDEML - UnregisterDDEMLApp(); -} - -void ImpDdeMgr::RegisterDDEMLApp() -{ - HWND* pPtr = pAppTable; - HWND hCur; - USHORT nPos = 0; - while( nPos < pData->nMaxAppCount ) - { - hCur = *pPtr; - if (hCur == (HWND)0 ) - { - // in Tabelle stellen - *pPtr = hWndServer; - break; - } - nPos++; - pPtr++; - } -} - -void ImpDdeMgr::UnregisterDDEMLApp() -{ - HWND* pPtr = pAppTable; - USHORT nPos = 0; - while( nPos < pData->nMaxAppCount ) - { - if (*pPtr == hWndServer ) - { - *pPtr = 0; - break; - } - nPos++; - pPtr++; - } -} - -// static -ImpDdeMgrData* ImpDdeMgr::AccessMgrData() -{ - ImpDdeMgrData* pData = 0; - APIRET nRet = DosGetNamedSharedMem((PPVOID)&pData,DDEMLDATA,PAG_READ|PAG_WRITE); - DBG_ASSERT(!nRet,"DDE:AccessMgrData failed"); - return pData; -} - -USHORT ImpDdeMgr::DdeGetLastError() -{ - USHORT nErr; - if ( !pData ) - nErr = DMLERR_DLL_NOT_INITIALIZED; - else if ( nLastErrInstance ) - nErr = nLastErrInstance; - else - nErr = pData->nLastErr; - - nLastErrInstance = 0; - pData->nLastErr = 0; - return nErr; -} - - - -USHORT ImpDdeMgr::DdeInitialize( PFNCALLBACK pCallbackProc, ULONG nTransactionFilter ) -{ - if ( !nLastErrInstance ) - { - if ( !pCallbackProc ) - { - nLastErrInstance = DMLERR_INVALIDPARAMETER; - return nLastErrInstance; - } - pCallback = pCallbackProc; - nTransactFilter = nTransactionFilter; - nTransactFilter |= CBF_FAIL_SELFCONNECTIONS; - } - return nLastErrInstance; -} - - -// static -HWND ImpDdeMgr::NextFrameWin( HENUM hEnum ) -{ - char aBuf[ 10 ]; - - HWND hWnd = WinGetNextWindow( hEnum ); - while( hWnd ) - { - WinQueryClassName( hWnd, sizeof(aBuf)-1, (PCH)aBuf ); - // Frame-Window ? - if( !strcmp( aBuf, "#1" ) ) // #define WC_FRAME ((PSZ)0xffff0001L) - break; - hWnd = WinGetNextWindow( hEnum ); - } - return hWnd; -} - - -HCONV ImpDdeMgr::DdeConnectImp( HSZ hszService,HSZ hszTopic,CONVCONTEXT* pCC) -{ - hCurConv = 0; - if( !pCC ) - pCC = &aDefaultContext; - - ULONG nBufLen; - PSZ pService = AllocAtomName( (ATOM)hszService, nBufLen ); - PSZ pTopic = AllocAtomName( (ATOM)hszTopic, nBufLen ); -#if 0 && defined(OV_DEBUG) - String aStr("DdeConnectImp Service:"); - aStr += pService; - aStr += " Topic:"; - aStr += pTopic; - WRITELOG((char*)(const char*)aStr) -#endif - -#if defined(OV_DEBUG) - if( !strcmp(pService,"oliver voeltz") ) - { - WRITESTATUS("Table of connections"); - MyDosFreeMem( pTopic,"DdeConnectImp" ); - MyDosFreeMem( pService,"DdeConnectImp" ); - return 0; - } -#endif - -#if 0 - // original pm-fkt benutzen - HWND hWndCurClient = CreateConversationWnd(); - WinDdeInitiate( hWndCurClient, pService, pTopic, pCC ); - if( GetConversationWndRefCount(hWndCurClient) == 0) - DestroyConversationWnd( hWndCurClient ); -#else - // eigener Verbindungsaufbau - HENUM hEnum = WinBeginEnumWindows( HWND_DESKTOP ); - HWND hWndCurSrv = NextFrameWin( hEnum ); - HWND hWndCurClient = CreateConversationWnd(); - while( hWndCurSrv && !hCurConv ) - { - if( hWndCurSrv != hWndServer || - ((nTransactFilter & CBF_FAIL_SELFCONNECTIONS)==0 )) - { - // pro DDE-Server ein Conversation-Window erzeugen - if( GetConversationWndRefCount(hWndCurClient) >= 2) - { - DestroyConversationWnd( hWndCurClient ); - hWndCurClient = CreateConversationWnd(); - } - MyInitiateDde(hWndCurSrv,hWndCurClient,hszService,hszTopic,pCC); - if( !bListConnect && hCurConv ) - break; - } - hWndCurSrv = NextFrameWin( hEnum ); - } - - if( GetConversationWndRefCount(hWndCurClient) == 0) - DestroyConversationWnd( hWndCurClient ); - WinEndEnumWindows( hEnum ); -#endif - - if( !hCurConv ) - nLastErrInstance = DMLERR_NO_CONV_ESTABLISHED; - -#if 0 && defined(OV_DEBUG) - String aCStr( "DdeConnectImp:End "); - if( nLastErrInstance != DMLERR_NO_CONV_ESTABLISHED ) - aCStr += "(Success)"; - else - aCStr += "(Failed)"; - WRITELOG((char*)aCStr.GetStr()) -#endif - - MyDosFreeMem( pTopic,"DdeConnectImp" ); - MyDosFreeMem( pService,"DdeConnectImp" ); - return hCurConv; -} - -HCONV ImpDdeMgr::DdeConnect( HSZ hszService, HSZ hszTopic, CONVCONTEXT* pCC) -{ - ////WRITELOG("DdeConnect:Start") - bListConnect = FALSE; - HCONV hResult = DdeConnectImp( hszService, hszTopic, pCC ); - ////WRITELOG("DdeConnect:End") - ////WRITESTATUS("DdeConnect:End") - return hResult; -} - - -HCONVLIST ImpDdeMgr::DdeConnectList( HSZ hszService, HSZ hszTopic, - HCONVLIST hConvList, CONVCONTEXT* pCC ) -{ - nPrevConv = 0; - ////WRITESTATUS("Before DdeConnectList") - if( hConvList ) - { - HCONV hLastConvInList; - - hCurListId = hConvList; - ImpHCONV* pConv = pConvTable; - pConv += (USHORT)hConvList; - if( (USHORT)hConvList >= pData->nMaxConvCount ||pConv->hWndThis==0 ) - { - nLastErrInstance = DMLERR_INVALIDPARAMETER; - return 0; - } - GetLastServer(pData, hConvList, hLastConvInList); - nPrevConv = (USHORT)hLastConvInList; - } - else - hCurListId = (HCONVLIST)WinCreateWindow( HWND_OBJECT, WC_FRAME, - CONVLISTNAME, 0,0,0,0,0, HWND_DESKTOP, HWND_BOTTOM, 0,0,0); - - bListConnect = TRUE; - DdeConnectImp( hszService, hszTopic, pCC ); -#if 0 && defined(OV_DEBUG) - WRITELOG("DdeConnectList:ConnectionList:") - HCONV hDebug = 0; - do - { - hDebug = DdeQueryNextServer( hCurListId, hDebug); - String aStr( (ULONG)hDebug ); - WRITELOG((char*)(const char*)aStr) - } while( hDebug ); -#endif - ////WRITESTATUS("After DdeConnectList") - return (HCONVLIST)hCurListId; -} - -DDEINIT* ImpDdeMgr::CreateDDEInitData( HWND hWndDestination, HSZ hszService, - HSZ hszTopic, CONVCONTEXT* pCC ) -{ - ULONG nLen1 = 0, nLen2 = 0; - HATOMTBL hAtomTable = WinQuerySystemAtomTable(); - - if( hszService ) - nLen1 = WinQueryAtomLength( hAtomTable, hszService ); - if( hszTopic ) - nLen2 = WinQueryAtomLength( hAtomTable, hszTopic ); - nLen1++; nLen2++; - - DDEINIT* pBuf = 0; - - ULONG nLen = sizeof(DDEINIT) + nLen1+ nLen2 + sizeof(CONVCONTEXT); - if( !(MyDosAllocSharedMem((PPVOID)&pBuf, NULL, nLen, - PAG_COMMIT | PAG_READ | PAG_WRITE | OBJ_GIVEABLE | OBJ_ANY, - "CreateDDEInitData"))) - { - memset( pBuf, 0, nLen ); - - /* - PID pid; TID tid; - WinQueryWindowProcess( hWndDestination, &pid, &tid ); - APIRET nRet = DosGiveSharedMem( pBuf, pid, PAG_READ | PAG_WRITE ); - */ - - pBuf->cb = nLen; - pBuf->offConvContext = sizeof( DDEINIT ); - char* pBase = (char*)pBuf; - pBase += sizeof(DDEINIT); - if( pCC ) - memcpy( pBase, pCC, sizeof(CONVCONTEXT) ); - pBase += sizeof(CONVCONTEXT); - pBuf->pszAppName = pBase; - if( hszService ) - WinQueryAtomName( hAtomTable, hszService, pBase, nLen1 ); - pBase += nLen1; - pBuf->pszTopic = pBase; - if( hszTopic ) - WinQueryAtomName( hAtomTable, hszTopic, pBase, nLen2 ); - } - return pBuf; -} - - - -void ImpDdeMgr::MyInitiateDde( HWND hWndSrv, HWND hWndClient, - HSZ hszService, HSZ hszTopic, CONVCONTEXT* pCC ) -{ - DDEINIT* pBuf = CreateDDEInitData( hWndSrv, hszService, hszTopic, pCC ); - if( pBuf ) - { - PID pid; TID tid; - WinQueryWindowProcess( hWndSrv, &pid, &tid ); - APIRET nRet = DosGiveSharedMem( pBuf, pid, PAG_READ | PAG_WRITE ); - WinSendMsg( hWndSrv,WM_DDE_INITIATE,(MPARAM)hWndClient,(MPARAM)pBuf); - MyDosFreeMem( pBuf,"MyInitiateDde" ); - } -} - -// static -ImpHCONV* ImpDdeMgr::GetFirstServer(ImpDdeMgrData* pData, HCONVLIST hConvList, - HCONV& rhConv ) -{ - ImpHCONV* pPtr = GetConvTable( pData ); - HCONV hConv; - if( !rhConv ) - { - pPtr++; - hConv = 1; - } - else - { - // Startposition - pPtr += (USHORT)rhConv; - hConv = rhConv; - pPtr++; hConv++; // auf den naechsten - } - while( hConv < pData->nMaxConvCount ) - { - if( pPtr->hConvList == hConvList ) - { - rhConv = hConv; - return pPtr; - } - pPtr++; - hConv++; - } - rhConv = 0; - return 0; -} - -// static -ImpHCONV* ImpDdeMgr::GetLastServer(ImpDdeMgrData* pData, HCONVLIST hConvList, - HCONV& rhConv ) -{ - ImpHCONV* pPtr = GetConvTable( pData ); - pPtr += pData->nMaxConvCount; - pPtr--; - HCONV hConv = pData->nMaxConvCount; - hConv--; - while( hConv > 0 ) - { - if( pPtr->hConvList == hConvList ) - { - rhConv = hConv; - return pPtr; - } - pPtr--; - hConv--; - } - rhConv = 0; - return 0; -} - -// static -BOOL ImpDdeMgr::CheckConvListId( HCONVLIST hConvListId ) -{ - HAB hAB = WinQueryAnchorBlock( (HWND)hConvListId ); - if( hAB ) - return WinIsWindow( hAB, (HWND)hConvListId ); - return FALSE; - /* - HAB hAB = WinQueryAnchorBlock( (HWND)hConvListId ); - if( hAB ) - { - char aBuf[ 16 ]; - WinQueryWindowText( (HWND)hConvListId, sizeof(aBuf), aBuf ); - if( strcmp(aBuf, CONVLISTNAME ) == 0 ) - return TRUE; - } - return FALSE; - */ -} - -// static -HCONV ImpDdeMgr::DdeQueryNextServer(HCONVLIST hConvList, HCONV hConvPrev) -{ - if( !CheckConvListId( hConvList ) ) - return (HCONV)0; - ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData(); - GetFirstServer( pData, hConvList, hConvPrev ); - return hConvPrev; -} - -// static - -// Idee: DisconnectAll uebergibt das ServerWindow. Zu jedem HCONV -// wird das Creator-Server-Wnd gespeichert. Disconnect braucht -// dann nur noch die Window-Handles zu vergleichen -BOOL ImpDdeMgr::DdeDisconnect( HCONV hConv ) -{ - WRITELOG("DdeDisconnect:Start") - ////WRITESTATUS("DdeDisconnect:Start") - - ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData(); - if ( !pData ) - { - ImpDdeMgr::nLastErrInstance = DMLERR_DLL_NOT_INITIALIZED; - return FALSE; - } - ImpHCONV* pConv = GetConvTable(pData) + (USHORT)hConv; - - if( (USHORT)hConv >= pData->nMaxConvCount || pConv->hWndThis==0 ) - { - nLastErrInstance = DMLERR_NO_CONV_ESTABLISHED; - return FALSE; - } - - PID pidApp; TID tid; - HWND hWndDummy = WinCreateWindow( HWND_OBJECT, WC_FRAME, - "Bla", 0, 0,0,0,0, HWND_DESKTOP, HWND_BOTTOM, 0, 0, 0 ); - WinQueryWindowProcess( hWndDummy, &pidApp, &tid ); - WinDestroyWindow( hWndDummy ); - PID pidThis; PID pidPartner; - - HWND hWndThis = pConv->hWndThis; - HWND hWndPartner = pConv->hWndPartner; - - WinQueryWindowProcess( hWndThis, &pidThis, &tid ); - WinQueryWindowProcess( hWndPartner, &pidPartner, &tid ); - if( pidApp != pidThis && pidApp != pidPartner ) - return TRUE; // gehoert nicht der App -> ueberspringen - - HCONV hConvPartner = pConv->hConvPartner; - - // die App benachrichtigen, dass alle offenen Advise-Loops - // beendet werden, egal ob sie vom Server oder Client - // initiiert wurden. Die Dinger aber nicht loeschen, da sie evtl. - // noch vom Partner gebraucht werden. - ImpConvWndData* pObj = - (ImpConvWndData*)WinQueryWindowULong( pConv->hWndThis, 0 ); - ImpDdeMgr* pThis = pObj->pThis; - pThis->SendUnadvises( hConv, 0, FALSE ); // alle Formate & NICHT loeschen - pThis->SendUnadvises( hConvPartner, 0, FALSE ); // alle Formate & NICHT loeschen - - pConv->nStatus |= ST_TERMINATED; - - HAB hAB = WinQueryAnchorBlock( pConv->hWndThis ); - // um die MessageQueue inne Gaenge zu halten - ULONG nTimerId = WinStartTimer( hAB, 0, 0, 50 ); - - /* - Die Partner-App muss ein DDE_TERMINATE posten, auf das - wir warten muessen, um alle Messages zu bearbeiten, die - _vor_ dem DdeDisconnect von der Partner-App gepostet - wurden. - */ - WRITELOG("DdeDisconnect:Waiting for acknowledge...") - WinDdePostMsg( hWndPartner, hWndThis, WM_DDE_TERMINATE, - (PDDESTRUCT)0,DDEPM_RETRY); - - QMSG aQueueMsg; - BOOL bContinue = TRUE; - while( bContinue ) - { - if( WinGetMsg( hAB, &aQueueMsg, 0, 0, 0 )) - { - WinDispatchMsg( hAB, &aQueueMsg ); - if( (!WinIsWindow( hAB, hWndPartner)) || - (pConv->nStatus & ST_TERMACKREC) ) - { - bContinue = FALSE; - if( pConv->nStatus & ST_TERMACKREC ) - { - WRITELOG("DdeDisconnect: TermAck received") - } - else - { - WRITELOG("DdeDisconnect: Partner died") - } - } - } - else - bContinue = FALSE; - } - - WinStopTimer( hAB, 0, nTimerId ); - - // WRITELOG("DdeDisconnect:Freeing data") - // Transaktionstabelle aufraeumen - FreeTransactions( pData, hConv ); - if( hConvPartner ) - FreeTransactions( pData, hConvPartner ); - - FreeConvHandle( pData, hConv ); - - WRITELOG("DdeDisconnect:End") - //WRITESTATUS("DdeDisconnect:End") - return TRUE; -} - -// static -BOOL ImpDdeMgr::DdeDisconnectList( HCONVLIST hConvList ) -{ - if( !CheckConvListId( hConvList ) ) - { - ImpDdeMgr::nLastErrInstance = DMLERR_INVALIDPARAMETER; - return FALSE; - } - - ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData(); - if ( !pData ) - { - ImpDdeMgr::nLastErrInstance = DMLERR_DLL_NOT_INITIALIZED; - return FALSE; - } - HCONV hConv = 0; - GetFirstServer( pData, hConvList, hConv ); - while( hConv ) - { - DdeDisconnect( hConv ); - GetFirstServer( pData, hConvList, hConv ); - } - WinDestroyWindow( (HWND)hConvList ); - return TRUE; -} - - - -// static -HCONV ImpDdeMgr::DdeReconnect(HCONV hConv) -{ - ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData(); - if ( !pData ) - { - ImpDdeMgr::nLastErrInstance = DMLERR_DLL_NOT_INITIALIZED; - return 0; - } - return 0; -} - -// static -USHORT ImpDdeMgr::DdeQueryConvInfo(HCONV hConv, ULONG nTransId, CONVINFO* pCI) -{ - if( !pCI || pCI->nSize == 0) - return 0; - ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData(); - if ( !pData ) - { - ImpDdeMgr::nLastErrInstance = DMLERR_DLL_NOT_INITIALIZED; - return 0; - } - Transaction* pTrans; - if( nTransId != QID_SYNC ) - { - pTrans = ImpDdeMgr::GetTransTable( pData ); - pTrans += nTransId; - if( nTransId >= pData->nMaxTransCount || pTrans->hConvOwner == 0 ) - { - ImpDdeMgr::nLastErrInstance = DMLERR_UNFOUND_QUEUE_ID; - return 0; - } - } - else - pTrans = 0; - - ImpHCONV* pConv = ImpDdeMgr::GetConvTable( pData ); - pConv += (ULONG)hConv; - if( hConv >= pData->nMaxConvCount || pConv->hWndThis == 0 ) - { - ImpDdeMgr::nLastErrInstance = DMLERR_NO_CONV_ESTABLISHED; - return 0; - } - - USHORT nSize = pCI->nSize; - if( nSize > sizeof(CONVINFO) ) - nSize = sizeof(CONVINFO); - CONVINFO aTempInfo; - memset( &aTempInfo, 0, sizeof(CONVINFO) ); - aTempInfo.nSize = pCI->nSize; - aTempInfo.hConvPartner = pConv->hConvPartner; - aTempInfo.hszPartner = pConv->hszPartner; - aTempInfo.hszServiceReq = pConv->hszServiceReq; - aTempInfo.hszTopic = pConv->hszTopic; - aTempInfo.nStatus = pConv->nStatus; - aTempInfo.hConvList = pConv->hConvList; - aTempInfo.aConvCtxt = pConv->aConvContext; - if( pTrans ) - { - aTempInfo.nUser = pTrans->nUser; - aTempInfo.hszItem = pTrans->hszItem; - aTempInfo.nFormat = pTrans->nFormat; - aTempInfo.nType = pTrans->nType; - aTempInfo.nConvst = pTrans->nConvst; - aTempInfo.nLastError= pTrans->nLastError; - } - memcpy( pCI, &aTempInfo, nSize ); - - return nSize; -} - -// static -BOOL ImpDdeMgr::DdeSetUserHandle(HCONV hConv, ULONG nTransId, ULONG hUser) -{ - ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData(); - if ( !pData ) - { - ImpDdeMgr::nLastErrInstance = DMLERR_DLL_NOT_INITIALIZED; - return FALSE; - } - Transaction* pTrans = GetTransTable( pData ); - pTrans += nTransId; - if( !nTransId || !hConv || nTransId >= pData->nMaxTransCount || - pTrans->hConvOwner != hConv ) - { - ImpDdeMgr::nLastErrInstance = DMLERR_INVALIDPARAMETER; - return FALSE; - } - if( !pTrans->hConvOwner) - { - ImpDdeMgr::nLastErrInstance = DMLERR_UNFOUND_QUEUE_ID; - return FALSE; - } - pTrans->nUser = hUser; - return TRUE; -} - -BOOL ImpDdeMgr::DdeAbandonTransaction( HCONV hConv, ULONG nTransId ) -{ - ////WRITELOG("DdeAbandonTransaction:Start") - if( !pData ) - { - nLastErrInstance = DMLERR_DLL_NOT_INITIALIZED; - return FALSE; - } - ImpHCONV* pConv = pConvTable; - pConv += (USHORT)hConv; - if( nTransId < 1 || nTransId >= pData->nMaxTransCount || - hConv < 1 || hConv >= pData->nMaxConvCount || !pConv->hWndThis) - { - nLastErrInstance = DMLERR_INVALIDPARAMETER; - return FALSE; - } - if( !hConv ) - { - DBG_ASSERT(0,"DdeAbandonTransaction:NULL-hConv not supported"); - nLastErrInstance = DMLERR_INVALIDPARAMETER; - return FALSE; - } - Transaction* pTrans = pTransTable; - pTrans += (USHORT)nTransId; - if( pTrans->hConvOwner != hConv ) - { - nLastErrInstance = DMLERR_UNFOUND_QUEUE_ID; - return FALSE; - } - - if( bInSyncTrans && nTransId == nSyncTransId ) - { - bSyncAbandonTrans = TRUE; - return TRUE; - } - USHORT nTempType = pTrans->nType; - nTempType &= (~XTYPF_MASK); - if( nTempType == (XTYP_ADVREQ & ~(XTYPF_NOBLOCK))) - { - ////WRITELOG("DdeAbandTrans:Advise Loop") - -// ---------------------------------------------------------------------- -// Der von der Deutschen Bank eingesetzte DDE-Server -// "Invision V2.71 Build 36 Mar 12 1999 V4.8.2" hat einen Bug, der -// dazu fuehrt, dass auf per WM_DDE_TERMINATE geschlossene Verbindungen -// nicht mit einem WM_DDE_TERMINATE geantwortet wird, wenn der -// entsprechende Link vorher per WM_DDE_UNADVISE beendet wurde. Dieser -// Bug tritt ab zwei parallel laufenden Links auf. Auf Wunsch der DB -// wurde das folgende Workaround eingebaut. -// ---------------------------------------------------------------------- -#define DEUTSCHE_BANK -#ifndef DEUTSCHE_BANK - -// Acknowledge ist beim Unadvise nicht ueblich -//#define SO_DDE_ABANDON_TRANSACTION_WAIT_ACK -#ifdef SO_DDE_ABANDON_TRANSACTION_WAIT_ACK - DDESTRUCT* pOutDDEData = MakeDDEObject( pConv->hWndPartner, - pTrans->hszItem, DDE_FACKREQ, 0 /*pTrans->nFormat*/, 0, 0); -#else - DDESTRUCT* pOutDDEData = MakeDDEObject( pConv->hWndPartner, - pTrans->hszItem, 0, 0 /*pTrans->nFormat*/, 0, 0); -#endif - WRITELOG("DdeAbandTrans:Waiting for acknowledge...") - pTrans->nConvst = XST_UNADVSENT; - if ( !MyWinDdePostMsg( pConv->hWndPartner, pConv->hWndThis, - WM_DDE_UNADVISE, pOutDDEData, DDEPM_RETRY ) ) - { - WRITELOG("DdeAbandTrans:PostMsg Failed") - return FALSE; - } -#ifdef SO_DDE_ABANDON_TRANSACTION_WAIT_ACK - WaitTransState( pTrans, nTransId, XST_UNADVACKRCVD, 0 ); -#else - pTrans->nConvst = XST_UNADVACKRCVD; -#endif - -#endif // DEUTSCHE_BANK - - WRITELOG("DdeAbandTrans:Ack received->Freeing transaction") - FreeTransaction( pData, nTransId ); - } - WRITELOG("DdeAbandonTransaction:End") - return TRUE; -} - -// wird von einem Server aufgerufen, wenn sich die Daten des -// Topic/Item-Paars geaendert haben. Diese Funktion fordert -// dann den Server auf, die Daten zu rendern (bei Hotlinks) und -// benachrichtigt die Clients -BOOL ImpDdeMgr::DdePostAdvise( HSZ hszTopic, HSZ hszItem) -{ - ////WRITELOG("DdePostAdvise:Start") - ////WRITESTATUS("DdePostAdvise:Start") - -#if 0 && defined( OV_DEBUG ) - String aDebStr("DdePostAdvise:Item "); - aDebStr += (ULONG)hszItem; - WRITELOG((char*)(const char*)aDebStr) -#endif - - Transaction* pTrans = pTransTable; - pTrans++; - USHORT nCurTrans = 1; - USHORT nUsedTransactions = pData->nCurTransCount; - while( nUsedTransactions && nCurTrans < pData->nMaxTransCount ) - { - HCONV hOwner = pTrans->hConvOwner; - if( hOwner ) - { - nUsedTransactions--; - USHORT nTempType = pTrans->nType; - nTempType &= (~XTYPF_MASK); - if( nTempType == (XTYP_ADVREQ & (~XTYPF_NOBLOCK) ) ) - { - ImpHCONV* pConv = pConvTable; - pConv += (USHORT)hOwner; - if(hszItem == pTrans->hszItem && pConv->hszTopic == hszTopic) - { - if( pConv->hConvPartner ) - { - // Transaktionen werden immer vom Client erzeugt - // -> auf Server-HCONV umschalten - hOwner = pConv->hConvPartner; - pConv = pConvTable; - pConv += (USHORT)hOwner; - } - HWND hWndClient = pConv->hWndPartner; - HWND hWndServer = pConv->hWndThis; -#if 0 && defined( OV_DEBUG ) - String aDebStr("DdePostAdvise: Server:"); - aDebStr += (ULONG)hWndServer; - aDebStr += " Client:"; - aDebStr += (ULONG)hWndClient; - WRITELOG((char*)(const char*)aDebStr) -#endif - DDESTRUCT* pOutDDEData; - if ( pTrans->nType & XTYPF_NODATA ) - { - // Warm link - ////WRITELOG("DdePostAdvise:Warm link found") - pOutDDEData = MakeDDEObject( hWndClient, hszItem, - DDE_FNODATA, pTrans->nFormat, 0, 0 ); - } - else - { - // Hot link - ////WRITELOG("DdePostAdvise:Hot link found") - pOutDDEData = Callback( XTYP_ADVREQ, - pTrans->nFormat, hOwner, hszTopic, - hszItem, (HDDEDATA)0, 1, 0 ); - } - if( pOutDDEData ) - { - // todo: FACK_REQ in Out-Data setzen, wenn pTrans->nType & XTYPF_ACKREQ - ////WRITELOG("DdePostAdvise:Sending data/notification") - BOOL bSuccess = MyWinDdePostMsg( hWndClient, - hWndServer,WM_DDE_DATA, pOutDDEData, DDEPM_RETRY); - if( bSuccess ) - { - // auf Acknowledge des Partners warten ? - if( pTrans->nType & XTYPF_ACKREQ ) - { - pTrans->nConvst = XST_ADVDATASENT; - // Impl. ist falsch! => korrekt: XST_ADVDATAACKRCVD - WaitTransState(pTrans, nCurTrans, - XST_UNADVACKRCVD, 0); - } - } - else - { - ////WRITELOG("DdePostAdvise:PostMsg failed") - nLastErrInstance = DMLERR_POSTMSG_FAILED; - } - } - else - { - ////WRITELOG("DdePostAdvise:No data to send") - } - } - } - } - nCurTrans++; - pTrans++; - } - ////WRITELOG("DdePostAdvise:End") - return TRUE; -} - -BOOL ImpDdeMgr::DdeEnableCallback( HCONV hConv, USHORT wCmd) -{ - return FALSE; -} - -// Rueckgabe: 0==Service nicht registriert; sonst Pointer auf Service-Eintrag -ImpService* ImpDdeMgr::GetService( HSZ hszService ) -{ - ImpService* pPtr = pServices; - if( !pPtr || !hszService ) - return 0; - for( ULONG nIdx = 0; nIdx < nServiceCount; nIdx++, pPtr++ ) - { - if(( hszService == pPtr->hBaseServName ) || - ( hszService == pPtr->hInstServName ) ) - return pPtr; - } - return 0; -} - - -// legt Service in Service-Tabelle ab. Tabelle wird ggf. expandiert -ImpService* ImpDdeMgr::PutService( HSZ hszService ) -{ - if( !pServices ) - { - DBG_ASSERT(nServiceCount==0,"DDE:Bad ServiceCount"); - pServices = new ImpService[ DDEMLSERVICETABLE_INISIZE ]; - memset( pServices, 0, DDEMLSERVICETABLE_INISIZE* sizeof(ImpService)); - nServiceCount = DDEMLSERVICETABLE_INISIZE; - } - ImpService* pPtr = pServices; - USHORT nCurPos = 0; - while( pPtr ) - { - if( pPtr->hBaseServName == 0 ) - break; - nCurPos++; - if( nCurPos < nServiceCount ) - pPtr++; - else - pPtr = 0; - } - if( !pPtr ) - { - // Tabelle vergroessern - pPtr = new ImpService[ nServiceCount + DDEMLSERVICETABLE_INISIZE ]; - memset( pPtr, 0, DDEMLSERVICETABLE_INISIZE* sizeof(ImpService)); - memcpy( pPtr, pServices, nServiceCount * sizeof(ImpService) ); -#ifdef DBG_UTIL - memset( pServices, 0, nServiceCount * sizeof(ImpService) ); -#endif - delete pServices; - pServices = pPtr; - pPtr += nServiceCount; // zeigt auf erste neue Position - nServiceCount += DDEMLSERVICETABLE_INISIZE; - } - DBG_ASSERT(pPtr->hBaseServName==0,"DDE:Service not empty"); - DBG_ASSERT(pPtr->hInstServName==0,"DDE:Service not empty"); - - DdeKeepStringHandle( hszService ); - - USHORT nStrLen = (USHORT)DdeQueryString( hszService, 0, 0, 0); - char* pBuf = new char[ nStrLen + 1 ]; - DdeQueryString(hszService, pBuf, nStrLen, 850 /* CodePage*/ ); - pBuf[ nStrLen ] = 0; - String aStr( (ULONG)hWndServer ); - aStr += pBuf; - HSZ hszInstServ = DdeCreateStringHandle( (PSZ)(const char*)pBuf, 850 ); - delete [] pBuf; - - pPtr->hBaseServName = hszService; - pPtr->hInstServName = hszInstServ; - return pPtr; -} - -void ImpDdeMgr::BroadcastService( ImpService* pService, BOOL bRegistered ) -{ - DBG_ASSERT(pService,"DDE:No Service"); - if( !pService ) - return; - MPARAM aMp1 = (MPARAM)(pService->hBaseServName); - MPARAM aMp2 = (MPARAM)(pService->hInstServName); - ULONG nMsg; - if( bRegistered ) - nMsg = WM_DDEML_REGISTER; - else - nMsg = WM_DDEML_UNREGISTER; - - HWND* pPtr = pAppTable; - for( USHORT nPos = 0; nPos < pData->nMaxAppCount; nPos++, pPtr++ ) - { - HWND hWndCurWin = *pPtr; - if ( hWndCurWin && hWndCurWin != hWndServer ) - WinSendMsg( hWndCurWin, nMsg, aMp1, aMp2 ); - } -} - -HDDEDATA ImpDdeMgr::DdeNameService( HSZ hszService, USHORT afCmd ) -{ - HDDEDATA hRet = (HDDEDATA)1; - - if( afCmd & DNS_FILTERON ) - bServFilterOn = TRUE; - else if( afCmd & DNS_FILTEROFF ) - bServFilterOn = FALSE; - ImpService* pService = GetService( hszService ); - BOOL bRegister = (BOOL)(afCmd & DNS_REGISTER); - if( bRegister ) - { - if( !pService ) - { - pService = PutService( hszService ); - BroadcastService( pService, TRUE ); - } - } - else - { - if( pService ) - { - BroadcastService( pService, FALSE ); - DdeFreeStringHandle( pService->hBaseServName ); - pService->hBaseServName = 0; - DdeFreeStringHandle( pService->hInstServName ); - pService->hInstServName = 0; - } - hRet = (HDDEDATA)0; // Service nicht gefunden - } - return hRet; -} - - -// static -HDDEDATA ImpDdeMgr::DdeClientTransaction(void* pDdeData, ULONG cbData, - HCONV hConv, HSZ hszItem, USHORT nFormat, USHORT nType, - ULONG nTimeout, ULONG* pResult) -{ - //WRITELOG("DdeClientTransaction:Start") - -#if 0 && defined(OV_DEBUG) - if( nType == XTYP_REQUEST ) - { - WRITELOG("Start XTYP_REQUEST"); - WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, - "Start XTYP_REQUEST","DdeClientTransaction", - HWND_DESKTOP,MB_OK); - } -#endif - - if( pResult ) - *pResult = 0; - - ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData(); - if ( !pData ) - { - ImpDdeMgr::nLastErrInstance = DMLERR_DLL_NOT_INITIALIZED; - return (HDDEDATA)0; - } - - BOOL bIsDdeHandle = (BOOL)(pDdeData && cbData==0xffffffff); - BOOL bAppOwnsHandle = (BOOL)( bIsDdeHandle && - (((DDESTRUCT*)pDdeData)->fsStatus & IMP_HDATAAPPOWNED) ); - - BOOL bNoData = (BOOL)(nType & XTYPF_NODATA)!=0; - BOOL bAckReq = (BOOL)(nType & XTYPF_ACKREQ)!=0; - USHORT nTypeFlags = nType & XTYPF_MASK; - nType &= (~XTYPF_MASK); - - BOOL bSync = (BOOL)( nTimeout != TIMEOUT_ASYNC ) != 0; - if( nType == XTYP_ADVSTART ) - bSync = TRUE; - - // Mapping transaction -> OS/2-Message - USHORT nTimeoutErr, nMsg; - switch ( nType ) - { - case XTYP_ADVSTART: - nMsg = WM_DDE_ADVISE; - nTimeoutErr = DMLERR_ADVACKTIMEOUT; -{ - nTimeout = 60000; -#if 0 && defined(OV_DEBUG) - char aBuf[ 128 ]; - ImpDdeMgr::DdeQueryString( hszItem,aBuf,127,850); - String aXXStr("Establishing hotlink "); - aXXStr += aBuf; - WRITELOG((char*)aXXStr.GetStr()); -#endif - -} - break; - - case XTYP_ADVSTOP: - nMsg = WM_DDE_UNADVISE; - nTimeoutErr = DMLERR_UNADVACKTIMEOUT; - break; - - case XTYP_REQUEST: - nMsg = WM_DDE_REQUEST; - nTimeoutErr = DMLERR_DATAACKTIMEOUT; - break; - - case XTYP_POKE: - nMsg = WM_DDE_POKE; - nTimeoutErr = DMLERR_POKEACKTIMEOUT; - break; - - case XTYP_EXECUTE: - nMsg = WM_DDE_EXECUTE; - nTimeoutErr = DMLERR_EXECACKTIMEOUT; - break; - - default: - nMsg = 0; - } - if(!hConv || (USHORT)hConv>= pData->nMaxConvCount || !nType || !nMsg || - (nType != XTYP_EXECUTE && (!hszItem || !nFormat)) ) - { - WRITELOG("DdeClientTransaction:Invalid parameter") - ImpDdeMgr::nLastErrInstance = DMLERR_INVALIDPARAMETER; - if( bIsDdeHandle && !bAppOwnsHandle ) - DdeFreeDataHandle( (HDDEDATA)pDdeData ); - return (HDDEDATA)0; - } - - // ueber den Conversation handle das ImpDdeMgr-Objekt holen - ImpHCONV* pConv = GetConvTable( pData ); - pConv += (USHORT)hConv; - ImpConvWndData* pObj = - (ImpConvWndData*)WinQueryWindowULong( pConv->hWndThis, 0 ); - ImpDdeMgr* pThis = pObj->pThis; - - if( bSync && pThis->bInSyncTrans ) - { - WRITELOG("DdeClientTransaction:Already in sync. transaction") - ImpDdeMgr::nLastErrInstance = DMLERR_REENTRANCY; - if( bIsDdeHandle && !bAppOwnsHandle ) - DdeFreeDataHandle( (HDDEDATA)pDdeData ); - return (HDDEDATA)0; - } - - Transaction* pTrans; - - BOOL bReqOnAdvLoop = FALSE; - ULONG nTransId = GetTransaction( pData, hConv, hszItem, nFormat ); - if( nTransId ) - { - // WRITELOG("DdeClientTransaction:Transaction found") - pTrans = GetTransTable( pData ); - pTrans += (USHORT)nTransId; - USHORT nTransType = pTrans->nType; - nTransType &= (~XTYPF_MASK); - if( (nType != XTYP_REQUEST && nTransType == nType) || - // wird Advise-Loop schon zum requesten missbraucht ? - (nType == XTYP_REQUEST && - nTransType == XTYP_ADVREQ && - pTrans->nConvst == XST_WAITING_REQDATA)) - { - // dieser Kanal ist dicht! - WRITELOG("DdeClientTransaction:Transaction already used") - ImpDdeMgr::nLastErrInstance = DMLERR_REENTRANCY; - if( bIsDdeHandle && !bAppOwnsHandle ) - DdeFreeDataHandle( (HDDEDATA)pDdeData ); - return (HDDEDATA)0; - } - else if( nTransType == XTYP_ADVREQ ) - { - switch( nType ) - { - case XTYP_ADVSTOP: - //WRITELOG("DdeClientTransaction:Stopping advise trans") - pTrans->nType = XTYP_ADVSTOP; - break; - - case XTYP_ADVSTART: - //WRITELOG("DdeClientTransaction:Adj. Advise-Params") - pTrans->nType = XTYP_ADVREQ; - if( bNoData ) - pTrans->nType |= XTYPF_NODATA; - if( bAckReq ) - pTrans->nType |= XTYPF_ACKREQ; - if( pResult ) - *pResult = nTransId; - return (HDDEDATA)TRUE; - - case XTYP_REQUEST: - // WRITELOG("DdeClientTransaction:Using adv trans for req") - // nConvst wird unten auf XST_WAITING_REQDATA gesetzt - bReqOnAdvLoop = TRUE; - break; - - default: - WRITELOG("DdeClientTransaction:Invalid parameter") - ImpDdeMgr::nLastErrInstance = DMLERR_INVALIDPARAMETER; - if( bIsDdeHandle && !bAppOwnsHandle ) - DdeFreeDataHandle( (HDDEDATA)pDdeData ); - return (HDDEDATA)FALSE; - } - } - } - else - { - // WRITELOG("DdeClientTransaction:Creating transaction") - nTransId = CreateTransaction(pData, hConv, hszItem, nFormat, nType); - } - - pTrans = GetTransTable( pData ); - pTrans += (USHORT)nTransId; - pTrans->nConvst = XST_WAITING_ACK; - if( nType == XTYP_REQUEST ) - pTrans->nConvst = XST_WAITING_REQDATA; - - HWND hWndServer = pConv->hWndPartner; - HWND hWndClient = pConv->hWndThis; - - HDDEDATA pOutDDEData; - if( bIsDdeHandle ) - { - if( bAppOwnsHandle ) - { - // wir muessen leider leider duplizieren, da uns OS/2 - // keine Chance laesst, diesen Status im Datenobjekt - // zu versenken. - ////WRITELOG("DdeClientTransaction:Copying handle") - HDDEDATA pNew; - HDDEDATA pData = (HDDEDATA)pDdeData; - if( !(MyDosAllocSharedMem((PPVOID)&pNew, NULL, pData->cbData, - PAG_COMMIT | PAG_READ | PAG_WRITE | OBJ_GIVEABLE | OBJ_ANY, - "MakeDDEObject"))) - { - memcpy( pNew, pData, pData->cbData ); - pOutDDEData = pNew; - } - else - { - WRITELOG("DdeClientTransaction:No Memory") - ImpDdeMgr::nLastErrInstance = DMLERR_LOW_MEMORY; - return (HDDEDATA)0; - } - } - else - pOutDDEData = (HDDEDATA)pDdeData; - } - else - pOutDDEData=MakeDDEObject(hWndServer,hszItem,0,nFormat,pDdeData,cbData); - - pOutDDEData->fsStatus |= nTypeFlags; - - HDDEDATA pDDEInData = 0; - if( bSync ) - { - if( nType != XTYP_REQUEST ) - pOutDDEData->fsStatus |= DDE_FACKREQ; - - // WRITELOG("DdeClientTransaction:Starting sync. trans.") - pThis->hSyncResponseData = (HDDEDATA)0; - pThis->nSyncResponseMsg = 0; - pThis->bInSyncTrans = TRUE; - pThis->nSyncTransId = nTransId; - pThis->bSyncAbandonTrans = FALSE; - - if ( !MyWinDdePostMsg( hWndServer, hWndClient, nMsg, pOutDDEData, - DDEPM_RETRY) ) - { - WRITELOG("DdeClientTransaction:PostMsg failed") - nLastErrInstance = DMLERR_POSTMSG_FAILED; - if( !bReqOnAdvLoop ) - FreeTransaction( pData, nTransId ); - else - { - DBG_ASSERT(pTrans->nType==XTYP_ADVREQ,"DDE:Error!") - pTrans->nConvst = 0; - } - return FALSE; - } - HAB hAB = WinQueryAnchorBlock( hWndClient ); - ULONG nDummyTimer = WinStartTimer( hAB, 0, 0, 50 ); - ULONG nTimeoutId = TID_USERMAX - nTransId; - WinStartTimer( hAB, hWndClient, nTimeoutId, nTimeout ); - QMSG aQueueMsg; - BOOL bLoop = TRUE; - while( bLoop ) - { - if( pThis->nSyncResponseMsg ) - bLoop = FALSE; - else - { - if( WinGetMsg(hAB,&aQueueMsg,0,0,0 )) - { - WinDispatchMsg( hAB, &aQueueMsg ); - } - else - bLoop = FALSE; - } - } - - WinStopTimer( hAB, hWndClient, nTimeoutId ); - WinStopTimer( hAB, 0, nDummyTimer ); - - // - // Der Speicherblock pOutDDEData muss vom Server geloescht worden sein! - // Ueberlegen: Nochmal loeschen, falls Server buggy ist, ansonsten - // platzt uns bald der Adressraum! - // - if( !pThis->nSyncResponseMsg ) - { - // unsere App wurde beendet - ////WRITELOG("DdeClientTransaction:App terminated") - return 0; - } - pDDEInData = pThis->hSyncResponseData; - nMsg = pThis->nSyncResponseMsg; - pThis->hSyncResponseData= 0; - pThis->nSyncResponseMsg = 0; - pThis->bInSyncTrans = FALSE; - pThis->nSyncTransId = 0; - if( !pDDEInData && nMsg != WM_TIMER ) - { - DBG_ASSERT(0,"Dde:No data!"); - WRITELOG("DdeClientTransaction: No Data!") - return (HDDEDATA)0; - } - switch( nMsg ) - { - case WM_TIMER: - WRITELOG("DdeClientTransaction:Timeout!") - nLastErrInstance = nTimeoutErr; - if( bReqOnAdvLoop ) - // auf normalen Loop-Betrieb zurueckschalten - pTrans->nConvst = XST_WAITING_ADVDATA; - break; - - case WM_DDE_ACK: - { - // WRITELOG("DdeClientTransaction:Ack received") - BOOL bPositive = (BOOL)(pDDEInData->fsStatus & DDE_FACK); - MyDosFreeMem( pDDEInData,"DdeClientTransaction" ); - pDDEInData = (HDDEDATA)bPositive; - if( nType == XTYP_ADVSTART && pDDEInData ) - { - -#if 0 && defined(OV_DEBUG) - char aBuf[ 128 ]; - ImpDdeMgr::DdeQueryString( pTrans->hszItem,aBuf,128,850); - String aXXStr("Hotlink "); -#endif - - if( bPositive ) - { - pTrans->nType = XTYP_ADVREQ; - // Hot/Warmlink, Ack - pTrans->nType |= nTypeFlags; - // XST_WAITING_ACK ==> XST_WAITING_ADVDATA - pTrans->nConvst = XST_WAITING_ADVDATA; - -#if 0 && defined(OV_DEBUG) - aXXStr += "established "; - aXXStr += aBuf; -#endif - - } - -#if 0 && defined(OV_DEBUG) - else - { - aXXStr += "failed "; - aXXStr += aBuf; - } - WRITELOG((char*)aXXStr.GetStr()); -#endif - - } - } - break; - - case WM_DDE_DATA: - // WRITELOG("DdeClientTransaction:Data received") - // WRITEDATA(pDDEInData) - if( bReqOnAdvLoop ) - { - DBG_ASSERT(pTrans->nConvst==XST_WAITING_REQDATA,"DDE:Bad state"); - DBG_ASSERT(pTrans->nType==XTYP_ADVREQ,"DDE:Bad state"); - // auf Loop-Betrieb umschalten - pTrans->nConvst = XST_WAITING_ADVDATA; - } - break; - - default: - WRITELOG("DdeClientTransaction:Unexpected msg") - MyDosFreeMem( pDDEInData,"DdeClientTransaction" ); - pDDEInData = 0; - } - pThis->bSyncAbandonTrans = FALSE; - pThis->bInSyncTrans = FALSE; - if( pThis->bSyncAbandonTrans && bReqOnAdvLoop ) - pThis->DdeAbandonTransaction( hConv, nTransId ); - } - else - { - // WRITELOG("DdeClientTransaction:Starting async. trans.") - pDDEInData = (HDDEDATA)MyWinDdePostMsg( hWndServer, hWndClient, nMsg, - pOutDDEData, DDEPM_RETRY); - if( !pDDEInData ) - { - WRITELOG("DdeClientTransaction:PostMsg failed") - nLastErrInstance = DMLERR_POSTMSG_FAILED; - if( !bReqOnAdvLoop ) - FreeTransaction( pData, nTransId ); - else - { - DBG_ASSERT(pTrans->nType==XTYP_ADVREQ,"DDE:Error!") - pTrans->nConvst = 0; - } - } - else - { - // WRITELOG("DdeClientTransaction:Async trans. success") - if( pResult ) - *pResult = nTransId; - } - } -#if 0 && defined( OV_DEBUG ) - if( nType == XTYP_REQUEST ) - { - WRITELOG("End XTYP_REQUEST"); - WinMessageBox(HWND_DESKTOP,HWND_DESKTOP, - "End XTYP_REQUEST","DdeClientTransaction", - HWND_DESKTOP,MB_OK); - } -#endif - //WRITELOG("DdeClientTransaction:End") - //WRITESTATUS("DdeClientTransaction:End") - return pDDEInData; -} - -MRESULT ImpDdeMgr::DdeRegister( ImpWndProcParams* pParams ) -{ - MRESULT nRet = (MRESULT)0; - if ( !(nTransactFilter & CBF_SKIP_REGISTRATIONS) ) - { - HSZ hSBaseName = (HSZ)pParams->nPar1; - HSZ hIBaseName = (HSZ)pParams->nPar2; - nRet=(MRESULT)Callback(XTYP_REGISTER,0,0,hSBaseName,hIBaseName,0,0,0); - } - return nRet; -} - -MRESULT ImpDdeMgr::DdeUnregister( ImpWndProcParams* pParams ) -{ - MRESULT nRet = (MRESULT)0; - if ( !(nTransactFilter & CBF_SKIP_UNREGISTRATIONS) ) - { - HSZ hSBaseName = (HSZ)pParams->nPar1; - HSZ hIBaseName = (HSZ)pParams->nPar2; - nRet=(MRESULT)Callback(XTYP_UNREGISTER,0,0,hSBaseName,hIBaseName,0,0,0); - } - return nRet; -} - -MRESULT ImpDdeMgr::DdeTimeout( ImpWndProcParams* pParams ) -{ - ////WRITELOG("DdeTimeout:Received") - if( nSyncResponseMsg ) - { - ////WRITELOG("DdeTimeout:Trans already processed->ignoring timeout") - return (MRESULT)1; - } - ULONG nTimerId = (ULONG)pParams->nPar1; - ULONG nTransId = TID_USERMAX - nTimerId; - Transaction* pTrans = pTransTable; - pTrans += (USHORT)nTransId; - if( nTransId < 1 || nTransId >= pData->nMaxTransCount || - pTrans->hConvOwner == 0 ) - { - DBG_ASSERT(0,"DdeTimeout:Invalid TransactionId"); - return (MRESULT)1; - } - if( bInSyncTrans && nTransId == nSyncTransId ) - { - USHORT nTempType = pTrans->nType; - nTempType &= (~XTYPF_MASK); - // advise-loops koennen nur innerhalb synchroner - // requests timeouts bekommen. die transaktion wird - // in diesem fall nicht geloescht. - if( nTempType != (XTYP_ADVREQ & (~XTYPF_NOBLOCK) )) - { - ////WRITELOG("DdeTimeout:Freeing transaction") - FreeTransaction( pData, nTransId ); - } - nSyncResponseMsg = WM_TIMER; -#if 0 && defined( OV_DEBUG ) - String aMsg("DdeTimeout:Transaction="); - aMsg += nTransId; - WRITELOG((char*)(const char*)aMsg) -#endif - } - else - { - ////WRITELOG("DdeTimeout:Async transaction timed out") - pTrans->nConvst = XST_TIMEOUT; - } - return (MRESULT)1; -} - - - -MRESULT ImpDdeMgr::DdeTerminate( ImpWndProcParams* pParams ) -{ - WRITELOG("DdeTerminate:Received") - HWND hWndThis = pParams->hWndReceiver; - HWND hWndPartner = (HWND)(pParams->nPar1); - - HCONV hConv = GetConvHandle( pData, hWndThis, hWndPartner ); -#if 0 && defined( OV_DEBUG ) - String strDebug("DdeTerminate:ConvHandle="); - strDebug += (USHORT)hConv; - WRITELOG((char*)(const char*)strDebug) -#endif - ImpHCONV* pConv = pConvTable + (USHORT)hConv; - if( hConv ) - { - // warten wir auf ein DDE_TERMINATE Acknowledge ? - if( pConv->nStatus & ST_TERMINATED ) - { - ////WRITELOG("DdeTerminate:TERMINATE-Ack received") - pConv->nStatus |= ST_TERMACKREC; - return (MRESULT)0; // DdeDisconnect raeumt jetzt auf - } - - // sind wir Server?, wenn ja: die App benachrichtigen, - // dass die Advise loops gestoppt wurden und die - // Transaktionen loeschen - - // OV 26.07.96: Die das TERMINATE empfangende App muss - // die Transaction-Tabelle abraeumen, egal ob Server oder Client!! - // Es muessen alle Trans geloescht werden, die als Owner den - // Client oder den Server haben! - // if( !(pConv->nStatus & ST_CLIENT ) ) - SendUnadvises( hConv, 0, FALSE ); // alle Formate & nicht loeschen - SendUnadvises( pConv->hConvPartner, 0, FALSE ); - - // wir werden von draussen gekillt - if ( !(nTransactFilter & CBF_SKIP_DISCONNECTS) ) - { - Callback( XTYP_DISCONNECT, 0, hConv, 0, 0, 0, - 0, (ULONG)IsSameInstance(hWndPartner)); - } - - // kann unsere Partner-App DDEML ? - if( !(pConv->hConvPartner) ) - { - // nein, deshalb Transaktionstabelle selbst loeschen - ////WRITELOG("DdeTerminate:Freeing transactions") - FreeTransactions( pData, hConv ); - } - } - else - nLastErrInstance = DMLERR_NO_CONV_ESTABLISHED; - -#if 0 && defined(OV_DEBUG) - if( !WinIsWindow(0,hWndPartner)) - { - WRITELOG("DdeTerminate:hWndPartner not valid") - } - if(!WinIsWindow(0,hWndThis)) - { - WRITELOG("DdeTerminate:hWndThis not valid") - } -#endif - - if( hConv ) - { - // hWndThis nicht loeschen, da wir den Handle noch fuer - // das Acknowledge brauchen - ////WRITELOG("DdeTerminate:Freeing conversation") - FreeConvHandle( pData, hConv, FALSE ); - } - - ////WRITELOG("DdeTerminate:Acknowledging DDE_TERMINATE") - -#ifdef OV_DEBUG - DBG_ASSERT(WinIsWindow( 0, hWndThis ),"hWndThis not valid"); -#endif - - if( !WinDdePostMsg( hWndPartner, hWndThis, WM_DDE_TERMINATE, 0, DDEPM_RETRY )) - { - ////WRITELOG("DdeTerminate:Acknowledging DDE_TERMINATE failed") - } - // jetzt hWndThis loeschen - DestroyConversationWnd( hWndThis ); - - return (MRESULT)0; -} - - -/* - Zuordnung des Conversationhandles: - - Verbindungsaufbau: - Client: DdeInitiate( HWNDClient ) - Server: Post( WM_DDE_INITIATEACK( HWNDServer )) - Client: CreateConvHandle( HWNDClient, HWNDServer ) - - Datenaustausch: - Server: Post(WM_DDE_ACK( HWNDSender )) - Client: GetConvHandle( HWNDClient, HWNDSender ) -*/ - -MRESULT ImpDdeMgr::ConvWndProc( HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2 ) -{ - ImpWndProcParams aParams; - - MRESULT nRet = (MRESULT)0; - aParams.hWndReceiver= hWnd; - aParams.nPar1 = nPar1; - aParams.nPar2 = nPar2; - - switch( nMsg ) - { - -#ifdef DBG_UTIL - case WM_DDE_INITIATE : - DBG_ASSERT(0,"dde:unexpected msg"); - nRet = (MRESULT)TRUE; - break; -#endif - - case WM_DDE_INITIATEACK : nRet = DdeInitiateAck(&aParams); break; - case WM_DDE_ACK : nRet = DdeAck( &aParams ); break; - case WM_DDE_ADVISE : nRet = DdeAdvise( &aParams ); break; - case WM_DDE_DATA : nRet = DdeData( &aParams ); break; - case WM_DDE_EXECUTE : nRet = DdeExecute( &aParams ); break; - case WM_DDE_POKE : nRet = DdePoke( &aParams ); break; - case WM_DDE_REQUEST : nRet = DdeRequest( &aParams ); break; - case WM_DDE_TERMINATE : nRet = DdeTerminate( &aParams ); break; - case WM_DDE_UNADVISE : nRet = DdeUnadvise( &aParams ); break; - case WM_TIMER : nRet = DdeTimeout( &aParams ); break; - } - return nRet; -} - -MRESULT ImpDdeMgr::SrvWndProc( HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2 ) -{ - MRESULT nRet = (MRESULT)0; - - ImpWndProcParams aParams; - aParams.hWndReceiver= hWnd; - aParams.nPar1 = nPar1; - aParams.nPar2 = nPar2; - - switch( nMsg ) - { -#ifdef DBG_UTIL - case WM_DDE_ACK : - case WM_DDE_ADVISE : - case WM_DDE_EXECUTE : - case WM_DDE_POKE : - case WM_DDE_REQUEST : - case WM_DDE_UNADVISE : - case WM_DDE_DATA : - case WM_DDE_INITIATEACK : - DBG_ASSERT(0,"dde:unexpected msg"); - nRet = (MRESULT)TRUE; - break; -#endif - - case WM_DDE_TERMINATE : - break; // DDE_INITIATE wurde im DDE_INITIATEACK terminiert - - // ein Client will was von uns - case WM_DDE_INITIATE : - nRet = DdeInitiate( &aParams ); - break; - - // eine ddeml-faehige App. hat einen Service (typ. AppName) [de]reg. - case WM_DDEML_REGISTER : - nRet = DdeRegister( &aParams ); - break; - - case WM_DDEML_UNREGISTER : - nRet = DdeUnregister( &aParams ); - break; - }; - return nRet; -} - - -MRESULT ImpDdeMgr::DdeAck( ImpWndProcParams* pParams ) -{ - //WRITELOG("DdeAck:Start") - HSZ hszItem; - DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2); - if( pInDDEData ) - { - BOOL bPositive = (BOOL)(pInDDEData->fsStatus & DDE_FACK ) != 0; - BOOL bBusy = bPositive ? FALSE : (BOOL)(pInDDEData->fsStatus & DDE_FBUSY ) != 0; - BOOL bNotProcessed = (BOOL)(pInDDEData->fsStatus & DDE_NOTPROCESSED ) != 0; -#if 0 && defined( OV_DEBUG ) - String aDebStr("DdeAck:Received "); - if( bPositive ) - aDebStr += "(positive)"; - else - aDebStr += "(negative)"; - if( bBusy ) - aDebStr += "(busy)"; - if( bNotProcessed ) - aDebStr += "(not processed)"; - WRITELOG((char*)(const char*)aDebStr) -#endif - // ein DDE_ACK niemals bestaetigen (um endlosschleifen zu vermeiden) - pInDDEData->fsStatus &= (~DDE_FACKREQ); - } - else - { - //WRITELOG("DdeAck:Received (no data!)") - return (MRESULT)0; - } - - HCONV hConv = CheckIncoming(pParams, 0, hszItem); -#ifdef OV_DEBUG - if( !hConv ) - { - WRITELOG("DdeAck:HCONV not found") - } -#endif - ULONG nTransId=GetTransaction(pData,hConv,hszItem,pInDDEData->usFormat); - if( !nTransId ) - { - WRITELOG("DdeAck:Transaction not found") - MyDosFreeMem( pInDDEData,"DdeAck" ); - return (MRESULT)0; - } - - BOOL bThisIsSync = (BOOL)( bInSyncTrans && nTransId == nSyncTransId ); -#if 0 && defined( OV_DEBUG ) - if( bThisIsSync) - WRITELOG("DdeAck: sync transaction") - else - WRITELOG("DdeAck: async transaction") -#endif - // pruefen, ob die Transaktion abgeschlossen ist. - Transaction* pTrans = pTransTable; - pTrans += (USHORT)nTransId; - ImpHCONV* pConv = pConvTable; - pConv += (USHORT)hConv; - - if( pTrans->nConvst == XST_UNADVSENT ) - { - //WRITELOG("DdeAck:Unadvise-Ack received") - pTrans->nConvst = XST_UNADVACKRCVD; - MyDosFreeMem( pInDDEData,"DdeAck" ); - DdeFreeStringHandle( hszItem ); - return (MRESULT)0; - } - if( pTrans->nConvst == XST_ADVDATASENT ) - { - //WRITELOG("DdeAck:AdvData-Ack received") - pTrans->nConvst = XST_ADVDATAACKRCVD; - MyDosFreeMem( pInDDEData,"DdeAck" ); - DdeFreeStringHandle( hszItem ); - return (MRESULT)0; - } - - USHORT nType = pTrans->nType; - nType &= (~XTYPF_MASK); - // beginn einer advise-loop oder request auf advise-loop ? - // wenn ja: transaktion nicht loeschen - BOOL bFinished = (BOOL)(nType != XTYP_ADVSTART && - nType != (XTYP_ADVREQ & (~XTYPF_NOBLOCK)) ); - if( bFinished ) - { - if( !bThisIsSync ) - { - ////WRITELOG("DdeAck:Transaction completed") - Callback( XTYP_XACT_COMPLETE, pInDDEData->usFormat, hConv, - pConv->hszTopic, hszItem, (HDDEDATA)0, nTransId, 0 ); - } - ////WRITELOG("DdeAck:Freeing transaction") - FreeTransaction( pData, nTransId ); - } - - if( bThisIsSync ) - { - hSyncResponseData = pInDDEData; - nSyncResponseMsg = WM_DDE_ACK; - } - else - { - MyDosFreeMem( pInDDEData,"DdeAck" ); - } - - DdeFreeStringHandle( hszItem ); - - return (MRESULT)0; -} - - -USHORT ImpDdeMgr::SendUnadvises(HCONV hConvServer,USHORT nFormat,BOOL bFree) -{ - USHORT nTransFound = 0; - BOOL bCallApp = (BOOL)(!(nTransactFilter & CBF_FAIL_ADVISES)); -#if 0 && defined( OV_DEBUG ) - String aStr("Unadvising transactions for HCONV="); - aStr += (ULONG)hConvServer; - aStr += " CallApp:"; aStr += (USHORT)bCallApp; - WRITELOG((char*)aStr.GetStr()) -#endif - - - // wenn wir weder loeschen noch die App benachrichtigen sollen, - // koennen wir gleich wieder returnen - if( !hConvServer || ( !bFree && !bCallApp ) ) - return 0; - - ImpHCONV* pConvSrv = pConvTable; - pConvSrv += (USHORT)hConvServer; - HSZ hszTopic = pConvSrv->hszTopic; - - Transaction* pTrans = pTransTable; - pTrans++; - USHORT nCurTransId = 1; - USHORT nCurTransactions = pData->nCurTransCount; - while( nCurTransactions && nCurTransId < pData->nMaxTransCount ) - { - if( pTrans->hConvOwner ) - nCurTransactions--; - if( pTrans->hConvOwner == hConvServer && - (pTrans->nType & XTYP_ADVREQ) ) - { - if( !nFormat || (nFormat == pTrans->nFormat) ) - { - nTransFound++; - if( bCallApp ) - { - //WRITELOG("SendUnadvises:Notifying App") - Callback( XTYP_ADVSTOP, pTrans->nFormat, hConvServer, - hszTopic, pTrans->hszItem, 0,0,0 ); - } - if( bFree ) - FreeTransaction( pData, (ULONG)nCurTransId ); - } - } - nCurTransId++; - pTrans++; - } - return nTransFound; -} - - - -HCONV ImpDdeMgr::CheckIncoming( ImpWndProcParams* pParams, ULONG nTransMask, - HSZ& rhszItem ) -{ -// ////WRITELOG("CheckIncoming") - rhszItem = 0; - DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2); - if( !pInDDEData ) - { - // ////WRITELOG("CheckIncoming:PDDESTRUCT==0") - return (HCONV)0; - } - - HWND hWndThis = pParams->hWndReceiver; - HWND hWndClient = (HWND)pParams->nPar1; - - BOOL bReject = (BOOL)(nTransactFilter & nTransMask); - HCONV hConv; - if( !bReject ) - hConv = GetConvHandle( pData, hWndThis, hWndClient ); - if ( bReject || !hConv ) - return (HCONV)0; - - rhszItem = DdeCreateStringHandle( - ((char*)(pInDDEData)+pInDDEData->offszItemName), 850 ); - - // ////WRITELOG("CheckIncoming:OK"); - return hConv; -} - - -MRESULT ImpDdeMgr::DdeAdvise( ImpWndProcParams* pParams ) -{ - ////WRITELOG("DdeAdvise:Received") - HSZ hszItem; - HCONV hConv = CheckIncoming(pParams, CBF_FAIL_ADVISES, hszItem); - DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2); - HWND hWndThis = pParams->hWndReceiver; - HWND hWndClient = (HWND)pParams->nPar1; - if( !hConv ) - { - ////WRITELOG("DdeAdvise:Conversation not found") - pInDDEData->fsStatus &= (~DDE_FACK); - MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY); - DdeFreeStringHandle( hszItem ); - return (MRESULT)0; - } - - Transaction* pTrans = pTransTable; - ImpHCONV* pConv = pConvTable; - pConv += (USHORT)hConv; - - // existiert schon ein Link auf Topic/Item/Format-Vektor ? - - ULONG nTransId=GetTransaction(pData,hConv,hszItem,pInDDEData->usFormat); - if( nTransId ) - { - ////WRITELOG("DdeAdvise:Transaction already exists") - pTrans += (USHORT)nTransId; - // ist es eine AdviseLoop ? - USHORT nTempType = pTrans->nType; - nTempType &= (~XTYPF_MASK); - if( nTempType == XTYP_ADVREQ ) - { - // Flags der laufenden Advise-Loop aktualisieren - ////WRITELOG("DdeAdvise:Adjusting Advise-Params") - pTrans->nType = XTYP_ADVREQ; - if( pInDDEData->fsStatus & DDE_FNODATA ) - pTrans->nType |= XTYPF_NODATA; - if( pInDDEData->fsStatus & DDE_FACKREQ ) - pTrans->nType |= XTYPF_ACKREQ; - pInDDEData->fsStatus |= DDE_FACK; - MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY); - DdeFreeStringHandle( hszItem ); - return (MRESULT)0; - } - else if( nTempType != XTYP_ADVSTART ) - { - ////WRITELOG("DdeAdvise:Not a advise transaction") - pInDDEData->fsStatus &= (~DDE_FACK); - MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY); - DdeFreeStringHandle( hszItem ); - return (MRESULT)0; - } - } - - if( !nTransId ) - { - ////WRITELOG("DdeAdvise:Creating Transaction") - ////WRITESTATUS("DdeAdvise:Creating Transaction") - nTransId = CreateTransaction( pData, hConv, hszItem, - pInDDEData->usFormat, XTYP_ADVREQ ); - ////WRITESTATUS("DdeAdvise:Created Transaction") - } - if( nTransId ) - { - pTrans = pTransTable; - pTrans += (USHORT)nTransId; - if( pInDDEData->fsStatus & DDE_FNODATA ) - pTrans->nType |= XTYPF_NODATA; - if( pInDDEData->fsStatus & DDE_FACKREQ ) - pTrans->nType |= XTYPF_ACKREQ; - } - else - { - ////WRITELOG("DdeAdvise:Cannot create Transaction") - pInDDEData->fsStatus &= (~DDE_FACK); - MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY); - DdeFreeStringHandle( hszItem ); - return (MRESULT)0; - } - - ////WRITELOG("DdeAdvise:Calling Server") - - if ( Callback( XTYP_ADVSTART, pInDDEData->usFormat, - hConv, pConv->hszTopic, hszItem, (HDDEDATA)0, 0, 0 ) ) - { - // - // ServerApp erlaubt AdviseLoop - // - ////WRITELOG("DdeAdvise:Advise loop established") - pInDDEData->fsStatus |= DDE_FACK; - MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY); - } - else - { - ////WRITELOG("DdeAdvise:Advise loop not established") - FreeTransaction( pData, nTransId ); - pInDDEData->fsStatus &= (~DDE_FACK); // DDE_FNOTPROCESSED; - MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY); - } - ////WRITESTATUS("DdeAdvise:End") - ////WRITELOG("DdeAdvise:End") - DdeFreeStringHandle( hszItem ); - return (MRESULT)0; -} - -MRESULT ImpDdeMgr::DdeData( ImpWndProcParams* pParams ) -{ - WRITELOG("DdeData:Received") - HSZ hszItem; - HCONV hConv = CheckIncoming(pParams, 0, hszItem); - HWND hWndThis = pParams->hWndReceiver; - HWND hWndClient = (HWND)pParams->nPar1; - DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2); -#if 0 && defined( OV_DEBUG ) - { - String aStr("DdeData Address:"); - aStr += (ULONG)pInDDEData; - WRITELOG((char*)aStr.GetStr()) - } -#endif - - BOOL bSendAck; - if( pInDDEData && (pInDDEData->fsStatus & DDE_FACKREQ )) - { - WRITELOG("DdeData: Ackn requested") - bSendAck = TRUE; - } - else - { - WRITELOG("DdeData: Ackn not requested") - bSendAck = FALSE; - } - - ULONG nTransId = GetTransaction(pData,hConv,hszItem,pInDDEData->usFormat); - if( !nTransId ) - { - WRITELOG("DdeData:Transaction not found") - WRITEDATA(pInDDEData) - if( bSendAck ) - { - WRITELOG("DdeData: Posting Ackn") - pInDDEData->fsStatus &= (~DDE_FACK); // NOTPROCESSED; - MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY); - } - else - { - MyDosFreeMem( pInDDEData,"DdeData" ); - } - return (MRESULT)0; - } - -#if 0 && defined( OV_DEBUG ) - if( pInDDEData ) - { - WRITEDATA(pInDDEData) - } -#endif - - BOOL bThisIsSync = (BOOL)( bInSyncTrans && nTransId == nSyncTransId ); - - // pruefen, ob die Transaktion abgeschlossen ist. - Transaction* pTrans = pTransTable; - pTrans += (USHORT)nTransId; - - if( pTrans->nConvst == XST_WAITING_ACK ) - { - // dieser Fall kann eintreten, wenn ein Server innerhalb - // einer WM_DDE_ADVISE-Msg. oder bevor beim Client das - // Ack eintrifft, Advise-Daten sendet. - WRITELOG("DdeData:Ignoring unexpected data") - if( bSendAck ) - { - WRITELOG("DdeData: Posting Ackn") - pInDDEData->fsStatus &= (~DDE_FACK); // NOTPROCESSED; - MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY); - } - else - { - MyDosFreeMem( pInDDEData,"DdeData" ); - } - return (MRESULT)0; - } - - ImpHCONV* pConv = pConvTable; - pConv += (USHORT)hConv; - - USHORT nType = pTrans->nType; - nType &= (~XTYPF_MASK); - BOOL bNotAdviseLoop = (BOOL)(nType != (XTYP_ADVREQ & (~XTYPF_NOBLOCK))); - if( !bThisIsSync ) - { - // WRITELOG("DdeData:Is async transaction") - if( bNotAdviseLoop ) - { - // WRITELOG("DdeData:Transaction completed -> calling client") - Callback( XTYP_XACT_COMPLETE, pInDDEData->usFormat, hConv, - pConv->hszTopic, hszItem, pInDDEData, nTransId, 0 ); - // WRITELOG("DdeData:Freeing transaction") - FreeTransaction( pData, nTransId ); - } - else - { - WRITELOG("DdeData:Advise-Loop -> calling client") - HDDEDATA pToSend = pInDDEData; - if( pTrans->nType & XTYPF_NODATA ) - { - pToSend = 0; - // WRITELOG("DdeData:Is warm link") - } - Callback( XTYP_ADVDATA, pInDDEData->usFormat, hConv, - pConv->hszTopic, hszItem, pToSend, nTransId, 0 ); - } - if( bSendAck ) - { - WRITELOG("DdeData: Posting Ackn") - pInDDEData->fsStatus = DDE_FACK; - MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY); - } - else - MyDosFreeMem( pInDDEData,"DdeData" ); - } - else // synchrone Transaktion (Datenhandle nicht freigeben!) - { - // WRITELOG("DdeData:Is sync transaction") - hSyncResponseData = pInDDEData; - nSyncResponseMsg = WM_DDE_DATA; - if( bSendAck ) - { - pInDDEData->fsStatus |= DDE_FACK; - WRITELOG("DdeData: Posting Ackn") - MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData, - DDEPM_RETRY | DDEPM_NOFREE ); - } - } - - DdeFreeStringHandle( hszItem ); - // WRITELOG("DdeData:End") - return (MRESULT)0; -} - -MRESULT ImpDdeMgr::DdeExecute( ImpWndProcParams* pParams ) -{ - ////WRITELOG("DdeExecute:Received") - DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2); - HSZ hszItem; - HCONV hConv = CheckIncoming(pParams, 0, hszItem); - BOOL bSuccess = FALSE; - ImpHCONV* pConv = pConvTable; - pConv += (USHORT)hConv; - if ( hConv && !(nTransactFilter & CBF_FAIL_EXECUTES) && pInDDEData ) - { - if ( Callback( XTYP_EXECUTE, pInDDEData->usFormat, hConv, - pConv->hszTopic, hszItem, pInDDEData, 0, 0 ) - == (DDESTRUCT*)DDE_FACK ) - bSuccess = TRUE; - } - else - { - ////WRITELOG("DdeExecute:Not processed") - } - if( pInDDEData ) - { - if( bSuccess ) - pInDDEData->fsStatus |= DDE_FACK; - else - pInDDEData->fsStatus &= (~DDE_FACK); - MyWinDdePostMsg( pConv->hWndPartner, pConv->hWndThis, WM_DDE_ACK, - pInDDEData, DDEPM_RETRY ); - } - DdeFreeStringHandle( hszItem ); - return (MRESULT)0; -} - -HCONV ImpDdeMgr::ConnectWithClient( HWND hWndClient, - HSZ hszPartner, HSZ hszService, HSZ hszTopic, BOOL bSameInst, - DDEINIT* pDDEData, CONVCONTEXT* pCC ) -{ - ////WRITELOG("ConnectWithClient:Start") - HWND hWndSrv = CreateConversationWnd(); - IncConversationWndRefCount( hWndSrv ); - HCONV hConv = CreateConvHandle( pData, pidThis, hWndSrv, hWndClient, - hszPartner, hszService, hszTopic ); - if(!hConv ) - return 0; - BOOL bFreeDdeData = FALSE; - if( !pDDEData ) - { - bFreeDdeData = TRUE; - pDDEData = CreateDDEInitData( hWndClient,hszService,hszTopic, pCC ); - PID pid; TID tid; - WinQueryWindowProcess( hWndClient, &pid, &tid ); - DosGiveSharedMem( pDDEData, pid, PAG_READ | PAG_WRITE); - } - HAB hAB = WinQueryAnchorBlock( hWndSrv ); - WinGetLastError( hAB ); // fehlercode zuruecksetzen - WinSendMsg(hWndClient,WM_DDE_INITIATEACK,(MPARAM)hWndSrv,(MPARAM)pDDEData); - if( WinGetLastError( hAB ) ) - { - // ////WRITELOG("DdeConnectWithClient:Client died") - if( bFreeDdeData ) - { - MyDosFreeMem( pDDEData,"ConnectWithClient" ); - } - FreeConvHandle( pData, hConv ); - return (HCONV)0; - } - - if( !(nTransactFilter & CBF_SKIP_CONNECT_CONFIRMS) ) - { - Callback( XTYP_CONNECT_CONFIRM, 0, hConv, hszTopic, hszService, - 0, 0, (ULONG)bSameInst ); - } - - if( bFreeDdeData ) - { - MyDosFreeMem( pDDEData,"ConnectWithClient" ); - } - // HCONV der PartnerApp suchen & bei uns eintragen - ImpHCONV* pConv = pConvTable; - pConv += (USHORT)hConv; - pConv->hConvPartner = GetConvHandle( pData, hWndClient, hWndSrv ); -#if 0 && defined(OV_DEBUG) - if( !pConv->hConvPartner ) - { - WRITELOG("DdeConnectWithClient:Partner not found") - } -#endif - pConv->nStatus = ST_CONNECTED; - //WRITESTATUS("Server:Connected with client") - //WRITELOG("ConnectWithClient:End") - return hConv; -} - -MRESULT ImpDdeMgr::DdeInitiate( ImpWndProcParams* pParams ) -{ - ////WRITELOG("DdeInitiate:Received") - HWND hWndClient = (HWND)(pParams->nPar1); -// BOOL bSameInst = IsSameInstance( hWndClient ); - BOOL bSameInst = (BOOL)(hWndClient==hWndServer); - DDEINIT* pDDEData = (DDEINIT*)pParams->nPar2; - - if ( ( nTransactFilter & (CBF_FAIL_CONNECTIONS | APPCMD_CLIENTONLY)) || - (( nTransactFilter & CBF_FAIL_SELFCONNECTIONS) && bSameInst ) - ) - { - MyDosFreeMem( pDDEData,"DdeInitiate" ); - return (MRESULT)FALSE; // narda - } - - HSZ hszService = (HSZ)0; - if( *(pDDEData->pszAppName) != '\0' ) - { - hszService = DdeCreateStringHandle( pDDEData->pszAppName, 850 ); - ////WRITELOG(pDDEData->pszAppName); - } - HSZ hszTopic = (HSZ)0; - if( *(pDDEData->pszTopic) != '\0' ) - { - hszTopic = DdeCreateStringHandle( pDDEData->pszTopic, 850 ); - ////WRITELOG(pDDEData->pszTopic); - } - HSZ hszPartner = GetAppName( hWndClient ); - - // nur weitermachen, wenn Service registriert oder - // Service-Name-Filtering ausgeschaltet. - if( !bServFilterOn || GetService(hszService) ) - { - // XTYP_CONNECT-Transaktionen erfolgen nur mit - // Services & Topics ungleich 0! - if( hszService && hszTopic ) - { - if( IsConvHandleAvailable(pData) && Callback( XTYP_CONNECT, - 0, 0, hszTopic,hszService, 0, 0, (ULONG)bSameInst)) - { - // App erlaubt Verbindung mit Client - ConnectWithClient( hWndClient, hszPartner, - hszService, hszTopic, bSameInst, pDDEData ); - } - } - else - { - // ** Wildcard-Connect ** - ////WRITELOG("DdeInitiate:Wildconnect") - // vom Server eine Liste aller Service/Topic-Paare anfordern - CONVCONTEXT* pCC=(CONVCONTEXT*)(pDDEData+pDDEData->offConvContext); - DDESTRUCT* hList = Callback( XTYP_WILDCONNECT, 0, (HCONV)0, - hszTopic,hszService, (HDDEDATA)0, (ULONG)pCC, (ULONG)bSameInst ); - if( hList ) - { - HSZPAIR* pPairs = (HSZPAIR*)((char*)hList+hList->offabData); - while( pPairs->hszSvc ) - { - ////WRITELOG("DdeInitiate:Wildconnect.Connecting") - ConnectWithClient( hWndClient, hszPartner, - pPairs->hszSvc, pPairs->hszTopic, bSameInst, 0, pCC); - // Stringhandles gehoeren der App! (nicht free-en) - pPairs++; - } - DdeFreeDataHandle( hList ); - } - } - } -#if 0 && defined(OV_DEBUG) - else - { - WRITELOG("DdeInitiate:Service filtered") - } -#endif - DdeFreeStringHandle( hszTopic ); - DdeFreeStringHandle( hszService ); - DdeFreeStringHandle( hszPartner ); - MyDosFreeMem( pDDEData,"DdeInitiate" ); - ////WRITELOG("DdeInitiate:End") - return (MRESULT)TRUE; -} - -MRESULT ImpDdeMgr::DdeInitiateAck( ImpWndProcParams* pParams ) -{ - ////WRITELOG("DdeInitiateAck:Received") - DDEINIT* pDDEData = (DDEINIT*)(pParams->nPar2); - - if( !bListConnect && hCurConv ) - { - ////WRITELOG("DdeInitiateAck:Already connected") - MyDosFreeMem( pDDEData,"DdeInitiateAck" ); - WinPostMsg( hWndServer, WM_DDE_TERMINATE, (MPARAM)hWndServer, 0 ); - return (MRESULT)FALSE; - } - - HWND hWndThis = pParams->hWndReceiver; - // Referenz-Count unseres Client-Windows inkrementieren - IncConversationWndRefCount( hWndThis ); - - HWND hWndSrv = (HWND)(pParams->nPar1); - HSZ hszService = DdeCreateStringHandle( pDDEData->pszAppName, 850 ); - HSZ hszTopic = DdeCreateStringHandle( pDDEData->pszTopic, 850 ); - HSZ hszPartnerApp = GetAppName( hWndSrv ); - - hCurConv = CreateConvHandle( pData, pidThis, hWndThis, hWndSrv, - hszPartnerApp, hszService, hszTopic, 0 ); - - ImpHCONV* pConv = pConvTable; - pConv += (USHORT)hCurConv; - - // HCONV der PartnerApp suchen & bei uns eintragen - pConv->hConvPartner = GetConvHandle( pData, hWndSrv, hWndThis ); - // nicht asserten, da ja non-ddeml-Partner moeglich - // DBG_ASSERT(pConv->hConvPartner,"DDE:Partner not found"); - pConv->nStatus = ST_CONNECTED | ST_CLIENT; - - if( bListConnect ) - { - ////WRITELOG("DdeInitiateAck:ListConnect/Connecting hConvs") - // Status setzen & verketten - pConv->hConvList = hCurListId; - pConv->nPrevHCONV = nPrevConv; - pConv->nStatus |= ST_INLIST; - if( nPrevConv ) - { - pConv = pConvTable; - pConv += nPrevConv; - pConv->nNextHCONV = (USHORT)hCurConv; - } - nPrevConv = (USHORT)hCurConv; - } - - DdeFreeStringHandle( hszService ); - DdeFreeStringHandle( hszTopic ); - DdeFreeStringHandle( hszPartnerApp ); - MyDosFreeMem( pDDEData,"DdeInitiateAck" ); - ////WRITESTATUS("After DdeInitiateAck") - ////WRITELOG("DdeInitiateAck:End") - return (MRESULT)TRUE; -} - -MRESULT ImpDdeMgr::DdePoke( ImpWndProcParams* pParams ) -{ - ////WRITELOG("DdePoke:Received") - HSZ hszItem = 0; - DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2); - HCONV hConv = CheckIncoming( pParams, CBF_FAIL_REQUESTS, hszItem ); - BOOL bSuccess =FALSE; - ImpHCONV* pConv = pConvTable; - pConv += (USHORT)hConv; - if ( hConv && !(nTransactFilter & CBF_FAIL_POKES) && pInDDEData ) - { - if( Callback( XTYP_POKE, pInDDEData->usFormat, hConv, - pConv->hszTopic, hszItem, pInDDEData, 0, 0 ) - == (DDESTRUCT*)DDE_FACK ) - bSuccess = TRUE; - } -#if 0 && defined( OV_DEBUG ) - else - { - WRITELOG("DdePoke:Not processed") - } -#endif - if( pInDDEData ) - { - if( bSuccess ) - pInDDEData->fsStatus |= DDE_FACK; - else - pInDDEData->fsStatus &= (~DDE_FACK); - - MyWinDdePostMsg( pConv->hWndPartner, pConv->hWndThis, WM_DDE_ACK, - pInDDEData, DDEPM_RETRY ); - } - DdeFreeStringHandle( hszItem ); - return (MRESULT)0; -} - -MRESULT ImpDdeMgr::DdeRequest( ImpWndProcParams* pParams ) -{ - ////WRITELOG("DdeRequest:Received") - HSZ hszItem = 0; - DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2); - if( pInDDEData ) - // ist fuer Requests nicht definiert - pInDDEData->fsStatus = 0; - HCONV hConv = CheckIncoming( pParams, CBF_FAIL_REQUESTS, hszItem ); - HWND hWndThis = pParams->hWndReceiver; - HWND hWndClient = (HWND)pParams->nPar1; - if( hConv ) - { - ImpHCONV* pConv = pConvTable; - pConv += (USHORT)hConv; - - DDESTRUCT* pOutDDEData = Callback( XTYP_REQUEST, pInDDEData->usFormat, - hConv, pConv->hszTopic, hszItem, (HDDEDATA)0, 0, 0 ); - - if ( !pOutDDEData ) - { - ////WRITELOG("DdeRequest:Not processed") - pInDDEData->fsStatus &= (~DDE_FACK); - MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY); - } - else - { - ////WRITELOG("DdeRequest:Success") - MyDosFreeMem( pInDDEData,"DdeRequest" ); - pOutDDEData->fsStatus |= DDE_FRESPONSE; - MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_DATA,pOutDDEData,DDEPM_RETRY); - } - } - else - { - pInDDEData->fsStatus &= (~DDE_FACK); - MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY); - } - - DdeFreeStringHandle( hszItem ); - ////WRITELOG("DdeRequest:End") - return (MRESULT)0; -} - - -MRESULT ImpDdeMgr::DdeUnadvise( ImpWndProcParams* pParams ) -{ - ////WRITELOG("DdeUnadvise:Received") - - HSZ hszItem; - HCONV hConv = CheckIncoming( pParams, 0, hszItem ); - DDESTRUCT* pInDDEData = (DDESTRUCT*)(pParams->nPar2); - HWND hWndThis = pParams->hWndReceiver; - HWND hWndClient = (HWND)pParams->nPar1; - USHORT nClosedTransactions = 0; - if( hConv ) - { - USHORT nFormat = pInDDEData->usFormat; - // alle Transaktionen des HCONVs loeschen ? - if( !hszItem ) - { - // App benachrichtigen & Transaktionen loeschen - nClosedTransactions = SendUnadvises( hConv, nFormat, TRUE ); - } - else - { - ULONG nTransId = GetTransaction(pData, hConv, hszItem, nFormat); - if( nTransId ) - { - ////WRITELOG("DdeUnadvise:Transaction found") - Transaction* pTrans = pTransTable; - pTrans += (USHORT)nTransId; - ImpHCONV* pConv = pConvTable; - pConv += (USHORT)hConv; - nClosedTransactions = 1; - if( !(nTransactFilter & CBF_FAIL_ADVISES) ) - Callback( XTYP_ADVSTOP, nFormat, hConv, - pConv->hszTopic, hszItem, 0, 0, 0 ); - if( !pConv->hConvPartner ) - FreeTransaction( pData, nTransId ); - } -#if defined(OV_DEBUG) - else - { - WRITELOG("DdeUnadvise:Transaction not found") - } -#endif - } - } -#if defined(OV_DEBUG) - else - { - WRITELOG("DdeUnadvise:Conversation not found") - } -#endif - - if( !nClosedTransactions ) - pInDDEData->fsStatus &= (~DDE_FACK); - else - pInDDEData->fsStatus |= DDE_FACK; - - MyWinDdePostMsg(hWndClient,hWndThis,WM_DDE_ACK,pInDDEData,DDEPM_RETRY); - DdeFreeStringHandle( hszItem ); - return (MRESULT)0; -} - -BOOL ImpDdeMgr::WaitTransState( Transaction* pTrans, ULONG nTransId, - USHORT nNewState, ULONG nTimeout ) -{ - ////WRITELOG("WaitTransState:Start") - ImpHCONV* pConv = pConvTable; - pConv += pTrans->hConvOwner; - HAB hAB = WinQueryAnchorBlock( pConv->hWndThis ); - ULONG nTimerId = WinStartTimer( hAB, 0, 0, 50 ); - QMSG aQueueMsg; - -// while( WinGetMsg( hAB, &aQueueMsg, 0, 0, 0 ) && -// WinIsWindow( hAB, pConv->hWndPartner) && -// pTrans->nConvst != nNewState ) -// { -// WinDispatchMsg( hAB, &aQueueMsg ); -// } - - BOOL bContinue = TRUE; - while( bContinue ) - { - if( WinGetMsg( hAB, &aQueueMsg, 0, 0, 0 )) - { - WinDispatchMsg( hAB, &aQueueMsg ); - if( (!WinIsWindow( hAB, pConv->hWndPartner)) || - (pTrans->nConvst == nNewState) ) - { - bContinue = FALSE; - } - } - else - bContinue = FALSE; - } - - WinStopTimer( hAB, 0, nTimerId ); - ////WRITELOG("WaitTransState:End") - return TRUE; -} - - - - diff --git a/svl/source/svdde/ddeml2.cxx b/svl/source/svdde/ddeml2.cxx deleted file mode 100644 index 7de4602d12ff..000000000000 --- a/svl/source/svdde/ddeml2.cxx +++ /dev/null @@ -1,1011 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svl.hxx" - -#define INCL_DOS -#include <stdlib.h> - -#include "ddemlimp.hxx" -#define LOGFILE -#define STATUSFILE -#define DDEDATAFILE -#include "ddemldeb.hxx" - -#if defined (OS2) && defined (__BORLANDC__) -#pragma option -w-par -#endif - - -// ************************************************************************ -// Hilfsfunktionen Speicherverwaltung -// ************************************************************************ - -// -// AllocAtomName -// - -PSZ ImpDdeMgr::AllocAtomName( ATOM hString, ULONG& rBufLen ) -{ - HATOMTBL hAtomTable = WinQuerySystemAtomTable(); - ULONG nLen = WinQueryAtomLength( hAtomTable, hString ); - nLen++; - PSZ pBuf = 0; - if ( !MyDosAllocMem( (PPVOID)&pBuf, nLen, PAG_READ|PAG_WRITE|PAG_COMMIT | OBJ_ANY,"Atom" ) ) - { - WinQueryAtomName( hAtomTable, hString, pBuf, nLen ); - rBufLen = nLen; - } - return pBuf; -} - - -// -// MakeDDEObject -// - -PDDESTRUCT ImpDdeMgr::MakeDDEObject( HWND hwnd, ATOM hItemName, - USHORT fsStatus, USHORT usFormat, PVOID pabData, ULONG usDataLen ) -{ - PDDESTRUCT pddes = 0; - ULONG usItemLen; - PULONG pulSharedObj; - //WRITELOG("MakeDDEObject: Start") - - PSZ pItemName = 0; - if( hItemName != NULL ) - pItemName = AllocAtomName( hItemName, usItemLen ); - else - usItemLen = 1; - - ULONG nTotalSize = sizeof(DDESTRUCT) + usItemLen + usDataLen; - - if( !(MyDosAllocSharedMem((PPVOID)&pulSharedObj, NULL, - nTotalSize, - PAG_COMMIT | PAG_READ | PAG_WRITE | OBJ_GETTABLE | OBJ_GIVEABLE | OBJ_ANY, - "MakeDDEObject"))) - { - pddes = (PDDESTRUCT) pulSharedObj; - // siehe "Glenn Puchtel, DDE for OS/2" p.60 - pddes->cbData = (ULONG)usDataLen; - pddes->fsStatus = fsStatus; - pddes->usFormat = usFormat; - pddes->offszItemName = sizeof( DDESTRUCT ); - if( (usDataLen) && (pabData != NULL ) ) - pddes->offabData = sizeof(DDESTRUCT) + usItemLen; - else - pddes->offabData = 0; - - if( pItemName != NULL ) - memcpy(DDES_PSZITEMNAME(pddes), pItemName, usItemLen ); - else - *(DDES_PSZITEMNAME(pddes)) = '\0'; - - if( pabData != NULL ) - memcpy( DDES_PABDATA(pddes), pabData, usDataLen ); - } - - if ( pItemName ) - { - MyDosFreeMem( pItemName,"MakeDDEObject" ); - } - return pddes; -} - -// -// AllocNamedSharedMem -// - -APIRET ImpDdeMgr::AllocNamedSharedMem( PPVOID ppBaseAddress, PSZ pName, - ULONG nElementSize, ULONG nElementCount ) -{ - ULONG nObjSize = (ULONG)(nElementSize * nElementCount ); - nObjSize += sizeof( ULONG ); // fuer ElementCount am Anfang des Blocks - - *ppBaseAddress = 0; - APIRET nRet = MyDosAllocSharedMem( ppBaseAddress, pName, nObjSize, - PAG_READ | PAG_WRITE | PAG_COMMIT | OBJ_ANY, - "AllocNamedSharedMem" ); - if ( !nRet ) - { - memset( *ppBaseAddress, 0, nObjSize ); - ULONG* pULONG = (ULONG*)*ppBaseAddress; - *pULONG = nObjSize; - } - return nRet; -} - -void ImpDdeMgr::CreateServerWnd() -{ - hWndServer = WinCreateWindow( HWND_DESKTOP, WC_FRAME, "DDEServer", 0, - 0,0,0,0, HWND_DESKTOP, HWND_BOTTOM, 0, 0, 0 ); - WinSetWindowULong( hWndServer, 0, (ULONG)this ); - WinSubclassWindow( hWndServer, ::ServerWndProc ); - TID tidDummy; - WinQueryWindowProcess( hWndServer, &pidThis, &tidDummy ); -} - -void ImpDdeMgr::DestroyServerWnd() -{ - WinDestroyWindow( hWndServer ); - hWndServer = NULLHANDLE; -} - -HWND ImpDdeMgr::CreateConversationWnd() -{ - HWND hWnd = WinCreateWindow( HWND_OBJECT, WC_FRAME, "DDEConvWnd", 0, - 0,0,0,0, HWND_DESKTOP, HWND_BOTTOM, 0, 0, 0 ); - if ( hWnd ) - { - ImpConvWndData* pWndData = new ImpConvWndData; - pWndData->pThis = this; - pWndData->nRefCount = 0; - WinSetWindowULong( hWnd, 0, (ULONG)pWndData ); - WinSubclassWindow( hWnd, ::ConvWndProc ); -#if 0 && defined( OV_DEBUG ) - String aStr("ConvWnd created:"); - aStr += (ULONG)hWnd; - WRITELOG((char*)aStr.GetStr()) -#endif - } - else - nLastErrInstance = DMLERR_SYS_ERROR; - - return hWnd; -} - -// static -void ImpDdeMgr::DestroyConversationWnd( HWND hWnd ) -{ - ImpConvWndData* pObj = (ImpConvWndData*)WinQueryWindowULong( hWnd, 0 ); - if( pObj ) - { - pObj->nRefCount--; - if( pObj->nRefCount == 0 - // auch Windows mit Refcount vonm loeschen, da dieser in initial - // auf 0 gesetzt wird - || pObj->nRefCount == (USHORT)-1 ) - { - delete pObj; - WinDestroyWindow( hWnd ); -#if 0 && defined( OV_DEBUG ) - String aStr("ConvWnd destroyed:"); - aStr += (ULONG)hWnd; - WRITELOG((char*)aStr.GetStr()) -#endif - } - else - { -#if 0 && defined( OV_DEBUG ) - String aStr("ConvWnd not destroyed (Refcount="); - aStr += pObj->nRefCount; - aStr += ") "; aStr += (ULONG)hWnd; - WRITELOG((char*)aStr.GetStr()) -#endif - } - } -#if defined( OV_DEBUG ) - else - { - WRITELOG("DestroyCnvWnd:Already destroyed/No win data/Partner died") - } -#endif -} - -// static -USHORT ImpDdeMgr::GetConversationWndRefCount( HWND hWnd ) -{ - ImpConvWndData* pObj = (ImpConvWndData*)WinQueryWindowULong( hWnd, 0 ); - DBG_ASSERT(pObj,"Dde:ConvWnd has no data"); - if( pObj ) - return pObj->nRefCount; - return 0; -} - -// static -USHORT ImpDdeMgr::IncConversationWndRefCount( HWND hWnd ) -{ -#if 0 && defined( OV_DEBUG ) - String aStr("IncConversationWndRefCount "); - aStr += (ULONG)hWnd; - WRITELOG((char*)aStr.GetStr()) -#endif - ImpConvWndData* pObj = (ImpConvWndData*)WinQueryWindowULong( hWnd, 0 ); - DBG_ASSERT(pObj,"Dde:ConvWnd has no data"); - if( pObj ) - { - pObj->nRefCount++; - return pObj->nRefCount; - } - return 0; -} - -ImpDdeMgrData* ImpDdeMgr::InitAll() -{ - ImpDdeMgrData* pBase = 0; - // nur dann neu anlegen, wenn die Tabelle nicht existiert - APIRET nRet=DosGetNamedSharedMem((PPVOID)&pBase,DDEMLDATA,PAG_READ| PAG_WRITE); - if ( nRet ) - { - if ( nRet == 2 ) // ERROR_FILE_NOT_FOUND ) - { - // DDECONVERSATIONCOUNT=4096 - USHORT nConvTransCount = 128; - PSZ pResult; - nRet = DosScanEnv( "SOMAXDDECONN", (const char**)&pResult ); - if( !nRet ) - { - int nTemp = 0; - nTemp = atoi( pResult ); - nTemp++; // der nullte Eintrag wird nicht benutzt - if( nTemp > 128 ) - nConvTransCount = (USHORT)nTemp; - } - ULONG nSize = sizeof(ImpDdeMgrData); - nSize += sizeof(ImpHCONV) * nConvTransCount; - nSize += sizeof(Transaction) * nConvTransCount; - nSize += sizeof(HWND) * DDEMLAPPCOUNT; - - nRet = ImpDdeMgr::AllocNamedSharedMem( (PPVOID)&pBase, - DDEMLDATA, nSize, 1 ); - if ( !nRet ) - { - pBase->nTotalSize = nSize; - ULONG nAppTable = (ULONG)&(pBase->aAppTable); - ULONG nCharBase = (ULONG)pBase; - pBase->nOffsAppTable = nAppTable - nCharBase; - pBase->nOffsConvTable = pBase->nOffsAppTable; - pBase->nOffsConvTable += sizeof(HWND) * DDEMLAPPCOUNT; - pBase->nOffsTransTable = pBase->nOffsConvTable; - pBase->nOffsTransTable += sizeof(ImpHCONV) * nConvTransCount; - - pBase->nMaxAppCount = DDEMLAPPCOUNT; - pBase->nMaxConvCount = nConvTransCount; - pBase->nMaxTransCount = nConvTransCount; - } - } - } - - if( pBase ) - { - pConvTable = ImpDdeMgr::GetConvTable( pBase ); - pTransTable = ImpDdeMgr::GetTransTable( pBase ); - pAppTable = ImpDdeMgr::GetAppTable( pBase ); - } - - memset( &aDefaultContext, 0, sizeof(CONVCONTEXT) ); - aDefaultContext.cb = sizeof(CONVCONTEXT); - aDefaultContext.idCountry = 49; // ?? - aDefaultContext.usCodepage = 850; // ?? - - return pBase; -} - -// static -HCONV ImpDdeMgr::CreateConvHandle( ImpDdeMgrData* pData, - PID pidOwner, - HWND hWndMe, HWND hWndPartner, - HSZ hszPartner, HSZ hszServiceReq, HSZ hszTopic, - HCONV hPrevHCONV ) -{ - DBG_ASSERT(pData,"DDE:Invalid data"); - if( !pData ) - return (HCONV)0; - - ImpHCONV* pPtr = ImpDdeMgr::GetConvTable( pData ); - USHORT nCount = pData->nMaxConvCount; - pPtr++; - nCount--; // ersten Handle (NULLHANDLE) ueberspringen - USHORT nIdx = 1; - DBG_ASSERT(pPtr,"No ConvTable"); - if( !pPtr ) - return (HCONV)0; - - while( nCount && pPtr->hWndThis != (HWND)NULL ) - { - nCount--; - pPtr++; - nIdx++; - } - if( !nCount ) - return (HCONV)0; - - DdeKeepStringHandle( hszPartner ); - DdeKeepStringHandle( hszServiceReq ); - DdeKeepStringHandle( hszTopic ); - pPtr->hszPartner = hszPartner; - pPtr->hszServiceReq = hszServiceReq; - pPtr->hszTopic = hszTopic; - - pPtr->hWndThis = hWndMe; - pPtr->hWndPartner = hWndPartner; - pPtr->pidOwner = pidOwner; - pPtr->hConvPartner = (HCONV)0; - pPtr->nPrevHCONV = (USHORT)hPrevHCONV; - pPtr->nNextHCONV = 0; - pPtr->nStatus = ST_CONNECTED; - - pData->nCurConvCount++; - - return (HCONV)nIdx; -} - -// static -void ImpDdeMgr::FreeConvHandle( ImpDdeMgrData* pBase, HCONV hConv, - BOOL bDestroyHWndThis ) -{ - DBG_ASSERT(pBase,"DDE:No data"); -#if 0 && defined( OV_DEBUG ) - String aStr("FreeConvHandle: Start "); - aStr += (ULONG)hConv; - aStr += " Destroy: "; aStr += (USHORT)bDestroyHWndThis; - WRITELOG((char*)aStr.GetStr()); - WRITESTATUS("FreeConvHandle: Start"); -#endif - if( !pBase ) - { - WRITELOG("FreeConvHandle: FAIL"); - return; - } - DBG_ASSERT(hConv&&hConv<pBase->nMaxConvCount,"DDE:Invalid Conv-Handle"); - if( hConv && hConv < pBase->nMaxConvCount ) - { - ImpHCONV* pTable = ImpDdeMgr::GetConvTable( pBase ); - ImpHCONV* pPtr = pTable + (USHORT)hConv; - if( pPtr->nStatus & ST_INLIST ) - { - // Verkettung umsetzen - USHORT nPrev = pPtr->nPrevHCONV; - USHORT nNext = pPtr->nNextHCONV; - if( nPrev ) - { - pPtr = pTable + nPrev; - pPtr->nNextHCONV = nNext; - } - if( nNext ) - { - pPtr = pTable + nNext; - pPtr->nPrevHCONV = nPrev; - } - pPtr = pTable + (USHORT)hConv; - } - - DdeFreeStringHandle( pPtr->hszPartner ); - DdeFreeStringHandle( pPtr->hszServiceReq ); - DdeFreeStringHandle( pPtr->hszTopic ); - if( bDestroyHWndThis ) - DestroyConversationWnd( pPtr->hWndThis ); - memset( pPtr, 0, sizeof(ImpHCONV) ); - DBG_ASSERT(pBase->nCurConvCount,"Dde:Invalid Trans. count"); - pBase->nCurConvCount--; - } -#if defined(OV_DEBUG) - else - { - WRITELOG("FreeConvHandle: FAIL"); - } -#endif - //WRITELOG("FreeConvHandle: END"); - //WRITESTATUS("FreeConvHandle: End"); -} - -// static -HCONV ImpDdeMgr::IsConvHandleAvailable( ImpDdeMgrData* pBase ) -{ - DBG_ASSERT(pBase,"DDE:No data"); - if( !pBase ) - return 0; - - ImpHCONV* pPtr = ImpDdeMgr::GetConvTable( pBase ); - USHORT nCurPos = pBase->nMaxConvCount - 1; - pPtr += nCurPos; // von hinten aufrollen - while( nCurPos >= 1 ) - { - if( pPtr->hWndThis == 0 ) - return TRUE; - pPtr--; - nCurPos--; - } - return FALSE; -} - -// static -HCONV ImpDdeMgr::GetConvHandle( ImpDdeMgrData* pBase, HWND hWndThis, - HWND hWndPartner ) -{ - DBG_ASSERT(pBase,"DDE:No data"); - if( !pBase ) - return 0; - ImpHCONV* pPtr = ImpDdeMgr::GetConvTable( pBase ); - USHORT nCurPos = 1; - pPtr++; // ersten Handle ueberspringen - USHORT nCurConvCount = pBase->nCurConvCount; - while( nCurConvCount && nCurPos < pBase->nMaxConvCount ) - { - if( pPtr->hWndThis ) - { - if(pPtr->hWndThis == hWndThis && pPtr->hWndPartner == hWndPartner) - return (HCONV)nCurPos; - nCurConvCount--; - if( !nCurConvCount ) - return (HCONV)0; - } - nCurPos++; - pPtr++; - } - return (HCONV)0; -} - - - -// static -ULONG ImpDdeMgr::CreateTransaction( ImpDdeMgrData* pBase, HCONV hOwner, - HSZ hszItem, USHORT nFormat, USHORT nTransactionType ) -{ - DBG_ASSERT(pBase,"DDE:No Data"); - DBG_ASSERT(hOwner!=0,"DDE:No Owner"); - - if( pBase && hOwner ) - { - Transaction* pPtr = ImpDdeMgr::GetTransTable( pBase ); - DBG_ASSERT(pPtr->hConvOwner==0,"DDE:Data corrupted"); - USHORT nId = 1; - pPtr++; - while( nId < pBase->nMaxTransCount ) - { - if( pPtr->hConvOwner == (HCONV)0 ) - { - pPtr->hConvOwner = hOwner; - DdeKeepStringHandle( hszItem ); - pPtr->hszItem = hszItem; - pPtr->nType = nTransactionType; - pPtr->nConvst = XST_CONNECTED; - pPtr->nFormat = nFormat; - pBase->nCurTransCount++; - return (ULONG)nId; - } - nId++; - pPtr++; - } - } - return 0; -} - -// static -void ImpDdeMgr::FreeTransaction( ImpDdeMgrData* pBase, ULONG nTransId ) -{ - DBG_ASSERT(pBase,"DDE:No Data"); - if( !pBase ) - return; - - DBG_ASSERT(nTransId<pBase->nMaxTransCount,"DDE:Invalid TransactionId"); - if( nTransId >= pBase->nMaxTransCount ) - return; - - Transaction* pPtr = ImpDdeMgr::GetTransTable( pBase ); - pPtr += nTransId; - DBG_ASSERT(pPtr->hConvOwner!=0,"DDE:TransId has no owner"); - if( pPtr->hConvOwner ) - { - //WRITELOG("Freeing transaction"); - DdeFreeStringHandle( pPtr->hszItem ); - memset( pPtr, 0, sizeof(Transaction) ); - DBG_ASSERT(pBase->nCurTransCount,"Dde:Invalid Trans. count"); - pBase->nCurTransCount--; - } -} - -// static -ULONG ImpDdeMgr::GetTransaction( ImpDdeMgrData* pBase, - HCONV hOwner, HSZ hszItem, USHORT nFormat ) -{ - DBG_ASSERT(pBase,"DDE:No Data"); - if( !pBase || !hOwner ) - return 0; - - Transaction* pTrans = ImpDdeMgr::GetTransTable( pBase ); - DBG_ASSERT(pTrans,"DDE:No TransactionTable"); - if( !pTrans ) - return 0; - pTrans++; // NULLHANDLE ueberspringen - - ImpHCONV* pConv = ImpDdeMgr::GetConvTable( pBase ); - pConv += (USHORT)hOwner; - HCONV hConvPartner = pConv->hConvPartner; - - USHORT nCurTransCount = pBase->nCurTransCount; - for( USHORT nTrans=1; nTrans< pBase->nMaxTransCount; nTrans++, pTrans++ ) - { - if( pTrans->hConvOwner ) - { - if(( pTrans->hConvOwner == hOwner || - pTrans->hConvOwner == hConvPartner) && - pTrans->nFormat == nFormat && - pTrans->hszItem == hszItem ) - { - // gefunden! - return (ULONG)nTrans; - } - nCurTransCount--; - if( !nCurTransCount ) - return 0; - } - } - return 0; // narda -} - -// static -HSZ ImpDdeMgr::DdeCreateStringHandle( PSZ pszString, int iCodePage) -{ - if( !pszString || *pszString == '\0' ) - return (HSZ)0; - // Atom-Table beachtet Gross/Kleinschreibung, DDEML aber nicht - - // OV 12.4.96: Services,Topics,Items case-sensitiv!!! - // (Grosskundenanforderung (Reuter-DDE)) - //strlwr( pszString ); - //*pszString = (char)toupper(*pszString); - - HATOMTBL hAtomTable = WinQuerySystemAtomTable(); - ATOM aAtom = WinAddAtom( hAtomTable, pszString ); - return (HSZ)aAtom; -} - -// static -ULONG ImpDdeMgr::DdeQueryString( HSZ hszStr, PSZ pszStr, ULONG cchMax, int iCodePage) -{ - HATOMTBL hAtomTable = WinQuerySystemAtomTable(); - if ( !pszStr ) - return WinQueryAtomLength( hAtomTable, (ATOM)hszStr); - else - { - *pszStr = 0; - return WinQueryAtomName( hAtomTable, (ATOM)hszStr, pszStr, cchMax ); - } -} - -// static -BOOL ImpDdeMgr::DdeFreeStringHandle( HSZ hsz ) -{ - if( !hsz ) - return FALSE; - ATOM aResult = WinDeleteAtom( WinQuerySystemAtomTable(),(ATOM)hsz ); - return (BOOL)(aResult==0); -} - -// static -BOOL ImpDdeMgr::DdeKeepStringHandle( HSZ hsz ) -{ - if( !hsz ) - return TRUE; - HATOMTBL hAtomTable = WinQuerySystemAtomTable(); -#ifdef DBG_UTIL - ULONG nUsageCount=WinQueryAtomUsage(hAtomTable,(ATOM)hsz); -#endif - ULONG nAtom = 0xFFFF0000; - ULONG nPar = (ULONG)hsz; - nAtom |= nPar; - ATOM aAtom = WinAddAtom( hAtomTable, (PSZ)nAtom ); -#ifdef DBG_UTIL - if ( aAtom ) - DBG_ASSERT(WinQueryAtomUsage(hAtomTable,(ATOM)hsz)==nUsageCount+1,"Keep failed"); -#endif - return (BOOL)(aAtom!=0); -} - - -// static -int ImpDdeMgr::DdeCmpStringHandles(HSZ hsz1, HSZ hsz2) -{ - if ( hsz1 == hsz2 ) - return 0; - if ( hsz1 < hsz2 ) - return -1; - return 1; -} - -HDDEDATA ImpDdeMgr::DdeCreateDataHandle( void* pSrc, ULONG cb, - ULONG cbOff, HSZ hszItem, USHORT wFmt, USHORT afCmd) -{ - char* pData = (char*)pSrc; - pData += cbOff; - USHORT nStatus; - if( afCmd & HDATA_APPOWNED ) - nStatus = IMP_HDATAAPPOWNED; - else - nStatus = 0; - PDDESTRUCT hData=MakeDDEObject(0,(ATOM)hszItem,nStatus,wFmt,pData,cb); -// WRITEDATA(hData) - if ( !hData ) - ImpDdeMgr::nLastErrInstance = DMLERR_INVALIDPARAMETER; - return (HDDEDATA)hData; -} - -// static -BYTE* ImpDdeMgr::DdeAccessData(HDDEDATA hData, ULONG* pcbDataSize) -{ - BYTE* pRet = 0; - *pcbDataSize = 0; - if ( hData ) - { - pRet = (BYTE*)hData; - pRet += hData->offabData; - ULONG nLen = hData->cbData; - // nLen -= hData->offabData; - *pcbDataSize = nLen; - } - else - ImpDdeMgr::nLastErrInstance = DMLERR_INVALIDPARAMETER; - return pRet; -} - -// static -BOOL ImpDdeMgr::DdeUnaccessData(HDDEDATA hData) -{ - return TRUE; // nothing to do for us -} - -// static -BOOL ImpDdeMgr::DdeFreeDataHandle(HDDEDATA hData) -{ - DdeUnaccessData( hData ); - MyDosFreeMem( (PSZ)hData, "DdeFreeDataHandle" ); - return TRUE; -} - -// static -HDDEDATA ImpDdeMgr::DdeAddData(HDDEDATA hData,void* pSrc,ULONG cb,ULONG cbOff) -{ - return (HDDEDATA)0; -} - -// static -ULONG ImpDdeMgr::DdeGetData(HDDEDATA hData,void* pDst,ULONG cbMax,ULONG cbOff) -{ - return 0; -} - -BOOL ImpDdeMgr::DisconnectAll() -{ - //WRITESTATUS("Before DisconnectAll()") - USHORT nCurConvCount = pData->nCurConvCount; - if( !nCurConvCount ) - return TRUE; - - BOOL bRet = TRUE; - ImpHCONV* pPtr = pConvTable; - pPtr++; - - for( USHORT nPos=1; nPos < pData->nMaxConvCount; nPos++, pPtr++ ) - { - if( pPtr->hWndThis ) - { - if( !DdeDisconnect( (HCONV)nPos ) ) - bRet = FALSE; - nCurConvCount--; - if( !nCurConvCount ) - break; - } - } - //WRITESTATUS("After DisconnectAll()") - return bRet; -} - -// static -void ImpDdeMgr::FreeTransactions( ImpDdeMgrData* pData,HWND hWndThis, - HWND hWndPartner ) -{ - USHORT nCurTransCount = pData->nCurTransCount; - if( !nCurTransCount ) - return; - - Transaction* pTrans = GetTransTable( pData ); - ImpHCONV* pConvTable = GetConvTable( pData ); - pTrans++; - for( USHORT nPos=1; nPos < pData->nMaxTransCount; nPos++, pTrans++ ) - { - if( pTrans->hConvOwner ) - { - ImpHCONV* pConv = pConvTable + (USHORT)(pTrans->hConvOwner); - if((pConv->hWndThis==hWndThis&& pConv->hWndPartner==hWndPartner)|| - (pConv->hWndThis==hWndPartner && pConv->hWndPartner==hWndThis)) - { - FreeTransaction( pData, (ULONG)nPos ); - } - nCurTransCount--; - if( !nCurTransCount ) - return; - } - } -} - -// static -void ImpDdeMgr::FreeTransactions( ImpDdeMgrData* pData, HCONV hConvOwner ) -{ - USHORT nCurTransCount = pData->nCurTransCount; - if( !nCurTransCount ) - return; - - Transaction* pTrans = GetTransTable( pData ); -// ImpHCONV* pConvTable = GetConvTable( pData ); - pTrans++; - for( USHORT nPos=1; nPos < pData->nMaxTransCount; nPos++, pTrans++ ) - { - if( pTrans->hConvOwner == hConvOwner ) - { - FreeTransaction( pData, (ULONG)nPos ); - nCurTransCount--; - if( !nCurTransCount ) - return; - } - } -} - -// static -void ImpDdeMgr::FreeConversations( ImpDdeMgrData* pData, HWND hWndThis, - HWND hWndPartner ) -{ - USHORT nCurCount = pData->nCurConvCount; - if( !nCurCount ) - return; - - ImpHCONV* pPtr = GetConvTable( pData ); - pPtr++; - for( USHORT nPos=1; nPos < pData->nMaxConvCount; nPos++, pPtr++ ) - { - if( pPtr->hWndThis ) - { - if( hWndThis && pPtr->hWndPartner==hWndPartner ) - FreeConvHandle( pData, (HCONV)nPos ); - nCurCount--; - if( !nCurCount ) - return; - } - } -} - - -BOOL ImpDdeMgr::OwnsConversationHandles() -{ - //WRITESTATUS("OwnsConversationHandles()"); -#if 0 && defined( OV_DEBUG ) - String aStr("OwnsConversationHandles Server:"); - aStr += (ULONG)hWndServer; - WRITELOG((char*)aStr.GetStr()) -#endif - ImpHCONV* pPtr = GetConvTable( pData ); - for( USHORT nCur = 1; nCur < pData->nMaxConvCount; nCur++, pPtr++ ) - { - if( pPtr->hWndThis && pPtr->pidOwner == pidThis ) - { - //WRITELOG("OwnsConversationHandles: TRUE"); - return TRUE; - } - } - // WRITELOG("OwnsConversationHandles: FALSE"); - return FALSE; -} - - - -// ********************************************************************* -// ********************************************************************* -// ********************************************************************* - -USHORT DdeInitialize(ULONG* pidInst, PFNCALLBACK pfnCallback, - ULONG afCmd, ULONG ulRes) -{ - if( (*pidInst)!=0 ) - { - // Reinitialize wird noch nicht unterstuetzt - DBG_ASSERT(0,"DDEML:Reinitialize not supported"); - return DMLERR_INVALIDPARAMETER; - } - - ImpDdeMgr* pMgr = new ImpDdeMgr; - *pidInst = (ULONG)pMgr; - return pMgr->DdeInitialize( pfnCallback, afCmd ); -} - -BOOL DdeUninitialize(ULONG idInst) -{ - if( !idInst ) - return FALSE; - ImpDdeMgr* pMgr = (ImpDdeMgr*)idInst; - // nur loeschen, wenn wir nicht mehr benutzt werden! - if( !pMgr->OwnsConversationHandles() ) - { - WRITELOG("DdeUninitialize: TRUE"); - delete pMgr; - return TRUE; - } - WRITELOG("DdeUninitialize: FALSE"); - return FALSE; -} - - -HCONVLIST DdeConnectList(ULONG idInst, HSZ hszService, HSZ hszTopic, - HCONVLIST hConvList, CONVCONTEXT* pCC) -{ - if( !idInst ) - return 0; - return ((ImpDdeMgr*)idInst)->DdeConnectList(hszService,hszTopic, - hConvList, pCC ); -} - -HCONV DdeQueryNextServer(HCONVLIST hConvList, HCONV hConvPrev) -{ - return ImpDdeMgr::DdeQueryNextServer( hConvList, hConvPrev ); -} - -BOOL DdeDisconnectList(HCONVLIST hConvList) -{ - return ImpDdeMgr::DdeDisconnectList( hConvList ); -} - -HCONV DdeConnect(ULONG idInst, HSZ hszService, HSZ hszTopic, - CONVCONTEXT* pCC) -{ - if( !idInst ) - return 0; - return ((ImpDdeMgr*)idInst)->DdeConnect( hszService, hszTopic, pCC ); -} - -BOOL DdeDisconnect(HCONV hConv) -{ - return ImpDdeMgr::DdeDisconnect( hConv ); -} - -HCONV DdeReconnect(HCONV hConv) -{ - return ImpDdeMgr::DdeReconnect( hConv ); -} - - -USHORT DdeQueryConvInfo(HCONV hConv, ULONG idTransact, CONVINFO* pCI ) -{ - return ImpDdeMgr::DdeQueryConvInfo( hConv, idTransact, pCI ); -} - -BOOL DdeSetUserHandle(HCONV hConv, ULONG id, ULONG hUser) -{ - return ImpDdeMgr::DdeSetUserHandle( hConv, id, hUser ); -} - -BOOL DdeAbandonTransaction(ULONG idInst, HCONV hConv, ULONG idTransaction) -{ - if( !idInst ) - return FALSE; - return ((ImpDdeMgr*)idInst)->DdeAbandonTransaction(hConv,idTransaction); -} - -BOOL DdePostAdvise(ULONG idInst, HSZ hszTopic, HSZ hszItem) -{ - if( !idInst ) - return FALSE; - return ((ImpDdeMgr*)idInst)->DdePostAdvise( hszTopic, hszItem ); -} - -BOOL DdeEnableCallback(ULONG idInst, HCONV hConv, USHORT wCmd) -{ - if( !idInst ) - return FALSE; - return ((ImpDdeMgr*)idInst)->DdeEnableCallback( hConv, wCmd ); -} - -HDDEDATA DdeClientTransaction(void* pData, ULONG cbData, - HCONV hConv, HSZ hszItem, USHORT wFmt, USHORT wType, - ULONG dwTimeout, ULONG* pdwResult) -{ - return ImpDdeMgr::DdeClientTransaction( pData, cbData, - hConv, hszItem, wFmt, wType, dwTimeout, pdwResult ); -} - -HDDEDATA DdeCreateDataHandle(ULONG idInst, void* pSrc, ULONG cb, - ULONG cbOff, HSZ hszItem, USHORT wFmt, USHORT afCmd) -{ - if( !idInst ) - return 0; - return ((ImpDdeMgr*)idInst)->DdeCreateDataHandle( pSrc, cb, - cbOff, hszItem, wFmt, afCmd ); -} - -HDDEDATA DdeAddData(HDDEDATA hData, void* pSrc, ULONG cb, ULONG cbOff) -{ - return ImpDdeMgr::DdeAddData( hData, pSrc, cb, cbOff ); -} - -ULONG DdeGetData(HDDEDATA hData, void* pDst, ULONG cbMax, ULONG cbOff) -{ - return ImpDdeMgr::DdeGetData( hData, pDst, cbMax, cbOff ); -} - -BYTE* DdeAccessData(HDDEDATA hData, ULONG* pcbDataSize) -{ - return ImpDdeMgr::DdeAccessData( hData, pcbDataSize ); -} - -BOOL DdeUnaccessData(HDDEDATA hData) -{ - return ImpDdeMgr::DdeUnaccessData( hData ); -} - -BOOL DdeFreeDataHandle(HDDEDATA hData) -{ - return ImpDdeMgr::DdeFreeDataHandle( hData ); -} - -USHORT DdeGetLastError(ULONG idInst) -{ - if( !idInst ) - return DMLERR_DLL_NOT_INITIALIZED; - return ((ImpDdeMgr*)idInst)->DdeGetLastError(); -} - -HSZ DdeCreateStringHandle(ULONG idInst, PSZ pszString,int iCodePage ) -{ - if( !idInst ) - return 0; - return ((ImpDdeMgr*)idInst)->DdeCreateStringHandle(pszString,iCodePage); -} - -ULONG DdeQueryString( ULONG idInst, HSZ hsz, PSZ pBuf, - ULONG cchMax, int iCodePage ) -{ - if( !idInst ) - return 0; - return ((ImpDdeMgr*)idInst)->DdeQueryString( hsz,pBuf,cchMax,iCodePage); -} - -BOOL DdeFreeStringHandle( ULONG idInst, HSZ hsz) -{ - if( !idInst ) - return FALSE; - return ((ImpDdeMgr*)idInst)->DdeFreeStringHandle( hsz ); -} - -BOOL DdeKeepStringHandle( ULONG idInst, HSZ hsz ) -{ - if( !idInst ) - return FALSE; - return ((ImpDdeMgr*)idInst)->DdeKeepStringHandle( hsz ); -} - -int DdeCmpStringHandles(HSZ hsz1, HSZ hsz2) -{ - return ImpDdeMgr::DdeCmpStringHandles( hsz1, hsz2 ); -} - -HDDEDATA DdeNameService( ULONG idInst, HSZ hsz1, HSZ hszRes, USHORT afCmd ) -{ - if( !idInst ) - return 0; - return ((ImpDdeMgr*)idInst)->DdeNameService( hsz1, afCmd ); -} - - diff --git a/svl/source/svdde/ddemldeb.cxx b/svl/source/svdde/ddemldeb.cxx deleted file mode 100644 index f921e93d2e9c..000000000000 --- a/svl/source/svdde/ddemldeb.cxx +++ /dev/null @@ -1,280 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svl.hxx" - -#include "ddemlimp.hxx" - -#ifdef OV_DEBUG -#include <svgen.hxx> -#endif - -#if defined(OV_DEBUG) - -void ImpAddHSZ( HSZ hszString, String& rStr ) -{ - char aBuf[ 128 ]; - ImpDdeMgr::DdeQueryString( hszString,aBuf,sizeof(aBuf),850); - rStr += " (\""; rStr += aBuf; rStr += "\","; - HATOMTBL hAtomTable = WinQuerySystemAtomTable(); - ULONG nRefCount = 0; - if( hszString ) - nRefCount = WinQueryAtomUsage(hAtomTable, (ATOM)hszString ); - rStr += nRefCount; rStr += ')'; -} - - -void ImpWriteDdeStatus(char* aFilename, char* pAppContext) -{ - char aBuf[ 128 ]; - USHORT nCtr; - HWND* pAppPtr; - ImpHCONV* pConvPtr; - Transaction* pTransPtr; - - ImpDdeMgrData* pData = ImpDdeMgr::AccessMgrData(); - if( !pData ) - return; - SvFileStream aStrm(aFilename, STREAM_READWRITE ); - String aLine; - aStrm.Seek( STREAM_SEEK_TO_END ); - aStrm << endl; - aStrm.WriteLine("********************** DDEML-Log ***********************"); - aStrm << endl; - if( pAppContext ) - { - aLine = Application::GetAppName(); - aLine += ':'; - aLine += "App-Context:"; aLine += pAppContext; - aStrm.WriteLine( aLine ); aStrm << endl; - } - aStrm.WriteLine("----------------- ImpDdeMgrData -------------------"); - aStrm << endl; - aLine= "TotalSize :"; aLine+= pData->nTotalSize; aStrm.WriteLine(aLine); - aLine= "nOffsAppTable :"; aLine+= pData->nOffsAppTable; aStrm.WriteLine(aLine); - aLine= "nOffsConvTable :"; aLine+= pData->nOffsConvTable; aStrm.WriteLine(aLine); - aLine= "nOffsTransTable:"; aLine+= pData->nOffsTransTable; aStrm.WriteLine(aLine); - aLine= "nMaxAppCount :"; aLine+= pData->nMaxAppCount; aStrm.WriteLine(aLine); - aLine= "nMaxConvCount :"; aLine+= pData->nMaxConvCount; aStrm.WriteLine(aLine); - aLine= "nMaxTransCount :"; aLine+= pData->nMaxTransCount; aStrm.WriteLine(aLine); - aLine= "nLastErr :"; aLine+= pData->nLastErr; aStrm.WriteLine(aLine); - aLine= "nCurConvCount :"; aLine+= pData->nCurConvCount; aStrm.WriteLine(aLine); - aLine= "nCurTransCount :"; aLine+= pData->nCurTransCount; aStrm.WriteLine(aLine); - aStrm << endl; - aStrm.WriteLine("---------- Registered DDEML-Applications -----------"); - aStrm << endl; - pAppPtr = ImpDdeMgr::GetAppTable( pData ); - for( nCtr = 0; nCtr < pData->nMaxAppCount; nCtr++, pAppPtr++ ) - { - if( *pAppPtr ) - { - aLine = "App."; aLine += nCtr; aLine += " HWND:"; - aLine += (ULONG)*pAppPtr; aStrm.WriteLine(aLine); - } - } - - aStrm << endl; - aStrm.WriteLine("-------------- Conversation handles ----------------"); - aStrm << endl; - - USHORT nCurCount = pData->nCurConvCount; - - if( nCurCount ) - { - pConvPtr = ImpDdeMgr::GetConvTable( pData ); - for( nCtr = 0; nCtr < pData->nMaxConvCount; nCtr++, pConvPtr++ ) - { - if( pConvPtr->hWndThis ) - { - aLine = "HCONV:"; aLine += nCtr; - aLine += " HCONVpartner: "; aLine += (USHORT)pConvPtr->hConvPartner; - if( !pConvPtr->hConvPartner ) aLine += "(Non-DDEML-App)"; - aLine += " hszPartner: "; aLine += (USHORT)pConvPtr->hszPartner; - ImpAddHSZ( pConvPtr->hszPartner, aLine ); - aStrm.WriteLine( aLine ); - - aLine = "hszService: "; aLine += (USHORT)pConvPtr->hszServiceReq; - ImpAddHSZ( pConvPtr->hszServiceReq, aLine ); - aLine += " hszTopic: "; aLine += (USHORT)pConvPtr->hszTopic; - ImpAddHSZ( pConvPtr->hszTopic, aLine ); - aStrm.WriteLine( aLine ); - - aLine= "Status: "; aLine+= pConvPtr->nStatus; - if( pConvPtr->nStatus & ST_CLIENT ) aLine += " (Client)"; - if( pConvPtr->nStatus & ST_INLIST ) aLine += " (Inlist)"; - aStrm.WriteLine(aLine); - - aLine = "pidOwner: "; aLine += (ULONG)pConvPtr->pidOwner; - aStrm.WriteLine( aLine ); - aLine = "hWndThis: "; aLine += (ULONG)pConvPtr->hWndThis; - aStrm.WriteLine( aLine ); - aLine = "hWndPartner: "; aLine += (ULONG)pConvPtr->hWndPartner; - aStrm.WriteLine( aLine ); - - aLine = "hConvList: "; aLine += (ULONG)pConvPtr->hConvList; - aLine += " Prev: "; aLine += pConvPtr->nPrevHCONV; - aLine += " Next: "; aLine += pConvPtr->nNextHCONV; - aStrm.WriteLine( aLine ); - aStrm.WriteLine("----------------------------------------------------"); - - nCurCount--; - if( !nCurCount ) - break; - } - } - } - - aStrm.WriteLine("----------------- Transaction Ids ------------------"); - - nCurCount = pData->nCurTransCount; - if( nCurCount ) - { - pTransPtr = ImpDdeMgr::GetTransTable( pData ); - for( nCtr = 0; nCtr < pData->nMaxTransCount; nCtr++, pTransPtr++ ) - { - - if( pTransPtr->hConvOwner ) - { - aLine = "TransactionId:"; aLine += nCtr; - aLine += " hConvOwner: "; aLine += (USHORT)pTransPtr->hConvOwner; - aStrm.WriteLine( aLine ); - aLine = "Item: "; aLine += (USHORT)pTransPtr->hszItem; - ImpAddHSZ( pTransPtr->hszItem, aLine ); - aLine += " Format: "; aLine += pTransPtr->nFormat; - aStrm.WriteLine( aLine ); - aLine = "TransactionType: "; aLine += pTransPtr->nType; - aLine += " Convst: "; aLine += pTransPtr->nConvst; - aLine += " LastErr: "; aLine += pTransPtr->nLastError; - aLine += " Userhandle: "; aLine += pTransPtr->nUser; - aStrm.WriteLine( aLine ); - aStrm.WriteLine("--------------------------------------------------"); - - nCurCount--; - if( !nCurCount ) - break; - } - } - } - aStrm << endl; - aStrm.WriteLine("******************* End of DDEML-Log *******************"); -} - -void ImpWriteDdeData(char* aFilename, DDESTRUCT* pData) -{ - char aBuf[ 128 ]; - USHORT nCtr; - SvFileStream aStrm(aFilename, STREAM_READWRITE ); - aStrm.Seek( STREAM_SEEK_TO_END ); - String aLine; - aStrm << endl; - aLine = "cbData:"; aLine += pData->cbData; aStrm.WriteLine( aLine ); - aLine = "fsStatus:"; aLine += pData->fsStatus; aStrm.WriteLine( aLine ); - aLine = "usFormat:"; aLine += pData->usFormat; aStrm.WriteLine( aLine ); - aLine = "ItemName:"; aLine += (char*)((char*)pData+pData->offszItemName); - aStrm.WriteLine( aLine ); - aLine = "offabData:"; aLine += pData->offabData; aStrm.WriteLine(aLine); - char* pBuf = (char*)pData+pData->offabData; - USHORT nLen = pData->cbData; // - pData->offabData; - while( nLen ) - { - aStrm << *pBuf; - nLen--; - pBuf++; - } - aStrm << endl; -} - -void ImpWriteLogFile(char* pFilename, char* pStr) -{ - SvFileStream aStrm(pFilename, STREAM_READWRITE ); - aStrm.Seek( STREAM_SEEK_TO_END ); - String aStr( Application::GetAppName() ); - aStr += ':'; aStr += pStr; - aStrm.WriteLine( (char*)aStr.GetStr() ); -} - -#else - -void ImpWriteDdeStatus(char*, char* ) {} -void ImpWriteDdeData(char*, DDESTRUCT*) {} -void ImpWriteLogFile(char*, char*) {} - -#endif - -APIRET MyDosAllocSharedMem(void** ppBaseAddress, char* pszName, unsigned long ulObjectSize, - unsigned long ulFlags, char* pContextStr ) -{ - APIRET nRet = DosAllocSharedMem(ppBaseAddress,pszName,ulObjectSize,ulFlags ); -#if 0 && defined(OV_DEBUG) && defined(LOGFILE) - String aStr("DosAllocSharedMem:"); - aStr += pContextStr; - aStr += ": "; - aStr += ulObjectSize; - aStr += " ("; - aStr += (ULONG)*((char**)ppBaseAddress); - aStr += ')'; - ImpWriteLogFile("\\ddeml.mem", (char*)aStr.GetStr() ); -#endif - return nRet; -} - -APIRET MyDosAllocMem(void** ppBaseAddress, unsigned long ulObjectSize, - unsigned long ulFlags, char* pContextStr ) -{ - APIRET nRet = DosAllocMem(ppBaseAddress, ulObjectSize,ulFlags ); -#if 0 && defined(OV_DEBUG) && defined(LOGFILE) - String aStr("DosAllocMem:"); - aStr += pContextStr; - aStr += ": "; - aStr += ulObjectSize; - aStr += " ("; - aStr += (ULONG)*((char**)ppBaseAddress); - aStr += ')'; - ImpWriteLogFile("\\ddeml.mem", (char*)aStr.GetStr() ); -#endif - return nRet; -} - - -APIRET MyDosFreeMem( void* pBaseAddress, char* pContextStr ) -{ - APIRET nRet = DosFreeMem( pBaseAddress ); -#if 0 && defined(OV_DEBUG) && defined(LOGFILE) - String aStr("DosFreeMem:"); - aStr += pContextStr; - aStr += ": "; - aStr += (ULONG)pBaseAddress; - ImpWriteLogFile("\\ddeml.mem", (char*)aStr.GetStr()); -#endif - return nRet; -} - - - - - diff --git a/svl/source/svdde/ddemldeb.hxx b/svl/source/svdde/ddemldeb.hxx deleted file mode 100644 index 8654bbd3ca65..000000000000 --- a/svl/source/svdde/ddemldeb.hxx +++ /dev/null @@ -1,66 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#if defined(OV_DEBUG) - -void ImpWriteLogFile(char*,char*); -void ImpAddHSZ( HSZ, String& ); -void ImpWriteDdeStatus(char*, char* ); -void ImpWriteDdeData(char*, DDESTRUCT*); - -#ifdef LOGFILE -#define WRITELOG(aString) ImpWriteLogFile("\\ddeml.log",aString); -#else -#define WRITELOG(bla) -#endif -#ifdef STATUSFILE -#define WRITESTATUS(aContext) ImpWriteDdeStatus("\\ddeml.sts",aContext); -#else -#define WRITESTATUS(bla) -#endif -#ifdef DDEDATAFILE -#define WRITEDATA(data) ImpWriteDdeData("\\ddeml.dat",data); -#else -#define WRITEDATA(bla) -#endif - -#else - -#define WRITELOG(bla) -#define WRITESTATUS(bla) -#define WRITEDATA(bla) - -#endif - -APIRET MyDosAllocSharedMem(void** ppBaseAddress, char* pszName, unsigned long ulObjectSize, - unsigned long ulFlags, char* pContextStr ); - -APIRET MyDosAllocMem(void** ppBaseAddress, unsigned long ulObjectSize, - unsigned long ulFlags, char* pContextStr ); - -APIRET MyDosFreeMem( void* pBaseAddress, char* pContextStr ); - diff --git a/svl/source/svdde/ddemlimp.hxx b/svl/source/svdde/ddemlimp.hxx deleted file mode 100644 index 28c4bf248bbe..000000000000 --- a/svl/source/svdde/ddemlimp.hxx +++ /dev/null @@ -1,433 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _DDEMLIMP_HXX -#define _DDEMLIMP_HXX - - -#include <string.h> -#include <ctype.h> -#include "ddemlos2.h" - -#define DDEMLSERVICETABLE_INISIZE 8 - -// Bezeichner der systemglobalen DDEML-Tabelle -#define DDEMLDATA "\\SHAREMEM\\OV_DDEML.DAT" - -// vorlaeufig konstante Tabellengroessen -#define CONVTABLECOUNT 2048 /* max count conversations */ -#define TRANSTABLECOUNT 2048 /* transactions */ -#define DDEMLAPPCOUNT 16 /* max count simultaniously running */ - /* ddeml (StarDivision) applications */ - -#define ST_TERMACKREC 0x8000 /* wird im Conversationhandle gesetzt, */ - /* wenn die Partner-App DDE_TERMINATE */ - /* bestaetigt hat */ - -#define XST_TIMEOUT 17 /* Trans. hat Timeout ueberschritten */ -#define XST_WAITING_ACK 18 /* Trans. wartet auf Acknowledge */ -#define XST_WAITING_ADVDATA 19 /* Trans. wartet auf Advise-Daten */ -#define XST_WAITING_REQDATA 20 /* Trans. wartet auf angeforderte Daten */ - - -/* User-Flags DDESTRUCT */ -#define IMP_HDATAAPPOWNED 0x8000 - -#define CONVLISTNAME "DdeConvListId" - -#define XTYPF_MASK (XTYPF_NOBLOCK | XTYPF_NODATA | XTYPF_ACKREQ) - -// -// DDEML-Messages; werden nur an registrierte DDEML-Apps gesendet -// - -// Msg: WM_DDEML_REGISTER -// Empfaenger: wird allen DDEML-Applikationen nach Registrierung -// eines neuen Services gesendet -// Params: nPar1: hszBaseServName -// nPar2: hszInstServName -#define WM_DDEML_REGISTER WM_USER+1 - -// Msg: WM_DDEML_UNREGISTER -// Empfaenger: wird allen DDEML-Applikationen nach Deregistrierung -// eines Services gesendet -// Params: nPar1: hszBaseServName -// nPar2: hszInstServName -#define WM_DDEML_UNREGISTER WM_USER+2 - -// -// -// - -struct ImpHCONV -{ - HCONV hConvPartner; - HSZ hszPartner; // Name of partner application - HSZ hszServiceReq; // Service name - HSZ hszTopic; // Topic name - USHORT nStatus; // ST_* of conversation - HCONVLIST hConvList; // ConvListId , wenn in ConvList - CONVCONTEXT aConvContext; // Conversation context - - // private - HWND hWndThis; // 0 == Handle not used - HWND hWndPartner; - PID pidOwner; // PID des DdeManagers, der - // den Conv-Handle erzeugt hat. - USHORT nPrevHCONV; // 0 == no previous hConv or not in list - USHORT nNextHCONV; // 0 == no next hconv or not in list -}; - -struct Transaction -{ - HSZ hszItem; // Item name - USHORT nFormat; // Data format - USHORT nType; // Transaction type (XTYP_*) - // XTYP_ADVREQ [|XTYPF_NODATA] == Advise-Loop - // [|XTYPF_ACKREQ] - // XTYP_EXECUTE == laufendes Execute - // XTYP_REQUEST - // XTYP_POKE - // XTYP_ADVSTOP - // XTYP_ADVSTART - USHORT nConvst; // Conversation state (XST_*) - // 0 == idle - // XST_REQSENT (fuer XTYP_ADVREQ) - // XST_TIMEOUT (fuer alle Typen!) - // XST_WAITING (alle ausser XTYP_ADVREQ) - USHORT nLastError; // last err in transaction - ULONG nUser; // Userhandle - // private - HCONV hConvOwner; // 0 == Transaction not used -}; - - -struct ImpWndProcParams -{ - HWND hWndReceiver; - MPARAM nPar1; - MPARAM nPar2; -}; - -struct ImpService -{ - HSZ hBaseServName; // Basis-Name des Service - HSZ hInstServName; // Basis-Name + DDEML-Server-HWND der App -}; - -class ImpDdeMgr; - -// Daten eines Conversation-Windows -struct ImpConvWndData -{ - ImpDdeMgr* pThis; - USHORT nRefCount; // Zahl Conversations auf diesem Window -}; - - -// systemglobale Daten der Library (liegen in named shared memory) -struct ImpDdeMgrData -{ - ULONG nTotalSize; - ULONG nOffsAppTable; - ULONG nOffsConvTable; - ULONG nOffsTransTable; - USHORT nMaxAppCount; - USHORT nMaxConvCount; - USHORT nMaxTransCount; - USHORT nLastErr; - USHORT nReserved; - USHORT nCurTransCount; - USHORT nCurConvCount; - HWND aAppTable[ 1 ]; // fuer Broadcast-Messages - ImpHCONV aConvTable[ 1 ]; - Transaction aTransTable[ 1 ]; -}; - - - -class ImpDdeMgr -{ - friend MRESULT EXPENTRY ConvWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2); - friend MRESULT EXPENTRY ServerWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2); - friend void ImpWriteDdeStatus(char*,char*); - friend void ImpAddHSZ( HSZ, String& ); - - static PSZ AllocAtomName( ATOM hString, ULONG& rBufLen ); - static PDDESTRUCT MakeDDEObject( HWND hwnd, ATOM hItemName, - USHORT fsStatus, USHORT usFormat, PVOID pabData, ULONG usDataLen ); - static APIRET AllocNamedSharedMem( PPVOID ppBaseAddress, PSZ pName, - ULONG nElementSize, ULONG nElementCount ); - - HWND hWndServer; - PID pidThis; - PFNCALLBACK pCallback; - ULONG nTransactFilter; - CONVCONTEXT aDefaultContext; - ImpDdeMgrData* pData; - ImpService* pServices; - USHORT nServiceCount; - - ImpHCONV* pConvTable; // liegt in pData (nicht deleten!) - Transaction* pTransTable; // liegt in pData (nicht deleten!) - HWND* pAppTable; // liegt in pData (nicht deleten!) - - static ImpHCONV* GetConvTable( ImpDdeMgrData* ); - static Transaction* GetTransTable( ImpDdeMgrData* ); - static HWND* GetAppTable( ImpDdeMgrData* ); - - - static HWND NextFrameWin( HENUM hEnum ); - void CreateServerWnd(); - void DestroyServerWnd(); - HWND CreateConversationWnd(); - // Fktn. duerfen nur fuer HCONVs aufgerufen werden, die - // in der eigenen Applikation erzeugt wurden - static void DestroyConversationWnd( HWND hWndConv ); - static USHORT GetConversationWndRefCount( HWND hWndConv ); - static USHORT IncConversationWndRefCount( HWND hWndConv ); - - MRESULT SrvWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2); - MRESULT ConvWndProc(HWND hWnd,ULONG nMsg,MPARAM nPar1,MPARAM nPar2); - void RegisterDDEMLApp(); - void UnregisterDDEMLApp(); - void CleanUp(); - ImpDdeMgrData* InitAll(); - static BOOL MyWinDdePostMsg( HWND, HWND, USHORT, PDDESTRUCT, ULONG ); - void MyInitiateDde( HWND hWndServer, HWND hWndClient, - HSZ hszService, HSZ hszTopic, CONVCONTEXT* pCC ); - DDEINIT* CreateDDEInitData( HWND hWndDest, HSZ hszService, - HSZ hszTopic, CONVCONTEXT* pCC ); - // wenn pDDEData==0, muss pCC gesetzt sein - HCONV ConnectWithClient( HWND hWndClient, HSZ hszPartner, - HSZ hszService, HSZ hszTopic, BOOL bSameInst, - DDEINIT* pDDEData, CONVCONTEXT* pCC = 0); - - HCONV CheckIncoming( ImpWndProcParams*, ULONG nTransMask, - HSZ& rhszItem ); - // fuer Serverbetrieb. Ruft Callback-Fkt fuer alle offenen Advises - // auf, deren Owner der uebergebene HCONV ist. - // bFreeTransactions==TRUE: loescht die Transaktionen - // gibt Anzahl der getrennten Transaktionen zurueck - USHORT SendUnadvises( HCONV hConv, - USHORT nFormat, // 0==alle - BOOL bFreeTransactions ); - - BOOL WaitTransState( - Transaction* pTrans, ULONG nTransId, - USHORT nNewState, - ULONG nTimeout ); - - // DDEML ruft Callback mit XTYP_CONNECT-Transaction nur auf, - // wenn die App den angeforderten Service registriert hat - // Standardeinstellung: TRUE - BOOL bServFilterOn; - - // Fehlercode muss noch systemglobal werden (Atom o. ae.) - static USHORT nLastErrInstance; // wenn 0, dann gilt globaler Fehlercode - - static ImpDdeMgrData* AccessMgrData(); - - static HCONV CreateConvHandle( ImpDdeMgrData* pBase, - PID pidOwner, - HWND hWndThis, HWND hWndPartner, - HSZ hszPartner, HSZ hszServiceReq, HSZ hszTopic, - HCONV hPrevHCONV = 0 ); - - static HCONV IsConvHandleAvailable( ImpDdeMgrData* pBase ); - static HCONV GetConvHandle( ImpDdeMgrData* pBase, - HWND hWndThis, HWND hWndPartner ); - static void FreeConvHandle( ImpDdeMgrData*, HCONV, - BOOL bDestroyHWndThis = TRUE ); - - static ULONG CreateTransaction( ImpDdeMgrData* pBase, - HCONV hOwner, HSZ hszItem, USHORT nFormat, - USHORT nTransactionType ); - static ULONG GetTransaction( ImpDdeMgrData* pBase, - HCONV hOwner, HSZ hszItem, USHORT nFormat ); - - static void FreeTransaction( ImpDdeMgrData*, ULONG nTransId ); - - BOOL DisconnectAll(); - // Transaktionen muessen _vor_ den Konversationen geloescht werden! - static void FreeTransactions( ImpDdeMgrData*, HWND hWndThis, - HWND hWndPartner ); - static void FreeTransactions( ImpDdeMgrData*, HCONV hConvOwner ); - - static void FreeConversations( ImpDdeMgrData*,HWND hWndThis, - HWND hWndPartner ); - - ImpService* GetService( HSZ hszService ); - ImpService* PutService( HSZ hszService ); - void BroadcastService( ImpService*, BOOL bRegistered ); - - // rh: Startposition(!) & gefundener Handle - static ImpHCONV* GetFirstServer( ImpDdeMgrData*, HCONVLIST, HCONV& rh); - static ImpHCONV* GetLastServer( ImpDdeMgrData*, HCONVLIST, HCONV& ); - static BOOL CheckConvListId( HCONVLIST hConvListId ); - - BOOL IsSameInstance( HWND hWnd ); - HSZ GetAppName( HWND hWnd ); - - - // Transactions - MRESULT DdeAck( ImpWndProcParams* pParams ); - MRESULT DdeAdvise( ImpWndProcParams* pParams ); - MRESULT DdeData( ImpWndProcParams* pParams ); - MRESULT DdeExecute( ImpWndProcParams* pParams ); - MRESULT DdeInitiate( ImpWndProcParams* pParams ); - MRESULT DdeInitiateAck( ImpWndProcParams* pParams ); - MRESULT DdePoke( ImpWndProcParams* pParams ); - MRESULT DdeRequest( ImpWndProcParams* pParams ); - MRESULT DdeTerminate( ImpWndProcParams* pParams ); - MRESULT DdeUnadvise( ImpWndProcParams* pParams ); - MRESULT DdeRegister( ImpWndProcParams* pParams ); - MRESULT DdeUnregister( ImpWndProcParams* pParams ); - MRESULT DdeTimeout( ImpWndProcParams* pParams ); - - HDDEDATA Callback( - USHORT nTransactionType, - USHORT nClipboardFormat, - HCONV hConversationHandle, - HSZ hsz1, - HSZ hsz2, - HDDEDATA hData, - ULONG nData1, - ULONG nData2 ); - - HCONV DdeConnectImp( HSZ hszService,HSZ hszTopic,CONVCONTEXT* pCC); - - // connection data - HCONV hCurConv; // wird im DdeInitiateAck gesetzt - HCONVLIST hCurListId; // fuer DdeConnectList - USHORT nPrevConv; // .... "" .... - BOOL bListConnect; - - // synchr. transaction data - BOOL bInSyncTrans; - ULONG nSyncTransId; - HDDEDATA hSyncResponseData; - ULONG nSyncResponseMsg; // WM_DDE_ACK, WM_DDE_DATA, WM_TIMER - // TRUE==nach Ende der synchronen Transaktion eine evtl. benutzte - // asynchrone Transaktion beenden (typisch synchroner Request auf - // Advise-Loop) - BOOL bSyncAbandonTrans; - -public: - ImpDdeMgr(); - ~ImpDdeMgr(); - - USHORT DdeInitialize( PFNCALLBACK pCallbackProc, ULONG nTransactionFilter ); - USHORT DdeGetLastError(); - - HCONV DdeConnect( HSZ hszService, HSZ hszTopic, CONVCONTEXT* ); - HCONVLIST DdeConnectList( HSZ hszService, HSZ hszTopic, - HCONVLIST hConvList, CONVCONTEXT* ); - static BOOL DdeDisconnect( HCONV hConv ); - static BOOL DdeDisconnectList( HCONVLIST hConvList ); - static HCONV DdeReconnect(HCONV hConv); - static HCONV DdeQueryNextServer(HCONVLIST hConvList, HCONV hConvPrev); - static USHORT DdeQueryConvInfo(HCONV hConv, ULONG idTrans,CONVINFO* pCI); - static BOOL DdeSetUserHandle(HCONV hConv, ULONG id, ULONG hUser); - BOOL DdeAbandonTransaction( HCONV hConv, ULONG idTransaction); - - BOOL DdePostAdvise( HSZ hszTopic, HSZ hszItem); - BOOL DdeEnableCallback( HCONV hConv, USHORT wCmd); - - HDDEDATA DdeNameService( HSZ hszService, USHORT afCmd); - - static HDDEDATA DdeClientTransaction(void* pData, ULONG cbData, - HCONV hConv, HSZ hszItem, USHORT wFmt, USHORT wType, - ULONG dwTimeout, ULONG* pdwResult); - - // Data handles - - HDDEDATA DdeCreateDataHandle( void* pSrc, ULONG cb, ULONG cbOff, - HSZ hszItem, USHORT wFmt, USHORT afCmd); - static BYTE* DdeAccessData(HDDEDATA hData, ULONG* pcbDataSize); - static BOOL DdeUnaccessData(HDDEDATA hData); - static BOOL DdeFreeDataHandle(HDDEDATA hData); - static HDDEDATA DdeAddData(HDDEDATA hData,void* pSrc,ULONG cb,ULONG cbOff); - static ULONG DdeGetData(HDDEDATA hData,void* pDst,ULONG cbMax,ULONG cbOff); - - // String handles - - static HSZ DdeCreateStringHandle( PSZ pStr, int iCodePage); - static ULONG DdeQueryString(HSZ hsz,PSZ pStr,ULONG cchMax,int iCPage); - static BOOL DdeFreeStringHandle( HSZ hsz ); - static BOOL DdeKeepStringHandle( HSZ hsz ); - static int DdeCmpStringHandles(HSZ hsz1, HSZ hsz2); - - // mit dieser Funktion kann geprueft werden, ob eine - // Applikation schon eine DDEML-Instanz angelegt hat. - // Die aktuelle Impl. unterstuetzt nur eine DDEML-Instanz - // pro Applikation (wg. synchroner Transaktionen) - static ImpDdeMgr* GetImpDdeMgrInstance( HWND hWnd ); - - // gibt TRUE zurueck, wenn mind. ein lebender HCONV - // von diesem DdeMgr erzeugt wurde - BOOL OwnsConversationHandles(); -}; - -// static -inline ImpHCONV* ImpDdeMgr::GetConvTable( ImpDdeMgrData* pData ) -{ - ImpHCONV* pRet; - if( pData ) - pRet = (ImpHCONV*)((ULONG)(pData) + pData->nOffsConvTable); - else - pRet = 0; - return pRet; -} - -// static -inline Transaction* ImpDdeMgr::GetTransTable( ImpDdeMgrData* pData ) -{ - Transaction* pRet; - if( pData ) - pRet = (Transaction*)((ULONG)(pData) + pData->nOffsTransTable); - else - pRet = 0; - return pRet; -} - -// static -inline HWND* ImpDdeMgr::GetAppTable( ImpDdeMgrData* pData ) -{ - HWND* pRet; - if( pData ) - pRet = (HWND*)((ULONG)(pData) + pData->nOffsAppTable); - else - pRet = 0; - return pRet; -} - - - - -#endif - diff --git a/svl/source/svdde/ddemlos2.h b/svl/source/svdde/ddemlos2.h deleted file mode 100644 index bdd31e470bcd..000000000000 --- a/svl/source/svdde/ddemlos2.h +++ /dev/null @@ -1,374 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _DDEML_H -#define _DDEML_H - -#define INCL_OS2 -#define INCL_WIN - -#include <tools/svpm.h> -#include <tools/solar.h> -#include <tools/debug.hxx> -#include <tools/stream.hxx> - -typedef LHANDLE HSTR; - -#ifndef CALLBACK -#define CALLBACK -#endif - - -typedef ULONG HCONVLIST; -typedef ULONG HCONV; -typedef ATOM HSZ; -typedef DDESTRUCT* HDDEDATA; - -struct CONVINFO -{ - USHORT nSize; // sizeof(CONVINFO) - ULONG nUser; // Userhandle - HCONV hConvPartner; // - HSZ hszPartner; // Name der Partnerapp - HSZ hszServiceReq; // Name des angeforderten Services - HSZ hszTopic; // -- " -- Topics - HSZ hszItem; // -- " -- Items - USHORT nFormat; // Datenformat der akt. Transaktion - USHORT nType; // Typ der akt. Transaktion (XTYP_*) - USHORT nStatus; // ST_* der Konversation - USHORT nConvst; // XST_* der akt. Transaktion - USHORT nLastError; // letzter Fehler der Transaktion - HCONVLIST hConvList; // ConvListId , wenn in ConvList - CONVCONTEXT aConvCtxt; // conversation context -}; - -/* the following structure is for use with XTYP_WILDCONNECT processing. */ - -struct HSZPAIR -{ - HSZ hszSvc; - HSZ hszTopic; -}; -typedef HSZPAIR *PHSZPAIR; - -/***** conversation states (usState) *****/ - -#define XST_NULL 0 /* quiescent states */ -#define XST_INCOMPLETE 1 -#define XST_CONNECTED 2 -#define XST_INIT1 3 /* mid-initiation states */ -#define XST_INIT2 4 -#define XST_REQSENT 5 /* active conversation states */ -#define XST_DATARCVD 6 -#define XST_POKESENT 7 -#define XST_POKEACKRCVD 8 -#define XST_EXECSENT 9 -#define XST_EXECACKRCVD 10 -#define XST_ADVSENT 11 -#define XST_UNADVSENT 12 -#define XST_ADVACKRCVD 13 -#define XST_UNADVACKRCVD 14 -#define XST_ADVDATASENT 15 -#define XST_ADVDATAACKRCVD 16 - -/* used in LOWORD(dwData1) of XTYP_ADVREQ callbacks... */ -#define CADV_LATEACK 0xFFFF - -/***** conversation status bits (fsStatus) *****/ - -#define ST_CONNECTED 0x0001 -#define ST_ADVISE 0x0002 -#define ST_ISLOCAL 0x0004 -#define ST_BLOCKED 0x0008 -#define ST_CLIENT 0x0010 -#define ST_TERMINATED 0x0020 -#define ST_INLIST 0x0040 -#define ST_BLOCKNEXT 0x0080 -#define ST_ISSELF 0x0100 - - -/* DDE constants for wStatus field */ - -//#define DDE_FACK 0x8000 -//#define DDE_FBUSY 0x4000 -//#define DDE_FDEFERUPD 0x4000 -//#define DDE_FACKREQ 0x8000 -//#define DDE_FRELEASE 0x2000 -//#define DDE_FREQUESTED 0x1000 -//#define DDE_FACKRESERVED 0x3ff0 -//#define DDE_FADVRESERVED 0x3fff -//#define DDE_FDATRESERVED 0x4fff -//#define DDE_FPOKRESERVED 0xdfff -//#define DDE_FAPPSTATUS 0x00ff -#define DDE_FNOTPROCESSED 0x0000 - -/***** message filter hook types *****/ - -#define MSGF_DDEMGR 0x8001 - -/***** codepage constants ****/ - -#define CP_WINANSI 1004 /* default codepage for windows & old DDE convs. */ - -/***** transaction types *****/ - -#define XTYPF_NOBLOCK 0x0002 /* CBR_BLOCK will not work */ -#define XTYPF_NODATA 0x0004 /* DDE_FDEFERUPD */ -#define XTYPF_ACKREQ 0x0008 /* DDE_FACKREQ */ - -#define XCLASS_MASK 0xFC00 -#define XCLASS_BOOL 0x1000 -#define XCLASS_DATA 0x2000 -#define XCLASS_FLAGS 0x4000 -#define XCLASS_NOTIFICATION 0x8000 - -#define XTYP_ERROR (0x0000 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK ) -#define XTYP_ADVDATA (0x0010 | XCLASS_FLAGS ) -#define XTYP_ADVREQ (0x0020 | XCLASS_DATA | XTYPF_NOBLOCK ) -#define XTYP_ADVSTART (0x0030 | XCLASS_BOOL ) -#define XTYP_ADVSTOP (0x0040 | XCLASS_NOTIFICATION) -#define XTYP_EXECUTE (0x0050 | XCLASS_FLAGS ) -#define XTYP_CONNECT (0x0060 | XCLASS_BOOL | XTYPF_NOBLOCK) -#define XTYP_CONNECT_CONFIRM (0x0070 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK) -#define XTYP_XACT_COMPLETE (0x0080 | XCLASS_NOTIFICATION ) -#define XTYP_POKE (0x0090 | XCLASS_FLAGS ) -#define XTYP_REGISTER (0x00A0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK) -#define XTYP_REQUEST (0x00B0 | XCLASS_DATA ) -#define XTYP_DISCONNECT (0x00C0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK) -#define XTYP_UNREGISTER (0x00D0 | XCLASS_NOTIFICATION | XTYPF_NOBLOCK) -#define XTYP_WILDCONNECT (0x00E0 | XCLASS_DATA | XTYPF_NOBLOCK) - -#define XTYP_MASK 0x00F0 -#define XTYP_SHIFT 4 /* shift to turn XTYP_ into an index */ - -/***** Timeout constants *****/ - -#define TIMEOUT_ASYNC -1L - -/***** Transaction ID constants *****/ - -#define QID_SYNC -1L - -/****** public strings used in DDE ******/ - -#define SZDDESYS_TOPIC "System" -#define SZDDESYS_ITEM_TOPICS "Topics" -#define SZDDESYS_ITEM_SYSITEMS "SysItems" -#define SZDDESYS_ITEM_RTNMSG "ReturnMessage" -#define SZDDESYS_ITEM_STATUS "Status" -#define SZDDESYS_ITEM_FORMATS "Formats" -#define SZDDESYS_ITEM_HELP "Help" -#define SZDDE_ITEM_ITEMLIST "TopicItemList" - - -/****** API entry points ******/ - -typedef HDDEDATA CALLBACK FNCALLBACK(USHORT wType, USHORT wFmt, HCONV hConv, - HSZ hsz1, HSZ hsz2, HDDEDATA hData, ULONG dwData1, ULONG dwData2); -typedef FNCALLBACK* PFNCALLBACK; - -#define CBR_BLOCK 0xffffffffL - -/* DLL registration functions */ - -USHORT DdeInitialize(ULONG* pidInst, PFNCALLBACK pfnCallback, - ULONG afCmd, ULONG ulRes); - -/* - * Callback filter flags for use with standard apps. - */ - -#define CBF_FAIL_SELFCONNECTIONS 0x00001000 -#define CBF_FAIL_CONNECTIONS 0x00002000 -#define CBF_FAIL_ADVISES 0x00004000 -#define CBF_FAIL_EXECUTES 0x00008000 -#define CBF_FAIL_POKES 0x00010000 -#define CBF_FAIL_REQUESTS 0x00020000 -#define CBF_FAIL_ALLSVRXACTIONS 0x0003f000 - -#define CBF_SKIP_CONNECT_CONFIRMS 0x00040000 -#define CBF_SKIP_REGISTRATIONS 0x00080000 -#define CBF_SKIP_UNREGISTRATIONS 0x00100000 -#define CBF_SKIP_DISCONNECTS 0x00200000 -#define CBF_SKIP_ALLNOTIFICATIONS 0x003c0000 - -/* - * Application command flags - */ -#define APPCMD_CLIENTONLY 0x00000010L -#define APPCMD_FILTERINITS 0x00000020L -#define APPCMD_MASK 0x00000FF0L - -/* - * Application classification flags - */ -#define APPCLASS_STANDARD 0x00000000L -#define APPCLASS_MASK 0x0000000FL - - -BOOL DdeUninitialize(ULONG idInst); - -/* conversation enumeration functions */ - -HCONVLIST DdeConnectList(ULONG idInst, HSZ hszService, HSZ hszTopic, - HCONVLIST hConvList, CONVCONTEXT* pCC); -HCONV DdeQueryNextServer(HCONVLIST hConvList, HCONV hConvPrev); -BOOL DdeDisconnectList(HCONVLIST hConvList); - -/* conversation control functions */ - -HCONV DdeConnect(ULONG idInst, HSZ hszService, HSZ hszTopic, - CONVCONTEXT* pCC); -BOOL DdeDisconnect(HCONV hConv); -HCONV DdeReconnect(HCONV hConv); - -USHORT DdeQueryConvInfo(HCONV hConv, ULONG idTransaction, CONVINFO* pConvInfo); -BOOL DdeSetUserHandle(HCONV hConv, ULONG id, ULONG hUser); - -BOOL DdeAbandonTransaction(ULONG idInst, HCONV hConv, ULONG idTransaction); - - -/* app server interface functions */ - -BOOL DdePostAdvise(ULONG idInst, HSZ hszTopic, HSZ hszItem); -BOOL DdeEnableCallback(ULONG idInst, HCONV hConv, USHORT wCmd); - -#define EC_ENABLEALL 0 -#define EC_ENABLEONE ST_BLOCKNEXT -#define EC_DISABLE ST_BLOCKED -#define EC_QUERYWAITING 2 - -HDDEDATA DdeNameService(ULONG idInst, HSZ hsz1, HSZ hsz2, USHORT afCmd); - -#define DNS_REGISTER 0x0001 -#define DNS_UNREGISTER 0x0002 -#define DNS_FILTERON 0x0004 -#define DNS_FILTEROFF 0x0008 - -/* app client interface functions */ - -HDDEDATA DdeClientTransaction(void* pData, ULONG cbData, - HCONV hConv, HSZ hszItem, USHORT wFmt, USHORT wType, - ULONG dwTimeout, ULONG* pdwResult); - -/* data transfer functions */ - -HDDEDATA DdeCreateDataHandle(ULONG idInst, void* pSrc, ULONG cb, - ULONG cbOff, HSZ hszItem, USHORT wFmt, USHORT afCmd); -// HDDEDATA DdeAddData(HDDEDATA hData, void* pSrc, ULONG cb, ULONG cbOff); -ULONG DdeGetData(HDDEDATA hData, void* pDst, ULONG cbMax, ULONG cbOff); -BYTE* DdeAccessData(HDDEDATA hData, ULONG* pcbDataSize); -BOOL DdeUnaccessData(HDDEDATA hData); -BOOL DdeFreeDataHandle(HDDEDATA hData); - -#define HDATA_APPOWNED 0x0001 - -USHORT DdeGetLastError(ULONG idInst); - -#define DMLERR_NO_ERROR 0 /* must be 0 */ - -#define DMLERR_FIRST 0x4000 - -#define DMLERR_ADVACKTIMEOUT 0x4000 -#define DMLERR_BUSY 0x4001 -#define DMLERR_DATAACKTIMEOUT 0x4002 -#define DMLERR_DLL_NOT_INITIALIZED 0x4003 -#define DMLERR_DLL_USAGE 0x4004 -#define DMLERR_EXECACKTIMEOUT 0x4005 -#define DMLERR_INVALIDPARAMETER 0x4006 -#define DMLERR_LOW_MEMORY 0x4007 -#define DMLERR_MEMORY_ERROR 0x4008 -#define DMLERR_NOTPROCESSED 0x4009 -#define DMLERR_NO_CONV_ESTABLISHED 0x400a -#define DMLERR_POKEACKTIMEOUT 0x400b -#define DMLERR_POSTMSG_FAILED 0x400c -#define DMLERR_REENTRANCY 0x400d -#define DMLERR_SERVER_DIED 0x400e -#define DMLERR_SYS_ERROR 0x400f -#define DMLERR_UNADVACKTIMEOUT 0x4010 -#define DMLERR_UNFOUND_QUEUE_ID 0x4011 - -#define DMLERR_LAST 0x4011 - -HSZ DdeCreateStringHandle(ULONG idInst, PSZ pStr, int iCodePage); -ULONG DdeQueryString(ULONG idInst, HSZ hsz, PSZ pStr, ULONG cchMax, - int iCodePage); -BOOL DdeFreeStringHandle(ULONG idInst, HSZ hsz); -BOOL DdeKeepStringHandle(ULONG idInst, HSZ hsz); -int DdeCmpStringHandles(HSZ hsz1, HSZ hsz2); - - - -/* von OS/2 nicht unterstuetzte Win3.1 Clipboard-Formate */ - -#define CF_NOTSUPPORTED_BASE 0xff00 - -#ifndef CF_DIB -#define CF_DIB CF_NOTSUPPORTED_BASE+1 -#endif - -#ifndef CF_DIF -#define CF_DIF CF_NOTSUPPORTED_BASE+2 -#endif - -#ifndef CF_DSPMETAFILEPICT -#define CF_DSPMETAFILEPICT CF_NOTSUPPORTED_BASE+3 -#endif - -#ifndef CF_METAFILEPICT -#define CF_METAFILEPICT CF_NOTSUPPORTED_BASE+4 -#endif - -#ifndef CF_OEMTEXT -#define CF_OEMTEXT CF_NOTSUPPORTED_BASE+5 -#endif - -#ifndef CF_OWNERDISPLAY -#define CF_OWNERDISPLAY CF_NOTSUPPORTED_BASE+6 -#endif - -#ifndef CF_PENDATA -#define CF_PENDATA CF_NOTSUPPORTED_BASE+7 -#endif - -#ifndef CF_RIFF -#define CF_RIFF CF_NOTSUPPORTED_BASE+8 -#endif - -#ifndef CF_SYLK -#define CF_SYLK CF_NOTSUPPORTED_BASE+9 -#endif - -#ifndef CF_TIFF -#define CF_TIFF CF_NOTSUPPORTED_BASE+10 -#endif - -#ifndef CF_WAVE -#define CF_WAVE CF_NOTSUPPORTED_BASE+11 -#endif - - -#endif /* _DDEML_HXX */ diff --git a/svl/source/svdde/makefile.mk b/svl/source/svdde/makefile.mk deleted file mode 100644 index d7f0a790486b..000000000000 --- a/svl/source/svdde/makefile.mk +++ /dev/null @@ -1,60 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - - -.IF "$(GUIBASE)"=="WIN" - -PRJ=..$/.. - -PRJNAME=svl -TARGET=svdde - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svl.pmk - -# --- Files -------------------------------------------------------- - - -SLOFILES= $(SLO)$/ddecli.obj \ - $(SLO)$/ddesvr.obj \ - $(SLO)$/ddedata.obj \ - $(SLO)$/ddestrg.obj \ - $(SLO)$/ddewrap.obj \ - $(SLO)$/ddeinf.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.ELSE -dummy: - @echo GUI == "$(GUI)" - nothing to do - -.ENDIF - diff --git a/svl/source/svsql/converter.cxx b/svl/source/svsql/converter.cxx index ee36914289a3..3b162cecadee 100644 --- a/svl/source/svsql/converter.cxx +++ b/svl/source/svsql/converter.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svl.hxx" -#include "converter.hxx" +#include <svl/converter.hxx> INT32 SvDbaseConverter::ConvertPrecisionToDbase(INT32 _nLen, INT32 _nScale) { diff --git a/svl/source/undo/makefile.mk b/svl/source/undo/makefile.mk deleted file mode 100644 index 8a615d97a03b..000000000000 --- a/svl/source/undo/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svl -TARGET=undo -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svl.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/undo.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svl/source/uno/makefile.mk b/svl/source/uno/makefile.mk deleted file mode 100644 index 3414871305d5..000000000000 --- a/svl/source/uno/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svl -TARGET=unoiface -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svl.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/registerservices.obj\ - $(SLO)$/pathservice.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svl/unx/source/svdde/makefile.mk b/svl/unx/source/svdde/makefile.mk deleted file mode 100644 index 3d2ae4308821..000000000000 --- a/svl/unx/source/svdde/makefile.mk +++ /dev/null @@ -1,46 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=svl -TARGET=svdde - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svl.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/ddedummy.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svl/util/makefile.mk b/svl/util/makefile.mk deleted file mode 100644 index 7cb493ae0d94..000000000000 --- a/svl/util/makefile.mk +++ /dev/null @@ -1,130 +0,0 @@ -#************************************************************************* -#* -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=svl -TARGET=svl -RESTARGETSIMPLE=svs -GEN_HID=TRUE -# GEN_HID_OTHER=TRUE -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- general section ---------------------------------------------------- - -.IF "$(GUI)"!="UNX" -LIB2TARGET= $(LB)$/isvl.lib -LIB2FILES= $(LB)$/_isvl.lib -.ENDIF - -LIB1TARGET= $(SLB)$/svl.lib -LIB1FILES= \ - $(SLB)$/config.lib \ - $(SLB)$/svdde.lib \ - $(SLB)$/undo.lib \ - $(SLB)$/numbers.lib \ - $(SLB)$/numbers.uno.lib \ - $(SLB)$/filerec.lib \ - $(SLB)$/filepicker.lib \ - $(SLB)$/items.lib \ - $(SLB)$/misc.lib \ - $(SLB)$/notify.lib \ - $(SLB)$/unoiface.lib \ - $(SLB)$/svarray.lib \ - $(SLB)$/svsql.lib - -# generation of resourcen-lib ---------------------------------------- - -RESLIB1NAME= $(RESTARGETSIMPLE) -RESLIB1SRSFILES=\ - $(SRS)$/items.srs \ - $(SRS)$/misc.srs - -# build the shared library -------------------------------------------------- - -SHL1TARGET= svl$(DLLPOSTFIX) -SHL1IMPLIB= _isvl -SHL1USE_EXPORTS=name -#Do not link with VCL or any other library that links with VCL -SHL1STDLIBS= \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ - $(UCBHELPERLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(VOSLIB) \ - $(SOTLIB) \ - $(SALLIB) - -.IF "$(GUI)"=="WNT" -SHL1STDLIBS+= \ - $(UWINAPILIB) \ - $(ADVAPI32LIB) \ - $(GDI32LIB) -.ENDIF # WNT - -SHL1LIBS= $(SLB)$/svl.lib - -SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME= $(SHL1TARGET) -DEF1DEPN= $(SLB)$/svl.lib -DEFLIB1NAME=svl -DEF1DES =SvTools lite - -# --- Targets ------------------------------------------------------ - -.IF "$(GUI)"=="UNX" -SVTTARGETS= $(LB)$/lib$(SHL1TARGET)$(DLLPOST) -.ELSE -SVTTARGETS= $(LB)$/isvl.lib -.ENDIF - -# just a quick fix - has to be cleaned up some day... -.IF "$(L10N-framework)"=="" -ALL: $(SLB)$/svl.lib \ - $(MISC)$/$(SHL1TARGET).def \ - $(SVTTARGETS) \ - ALLTAR -.ENDIF # "$(L10N-framework)"=="" - -.INCLUDE : target.mk - - -ALLTAR : $(MISC)/svl.component - -$(MISC)/svl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - svl.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt svl.component diff --git a/svl/qa/complex/ConfigItems/makefile.mk b/svtools/AllLangResTarget_productregistration.mk index b4241f24dfee..af510d338c6e 100644 --- a/svl/qa/complex/ConfigItems/makefile.mk +++ b/svtools/AllLangResTarget_productregistration.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2000, 2010 Oracle and/or its affiliates. +# Copyright 2009 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,48 +14,37 @@ # # 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 +# 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 +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # #************************************************************************* -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE -PRJ = ../../.. -PRJNAME = svl -TARGET = qa_complex_ConfigItems +$(eval $(call gb_AllLangResTarget_AllLangResTarget,productregistration)) -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/ConfigItems +$(eval $(call gb_AllLangResTarget_set_reslocation,productregistration,svtools)) -# here store only Files which contain a @Test -JAVATESTFILES = \ - CheckConfigItems.java +$(eval $(call gb_AllLangResTarget_add_srs,productregistration,\ + svt/productregistration \ +)) -# put here all other files -JAVAFILES = $(JAVATESTFILES) +$(eval $(call gb_SrsTarget_SrsTarget,svt/productregistration)) -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) +$(eval $(call gb_SrsTarget_set_include,svt/productregistration,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc \ + -I$(SRCDIR)/svtools/source/inc \ + -I$(SRCDIR)/svtools/inc/ \ + -I$(SRCDIR)/svtools/inc/svtools \ +)) -# Sample how to debug -# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END +$(eval $(call gb_SrsTarget_add_files,svt/productregistration,\ + svtools/source/productregistration/registrationdlg.src \ +)) diff --git a/svtools/AllLangResTarget_svt.mk b/svtools/AllLangResTarget_svt.mk new file mode 100644 index 000000000000..c41bc9d6b29e --- /dev/null +++ b/svtools/AllLangResTarget_svt.mk @@ -0,0 +1,75 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_AllLangResTarget_AllLangResTarget,svt)) + +$(eval $(call gb_AllLangResTarget_set_reslocation,svt,svtools)) + +$(eval $(call gb_AllLangResTarget_add_srs,svt,\ + svt/res \ +)) + +$(eval $(call gb_SrsTarget_SrsTarget,svt/res)) + +$(eval $(call gb_SrsTarget_set_include,svt/res,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc \ + -I$(SRCDIR)/svtools/source/uno \ + -I$(SRCDIR)/svtools/source/inc \ + -I$(SRCDIR)/svtools/inc/ \ + -I$(SRCDIR)/svtools/inc/svtools \ +)) + +$(eval $(call gb_SrsTarget_add_files,svt/res,\ + svtools/source/brwbox/editbrowsebox.src \ + svtools/source/contnr/fileview.src \ + svtools/source/contnr/svcontnr.src \ + svtools/source/contnr/templwin.src \ + svtools/source/control/calendar.src \ + svtools/source/control/ctrlbox.src \ + svtools/source/control/ctrltool.src \ + svtools/source/control/filectrl.src \ + svtools/source/dialogs/addresstemplate.src \ + svtools/source/dialogs/colrdlg.src \ + svtools/source/dialogs/filedlg2.src \ + svtools/source/dialogs/formats.src \ + svtools/source/dialogs/prnsetup.src \ + svtools/source/dialogs/so3res.src \ + svtools/source/dialogs/wizardmachine.src \ + svtools/source/filter.vcl/filter/exportdialog.src \ + svtools/source/java/javaerror.src \ + svtools/source/misc/ehdl.src \ + svtools/source/misc/helpagent.src \ + svtools/source/misc/imagemgr.src \ + svtools/source/misc/langtab.src \ + svtools/source/misc/undo.src \ + svtools/source/plugapp/testtool.src \ + svtools/source/toolpanel/toolpanel.src \ +)) + + +# vim: set noet sw=4 ts=4: diff --git a/svtools/Executable_bmp.mk b/svtools/Executable_bmp.mk new file mode 100644 index 000000000000..67b21600e523 --- /dev/null +++ b/svtools/Executable_bmp.mk @@ -0,0 +1,86 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Executable_Executable,bmp)) + +$(eval $(call gb_Executable_set_include,bmp,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/svtools \ + -I$(WORKDIR)/inc/ \ + -I$(OUTDIR)/inc/ \ + -I$(SRCDIR)/svtools/inc \ + -I$(SRCDIR)/svtools/inc/svtools \ + -I$(SRCDIR)/svtools/source/inc \ + -I$(SRCDIR)/svtools/inc/pch \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Executable_add_linked_libs,bmp,\ + sal \ + stl \ + tl \ + vcl \ + vos3 \ +)) + +$(eval $(call gb_Executable_add_exception_objects,bmp,\ + svtools/bmpmaker/bmp \ + svtools/bmpmaker/bmpcore \ +)) + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Executable_add_linked_libs,bmp,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Executable_add_linked_libs,bmp,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +endif + +ifeq ($(OS),LINUX) +$(eval $(call gb_Executable_add_linked_libs,bmp,\ + dl \ + pthread \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/svtools/Executable_bmpsum.mk b/svtools/Executable_bmpsum.mk new file mode 100644 index 000000000000..6b2c0466f0ec --- /dev/null +++ b/svtools/Executable_bmpsum.mk @@ -0,0 +1,82 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Executable_Executable,bmpsum)) + +$(eval $(call gb_Executable_set_include,bmpsum,\ + $$(INCLUDE) \ + -I$(OUTDIR)/inc/ \ + -I$(OUTDIR)/inc/offuh/ \ + -I$(SRCDIR)/svtools/inc/ \ + -I$(SRCDIR)/svtools/inc/pch/ \ + -I$(SRCDIR)/svtools/inc/svtools/ \ +)) + +$(eval $(call gb_Executable_add_linked_libs,bmpsum,\ + sal \ + stl \ + tl \ + vcl \ + vos3 \ +)) + +$(eval $(call gb_Executable_add_exception_objects,bmpsum,\ + svtools/bmpmaker/bmpsum \ +)) + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Executable_add_linked_libs,bmpsum,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Executable_add_linked_libs,bmpsum,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +endif + +ifeq ($(OS),LINUX) +$(eval $(call gb_Executable_add_linked_libs,bmpsum,\ + dl \ + pthread \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/svtools/Executable_g2g.mk b/svtools/Executable_g2g.mk new file mode 100644 index 000000000000..d6b96970eacc --- /dev/null +++ b/svtools/Executable_g2g.mk @@ -0,0 +1,83 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Executable_Executable,g2g)) + +$(eval $(call gb_Executable_set_include,g2g,\ + $$(INCLUDE) \ + -I$(OUTDIR)/inc/ \ + -I$(OUTDIR)/inc/offuh/ \ + -I$(SRCDIR)/svtools/inc/ \ + -I$(SRCDIR)/svtools/inc/pch/ \ + -I$(SRCDIR)/svtools/inc/svtools/ \ +)) + +$(eval $(call gb_Executable_add_linked_libs,g2g,\ + jvmfwk \ + sal \ + stl \ + svt \ + tl \ + vcl \ + vos3 \ +)) + +$(eval $(call gb_Executable_add_exception_objects,g2g,\ + svtools/bmpmaker/g2g \ +)) +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Executable_add_linked_libs,g2g,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Executable_add_linked_libs,g2g,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +endif +ifeq ($(OS),LINUX) +$(eval $(call gb_Executable_add_linked_libs,g2g,\ + pthread \ + dl \ + X11 \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/svtools/Library_hatchwindowfactory.mk b/svtools/Library_hatchwindowfactory.mk new file mode 100644 index 000000000000..3e96d22588c8 --- /dev/null +++ b/svtools/Library_hatchwindowfactory.mk @@ -0,0 +1,91 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,hatchwindowfactory)) + +$(eval $(call gb_Library_set_componentfile,hatchwindowfactory,svtools/source/hatchwindow/hatchwindowfactory)) + +$(eval $(call gb_Library_set_include,hatchwindowfactory,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/svtools \ + -I$(WORKDIR)/inc/ \ + -I$(SRCDIR)/svtools/inc/pch/ \ + -I$(OUTDIR)/inc/ \ + -I$(SRCDIR)/svtools/inc \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\ + cppu \ + cppuhelper \ + sal \ + tk \ + tl \ + vcl \ +)) + +$(eval $(call gb_Library_add_exception_objects,hatchwindowfactory,\ + svtools/source/hatchwindow/documentcloser \ + svtools/source/hatchwindow/hatchwindow \ + svtools/source/hatchwindow/hatchwindowfactory \ + svtools/source/hatchwindow/ipwin \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\ + dl \ + m \ + pthread \ +)) +endif +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Library_add_linked_libs,hatchwindowfactory,\ + kernel32 \ + msvcrt \ + oldnames \ + stl \ + user32 \ + uwinapi \ +)) +endif +endif +# vim: set noet sw=4 ts=4: diff --git a/svtools/Library_productregistration.mk b/svtools/Library_productregistration.mk new file mode 100644 index 000000000000..5df44f631097 --- /dev/null +++ b/svtools/Library_productregistration.mk @@ -0,0 +1,92 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,productregistration)) + +$(eval $(call gb_Library_set_componentfile,productregistration,svtools/source/productregistration/productregistration.uno)) + +$(eval $(call gb_Library_set_include,productregistration,\ + $$(SOLARINC) \ + -I$(WORKDIR)/inc/svtools \ + -I$(WORKDIR)/inc/ \ + -I$(SRCDIR)/svtools/inc/pch/ \ + -I$(OUTDIR)/inc/ \ + -I$(SRCDIR)/svtools/inc \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_add_linked_libs,productregistration,\ + cppu \ + cppuhelper \ + sal \ + stl \ + svl \ + tk \ + tl \ + utl \ + vcl \ +)) + +$(eval $(call gb_Library_add_exception_objects,productregistration,\ + svtools/source/productregistration/productregistration \ + svtools/source/productregistration/registrationdlg \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,productregistration,\ + dl \ + m \ + pthread \ +)) +endif + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,productregistration,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Library_add_linked_libs,productregistration,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +endif +# vim: set noet sw=4 ts=4: diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk new file mode 100644 index 000000000000..fb0fae66ca12 --- /dev/null +++ b/svtools/Library_svt.mk @@ -0,0 +1,335 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,svt)) + +$(eval $(call gb_Library_add_package_headers,svt,svtools_inc)) + +$(eval $(call gb_Library_add_precompiled_header,svt,$(SRCDIR)/svtools/inc/pch/precompiled_svtools)) + +$(eval $(call gb_Library_set_componentfile,svt,svtools/util/svt)) + +$(eval $(call gb_Library_set_include,svt,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/svtools \ + -I$(WORKDIR)/inc/ \ + -I$(OUTDIR)/inc/ \ + -I$(SRCDIR)/svtools/inc \ + -I$(SRCDIR)/svtools/inc/svtools \ + -I$(SRCDIR)/svtools/source/inc \ + -I$(SRCDIR)/svtools/inc/pch \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_Library_set_defs,svt,\ + $$(DEFS) \ + -DSVT_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_linked_libs,svt,\ + basegfx \ + comphelper \ + cppu \ + cppuhelper \ + i18nisolang1 \ + i18nutil \ + icuuc \ + jvmfwk \ + sal \ + sot \ + stl \ + svl \ + tk \ + tl \ + ucbhelper \ + utl \ + vcl \ + vos3 \ +)) + +ifeq ($(SYSTEM_JPEG),YES) +$(eval $(call gb_Library_add_linked_libs,svt,\ + jpeg \ +)) +$(eval $(call gb_Library_set_ldflags,svt,\ + $$(filter-out -L/usr/lib/jvm%,$$(LDFLAGS)) \ +)) +else +$(eval $(call gb_Library_add_linked_static_libs,svt,\ + jpeglib \ +)) +endif + +$(eval $(call gb_Library_add_exception_objects,svt,\ + svtools/source/brwbox/brwbox1 \ + svtools/source/brwbox/brwbox2 \ + svtools/source/brwbox/brwbox3 \ + svtools/source/brwbox/brwhead \ + svtools/source/brwbox/datwin \ + svtools/source/brwbox/ebbcontrols \ + svtools/source/brwbox/editbrowsebox \ + svtools/source/brwbox/editbrowsebox2 \ + svtools/source/config/accessibilityoptions \ + svtools/source/config/apearcfg \ + svtools/source/config/colorcfg \ + svtools/source/config/extcolorcfg \ + svtools/source/config/fontsubstconfig \ + svtools/source/config/helpopt \ + svtools/source/config/htmlcfg \ + svtools/source/config/itemholder2 \ + svtools/source/config/menuoptions \ + svtools/source/config/miscopt \ + svtools/source/config/optionsdrawinglayer \ + svtools/source/config/printoptions \ + svtools/source/contnr/contentenumeration \ + svtools/source/contnr/fileview \ + svtools/source/contnr/imivctl1 \ + svtools/source/contnr/imivctl2 \ + svtools/source/contnr/ivctrl \ + svtools/source/contnr/svicnvw \ + svtools/source/contnr/svimpbox \ + svtools/source/contnr/svimpicn \ + svtools/source/contnr/svlbitm \ + svtools/source/contnr/svlbox \ + svtools/source/contnr/svtabbx \ + svtools/source/contnr/svtreebx \ + svtools/source/contnr/templwin \ + svtools/source/contnr/tooltiplbox \ + svtools/source/contnr/treelist \ + svtools/source/control/asynclink \ + svtools/source/control/calendar \ + svtools/source/control/collatorres \ + svtools/source/control/ctrlbox \ + svtools/source/control/ctrltool \ + svtools/source/control/filectrl \ + svtools/source/control/filectrl2 \ + svtools/source/control/fileurlbox \ + svtools/source/control/fixedhyper \ + svtools/source/control/fmtfield \ + svtools/source/control/headbar \ + svtools/source/control/hyperlabel \ + svtools/source/control/indexentryres \ + svtools/source/control/inettbc \ + svtools/source/control/prgsbar \ + svtools/source/control/roadmap \ + svtools/source/control/ruler \ + svtools/source/control/scriptedtext \ + svtools/source/control/scrwin \ + svtools/source/control/stdctrl \ + svtools/source/control/stdmenu \ + svtools/source/control/tabbar \ + svtools/source/control/taskbar \ + svtools/source/control/taskbox \ + svtools/source/control/taskmisc \ + svtools/source/control/taskstat \ + svtools/source/control/toolbarmenu \ + svtools/source/control/toolbarmenuacc \ + svtools/source/control/urlcontrol \ + svtools/source/control/valueacc \ + svtools/source/control/valueset \ + svtools/source/dialogs/addresstemplate \ + svtools/source/dialogs/colctrl \ + svtools/source/dialogs/colrdlg \ + svtools/source/dialogs/filedlg \ + svtools/source/dialogs/filedlg2 \ + svtools/source/dialogs/insdlg \ + svtools/source/dialogs/mcvmath \ + svtools/source/dialogs/prnsetup \ + svtools/source/dialogs/property \ + svtools/source/dialogs/roadmapwizard \ + svtools/source/dialogs/wizardmachine \ + svtools/source/dialogs/wizdlg \ + svtools/source/edit/editsyntaxhighlighter \ + svtools/source/edit/svmedit \ + svtools/source/edit/svmedit2 \ + svtools/source/edit/sychconv \ + svtools/source/edit/syntaxhighlight \ + svtools/source/edit/textdata \ + svtools/source/edit/textdoc \ + svtools/source/edit/texteng \ + svtools/source/edit/textundo \ + svtools/source/edit/textview \ + svtools/source/edit/textwindowpeer \ + svtools/source/edit/txtattr \ + svtools/source/edit/xtextedt \ + svtools/source/filter.vcl/filter/FilterConfigCache \ + svtools/source/filter.vcl/filter/FilterConfigItem \ + svtools/source/filter.vcl/filter/SvFilterOptionsDialog \ + svtools/source/filter.vcl/filter/exportdialog \ + svtools/source/filter.vcl/filter/filter \ + svtools/source/filter.vcl/filter/filter2 \ + svtools/source/filter.vcl/filter/sgfbram \ + svtools/source/filter.vcl/filter/sgvmain \ + svtools/source/filter.vcl/filter/sgvspln \ + svtools/source/filter.vcl/filter/sgvtext \ + svtools/source/filter.vcl/igif/decode \ + svtools/source/filter.vcl/igif/gifread \ + svtools/source/filter.vcl/ixbm/xbmread \ + svtools/source/filter.vcl/ixpm/xpmread \ + svtools/source/filter.vcl/jpeg/jpeg \ + svtools/source/filter.vcl/wmf/emfwr \ + svtools/source/filter.vcl/wmf/enhwmf \ + svtools/source/filter.vcl/wmf/winmtf \ + svtools/source/filter.vcl/wmf/winwmf \ + svtools/source/filter.vcl/wmf/wmf \ + svtools/source/filter.vcl/wmf/wmfwr \ + svtools/source/graphic/descriptor \ + svtools/source/graphic/graphic \ + svtools/source/graphic/graphicunofactory \ + svtools/source/graphic/grfattr \ + svtools/source/graphic/grfcache \ + svtools/source/graphic/grfmgr \ + svtools/source/graphic/grfmgr2 \ + svtools/source/graphic/provider \ + svtools/source/graphic/renderer \ + svtools/source/graphic/transformer \ + svtools/source/java/javacontext \ + svtools/source/java/javainteractionhandler \ + svtools/source/misc/acceleratorexecute \ + svtools/source/misc/chartprettypainter \ + svtools/source/misc/cliplistener \ + svtools/source/misc/dialogclosedlistener \ + svtools/source/misc/dialogcontrolling \ + svtools/source/misc/ehdl \ + svtools/source/misc/embedhlp \ + svtools/source/misc/embedtransfer \ + svtools/source/misc/helpagentwindow \ + svtools/source/misc/imagemgr \ + svtools/source/misc/imageresourceaccess \ + svtools/source/misc/imap \ + svtools/source/misc/imap2 \ + svtools/source/misc/imap3 \ + svtools/source/misc/itemdel \ + svtools/source/misc/langtab \ + svtools/source/misc/stringtransfer \ + svtools/source/misc/svtaccessiblefactory \ + svtools/source/misc/svtdata \ + svtools/source/misc/templatefoldercache \ + svtools/source/misc/transfer \ + svtools/source/misc/transfer2 \ + svtools/source/misc/unitconv \ + svtools/source/misc/wallitem \ + svtools/source/misc/xwindowitem \ + svtools/source/plugapp/ttprops \ + svtools/source/svhtml/htmlkywd \ + svtools/source/svhtml/htmlout \ + svtools/source/svhtml/htmlsupp \ + svtools/source/svhtml/parhtml \ + svtools/source/svrtf/parrtf \ + svtools/source/svrtf/rtfkeywd \ + svtools/source/svrtf/rtfout \ + svtools/source/svrtf/svparser \ + svtools/source/table/defaultinputhandler \ + svtools/source/table/gridtablerenderer \ + svtools/source/table/tablecontrol \ + svtools/source/table/tablecontrol_impl \ + svtools/source/table/tabledatawindow \ + svtools/source/table/tablegeometry \ + svtools/source/toolpanel/drawerlayouter \ + svtools/source/toolpanel/dummypanel \ + svtools/source/toolpanel/paneldecklisteners \ + svtools/source/toolpanel/paneltabbar \ + svtools/source/toolpanel/paneltabbarpeer \ + svtools/source/toolpanel/refbase \ + svtools/source/toolpanel/tabbargeometry \ + svtools/source/toolpanel/tablayouter \ + svtools/source/toolpanel/toolpanel \ + svtools/source/toolpanel/toolpanelcollection \ + svtools/source/toolpanel/toolpaneldeck \ + svtools/source/toolpanel/toolpaneldeckpeer \ + svtools/source/toolpanel/toolpaneldrawer \ + svtools/source/toolpanel/toolpaneldrawerpeer \ + svtools/source/uno/addrtempuno \ + svtools/source/uno/contextmenuhelper \ + svtools/source/uno/framestatuslistener \ + svtools/source/uno/generictoolboxcontroller \ + svtools/source/uno/genericunodialog \ + svtools/source/uno/miscservices \ + svtools/source/uno/popupmenucontrollerbase \ + svtools/source/uno/popupwindowcontroller \ + svtools/source/uno/statusbarcontroller \ + svtools/source/uno/svtxgridcontrol \ + svtools/source/uno/toolboxcontroller \ + svtools/source/uno/treecontrolpeer \ + svtools/source/uno/unocontroltablemodel \ + svtools/source/uno/unoevent \ + svtools/source/uno/unoiface \ + svtools/source/uno/unoimap \ + svtools/source/uno/wizard/unowizard \ + svtools/source/uno/wizard/wizardpagecontroller \ + svtools/source/uno/wizard/wizardshell \ + svtools/source/urlobj/inetimg \ +)) + +$(eval $(call gb_Library_add_cobjects,svt,\ + svtools/source/filter.vcl/jpeg/jpegc \ +)) + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,svt,\ + dl \ + m \ + pthread \ +)) +endif + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,svt,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + advapi32 \ + gdi32 \ + kernel32 \ + msvcrt \ + ole32 \ + oleaut32 \ + user32 \ + uuid \ +)) +else +$(eval $(call gb_Library_add_linked_libs,svt,\ + advapi32 \ + gdi32 \ + kernel32 \ + msvcrt \ + oldnames \ + ole32 \ + oleaut32 \ + user32 \ + uuid \ + uwinapi \ +)) +endif +endif +# vim: set noet sw=4 ts=4: diff --git a/svtools/Makefile b/svtools/Makefile new file mode 100644 index 000000000000..a79aff831024 --- /dev/null +++ b/svtools/Makefile @@ -0,0 +1,38 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif + +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk + +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) + +# vim: set noet sw=4 ts=4: diff --git a/svl/source/filerec/makefile.mk b/svtools/Module_svtools.mk index ea2b88d8d493..bc760add6d26 100644 --- a/svl/source/filerec/makefile.mk +++ b/svtools/Module_svtools.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2000, 2010 Oracle and/or its affiliates. +# Copyright 2009 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,33 +14,35 @@ # # 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 +# 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 +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # #************************************************************************* -PRJ=..$/.. - -PRJNAME=svl -TARGET=filerec - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svl.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/filerec.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - +$(eval $(call gb_Module_Module,svtools)) + +$(eval $(call gb_Module_add_targets,svtools,\ + AllLangResTarget_productregistration \ + AllLangResTarget_svt \ + Executable_bmp \ + Executable_bmpsum \ + Executable_g2g \ + Library_hatchwindowfactory \ + Library_productregistration \ + Library_svt \ + Package_inc \ +)) + +#todo: javapatchres +#todo: jpeg on mac in svtools/util/makefile.mk +#todo: deliver errtxt.src as ehdl.srs +#todo: nooptfiles filter, filterconfigitem, FilterConfigCache, SvFilterOptionsDialog +#todo: map file + +# vim: set noet sw=4 ts=4: diff --git a/svtools/Package_inc.mk b/svtools/Package_inc.mk new file mode 100644 index 000000000000..f6a48e845679 --- /dev/null +++ b/svtools/Package_inc.mk @@ -0,0 +1,192 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,svtools_inc,$(SRCDIR)/svtools/inc)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/AccessibleBrowseBoxObjType.hxx,svtools/AccessibleBrowseBoxObjType.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/DocumentInfoPreview.hxx,svtools/DocumentInfoPreview.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/FilterConfigItem.hxx,svtools/FilterConfigItem.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/QueryFolderName.hxx,svtools/QueryFolderName.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/acceleratorexecute.hxx,svtools/acceleratorexecute.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibilityoptions.hxx,svtools/accessibilityoptions.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessiblefactory.hxx,svtools/accessiblefactory.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibletable.hxx,svtools/accessibletable.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/accessibletableprovider.hxx,svtools/accessibletableprovider.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/addresstemplate.hxx,svtools/addresstemplate.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/apearcfg.hxx,svtools/apearcfg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/asynclink.hxx,svtools/asynclink.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/brwbox.hxx,svtools/brwbox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/brwhead.hxx,svtools/brwhead.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/calendar.hxx,svtools/calendar.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/chartprettypainter.hxx,svtools/chartprettypainter.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/cliplistener.hxx,svtools/cliplistener.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/colctrl.hxx,svtools/colctrl.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/collatorres.hxx,svtools/collatorres.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/colorcfg.hxx,svtools/colorcfg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/colrdlg.hxx,svtools/colrdlg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/contextmenuhelper.hxx,svtools/contextmenuhelper.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/controldims.hrc,svtools/controldims.hrc)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ctrlbox.hxx,svtools/ctrlbox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ctrltool.hxx,svtools/ctrltool.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/dialogclosedlistener.hxx,svtools/dialogclosedlistener.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/dialogcontrolling.hxx,svtools/dialogcontrolling.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/editbrowsebox.hxx,svtools/editbrowsebox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/editimplementation.hxx,svtools/editimplementation.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/editsyntaxhighlighter.hxx,svtools/editsyntaxhighlighter.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ehdl.hxx,svtools/ehdl.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/embedhlp.hxx,svtools/embedhlp.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/embedtransfer.hxx,svtools/embedtransfer.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/expander.hxx,svtools/expander.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/extcolorcfg.hxx,svtools/extcolorcfg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/extensionlistbox.hxx,svtools/extensionlistbox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filectrl.hxx,svtools/filectrl.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filedlg.hxx,svtools/filedlg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filedlg2.hrc,svtools/filedlg2.hrc)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fileurlbox.hxx,svtools/fileurlbox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fileview.hxx,svtools/fileview.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/filter.hxx,svtools/filter.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fixedhyper.hxx,svtools/fixedhyper.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fltcall.hxx,svtools/fltcall.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fltdefs.hxx,svtools/fltdefs.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fmtfield.hxx,svtools/fmtfield.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/fontsubstconfig.hxx,svtools/fontsubstconfig.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/framestatuslistener.hxx,svtools/framestatuslistener.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/generictoolboxcontroller.hxx,svtools/generictoolboxcontroller.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/genericunodialog.hxx,svtools/genericunodialog.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/grfmgr.hxx,svtools/grfmgr.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/headbar.hxx,svtools/headbar.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/helpagentwindow.hxx,svtools/helpagentwindow.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/helpid.hrc,svtools/helpid.hrc)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/helpopt.hxx,svtools/helpopt.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/htmlcfg.hxx,svtools/htmlcfg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/htmlkywd.hxx,svtools/htmlkywd.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/htmlout.hxx,svtools/htmlout.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/htmltokn.h,svtools/htmltokn.h)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/hyperlabel.hxx,svtools/hyperlabel.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imagemgr.hrc,svtools/imagemgr.hrc)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imagemgr.hxx,svtools/imagemgr.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imageresourceaccess.hxx,svtools/imageresourceaccess.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imap.hxx,svtools/imap.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imapcirc.hxx,svtools/imapcirc.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imapobj.hxx,svtools/imapobj.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imappoly.hxx,svtools/imappoly.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imaprect.hxx,svtools/imaprect.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/imgdef.hxx,svtools/imgdef.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/indexentryres.hxx,svtools/indexentryres.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/inetimg.hxx,svtools/inetimg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/inettbc.hxx,svtools/inettbc.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/insdlg.hxx,svtools/insdlg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/itemdel.hxx,svtools/itemdel.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ivctrl.hxx,svtools/ivctrl.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/javacontext.hxx,svtools/javacontext.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/javainteractionhandler.hxx,svtools/javainteractionhandler.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/langtab.hxx,svtools/langtab.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/localresaccess.hxx,svtools/localresaccess.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/menuoptions.hxx,svtools/menuoptions.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/miscopt.hxx,svtools/miscopt.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/optionsdrawinglayer.hxx,svtools/optionsdrawinglayer.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/parhtml.hxx,svtools/parhtml.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/parrtf.hxx,svtools/parrtf.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/popupmenucontrollerbase.hxx,svtools/popupmenucontrollerbase.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/popupwindowcontroller.hxx,svtools/popupwindowcontroller.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/prgsbar.hxx,svtools/prgsbar.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/printoptions.hxx,svtools/printoptions.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/prnsetup.hxx,svtools/prnsetup.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/roadmap.hxx,svtools/roadmap.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/roadmapwizard.hxx,svtools/roadmapwizard.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/rtfkeywd.hxx,svtools/rtfkeywd.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/rtfout.hxx,svtools/rtfout.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/rtftoken.h,svtools/rtftoken.h)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ruler.hxx,svtools/ruler.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/scriptedtext.hxx,svtools/scriptedtext.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/scrwin.hxx,svtools/scrwin.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/sfxecode.hxx,svtools/sfxecode.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/soerr.hxx,svtools/soerr.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/sores.hxx,svtools/sores.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/statusbarcontroller.hxx,svtools/statusbarcontroller.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/stdctrl.hxx,svtools/stdctrl.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/stdmenu.hxx,svtools/stdmenu.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/stringtransfer.hxx,svtools/stringtransfer.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svicnvw.hxx,svtools/svicnvw.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svlbitm.hxx,svtools/svlbitm.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svlbox.hxx,svtools/svlbox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svmedit.hxx,svtools/svmedit.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svmedit2.hxx,svtools/svmedit2.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svparser.hxx,svtools/svparser.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svtabbx.hxx,svtools/svtabbx.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svtdata.hxx,svtools/svtdata.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svtdllapi.h,svtools/svtdllapi.h)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svtools.hrc,svtools/svtools.hrc)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svtreebx.hxx,svtools/svtreebx.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/svxbox.hxx,svtools/svxbox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/sychconv.hxx,svtools/sychconv.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/syntaxhighlight.hxx,svtools/syntaxhighlight.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/tabbar.hxx,svtools/tabbar.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/abstracttablecontrol.hxx,svtools/table/abstracttablecontrol.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/defaultinputhandler.hxx,svtools/table/defaultinputhandler.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/gridtablerenderer.hxx,svtools/table/gridtablerenderer.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablecontrol.hxx,svtools/table/tablecontrol.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tabledatawindow.hxx,svtools/table/tabledatawindow.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tableinputhandler.hxx,svtools/table/tableinputhandler.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablemodel.hxx,svtools/table/tablemodel.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tablerenderer.hxx,svtools/table/tablerenderer.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/table/tabletypes.hxx,svtools/table/tabletypes.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/taskbar.hxx,svtools/taskbar.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/templatefoldercache.hxx,svtools/templatefoldercache.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/templdlg.hxx,svtools/templdlg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/testtool.hxx,svtools/testtool.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/textdata.hxx,svtools/textdata.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/texteng.hxx,svtools/texteng.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/textview.hxx,svtools/textview.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/textwindowpeer.hxx,svtools/textwindowpeer.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolbarmenu.hxx,svtools/toolbarmenu.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolboxcontroller.hxx,svtools/toolboxcontroller.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/decklayouter.hxx,svtools/toolpanel/decklayouter.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/drawerlayouter.hxx,svtools/toolpanel/drawerlayouter.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/paneltabbar.hxx,svtools/toolpanel/paneltabbar.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/refbase.hxx,svtools/toolpanel/refbase.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/tabalignment.hxx,svtools/toolpanel/tabalignment.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/tabitemcontent.hxx,svtools/toolpanel/tabitemcontent.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/tablayouter.hxx,svtools/toolpanel/tablayouter.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/toolpanel.hxx,svtools/toolpanel/toolpanel.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/toolpanel/toolpaneldeck.hxx,svtools/toolpanel/toolpaneldeck.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/tooltiplbox.hxx,svtools/tooltiplbox.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/transfer.hxx,svtools/transfer.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/treelist.hxx,svtools/treelist.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/ttprops.hxx,svtools/ttprops.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/txtattr.hxx,svtools/txtattr.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/txtcmp.hxx,svtools/txtcmp.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/unitconv.hxx,svtools/unitconv.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/unoevent.hxx,svtools/unoevent.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/unoimap.hxx,svtools/unoimap.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/urlcontrol.hxx,svtools/urlcontrol.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/valueset.hxx,svtools/valueset.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/wallitem.hxx,svtools/wallitem.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/wizardmachine.hxx,svtools/wizardmachine.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/wizdlg.hxx,svtools/wizdlg.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/wmf.hxx,svtools/wmf.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/xtextedt.hxx,svtools/xtextedt.hxx)) +$(eval $(call gb_Package_add_file,svtools_inc,inc/svtools/xwindowitem.hxx,svtools/xwindowitem.hxx)) diff --git a/svtools/bmpmaker/bmp.cxx b/svtools/bmpmaker/bmp.cxx index 5b473b0289c2..76a4d3ef4043 100644 --- a/svtools/bmpmaker/bmp.cxx +++ b/svtools/bmpmaker/bmp.cxx @@ -41,7 +41,7 @@ using namespace std; #include <vcl/svapp.hxx> #include "svl/solar.hrc" -#include "filedlg.hxx" +#include <svtools/filedlg.hxx> #include "bmpcore.hxx" #include "bmp.hrc" diff --git a/svtools/bmpmaker/makefile.mk b/svtools/bmpmaker/makefile.mk deleted file mode 100644 index a1303343a503..000000000000 --- a/svtools/bmpmaker/makefile.mk +++ /dev/null @@ -1,74 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. -PRJNAME=svtools -TARGET=bmp -LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -ENABLE_EXCEPTIONS=true - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -OBJFILES= $(OBJ)$/bmp.obj \ - $(OBJ)$/bmpcore.obj \ - $(OBJ)$/g2g.obj \ - $(OBJ)$/bmpsum.obj - -# --- APP1TARGET --------------------------------------------------- - -APP1TARGET= $(TARGET) - -APP1STDLIBS = \ - $(VCLLIB) \ - $(TOOLSLIB) \ - $(VOSLIB) \ - $(SALLIB) - -APP1OBJS= $(OBJ)$/bmp.obj \ - $(OBJ)$/bmpcore.obj - -APP1BASE=0x10000000 - -# --- APP2TARGET -------------------------------------------------- - -APP2TARGET = bmpsum -APP2BASE = 0x10000000 -APP2OBJS = $(OBJ)$/bmpsum.obj - -APP2STDLIBS = $(VCLLIB) \ - $(TOOLSLIB) \ - $(VOSLIB) \ - $(SALLIB) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/inc/makefile.mk b/svtools/inc/makefile.mk deleted file mode 100644 index cde85ffe82ca..000000000000 --- a/svtools/inc/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=.. - -PRJNAME=svtools -TARGET=inc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" - diff --git a/svtools/inc/pch/precompiled_svtools.hxx b/svtools/inc/pch/precompiled_svtools.hxx index ddedfc5a0369..ebabe33af690 100644 --- a/svtools/inc/pch/precompiled_svtools.hxx +++ b/svtools/inc/pch/precompiled_svtools.hxx @@ -419,8 +419,8 @@ #include <unotools/processfactory.hxx> #include <vcl/dndhelp.hxx> -#include <vcl/fldunit.hxx> -#include <vcl/mapunit.hxx> +#include <tools/fldunit.hxx> +#include <tools/mapunit.hxx> #include <vcl/unohelp.hxx> #include <vos/mutex.hxx> diff --git a/svtools/inc/DocumentInfoPreview.hxx b/svtools/inc/svtools/DocumentInfoPreview.hxx index ae57b1a68b32..ae57b1a68b32 100644 --- a/svtools/inc/DocumentInfoPreview.hxx +++ b/svtools/inc/svtools/DocumentInfoPreview.hxx diff --git a/svtools/inc/QueryFolderName.hxx b/svtools/inc/svtools/QueryFolderName.hxx index 971b4b26e13e..971b4b26e13e 100644 --- a/svtools/inc/QueryFolderName.hxx +++ b/svtools/inc/svtools/QueryFolderName.hxx diff --git a/svtools/inc/acceleratorexecute.hxx b/svtools/inc/svtools/acceleratorexecute.hxx index 3ee79e1fca0c..3ee79e1fca0c 100644 --- a/svtools/inc/acceleratorexecute.hxx +++ b/svtools/inc/svtools/acceleratorexecute.hxx diff --git a/svtools/inc/addresstemplate.hxx b/svtools/inc/svtools/addresstemplate.hxx index f29ea2478b4e..bb4ee44647e9 100644 --- a/svtools/inc/addresstemplate.hxx +++ b/svtools/inc/svtools/addresstemplate.hxx @@ -33,7 +33,7 @@ #include <vcl/group.hxx> #include <vcl/fixed.hxx> #include <vcl/combobox.hxx> -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #include <vcl/lstbox.hxx> #include <vcl/scrbar.hxx> #include <com/sun/star/container/XNameAccess.hpp> diff --git a/svtools/inc/apearcfg.hxx b/svtools/inc/svtools/apearcfg.hxx index 8e6018424c4c..5dea74761e17 100644 --- a/svtools/inc/apearcfg.hxx +++ b/svtools/inc/svtools/apearcfg.hxx @@ -37,14 +37,6 @@ class Application; Beschreibung: --------------------------------------------------------------------*/ typedef enum { - LookStardivision = 0, - LookMotif, - LookWindows, - LookOSTwo, - LookMacintosh -} SystemLook; - -typedef enum { SnapToButton = 0, SnapToMiddle, NoSnap @@ -59,7 +51,6 @@ typedef enum { // MUST match the order chosen in ListBox LB_DRAG_MODE in optgdlg class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem { - short nLookNFeel ; short nDragMode ; short nScaleFactor ; short nSnapMode ; @@ -69,8 +60,6 @@ class SVT_DLLPUBLIC SvtTabAppearanceCfg : public utl::ConfigItem #endif BOOL bMenuMouseFollow ; - BOOL bSingleLineTabCtrl ; - BOOL bColoredTabCtrl ; #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) BOOL bFontAntialiasing ; #endif @@ -86,9 +75,6 @@ public: virtual void Commit(); virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& _rPropertyNames); - USHORT GetLookNFeel () const { return nLookNFeel; } - void SetLookNFeel ( USHORT nSet ); - USHORT GetDragMode () const { return nDragMode; } void SetDragMode ( USHORT nSet ); @@ -106,9 +92,6 @@ public: void SetMenuMouseFollow(BOOL bSet) {bMenuMouseFollow = bSet; SetModified();} BOOL IsMenuMouseFollow() const{return bMenuMouseFollow;} - void SetSingleLineTabCtrl(BOOL bSet) {bSingleLineTabCtrl = bSet; SetModified();} - BOOL IsSingleLineTabCtrl()const {return bSingleLineTabCtrl;} - #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) void SetFontAntiAliasing( BOOL bSet ) { bFontAntialiasing = bSet; SetModified(); } BOOL IsFontAntiAliasing() const { return bFontAntialiasing; } @@ -117,9 +100,6 @@ public: void SetFontAntialiasingMinPixelHeight( USHORT _nMinHeight ) { nAAMinPixelHeight = _nMinHeight; SetModified(); } #endif - void SetColoredTabCtrl(BOOL bSet) {bColoredTabCtrl = bSet; SetModified();}; - BOOL IsColoredTabCtrl()const {return bColoredTabCtrl;} - static sal_Bool IsInitialized() { return bInitialized; } static void SetInitialized() { bInitialized = sal_True; } }; diff --git a/svtools/inc/asynclink.hxx b/svtools/inc/svtools/asynclink.hxx index 41c6f3e92388..41c6f3e92388 100644 --- a/svtools/inc/asynclink.hxx +++ b/svtools/inc/svtools/asynclink.hxx diff --git a/svtools/inc/calendar.hxx b/svtools/inc/svtools/calendar.hxx index f85887873bb0..f85887873bb0 100644 --- a/svtools/inc/calendar.hxx +++ b/svtools/inc/svtools/calendar.hxx diff --git a/svtools/inc/cliplistener.hxx b/svtools/inc/svtools/cliplistener.hxx index ab20d6d7aa20..ab20d6d7aa20 100644 --- a/svtools/inc/cliplistener.hxx +++ b/svtools/inc/svtools/cliplistener.hxx diff --git a/svtools/inc/collatorres.hxx b/svtools/inc/svtools/collatorres.hxx index 63b4e7ef64f3..63b4e7ef64f3 100644 --- a/svtools/inc/collatorres.hxx +++ b/svtools/inc/svtools/collatorres.hxx diff --git a/svtools/inc/contextmenuhelper.hxx b/svtools/inc/svtools/contextmenuhelper.hxx index 54d254309b1e..54d254309b1e 100644 --- a/svtools/inc/contextmenuhelper.hxx +++ b/svtools/inc/svtools/contextmenuhelper.hxx diff --git a/svtools/inc/controldims.hrc b/svtools/inc/svtools/controldims.hrc index 5e26f132897d..5e26f132897d 100644 --- a/svtools/inc/controldims.hrc +++ b/svtools/inc/svtools/controldims.hrc diff --git a/svtools/inc/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx index 9e6e942daf1e..9e6e942daf1e 100644 --- a/svtools/inc/ctrlbox.hxx +++ b/svtools/inc/svtools/ctrlbox.hxx diff --git a/svtools/inc/ctrltool.hxx b/svtools/inc/svtools/ctrltool.hxx index a0eb5db2b955..a0eb5db2b955 100644 --- a/svtools/inc/ctrltool.hxx +++ b/svtools/inc/svtools/ctrltool.hxx diff --git a/svtools/inc/dialogclosedlistener.hxx b/svtools/inc/svtools/dialogclosedlistener.hxx index 3712d408af52..3712d408af52 100644 --- a/svtools/inc/dialogclosedlistener.hxx +++ b/svtools/inc/svtools/dialogclosedlistener.hxx diff --git a/svtools/inc/dialogcontrolling.hxx b/svtools/inc/svtools/dialogcontrolling.hxx index cd60736527f5..cd60736527f5 100644 --- a/svtools/inc/dialogcontrolling.hxx +++ b/svtools/inc/svtools/dialogcontrolling.hxx diff --git a/svtools/inc/svtools/editbrowsebox.hxx b/svtools/inc/svtools/editbrowsebox.hxx index f97449e1880c..26ff11e11ca2 100644 --- a/svtools/inc/svtools/editbrowsebox.hxx +++ b/svtools/inc/svtools/editbrowsebox.hxx @@ -37,7 +37,7 @@ #include <vcl/lstbox.hxx> #ifndef _IMAGEBTN_HXX -#include <vcl/imagebtn.hxx> +#include <vcl/button.hxx> #endif #include <svtools/brwbox.hxx> #include <vcl/timer.hxx> diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx index 098b565385ec..bc9770c1bcc8 100644 --- a/svtools/inc/svtools/embedhlp.hxx +++ b/svtools/inc/svtools/embedhlp.hxx @@ -34,9 +34,7 @@ #include <com/sun/star/embed/Aspects.hpp> #include <com/sun/star/io/XInputStream.hpp> #include <vcl/graph.hxx> -#ifndef _SV_MAPUNIT_HXX -#include <vcl/mapunit.hxx> -#endif +#include <tools/mapunit.hxx> #include <rtl/ustring.hxx> #define NS_UNO ::com::sun::star::uno diff --git a/svtools/inc/expander.hxx b/svtools/inc/svtools/expander.hxx index c0f3cfc7632a..c0f3cfc7632a 100644 --- a/svtools/inc/expander.hxx +++ b/svtools/inc/svtools/expander.hxx diff --git a/svtools/inc/extcolorcfg.hxx b/svtools/inc/svtools/extcolorcfg.hxx index 44167f63287c..44167f63287c 100644 --- a/svtools/inc/extcolorcfg.hxx +++ b/svtools/inc/svtools/extcolorcfg.hxx diff --git a/svtools/inc/filectrl.hxx b/svtools/inc/svtools/filectrl.hxx index dd314bb23ca1..dd314bb23ca1 100644 --- a/svtools/inc/filectrl.hxx +++ b/svtools/inc/svtools/filectrl.hxx diff --git a/svtools/inc/filedlg.hxx b/svtools/inc/svtools/filedlg.hxx index c04e48fc7658..c04e48fc7658 100644 --- a/svtools/inc/filedlg.hxx +++ b/svtools/inc/svtools/filedlg.hxx diff --git a/svtools/inc/filedlg2.hrc b/svtools/inc/svtools/filedlg2.hrc index a87bd6ebcad0..a87bd6ebcad0 100644 --- a/svtools/inc/filedlg2.hrc +++ b/svtools/inc/svtools/filedlg2.hrc diff --git a/svtools/inc/fileview.hxx b/svtools/inc/svtools/fileview.hxx index db704a0e6784..db704a0e6784 100644 --- a/svtools/inc/fileview.hxx +++ b/svtools/inc/svtools/fileview.hxx diff --git a/svtools/inc/fltdefs.hxx b/svtools/inc/svtools/fltdefs.hxx index 86462c2faa33..86462c2faa33 100644 --- a/svtools/inc/fltdefs.hxx +++ b/svtools/inc/svtools/fltdefs.hxx diff --git a/svtools/inc/fontsubstconfig.hxx b/svtools/inc/svtools/fontsubstconfig.hxx index 7bdb0dc412c3..7bdb0dc412c3 100644 --- a/svtools/inc/fontsubstconfig.hxx +++ b/svtools/inc/svtools/fontsubstconfig.hxx diff --git a/svtools/inc/framestatuslistener.hxx b/svtools/inc/svtools/framestatuslistener.hxx index fd068ac5f86b..fd068ac5f86b 100644 --- a/svtools/inc/framestatuslistener.hxx +++ b/svtools/inc/svtools/framestatuslistener.hxx diff --git a/svtools/inc/helpagentwindow.hxx b/svtools/inc/svtools/helpagentwindow.hxx index 45b2917c500a..45b2917c500a 100644 --- a/svtools/inc/helpagentwindow.hxx +++ b/svtools/inc/svtools/helpagentwindow.hxx diff --git a/svtools/inc/htmlkywd.hxx b/svtools/inc/svtools/htmlkywd.hxx index 13928eaeaa39..13928eaeaa39 100644 --- a/svtools/inc/htmlkywd.hxx +++ b/svtools/inc/svtools/htmlkywd.hxx diff --git a/svtools/inc/htmltokn.h b/svtools/inc/svtools/htmltokn.h index 7c43c1463e25..7c43c1463e25 100644 --- a/svtools/inc/htmltokn.h +++ b/svtools/inc/svtools/htmltokn.h diff --git a/svtools/inc/imagemgr.hrc b/svtools/inc/svtools/imagemgr.hrc index 19cc2942d6f4..19cc2942d6f4 100644 --- a/svtools/inc/imagemgr.hrc +++ b/svtools/inc/svtools/imagemgr.hrc diff --git a/svtools/inc/imagemgr.hxx b/svtools/inc/svtools/imagemgr.hxx index efd15c5f4cde..efd15c5f4cde 100644 --- a/svtools/inc/imagemgr.hxx +++ b/svtools/inc/svtools/imagemgr.hxx diff --git a/svtools/inc/imageresourceaccess.hxx b/svtools/inc/svtools/imageresourceaccess.hxx index d77b1c97a512..d77b1c97a512 100644 --- a/svtools/inc/imageresourceaccess.hxx +++ b/svtools/inc/svtools/imageresourceaccess.hxx diff --git a/svtools/inc/imgdef.hxx b/svtools/inc/svtools/imgdef.hxx index 7cdcec0fd642..7cdcec0fd642 100644 --- a/svtools/inc/imgdef.hxx +++ b/svtools/inc/svtools/imgdef.hxx diff --git a/svtools/inc/indexentryres.hxx b/svtools/inc/svtools/indexentryres.hxx index f2c73000ed67..f2c73000ed67 100644 --- a/svtools/inc/indexentryres.hxx +++ b/svtools/inc/svtools/indexentryres.hxx diff --git a/svtools/inc/inetimg.hxx b/svtools/inc/svtools/inetimg.hxx index 924bbad831d6..924bbad831d6 100644 --- a/svtools/inc/inetimg.hxx +++ b/svtools/inc/svtools/inetimg.hxx diff --git a/svtools/inc/itemdel.hxx b/svtools/inc/svtools/itemdel.hxx index 51af97730079..51af97730079 100644 --- a/svtools/inc/itemdel.hxx +++ b/svtools/inc/svtools/itemdel.hxx diff --git a/svtools/inc/ivctrl.hxx b/svtools/inc/svtools/ivctrl.hxx index 5bea4675b62e..5bea4675b62e 100644 --- a/svtools/inc/ivctrl.hxx +++ b/svtools/inc/svtools/ivctrl.hxx diff --git a/svtools/inc/localresaccess.hxx b/svtools/inc/svtools/localresaccess.hxx index c72f68f64f03..c72f68f64f03 100644 --- a/svtools/inc/localresaccess.hxx +++ b/svtools/inc/svtools/localresaccess.hxx diff --git a/svtools/inc/prgsbar.hxx b/svtools/inc/svtools/prgsbar.hxx index c02d400c6931..c02d400c6931 100644 --- a/svtools/inc/prgsbar.hxx +++ b/svtools/inc/svtools/prgsbar.hxx diff --git a/svtools/inc/svtools/printdlg.hxx b/svtools/inc/svtools/printdlg.hxx deleted file mode 100644 index 8c455b910b41..000000000000 --- a/svtools/inc/svtools/printdlg.hxx +++ /dev/null @@ -1,297 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_PRINTDLG_HXX_ -#define _SV_PRINTDLG_HXX_ - -#include "svtools/svtdllapi.h" - -#ifndef _VCL_DIALOG_HXX -#include <vcl/dialog.hxx> -#endif -#ifndef _VCL_FIXED_HXX -#include <vcl/fixed.hxx> -#endif -#ifndef _VCL_BUTTON_HXX -#include <vcl/button.hxx> -#endif -#ifndef _VCL_GROUP_HXX -#include <vcl/group.hxx> -#endif -#ifndef _VCL_FIELD_HXX -#include <vcl/field.hxx> -#endif -#ifndef _VCL_EDIT_HXX -#include <vcl/edit.hxx> -#endif -#ifndef _VCL_LSTBOX_HXX -#include <vcl/lstbox.hxx> -#endif -#include <svtools/stdctrl.hxx> - -class Printer; -class QueueInfo; -struct SvtPrinterImpl; - -// --------------------- -// - PrintDialog-Types - -// --------------------- - -enum PrintDialogRange{ - PRINTDIALOG_ALL, PRINTDIALOG_SELECTION, PRINTDIALOG_FROMTO, PRINTDIALOG_RANGE }; - -enum PrintSheetRange -{ - PRINTSHEETS_ALL, - PRINTSHEETS_SELECTED_SHEETS, - PRINTSHEETS_SELECTED_CELLS -}; - - -// --------------- -// - PrintDialog - -// --------------- - -class SVT_DLLPUBLIC PrintDialog : public ModalDialog -{ -private: - FixedLine maFlPrinter; - FixedText maFtName; - ListBox maLbName; - PushButton maBtnProperties; - FixedText maFtStatus; - FixedInfo maFiStatus; - FixedText maFtType; - FixedInfo maFiType; - FixedText maFtLocation; - FixedInfo maFiLocation; - FixedText maFtComment; - FixedInfo maFiComment; - - // "Print to file" or "Fax number" - CheckBox maCbxFilePrint; - FixedInfo maFiPrintFile; - FixedText maFiFaxNo; - Edit maEdtFaxNo; - //PushButton maBtnBrowse_nomore; - - // "Print" - FixedLine maFlPrint; - RadioButton maRbtAllSheets; - RadioButton maRbtSelectedSheets; - RadioButton maRbtSelectedCells; - - // "Print range" - FixedLine maFlPrintRange; - RadioButton maRbtAll; - RadioButton maRbtPages; - RadioButton maRbtSelection; - Edit maEdtPages; - - FixedLine maFlSepCopiesRange; - - // "Copies" - FixedLine maFlCopies; - FixedText maFtCopies; - NumericField maNumCopies; - FixedImage maImgCollate; - FixedImage maImgNotCollate; - CheckBox maCbxCollate; - - FixedLine maFlSepButtonLine; - PushButton maBtnOptions; - OKButton maBtnOK; - CancelButton maBtnCancel; - HelpButton maBtnHelp; - - AutoTimer maStatusTimer; - Printer* mpPrinter; - SvtPrinterImpl* mpPrinterImpl; - - XubString maRangeText; - USHORT mnCopyCount; - USHORT mnFirstPage; - USHORT mnLastPage; - USHORT mnMinPage; - USHORT mnMaxPage; - PrintDialogRange meCheckRange; - BOOL mbAll; - BOOL mbSelection; - BOOL mbFromTo; - BOOL mbRange; - BOOL mbCollate; - BOOL mbCollateCheck; - BOOL mbOptions; - bool mbWithSheetsAndCells; - Link maOptionsHdlLink; // Link zum Options-Handler - Link maOKHdlLink; // Link zum OK-Handler - - String maAllFilterStr; - - SVT_DLLPRIVATE void ImplCheckOK(); - SVT_DLLPRIVATE void ImplInitControls(); - SVT_DLLPRIVATE void ImplFillDialogData(); - SVT_DLLPRIVATE void ImplSetInfo(); - SVT_DLLPRIVATE void ImplSetImages(); - SVT_DLLPRIVATE bool ImplGetFilename(); - - DECL_DLLPRIVATE_LINK( ImplPropertiesHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplChangePrinterHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplModifyControlHdl, void* ); - DECL_DLLPRIVATE_LINK( ImplStatusHdl, Timer* ); - -public: - PrintDialog( Window* pWindow, bool bWithSheetsAndCells ); - ~PrintDialog(); - - virtual long OK(); - virtual long ClickOptionsHdl(); - - void SetPrinter( Printer* pNewPrinter ) { mpPrinter = pNewPrinter; } - Printer* GetPrinter() const { return mpPrinter; } - - inline bool IsSheetRangeAvailable() const { return mbWithSheetsAndCells; } - void EnableSheetRange( bool bEnable, PrintSheetRange eRange ); - bool IsSheetRangeEnabled( PrintSheetRange eRange ) const; - void CheckSheetRange( PrintSheetRange eRange ); - PrintSheetRange GetCheckedSheetRange() const; - bool IsSheetRangeChecked( PrintSheetRange eRange ) const; - - void EnableRange( PrintDialogRange eRange ); - void DisableRange( PrintDialogRange eRange ); - BOOL IsRangeEnabled( PrintDialogRange eRange ) const; - - void CheckRange( PrintDialogRange eRange = PRINTDIALOG_ALL ) - { meCheckRange = eRange; } - PrintDialogRange GetCheckedRange() const { return meCheckRange; } - BOOL IsRangeChecked( PrintDialogRange eRange ) const; - - void SetRangeText( const XubString& rRange ) { maRangeText = rRange; } - const XubString& GetRangeText() const { return maRangeText; } - - void SetFirstPage( USHORT nPage = 0 ); - USHORT GetFirstPage() const { return mnFirstPage; } - void SetLastPage( USHORT nPage = 0 ); - USHORT GetLastPage() const { return mnLastPage; } - - void SetMinPage( USHORT nPage = 1 ) { mnMinPage = nPage; } - USHORT GetMinPage() const { return mnMinPage; } - void SetMaxPage( USHORT nPage = 65535 ) { mnMaxPage = nPage; } - USHORT GetMaxPage() const { return mnMaxPage; } - - void SetCopyCount( USHORT nCopies = 1 ) { mnCopyCount = nCopies; } - USHORT GetCopyCount() const { return mnCopyCount; } - - void EnableCollate( BOOL bEnable = TRUE ) - { mbCollate = bEnable; } - BOOL IsCollateEnabled() const { return mbCollate; } - void CheckCollate( BOOL bCheck = TRUE ) - { mbCollateCheck = bCheck; } - BOOL IsCollateChecked() const { return mbCollateCheck; } - - void ShowOptionsButton( BOOL bShow = TRUE ) - { mbOptions = bShow; } - BOOL IsOptionsButtonVisible() const { return mbOptions; } - - void SetOptionsHdl( const Link& rLink ) { maOptionsHdlLink = rLink; } - const Link& GetOptionsHdl() const { return maOptionsHdlLink; } - - void SetOKHdl( const Link& rLink ) { maOKHdlLink = rLink; } - const Link& GetOKHdl() const { return maOKHdlLink; } - - virtual void DataChanged( const DataChangedEvent& rDCEvt ); - virtual long Notify( NotifyEvent& rNEvt ); - - virtual short Execute(); - - void DisableHelp(); -}; - -inline void PrintDialog::EnableRange( PrintDialogRange eRange ) -{ - if ( eRange == PRINTDIALOG_ALL ) - mbAll = TRUE; - else if ( eRange == PRINTDIALOG_SELECTION ) - mbSelection = TRUE; - else if ( eRange == PRINTDIALOG_FROMTO ) - mbFromTo = TRUE; - else - mbRange = TRUE; -} - -inline void PrintDialog::DisableRange( PrintDialogRange eRange ) -{ - if ( eRange == PRINTDIALOG_ALL ) - mbAll = FALSE; - else if ( eRange == PRINTDIALOG_SELECTION ) - mbSelection = FALSE; - else if ( eRange == PRINTDIALOG_FROMTO ) - mbFromTo = FALSE; - else - mbRange = FALSE; -} - -inline BOOL PrintDialog::IsRangeEnabled( PrintDialogRange eRange ) const -{ - BOOL bRet; - - if ( eRange == PRINTDIALOG_ALL ) - bRet = mbAll; - else if ( eRange == PRINTDIALOG_SELECTION ) - bRet = mbSelection; - else if ( eRange == PRINTDIALOG_FROMTO ) - bRet = mbFromTo; - else - bRet = mbRange; - - return bRet; -} - -inline BOOL PrintDialog::IsRangeChecked( PrintDialogRange eRange ) const -{ - if ( eRange == meCheckRange ) - return TRUE; - else - return FALSE; -} - -inline void PrintDialog::SetFirstPage( USHORT nPage ) -{ - mnFirstPage = nPage; - if ( nPage && (nPage < mnMinPage) ) - mnMinPage = nPage; -} - -inline void PrintDialog::SetLastPage( USHORT nPage ) -{ - mnLastPage = nPage; - if ( nPage && (nPage > mnMaxPage) ) - mnMaxPage = nPage; -} - -#endif // _SV_PRINTDLG_HXX_ - diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/svtools/roadmap.hxx index ff94cc966f4d..ff94cc966f4d 100644 --- a/svtools/inc/roadmap.hxx +++ b/svtools/inc/svtools/roadmap.hxx diff --git a/svtools/inc/rtfkeywd.hxx b/svtools/inc/svtools/rtfkeywd.hxx index de59e1d8faf9..de59e1d8faf9 100644 --- a/svtools/inc/rtfkeywd.hxx +++ b/svtools/inc/svtools/rtfkeywd.hxx diff --git a/svtools/inc/rtfout.hxx b/svtools/inc/svtools/rtfout.hxx index b9bfbc901848..b9bfbc901848 100644 --- a/svtools/inc/rtfout.hxx +++ b/svtools/inc/svtools/rtfout.hxx diff --git a/svtools/inc/rtftoken.h b/svtools/inc/svtools/rtftoken.h index f292682a0236..f292682a0236 100644 --- a/svtools/inc/rtftoken.h +++ b/svtools/inc/svtools/rtftoken.h diff --git a/svtools/inc/ruler.hxx b/svtools/inc/svtools/ruler.hxx index c2649b298ba6..c2649b298ba6 100644 --- a/svtools/inc/ruler.hxx +++ b/svtools/inc/svtools/ruler.hxx diff --git a/svtools/inc/scriptedtext.hxx b/svtools/inc/svtools/scriptedtext.hxx index 5bb89969785b..5bb89969785b 100644 --- a/svtools/inc/scriptedtext.hxx +++ b/svtools/inc/svtools/scriptedtext.hxx diff --git a/svtools/inc/scrwin.hxx b/svtools/inc/svtools/scrwin.hxx index 1542ed667133..1542ed667133 100644 --- a/svtools/inc/scrwin.hxx +++ b/svtools/inc/svtools/scrwin.hxx diff --git a/svtools/inc/sfxecode.hxx b/svtools/inc/svtools/sfxecode.hxx index 59611eb35844..59611eb35844 100644 --- a/svtools/inc/sfxecode.hxx +++ b/svtools/inc/svtools/sfxecode.hxx diff --git a/svtools/inc/soerr.hxx b/svtools/inc/svtools/soerr.hxx index 41e488480039..41e488480039 100644 --- a/svtools/inc/soerr.hxx +++ b/svtools/inc/svtools/soerr.hxx diff --git a/svtools/inc/sores.hxx b/svtools/inc/svtools/sores.hxx index e5a7e51b54cf..e5a7e51b54cf 100644 --- a/svtools/inc/sores.hxx +++ b/svtools/inc/svtools/sores.hxx diff --git a/svtools/inc/statusbarcontroller.hxx b/svtools/inc/svtools/statusbarcontroller.hxx index 7856d96bcd77..7856d96bcd77 100644 --- a/svtools/inc/statusbarcontroller.hxx +++ b/svtools/inc/svtools/statusbarcontroller.hxx diff --git a/svtools/inc/stdmenu.hxx b/svtools/inc/svtools/stdmenu.hxx index 1b7e9816a103..1b7e9816a103 100644 --- a/svtools/inc/stdmenu.hxx +++ b/svtools/inc/svtools/stdmenu.hxx diff --git a/svtools/inc/svtools/svmedit.hxx b/svtools/inc/svtools/svmedit.hxx index 3bdfdc44e8e9..9c8a4a34dbf6 100644 --- a/svtools/inc/svtools/svmedit.hxx +++ b/svtools/inc/svtools/svmedit.hxx @@ -28,7 +28,7 @@ #ifndef _SVEDIT_HXX #define _SVEDIT_HXX -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <vcl/edit.hxx> #include <svtools/syntaxhighlight.hxx> diff --git a/svtools/inc/svtools/svtdata.hxx b/svtools/inc/svtools/svtdata.hxx index eb5c5dad1b75..ad7b60b3f2b7 100644 --- a/svtools/inc/svtools/svtdata.hxx +++ b/svtools/inc/svtools/svtdata.hxx @@ -28,6 +28,7 @@ #ifndef _SVTOOLS_SVTDATA_HXX #define _SVTOOLS_SVTDATA_HXX +#include "svtools/svtdllapi.h" #include <tools/resid.hxx> #include <com/sun/star/lang/Locale.hpp> @@ -56,13 +57,11 @@ public: }; //============================================================================ -class SvtResId: public ResId +class SVT_DLLPUBLIC SvtResId: public ResId { public: - SvtResId(USHORT nId, const ::com::sun::star::lang::Locale aLocale): - ResId(nId, *ImpSvtData::GetSvtData().GetResMgr(aLocale)) {} - - SvtResId(USHORT nId): ResId(nId, *ImpSvtData::GetSvtData().GetResMgr()) {} + SvtResId(USHORT nId, const ::com::sun::star::lang::Locale aLocale); + SvtResId(USHORT nId); // VCL dependant, only available in SVT, not in SVL! }; diff --git a/svtools/inc/svtools/svtools.hrc b/svtools/inc/svtools/svtools.hrc index 3dd2f0706a2e..0461064f7d96 100644 --- a/svtools/inc/svtools/svtools.hrc +++ b/svtools/inc/svtools/svtools.hrc @@ -89,6 +89,10 @@ #define STR_BASICKEY_FORMAT_TRUE (RID_SVTOOLS_START+107) #define STR_BASICKEY_FORMAT_FALSE (RID_SVTOOLS_START+108) #define CONFIG_BASIC_FORMAT_END (RID_SVTOOLS_START+109) +#define STR_UNDO (RID_SVTOOLS_START+110) +#define STR_REDO (RID_SVTOOLS_START+111) +#define STR_REPEAT (RID_SVTOOLS_START+112) + #define STR_INVALIDTRYBUY (RID_SVTOOLS_START+120) #define STR_OLDTRYBUY (RID_SVTOOLS_START+121) diff --git a/svtools/inc/sychconv.hxx b/svtools/inc/svtools/sychconv.hxx index 4056556a2100..4056556a2100 100644 --- a/svtools/inc/sychconv.hxx +++ b/svtools/inc/svtools/sychconv.hxx diff --git a/svtools/inc/tabbar.hxx b/svtools/inc/svtools/tabbar.hxx index 2757811ba34e..2757811ba34e 100644 --- a/svtools/inc/tabbar.hxx +++ b/svtools/inc/svtools/tabbar.hxx diff --git a/svtools/inc/taskbar.hxx b/svtools/inc/svtools/taskbar.hxx index d4a6699e2d5e..d4a6699e2d5e 100644 --- a/svtools/inc/taskbar.hxx +++ b/svtools/inc/svtools/taskbar.hxx diff --git a/svtools/inc/templatefoldercache.hxx b/svtools/inc/svtools/templatefoldercache.hxx index 25d5080bd748..25d5080bd748 100644 --- a/svtools/inc/templatefoldercache.hxx +++ b/svtools/inc/svtools/templatefoldercache.hxx diff --git a/svtools/inc/templdlg.hxx b/svtools/inc/svtools/templdlg.hxx index f08f7cc8770d..f08f7cc8770d 100644 --- a/svtools/inc/templdlg.hxx +++ b/svtools/inc/svtools/templdlg.hxx diff --git a/svtools/inc/testtool.hxx b/svtools/inc/svtools/testtool.hxx index ea00fe33cdbf..ea00fe33cdbf 100644 --- a/svtools/inc/testtool.hxx +++ b/svtools/inc/svtools/testtool.hxx diff --git a/svtools/inc/tooltiplbox.hxx b/svtools/inc/svtools/tooltiplbox.hxx index e50d516f5aa1..e50d516f5aa1 100644 --- a/svtools/inc/tooltiplbox.hxx +++ b/svtools/inc/svtools/tooltiplbox.hxx diff --git a/svtools/inc/txtattr.hxx b/svtools/inc/svtools/txtattr.hxx index 29723a38129b..29723a38129b 100644 --- a/svtools/inc/txtattr.hxx +++ b/svtools/inc/svtools/txtattr.hxx diff --git a/svtools/inc/txtcmp.hxx b/svtools/inc/svtools/txtcmp.hxx index 7b30b76e69a7..7b30b76e69a7 100644 --- a/svtools/inc/txtcmp.hxx +++ b/svtools/inc/svtools/txtcmp.hxx diff --git a/svtools/inc/unoevent.hxx b/svtools/inc/svtools/unoevent.hxx index 5d5378bf909b..5d5378bf909b 100644 --- a/svtools/inc/unoevent.hxx +++ b/svtools/inc/svtools/unoevent.hxx diff --git a/svtools/inc/unoimap.hxx b/svtools/inc/svtools/unoimap.hxx index 9ed2afe8dc6c..9ed2afe8dc6c 100644 --- a/svtools/inc/unoimap.hxx +++ b/svtools/inc/svtools/unoimap.hxx diff --git a/svtools/inc/wallitem.hxx b/svtools/inc/svtools/wallitem.hxx index 533d5ae3f6d3..533d5ae3f6d3 100644 --- a/svtools/inc/wallitem.hxx +++ b/svtools/inc/svtools/wallitem.hxx diff --git a/svtools/prj/build.lst b/svtools/prj/build.lst index a7d8569de301..3f9e02b26ca3 100644 --- a/svtools/prj/build.lst +++ b/svtools/prj/build.lst @@ -1,33 +1,3 @@ -st svtools : l10n svl 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\bmpmaker nmake - all st_bmp st_inc NULL -st svtools\source\brwbox nmake - all st__brw st_bmp st_inc NULL -st svtools\source\config nmake - all st_conf st_inc NULL -st svtools\source\contnr nmake - all st__ctr st_inc NULL -st svtools\source\control nmake - all st_ctl st_inc NULL -st svtools\source\dialogs nmake - all st_dial st_inc NULL -st svtools\source\edit nmake - all st_edit st_inc NULL -st svtools\source\filter.vcl\filter nmake - all st_vfilt st_inc NULL -st svtools\source\filter.vcl\wmf nmake - all st_vwmf st_inc NULL -st svtools\source\filter.vcl\igif nmake - all st_vigif st_inc NULL -st svtools\source\filter.vcl\jpeg nmake - all st_vjpeg st_inc NULL -st svtools\source\filter.vcl\ixbm nmake - all st_vixbm st_inc NULL -st svtools\source\filter.vcl\ixpm nmake - all st_vixpm st_inc NULL -st svtools\source\graphic nmake - all st_svtgraphic st_inc NULL -st svtools\source\java nmake - all st_svtjava st_inc NULL -st svtools\source\misc nmake - all st__misc st_bmp st_inc NULL -st svtools\source\plugapp nmake - all st_papp st_inc NULL -st svtools\source\svhtml nmake - all st_html st_inc NULL -st svtools\source\svrtf nmake - all st_rtf st_inc NULL -st svtools\source\table nmake - all st_table st_inc NULL -st svtools\source\toolpanel nmake - all st_toolpanel st_inc NULL -st svtools\source\uno nmake - all st_uno st_inc NULL -st svtools\source\uno\wizard nmake - all st_uno_wiz st_inc NULL -st svtools\source\urlobj nmake - all st__url st_inc NULL -st svtools\util nmake - all st_util st_svtgraphic st__brw st__ctr st_conf st_ctl st_dial st_edit st__misc st__url st_html st_papp st_rtf st_table st_toolpanel st_uno st_uno_wiz st_vfilt st_vigif st_vixbm st_vixpm st_vjpeg st_vwmf st_svtjava NULL -st svtools\source\hatchwindow nmake - all st_hatchwin st_inc NULL -st svtools\source\productregistration nmake - all st_prodreg st_util st_inc NULL -st svtools\workben\unodialog nmake - all st_workben_udlg st_util NULL -st svtools\workben\toolpanel nmake - all st_workben_toolpanel st_util st_toolpanel NULL +st svtools : l10n svl offuh toolkit ucbhelper unotools JPEG:jpeg cppu cppuhelper comphelper sal sot jvmfwk LIBXSLT:libxslt NULL +st svtools\prj nmake - all st_prj NULL st svtools\qa\unoapi nmake - all st_qa_unoapi NULL diff --git a/svtools/prj/d.lst b/svtools/prj/d.lst index 7b9c6a1957e3..e69de29bb2d1 100644 --- a/svtools/prj/d.lst +++ b/svtools/prj/d.lst @@ -1,43 +0,0 @@ -mkdir: %COMMON_DEST%\bin%_EXT%\hid -mkdir: %COMMON_DEST%\res%_EXT% -mkdir: %_DEST%\inc%_EXT%\svtools -mkdir: %_DEST%\inc%_EXT%\svtools\toolpanel -mkdir: %_DEST%\inc%_EXT%\svtools\table - -..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid -..\%__SRC%\srs\ehdl.srs %_DEST%\res%_EXT%\svtools.srs -..\%COMMON_OUTDIR%\srs\ehdl_srs.hid %COMMON_DEST%\res%_EXT%\svtools_srs.hid -..\%__SRC%\lib\svtool.lib %_DEST%\lib%_EXT%\svtool.lib -..\%__SRC%\slb\svt.lib %_DEST%\lib%_EXT%\xsvtool.lib -..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\* -..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\* -..\%__SRC%\bin\bmp.* %_DEST%\bin%_EXT%\bmp.* -..\%__SRC%\bin\bmpsum.* %_DEST%\bin%_EXT%\bmpsum.* -..\%__SRC%\bin\bmpgui.* %_DEST%\bin%_EXT%\bmpgui.* -..\%__SRC%\bin\g2g.* %_DEST%\bin%_EXT%\g2g.* -..\%__SRC%\bin\bmp %_DEST%\bin%_EXT%\bmp -..\%__SRC%\bin\bmpsum %_DEST%\bin%_EXT%\bmpsum -..\%__SRC%\bin\bmpgui %_DEST%\bin%_EXT%\bmpgui -..\%__SRC%\bin\g2g %_DEST%\bin%_EXT%\g2g -..\%__SRC%\res\bmp.* %_DEST%\bin%_EXT%\bmp.* -..\%__SRC%\res\bmpgui.* %_DEST%\bin%_EXT%\bmpgui.* -..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\* -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\* - -..\inc\svtools\*.hxx %_DEST%\inc%_EXT%\svtools\*.hxx -..\inc\svtools\*.h %_DEST%\inc%_EXT%\svtools\*.h -..\inc\svtools\*.hrc %_DEST%\inc%_EXT%\svtools\*.hrc -..\inc\svtools\table\*.hxx %_DEST%\inc%_EXT%\svtools\table\*.hxx -..\inc\*.hxx %_DEST%\inc%_EXT%\svtools\*.hxx -..\inc\*.h %_DEST%\inc%_EXT%\svtools\*.h -..\inc\*.hrc %_DEST%\inc%_EXT%\svtools\*.hrc - -..\inc\svtools\toolpanel\*.* %_DEST%\inc%_EXT%\svtools\toolpanel\*.hrc - -dos: sh -c "if test %OS% = MACOSX; then macosx-create-bundle %_DEST%\bin%_EXT%\bmp=%__PRJROOT%\%__SRC%\bin%_EXT%; fi" - -*.xml %_DEST%\xml%_EXT%\*.xml - -..\%__SRC%\misc\hatchwindowfactory.component %_DEST%\xml%_EXT%\hatchwindowfactory.component -..\%__SRC%\misc\productregistration.uno.component %_DEST%\xml%_EXT%\productregistration.uno.component -..\%__SRC%\misc\svt.component %_DEST%\xml%_EXT%\svt.component diff --git a/toolkit/uiconfig/layout/makefile.mk b/svtools/prj/makefile.mk index 46d0b187b744..c73a3d944bbf 100644 --- a/toolkit/uiconfig/layout/makefile.mk +++ b/svtools/prj/makefile.mk @@ -25,30 +25,16 @@ # #************************************************************************* -PRJ=../.. -PRJNAME=toolkit -TARGET=layout +PRJ=.. +TARGET=prj .INCLUDE : settings.mk -.IF "$(ENABLE_LAYOUT)" == "TRUE" +.IF "$(VERBOSE)"!="" +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF -all: ALLTAR - -XML_FILES=\ - message-box.xml\ - tab-dialog.xml\ - -# - -.INCLUDE : layout.mk - -.ELSE # ENABLE_LAYOUT != TRUE -all .PHONY: -.ENDIF # ENABLE_LAYOUT != TRUE - -.INCLUDE : target.mk - -localize.sdf: - echo '#empty' | cat - > $@ - rm -f *-$@ +all: + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) diff --git a/svtools/source/brwbox/makefile.mk b/svtools/source/brwbox/makefile.mk deleted file mode 100644 index e195e0ef4859..000000000000 --- a/svtools/source/brwbox/makefile.mk +++ /dev/null @@ -1,59 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=browse - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES= editbrowsebox.src - -EXCEPTIONSFILES =\ - $(SLO)$/editbrowsebox2.obj \ - $(SLO)$/brwbox1.obj \ - $(SLO)$/brwbox3.obj - -SLOFILES= \ - $(EXCEPTIONSFILES) \ - $(SLO)$/ebbcontrols.obj \ - $(SLO)$/editbrowsebox.obj \ - $(SLO)$/brwbox2.obj \ - $(SLO)$/brwhead.obj \ - $(SLO)$/datwin.obj - - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx index 316e6ab34656..4a95d0c03dcd 100644 --- a/svtools/source/config/apearcfg.cxx +++ b/svtools/source/config/apearcfg.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "apearcfg.hxx" +#include <svtools/apearcfg.hxx> #include "com/sun/star/uno/Any.hxx" #include "tools/debug.hxx" @@ -52,7 +52,6 @@ sal_Bool SvtTabAppearanceCfg::bInitialized = sal_False; --------------------------------------------------------------------*/ SvtTabAppearanceCfg::SvtTabAppearanceCfg() :ConfigItem(OUString::createFromAscii("Office.Common/View")) - ,nLookNFeel ( DEFAULT_LOOKNFEEL ) ,nDragMode ( DEFAULT_DRAGMODE ) ,nScaleFactor ( DEFAULT_SCALEFACTOR ) ,nSnapMode ( DEFAULT_SNAPMODE ) @@ -61,8 +60,6 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg() ,nAAMinPixelHeight ( DEFAULT_AAMINHEIGHT ) #endif ,bMenuMouseFollow(FALSE) - ,bSingleLineTabCtrl(FALSE) - ,bColoredTabCtrl(FALSE) #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) ,bFontAntialiasing ( TRUE ) #endif @@ -83,16 +80,13 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg() switch(nProp) { case 0: *pValues >>= nScaleFactor; break; //"FontScaling", - case 1: *pValues >>= nLookNFeel; break; //"LookAndFeel", - case 2: *pValues >>= nDragMode; break; //"Window/Drag", - case 3: bMenuMouseFollow = *(sal_Bool*)pValues->getValue(); break; //"Menu/FollowMouse", - case 4: bSingleLineTabCtrl = *(sal_Bool*)pValues->getValue(); break; //"Dialog/SingleLineTab", - case 5: bColoredTabCtrl = *(sal_Bool*)pValues->getValue(); break; //"Dialog/ColoredTab", - case 6: *pValues >>= nSnapMode; break; //"Dialog/MousePositioning", - case 7: *pValues >>= nMiddleMouse; break; //"Dialog/MiddleMouseButton", + case 1: *pValues >>= nDragMode; break; //"Window/Drag", + case 2: bMenuMouseFollow = *(sal_Bool*)pValues->getValue(); break; //"Menu/FollowMouse", + case 3: *pValues >>= nSnapMode; break; //"Dialog/MousePositioning", + case 4: *pValues >>= nMiddleMouse; break; //"Dialog/MiddleMouseButton", #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) - case 8: bFontAntialiasing = *(sal_Bool*)pValues->getValue(); break; // "FontAntialising/Enabled", - case 9: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", + case 5: bFontAntialiasing = *(sal_Bool*)pValues->getValue(); break; // "FontAntialising/Enabled", + case 6: *pValues >>= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", #endif } } @@ -116,16 +110,13 @@ const Sequence<OUString>& SvtTabAppearanceCfg::GetPropertyNames() static const sal_Char* aPropNames[] = { "FontScaling" // 0 - ,"LookAndFeel" // 1 - ,"Window/Drag" // 2 - ,"Menu/FollowMouse" // 3 - ,"Dialog/SingleLineTab" // 4 - ,"Dialog/ColoredTab" // 5 - ,"Dialog/MousePositioning" // 6 - ,"Dialog/MiddleMouseButton" // 7 + ,"Window/Drag" // 1 + ,"Menu/FollowMouse" // 2 + ,"Dialog/MousePositioning" // 3 + ,"Dialog/MiddleMouseButton" // 4 #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) - ,"FontAntiAliasing/Enabled" // 8 - ,"FontAntiAliasing/MinPixelHeight" // 9 + ,"FontAntiAliasing/Enabled" // 5 + ,"FontAntiAliasing/MinPixelHeight" // 6 #endif }; const int nCount = sizeof( aPropNames ) / sizeof( aPropNames[0] ); @@ -153,16 +144,13 @@ void SvtTabAppearanceCfg::Commit() switch(nProp) { case 0: pValues[nProp] <<= nScaleFactor; break; // "FontScaling", - case 1: pValues[nProp] <<= nLookNFeel; break; //"LookAndFeel", - case 2: pValues[nProp] <<= nDragMode; break; //"Window/Drag", - case 3: pValues[nProp].setValue(&bMenuMouseFollow, rType); break; //"Menu/FollowMouse", - case 4: pValues[nProp].setValue(&bSingleLineTabCtrl, rType); break; //"Dialog/SingleLineTab", - case 5: pValues[nProp].setValue(&bColoredTabCtrl, rType); break; //"Dialog/ColoredTab", - case 6: pValues[nProp] <<= nSnapMode; break; //"Dialog/MousePositioning", - case 7: pValues[nProp] <<= nMiddleMouse; break; //"Dialog/MiddleMouseButton", + case 1: pValues[nProp] <<= nDragMode; break; //"Window/Drag", + case 2: pValues[nProp].setValue(&bMenuMouseFollow, rType); break; //"Menu/FollowMouse", + case 3: pValues[nProp] <<= nSnapMode; break; //"Dialog/MousePositioning", + case 4: pValues[nProp] <<= nMiddleMouse; break; //"Dialog/MiddleMouseButton", #if defined( UNX ) || defined ( FS_PRIV_DEBUG ) - case 8: pValues[nProp].setValue(&bFontAntialiasing, rType); break; // "FontAntialising/Enabled", - case 9: pValues[nProp] <<= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", + case 5: pValues[nProp].setValue(&bFontAntialiasing, rType); break; // "FontAntialising/Enabled", + case 6: pValues[nProp] <<= nAAMinPixelHeight; break; // "FontAntialising/MinPixelHeight", #endif } } @@ -177,16 +165,6 @@ void SvtTabAppearanceCfg::Notify( const com::sun::star::uno::Sequence< rtl::OUSt Beschreibung: --------------------------------------------------------------------*/ -void SvtTabAppearanceCfg::SetLookNFeel ( USHORT nSet ) -{ - nLookNFeel = nSet; - SetModified(); -} - -/*-------------------------------------------------------------------- - Beschreibung: - --------------------------------------------------------------------*/ - void SvtTabAppearanceCfg::SetDragMode ( USHORT nSet ) { nDragMode = nSet; @@ -234,26 +212,7 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp ) // SetStandard...Styles() resets the UseSystemUIFonts flag, // but we don't want to change it now, so save the flag before ... BOOL bUseSystemUIFonts = hAppStyle.GetUseSystemUIFonts(); - - switch ( nLookNFeel ) - { - case LookMotif: - hAppStyle.SetStandardUnixStyles(); break; - - case LookOSTwo: - hAppStyle.SetStandardOS2Styles(); break; - - case LookMacintosh: - hAppStyle.SetStandardMacStyles(); break; - - case LookWindows: - hAppStyle.SetStandardWinStyles(); break; - - case LookStardivision: - default: - hAppStyle.SetStandardStyles(); break; - } - + hAppStyle.SetStandardStyles(); // and set it here hAppStyle.SetUseSystemUIFonts( bUseSystemUIFonts ); @@ -298,14 +257,6 @@ void SvtTabAppearanceCfg::SetApplicationDefaults ( Application* pApp ) else nFollow &= ~MOUSE_FOLLOW_MENU; hMouseSettings.SetFollow( nFollow ); - sal_uInt16 nTabStyle = 0; - if(bSingleLineTabCtrl) - nTabStyle |= STYLE_TABCONTROL_SINGLELINE; - - if(bColoredTabCtrl) - nTabStyle |= STYLE_TABCONTROL_COLOR; - hAppStyle.SetTabControlStyle(nTabStyle); - hAppSettings.SetMouseSettings( hMouseSettings ); diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx index 993025b22884..35d0276144ec 100644 --- a/svtools/source/config/extcolorcfg.cxx +++ b/svtools/source/config/extcolorcfg.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "extcolorcfg.hxx" +#include <svtools/extcolorcfg.hxx> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/lang/Locale.hpp> diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx index 7bcbc1e4be82..bf372902fb6f 100644 --- a/svtools/source/config/fontsubstconfig.cxx +++ b/svtools/source/config/fontsubstconfig.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "fontsubstconfig.hxx" +#include <svtools/fontsubstconfig.hxx> #include <svl/svarray.hxx> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/uno/Any.hxx> diff --git a/svtools/source/config/itemholder2.cxx b/svtools/source/config/itemholder2.cxx index 8e971a1629bf..2382bf3ad7a3 100644 --- a/svtools/source/config/itemholder2.cxx +++ b/svtools/source/config/itemholder2.cxx @@ -36,10 +36,10 @@ #include <com/sun/star/lang/XComponent.hpp> #include <svtools/accessibilityoptions.hxx> -#include <apearcfg.hxx> +#include <svtools/apearcfg.hxx> #include <svtools/menuoptions.hxx> #include <svtools/colorcfg.hxx> -#include <fontsubstconfig.hxx> +#include <svtools/fontsubstconfig.hxx> #include <svtools/helpopt.hxx> #include <svtools/printoptions.hxx> #include <unotools/options.hxx> diff --git a/svtools/source/config/makefile.mk b/svtools/source/config/makefile.mk deleted file mode 100644 index d3ba43de68ef..000000000000 --- a/svtools/source/config/makefile.mk +++ /dev/null @@ -1,58 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=svtools -TARGET=config - -ENABLE_EXCEPTIONS := TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/accessibilityoptions.obj \ - $(SLO)$/apearcfg.obj \ - $(SLO)$/colorcfg.obj \ - $(SLO)$/extcolorcfg.obj \ - $(SLO)$/fontsubstconfig.obj \ - $(SLO)$/helpopt.obj \ - $(SLO)$/htmlcfg.obj \ - $(SLO)$/itemholder2.obj \ - $(SLO)$/menuoptions.obj \ - $(SLO)$/miscopt.obj \ - $(SLO)$/optionsdrawinglayer.obj \ - $(SLO)$/printoptions.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index 7b04b56104e0..2f455734a01d 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -45,7 +45,7 @@ #include <rtl/logfile.hxx> #include "itemholder2.hxx" -#include <imgdef.hxx> +#include <svtools/imgdef.hxx> #include <vcl/svapp.hxx> //_________________________________________________________________________________________________________________ diff --git a/svtools/source/contnr/cont_pch.cxx b/svtools/source/contnr/cont_pch.cxx deleted file mode 100644 index 4661a08162a2..000000000000 --- a/svtools/source/contnr/cont_pch.cxx +++ /dev/null @@ -1,41 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - -#include <sv.hxx> -#include <svtools/treelist.hxx> -#include <svtools/svtabbx.hxx> -#include <svtools/svtreebx.hxx> -#include <svtools/svicnvw.hxx> -#include "svimpbox.hxx" -#include "svimpicn.hxx" -#include <svtools/svlbox.hxx> -#include <svtools/svlbitm.hxx> - - diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx index 93f328ae2028..e3ba48180e9c 100644 --- a/svtools/source/contnr/contentenumeration.cxx +++ b/svtools/source/contnr/contentenumeration.cxx @@ -30,7 +30,7 @@ #include "contentenumeration.hxx" #include <svl/urlfilter.hxx> #include <svtools/inettbc.hxx> -#include "imagemgr.hxx" +#include <svtools/imagemgr.hxx> /** === begin UNO includes === **/ #include <com/sun/star/beans/XPropertySet.hpp> diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 7c1dd8362e86..c9b9b23786b4 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -28,12 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "fileview.hxx" +#include <svtools/fileview.hxx> #include <svtools/svtdata.hxx> -#include "imagemgr.hxx" +#include <svtools/imagemgr.hxx> #include <svtools/headbar.hxx> #include <svtools/svtabbx.hxx> - #include <svtools/svtools.hrc> #include "fileview.hrc" #include "contentenumeration.hxx" diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index cc7aa4e05ee1..6b0f2cdccdd8 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -41,7 +41,7 @@ #include <limits.h> -#include "ivctrl.hxx" +#include <svtools/ivctrl.hxx> #include <svl/svarray.hxx> class IcnCursor_Impl; diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index dd2ed992536e..ff7c42e9309a 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -40,7 +40,7 @@ #include <vcl/mnemonic.hxx> #include <vcl/controllayout.hxx> -#include "ivctrl.hxx" +#include <svtools/ivctrl.hxx> #include "imivctl.hxx" #include <svtools/svmedit.hxx> diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index dae3abbac966..9d494e5c32db 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -28,10 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef GCC -#endif - -#include "ivctrl.hxx" +#include <svtools/ivctrl.hxx> #include "imivctl.hxx" #include <vcl/bitmapex.hxx> #include <vcl/controllayout.hxx> diff --git a/svtools/source/contnr/makefile.mk b/svtools/source/contnr/makefile.mk deleted file mode 100644 index 232665c88c9c..000000000000 --- a/svtools/source/contnr/makefile.mk +++ /dev/null @@ -1,82 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=svcontnr - -PROJECTPCH4DLL=TRUE -PROJECTPCH=cont_pch -PROJECTPCHSOURCE=cont_pch - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES=\ - $(SLO)$/contentenumeration.obj \ - $(SLO)$/fileview.obj \ - $(SLO)$/svlbox.obj \ - $(SLO)$/svtabbx.obj \ - $(SLO)$/svimpbox.obj \ - $(SLO)$/templwin.obj - -SLOFILES= $(EXCEPTIONSFILES) \ - $(SLO)$/svicnvw.obj \ - $(SLO)$/svimpicn.obj \ - $(SLO)$/treelist.obj \ - $(SLO)$/svlbitm.obj \ - $(SLO)$/svtreebx.obj \ - $(SLO)$/imivctl1.obj \ - $(SLO)$/imivctl2.obj \ - $(SLO)$/ivctrl.obj \ - $(SLO)$/tooltiplbox.obj - -SRS1NAME=$(TARGET) -SRC1FILES =\ - fileview.src \ - templwin.src \ - svcontnr.src - -HXX1TARGET= svcontnr -HXX1EXT= hxx -HXX1FILES= $(PRJ)$/inc$/svlbox.hxx \ - $(PRJ)$/inc$/svlbitm.hxx \ - $(PRJ)$/inc$/svtreebx.hxx \ - $(PRJ)$/inc$/svicnvw.hxx \ - $(PRJ)$/inc$/svtabbx.hxx \ - $(PRJ)$/inc$/treelist.hxx -HXX1EXCL= -E:*include* - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index c251903d02bd..74c6bb163797 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -29,15 +29,10 @@ #include "precompiled_svtools.hxx" #include <vcl/svapp.hxx> #include <vcl/salnativewidgets.hxx> - -#ifndef _HELP_HXX #include <vcl/help.hxx> -#endif -#include <tabbar.hxx> +#include <svtools/tabbar.hxx> -#ifndef _STACK_ #include <stack> -#endif #define _SVTREEBX_CXX #include <svtools/svtreebx.hxx> @@ -46,15 +41,8 @@ #include <rtl/instance.hxx> #include <svtools/svtdata.hxx> #include <tools/wintypes.hxx> - -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif - -// #102891# -------------------- -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #define NODE_BMP_TABDIST_NOTVALID -2000000 #define FIRST_ENTRY_TAB 1 @@ -3121,7 +3109,7 @@ void lcl_DeleteSubPopups(PopupMenu* pPopup) } } -bool SvImpLBox::Command( const CommandEvent& rCEvt ) +void SvImpLBox::Command( const CommandEvent& rCEvt ) { USHORT nCommand = rCEvt.GetCommand(); @@ -3129,22 +3117,9 @@ bool SvImpLBox::Command( const CommandEvent& rCEvt ) aEditTimer.Stop(); // Rollmaus-Event? - if ( ( ( nCommand == COMMAND_WHEEL ) - || ( nCommand == COMMAND_STARTAUTOSCROLL ) - || ( nCommand == COMMAND_AUTOSCROLL ) - ) - && pView->HandleScrollCommand( rCEvt, &aHorSBar, &aVerSBar ) - ) - { - return true; - } - - if ( ( nCommand == COMMAND_CONTEXTMENU ) - && !bContextMenuHandling - ) - { - return false; - } + if( ( ( nCommand == COMMAND_WHEEL ) || ( nCommand == COMMAND_STARTAUTOSCROLL ) || ( nCommand == COMMAND_AUTOSCROLL ) ) + && pView->HandleScrollCommand( rCEvt, &aHorSBar, &aVerSBar ) ) + return; if( bContextMenuHandling && nCommand == COMMAND_CONTEXTMENU ) { @@ -3193,6 +3168,8 @@ bool SvImpLBox::Command( const CommandEvent& rCEvt ) { // deselect all pView->SelectAll( FALSE ); } + + } else { // key event (or at least no mouse event) @@ -3252,18 +3229,15 @@ bool SvImpLBox::Command( const CommandEvent& rCEvt ) aSelRestore.pop(); } } - return true; } - - const Point& rPos = rCEvt.GetMousePosPixel(); - if( rPos.X() < aOutputSize.Width() && rPos.Y() < aOutputSize.Height() ) - aSelEng.Command( rCEvt ); - - // strictly, this is not correct. However, it leads to a behavior compatible to the one at the time - // when this method did have a void return value ... - // A proper solution would be to give the EditEngine::Command also a boolean return value, and forward - // this (or false) to our caller - return true; +#ifndef NOCOMMAND + else + { + const Point& rPos = rCEvt.GetMousePosPixel(); + if( rPos.X() < aOutputSize.Width() && rPos.Y() < aOutputSize.Height() ) + aSelEng.Command( rCEvt ); + } +#endif } void SvImpLBox::BeginScroll() diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx index f4780fbf08ad..9d6bc78caff9 100644 --- a/svtools/source/contnr/svtreebx.cxx +++ b/svtools/source/contnr/svtreebx.cxx @@ -2233,8 +2233,8 @@ Region SvTreeListBox::GetDragRegion() const void SvTreeListBox::Command( const CommandEvent& rCEvt ) { DBG_CHKTHIS(SvTreeListBox,0); - if ( !pImp->Command( rCEvt ) ) - SvLBox::Command( rCEvt ); + // FIXME gnumake2 resync to DEV300_m84 + pImp->Command( rCEvt ); } diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index 61112f6669ca..86bab5b8e42a 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -28,31 +28,24 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include "templwin.hxx" -#include "templdlg.hxx" +#include <svtools/templdlg.hxx> #include <svtools/svtdata.hxx> #include <unotools/pathoptions.hxx> #include <unotools/dynamicmenuoptions.hxx> #include <unotools/extendedsecurityoptions.hxx> #include <svtools/xtextedt.hxx> #include <svl/inettype.hxx> -#include "imagemgr.hxx" +#include <svtools/imagemgr.hxx> #include <svtools/miscopt.hxx> -#include "templatefoldercache.hxx" -#include "imgdef.hxx" -#include "txtattr.hxx" -#ifndef _SVTOOLS_HRC +#include <svtools/templatefoldercache.hxx> +#include <svtools/imgdef.hxx> +#include <svtools/txtattr.hxx> #include <svtools/svtools.hrc> -#endif -#ifndef _SVTOOLS_TEMPLWIN_HRC #include "templwin.hrc" -#endif -#ifndef _SVT_HELPID_HRC #include <svtools/helpid.hrc> -#endif #include <unotools/pathoptions.hxx> #include <unotools/viewoptions.hxx> #include <unotools/ucbhelper.hxx> - #include "unotools/configmgr.hxx" #include <com/sun/star/awt/XWindow.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> @@ -87,7 +80,7 @@ #include <vcl/svapp.hxx> #include <vcl/split.hxx> #include <vcl/msgbox.hxx> -#include "DocumentInfoPreview.hxx" +#include <svtools/DocumentInfoPreview.hxx> #include <vcl/mnemonic.hxx> #include <ucbhelper/content.hxx> diff --git a/svtools/source/contnr/templwin.hxx b/svtools/source/contnr/templwin.hxx index acb7c602ad30..d8ec12224f60 100644 --- a/svtools/source/contnr/templwin.hxx +++ b/svtools/source/contnr/templwin.hxx @@ -32,8 +32,8 @@ #include <vcl/toolbox.hxx> #include <vcl/window.hxx> #include <svtools/headbar.hxx> -#include "fileview.hxx" -#include "ivctrl.hxx" +#include <svtools/fileview.hxx> +#include <svtools/ivctrl.hxx> #include <svtools/svmedit2.hxx> #include <svl/restrictedpaths.hxx> #include <com/sun/star/frame/XDispatch.hpp> diff --git a/svtools/source/contnr/templwin.src b/svtools/source/contnr/templwin.src index 45f9803539a1..113e20c34f28 100644 --- a/svtools/source/contnr/templwin.src +++ b/svtools/source/contnr/templwin.src @@ -28,7 +28,7 @@ // includes ------------------------------------------------------------------ #include "templwin.hrc" -#include "controldims.hrc" +#include <svtools/controldims.hrc> #include <svtools/helpid.hrc> #include <svtools/svtools.hrc> diff --git a/svtools/source/contnr/tooltiplbox.cxx b/svtools/source/contnr/tooltiplbox.cxx index 6aae495bd504..69073a0793c5 100644 --- a/svtools/source/contnr/tooltiplbox.cxx +++ b/svtools/source/contnr/tooltiplbox.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "tooltiplbox.hxx" +#include <svtools/tooltiplbox.hxx> #include <vcl/help.hxx> // ============================================================================ diff --git a/svtools/source/control/asynclink.cxx b/svtools/source/control/asynclink.cxx index 04b2b58367ee..d3ef0c349f08 100644..100755 --- a/svtools/source/control/asynclink.cxx +++ b/svtools/source/control/asynclink.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <asynclink.hxx> +#include <svtools/asynclink.hxx> #include <vos/mutex.hxx> #include <tools/debug.hxx> #include <vcl/timer.hxx> diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index f7b49ac57eeb..043d7023508b 100755 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -28,30 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef _APP_HXX #include <vcl/svapp.hxx> -#endif -#ifndef _TABLE_HXX #include <tools/table.hxx> -#endif -#ifndef _HELP_HXX #include <vcl/help.hxx> -#endif -#ifndef _MENU_HXX #include <vcl/menu.hxx> -#endif -#ifndef _DECOVIEW_HXX #include <vcl/decoview.hxx> -#endif -#ifndef _FLOATWIN_HXX #include <vcl/floatwin.hxx> -#endif -#ifndef _BUTTON_HXX #include <vcl/button.hxx> -#endif -#ifndef _FIXED_HXX #include <vcl/fixed.hxx> -#endif #include <unotools/calendarwrapper.hxx> #include <unotools/localedatawrapper.hxx> #include <com/sun/star/i18n/Weekdays.hpp> @@ -61,7 +45,7 @@ #define _SV_CALENDAR_CXX #include <svtools/svtools.hrc> #include <svtools/svtdata.hxx> -#include <calendar.hxx> +#include <svtools/calendar.hxx> // ======================================================================= diff --git a/svtools/source/control/collatorres.cxx b/svtools/source/control/collatorres.cxx index 9988bfdadbb9..4514ec918b24 100755 --- a/svtools/source/control/collatorres.cxx +++ b/svtools/source/control/collatorres.cxx @@ -30,9 +30,7 @@ #include "precompiled_svtools.hxx" #include <svtools/svtdata.hxx> #include <svtools/svtools.hrc> - - -#include <collatorres.hxx> +#include <svtools/collatorres.hxx> // ------------------------------------------------------------------------- // diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index d44b18a29ae1..91c446a880a9 100755 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -30,19 +30,15 @@ #define _CTRLBOX_CXX #include <tools/debug.hxx> -#ifndef _APP_HXX #include <vcl/svapp.hxx> -#endif -#ifndef _FIELD_HXX #include <vcl/field.hxx> -#endif #include <comphelper/processfactory.hxx> #include <unotools/charclass.hxx> #include <svtools/svtdata.hxx> #include <svtools/svtools.hrc> -#include <ctrlbox.hxx> -#include <ctrltool.hxx> +#include <svtools/ctrlbox.hxx> +#include <svtools/ctrltool.hxx> #include <vcl/i18nhelp.hxx> diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index bd965aca66a6..979a8a3a3d32 100755 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -32,19 +32,14 @@ #include <string.h> -#ifndef TOOLS_DEBUG_HXX #include <tools/debug.hxx> -#endif #include <i18npool/mslangid.hxx> -#ifndef _VCL_WINDOW_HXX #include <vcl/window.hxx> -#endif #include <vcl/svapp.hxx> #include <vcl/wrkwin.hxx> - #include <svtools/svtools.hrc> #include <svtools/svtdata.hxx> -#include <ctrltool.hxx> +#include <svtools/ctrltool.hxx> // ======================================================================= diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index 14c0478f5327..3541a43effc1 100644..100755 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -31,13 +31,8 @@ #define _SV_FIELCTRL_CXX #include <tools/urlobj.hxx> #include <svtools/svtdata.hxx> -#include <filectrl.hxx> -#ifndef _SV_FILECTRL_HRC +#include <svtools/filectrl.hxx> #include <filectrl.hrc> -#endif - -#ifndef GCC -#endif // ======================================================================= diff --git a/svtools/source/control/filectrl2.cxx b/svtools/source/control/filectrl2.cxx index 2a75c5d3d7e8..904b643d2ae3 100644..100755 --- a/svtools/source/control/filectrl2.cxx +++ b/svtools/source/control/filectrl2.cxx @@ -29,7 +29,7 @@ #include "precompiled_svtools.hxx" // this file contains code from filectrl.cxx which needs to be compiled with enabled exception hanling -#include <filectrl.hxx> +#include <svtools/filectrl.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/ui/dialogs/XFilePicker.hpp> #include <vcl/unohelp.hxx> diff --git a/svtools/source/control/indexentryres.cxx b/svtools/source/control/indexentryres.cxx index 5a79edab5b77..23eada244a47 100755 --- a/svtools/source/control/indexentryres.cxx +++ b/svtools/source/control/indexentryres.cxx @@ -30,9 +30,7 @@ #include "precompiled_svtools.hxx" #include <svtools/svtdata.hxx> #include <svtools/svtools.hrc> - - -#include <indexentryres.hxx> +#include <svtools/indexentryres.hxx> // ------------------------------------------------------------------------- // diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 4aaa55409266..574f2bde4e1e 100755 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -33,7 +33,6 @@ #include <sys/types.h> #endif - #include <svtools/inettbc.hxx> #include <com/sun/star/uno/Any.hxx> #include <com/sun/star/uno/Reference.hxx> @@ -47,18 +46,10 @@ #include <com/sun/star/ucb/XProgressHandler.hpp> #include <com/sun/star/ucb/XContentAccess.hpp> #include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp> - -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif - #include <vcl/toolbox.hxx> -#ifndef _VOS_THREAD_HXX //autogen #include <vos/thread.hxx> -#endif -#ifndef _VOS_MUTEX_HXX //autogen #include <vos/mutex.hxx> -#endif #include <vcl/svapp.hxx> #include <unotools/historyoptions.hxx> #include <svl/eitem.hxx> @@ -73,9 +64,8 @@ #include <ucbhelper/content.hxx> #include <unotools/localfilehelper.hxx> #include <unotools/ucbhelper.hxx> - #include "iodlg.hrc" -#include <asynclink.hxx> +#include <svtools/asynclink.hxx> #include <svl/urlfilter.hxx> #include <vector> diff --git a/svtools/source/control/makefile.mk b/svtools/source/control/makefile.mk deleted file mode 100755 index a2e622730635..000000000000 --- a/svtools/source/control/makefile.mk +++ /dev/null @@ -1,87 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=ctrl - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES=\ - ctrltool.src \ - ctrlbox.src \ - calendar.src \ - filectrl.src - -EXCEPTIONSFILES=\ - $(SLO)$/svxbox.obj \ - $(SLO)$/filectrl2.obj \ - $(SLO)$/roadmap.obj \ - $(SLO)$/scriptedtext.obj\ - $(SLO)$/fmtfield.obj \ - $(SLO)$/inettbc.obj \ - $(SLO)$/valueacc.obj \ - $(SLO)$/toolbarmenu.obj \ - $(SLO)$/toolbarmenuacc.obj - -SLOFILES=\ - $(EXCEPTIONSFILES) \ - $(SLO)$/asynclink.obj \ - $(SLO)$/urlcontrol.obj \ - $(SLO)$/fileurlbox.obj \ - $(SLO)$/ctrltool.obj \ - $(SLO)$/ctrlbox.obj \ - $(SLO)$/stdctrl.obj \ - $(SLO)$/stdmenu.obj \ - $(SLO)$/valueset.obj \ - $(SLO)$/tabbar.obj \ - $(SLO)$/headbar.obj \ - $(SLO)$/prgsbar.obj \ - $(SLO)$/ruler.obj \ - $(SLO)$/taskbar.obj \ - $(SLO)$/taskbox.obj \ - $(SLO)$/taskstat.obj \ - $(SLO)$/taskmisc.obj \ - $(SLO)$/calendar.obj \ - $(SLO)$/filectrl.obj \ - $(SLO)$/scrwin.obj \ - $(SLO)$/collatorres.obj \ - $(SLO)$/indexentryres.obj \ - $(SLO)$/hyperlabel.obj \ - $(SLO)$/fixedhyper.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/svtools/source/control/prgsbar.cxx b/svtools/source/control/prgsbar.cxx index b67202e9c1fc..bb57d043b11d 100644..100755 --- a/svtools/source/control/prgsbar.cxx +++ b/svtools/source/control/prgsbar.cxx @@ -30,13 +30,9 @@ #define _SV_PRGSBAR_CXX -#ifndef _TOOLS_DEBUGS_HXX #include <tools/debug.hxx> -#endif -#ifndef _VCL_STATUS_HXX #include <vcl/status.hxx> -#endif -#include <prgsbar.hxx> +#include <svtools/prgsbar.hxx> // ======================================================================= diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index 7cf88816199f..f4c04a7000af 100644..100755 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -27,23 +27,16 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <roadmap.hxx> +#include <svtools/roadmap.hxx> #ifndef _STRING_HXX #define _STRING_HXX #endif -#ifndef __SGI_STL_VECTOR #include <vector> -#endif - #include <algorithm> #include <vcl/bitmap.hxx> #include <tools/color.hxx> - -#ifndef _RTL_USTRING_HXX_ -#include <rtl/OUString.hxx> -#endif #include <memory> #define ROADMAP_INDENT_X 4 diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 011dd4cd7956..bdbcd253c198 100755 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -32,11 +32,10 @@ #include <tools/debug.hxx> #include <vcl/svapp.hxx> #include <tools/poly.hxx> - #include <vcl/i18nhelp.hxx> #define _SV_RULER_CXX -#include <ruler.hxx> +#include <svtools/ruler.hxx> // ======================================================================= diff --git a/svtools/source/control/scriptedtext.cxx b/svtools/source/control/scriptedtext.cxx index 2067e6d245f0..191dedfabe98 100644..100755 --- a/svtools/source/control/scriptedtext.cxx +++ b/svtools/source/control/scriptedtext.cxx @@ -27,11 +27,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "scriptedtext.hxx" - -#ifndef __SGI_STL_VECTOR +#include <svtools/scriptedtext.hxx> #include <vector> -#endif #include <rtl/ustring.hxx> #include <vcl/outdev.hxx> #include <vcl/font.hxx> diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx index eb47d2c780ad..364c938f3f65 100644..100755 --- a/svtools/source/control/scrwin.cxx +++ b/svtools/source/control/scrwin.cxx @@ -29,7 +29,7 @@ #include "precompiled_svtools.hxx" #define _SVT_SCRWIN_CXX -#include <scrwin.hxx> +#include <svtools/scrwin.hxx> //=================================================================== diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index 95b6d3fbd5c6..9df32d74fc59 100644..100755 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.cxx @@ -29,15 +29,10 @@ #include "precompiled_svtools.hxx" #include <string.h> - -#ifndef _APP_HXX #include <vcl/svapp.hxx> -#endif - #include <vcl/i18nhelp.hxx> - -#include <ctrltool.hxx> -#include <stdmenu.hxx> +#include <svtools/ctrltool.hxx> +#include <svtools/stdmenu.hxx> // ======================================================================== diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 315e432edd60..0c2800246061 100755 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "tabbar.hxx" +#include <svtools/tabbar.hxx> #include <tools/time.hxx> #include <tools/debug.hxx> #include <tools/poly.hxx> diff --git a/svtools/source/control/taskbar.cxx b/svtools/source/control/taskbar.cxx index e84c934ef0d8..232727951281 100644..100755 --- a/svtools/source/control/taskbar.cxx +++ b/svtools/source/control/taskbar.cxx @@ -30,16 +30,11 @@ #define _TASKBAR_CXX -#ifndef _TOOLS_LIST_HXX #include <tools/list.hxx> -#endif #include <tools/debug.hxx> - -#ifndef _VCL_FLOATWIN_HXX #include <vcl/floatwin.hxx> -#endif -#include <taskbar.hxx> +#include <svtools/taskbar.hxx> // ======================================================================= diff --git a/svtools/source/control/taskbox.cxx b/svtools/source/control/taskbox.cxx index 8e5ff6de8def..3f05d077b7c5 100644..100755 --- a/svtools/source/control/taskbox.cxx +++ b/svtools/source/control/taskbox.cxx @@ -30,14 +30,11 @@ #define _TASKBAR_CXX -#ifndef _TOOLS_LIST_HXX #include <tools/list.hxx> -#endif #include <tools/debug.hxx> #include <vcl/image.hxx> #include <vcl/help.hxx> - -#include <taskbar.hxx> +#include <svtools/taskbar.hxx> // ======================================================================= diff --git a/svtools/source/control/taskmisc.cxx b/svtools/source/control/taskmisc.cxx index 4c9fda217258..62eaf020c8f0 100644..100755 --- a/svtools/source/control/taskmisc.cxx +++ b/svtools/source/control/taskmisc.cxx @@ -30,13 +30,10 @@ #define _TASKBAR_CXX -#ifndef _TOOLS_LIST_HXX #include <tools/list.hxx> -#endif #include <tools/debug.hxx> #include <vcl/help.hxx> - -#include <taskbar.hxx> +#include <svtools/taskbar.hxx> // ======================================================================= diff --git a/svtools/source/control/taskstat.cxx b/svtools/source/control/taskstat.cxx index ba5e8d53b8b2..2e1cffcaac10 100755 --- a/svtools/source/control/taskstat.cxx +++ b/svtools/source/control/taskstat.cxx @@ -30,18 +30,15 @@ #define _TASKBAR_CXX -#ifndef _TOOLS_LIST_HXX #include <tools/list.hxx> -#endif #include <tools/debug.hxx> #include <tools/date.hxx> #include <vcl/image.hxx> #include <vcl/help.hxx> #include <vcl/svapp.hxx> #include <unotools/calendarwrapper.hxx> - #include <unotools/syslocale.hxx> -#include <taskbar.hxx> +#include <svtools/taskbar.hxx> // ======================================================================= diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 9a66230f012c..bfcdfe98ea5a 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -29,18 +29,10 @@ #include "precompiled_svtools.hxx" #include <stdio.h> - - -#include "addresstemplate.hxx" -#ifndef _SVT_ADDRESSTEMPLATE_HRC_ +#include <svtools/addresstemplate.hxx> #include "addresstemplate.hrc" -#endif -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif -#ifndef _SVT_HELPID_HRC #include <svtools/helpid.hrc> -#endif #include <svtools/svtdata.hxx> #include <tools/debug.hxx> #include <comphelper/processfactory.hxx> @@ -49,9 +41,7 @@ #include <vcl/waitobj.hxx> #include <vcl/msgbox.hxx> #include <toolkit/helper/vclunohelper.hxx> -#ifndef _CPPUHELPER_EXTRACT_HXX_ #include <cppuhelper/extract.hxx> -#endif #include <comphelper/interaction.hxx> #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp> #include <com/sun/star/awt/XWindow.hpp> @@ -65,12 +55,9 @@ #include <com/sun/star/sdbcx/XTablesSupplier.hpp> #include <com/sun/star/sdbcx/XColumnsSupplier.hpp> #include <com/sun/star/sdb/CommandType.hpp> -#include "localresaccess.hxx" -#ifndef SVTOOLS_FILENOTATION_HXX_ +#include <svtools/localresaccess.hxx> #include "svl/filenotation.hxx" -#endif #include <tools/urlobj.hxx> - #include <algorithm> // ....................................................................... diff --git a/svtools/source/dialogs/addresstemplate.src b/svtools/source/dialogs/addresstemplate.src index 990dfc98f89b..0e4845949dca 100644 --- a/svtools/source/dialogs/addresstemplate.src +++ b/svtools/source/dialogs/addresstemplate.src @@ -25,15 +25,9 @@ * ************************************************************************/ -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif -#ifndef _SVT_ADDRESSTEMPLATE_HRC_ #include "addresstemplate.hrc" -#endif -#ifndef _SVT_CONTROLDIMS_HRC_ -#include "controldims.hrc" -#endif +#include <svtools/controldims.hrc> #define FIELD_ROW_HEIGHT 17 diff --git a/svtools/source/dialogs/filedlg.cxx b/svtools/source/dialogs/filedlg.cxx index 5567651c0480..de465b34e1c6 100644 --- a/svtools/source/dialogs/filedlg.cxx +++ b/svtools/source/dialogs/filedlg.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <filedlg.hxx> +#include <svtools/filedlg.hxx> #include <filedlg2.hxx> PathDialog::PathDialog( Window* _pParent, WinBits nStyle, BOOL bCreateDir ) : diff --git a/svtools/source/dialogs/filedlg2.cxx b/svtools/source/dialogs/filedlg2.cxx index 67262ba72c1a..a2c68270ed81 100644 --- a/svtools/source/dialogs/filedlg2.cxx +++ b/svtools/source/dialogs/filedlg2.cxx @@ -28,17 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include <vcl/svapp.hxx> -#ifndef _SV_BUTTON_HXX //autogen #include <vcl/button.hxx> -#endif #include <vcl/fixed.hxx> #include <vcl/edit.hxx> #include <vcl/lstbox.hxx> #include <svtools/svtdata.hxx> - #include <filedlg2.hxx> -#include <filedlg.hxx> -#include <filedlg2.hrc> +#include <svtools/filedlg.hxx> +#include <svtools/filedlg2.hrc> #include <vcl/msgbox.hxx> #include <vos/security.hxx> #include <com/sun/star/i18n/XCollator.hpp> diff --git a/svtools/source/dialogs/filedlg2.src b/svtools/source/dialogs/filedlg2.src index 977a0d6f430b..acef462c04cb 100644 --- a/svtools/source/dialogs/filedlg2.src +++ b/svtools/source/dialogs/filedlg2.src @@ -25,7 +25,8 @@ * ************************************************************************/ -#include <filedlg2.hrc> +#include <svtools/filedlg2.hrc> + String STR_FILEDLG_SELECT { Text [ en-US ] = "Select Directory" ; diff --git a/svtools/source/dialogs/formats.src b/svtools/source/dialogs/formats.src index f8ce80f62f2f..d91700afac8f 100644 --- a/svtools/source/dialogs/formats.src +++ b/svtools/source/dialogs/formats.src @@ -25,7 +25,7 @@ * ************************************************************************/ -#include "sores.hxx" +#include <svtools/sores.hxx> String STR_FORMAT_STRING { diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index 3f7700805995..0dd30ebdab89 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -33,7 +33,7 @@ // include --------------------------------------------------------------- #include <svtools/insdlg.hxx> -#include "sores.hxx" +#include <svtools/sores.hxx> #include <svtools/svtdata.hxx> #include <tools/rc.hxx> diff --git a/svtools/source/dialogs/makefile.mk b/svtools/source/dialogs/makefile.mk deleted file mode 100644 index 99c4b59b76ae..000000000000 --- a/svtools/source/dialogs/makefile.mk +++ /dev/null @@ -1,75 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=dialogs - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES= filedlg2.src \ - so3res.src \ - formats.src \ - prnsetup.src \ - printdlg.src \ - colrdlg.src \ - addresstemplate.src \ - wizardmachine.src - - -EXCEPTIONSFILES= $(SLO)$/addresstemplate.obj \ - $(SLO)$/insdlg.obj \ - $(SLO)$/roadmapwizard.obj \ - $(SLO)$/printdlg.obj \ - $(SLO)$/wizardmachine.obj - - -SLOFILES= \ - $(SLO)$/insdlg.obj \ - $(SLO)$/roadmapwizard.obj \ - $(SLO)$/wizardmachine.obj \ - $(SLO)$/addresstemplate.obj \ - $(SLO)$/filedlg.obj \ - $(SLO)$/filedlg2.obj \ - $(SLO)$/prnsetup.obj \ - $(SLO)$/printdlg.obj \ - $(SLO)$/colctrl.obj \ - $(SLO)$/colrdlg.obj \ - $(SLO)$/property.obj \ - $(SLO)$/wizdlg.obj \ - $(SLO)$/mcvmath.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/source/dialogs/printdlg.cxx b/svtools/source/dialogs/printdlg.cxx deleted file mode 100644 index dba5ed627952..000000000000 --- a/svtools/source/dialogs/printdlg.cxx +++ /dev/null @@ -1,790 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" -#include <tools/debug.hxx> -#include <vcl/svapp.hxx> -#include <vcl/print.hxx> -#include <vcl/msgbox.hxx> -#include <vcl/jobset.hxx> -#include <tools/urlobj.hxx> -#include "printdlg.hrc" -#include "controldims.hrc" -#include <svtools/prnsetup.hxx> -#include <svtools/printdlg.hxx> -#include <svtools/svtdata.hxx> -#include <filedlg.hxx> -#include <svtools/helpid.hrc> -#include <com/sun/star/ui/dialogs/TemplateDescription.hpp> -#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> -#include <com/sun/star/ui/dialogs/XFilePicker.hpp> -#include <com/sun/star/ui/dialogs/XFilterManager.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <comphelper/processfactory.hxx> - -using rtl::OUString; -using namespace com::sun::star; - -struct SvtPrinterImpl -{ - Printer* m_pTempPrinter; - sal_Bool m_bHelpDisabled; - PrintSheetRange m_eSheetRange; - - SvtPrinterImpl() : - m_pTempPrinter( NULL ), m_bHelpDisabled( sal_False ), m_eSheetRange( PRINTSHEETS_ALL ) {} - ~SvtPrinterImpl() { delete m_pTempPrinter; } -}; - -#define TEMPPRINTER() mpPrinterImpl->m_pTempPrinter - -// ======================================================================= - -PrintDialog::PrintDialog( Window* pWindow, bool bWithSheetsAndCells ) : - ModalDialog ( pWindow, SvtResId( DLG_SVT_PRNDLG_PRINTDLG ) ), - maFlPrinter ( this, SvtResId( FL_PRINTER ) ), - maFtName ( this, SvtResId( FT_NAME ) ), - maLbName ( this, SvtResId( LB_NAMES ) ), - maBtnProperties ( this, SvtResId( BTN_PROPERTIES ) ), - maFtStatus ( this, SvtResId( FT_STATUS ) ), - maFiStatus ( this, SvtResId( FI_STATUS ) ), - maFtType ( this, SvtResId( FT_TYPE ) ), - maFiType ( this, SvtResId( FI_TYPE ) ), - maFtLocation ( this, SvtResId( FT_LOCATION ) ), - maFiLocation ( this, SvtResId( FI_LOCATION ) ), - maFtComment ( this, SvtResId( FT_COMMENT ) ), - maFiComment ( this, SvtResId( FI_COMMENT ) ), - maCbxFilePrint ( this, SvtResId( CBX_FILEPRINT ) ), - maFiPrintFile ( this, SvtResId( FI_PRINTFILE ) ), - maFiFaxNo ( this, SvtResId( FI_FAXNO ) ), - maEdtFaxNo ( this, SvtResId( EDT_FAXNO ) ), - maFlPrint ( this, SvtResId( FL_PRINT ) ), - maRbtAllSheets ( this, SvtResId( RBT_ALL_SHEETS ) ), - maRbtSelectedSheets ( this, SvtResId( RBT_SELECTED_SHEETS ) ), - maRbtSelectedCells ( this, SvtResId( RBT_SELECTED_CELLS ) ), - maFlPrintRange ( this, SvtResId( FL_PRINTRANGE ) ), - maRbtAll ( this, SvtResId( RBT_ALL ) ), - maRbtPages ( this, SvtResId( RBT_PAGES ) ), - maRbtSelection ( this, SvtResId( RBT_SELECTION ) ), - maEdtPages ( this, SvtResId( EDT_PAGES ) ), - maFlSepCopiesRange ( this, SvtResId( FL_SEPCOPIESRANGE ) ), - maFlCopies ( this, SvtResId( FL_COPIES ) ), - maFtCopies ( this, SvtResId( FT_COPIES ) ), - maNumCopies ( this, SvtResId( NUM_COPIES ) ), - maImgCollate ( this, SvtResId( IMG_COLLATE ) ), - maImgNotCollate ( this, SvtResId( IMG_NOT_COLLATE ) ), - maCbxCollate ( this, SvtResId( CBX_COLLATE ) ), - maFlSepButtonLine ( this, SvtResId( FL_SEPBUTTONLINE ) ), - maBtnOptions ( this, SvtResId( BTN_OPTIONS ) ), - maBtnOK ( this, SvtResId( BTN_OK ) ), - maBtnCancel ( this, SvtResId( BTN_CANCEL ) ), - maBtnHelp ( this, SvtResId( BTN_HELP ) ), - mbWithSheetsAndCells( bWithSheetsAndCells ), - maAllFilterStr ( SvtResId( STR_ALLFILTER ) ) - -{ - FreeResource(); - - mpPrinter = NULL; - mpPrinterImpl = new SvtPrinterImpl; - mnCopyCount = 1; - mnFirstPage = 0; - mnLastPage = 0; - mnMinPage = 1; - mnMaxPage = 65535; - meCheckRange = PRINTDIALOG_ALL; - mbAll = TRUE; - mbSelection = FALSE; - mbFromTo = FALSE; - mbRange = FALSE; - mbCollate = TRUE; - mbCollateCheck = TRUE; - mbOptions = FALSE; - - maStatusTimer.SetTimeout( IMPL_PRINTDLG_STATUS_UPDATE ); - maStatusTimer.SetTimeoutHdl( LINK( this, PrintDialog, ImplStatusHdl ) ); - maBtnProperties.SetClickHdl( LINK( this, PrintDialog, ImplPropertiesHdl ) ); - maLbName.SetSelectHdl( LINK( this, PrintDialog, ImplChangePrinterHdl ) ); - - maFiPrintFile.SetStyle( maFiPrintFile.GetStyle() | WB_PATHELLIPSIS ); - - Link aLink( LINK( this, PrintDialog, ImplModifyControlHdl ) ); - maCbxFilePrint.SetClickHdl( aLink ); - maRbtAll.SetClickHdl( aLink ); - maRbtPages.SetClickHdl( aLink ); - maRbtSelection.SetClickHdl( aLink ); - maEdtPages.SetModifyHdl( aLink ); - maNumCopies.SetModifyHdl( aLink ); - maCbxCollate.SetClickHdl( aLink ); - maBtnOptions.SetClickHdl( aLink ); - maEdtFaxNo.SetModifyHdl( aLink ); - maBtnOK.SetClickHdl( aLink ); - - maRbtAll.Check(); - ImplSetImages(); -} - -// ----------------------------------------------------------------------- - -PrintDialog::~PrintDialog() -{ - ImplFreePrnDlgListBox( &maLbName, FALSE ); - delete mpPrinterImpl; -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplSetImages() -{ - if( ! GetSettings().GetStyleSettings().GetHighContrastMode() ) - { - maImgCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_COLLATE ) ), BMP_COLOR_NORMAL ); - maImgNotCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_NOCOLLATE ) ), BMP_COLOR_NORMAL ); - } - else - { - maImgCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_COLLATE_HC ) ), BMP_COLOR_HIGHCONTRAST ); - maImgNotCollate.SetModeImage( Image( SvtResId( RID_IMG_PRNDLG_NOCOLLATE_HC ) ), BMP_COLOR_HIGHCONTRAST ); - } -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplSetInfo() -{ - const QueueInfo* pInfo = Printer::GetQueueInfo( maLbName.GetSelectEntry(), true ); - if ( pInfo ) - { - maFiType.SetText( pInfo->GetDriver() ); - maFiLocation.SetText( pInfo->GetLocation() ); - maFiComment.SetText( pInfo->GetComment() ); - maFiStatus.SetText( ImplPrnDlgGetStatusText( *pInfo ) ); - } - else - { - XubString aTempStr; - maFiType.SetText( aTempStr ); - maFiLocation.SetText( aTempStr ); - maFiComment.SetText( aTempStr ); - maFiStatus.SetText( aTempStr ); - } - -#ifdef UNX - if( pInfo && pInfo->GetLocation().EqualsAscii( "fax_queue" ) ) - { - maFiPrintFile.Show( FALSE ); - maCbxFilePrint.Show( FALSE ); - maFiFaxNo.Show( TRUE ); - maEdtFaxNo.Show( TRUE ); - Printer* pPrinter = TEMPPRINTER() ? TEMPPRINTER() : mpPrinter; - maEdtFaxNo.SetText( pPrinter->GetJobValue( String::CreateFromAscii( "FAX#" ) ) ); - - Size aFTSize = maFiFaxNo.GetSizePixel(); - long nTextWidth = maFiFaxNo.GetCtrlTextWidth( maFiFaxNo.GetText() ) + 10; - if ( aFTSize.Width() < nTextWidth ) - { - long nDelta = nTextWidth - aFTSize.Width(); - aFTSize.Width() = aFTSize.Width() + nDelta; - maFiFaxNo.SetSizePixel( aFTSize ); - Size aEdtSize = maEdtFaxNo.GetSizePixel(); - aEdtSize.Width() = aEdtSize.Width() - nDelta; - Point aEdtPos = maEdtFaxNo.GetPosPixel(); - aEdtPos.X() = aEdtPos.X() + nDelta; - maEdtFaxNo.SetPosSizePixel( aEdtPos, aEdtSize ); - } - } - else -#endif - { - maFiPrintFile.Show( TRUE ); - maCbxFilePrint.Show( TRUE ); - maFiFaxNo.Show( FALSE ); - maEdtFaxNo.Show( FALSE ); - } - -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplCheckOK() -{ - // Ueberprueft, ob der OK-Button enabled ist - BOOL bEnable = TRUE; - - if ( bEnable && maRbtPages.IsChecked() ) - bEnable = maEdtPages.GetText().Len() > 0; - - if ( bEnable ) - { - if ( TEMPPRINTER() ) - bEnable = TEMPPRINTER()->IsValid(); - else - bEnable = mpPrinter->IsValid(); - } - - maBtnOK.Enable( bEnable ); -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplInitControls() -{ - // Alles - if ( mbAll ) - { - maRbtAll.Enable(); - if( meCheckRange == PRINTDIALOG_ALL ) - maRbtAll.Check( TRUE ); - } - else - maRbtAll.Enable( FALSE ); - - // Selektion - if ( mbSelection ) - { - maRbtSelection.Enable(); - if ( meCheckRange == PRINTDIALOG_SELECTION ) - maRbtSelection.Check( TRUE ); - } - else - maRbtSelection.Enable( FALSE ); - - // Seiten - if ( mbRange ) - { - maRbtPages.Enable(); - maEdtPages.Show(); - maEdtPages.SetText( maRangeText ); - - if( ( meCheckRange == PRINTDIALOG_FROMTO ) || - ( meCheckRange == PRINTDIALOG_RANGE ) ) - { - maRbtPages.Check( TRUE ); - maEdtPages.Enable(); - } - else - maEdtPages.Enable( FALSE ); - } - else - { - maRbtPages.Enable( FALSE ); - maEdtPages.Hide(); - } - - // Anzahl Kopien - maNumCopies.SetValue( mnCopyCount ); - - // Sortierung - maCbxCollate.Enable( mbCollate ); - maCbxCollate.Check( mbCollateCheck ); - - // Zusaetze-Button - if ( mbOptions ) - maBtnOptions.Show(); - - if ( !mbWithSheetsAndCells ) - { - Size aMarginSize = - LogicToPixel( Size( RSC_SP_CTRL_GROUP_X, RSC_SP_CTRL_GROUP_Y ), MAP_APPFONT ); - long nTempPos = maImgCollate.GetPosPixel().Y() + - maImgCollate.GetSizePixel().Height() + aMarginSize.Height(); - long nDelta1 = maFlPrintRange.GetPosPixel().Y() - maFlPrint.GetPosPixel().Y(); - long nDelta2 = maFlSepButtonLine.GetPosPixel().Y() - nTempPos; - - maFlPrint.Hide(); - maRbtAllSheets.Hide(); - maRbtSelectedSheets.Hide(); - maRbtSelectedCells.Hide(); - maRbtSelection.Show(); - - Size aNewSize = GetSizePixel(); - aNewSize.Height() -= nDelta2; - SetSizePixel( aNewSize ); - aNewSize = maFlSepCopiesRange.GetSizePixel(); - aNewSize.Height() -= nDelta2; - maFlSepCopiesRange.SetSizePixel( aNewSize ); - - long nDelta = nDelta1; - Window* pControls[] = { &maFlPrintRange, &maRbtAll, - &maRbtPages, &maEdtPages, &maRbtSelection, NULL, - &maFlSepButtonLine, &maBtnOptions, &maBtnOK, - &maBtnCancel, &maBtnHelp }; - Window** pCtrl = pControls; - const sal_Int32 nCount = sizeof( pControls ) / sizeof( pControls[0] ); - for ( sal_Int32 i = 0; i < nCount; ++i, ++pCtrl ) - { - if ( NULL == *pCtrl ) - { - nDelta = nDelta2; - continue; - } - Point aNewPos = (*pCtrl)->GetPosPixel(); - aNewPos.Y() -= nDelta; - (*pCtrl)->SetPosPixel( aNewPos ); - } - } -} - -// ----------------------------------------------------------------------- - -void PrintDialog::ImplFillDialogData() -{ - if ( maRbtAll.IsChecked() ) - meCheckRange = PRINTDIALOG_ALL; - else if( maRbtSelection.IsChecked() ) - meCheckRange = PRINTDIALOG_SELECTION; - else - { - meCheckRange = PRINTDIALOG_RANGE; - maRangeText = maEdtPages.GetText(); - } - - mnCopyCount = (USHORT) maNumCopies.GetValue(); - mbCollateCheck = maCbxCollate.IsChecked(); - - // In Datei drucken - if ( maCbxFilePrint.IsChecked() ) - mpPrinter->SetPrintFile( maFiPrintFile.GetText() ); - mpPrinter->EnablePrintFile( maCbxFilePrint.IsChecked() ); -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( PrintDialog, ImplStatusHdl, Timer*, EMPTYARG ) -{ - QueueInfo aInfo; - ImplPrnDlgUpdateQueueInfo( &maLbName, aInfo ); - maFiStatus.SetText( ImplPrnDlgGetStatusText( aInfo ) ); - - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( PrintDialog, ImplPropertiesHdl, void*, EMPTYARG ) -{ - if ( !TEMPPRINTER() ) - TEMPPRINTER() = new Printer( mpPrinter->GetJobSetup() ); - TEMPPRINTER()->Setup( this ); - - return 0; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( PrintDialog, ImplChangePrinterHdl, void*, EMPTYARG ) -{ - TEMPPRINTER() = ImplPrnDlgListBoxSelect( &maLbName, &maBtnProperties, - mpPrinter, TEMPPRINTER() ); - ImplSetInfo(); - ImplCheckOK(); // Check if "OK" button can be enabled now! - - return 0; -} - -// ----------------------------------------------------------------------- - -bool PrintDialog::ImplGetFilename() -{ - uno::Reference< lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - static ::rtl::OUString aOldFile; - if( xFactory.is() ) - { - uno::Sequence< uno::Any > aTempl( 1 ); - aTempl.getArray()[0] <<= ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION; - uno::Reference< ui::dialogs::XFilePicker > xFilePicker( - xFactory->createInstanceWithArguments( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), - aTempl ), uno::UNO_QUERY ); - DBG_ASSERT( xFilePicker.is(), "could not get FilePicker service" ); - - uno::Reference< ui::dialogs::XFilterManager > xFilterMgr( xFilePicker, uno::UNO_QUERY ); - if( xFilePicker.is() && xFilterMgr.is() ) - { - try - { -#ifdef UNX - // add PostScript and PDF - Printer* pPrinter = TEMPPRINTER() ? TEMPPRINTER() : mpPrinter; - bool bPS = true, bPDF = true; - if( pPrinter ) - { - if( pPrinter->GetCapabilities( PRINTER_CAPABILITIES_PDF ) ) - bPS = false; - else - bPDF = false; - } - if( bPS ) - xFilterMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PostScript" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.ps" ) ) ); - if( bPDF ) - xFilterMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Portable Document Format" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.pdf" ) ) ); -#elif defined WNT - xFilterMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.PRN" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.prn" ) ) ); -#endif - // add arbitrary files - xFilterMgr->appendFilter( maAllFilterStr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.*" ) ) ); - } - catch( lang::IllegalArgumentException rExc ) - { - DBG_ERRORFILE( "caught IllegalArgumentException when registering filter\n" ); - } - - if( aOldFile.getLength() ) - { - INetURLObject aUrl( aOldFile, INET_PROT_FILE ); - xFilePicker->setDefaultName( aUrl.GetLastName() ); - aUrl.CutLastName(); - xFilePicker->setDisplayDirectory( aUrl.GetMainURL( INetURLObject::DECODE_TO_IURI ) ); - } - - if( xFilePicker->execute() == ui::dialogs::ExecutableDialogResults::OK ) - { - uno::Sequence< ::rtl::OUString > aPathSeq( xFilePicker->getFiles() ); - INetURLObject aObj( aPathSeq[0] ); - maFiPrintFile.SetText( aOldFile = aObj.PathToFileName() ); - return true; - } - return false; - } - } - - // something went awry, lets try the old fashioned dialogue - Window* pDlgParent = IsReallyVisible() ? this : GetParent(); - FileDialog aDlg( pDlgParent, WB_STDDIALOG | WB_SAVEAS ); -#ifdef WNT - aDlg.AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "*.prn" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.prn" ) ) ); - aDlg.SetDefaultExt( String( RTL_CONSTASCII_USTRINGPARAM( "prn" ) ) ); -#elif defined UNX - aDlg.AddFilter( String( RTL_CONSTASCII_USTRINGPARAM( "PostScript" ) ), String( RTL_CONSTASCII_USTRINGPARAM( "*.ps" ) ) ); - aDlg.SetDefaultExt( String( RTL_CONSTASCII_USTRINGPARAM( "ps" ) ) ); -#endif - - if( aOldFile.getLength() ) - aDlg.SetPath( aOldFile ); - - if( aDlg.Execute() ) - { - String aTargetFile = aDlg.GetPath(); - maFiPrintFile.SetText( aOldFile = aTargetFile ); - return true; - } - - return false; -} - -// ----------------------------------------------------------------------- - -IMPL_LINK( PrintDialog, ImplModifyControlHdl, void*, p ) -{ - // Radiobuttons (Umfang) - if ( !p || (p == &maRbtAll) || (p == &maRbtPages) || (p == &maRbtSelection) ) - { - BOOL bCheck = maRbtPages.IsChecked(); - maEdtPages.Enable( bCheck ); - if ( p == &maRbtPages ) - maEdtPages.GrabFocus(); - ImplCheckOK(); - } - - // Edit-Felder (Seiten) - if ( p == &maEdtPages ) - ImplCheckOK(); - - if( p == &maEdtFaxNo ) - { - Printer* pPrinter = TEMPPRINTER() ? TEMPPRINTER() : mpPrinter; - pPrinter->SetJobValue( String::CreateFromAscii( "FAX#" ), maEdtFaxNo.GetText() ); - } - - // Anzahl Kopien - BOOL bNumCopies = FALSE; - - if ( !p || p == &maNumCopies ) - { - if ( p ) - bNumCopies = TRUE; - //BOOL bCopies = maNumCopies.GetValue() > 1; - maCbxCollate.Enable( mbCollate ); - - /*if ( !bCopies ) - maCbxCollate.Check( FALSE ); - else*/ - if ( mbCollateCheck ) - maCbxCollate.Check( TRUE ); - } - - // Sortieren - if ( !p || p == &maCbxCollate || bNumCopies ) - { - BOOL bCheck = maCbxCollate.IsChecked(); - - if ( !bNumCopies ) - mbCollateCheck = maCbxCollate.IsChecked(); - - if( bCheck ) - { - maImgCollate.Show(); - maImgNotCollate.Hide(); - } - else - { - maImgCollate.Hide(); - maImgNotCollate.Show(); - } - } - - // Zus"atze - if ( p == &maBtnOptions ) - ClickOptionsHdl(); - - if( p == &maBtnOK ) - { - EndDialog( maCbxFilePrint.IsChecked() ? ImplGetFilename() : TRUE ); - } - - return 0; -} - -// ----------------------------------------------------------------------- - -long PrintDialog::ClickOptionsHdl() -{ - if ( maOptionsHdlLink.IsSet() ) - return maOptionsHdlLink.Call( this ); - else - return TRUE; -} - -// ----------------------------------------------------------------------- - -long PrintDialog::OK() -{ - if ( maOKHdlLink.IsSet() ) - return maOKHdlLink.Call( this ); - else - return TRUE; -} - -// ----------------------------------------------------------------------- - -void PrintDialog::EnableSheetRange( bool bEnable, PrintSheetRange eRange ) -{ - if ( mbWithSheetsAndCells ) - { - switch ( eRange ) - { - case PRINTSHEETS_ALL : - maRbtAllSheets.Enable( bEnable != false ); - break; - case PRINTSHEETS_SELECTED_SHEETS : - maRbtSelectedSheets.Enable( bEnable != false ); - break; - case PRINTSHEETS_SELECTED_CELLS : - maRbtSelectedCells.Enable( bEnable != false ); - break; - default: - DBG_ERRORFILE( "PrintDialog::EnableSheetRange(): invalid range" ); - } - } -} - -// ----------------------------------------------------------------------- - -bool PrintDialog::IsSheetRangeEnabled( PrintSheetRange eRange ) const -{ - if ( !mbWithSheetsAndCells ) - return false; - - bool bRet = false; - switch ( eRange ) - { - case PRINTSHEETS_ALL : - bRet = maRbtAllSheets.IsEnabled() != FALSE; - break; - case PRINTSHEETS_SELECTED_SHEETS : - bRet = maRbtSelectedSheets.IsEnabled() != FALSE; - break; - case PRINTSHEETS_SELECTED_CELLS : - bRet = maRbtSelectedCells.IsEnabled() != FALSE; - break; - default: - DBG_ERRORFILE( "PrintDialog::IsSheetRangeEnabled(): invalid range" ); - } - return bRet; -} - -// ----------------------------------------------------------------------- - -void PrintDialog::CheckSheetRange( PrintSheetRange eRange ) -{ - if ( mbWithSheetsAndCells ) - { - switch ( eRange ) - { - case PRINTSHEETS_ALL : - maRbtAllSheets.Check(); - break; - case PRINTSHEETS_SELECTED_SHEETS : - maRbtSelectedSheets.Check(); - break; - case PRINTSHEETS_SELECTED_CELLS : - maRbtSelectedCells.Check(); - break; - default: - DBG_ERRORFILE( "PrintDialog::CheckSheetRange(): invalid range" ); - } - } -} - -// ----------------------------------------------------------------------- - -PrintSheetRange PrintDialog::GetCheckedSheetRange() const -{ - PrintSheetRange eRange = PRINTSHEETS_ALL; - if ( mbWithSheetsAndCells ) - { - if ( maRbtSelectedSheets.IsChecked() ) - eRange = PRINTSHEETS_SELECTED_SHEETS; - else if ( maRbtSelectedCells.IsChecked() ) - eRange = PRINTSHEETS_SELECTED_CELLS; - } - return eRange; -} - -// ----------------------------------------------------------------------- - -bool PrintDialog::IsSheetRangeChecked( PrintSheetRange eRange ) const -{ - if ( !mbWithSheetsAndCells ) - return false; - - bool bRet = false; - switch ( eRange ) - { - case PRINTSHEETS_ALL : - bRet = maRbtAllSheets.IsChecked() != FALSE; - break; - case PRINTSHEETS_SELECTED_SHEETS : - bRet = maRbtSelectedSheets.IsChecked() != FALSE; - break; - case PRINTSHEETS_SELECTED_CELLS : - bRet = maRbtSelectedCells.IsChecked() != FALSE; - break; - default: - DBG_ERRORFILE( "PrintDialog::IsSheetRangeChecked(): invalid range" ); - } - return bRet; -} - -// ----------------------------------------------------------------------- - -long PrintDialog::Notify( NotifyEvent& rNEvt ) -{ - if ( (rNEvt.GetType() == EVENT_GETFOCUS) && IsReallyVisible() ) - ImplStatusHdl( &maStatusTimer ); - else if ( rNEvt.GetType() == EVENT_KEYINPUT ) - { - if ( rNEvt.GetKeyEvent()->GetKeyCode().GetCode() == KEY_F1 && mpPrinterImpl->m_bHelpDisabled ) - return 1; // do nothing - } - - return ModalDialog::Notify( rNEvt ); -} - -// ----------------------------------------------------------------------- - -void PrintDialog::DataChanged( const DataChangedEvent& rDCEvt ) -{ - if ( rDCEvt.GetType() == DATACHANGED_PRINTER ) - { - TEMPPRINTER() = ImplPrnDlgUpdatePrinter( mpPrinter, TEMPPRINTER() ); - Printer* pPrn; - if ( TEMPPRINTER() ) - pPrn = TEMPPRINTER(); - else - pPrn = mpPrinter; - ImplFillPrnDlgListBox( pPrn, &maLbName, &maBtnProperties ); - ImplSetInfo(); - ImplCheckOK(); - } - else if ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) - ImplSetImages(); - - ModalDialog::DataChanged( rDCEvt ); -} - -// ----------------------------------------------------------------------- - -short PrintDialog::Execute() -{ - if ( !mpPrinter || mpPrinter->IsPrinting() || mpPrinter->IsJobActive() ) - { - DBG_ERRORFILE( "PrinterSetupDialog::Execute() - No Printer or printer is printing" ); - return FALSE; - } - - // check if the printer brings up its own dialog - // in that case leave the work to that dialog - if( mpPrinter->GetCapabilities( PRINTER_CAPABILITIES_EXTERNALDIALOG ) ) - return TRUE; - - Printer::updatePrinters(); - - // Controls initialisieren - ImplFillPrnDlgListBox( mpPrinter, &maLbName, &maBtnProperties ); - ImplSetInfo(); - maStatusTimer.Start(); - ImplInitControls(); - maNumCopies.GrabFocus(); - maNumCopies.SetSelection( Selection( 0, maNumCopies.GetText().Len() ) ); - ImplModifyControlHdl( NULL ); - - // Dialog starten - short nRet = ModalDialog::Execute(); - - // Wenn Dialog mit OK beendet wurde, dann die Daten updaten - if( nRet == TRUE ) - { - if ( TEMPPRINTER() ) - mpPrinter->SetPrinterProps( TEMPPRINTER() ); - ImplFillDialogData(); - } - - maStatusTimer.Stop(); - - return nRet; -} - -// ----------------------------------------------------------------------- - -void PrintDialog::DisableHelp() -{ - mpPrinterImpl->m_bHelpDisabled = sal_True; - maBtnHelp.Disable(); -} - diff --git a/svtools/source/dialogs/printdlg.hrc b/svtools/source/dialogs/printdlg.hrc deleted file mode 100644 index 83b7b0b28c82..000000000000 --- a/svtools/source/dialogs/printdlg.hrc +++ /dev/null @@ -1,74 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include <svtools/svtools.hrc> - -#define FL_PRINTER 1 -#define LB_NAMES 2 -#define BTN_PROPERTIES 3 -#define FT_NAME 4 -#define FT_STATUS 5 -#define FI_STATUS 6 -#define FT_TYPE 7 -#define FI_TYPE 8 -#define FT_LOCATION 9 -#define FI_LOCATION 10 -#define FT_COMMENT 11 -#define FI_COMMENT 12 -#define CBX_FILEPRINT 13 -#define FI_PRINTFILE 14 -#define FI_FAXNO 15 -#define EDT_FAXNO 16 - -#define FL_PRINT 20 -#define RBT_ALL_SHEETS 21 -#define RBT_SELECTED_SHEETS 22 -#define RBT_SELECTED_CELLS 23 - -#define FL_PRINTRANGE 30 -#define RBT_ALL 31 -#define RBT_PAGES 32 -#define EDT_PAGES 33 -#define RBT_SELECTION 34 - -#define FL_SEPCOPIESRANGE 35 - -#define FL_COPIES 40 -#define FT_COPIES 41 -#define NUM_COPIES 42 -#define CBX_COLLATE 43 -#define IMG_COLLATE 44 -#define IMG_NOT_COLLATE 45 - -#define FL_SEPBUTTONLINE 50 -#define BTN_OK 51 -#define BTN_CANCEL 52 -#define BTN_HELP 53 -#define BTN_OPTIONS 54 - -#define STR_ALLFILTER 10 - diff --git a/svtools/source/dialogs/printdlg.src b/svtools/source/dialogs/printdlg.src deleted file mode 100644 index 80c6e465d49a..000000000000 --- a/svtools/source/dialogs/printdlg.src +++ /dev/null @@ -1,349 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "printdlg.hrc" - -#define IMAGE_MAGENTA_MASK Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; } - -ModalDialog DLG_SVT_PRNDLG_PRINTDLG -{ - HelpID = "svtools:ModalDialog:DLG_SVT_PRNDLG_PRINTDLG"; - SVLook = TRUE ; - OutputSize = TRUE ; - Moveable = TRUE ; - Size = MAP_APPFONT ( 265 , 210 ) ; - Text [ en-US ] = "Print" ; - FixedLine FL_PRINTER - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 253 , 8 ) ; - Text [ en-US ] = "Printer" ; - }; - FixedText FT_NAME - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 45 , 10 ) ; - Text [ en-US ] = "~Name" ; - }; - ListBox LB_NAMES - { - HelpID = "svtools:ListBox:DLG_SVT_PRNDLG_PRINTDLG:LB_NAMES"; - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 13 ) ; - Size = MAP_APPFONT ( 130 , 80 ) ; - DropDown = TRUE ; - Sort = TRUE ; - }; - PushButton BTN_PROPERTIES - { - HelpID = "svtools:PushButton:DLG_SVT_PRNDLG_PRINTDLG:BTN_PROPERTIES"; - Pos = MAP_APPFONT ( 193 , 12 ) ; - Size = MAP_APPFONT ( 60 , 14 ) ; - Text [ en-US ] = "Propert~ies..." ; - }; - FixedText FT_STATUS - { - Pos = MAP_APPFONT ( 12 , 29 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Status" ; - }; - FixedText FI_STATUS - { - Pos = MAP_APPFONT ( 60 , 29 ) ; - Size = MAP_APPFONT ( 193 , 8 ) ; - }; - FixedText FT_TYPE - { - Pos = MAP_APPFONT ( 12 , 40 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Type" ; - }; - FixedText FI_TYPE - { - Pos = MAP_APPFONT ( 60 , 40 ) ; - Size = MAP_APPFONT ( 193 , 8 ) ; - }; - FixedText FT_LOCATION - { - Pos = MAP_APPFONT ( 12 , 51 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Location" ; - }; - FixedText FI_LOCATION - { - Pos = MAP_APPFONT ( 60 , 51 ) ; - Size = MAP_APPFONT ( 193 , 8 ) ; - }; - FixedText FT_COMMENT - { - Pos = MAP_APPFONT ( 12 , 62 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Comment" ; - }; - FixedText FI_COMMENT - { - Pos = MAP_APPFONT ( 60 , 62 ) ; - Size = MAP_APPFONT ( 193 , 8 ) ; - }; - FixedText FI_FAXNO - { - Pos = MAP_APPFONT ( 12 , 75 ) ; - Size = MAP_APPFONT ( 45 , 8 ) ; - Text [ en-US ] = "Fax number"; - }; - Edit EDT_FAXNO - { - HelpID = "svtools:Edit:DLG_SVT_PRNDLG_PRINTDLG:EDT_FAXNO"; - Border = TRUE; - Pos = MAP_APPFONT ( 60 , 73 ); - Size = MAP_APPFONT ( 188 , 12 ); - }; - CheckBox CBX_FILEPRINT - { - HelpID = "svtools:CheckBox:DLG_SVT_PRNDLG_PRINTDLG:CBX_FILEPRINT"; - Pos = MAP_APPFONT ( 12 , 73 ) ; - Size = MAP_APPFONT ( 75 , 10 ) ; - Text [ en-US ] = "Print to file" ; - }; - FixedText FI_PRINTFILE - { - Pos = MAP_APPFONT ( 90 , 74 ) ; - Size = MAP_APPFONT ( 163 , 8 ) ; - }; - /*!!! - PushButton BTN_BROWSE - { - HelpID = "svtools:PushButton:DLG_SVT_PRNDLG_PRINTDLG:BTN_BROWSE"; - Pos = MAP_APPFONT ( 234 , 75 ) ; - Size = MAP_APPFONT ( 14 , 14 ) ; - Text = "~..." ; - Hide = TRUE ; - }; - */ - FixedLine FL_PRINT - { - Pos = MAP_APPFONT ( 6 , 91 ) ; - Size = MAP_APPFONT ( 117 , 8 ) ; - Text [ en-US ] = "Print" ; - }; - RadioButton RBT_ALL_SHEETS - { - HelpID = "svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_ALL_SHEETS"; - Pos = MAP_APPFONT ( 12 , 102 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "All sheets" ; - }; - RadioButton RBT_SELECTED_SHEETS - { - HelpID = "svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_SELECTED_SHEETS"; - Pos = MAP_APPFONT ( 12 , 115 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Selected sheets" ; - }; - RadioButton RBT_SELECTED_CELLS - { - HelpID = "svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_SELECTED_CELLS"; - Pos = MAP_APPFONT ( 12 , 128 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Selected cells" ; - }; - FixedLine FL_PRINTRANGE - { - Pos = MAP_APPFONT ( 6 , 141 ) ; - Size = MAP_APPFONT ( 117 , 8 ) ; - Text [ en-US ] = "Print range" ; - }; - RadioButton RBT_ALL - { - HelpID = "svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_ALL"; - Pos = MAP_APPFONT ( 12 , 152 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "All pages" ; - }; - RadioButton RBT_PAGES - { - HelpID = "svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_PAGES"; - Pos = MAP_APPFONT ( 12 , 165 ) ; - Size = MAP_APPFONT ( 50 , 10 ) ; - Text [ en-US ] = "Pages" ; - }; - Edit EDT_PAGES - { - HelpID = "svtools:Edit:DLG_SVT_PRNDLG_PRINTDLG:EDT_PAGES"; - Border = TRUE ; - Pos = MAP_APPFONT ( 65 , 164 ) ; - Size = MAP_APPFONT ( 52 , 12 ) ; - }; - RadioButton RBT_SELECTION - { - HelpID = "svtools:RadioButton:DLG_SVT_PRNDLG_PRINTDLG:RBT_SELECTION"; - Hide = TRUE ; - Pos = MAP_APPFONT ( 12 , 179 ) ; - Size = MAP_APPFONT ( 105 , 10 ) ; - Text [ en-US ] = "Selection" ; - }; - FixedLine FL_SEPCOPIESRANGE - { - Pos = MAP_APPFONT( 126, 102 ); - Size = MAP_APPFONT( 1, 74 ); - Vert = TRUE; - }; - FixedLine FL_COPIES - { - Pos = MAP_APPFONT ( 129 , 91 ) ; - Size = MAP_APPFONT ( 130 , 8 ) ; - Text [ en-US ] = "Copies" ; - }; - FixedText FT_COPIES - { - Pos = MAP_APPFONT ( 135 , 104 ) ; - Size = MAP_APPFONT ( 63 , 8 ) ; - Text [ en-US ] = "Number of copies" ; - }; - NumericField NUM_COPIES - { - HelpID = "svtools:NumericField:DLG_SVT_PRNDLG_PRINTDLG:NUM_COPIES"; - Border = TRUE ; - Pos = MAP_APPFONT ( 201 , 102 ) ; - Size = MAP_APPFONT ( 33 , 12 ) ; - Repeat = TRUE ; - Spin = TRUE ; - Minimum = 1 ; - Maximum = 9999 ; - StrictFormat = TRUE ; - First = 1 ; - Last = 9999 ; - }; - CheckBox CBX_COLLATE - { - HelpID = "svtools:CheckBox:DLG_SVT_PRNDLG_PRINTDLG:CBX_COLLATE"; - Pos = MAP_APPFONT ( 201 , 123 ) ; - Size = MAP_APPFONT ( 60 , 10 ) ; - Text [ en-US ] = "Co~llate" ; - }; - FixedImage IMG_COLLATE - { - Pos = MAP_APPFONT ( 132 , 117 ) ; - Size = MAP_APPFONT ( 67 , 22 ) ; - Hide = TRUE ; - }; - FixedImage IMG_NOT_COLLATE - { - Pos = MAP_APPFONT ( 132 , 117 ) ; - Size = MAP_APPFONT ( 67 , 22 ) ; - Hide = TRUE ; - }; - FixedLine FL_SEPBUTTONLINE - { - Pos = MAP_APPFONT( 0, 179 ); - Size = MAP_APPFONT( 265, 8 ); - }; - PushButton BTN_OPTIONS - { - HelpID = "svtools:PushButton:DLG_SVT_PRNDLG_PRINTDLG:BTN_OPTIONS"; - Hide = TRUE ; - Pos = MAP_APPFONT ( 6 , 190 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - Text [ en-US ] = "~Options..." ; - }; - OKButton BTN_OK - { - Pos = MAP_APPFONT ( 100 , 190 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 153 , 190 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 209 , 190 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - String STR_ALLFILTER - { - Text [ en-US ] = "<All>"; - }; -}; - -Image RID_IMG_PRNDLG_COLLATE -{ - ImageBitmap = Bitmap { File = "collate.bmp" ; }; - MaskColor = IMAGE_MAGENTA_MASK ; -}; - -Image RID_IMG_PRNDLG_NOCOLLATE -{ - ImageBitmap = Bitmap { File = "ncollate.bmp" ; }; - MaskColor = IMAGE_MAGENTA_MASK ; -}; - -Image RID_IMG_PRNDLG_COLLATE_HC -{ - ImageBitmap = Bitmap { File = "collate_h.bmp" ; }; - MaskColor = IMAGE_MAGENTA_MASK ; -}; - -Image RID_IMG_PRNDLG_NOCOLLATE_HC -{ - ImageBitmap = Bitmap { File = "ncollate_h.bmp" ; }; - MaskColor = IMAGE_MAGENTA_MASK ; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/svtools/source/dialogs/propctrl.cxx b/svtools/source/dialogs/propctrl.cxx deleted file mode 100644 index 675a93ca728b..000000000000 --- a/svtools/source/dialogs/propctrl.cxx +++ /dev/null @@ -1,503 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - - -#ifndef _USR_INTROSP_HXX -#include <usr/inspect.hxx> -#endif -#ifndef _USR_SERINFO_HXX -#include <usr/serinfo.hxx> -#endif -#ifndef _USR_INTROSP_HXX -#include <usr/introsp.hxx> -#endif - -#include <propctrl.hxx> -#include <property.hxx> - - -// Controller-Implementation -class PropertyEditorControler_Impl : public SvPropertyDataControl -{ - XIntrospectionAccessRef mxUnoAccess; - PropertySequence mPropSeq; - XPropertyEditorRef mxEditor; - SvPropertyBox* mpPropBox; - UsrAny maUnoObj; - -public: - // Provisorisch direkt Window mitgeben - PropertyEditorControler_Impl( SvPropertyBox* pPropBox_ ); - //SimplePropertyEditor_Impl( void ); - - // Objekt zum Editieren setzen, dies loest das Eintragen - // der Properties in die PropertyBox aus - void setObject( XPropertyEditorRef xEditor_, const UsrAny& aToEditObj, - /* HACK fuer History-Interface*/String aPath, BOOL bBack=FALSE, BOOL bForward=FALSE ); - - /* SPAETER - SMART_UNO_DECLARATION(ImplIntrospection,UsrObject); - - // Methoden von XInterface - XInterface * queryInterface( Uik aUik ); - XIdlClassRef getIdlClass(); - */ - - // Methoden von SvPropertyDataControl - virtual void Modified( const String& aName, - const String& aVal, - void* pData); - - virtual void Clicked( const String& aName, - const String& aVal, - void* pData); - - virtual void Commit( const String& aName, - const String& aVal, - void* pData); - - virtual void Select( const String& aName, - void* pData); - - virtual void LinkClicked(const String& aName, - void* pData); - - // TODO: Das muss raus, sehr unglueckliche Schnittstelle - // PropertyBox erzwingt Zustand des Controllers - virtual String GetTheCorrectProperty() const; -}; - -// Methoden von XPropertyEditor -PropertyEditorControler_Impl::PropertyEditorControler_Impl( SvPropertyBox* pPropBox_ ) -{ - mpPropBox = pPropBox_; -} - -void PropertyEditorControler_Impl::setObject( XPropertyEditorRef xEditor_, const UsrAny& aToEditObj, - /* HACK fuer History-Interface*/ String aPath, BOOL bBack, BOOL bForward ) -{ - static XIntrospectionRef xIntrospection; - - // Ohne Fenster laeuft gar nix - if( !mpPropBox ) - return; - - // Fenster aufraeumen - mpPropBox->ClearAll(); - - // Editor und Objekt bernehmen - mxEditor = xEditor_; - maUnoObj = aToEditObj; - - if( !xIntrospection.is() ) - { - // Introspection-Service holen - XServiceManagerRef xServiceManager = getGlobalServiceManager(); - XServiceProviderRef xProv = xServiceManager->getServiceProvider - ( "com.sun.star.beans.Introspection", UikSequence(), UikSequence() ); - xIntrospection = (XIntrospection *)xProv->newInstance() - ->queryInterface( XIntrospection::getSmartUik() ); - } - if( !xIntrospection.is() ) - return; - - // und unspecten - mxUnoAccess = xIntrospection->inspect( maUnoObj ); - if( !mxUnoAccess.Is() ) - return; - - // Uns als Controler anmelden - mpPropBox->SetController( this ); - - // Properties anlegen - mPropSeq = mxUnoAccess->getProperties(); - UINT32 nPropCount = mPropSeq.getLen(); - const Property* pProps = mPropSeq.getConstArray(); - - // 1. Seite anlegen - USHORT nPropPageId = mpPropBox->AppendPage("Properties"); - - // Beim Eintragen solls nicht flimmern - mpPropBox->DisableUpdate(); - - // Dummy-Properties fuer Path und Navigation - SvPropertyData aProperty; - if( aPath.Len() ) - { - // Interface und Structs werden Hyperlinks - aProperty.bIsHyperLink = FALSE; - aProperty.bIsLocked = TRUE; - aProperty.bHasVisibleXButton = FALSE; - aProperty.eKind = KOC_EDIT; - aProperty.pControl = NULL; - aProperty.pDataPtr = NULL; - aProperty.aName = "Path"; - aProperty.aValue = aPath; - mpPropBox->InsertEntry( aProperty ); - } - if( bBack || bForward ) - { - // Interface und Structs werden Hyperlinks - aProperty.bIsHyperLink = TRUE; - aProperty.bIsLocked = TRUE; - // HACK, solange Hyperlink nicht funktioniert - aProperty.bHasVisibleXButton = aProperty.bIsHyperLink; - aProperty.eKind = KOC_EDIT; - UINT32 iHandle; - aProperty.pControl = NULL; - if( bBack ) - { - iHandle = 1000001; - aProperty.pDataPtr = (void*)iHandle; - aProperty.aName = "<-"; - aProperty.aValue = "Back"; - mpPropBox->InsertEntry( aProperty ); - } - if( bForward ) - { - iHandle = 1000000; - aProperty.pDataPtr = (void*)iHandle; - aProperty.aName = "->"; - aProperty.aValue = "Forward"; - mpPropBox->InsertEntry( aProperty ); - } - } - - // Properties eintragen - // TODO: Wo kommen die Strings her - UINT32 i; - for( i = 0 ; i < nPropCount ; i++ ) - { - const Property& rProp = pProps[ i ]; - - // TypeClass des Property ermitteln - XIdlClassRef xPropClass = rProp.Type; - if( !xPropClass.is() ) - { - DBG_ERROR( "PropertyEditorControler_Impl::Commit(), Property without type" ) - return; - } - TypeClass eType = xPropClass->getTypeClass(); - - // Interface und Structs werden Hyperlinks - aProperty.bIsHyperLink = ( eType == TYPECLASS_INTERFACE || eType == TYPECLASS_STRUCT ); - aProperty.bIsLocked = ((rProp.Attributes & PROPERTY_READONLY) != 0 ); - - // HACK, solange Hyperlink nicht funktioniert - aProperty.bHasVisibleXButton = aProperty.bIsHyperLink; - - // Wert holen und in String wandeln - UsrAny aVal = mxUnoAccess->getPropertyValueByIndex( maUnoObj, i ); - String aStrVal = AnyToString( aVal ); - - // Properties reinbraten - aProperty.eKind = KOC_EDIT; - aProperty.aName = rProp.Name; - aProperty.aValue = aStrVal; - aProperty.pDataPtr = (void*)i; - aProperty.pControl = NULL; - //aProperty.theValues.Insert(new String("1"),aProperty.theValues.Count()); - //aProperty.theValues.Insert(new String("2"),aProperty.theValues.Count()); - //aProperty.theValues.Insert(new String("3"),aProperty.theValues.Count()); - //aProperty.theValues.Insert(new String("4"),aProperty.theValues.Count()); - mpPropBox->InsertEntry( aProperty ); - } - - // 2. Seite fuer Listener - // TODO: Wo kommen die Eintraege her - USHORT nListenerPageId = mpPropBox->AppendPage("Listener"); - - XIdlClassSequence aSupportedListenerSeq = mxUnoAccess->getSupportedListeners(); - const XIdlClassRef* pListenerArray = aSupportedListenerSeq.getConstArray(); - UINT32 nIfaceCount = aSupportedListenerSeq.getLen(); - - // Property-Data vorfuellen - aProperty.eKind = KOC_EDIT; - //aProperty.eKind = KOC_UNDEFINED; - aProperty.aValue = "Listener-Value"; - aProperty.bHasVisibleXButton = TRUE; - // TEST - //aProperty.bIsHyperLink = TRUE; - aProperty.bIsHyperLink = FALSE; - aProperty.bIsLocked = TRUE; - //aProperty.bIsLocked = FALSE; - aProperty.pDataPtr = NULL; - aProperty.pControl = NULL; - - for( UINT32 j = 0 ; j < nIfaceCount ; j++ ) - { - const XIdlClassRef& rxIfaceClass = pListenerArray[j]; - aProperty.aName = rxIfaceClass->getName(); - mpPropBox->InsertEntry( aProperty ); - } - mpPropBox->EnableUpdate(); - mpPropBox->SetPage( nPropPageId ); -} - -void PropertyEditorControler_Impl::Modified -( const String& aName, const String& aVal, void* pData) -{ -} - -void PropertyEditorControler_Impl::Clicked -( const String& aName, const String& aVal, void* pData) -{ - // HACK, solange LinkClicked nicht funktioniert - UINT32 iPos = (UINT32)pData; - UINT32 nPropCount = mPropSeq.getLen(); - if( iPos >= nPropCount ) - { - // Spezial-IDs fuer forward/back? - BOOL bForward = (iPos == 1000000); - BOOL bBack = (iPos == 1000001); - if( bForward || bBack ) - { - // Unterstuetzt der PropertyEditor das? - XPropertyEditorNavigationRef xPropEdNav = (XPropertyEditorNavigation*) - mxEditor->queryInterface( XPropertyEditorNavigation::getSmartUik() ); - if( xPropEdNav.is() ) - { - if( bForward ) - xPropEdNav->forward(); - else - xPropEdNav->back(); - } - } - return; - } - - const Property* pProps = mPropSeq.getConstArray(); - const Property& rProp = pProps[ iPos ]; - XIdlClassRef xPropClass = rProp.Type; - if( !xPropClass.is() ) - { - DBG_ERROR( "PropertyEditorControler_Impl::Commit(), Property without type" ) - return; - } - TypeClass eType = xPropClass->getTypeClass(); - if( eType == TYPECLASS_INTERFACE || eType == TYPECLASS_STRUCT ) - LinkClicked( aName, pData ); -} - -void PropertyEditorControler_Impl::Commit -( const String& aName, const String& aVal, void* pData) -{ - UINT32 iPos = (UINT32)pData; - UINT32 nPropCount = mPropSeq.getLen(); - if( iPos >= nPropCount ) - return; - - // String in Property-Typ wandeln - const Property* pProps = mPropSeq.getConstArray(); - const Property& rProp = pProps[ iPos ]; - XIdlClassRef xPropClass = rProp.Type; - if( !xPropClass.is() ) - { - DBG_ERROR( "PropertyEditorControler_Impl::Commit(), Property without type" ) - return; - } - TypeClass eType = xPropClass->getTypeClass(); - UsrAny aValue = StringToAny( aVal, eType ); - - // Wert setzen - mxUnoAccess->setPropertyValueByIndex( maUnoObj, iPos, aValue ); - - // Wert neu holen und ggf. neu setzen - UsrAny aNewVal = mxUnoAccess->getPropertyValueByIndex( maUnoObj, iPos ); - String aNewStrVal = AnyToString( aNewVal ); - if( aNewStrVal != aVal ) - mpPropBox->SetPropertyValue( aName, aNewStrVal ); -} - -void PropertyEditorControler_Impl::Select -( const String& aName, void* pData) -{ -} - -void PropertyEditorControler_Impl::LinkClicked(const String& aName, void* pData) -{ - UINT32 iPos = (UINT32)pData; - UINT32 nPropCount = mPropSeq.getLen(); - if( iPos >= nPropCount ) - return; - - // Wert holen und an Master-Controller zurueckgeben - UsrAny aNewObj = mxUnoAccess->getPropertyValueByIndex( maUnoObj, iPos ); - mxEditor->setObject( aNewObj, aName ); -} - - -// TODO: Das muss raus, sehr unglueckliche Schnittstelle -// PropertyBox erzwingt Zustand des Controllers -String PropertyEditorControler_Impl::GetTheCorrectProperty() const -{ - return String(); -} - - -SMART_UNO_IMPLEMENTATION(SimplePropertyEditor_Impl,UsrObject); - -// Methoden von XInterface -XInterface * SimplePropertyEditor_Impl::queryInterface( Uik aUik ) -{ - if( aUik == XPropertyEditor::getSmartUik() ) - return (XPropertyEditor *)this; - if( aUik == XPropertyEditorNavigation::getSmartUik() ) - return (XPropertyEditorNavigation *)this; - return UsrObject::queryInterface( aUik ); -} - -XIdlClassRef SimplePropertyEditor_Impl::getIdlClass() -{ - // TODO: Unterstuetzen - return NULL; -} - - -// Methoden von SimplePropertyEditor_Impl -SimplePropertyEditor_Impl::SimplePropertyEditor_Impl( Window *pParent ) - : maHistorySeq( 10 ), maHistoryNames( 10 ), bSimpleHistory( FALSE ) -{ - //XVCLComponent xC = pParent->getVCLComponent - //xC->addVCLComponentListener( MyListener ) - - pActiveControler = NULL; - mpPropBox = new SvPropertyBox( pParent ); - mpPropBox->Show(); - - long cxOut = pParent->GetOutputSizePixel().Width(); - long cyOut = pParent->GetOutputSizePixel().Height(); - Size aSize( cxOut, cyOut ); - mpPropBox->SetPosSizePixel( Point( 0, 0 ), aSize ); - - mnHistoryCount = 0; - mnActualHistoryLevel = -1; -} - -SimplePropertyEditor_Impl::~SimplePropertyEditor_Impl() -{ - delete mpPropBox; - if( pActiveControler ) - delete pActiveControler; -} - -// Private Methode zum Anlegen/Aktivieren der Controller -void SimplePropertyEditor_Impl::showObject( const UsrAny& aToShowObj ) -{ - if( pActiveControler ) - delete pActiveControler; - - // Neuen Controller auf der Wiese anlegen (TODO: Controller cachen?) - pActiveControler = new PropertyEditorControler_Impl( mpPropBox ); - - XPropertyEditorRef xThis = (XPropertyEditor *)this; - pActiveControler->setObject( xThis, aToShowObj, - /*aPath*/bSimpleHistory ? getPath() : String(), - /*bBack*/bSimpleHistory && mnActualHistoryLevel > 0, - /*bForward*/bSimpleHistory && (INT32)mnHistoryCount > mnActualHistoryLevel ); -} - -String SimplePropertyEditor_Impl::getPath( void ) -{ - String aRetStr; - const String* pStr = maHistoryNames.getConstArray(); - for( INT32 i = 0 ; i <= mnActualHistoryLevel ; i++ ) - { - String aName = pStr[i]; - - // Root speziell behandeln - if( i == 0 ) - { - aRetStr += aName; - } - else - { - // Ist es ein Index? - long l = (long)aName; - String aNumStr( l ); - if( aNumStr == aName ) - { - aRetStr += '['; - aRetStr += aName; - aRetStr += ']'; - } - else - { - aRetStr += '.'; - aRetStr += aName; - } - } - } - return aRetStr; -} - -// Methoden von XPropertyEditor -void SimplePropertyEditor_Impl::setObject( const UsrAny& aToEditObj, const XubString& aObjName ) -{ - // History pflegen - mnActualHistoryLevel++; - mnHistoryCount = (UINT32)mnActualHistoryLevel; - UINT32 iHistorySize = maHistorySeq.getLen(); - if( mnHistoryCount > iHistorySize ) - { - maHistorySeq.realloc( iHistorySize + 10 ); - maHistoryNames.realloc( iHistorySize + 10 ); - } - - // Neues Object eintragen - maHistorySeq.getArray()[ mnHistoryCount ] = aToEditObj; - maHistoryNames.getArray()[ mnHistoryCount ] = aObjName; - - // Object anzeigen - showObject( aToEditObj ); -} - -// Methoden von PropertyEditorNavigation -void SimplePropertyEditor_Impl::forward(void) -{ - if( (INT32)mnHistoryCount > mnActualHistoryLevel ) - { - // Naechstes Object darstellen - mnActualHistoryLevel++; - showObject( maHistorySeq.getConstArray()[mnActualHistoryLevel] ); - } -} - -void SimplePropertyEditor_Impl::back(void) -{ - if( mnActualHistoryLevel > 0 ) - { - // Voriges Object darstellen - mnActualHistoryLevel--; - showObject( maHistorySeq.getConstArray()[mnActualHistoryLevel] ); - } -} - - diff --git a/svtools/source/dialogs/propctrl.hxx b/svtools/source/dialogs/propctrl.hxx deleted file mode 100644 index 949873ceb1b7..000000000000 --- a/svtools/source/dialogs/propctrl.hxx +++ /dev/null @@ -1,115 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -/* -#include <tools/stream.hxx> -#include <vcl/sound.hxx> -#include "sbx.hxx" -#include "sbxbase.hxx" -#include "sbxres.hxx" -#include <svl/brdcst.hxx> - */ - - -#ifndef __PROPED_HXX__ -#include <proped.hxx> -#endif -#ifndef _UNO_HXX -#include <usr/uno.hxx> -#endif -#ifndef _USR_SEQU_HXX -#include <usr/sequ.hxx> -#endif -#ifndef __TOOLSIDL_HXX__ -#include <usr/toolsidl.hxx> -#endif - -/* -class XPropertyEditor - : public XInterface -{ -public: - - virtual void setObject(const UsrAny& aToInspectObj) = 0; - - static Uik getSmartUik() { return(385); } -}; -*/ - -class PropertyEditorControler_Impl; -class SvPropertyBox; -class Window; - -class SimplePropertyEditor_Impl : - public XPropertyEditor, - public XPropertyEditorNavigation, - public UsrObject -{ - PropertyEditorControler_Impl* pActiveControler; - SvPropertyBox* mpPropBox; - UsrAny maStartUnoObj; - UsrAny maActiveUnoObj; - - // History der Objekte speichern - AnySequence maHistorySeq; - WSStringSequence maHistoryNames; - UINT32 mnHistoryCount; - INT32 mnActualHistoryLevel; - - // Einfache History via Dummy-Properties - BOOL bSimpleHistory; - - // Methode zum Anlegen/Aktivieren der Controller - void showObject( const UsrAny& aToShowObj ); - String getPath( void ); - -public: - // Provisorischer Ctor mit Parent-Window - SimplePropertyEditor_Impl( Window *pParent ); - ~SimplePropertyEditor_Impl(); - - // HACK fuer History-Test - void enableSimpleHistory( BOOL bHistory_ ) { bSimpleHistory = bHistory_; } - - SMART_UNO_DECLARATION(ImplIntrospection,UsrObject); - - // Methoden von XInterface - XInterface * queryInterface( Uik aUik ); - XIdlClassRef getIdlClass(); - - // Methoden von XPropertyEditor - virtual void setObject(const UsrAny& aToInspectObj, const XubString& aObjName); - - // Methoden von PropertyEditorNavigation - virtual void forward(void); - virtual void back(void); - -}; - - - - diff --git a/svtools/source/dialogs/roadmapwizard.cxx b/svtools/source/dialogs/roadmapwizard.cxx index 43b9fcddf91d..cdf2eef32fdc 100644 --- a/svtools/source/dialogs/roadmapwizard.cxx +++ b/svtools/source/dialogs/roadmapwizard.cxx @@ -31,7 +31,7 @@ #include <svtools/roadmapwizard.hxx> #include <svtools/svtools.hrc> #include <svtools/svtdata.hxx> -#include "roadmap.hxx" +#include <svtools/roadmap.hxx> #include <tools/debug.hxx> #include <stdarg.h> diff --git a/svtools/source/dialogs/so3res.src b/svtools/source/dialogs/so3res.src index 524b58e0a5df..0d1aa1756267 100644 --- a/svtools/source/dialogs/so3res.src +++ b/svtools/source/dialogs/so3res.src @@ -25,10 +25,11 @@ * ************************************************************************/ -#include "sores.hxx" +#include "svtools/sores.hxx" #define __RSC -#include "soerr.hxx" +#include <svtools/soerr.hxx> #define S_MAX 0x7fff + Resource RID_SO_ERROR_HANDLER { String ERRCODE_SO_GENERALERROR&S_MAX diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx index af38c444c0f2..c211413af925 100644 --- a/svtools/source/edit/editsyntaxhighlighter.cxx +++ b/svtools/source/edit/editsyntaxhighlighter.cxx @@ -31,7 +31,7 @@ #include <svtools/svmedit.hxx> #include <svtools/xtextedt.hxx> #include <svtools/editsyntaxhighlighter.hxx> -#include "../../inc/txtattr.hxx" +#include <svtools/txtattr.hxx> MultiLineEditSyntaxHighlight::MultiLineEditSyntaxHighlight( Window* pParent, WinBits nWinStyle, diff --git a/svtools/source/edit/makefile.mk b/svtools/source/edit/makefile.mk deleted file mode 100644 index 8d4da553cb0d..000000000000 --- a/svtools/source/edit/makefile.mk +++ /dev/null @@ -1,61 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=edit - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(EXCEPTIONSFILES) \ - $(SLO)$/textdata.obj \ - $(SLO)$/textundo.obj \ - $(SLO)$/txtattr.obj \ - $(SLO)$/xtextedt.obj \ - $(SLO)$/sychconv.obj \ - $(SLO)$/svmedit.obj \ - $(SLO)$/svmedit2.obj \ - $(SLO)$/editsyntaxhighlighter.obj - -EXCEPTIONSFILES= \ - $(SLO)$/textview.obj \ - $(SLO)$/textdoc.obj \ - $(SLO)$/texteng.obj \ - $(SLO)$/textwindowpeer.obj \ - $(SLO)$/syntaxhighlight.obj \ - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/source/edit/sychconv.cxx b/svtools/source/edit/sychconv.cxx index 3efa510bfc5a..d72200ac9c42 100644 --- a/svtools/source/edit/sychconv.cxx +++ b/svtools/source/edit/sychconv.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "sychconv.hxx" +#include <svtools/sychconv.hxx> #include <vcl/outdev.hxx> BOOL SymCharConverter::Convert( Font& rFont, UniString& rString, OutputDevice* pDev ) diff --git a/svtools/source/edit/syntaxhighlight.cxx b/svtools/source/edit/syntaxhighlight.cxx index 87585f5b2587..6ea9f05d78a1 100644 --- a/svtools/source/edit/syntaxhighlight.cxx +++ b/svtools/source/edit/syntaxhighlight.cxx @@ -523,7 +523,7 @@ BOOL SimpleTokenizer_Impl::getNextToken( /*out*/TokenTypes& reType, c = getChar(); // '/' entfernen // Alle Zeichen bis Zeilen-Ende oder EOF entfernen - sal_Unicode cPeek = peekChar(); + sal_Unicode cPeek = c; while( cPeek != CHAR_EOF && testCharFlags( cPeek, CHAR_EOL ) == FALSE ) { getChar(); diff --git a/svtools/source/edit/textdoc.cxx b/svtools/source/edit/textdoc.cxx index d4470904077e..1f7fa9745c8c 100644 --- a/svtools/source/edit/textdoc.cxx +++ b/svtools/source/edit/textdoc.cxx @@ -27,7 +27,6 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" - #include <textdoc.hxx> #include <stdlib.h> diff --git a/svtools/source/edit/textdoc.hxx b/svtools/source/edit/textdoc.hxx index 0c875b4fe07f..258f821beb19 100644 --- a/svtools/source/edit/textdoc.hxx +++ b/svtools/source/edit/textdoc.hxx @@ -30,7 +30,7 @@ #include <svl/svarray.hxx> #include <svtools/textdata.hxx> -#include <txtattr.hxx> +#include <svtools/txtattr.hxx> #include <tools/debug.hxx> #include <tools/string.hxx> diff --git a/svtools/source/edit/txtattr.cxx b/svtools/source/edit/txtattr.cxx index e7466cbe1d85..810132731712 100644 --- a/svtools/source/edit/txtattr.cxx +++ b/svtools/source/edit/txtattr.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <txtattr.hxx> +#include <svtools/txtattr.hxx> #include <vcl/font.hxx> diff --git a/svtools/source/filter.vcl/filter/FilterConfigCache.cxx b/svtools/source/filter.vcl/filter/FilterConfigCache.cxx index 4c8023bed883..48408609cf98 100644 --- a/svtools/source/filter.vcl/filter/FilterConfigCache.cxx +++ b/svtools/source/filter.vcl/filter/FilterConfigCache.cxx @@ -46,7 +46,7 @@ using namespace ::com::sun::star::container ; // XNameAccess using namespace ::com::sun::star::uno ; // Reference using namespace ::com::sun::star::beans ; // PropertyValue using namespace ::utl ; // getProcessServiceFactory(); -using namespace ::rtl ; +using ::rtl::OUString; const char* FilterConfigCache::FilterConfigCacheEntry::InternalPixelFilterNameList[] = { diff --git a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx index 765711ad8d4a..312f62af9d84 100644 --- a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx +++ b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx @@ -38,7 +38,7 @@ #include <com/sun/star/beans/XPropertySetInfo.hpp> #include <com/sun/star/container/XHierarchicalNameAccess.hpp> -using namespace ::rtl; +using ::rtl::OUString; using namespace ::utl ; // getProcessServiceFactory using namespace ::com::sun::star::lang ; // XMultiServiceFactory using namespace ::com::sun::star::beans ; // PropertyValue diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx index 16592bac8df7..027fac99c2e8 100644 --- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx +++ b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.hxx @@ -28,7 +28,7 @@ #ifndef _SV_FILTER_OPTIONS_DIALOG_HXX_ #define _SV_FILTER_OPTIONS_DIALOG_HXX_ -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include <cppuhelper/implbase5.hxx> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter.vcl/filter/filter.cxx index 9c754a947fcd..7e0729082841 100644 --- a/svtools/source/filter.vcl/filter/filter.cxx +++ b/svtools/source/filter.vcl/filter/filter.cxx @@ -95,10 +95,6 @@ #endif -// Compilerfehler, wenn Optimierung bei WNT & MSC -#ifdef _MSC_VER -#pragma optimize( "", off ) -#endif // ----------- // - statics - diff --git a/svtools/source/filter.vcl/filter/gradwrap.cxx b/svtools/source/filter.vcl/filter/gradwrap.cxx deleted file mode 100644 index be5dade03313..000000000000 --- a/svtools/source/filter.vcl/filter/gradwrap.cxx +++ /dev/null @@ -1,570 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" - -#include <math.h> -#include <svgrad.hxx> -#include <svbmpacc.hxx> -#include <gradwrap.hxx> - -// ------------------- -// - GradientWrapper - -// ------------------- - -GradientWrapper::GradientWrapper(const Link& rDrawPolyRecordHdl, - const Link& rDrawPolyPolyRecordHdl, - const Link& rSetFillInBrushRecordHdl) : - aDrawPolyRecordHdl (rDrawPolyRecordHdl), - aDrawPolyPolyRecordHdl (rDrawPolyPolyRecordHdl), - aSetFillInBrushRecordHdl(rSetFillInBrushRecordHdl) -{ -} - -// ------------------------------------------------------------------------ - -GradientWrapper::~GradientWrapper() -{ -} - -// ------------------------------------------------------------------------ - -void GradientWrapper::WriteLinearGradient(const Rectangle& rRect, - const Gradient& rGradient) -{ - USHORT nStepCount = 100; - - Rectangle aRect = rRect; - aRect.Left()--; - aRect.Top()--; - aRect.Right()++; - aRect.Bottom()++; - - // rotiertes BoundRect ausrechnen - double fAngle = (rGradient.GetAngle() % 3600) * F_PI1800; - double fWidth = aRect.GetWidth(); - double fHeight = aRect.GetHeight(); - double fDX = fWidth * fabs( cos( fAngle ) ) + - fHeight * fabs( sin( fAngle ) ); - double fDY = fHeight * fabs( cos( fAngle ) ) + - fWidth * fabs( sin( fAngle ) ); - fDX = (fDX - fWidth) * 0.5 + 0.5; - fDY = (fDY - fHeight) * 0.5 + 0.5; - aRect.Left() -= (long)fDX; - aRect.Right() += (long)fDX; - aRect.Top() -= (long)fDY; - aRect.Bottom() += (long)fDY; - - // Rand berechnen und Rechteck neu setzen - Point aCenter = rRect.Center(); - Rectangle aFullRect = aRect; - long nBorder = (long)rGradient.GetBorder() * aRect.GetHeight() / 100; - BOOL bLinear; - - // Rand berechnen und Rechteck neu setzen fuer linearen Farbverlauf - if ( rGradient.GetStyle() == GRADIENT_LINEAR ) - { - bLinear = TRUE; - aRect.Top() += nBorder; - } - // Rand berechnen und Rechteck neu setzen fuer axiale Farbverlauf - else - { - bLinear = FALSE; - nBorder >>= 1; - - aRect.Top() += nBorder; - aRect.Bottom() -= nBorder; - } - - // Top darf nicht groesser als Bottom sein - aRect.Top() = Min( aRect.Top(), (long)(aRect.Bottom() - 1) ); - - long nMinRect = aRect.GetHeight(); - - // Anzahl der Schritte berechnen, falls nichts uebergeben wurde - if ( !nStepCount ) - { - long nInc = ((nMinRect >> 9) + 1) << 3; - - if ( !nInc ) - nInc = 1; - - nStepCount = (USHORT)(nMinRect / nInc); - } - // minimal drei Schritte - long nSteps = Max( nStepCount, (USHORT)3 ); - - // Falls axialer Farbverlauf, muss die Schrittanzahl ungerade sein - if ( !bLinear && !(nSteps & 1) ) - nSteps++; - - // Berechnung ueber Double-Addition wegen Genauigkeit - double fScanLine = aRect.Top(); - double fScanInc = (double)aRect.GetHeight() / (double)nSteps; - - // Intensitaeten von Start- und Endfarbe ggf. aendern und - // Farbschrittweiten berechnen - long nFactor; - const Color& rStartCol = rGradient.GetStartColor(); - const Color& rEndCol = rGradient.GetEndColor(); - long nRed = rStartCol.GetRed(); - long nGreen = rStartCol.GetGreen(); - long nBlue = rStartCol.GetBlue(); - long nEndRed = rEndCol.GetRed(); - long nEndGreen = rEndCol.GetGreen(); - long nEndBlue = rEndCol.GetBlue(); - nFactor = rGradient.GetStartIntensity(); - nRed = (nRed * nFactor) / 100; - nGreen = (nGreen * nFactor) / 100; - nBlue = (nBlue * nFactor) / 100; - nFactor = rGradient.GetEndIntensity(); - nEndRed = (nEndRed * nFactor) / 100; - nEndGreen = (nEndGreen * nFactor) / 100; - nEndBlue = (nEndBlue * nFactor) / 100; - long nStepRed = (nEndRed - nRed) / nSteps; - long nStepGreen = (nEndGreen - nGreen) / nSteps; - long nStepBlue = (nEndBlue - nBlue) / nSteps; - long nSteps2; - - if ( bLinear ) - { - // Um 1 erhoeht, um die Border innerhalb der Schleife - // zeichnen zu koennen - nSteps2 = nSteps + 1; - } - else - { - nStepRed <<= 1; - nStepGreen <<= 1; - nStepBlue <<= 1; - nRed = nEndRed; - nGreen = nEndGreen; - nBlue = nEndBlue; - - // Um 2 erhoeht, um die Border innerhalb der Schleife - // zeichnen zu koennen - nSteps2 = nSteps + 2; - } - Color aCol( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - - // GDI-Objekte sichern und setzen - aSetFillInBrushRecordHdl.Call(&aCol); - - // Startpolygon erzeugen (== Borderpolygon) - Polygon aPoly( 4 ); - Polygon aTempPoly( 2 ); - aPoly[0] = aFullRect.TopLeft(); - aPoly[1] = aFullRect.TopRight(); - aPoly[2] = aRect.TopRight(); - aPoly[3] = aRect.TopLeft(); - aPoly.Rotate( aCenter, rGradient.GetAngle() ); - - // Schleife, um rotierten Verlauf zu fuellen - for ( long i = 0; i < nSteps2; i++ ) - { - Polygon aTempPoly = aPoly; - aTempPoly.Clip( rRect ); - aDrawPolyRecordHdl.Call(&aTempPoly); - aTempPoly.SetSize( 2 ); - - // neues Polygon berechnen - aRect.Top() = (long)(fScanLine += fScanInc); - - // unteren Rand komplett fuellen - if ( i == nSteps ) - { - aTempPoly[0] = aFullRect.BottomLeft(); - aTempPoly[1] = aFullRect.BottomRight(); - } - else - { - aTempPoly[0] = aRect.TopLeft(); - aTempPoly[1] = aRect.TopRight(); - } - aTempPoly.Rotate( aCenter, rGradient.GetAngle() ); - - aPoly[0] = aPoly[3]; - aPoly[1] = aPoly[2]; - aPoly[2] = aTempPoly[1]; - aPoly[3] = aTempPoly[0]; - - // Farbintensitaeten aendern... - // fuer lineare FV - if ( bLinear ) - { - nRed += nStepRed; - nGreen += nStepGreen; - nBlue += nStepBlue; - } - // fuer radiale FV - else - { - if ( i <= (nSteps >> 1) ) - { - nRed -= nStepRed; - nGreen -= nStepGreen; - nBlue -= nStepBlue; - } - // genau die Mitte und hoeher - else - { - nRed += nStepRed; - nGreen += nStepGreen; - nBlue += nStepBlue; - } - } - - nRed = MinMax( nRed, 0, 255 ); - nGreen = MinMax( nGreen, 0, 255 ); - nBlue = MinMax( nBlue, 0, 255 ); - - // fuer lineare FV ganz normale Bestimmung der Farbe - if ( bLinear || (i <= nSteps) ) - { - aCol = Color( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - } - // fuer axiale FV muss die letzte Farbe der ersten - // Farbe entsprechen - else - { - aCol = Color( (BYTE) nEndRed, (BYTE) nEndGreen, (BYTE) nEndBlue ); - } - - aSetFillInBrushRecordHdl.Call(&aCol); - } -} - -// ------------------------------------------------------------------------ - -void GradientWrapper::WriteRadialGradient(const Rectangle& rRect, - const Gradient& rGradient) -{ - USHORT nStepCount = 100; - Rectangle aClipRect = rRect; - Rectangle aRect = rRect; - long nZWidth = aRect.GetWidth() * (long)rGradient.GetOfsX() / 100; - long nZHeight= aRect.GetHeight() * (long)rGradient.GetOfsY() / 100; - Size aSize = aRect.GetSize(); - Point aCenter( aRect.Left() + nZWidth, aRect.Top() + nZHeight ); - - // Radien-Berechnung fuer Kreisausgabe (Kreis schliesst Rechteck ein) - if ( rGradient.GetStyle() == GRADIENT_RADIAL ) - { - aSize.Width() = (long)(0.5 + sqrt((double)aSize.Width()*(double)aSize.Width() + - (double)aSize.Height()*(double)aSize.Height())); - aSize.Height() = aSize.Width(); - } - // Radien-Berechnung fuer Ellipse - else - { - aSize.Width() = (long)(0.5 + (double)aSize.Width() * 1.4142); - aSize.Height() = (long)(0.5 + (double)aSize.Height() * 1.4142); - } - - long nBorderX = (long)rGradient.GetBorder() * aSize.Width() / 100; - long nBorderY = (long)rGradient.GetBorder() * aSize.Height() / 100; - aSize.Width() -= nBorderX; - aSize.Height() -= nBorderY; - aRect.Left() = aCenter.X() - (aSize.Width() >> 1); - aRect.Top() = aCenter.Y() - (aSize.Height() >> 1); - aRect.SetSize( aSize ); - - long nMinRect = Min( aRect.GetWidth(), aRect.GetHeight() ); - - // Anzahl der Schritte berechnen, falls nichts uebergeben wurde - if ( !nStepCount ) - { - long nInc = ((nMinRect >> 9) + 1) << 3; - - if ( !nInc ) - nInc = 1; - - nStepCount = (USHORT)(nMinRect / nInc); - } - // minimal drei Schritte - long nSteps = Max( nStepCount, (USHORT)3 ); - - // Ausgabebegrenzungen und Schrittweite fuer jede Richtung festlegen - double fScanLeft = aRect.Left(); - double fScanTop = aRect.Top(); - double fScanRight = aRect.Right(); - double fScanBottom = aRect.Bottom(); - double fScanInc = (double)nMinRect / (double)nSteps * 0.5; - - // Intensitaeten von Start- und Endfarbe ggf. aendern und - // Farbschrittweiten berechnen - long nFactor; - const Color& rStartCol = rGradient.GetStartColor(); - const Color& rEndCol = rGradient.GetEndColor(); - long nRed = rStartCol.GetRed(); - long nGreen = rStartCol.GetGreen(); - long nBlue = rStartCol.GetBlue(); - long nEndRed = rEndCol.GetRed(); - long nEndGreen = rEndCol.GetGreen(); - long nEndBlue = rEndCol.GetBlue(); - nFactor = rGradient.GetStartIntensity(); - nRed = (nRed * nFactor) / 100; - nGreen = (nGreen * nFactor) / 100; - nBlue = (nBlue * nFactor) / 100; - nFactor = rGradient.GetEndIntensity(); - nEndRed = (nEndRed * nFactor) / 100; - nEndGreen = (nEndGreen * nFactor) / 100; - nEndBlue = (nEndBlue * nFactor) / 100; - long nStepRed = (nEndRed - nRed) / nSteps; - long nStepGreen = (nEndGreen - nGreen) / nSteps; - long nStepBlue = (nEndBlue - nBlue) / nSteps; - Color aCol( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - - // GDI-Objekte sichern und setzen - aSetFillInBrushRecordHdl.Call(&aCol); - - // Recteck erstmal ausgeben - PolyPolygon aPolyPoly( 2 ); - Polygon aPoly( rRect ); - - aPolyPoly.Insert( aPoly ); - aPoly = Polygon( aRect ); - aPoly.Rotate( aCenter, rGradient.GetAngle() ); - aPolyPoly.Insert( aPoly ); - - // erstes Polygon zeichnen (entspricht Rechteck) - PolyPolygon aTempPolyPoly = aPolyPoly; - aTempPolyPoly.Clip( aClipRect ); - aDrawPolyPolyRecordHdl.Call(&aTempPolyPoly); - - for ( long i = 0; i < nSteps; i++ ) - { - Color aCol( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - aSetFillInBrushRecordHdl.Call(&aCol); - - // neues Polygon berechnen - aRect.Left() = (long)(fScanLeft += fScanInc); - aRect.Top() = (long)(fScanTop += fScanInc); - aRect.Right() = (long)(fScanRight -= fScanInc); - aRect.Bottom() = (long)(fScanBottom -= fScanInc); - - if ( (aRect.GetWidth() < 2) || (aRect.GetHeight() < 2) ) - break; - - aPoly = Polygon( aRect.Center(), - aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 ); - aPoly.Rotate( aCenter, rGradient.GetAngle() ); - - aPolyPoly.Replace( aPolyPoly.GetObject( 1 ), 0 ); - aPolyPoly.Replace( aPoly, 1 ); - - PolyPolygon aTempPolyPoly = aPolyPoly; - aTempPolyPoly.Clip( aClipRect ); - aDrawPolyPolyRecordHdl.Call(&aTempPolyPoly); - - // Farbe entsprechend anpassen - nRed += nStepRed; - nGreen += nStepGreen; - nBlue += nStepBlue; - - nRed = MinMax( nRed, 0, 0xFF ); - nGreen = MinMax( nGreen, 0, 0xFF ); - nBlue = MinMax( nBlue, 0, 0xFF ); - } - - // Falls PolyPolygon-Ausgabe, muessen wir noch ein letztes - // inneres Polygon zeichnen - aCol = Color( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - aSetFillInBrushRecordHdl.Call(&aCol); - - aPoly = aPolyPoly.GetObject( 1 ); - if ( !aPoly.GetBoundRect().IsEmpty() ) - { - aPoly.Clip( aClipRect ); - aDrawPolyRecordHdl.Call(&aPoly); - } -} - -// ------------------------------------------------------------------------ - -void GradientWrapper::WriteRectGradient(const Rectangle& rRect, - const Gradient& rGradient) -{ - USHORT nStepCount = 100; - Rectangle aClipRect = rRect; - Rectangle aRect = rRect; - - aRect.Left()--; - aRect.Top()--; - aRect.Right()++; - aRect.Bottom()++; - - // rotiertes BoundRect ausrechnen - double fAngle = (rGradient.GetAngle() % 3600) * F_PI1800; - double fWidth = aRect.GetWidth(); - double fHeight = aRect.GetHeight(); - double fDX = fWidth * fabs( cos( fAngle ) ) + - fHeight * fabs( sin( fAngle ) ); - double fDY = fHeight * fabs( cos( fAngle ) ) + - fWidth * fabs( sin( fAngle ) ); - fDX = (fDX - fWidth) * 0.5 + 0.5; - fDY = (fDY - fHeight) * 0.5 + 0.5; - aRect.Left() -= (long)fDX; - aRect.Right() += (long)fDX; - aRect.Top() -= (long)fDY; - aRect.Bottom() += (long)fDY; - - // Quadratisch machen, wenn angefordert; - Size aSize = aRect.GetSize(); - if ( rGradient.GetStyle() == GRADIENT_SQUARE ) - { - if ( aSize.Width() > aSize.Height() ) - aSize.Height() = aSize.Width(); - else - aSize.Width() = aSize.Height(); - } - - // neue Mittelpunkte berechnen - long nZWidth = aRect.GetWidth() * (long)rGradient.GetOfsX() / 100; - long nZHeight = aRect.GetHeight() * (long)rGradient.GetOfsY() / 100; - long nBorderX = (long)rGradient.GetBorder() * aSize.Width() / 100; - long nBorderY = (long)rGradient.GetBorder() * aSize.Height() / 100; - Point aCenter( aRect.Left() + nZWidth, aRect.Top() + nZHeight ); - - // Rand beruecksichtigen - aSize.Width() -= nBorderX; - aSize.Height() -= nBorderY; - - // Ausgaberechteck neu setzen - aRect.Left() = aCenter.X() - (aSize.Width() >> 1); - aRect.Top() = aCenter.Y() - (aSize.Height() >> 1); - aRect.SetSize( aSize ); - - long nMinRect = Min( aRect.GetWidth(), aRect.GetHeight() ); - - // Anzahl der Schritte berechnen, falls nichts uebergeben wurde - if ( !nStepCount ) - { - long nInc = ((nMinRect >> 9) + 1) << 3; - - if ( !nInc ) - nInc = 1; - - nStepCount = (USHORT)(nMinRect / nInc); - } - // minimal drei Schritte - long nSteps = Max( nStepCount, (USHORT)3 ); - - // Ausgabebegrenzungen und Schrittweite fuer jede Richtung festlegen - double fScanLeft = aRect.Left(); - double fScanTop = aRect.Top(); - double fScanRight = aRect.Right(); - double fScanBottom = aRect.Bottom(); - double fScanInc = (double)nMinRect / (double)nSteps * 0.5; - - // Intensitaeten von Start- und Endfarbe ggf. aendern und - // Farbschrittweiten berechnen - long nFactor; - const Color& rStartCol = rGradient.GetStartColor(); - const Color& rEndCol = rGradient.GetEndColor(); - long nRed = rStartCol.GetRed(); - long nGreen = rStartCol.GetGreen(); - long nBlue = rStartCol.GetBlue(); - long nEndRed = rEndCol.GetRed(); - long nEndGreen = rEndCol.GetGreen(); - long nEndBlue = rEndCol.GetBlue(); - nFactor = rGradient.GetStartIntensity(); - nRed = (nRed * nFactor) / 100; - nGreen = (nGreen * nFactor) / 100; - nBlue = (nBlue * nFactor) / 100; - nFactor = rGradient.GetEndIntensity(); - nEndRed = (nEndRed * nFactor) / 100; - nEndGreen = (nEndGreen * nFactor) / 100; - nEndBlue = (nEndBlue * nFactor) / 100; - long nStepRed = (nEndRed - nRed) / nSteps; - long nStepGreen = (nEndGreen - nGreen) / nSteps; - long nStepBlue = (nEndBlue - nBlue) / nSteps; - Color aCol( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - - // GDI-Objekte sichern und setzen - aSetFillInBrushRecordHdl.Call(&aCol); - - // Recteck erstmal ausgeben - PolyPolygon aPolyPoly( 2 ); - Polygon aPoly( rRect ); - - aPolyPoly.Insert( aPoly ); - aPoly = Polygon( aRect ); - aPoly.Rotate( aCenter, rGradient.GetAngle() ); - aPolyPoly.Insert( aPoly ); - - PolyPolygon aTempPolyPoly = aPolyPoly; - aTempPolyPoly.Clip( aClipRect ); - aDrawPolyPolyRecordHdl.Call(&aTempPolyPoly); - - // Schleife, um nacheinander die Polygone/PolyPolygone auszugeben - for ( long i = 0; i < nSteps; i++ ) - { - Color aCol( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - aSetFillInBrushRecordHdl.Call(&aCol); - - // neues Polygon berechnen - aRect.Left() = (long)(fScanLeft += fScanInc); - aRect.Top() = (long)(fScanTop += fScanInc); - aRect.Right() = (long)(fScanRight -= fScanInc); - aRect.Bottom() = (long)(fScanBottom-= fScanInc); - - if ( (aRect.GetWidth() < 2) || (aRect.GetHeight() < 2) ) - break; - - aPoly = Polygon( aRect ); - aPoly.Rotate( aCenter, rGradient.GetAngle() ); - - aPolyPoly.Replace( aPolyPoly.GetObject( 1 ), 0 ); - aPolyPoly.Replace( aPoly, 1 ); - - PolyPolygon aTempPolyPoly = aPolyPoly; - aTempPolyPoly.Clip( aClipRect ); - aDrawPolyPolyRecordHdl.Call(&aTempPolyPoly); - - // Farben aendern - nRed += nStepRed; - nGreen += nStepGreen; - nBlue += nStepBlue; - - nRed = MinMax( nRed, 0, 0xFF ); - nGreen = MinMax( nGreen, 0, 0xFF ); - nBlue = MinMax( nBlue, 0, 0xFF ); - } - - aCol = Color( (BYTE) nRed, (BYTE) nGreen, (BYTE) nBlue ); - aSetFillInBrushRecordHdl.Call(&aCol); - - aPoly = aPolyPoly.GetObject( 1 ); - if ( !aPoly.GetBoundRect().IsEmpty() ) - { - aPoly.Clip( aClipRect ); - aDrawPolyRecordHdl.Call(&aPoly); - } -} diff --git a/svtools/source/filter.vcl/filter/makefile.mk b/svtools/source/filter.vcl/filter/makefile.mk deleted file mode 100644 index 11d35150bda8..000000000000 --- a/svtools/source/filter.vcl/filter/makefile.mk +++ /dev/null @@ -1,81 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=svtools -TARGET=filter -LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -SOLARINC+=-I../../inc - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES=exportdialog.src - -SLOFILES= $(SLO)$/filter.obj \ - $(SLO)$/filter2.obj \ - $(SLO)$/exportdialog.obj \ - $(SLO)$/sgfbram.obj \ - $(SLO)$/sgvmain.obj \ - $(SLO)$/sgvtext.obj \ - $(SLO)$/sgvspln.obj \ - $(SLO)$/FilterConfigItem.obj \ - $(SLO)$/FilterConfigCache.obj \ - $(SLO)$/SvFilterOptionsDialog.obj - -EXCEPTIONSFILES= $(SLO)$/exportdialog.obj - -EXCEPTIONSNOOPTFILES= $(SLO)$/filter.obj \ - $(SLO)$/FilterConfigItem.obj \ - $(SLO)$/FilterConfigCache.obj \ - $(SLO)$/SvFilterOptionsDialog.obj - -LIB1TARGET= $(SLB)$/$(TARGET).uno.lib -LIB1OBJFILES= $(SLO)$/exportdialog.obj \ - $(SLO)$/SvFilterOptionsDialog.obj - -LIB2TARGET= $(SLB)$/$(TARGET).lib -LIB2OBJFILES= $(SLO)$/filter.obj \ - $(SLO)$/filter2.obj \ - $(SLO)$/sgfbram.obj \ - $(SLO)$/sgvmain.obj \ - $(SLO)$/sgvtext.obj \ - $(SLO)$/sgvspln.obj \ - $(SLO)$/FilterConfigItem.obj \ - $(SLO)$/FilterConfigCache.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svtools/source/filter.vcl/igif/makefile.mk b/svtools/source/filter.vcl/igif/makefile.mk deleted file mode 100644 index 0821591e0178..000000000000 --- a/svtools/source/filter.vcl/igif/makefile.mk +++ /dev/null @@ -1,45 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=svtools -TARGET=igif - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk -SOLARINC+=-I../../inc - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/gifread.obj \ - $(SLO)$/decode.obj - -.INCLUDE : target.mk - diff --git a/svtools/source/filter.vcl/jpeg/makefile.mk b/svtools/source/filter.vcl/jpeg/makefile.mk deleted file mode 100644 index c782c520324c..000000000000 --- a/svtools/source/filter.vcl/jpeg/makefile.mk +++ /dev/null @@ -1,45 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=svtools -TARGET=jpeg - -# --- Settings ----------------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -SOLARINC+=-I../../inc - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/jpegc.obj \ - $(SLO)$/jpeg.obj - -.INCLUDE : target.mk diff --git a/svtools/source/filter.vcl/wmf/makefile.mk b/svtools/source/filter.vcl/wmf/makefile.mk deleted file mode 100644 index 5c9412bc8387..000000000000 --- a/svtools/source/filter.vcl/wmf/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=svtools -TARGET=wmf -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/wmf.obj \ - $(SLO)$/winmtf.obj \ - $(SLO)$/winwmf.obj \ - $(SLO)$/enhwmf.obj \ - $(SLO)$/emfwr.obj \ - $(SLO)$/wmfwr.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/svtools/source/graphic/makefile.mk b/svtools/source/graphic/makefile.mk deleted file mode 100644 index 37870b46b80b..000000000000 --- a/svtools/source/graphic/makefile.mk +++ /dev/null @@ -1,66 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=graphic - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -.IF "$(GUI)"=="WIN" -LINKFLAGS=$(LINKFLAGS) /PACKC:32768 -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/grfattr.obj \ - $(SLO)$/grfmgr.obj \ - $(SLO)$/grfmgr2.obj \ - $(SLO)$/grfcache.obj \ - $(SLO)$/descriptor.obj \ - $(SLO)$/provider.obj \ - $(SLO)$/graphic.obj \ - $(SLO)$/renderer.obj \ - $(SLO)$/graphicunofactory.obj \ - $(SLO)$/transformer.obj - -EXCEPTIONSFILES= \ - $(SLO)$/descriptor.obj \ - $(SLO)$/provider.obj \ - $(SLO)$/graphic.obj \ - $(SLO)$/renderer.obj \ - $(SLO)$/graphicunofactory.obj \ - $(SLO)$/transformer.obj - -# --- Target ------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/svtools/source/hatchwindow/hatchwindow.cxx b/svtools/source/hatchwindow/hatchwindow.cxx index 1b84206d6696..b26f7bbf091b 100644 --- a/svtools/source/hatchwindow/hatchwindow.cxx +++ b/svtools/source/hatchwindow/hatchwindow.cxx @@ -33,6 +33,8 @@ #include "ipwin.hxx" #include <toolkit/helper/convert.hxx> +#include <vos/mutex.hxx> +#include <vcl/svapp.hxx> using namespace ::com::sun::star; @@ -50,6 +52,8 @@ void VCLXHatchWindow::initializeWindow( const uno::Reference< awt::XWindowPeer > const awt::Rectangle& aBounds, const awt::Size& aSize ) { + ::vos::OGuard aGuard( Application::GetSolarMutex() ); + Window* pParent = NULL; VCLXWindow* pParentComponent = VCLXWindow::GetImplementation( xParent ); @@ -117,7 +121,7 @@ uno::Any SAL_CALL VCLXHatchWindow::queryInterface( const uno::Type & rType ) throw( uno::RuntimeException ) { // Attention: - // Don't use mutex or guard in this method!!! Is a method of XInterface. + // Don't use mutex or guard in this method!!! Is a method of XInterface. uno::Any aReturn( ::cppu::queryInterface( rType, static_cast< embed::XHatchWindow* >( this ) ) ); diff --git a/svtools/source/hatchwindow/hatchwindowfactory.cxx b/svtools/source/hatchwindow/hatchwindowfactory.cxx index 0eec027167c2..1222013372f7 100644 --- a/svtools/source/hatchwindow/hatchwindowfactory.cxx +++ b/svtools/source/hatchwindow/hatchwindowfactory.cxx @@ -31,6 +31,7 @@ #include "hatchwindowfactory.hxx" #include "hatchwindow.hxx" #include "cppuhelper/factory.hxx" +#include <vcl/svapp.hxx> #include "documentcloser.hxx" @@ -69,6 +70,7 @@ uno::Reference< embed::XHatchWindow > SAL_CALL OHatchWindowFactory::createHatchW if ( !xParent.is() ) throw lang::IllegalArgumentException(); // TODO + ::vos::OGuard aGuard( Application::GetSolarMutex() ); VCLXHatchWindow* pResult = new VCLXHatchWindow(); pResult->initializeWindow( xParent, aBounds, aHandlerSize ); return uno::Reference< embed::XHatchWindow >( static_cast< embed::XHatchWindow* >( pResult ) ); diff --git a/svtools/source/hatchwindow/makefile.mk b/svtools/source/hatchwindow/makefile.mk deleted file mode 100644 index 3c736bc4e66a..000000000000 --- a/svtools/source/hatchwindow/makefile.mk +++ /dev/null @@ -1,73 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=svtools -TARGET=hatchwindowfactory.uno -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -DLLPRE= - -# --- Files ------------------------------------- - -SLOFILES= \ - $(SLO)$/hatchwindow.obj\ - $(SLO)$/hatchwindowfactory.obj\ - $(SLO)$/documentcloser.obj\ - $(SLO)$/ipwin.obj - -SHL1TARGET= $(TARGET) -SHL1IMPLIB= i$(TARGET) -SHL1OBJS= $(SLOFILES) -SHL1STDLIBS=\ - $(TKLIB) \ - $(VCLLIB) \ - $(TOOLSLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -SHL1VERSIONMAP=$(SOLARENV)/src/component.map -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -DEF1NAME= $(SHL1TARGET) - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - - -ALLTAR : $(MISC)/hatchwindowfactory.component - -$(MISC)/hatchwindowfactory.component .ERRREMOVE : \ - $(SOLARENV)/bin/createcomponent.xslt hatchwindowfactory.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt hatchwindowfactory.component diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index 6919944daef4..f9e4ee6951fb 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -340,7 +340,7 @@ public: const Size& GetOutputSize() const { return aOutputSize;} void KeyUp( BOOL bPageUp, BOOL bNotifyScroll = TRUE ); void KeyDown( BOOL bPageDown, BOOL bNotifyScroll = TRUE ); - bool Command( const CommandEvent& rCEvt ); + void Command( const CommandEvent& rCEvt ); void Invalidate(); void DestroyAnchor() { pAnchor=0; aSelEng.Reset(); } diff --git a/svtools/source/java/makefile.mk b/svtools/source/java/makefile.mk deleted file mode 100644 index 6db57388dca0..000000000000 --- a/svtools/source/java/makefile.mk +++ /dev/null @@ -1,54 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=java -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME= javaerror -SRC1FILES= javaerror.src - -SRS2NAME= patchjavaerror -SRC2FILES= patchjavaerror.src - - -SLOFILES= \ - $(SLO)$/javainteractionhandler.obj \ - $(SLO)$/javacontext.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/source/java/patchjavaerror.src b/svtools/source/java/patchjavaerror.src deleted file mode 100644 index d5990c05a663..000000000000 --- a/svtools/source/java/patchjavaerror.src +++ /dev/null @@ -1,93 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include <svtools/svtools.hrc> - -WarningBox WARNINGBOX_JAVANOTFOUND -{ - Buttons = WB_OK ; - DefButton = WB_DEF_OK ; - Message[ en-US ] ="%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. Please install a JRE and restart %PRODUCTNAME."; -}; - -WarningBox WARNINGBOX_INVALIDJAVASETTINGS -{ - Buttons = WB_OK ; - DefButton = WB_DEF_OK ; - Message[ en-US ] ="The %PRODUCTNAME configuration has been changed. Under Tools - Options - %PRODUCTNAME - Java, select the Java runtime environment you want to have used by %PRODUCTNAME."; -}; - -QueryBox QBX_JAVADISABLED -{ - Buttons = WB_YES_NO_CANCEL ; - DefButton = WB_DEF_YES ; - Message[ en-US ] = "%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. However, use of a JRE has been disabled. Do you want to enable the use of a JRE now?"; -}; - -ErrorBox ERRORBOX_JVMCREATIONFAILED -{ - Buttons = WB_OK; - DefButton = WB_DEF_OK ; - Message[ en-US ] = "%PRODUCTNAME requires a Java runtime environment (JRE) to perform this task. The selected JRE is defective. Please select another version or install a new JRE and select it under Tools - Options - %PRODUCTNAME - Java."; -}; - -ErrorBox ERRORBOX_RESTARTREQUIRED -{ - Buttons = WB_OK; - DefButton = WB_DEF_OK ; - Message[ en-US ] = "For the selected Java runtime environment to work properly, %PRODUCTNAME must be restarted. Please restart %PRODUCTNAME now."; -}; - - - -String STR_WARNING_JAVANOTFOUND -{ - Text[ en-US ] = "JRE Required" ; -}; - -String STR_WARNING_INVALIDJAVASETTINGS -{ - Text[ en-US ] = "Select JRE"; -}; - -String STR_ERROR_RESTARTREQUIRED -{ - Text[ en-US ] = "Restart Required"; -}; - -String STR_QUESTION_JAVADISABLED -{ - Text[ en-US ] = "Enable JRE" ; -}; - - -String STR_ERROR_JVMCREATIONFAILED -{ - Text[ en-US ] = "JRE is Defective" ; -}; - - diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx index 6458e359a49c..b89f30997950 100644 --- a/svtools/source/misc/acceleratorexecute.cxx +++ b/svtools/source/misc/acceleratorexecute.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "acceleratorexecute.hxx" +#include <svtools/acceleratorexecute.hxx> //=============================================== // includes diff --git a/svtools/source/misc/cliplistener.cxx b/svtools/source/misc/cliplistener.cxx index 8fb61a5a1cb9..a4e13be1d884 100644 --- a/svtools/source/misc/cliplistener.cxx +++ b/svtools/source/misc/cliplistener.cxx @@ -34,7 +34,7 @@ #include <vcl/window.hxx> #include <vos/mutex.hxx> -#include "cliplistener.hxx" +#include <svtools/cliplistener.hxx> #include <svtools/transfer.hxx> using namespace ::com::sun::star; diff --git a/svtools/source/misc/dialogclosedlistener.cxx b/svtools/source/misc/dialogclosedlistener.cxx index a08c8a3b6dd5..9e5b72989601 100644 --- a/svtools/source/misc/dialogclosedlistener.cxx +++ b/svtools/source/misc/dialogclosedlistener.cxx @@ -26,7 +26,7 @@ ************************************************************************/ #include "precompiled_svtools.hxx" -#include "dialogclosedlistener.hxx" +#include <svtools/dialogclosedlistener.hxx> //......................................................................... namespace svt diff --git a/svtools/source/misc/dialogcontrolling.cxx b/svtools/source/misc/dialogcontrolling.cxx index 7565dad731f7..2b33734c245f 100644 --- a/svtools/source/misc/dialogcontrolling.cxx +++ b/svtools/source/misc/dialogcontrolling.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "dialogcontrolling.hxx" +#include <svtools/dialogcontrolling.hxx> #include <vcl/window.hxx> #include <algorithm> diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index 8834f5497e5a..5e20e2197fb7 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -30,7 +30,7 @@ #include <vos/mutex.hxx> #include <tools/debug.hxx> #include <tools/rcid.h> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <vcl/msgbox.hxx> #include <vcl/svapp.hxx> #if defined(OS2) @@ -43,7 +43,7 @@ #include <svtools/ehdl.hxx> #include <svtools/svtdata.hxx> #include <svtools/svtools.hrc> -#include "sfxecode.hxx" +#include <svtools/sfxecode.hxx> //========================================================================= diff --git a/svtools/source/misc/ehdl.src b/svtools/source/misc/ehdl.src index 436e06b7f3c5..2c2fab3e19b5 100644 --- a/svtools/source/misc/ehdl.src +++ b/svtools/source/misc/ehdl.src @@ -27,7 +27,8 @@ #define __RSC #include <svtools/svtools.hrc> -#include "sfxecode.hxx" +#include <svtools/sfxecode.hxx> + // pragma ---------------------------------------------------------------- String STR_ERR_HDLMESS diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index 3aa0016c225e..a96067f95186 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -343,6 +343,7 @@ void EmbeddedObjectRef::Assign( const NS_UNO::Reference < NS_EMBED::XEmbeddedObj mpImp->xListener = EmbedEventListener_Impl::Create( this ); //#i103460# + if ( IsChart() ) { ::com::sun::star::uno::Reference < ::com::sun::star::chart2::XDefaultSizeTransmitter > xSizeTransmitter( xObj, uno::UNO_QUERY ); DBG_ASSERT( xSizeTransmitter.is(), "Object does not support XDefaultSizeTransmitter -> will cause #i103460#!" ); diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx index cbf87f40b7fc..e49cf0ab62cf 100644 --- a/svtools/source/misc/embedtransfer.cxx +++ b/svtools/source/misc/embedtransfer.cxx @@ -36,7 +36,7 @@ #include <com/sun/star/embed/Aspects.hpp> #include <svtools/embedtransfer.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <vcl/outdev.hxx> #include <comphelper/storagehelper.hxx> #include <unotools/ucbstreamhelper.hxx> diff --git a/svtools/source/misc/errtxt.src b/svtools/source/misc/errtxt.src deleted file mode 100644 index f33896e20003..000000000000 --- a/svtools/source/misc/errtxt.src +++ /dev/null @@ -1,514 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#define __RSC -#include <svtools/svtools.hrc> -#include "sfxecode.hxx" - // pragma ---------------------------------------------------------------- -Resource RID_ERRCTX -{ - String ERRCTX_ERROR - { - Text [ en-US ] = "Error" ; - }; - String ERRCTX_WARNING - { - Text [ en-US ] = "Warning" ; - }; - String ERRCTX_SFX_LOADTEMPLATE - { - Text [ en-US ] = "$(ERR) loading the template $(ARG1)" ; - }; - String ERRCTX_SFX_SAVEDOC - { - Text [ en-US ] = "$(ERR) saving the document $(ARG1)"; - }; - String ERRCTX_SFX_SAVEASDOC - { - Text [ en-US ] = "$(ERR) saving the document $(ARG1)"; - }; - String ERRCTX_SFX_DOCINFO - { - Text [ en-US ] = "$(ERR) displaying doc. information for document $(ARG1)" ; - }; - String ERRCTX_SFX_DOCTEMPLATE - { - Text [ en-US ] = "$(ERR) writing document $(ARG1) as template" ; - }; - String ERRCTX_SFX_MOVEORCOPYCONTENTS - { - Text [ en-US ] = "$(ERR) copying or moving document contents" ; - }; - String ERRCTX_SFX_DOCMANAGER - { - Text [ en-US ] = "$(ERR) starting the Document Manager" ; - }; - String ERRCTX_SFX_OPENDOC - { - Text [ en-US ] = "$(ERR) loading document $(ARG1)" ; - }; - String ERRCTX_SFX_NEWDOCDIRECT - { - Text [ en-US ] = "$(ERR) creating a new document" ; - }; - String ERRCTX_SFX_NEWDOC - { - Text [ en-US ] = "$(ERR) creating a new document" ; - }; - String ERRCTX_SFX_CREATEOBJSH - { - Text [ en-US ] = "$(ERR) expanding entry" ; - }; - String ERRCTX_SFX_LOADBASIC - { - Text [ en-US ] = "$(ERR) loading BASIC of document $(ARG1)" ; - }; - String ERRCTX_SFX_SEARCHADDRESS - { - Text [ en-US ] = "$(ERR) searching for an address"; - }; -}; -Resource RID_ERRHDL -{ - String ERRCODE_CLASS_ABORT - { - Text [ en-US ] = "Abort" ; - }; - String ERRCODE_CLASS_NOTEXISTS - { - Text [ en-US ] = "Nonexistent object" ; - }; - String ERRCODE_CLASS_ALREADYEXISTS - { - Text [ en-US ] = "Object already exists" ; - }; - String ERRCODE_CLASS_ACCESS - { - Text [ en-US ] = "Object not accessible" ; - }; - String ERRCODE_CLASS_PATH - { - Text [ en-US ] = "Inadmissible path" ; - }; - String ERRCODE_CLASS_LOCKING - { - Text [ en-US ] = "Locking problem" ; - }; - String ERRCODE_CLASS_PARAMETER - { - Text [ en-US ] = "Wrong parameter" ; - }; - String ERRCODE_CLASS_SPACE - { - Text [ en-US ] = "Resource exhausted" ; - }; - String ERRCODE_CLASS_NOTSUPPORTED - { - Text [ en-US ] = "Action not supported" ; - }; - String ERRCODE_CLASS_READ - { - Text [ en-US ] = "Read-Error" ; - }; - String ERRCODE_CLASS_WRITE - { - Text [ en-US ] = "Write Error" ; - }; - String ERRCODE_CLASS_UNKNOWN - { - Text [ en-US ] = "unknown" ; - }; - String ERRCODE_CLASS_VERSION - { - Text [ en-US ] = "Version Incompatibility" ; - }; - String ERRCODE_CLASS_GENERAL - { - Text [ en-US ] = "General Error" ; - }; - String ERRCODE_CLASS_FORMAT - { - Text [ en-US ] = "Incorrect format" ; - }; - String ERRCODE_CLASS_CREATE - { - Text [ en-US ] = "Error creating object" ; - }; - String ERRCODE_CLASS_SBX - { - Text [ en-US ] = "Inadmissible value or data type" ; - }; - String ERRCODE_CLASS_RUNTIME - { - Text [ en-US ] = "BASIC runtime error" ; - }; - String ERRCODE_CLASS_COMPILER - { - Text [ en-US ] = "BASIC syntax error" ; - }; - String 1 - { - Text [ en-US ] = "General Error" ; - }; - String ERRCODE_IO_GENERAL - { - Text [ en-US ] = "General input/output error." ; - }; - String ERRCODE_IO_MISPLACEDCHAR - { - Text [ en-US ] = "Invalid file name." ; - }; - String ERRCODE_IO_NOTEXISTS - { - Text [ en-US ] = "Nonexistent file." ; - }; - String ERRCODE_IO_ALREADYEXISTS - { - Text [ en-US ] = "File already exists." ; - }; - String ERRCODE_IO_NOTADIRECTORY - { - Text [ en-US ] = "The object is not a directory." ; - }; - String ERRCODE_IO_NOTAFILE - { - Text [ en-US ] = "The object is not a file." ; - }; - String ERRCODE_IO_INVALIDDEVICE - { - Text [ en-US ] = "The specified device is invalid." ; - }; - String ERRCODE_IO_ACCESSDENIED - { - Text [ en-US ] = "The object cannot be accessed\ndue to insufficient user rights." ; - }; - String ERRCODE_IO_LOCKVIOLATION - { - Text [ en-US ] = "Sharing violation while accessing the object." ; - }; - String ERRCODE_IO_OUTOFSPACE - { - Text [ en-US ] = "No more space on device." ; - }; - String ERRCODE_IO_ISWILDCARD - { - Text [ en-US ] = "This operation cannot be run on\nfiles containing wildcards." ; - }; - String ERRCODE_IO_NOTSUPPORTED - { - Text [ en-US ] = "This operation is not supported on this operating system." ; - }; - String ERRCODE_IO_TOOMANYOPENFILES - { - Text [ en-US ] = "There are too many files open." ; - }; - String ERRCODE_IO_CANTREAD - { - Text [ en-US ] = "Data could not be read from the file." ; - }; - String ERRCODE_IO_CANTWRITE - { - Text [ en-US ] = "The file could not be written." ; - }; - String ERRCODE_IO_OUTOFMEMORY - { - Text [ en-US ] = "The operation could not be run due to insufficient memory." ; - }; - String ERRCODE_IO_CANTSEEK - { - Text [ en-US ] = "The seek operation could not be run." ; - }; - String ERRCODE_IO_CANTTELL - { - Text [ en-US ] = "The tell operation could not be run." ; - }; - String ERRCODE_IO_WRONGVERSION - { - Text [ en-US ] = "Incorrect file version." ; - }; - String ERRCODE_IO_WRONGFORMAT - { - Text [ en-US ] = "Incorrect file format." ; - }; - String ERRCODE_IO_INVALIDCHAR - { - Text [ en-US ] = "The file name contains invalid characters." ; - }; - String ERRCODE_IO_UNKNOWN - { - Text [ en-US ] = "An unknown I/O error has occurred." ; - }; - String ERRCODE_IO_INVALIDACCESS - { - Text [ en-US ] = "An invalid attempt was made to access the file." ; - }; - String ERRCODE_IO_CANTCREATE - { - Text [ en-US ] = "The file could not be created." ; - }; - String ERRCODE_IO_INVALIDPARAMETER - { - Text [ en-US ] = "The operation was started under an invalid parameter." ; - }; - String ERRCODE_IO_ABORT - { - Text [ en-US ] = "The operation on the file was aborted." ; - }; - String ERRCODE_IO_NOTEXISTSPATH - { - Text [ en-US ] = "Path to the file does not exist." ; - }; - String ERRCODE_IO_RECURSIVE - { - Text [ en-US ] = "An object cannot be copied into itself." ; - }; - String ERRCODE_SFX_NOSTDTEMPLATE - { - Text [ en-US ] = "The default template could not be opened." ; - }; - String ERRCODE_SFX_TEMPLATENOTFOUND - { - Text [ en-US ] = "The specified template could not be found." ; - }; - String ERRCODE_SFX_NOTATEMPLATE - { - Text [ en-US ] = "The file cannot be used as template." ; - }; - String ERRCODE_SFX_CANTREADDOCINFO - { - Text [ en-US ] = "Document information could not be read from the file because\nthe document information format is unknown or because document information does not\nexist." ; - }; - String ERRCODE_SFX_ALREADYOPEN - { - Text [ en-US ] = "This document has already been opened for editing." ; - }; - String ERRCODE_SFX_WRONGPASSWORD - { - Text [ en-US ] = "The wrong password has been entered." ; - }; - String ERRCODE_SFX_DOLOADFAILED - { - Text [ en-US ] = "Error reading file." ; - }; - String ERRCODE_SFX_DOCUMENTREADONLY - { - Text [ en-US ] = "The document was opened as read-only." ; - }; - String ERRCODE_SFX_OLEGENERAL - { - Text [ en-US ] = "General OLE Error." ; - }; - String ERRCODE_INET_NAME_RESOLVE - { - Text [ en-US ] = "The host name $(ARG1) could not be resolved." ; - }; - String ERRCODE_INET_CONNECT - { - Text [ en-US ] = "Could not establish network connection to $(ARG1)." ; - }; - String ERRCODE_INET_READ - { - Text [ en-US ] = "Error reading data from the network.\nServer error message: $(ARG1)." ; - }; - String ERRCODE_INET_WRITE - { - Text [ en-US ] = "Error transferring data to the network.\nServer error message: $(ARG1)." ; - }; - String ERRCODE_INET_GENERAL - { - Text [ en-US ] = "General network error has occurred." ; - }; - String ERRCODE_INET_OFFLINE - { - Text [ en-US ] = "The requested network data is not available in the cache and cannot be transmitted as the Online mode has not be activated." ; - }; - String ERRCODE_SFXMSG_STYLEREPLACE - { - ExtraData = ERRCODE_MSG_ERROR | ERRCODE_BUTTON_OK_CANCEL ; - Text [ en-US ] = "Should the $(ARG1) Style be replaced?" ; - }; - String ERRCODE_SFX_NOFILTER - { - Text [ en-US ] = "A filter has not been found." ; - }; - String ERRCODE_SFX_CANTFINDORIGINAL - { - Text [ en-US ] = "The original could not be determined." ; - }; - String ERRCODE_SFX_CANTCREATECONTENT - { - Text [ en-US ] = "The contents could not be created." ; - }; - String ERRCODE_SFX_CANTCREATELINK - { - Text [ en-US ] = "The link could not be created." ; - }; - String ERRCODE_SFX_WRONGBMKFORMAT - { - Text [ en-US ] = "The link format is invalid." ; - }; - String ERRCODE_SFX_WRONGICONFILE - { - Text [ en-US ] = "The configuration of the icon display is invalid." ; - }; - String ERRCODE_SFX_CANTWRITEICONFILE - { - Text [ en-US ] = "The configuration of the icon display can not be saved." ; - }; - String ERRCODE_SFX_CANTDELICONFILE - { - Text [ en-US ] = "The configuration of the icon display could not be deleted." ; - }; - String ERRCODE_SFX_CANTRENAMECONTENT - { - Text [ en-US ] = "Contents cannot be renamed." ; - }; - String ERRCODE_SFX_INVALIDBMKPATH - { - Text [ en-US ] = "The bookmark folder is invalid." ; - }; - String ERRCODE_SFX_CANTWRITEURLCFGFILE - { - Text [ en-US ] = "The configuration of the URLs to be saved locally could not be saved." ; - }; - String ERRCODE_SFX_WRONGURLCFGFORMAT - { - Text [ en-US ] = "The configuration format of the URLs to be saved locally is invalid." ; - }; - String ERRCODE_SFX_NODOCUMENT - { - Text [ en-US ] = "This action cannot be applied to a document that does not exist." ; - }; - String ERRCODE_SFX_INVALIDLINK - { - Text [ en-US ] = "The link refers to an invalid target." ; - }; - String ERRCODE_SFX_INVALIDTRASHPATH - { - Text [ en-US ] = "The Recycle Bin path is invalid." ; - }; - String ERRCODE_SFX_NOTRESTORABLE - { - Text [ en-US ] = "The entry could not be restored." ; - }; - String ERRCODE_IO_NAMETOOLONG - { - Text [ en-US ] = "The file name is too long for the target file system." ; - }; - String ERRCODE_SFX_CONSULTUSER - { - Text [ en-US ] = "The details for running the function are incomplete." ; - }; - String ERRCODE_SFX_INVALIDSYNTAX - { - Text [ en-US ] = "The input syntax is invalid." ; - }; - String ERRCODE_SFX_CANTCREATEFOLDER - { - Text [ en-US ] = "The input syntax is invalid." ; - }; - String ERRCODE_SFX_CANTRENAMEFOLDER - { - Text [ en-US ] = "The input syntax is invalid." ; - }; - String ERRCODE_SFX_WRONG_CDF_FORMAT - { - Text [ en-US ] = "The channel document has an invalid format." ; - }; - String ERRCODE_SFX_EMPTY_SERVER - { - Text [ en-US ] = "The server must not be empty." ; - }; - String ERRCODE_SFX_NO_ABOBOX - { - Text [ en-US ] = "A subscription folder is required to install a Channel." ; - }; - String ERRCODE_IO_NOTSTORABLEINBINARYFORMAT - { - Text [ en-US ] = "This document contains attributes that cannot be saved in the selected format.\nPlease save the document in a %PRODUCTNAME %PRODUCTVERSION file format."; - }; - String ERRCODE_SFX_TARGETFILECORRUPTED - { - Text [ en-US ] = "The file $(FILENAME) cannot be saved. Please check your system settings. You can find an automatically generated backup copy of this file in folder $(PATH) named $(BACKUPNAME)."; - }; - String ERRCODE_SFX_NOMOREDOCUMENTSALLOWED - { - Text [ en-US ] = "The maximum number of documents that can be opened at the same time has been reached. You need to close one or more documents before you can open a new document."; - }; - String ERRCODE_SFX_CANTCREATEBACKUP - { - Text [ en-US ] = "Could not create backup copy." ; - }; - String ERRCODE_SFX_MACROS_SUPPORT_DISABLED - { - Text [ en-US ] = "An attempt was made to execute a macro.\nFor security reasons, macro support is disabled."; - }; - String ERRCODE_SFX_DOCUMENT_MACRO_DISABLED - { - Text [ en-US ] = "This document contains macros.\n\nMacros may contain viruses. Execution of macros is disabled due to the current macro security setting in Tools - Options - %PRODUCTNAME - Security.\n\nTherefore, some functionality may not be available." ; - }; - String ERRCODE_SFX_BROKENSIGNATURE - { - Text [ en-US ] = "The digitally signed document content and/or macros do not match the current document signature.\n\nThis could be the result of document manipulation or of structural document damage due to data transmission.\n\nWe recommend that you do not trust the content of the current document.\nExecution of macros is disabled for this document.\n " ; - }; - String ERRCODE_SFX_INCOMPLETE_ENCRYPTION - { - Text [ en-US ] = "The encrypted document contains unexpected non-encrypted streams.\n\nThis could be the result of document manipulation.\n\nWe recommend that you do not trust the content of the current document.\nExecution of macros is disabled for this document.\n " ; - }; - - String ERRCODE_IO_INVALIDLENGTH - { - Text [ en-US ] = "Invalid data length." ; - }; - String ERRCODE_IO_CURRENTDIR - { - Text [ en-US ] = "Function not possible: path contains current directory." ; - }; - String ERRCODE_IO_NOTSAMEDEVICE - { - Text [ en-US ] = "Function not possible: device (drive) not identical." ; - }; - String ERRCODE_IO_DEVICENOTREADY - { - Text [ en-US ] = "Device (drive) not ready." ; - }; - String ERRCODE_IO_BADCRC - { - Text [ en-US ] = "Wrong check amount." ; - }; - String ERRCODE_IO_WRITEPROTECTED - { - 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/misc/helpagentwindow.cxx b/svtools/source/misc/helpagentwindow.cxx index 1d407bbdb611..a909c2f77ca9 100644 --- a/svtools/source/misc/helpagentwindow.cxx +++ b/svtools/source/misc/helpagentwindow.cxx @@ -27,20 +27,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "helpagentwindow.hxx" +#include <svtools/helpagentwindow.hxx> #include <osl/diagnose.h> -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/bitmap.hxx> #include <svtools/svtdata.hxx> - -#ifndef _SVTOOLS_HRC #include <svtools/svtools.hrc> -#endif -#ifndef _SVT_HELPID_HRC #include <svtools/helpid.hrc> -#endif #define WB_AGENT_STYLE 0 diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index c02ebc4477c6..4dbd132b9dc8 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -30,7 +30,7 @@ // includes -------------------------------------------------------------- -#include "imagemgr.hxx" +#include <svtools/imagemgr.hxx> #include <tools/urlobj.hxx> #include <tools/debug.hxx> #include <vcl/svapp.hxx> @@ -39,9 +39,7 @@ #include <sot/storage.hxx> #include <sot/clsids.hxx> #include <unotools/ucbhelper.hxx> -#ifndef _UNOTOOLS_PROCESSFACTORY_HXX #include <comphelper/processfactory.hxx> -#endif #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/document/XTypeDetection.hpp> @@ -51,9 +49,8 @@ #include <tools/rcid.h> #include <rtl/logfile.hxx> #include <unotools/configmgr.hxx> - #include <svtools/svtools.hrc> -#include "imagemgr.hrc" +#include <svtools/imagemgr.hrc> #include <svtools/svtdata.hxx> #include <vos/mutex.hxx> diff --git a/svtools/source/misc/imagemgr.src b/svtools/source/misc/imagemgr.src index cdc9f8da1c87..03e68b3b30b7 100644 --- a/svtools/source/misc/imagemgr.src +++ b/svtools/source/misc/imagemgr.src @@ -27,7 +27,7 @@ // includes ****************************************************************** #include <svtools/svtools.hrc> -#include "imagemgr.hrc" +#include <svtools/imagemgr.hrc> // images ******************************************************************** diff --git a/svtools/source/misc/imageresourceaccess.cxx b/svtools/source/misc/imageresourceaccess.cxx index 436c3f721833..a4fd7e372880 100644 --- a/svtools/source/misc/imageresourceaccess.cxx +++ b/svtools/source/misc/imageresourceaccess.cxx @@ -28,9 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef SVTOOLS_SOURCE_MISC_IMAGERESOURCEACCESS_HXX -#include "imageresourceaccess.hxx" -#endif +#include <svtools/imageresourceaccess.hxx> /** === begin UNO includes === **/ #include <com/sun/star/io/NotConnectedException.hpp> diff --git a/svtools/source/misc/itemdel.cxx b/svtools/source/misc/itemdel.cxx index 559d31cdeb1d..a161571daae7 100644 --- a/svtools/source/misc/itemdel.cxx +++ b/svtools/source/misc/itemdel.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "itemdel.hxx" +#include <svtools/itemdel.hxx> #include <vcl/svapp.hxx> #include <tools/errcode.hxx> #include <limits.h> diff --git a/svtools/source/misc/makefile.mk b/svtools/source/misc/makefile.mk deleted file mode 100644 index 32781dbfefb1..000000000000 --- a/svtools/source/misc/makefile.mk +++ /dev/null @@ -1,84 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=svtools -TARGET=misc - -ENABLE_EXCEPTIONS := TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -#use local "bmp" as it may not yet be delivered - -SRS1NAME=misc -SRC1FILES=\ - ehdl.src \ - helpagent.src \ - imagemgr.src \ - langtab.src - -SRS2NAME=ehdl -SRC2FILES=\ - errtxt.src - -SLOFILES=\ - $(SLO)$/acceleratorexecute.obj \ - $(SLO)$/chartprettypainter.obj \ - $(SLO)$/cliplistener.obj \ - $(SLO)$/dialogclosedlistener.obj\ - $(SLO)$/dialogcontrolling.obj \ - $(SLO)$/ehdl.obj \ - $(SLO)$/embedhlp.obj \ - $(SLO)$/embedtransfer.obj \ - $(SLO)$/helpagentwindow.obj \ - $(SLO)$/imagemgr.obj \ - $(SLO)$/imageresourceaccess.obj \ - $(SLO)$/imap.obj \ - $(SLO)$/imap2.obj \ - $(SLO)$/imap3.obj \ - $(SLO)$/itemdel.obj \ - $(SLO)$/langtab.obj \ - $(SLO)$/stringtransfer.obj \ - $(SLO)$/svtaccessiblefactory.obj \ - $(SLO)$/svtdata.obj \ - $(SLO)$/templatefoldercache.obj \ - $(SLO)$/transfer.obj \ - $(SLO)$/transfer2.obj \ - $(SLO)$/unitconv.obj \ - $(SLO)$/wallitem.obj \ - $(SLO)$/xwindowitem.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svtools/source/misc/svtdata.cxx b/svtools/source/misc/svtdata.cxx index 7a04b3276c9f..495929bd89dc 100644 --- a/svtools/source/misc/svtdata.cxx +++ b/svtools/source/misc/svtdata.cxx @@ -71,3 +71,8 @@ ImpSvtData & ImpSvtData::GetSvtData() return *static_cast<ImpSvtData *>(*pAppData); } +SvtResId::SvtResId(USHORT nId, const ::com::sun::star::lang::Locale aLocale): + ResId(nId, *ImpSvtData::GetSvtData().GetResMgr(aLocale)) {} + +SvtResId::SvtResId(USHORT nId): ResId(nId, *ImpSvtData::GetSvtData().GetResMgr()) {} + diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index 62f3ec39eb6f..a6c3617b50a7 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "templatefoldercache.hxx" +#include <svtools/templatefoldercache.hxx> #include <unotools/ucbstreamhelper.hxx> #include <unotools/localfilehelper.hxx> #include <com/sun/star/beans/XPropertySet.hpp> diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 268533ebb8c8..4e245ca50520 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -43,12 +43,8 @@ #include <rtl/memory.h> #include <rtl/uuid.h> #include <rtl/uri.hxx> -#ifndef DEBUG_HXX #include <tools/debug.hxx> -#endif -#ifndef URLOBJ_HXX #include <tools/urlobj.hxx> -#endif #include <unotools/ucbstreamhelper.hxx> #include <sot/exchange.hxx> #include <sot/storage.hxx> @@ -65,12 +61,8 @@ #include <comphelper/seqstream.hxx> #include <com/sun/star/datatransfer/clipboard/XClipboardNotifier.hpp> #include <com/sun/star/datatransfer/clipboard/XFlushableClipboard.hpp> -#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBOARD_XMIMECONTENTTYPEFACTORY_HPP_ #include <com/sun/star/datatransfer/XMimeContentTypeFactory.hpp> -#endif -#ifndef _COM_SUN_STAR_DATATRANSFER_CLIPBOARD_XMIMECONTENTTYPE_HPP_ #include <com/sun/star/datatransfer/XMimeContentType.hpp> -#endif #include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/lang/XInitialization.hpp> diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx index dcd0f81b2758..ea1b0174465e 100644 --- a/svtools/source/misc/transfer2.cxx +++ b/svtools/source/misc/transfer2.cxx @@ -28,12 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include <vos/mutex.hxx> -#ifndef DEBUG_HXX #include <tools/debug.hxx> -#endif -#ifndef URLOBJ_HXX #include <tools/urlobj.hxx> -#endif #include <unotools/ucbstreamhelper.hxx> #include <sot/exchange.hxx> #include <sot/storage.hxx> @@ -43,12 +39,9 @@ #include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <comphelper/processfactory.hxx> -#ifndef _COM_SUN_STAR_DATATRANSFER_DND_DROPTARGETDRAGCONTEXT_HPP_ #include <com/sun/star/datatransfer/dnd/XDropTargetDragContext.hpp> -#endif - #include "svl/urlbmk.hxx" -#include "inetimg.hxx" +#include <svtools/inetimg.hxx> #include <svtools/imap.hxx> #include <svtools/transfer.hxx> diff --git a/vcl/inc/vcl/impbmpconv.hxx b/svtools/source/misc/undo.src index d95da9a4093a..6f341741b112 100644 --- a/vcl/inc/vcl/impbmpconv.hxx +++ b/svtools/source/misc/undo.src @@ -25,15 +25,20 @@ * ************************************************************************/ -#ifndef _VCL_IMPBMPCONV_HXX_ -#define _VCL_IMPBMPCONV_HXX_ + // include ------------------------------------------------------------------ -#include <com/sun/star/script/XInvocation.hpp> -#include <com/sun/star/uno/Reference.hxx> +#include <svtools/svtools.hrc> -namespace vcl +String STR_UNDO { -com::sun::star::uno::Reference< com::sun::star::script::XInvocation > createBmpConverter(); -} + Text [ en-US ] = "Undo: " ; +}; +String STR_REDO +{ + Text [ en-US ] = "Re~do: " ; +}; +String STR_REPEAT +{ + Text [ en-US ] = "~Repeat: " ; +}; -#endif diff --git a/svtools/source/misc/wallitem.cxx b/svtools/source/misc/wallitem.cxx index 505af52c9908..859958cea41c 100644 --- a/svtools/source/misc/wallitem.cxx +++ b/svtools/source/misc/wallitem.cxx @@ -48,7 +48,7 @@ #include <vcl/gradient.hxx> #include <vcl/cvtgrf.hxx> -#include "wallitem.hxx" +#include <svtools/wallitem.hxx> #include <svl/cntwall.hxx> // ----------------------------------------------------------------------- diff --git a/svtools/source/plugapp/commtest.cxx b/svtools/source/plugapp/commtest.cxx deleted file mode 100644 index 3a235afcc61b..000000000000 --- a/svtools/source/plugapp/commtest.cxx +++ /dev/null @@ -1,261 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_svtools.hxx" -#include <vcl/svapp.hxx> -#include <vcl/wrkwin.hxx> -#include <vcl/toolbox.hxx> - - -#include <tools/simplecm.hxx> -#include "communi.hxx" -#include "brooker.hxx" -//#include <tools/bcst.hxx> - -#include "commtest.hrc" - - - -#define TCP_PORT 17612 - -#define CUniString( constAsciiStr ) UniString( RTL_CONSTASCII_USTRINGPARAM ( constAsciiStr ) ) - - -class PacketSender : public Timer -{ - SvStream* mpData; - CommunicationLinkRef mxCL; - -public: - PacketSender( ULONG nDelay, SvStream* pData, CommunicationLink* pCL ); - virtual void Timeout(); -}; - -PacketSender::PacketSender( ULONG nDelay, SvStream* pData, CommunicationLink* pCL ) -: mpData( pData ) -, mxCL( pCL ) -{ - SetTimeout( nDelay ); - Start(); -} - -void PacketSender::Timeout() -{ - mxCL->TransferDataStream( mpData ); - delete mpData; - delete this; -} - - - -class DelayedDeleter : public Timer -{ - CommunicationManager *mpManager; - -public: - DelayedDeleter( ULONG nDelay, CommunicationManager *pManager ); - virtual void Timeout(); -}; - -DelayedDeleter::DelayedDeleter( ULONG nDelay, CommunicationManager *pManager ) -: mpManager( pManager ) -{ - SetTimeout( nDelay ); - Start(); -} - -void DelayedDeleter::Timeout() -{ - delete mpManager; - delete this; -} - - - - -class CommunicationTester : public Application -{ - DECL_LINK( TBClick, ToolBox* ); - DECL_LINK( DataReceived, CommunicationLink* ); - DECL_LINK( ConnectionOpened, CommunicationLink* ); - DECL_LINK( ConnectionClosed, CommunicationLink* ); - - - CommunicationManager *pClientTcp, *pServerTcp; - InformationBroadcaster *pBCSTSend; - InformationBroadcaster *pBCSTListen; - InformationBrooker *pBCSTBrooker; -public: - CommunicationTester(); - - virtual void Main(); -}; - -CommunicationTester IchSelber; - -CommunicationTester::CommunicationTester() -: pClientTcp( NULL ) -, pServerTcp( NULL ) -, pBCSTSend( NULL ) -, pBCSTListen( NULL ) -, pBCSTBrooker( NULL ) -{} - -void CommunicationTester::Main() -{ - ResMgr *pRes = ResMgr::CreateResMgr( "commtest" ); - Resource::SetResManager( pRes ); - WorkWindow aWW( NULL, WB_APP | WB_STDWORK ); - aWW.Show(); - ToolBox aTB( &aWW, ResId( TBMenu ) ); - aTB.Show(); - aTB.RecalcItems(); - aTB.SetFloatingMode( TRUE ); - aTB.SetFloatingMode( FALSE ); - aTB.SetClickHdl( LINK( this, CommunicationTester, TBClick ) ); - - Execute(); -} - -#define SWITCH( pManager, ManagerClass ) \ -{ \ - if ( pManager ) \ - { \ - pManager->StopCommunication(); \ - new DelayedDeleter( 1000, pManager ); \ - pTB->SetItemState( pTB->GetCurItemId(), STATE_NOCHECK ); \ - pManager = NULL; \ - } \ - else \ - { \ - pManager = new ManagerClass; \ - pManager->SetConnectionOpenedHdl( LINK( this, CommunicationTester, ConnectionOpened ) );\ - pManager->SetConnectionClosedHdl( LINK( this, CommunicationTester, ConnectionClosed ) );\ - pManager->SetDataReceivedHdl( LINK( this, CommunicationTester, DataReceived ) );\ - pTB->SetItemState( pTB->GetCurItemId(), STATE_CHECK ); \ - } \ -} - - -IMPL_LINK( CommunicationTester, TBClick, ToolBox*, pTB ) -{ - switch ( pTB->GetCurItemId() ) - { - case SERVER_TCP: - { - SWITCH( pServerTcp, CommunicationManagerServerViaSocket( TCP_PORT, (USHORT) 32000 ) ); - if ( pServerTcp ) - pServerTcp->StartCommunication(); // Am Port horchen - } - break; - case CLIENT_TCP: - { - SWITCH( pClientTcp, CommunicationManagerClientViaSocket( "localhost", TCP_PORT ) ); - if ( pClientTcp ) - pClientTcp->StartCommunication(); // Eine Verbindung aufbauen - } - break; - case BCST_BROOKER: - { - if ( pBCSTBrooker ) - { - delete pBCSTBrooker; - pBCSTBrooker = NULL; - } - else - { - pBCSTBrooker = new InformationBrooker(); - } - } - break; - case BCST_LISTEN: - { - if ( pBCSTListen ) - { - delete pBCSTListen; - pBCSTListen = NULL; - } - else - { - pBCSTListen = new InformationBroadcaster(); - } - } - case BCST_SEND: - { - if ( pBCSTSend ) - { - pBCSTSend->Broadcast( BCST_CAT_PL2X, "Message: BCST_CAT_PL2X" ); - pBCSTSend->Broadcast( BCST_CAT_MINORCOPY, "Message: BCST_CAT_MINORCOPY" ); - pBCSTSend->Broadcast( BCST_CAT_DELIVER, "Message: BCST_CAT_DELIVER" ); - pBCSTSend->Broadcast( BCST_CAT_ALL, "Message: BCST_CAT_ALL" ); - } - else - { - pBCSTSend = new InformationBroadcaster(); - } - } - break; - } - return 0; -} - -IMPL_LINK( CommunicationTester, ConnectionOpened, CommunicationLink*, pCL ) -{ - SvStream *pData = pCL->GetBestCommunicationStream(); - while ( pData->Tell() < 70 ) *pData << 123; - - pCL->TransferDataStream( pData ); - return 0; -} - -IMPL_LINK( CommunicationTester, ConnectionClosed, CommunicationLink*, pCL ) -{ - return 0; -} - -IMPL_LINK( CommunicationTester, DataReceived, CommunicationLink*, pCL ) -{ - // Find Manager - CommunicationManager* pManager; - if ( pClientTcp && pClientTcp->IsLinkValid( pCL ) ) - { - pManager = pClientTcp; - } - if ( pServerTcp && pServerTcp->IsLinkValid( pCL ) ) - { - DBG_ASSERT( !pManager, "CommunicationLink bei mehreren Managern eingetragen"); - pManager = pServerTcp; - } - DBG_ASSERT( pCL->GetCommunicationManager() == pManager, "Manager des Link != Manager bei dem der Link Valid ist"); - - // Send Data Back (Echo) - new PacketSender( 1000, pCL->GetServiceData(), pCL ); - - return 0; -} - diff --git a/svtools/source/plugapp/commtest.hrc b/svtools/source/plugapp/commtest.hrc deleted file mode 100644 index f0f646b49bfc..000000000000 --- a/svtools/source/plugapp/commtest.hrc +++ /dev/null @@ -1,34 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#define TBMenu 256 - - -#define SERVER_TCP 1 -#define CLIENT_TCP 2 -#define BCST_BROOKER 3 -#define BCST_LISTEN 4 -#define BCST_SEND 5 diff --git a/svtools/source/plugapp/commtest.src b/svtools/source/plugapp/commtest.src deleted file mode 100644 index 7073699f4956..000000000000 --- a/svtools/source/plugapp/commtest.src +++ /dev/null @@ -1,60 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#include "commtest.hrc" - -ToolBox TBMenu { - Border = TRUE; - SVLook = TRUE; - Dockable = TRUE; - Pos = MAP_APPFONT( 0, 0 ); - Size = MAP_APPFONT( 100, 20 ); - LineCount = 2; -// FloatingLines = 2; - ItemList = { - ToolBoxItem { - Identifier = SERVER_TCP; - Text = "Server TCP"; - }; - ToolBoxItem { - Identifier = CLIENT_TCP; - Text = "Client TCP"; - }; - ToolBoxItem { - Identifier = BCST_BROOKER; - Text = "BroadcastBrooker"; - }; - ToolBoxItem { - Identifier = BCST_SEND; - Text = "BroadcastClientSend"; - }; - ToolBoxItem { - Identifier = BCST_LISTEN; - Text = "BroadcastClientListen"; - }; - }; - Scroll = TRUE; -}; diff --git a/svtools/source/plugapp/makefile.mk b/svtools/source/plugapp/makefile.mk deleted file mode 100644 index f1dd0a4a8334..000000000000 --- a/svtools/source/plugapp/makefile.mk +++ /dev/null @@ -1,61 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=..$/.. - -PRJNAME=svtools -TARGET=plugapp -LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/ttprops.obj - - -SRS2NAME=$(TARGET) -SRC2FILES= testtool.src - - -LIB1TARGET= $(SLB)$/plugapp.lib -LIB1OBJFILES= $(SLOFILES) - -######## Testapplikation ######### - -SRC1FILES= commtest.src -SRS1NAME= commtest - -######## Ende Testapplikation ######### - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svtools/source/productregistration/makefile.mk b/svtools/source/productregistration/makefile.mk deleted file mode 100644 index b6e119601697..000000000000 --- a/svtools/source/productregistration/makefile.mk +++ /dev/null @@ -1,86 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=svtools -TARGET=productregistration.uno -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE -GEN_HID=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk -DLLPRE= - -# --- Files ------------------------------------- - -SLOFILES= \ - $(SLO)$/productregistration.obj \ - $(SLO)$/registrationdlg.obj - -SHL1TARGET= $(TARGET) -SHL1IMPLIB= i$(TARGET) - -SHL1OBJS= \ - $(SLOFILES) - -SHL1STDLIBS=\ - $(TKLIB) \ - $(VCLLIB) \ - $(SVLLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -SHL1VERSIONMAP=$(SOLARENV)/src/component.map -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -DEF1NAME= $(SHL1TARGET) - -SRS1NAME= productregistration -SRC1FILES= \ - registrationdlg.src - -RESLIB1NAME=productregistration -RESLIB1IMAGES=$(PRJ)$/res -RESLIB1SRSFILES=\ - $(SRS)$/productregistration.srs - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - - -ALLTAR : $(MISC)/productregistration.uno.component - -$(MISC)/productregistration.uno.component .ERRREMOVE : \ - $(SOLARENV)/bin/createcomponent.xslt productregistration.uno.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt productregistration.uno.component diff --git a/svtools/source/svhtml/htmlkywd.cxx b/svtools/source/svhtml/htmlkywd.cxx index 96377a1b7efb..e966ccb2b5f6 100644 --- a/svtools/source/svhtml/htmlkywd.cxx +++ b/svtools/source/svhtml/htmlkywd.cxx @@ -34,8 +34,8 @@ #include <limits.h> #include <svtools/svparser.hxx> -#include "htmlkywd.hxx" -#include "htmltokn.h" +#include <svtools/htmlkywd.hxx> +#include <svtools/htmltokn.h> // die Tabelle muss noch sortiert werden struct HTML_TokenEntry diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index af0d0dff9667..33b8fd91a29f 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -36,7 +36,7 @@ #include <svl/zforlist.hxx> #include <svtools/htmlout.hxx> -#include "htmlkywd.hxx" +#include <svtools/htmlkywd.hxx> #include <svtools/imap.hxx> #include <svtools/imaprect.hxx> #include <svtools/imapcirc.hxx> diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx index 4c08d9c41ec9..9227690c2995 100644 --- a/svtools/source/svhtml/htmlsupp.cxx +++ b/svtools/source/svhtml/htmlsupp.cxx @@ -37,8 +37,8 @@ #endif #include <svtools/parhtml.hxx> -#include "htmltokn.h" -#include "htmlkywd.hxx" +#include <svtools/htmltokn.h> +#include <svtools/htmlkywd.hxx> /* */ diff --git a/svtools/source/svhtml/makefile.mk b/svtools/source/svhtml/makefile.mk deleted file mode 100644 index 7a8552f2b672..000000000000 --- a/svtools/source/svhtml/makefile.mk +++ /dev/null @@ -1,51 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=svhtml - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES=\ - $(SLO)$/htmlkywd.obj \ - $(SLO)$/htmlsupp.obj \ - $(SLO)$/htmlout.obj \ - $(SLO)$/parhtml.obj - -# ========================================================================== - -.INCLUDE : target.mk - diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index ade58688dc55..28df35a4bb2a 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -48,8 +48,8 @@ #include <com/sun/star/document/XDocumentProperties.hpp> #include <svtools/parhtml.hxx> -#include "htmltokn.h" -#include "htmlkywd.hxx" +#include <svtools/htmltokn.h> +#include <svtools/htmlkywd.hxx> using namespace ::com::sun::star; diff --git a/svtools/source/svrtf/makefile.mk b/svtools/source/svrtf/makefile.mk deleted file mode 100644 index cb76882f5f94..000000000000 --- a/svtools/source/svrtf/makefile.mk +++ /dev/null @@ -1,51 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=svrtf - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/svparser.obj \ - $(SLO)$/parrtf.obj \ - $(SLO)$/rtfout.obj \ - $(SLO)$/rtfkeywd.obj - -# ========================================================================== - -.INCLUDE : target.mk - diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx index 3a775a7fc345..7e29dbc4598f 100644 --- a/svtools/source/svrtf/parrtf.cxx +++ b/svtools/source/svrtf/parrtf.cxx @@ -34,8 +34,8 @@ #include <rtl/tencinfo.h> #include <tools/stream.hxx> #include <tools/debug.hxx> -#include "rtftoken.h" -#include "rtfkeywd.hxx" +#include <svtools/rtftoken.h> +#include <svtools/rtfkeywd.hxx> #include <svtools/parrtf.hxx> const int MAX_STRING_LEN = 1024; diff --git a/svtools/source/svrtf/rtfkey2.cxx b/svtools/source/svrtf/rtfkey2.cxx deleted file mode 100644 index a4335302f475..000000000000 --- a/svtools/source/svrtf/rtfkey2.cxx +++ /dev/null @@ -1,1160 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_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_SP, "\\sp" ); -/* -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/rtfkeywd.cxx b/svtools/source/svrtf/rtfkeywd.cxx index 9b29951ddbbf..7422961c6881 100644 --- a/svtools/source/svrtf/rtfkeywd.cxx +++ b/svtools/source/svrtf/rtfkeywd.cxx @@ -30,8 +30,8 @@ /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil -*- */ -#include "rtfkeywd.hxx" -#include "rtftoken.h" +#include <svtools/rtfkeywd.hxx> +#include <svtools/rtftoken.h> #include "tools/string.hxx" #include <string.h> diff --git a/svtools/source/svrtf/rtfout.cxx b/svtools/source/svrtf/rtfout.cxx index d97e838d2450..670abfaf4b0c 100644 --- a/svtools/source/svrtf/rtfout.cxx +++ b/svtools/source/svrtf/rtfout.cxx @@ -32,8 +32,8 @@ #include <tools/string.hxx> #include <rtl/string.hxx> #include <rtl/ustrbuf.hxx> -#include <rtfkeywd.hxx> -#include <rtfout.hxx> +#include <svtools/rtfkeywd.hxx> +#include <svtools/rtfout.hxx> using namespace rtl; diff --git a/svtools/source/table/makefile.mk b/svtools/source/table/makefile.mk deleted file mode 100644 index cf1adc76fe92..000000000000 --- a/svtools/source/table/makefile.mk +++ /dev/null @@ -1,55 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -ENABLE_EXCEPTIONS=TRUE -PRJNAME=svtools -TARGET=table -#LIBTARGET=NO - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES=\ - $(SLO)$/tablecontrol.obj \ - $(SLO)$/tablecontrol_impl.obj \ - $(SLO)$/gridtablerenderer.obj \ - $(SLO)$/tablegeometry.obj \ - $(SLO)$/defaultinputhandler.obj \ - $(SLO)$/tabledatawindow.obj - -#LIB1TARGET= $(SLB)$/$(TARGET).lib -#LIB1OBJFILES= $(SLOFILES) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 90bc4899209b..6c58cb530330 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -948,8 +948,16 @@ namespace svt { namespace table //In the case that column headers are defined but data hasn't yet been set, //only column headers will be shown if(m_pModel->hasColumnHeaders()) + { if(m_nColHeaderHeightPixel>1) + { m_pDataWindow->SetSizePixel( m_rAntiImpl.GetOutputSizePixel()); + if(m_bResizingGrid) + //update column widths to fit in grid + impl_ni_updateColumnWidths(); + m_bResizingGrid = true; + } + } if(m_nColumnCount != 0) impl_ni_updateScrollbars(); } @@ -2011,8 +2019,11 @@ namespace svt { namespace table PColumnModel pColumn = m_pModel->getColumnModel(m_nCurColumn); impl_ni_getAccVisibleColWidths(); int newColWidth = m_aColumnWidthsPixel[m_nCurColumn]; + //make resize area for the separator wider + int nLeft = m_aVisibleColumnWidthsPixel[resizingColumn]-4; //subtract 1 from m_aAccColumnWidthPixel because right border should be part of the current cell - if(m_aVisibleColumnWidthsPixel[resizingColumn]-1 == rPoint.X() && pColumn->isResizable()) + int nRight = m_aVisibleColumnWidthsPixel[resizingColumn]-1; + if( rPoint.X()> nLeft && rPoint.X()<nRight && pColumn->isResizable()) aNewPointer = Pointer( POINTER_HSPLIT ); //MouseButton was pressed but not yet released, mouse is moving if(m_bResizing) @@ -2040,7 +2051,10 @@ namespace svt { namespace table m_bResizingGrid = false; m_nResizingColumn = m_nCurColumn; PColumnModel pColumn = m_pModel->getColumnModel(m_nResizingColumn); - if(m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-1 == rPoint.X() && pColumn->isResizable()) + //make resize area for the separator wider + int nLeft = m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-4; + int nRight = m_aVisibleColumnWidthsPixel[m_nResizingColumn-m_nLeftColumn]-1; + if(rPoint.X()> nLeft && rPoint.X()<nRight && pColumn->isResizable()) { m_pDataWindow->CaptureMouse(); m_bResizing = true; diff --git a/svtools/source/toolpanel/makefile.mk b/svtools/source/toolpanel/makefile.mk deleted file mode 100755 index 58282056f529..000000000000 --- a/svtools/source/toolpanel/makefile.mk +++ /dev/null @@ -1,68 +0,0 @@ -#************************************************************************* -# -# 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.16 $ -# -# 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=svtools -TARGET=toolpanel - -# --- Settings ----------------------------------------------------- - -ENABLE_EXCEPTIONS=TRUE - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SRS1NAME=$(TARGET) -SRC1FILES=\ - toolpanel.src - -SLOFILES=\ - $(SLO)$/drawerlayouter.obj \ - $(SLO)$/dummypanel.obj \ - $(SLO)$/paneldecklisteners.obj \ - $(SLO)$/paneltabbar.obj \ - $(SLO)$/paneltabbarpeer.obj \ - $(SLO)$/refbase.obj \ - $(SLO)$/tabbargeometry.obj \ - $(SLO)$/tablayouter.obj \ - $(SLO)$/toolpanel.obj \ - $(SLO)$/toolpanelcollection.obj \ - $(SLO)$/toolpaneldrawer.obj \ - $(SLO)$/toolpaneldrawerpeer.obj \ - $(SLO)$/toolpaneldeck.obj \ - $(SLO)$/toolpaneldeckpeer.obj \ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx index 2f25a8f2f9b2..3ccf83a224f8 100644 --- a/svtools/source/uno/addrtempuno.cxx +++ b/svtools/source/uno/addrtempuno.cxx @@ -28,12 +28,8 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" #include "svtools/genericunodialog.hxx" -#ifndef _SVT_DOC_ADDRESSTEMPLATE_HXX_ -#include "addresstemplate.hxx" -#endif -#ifndef _CPPUHELPER_EXTRACT_HXX_ +#include <svtools/addresstemplate.hxx> #include <cppuhelper/extract.hxx> -#endif #include <cppuhelper/typeprovider.hxx> #include <comphelper/property.hxx> #include <com/sun/star/sdbc/XDataSource.hpp> diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx index 9eb36cf18a45..5b7d7c709509 100644 --- a/svtools/source/uno/contextmenuhelper.cxx +++ b/svtools/source/uno/contextmenuhelper.cxx @@ -28,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include "contextmenuhelper.hxx" +#include <svtools/contextmenuhelper.hxx> #include <svtools/menuoptions.hxx> #include <svtools/miscopt.hxx> diff --git a/svtools/source/uno/framestatuslistener.cxx b/svtools/source/uno/framestatuslistener.cxx index 20176160b396..f7a0540f6eb4 100644 --- a/svtools/source/uno/framestatuslistener.cxx +++ b/svtools/source/uno/framestatuslistener.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <framestatuslistener.hxx> +#include <svtools/framestatuslistener.hxx> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/lang/DisposedException.hpp> #include <vos/mutex.hxx> diff --git a/svtools/source/uno/makefile.mk b/svtools/source/uno/makefile.mk deleted file mode 100644 index 7c1c44006047..000000000000 --- a/svtools/source/uno/makefile.mk +++ /dev/null @@ -1,61 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=unoiface -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/addrtempuno.obj \ - $(SLO)$/contextmenuhelper.obj \ - $(SLO)$/framestatuslistener.obj \ - $(SLO)$/generictoolboxcontroller.obj \ - $(SLO)$/genericunodialog.obj \ - $(SLO)$/miscservices.obj\ - $(SLO)$/statusbarcontroller.obj \ - $(SLO)$/toolboxcontroller.obj \ - $(SLO)$/treecontrolpeer.obj \ - $(SLO)$/unocontroltablemodel.obj \ - $(SLO)$/unoevent.obj \ - $(SLO)$/unoiface.obj \ - $(SLO)$/unoimap.obj \ - $(SLO)$/svtxgridcontrol.obj \ - $(SLO)$/popupwindowcontroller.obj \ - $(SLO)$/popupmenucontrollerbase.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx index 14b802a1bf90..8dde75dc7fc3 100644 --- a/svtools/source/uno/statusbarcontroller.cxx +++ b/svtools/source/uno/statusbarcontroller.cxx @@ -27,7 +27,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#include <statusbarcontroller.hxx> +#include <svtools/statusbarcontroller.hxx> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> @@ -37,11 +37,9 @@ #include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <vcl/status.hxx> -#include <imgdef.hxx> +#include <svtools/imgdef.hxx> #include <svtools/miscopt.hxx> -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> -#endif using namespace ::cppu; using namespace ::com::sun::star::awt; diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index bdb2256a07e8..9e4c522dc8c4 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -35,12 +35,9 @@ #include <com/sun/star/frame/XLayoutManager.hpp> #include <vos/mutex.hxx> #include <vcl/svapp.hxx> -#include <imgdef.hxx> +#include <svtools/imgdef.hxx> #include <svtools/miscopt.hxx> - -#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include <toolkit/unohlp.hxx> -#endif #include <vcl/toolbox.hxx> //shizhobo #include <com/sun/star/beans/PropertyAttribute.hpp> diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx index 526cdbb5d03a..0f8bc91d9927 100644 --- a/svtools/source/uno/unoevent.cxx +++ b/svtools/source/uno/unoevent.cxx @@ -28,15 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svtools.hxx" -#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP #include <com/sun/star/beans/PropertyValue.hpp> -#endif #include <rtl/ustrbuf.hxx> - - #include <tools/rtti.hxx> #include <tools/solar.h> -#include "unoevent.hxx" +#include <svtools/unoevent.hxx> #include <svl/macitem.hxx> using namespace ::com::sun::star; diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index 2d22d9cedb33..9ff37fbc2af4 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -31,12 +31,11 @@ #define _SVT_UNOIFACE_CXX #include <tools/debug.hxx> #include <vcl/svapp.hxx> - #include <svtools/svmedit.hxx> #include <unoiface.hxx> -#include "filedlg.hxx" -#include "filectrl.hxx" -#include "roadmap.hxx" +#include <svtools/filedlg.hxx> +#include <svtools/filectrl.hxx> +#include <svtools/roadmap.hxx> #include <svtools/fixedhyper.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XSingleServiceFactory.hpp> @@ -46,9 +45,8 @@ #include <toolkit/helper/property.hxx> #include <svtools/fmtfield.hxx> #include <svl/numuno.hxx> -#include <calendar.hxx> -#include <prgsbar.hxx> - +#include <svtools/calendar.hxx> +#include <svtools/prgsbar.hxx> #include <svtools/svtreebx.hxx> #include "treecontrolpeer.hxx" #include "svtxgridcontrol.hxx" diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx index 88f22f0c8402..97482ed9d540 100644 --- a/svtools/source/uno/unoimap.cxx +++ b/svtools/source/uno/unoimap.cxx @@ -36,23 +36,17 @@ #include <com/sun/star/awt/Rectangle.hpp> #include <com/sun/star/awt/Point.hpp> #include <com/sun/star/drawing/PointSequence.hpp> - -#ifndef _COMPHELPER_SERVICEHELPER_HXX_ #include <comphelper/servicehelper.hxx> -#endif #include <comphelper/propertysethelper.hxx> #include <comphelper/propertysetinfo.hxx> #include <cppuhelper/weakagg.hxx> - #include <cppuhelper/implbase3.hxx> - #include <list> #include <rtl/uuid.h> #include <vos/mutex.hxx> #include <vcl/svapp.hxx> - -#include "unoevent.hxx" -#include "unoimap.hxx" +#include <svtools/unoevent.hxx> +#include <svtools/unoimap.hxx> #include <svtools/imap.hxx> #include <svtools/imapcirc.hxx> #include <svtools/imaprect.hxx> diff --git a/svtools/source/uno/wizard/makefile.mk b/svtools/source/uno/wizard/makefile.mk deleted file mode 100644 index 521496fc5d48..000000000000 --- a/svtools/source/uno/wizard/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=../../.. - -PRJNAME=svtools -TARGET=unowiz -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/unowizard.obj \ - $(SLO)$/wizardshell.obj \ - $(SLO)$/wizardpagecontroller.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/svtools/source/urlobj/inetimg.cxx b/svtools/source/urlobj/inetimg.cxx index 7e81f17209f2..695f3993d8b8 100644 --- a/svtools/source/urlobj/inetimg.cxx +++ b/svtools/source/urlobj/inetimg.cxx @@ -31,10 +31,7 @@ #include <sot/formats.hxx> #include <tools/stream.hxx> -#ifndef GCC -#endif - -#include "inetimg.hxx" +#include <svtools/inetimg.hxx> #define TOKEN_SEPARATOR '\001' diff --git a/svtools/source/urlobj/makefile.mk b/svtools/source/urlobj/makefile.mk deleted file mode 100644 index c75e592ea10b..000000000000 --- a/svtools/source/urlobj/makefile.mk +++ /dev/null @@ -1,46 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=urlobj - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/inetimg.obj - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svtools/util/makefile.mk b/svtools/util/makefile.mk deleted file mode 100644 index 27b46488a16c..000000000000 --- a/svtools/util/makefile.mk +++ /dev/null @@ -1,200 +0,0 @@ -#************************************************************************* -#* -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=svtools -TARGET=svtool -RESTARGET=svt -RESTARGETPATCH=svp -GEN_HID=TRUE -GEN_HID_OTHER=TRUE -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -USE_LDUMP2=TRUE - -# --- general section ---------------------------------------------------- - -.IF "$(GUI)"!="UNX" -LIB2TARGET= $(LB)$/svtool.lib -LIB2FILES= $(LB)$/_svt.lib -.ENDIF - -LIB1TARGET= $(SLB)/svt.lib -LIB1FILES= \ - $(SLB)/browse.lib \ - $(SLB)/config.lib \ - $(SLB)/svcontnr.lib \ - $(SLB)/ctrl.lib \ - $(SLB)/dialogs.lib \ - $(SLB)/edit.lib \ - $(SLB)/filter.lib \ - $(SLB)/filter.uno.lib \ - $(SLB)$/graphic.lib \ - $(SLB)/igif.lib \ - $(SLB)/jpeg.lib \ - $(SLB)/ixpm.lib \ - $(SLB)/ixbm.lib \ - $(SLB)/wmf.lib \ - $(SLB)/java.lib \ - $(SLB)/misc.lib \ - $(SLB)/plugapp.lib \ - $(SLB)/svhtml.lib \ - $(SLB)/svrtf.lib \ - $(SLB)/table.lib \ - $(SLB)/unoiface.lib \ - $(SLB)/unowiz.lib \ - $(SLB)/urlobj.lib \ - $(SLB)/toolpanel.lib - -# generation of resourcen-lib ---------------------------------------- - -RESLIB1NAME= $(RESTARGET) -RESLIB1IMAGES=$(PRJ)$/res -RESLIB1SRSFILES= \ - $(SRS)$/filter.srs \ - $(SRS)$/misc.srs \ - $(SRS)$/ctrl.srs \ - $(SRS)$/dialogs.srs \ - $(SRS)$/plugapp.srs \ - $(SRS)$/svcontnr.srs \ - $(SRS)$/browse.srs \ - $(SRS)$/toolpanel.srs \ - $(SRS)$/javaerror.srs - -RESLIB3NAME= $(RESTARGETPATCH) -RESLIB3SRSFILES= \ - $(SRS)$/patchjavaerror.srs - -# build the shared library -------------------------------------------------- - -SHL1TARGET= svt$(DLLPOSTFIX) -SHL1IMPLIB= _svt -SHL1USE_EXPORTS=name - -.IF "$(OS)"!="MACOSX" -# static libraries -SHL1STDLIBS+= $(JPEG3RDLIB) -.ENDIF - -# dynamic libraries -SHL1STDLIBS+= \ - $(TKLIB) \ - $(VCLLIB) \ - $(SVLLIB) \ - $(SOTLIB) \ - $(BASEGFXLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(I18NISOLANGLIB) \ - $(I18NUTILLIB) \ - $(UCBHELPERLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(VOSLIB) \ - $(SALLIB) \ - $(ICUUCLIB) \ - $(JVMFWKLIB) - -.IF "$(OS)"=="MACOSX" -# static libraries go at end -SHL1STDLIBS+= $(JPEG3RDLIB) -.ENDIF - -.IF "$(GUI)"=="WNT" -SHL1STDLIBS+= \ - $(UWINAPILIB) \ - $(ADVAPI32LIB) \ - $(GDI32LIB) \ - $(OLE32LIB) \ - $(UUIDLIB) \ - $(ADVAPI32LIB) \ - $(OLEAUT32LIB) -.ENDIF # WNT - -SHL1LIBS= \ - $(SLB)$/svt.lib - -SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME= $(SHL1TARGET) -DEFLIB1NAME =svt -DEF1DES =SvTools - - -# --- g2g application -------------------------------------------------- - -APP2TARGET = g2g -APP2BASE = 0x10000000 -APP2DEPN = $(SHL1TARGETN) $(SHL2TARGETN) - -APP2OBJS = $(OBJ)$/g2g.obj - -.IF "$(GUI)"!="UNX" -APP2STDLIBS+= $(SVTOOLLIB) -.ELSE -APP2STDLIBS+= -lsvt$(DLLPOSTFIX) -APP2STDLIBS+= -lsvl$(DLLPOSTFIX) -.ENDIF - -APP2STDLIBS+= $(VCLLIB) \ - $(TOOLSLIB) \ - $(VOSLIB) \ - $(SALLIB) - -# --- Targets ------------------------------------------------------ - -.IF "$(GUI)"=="UNX" -SVTTARGETS= $(LB)$/lib$(SHL1TARGET)$(DLLPOST) -.ELSE -SVTTARGETS= $(BIN)$/$(SHL1TARGET)$(DLLPOST) -.ENDIF - -# just a quick fix - has to be cleaned up some day... -.IF "$(L10N-framework)"=="" -ALL: $(SLB)$/svt.lib \ - $(MISC)$/$(SHL1TARGET).def \ - $(SVTTARGETS) \ - ALLTAR -.ENDIF # "$(L10N-framework)"=="" - -.INCLUDE : target.mk - - - -ALLTAR : $(MISC)/svt.component - -$(MISC)/svt.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - svt.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt svt.component diff --git a/svtools/workben/cui/makefile.mk b/svtools/workben/cui/makefile.mk deleted file mode 100644 index 2c7d06682c77..000000000000 --- a/svtools/workben/cui/makefile.mk +++ /dev/null @@ -1,60 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=cuidem -LIBTARGET=NO - -TARGETTYPE=CUI - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -OBJFILES= $(OBJ)$/loadlib.obj - -APP4TARGET= dllver -APP4STDLIBS= \ - $(SVTOOLLIB) \ - $(SVLLIB) \ - $(VCLLIB) \ - $(TOOLSLIB) \ - $(VOSLIB) \ - $(SALLIB) -.IF "$(GUI)"=="WNT" || "$(COM)"=="GCC" -APP4STDLIBS+= $(CPPULIB) -.ENDIF -APP4OBJS= $(OBJ)$/loadlib.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svtools/workben/makefile.mk b/svtools/workben/makefile.mk deleted file mode 100644 index 9e50208b9ee9..000000000000 --- a/svtools/workben/makefile.mk +++ /dev/null @@ -1,69 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=svtools -TARGET=svdem -LIBTARGET=NO -TARGETTYPE=GUI -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -OBJFILES= $(OBJ)$/svdem.obj - -APP1TARGET= $(TARGET) -APP1STDLIBS= $(SVTOOLLIB) \ - $(VCLLIB) \ - $(UNOTOOLSLIB) \ - $(COMPHELPERLIB) \ - $(TOOLSLIB) \ - $(SALLIB) \ - $(VOSLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) - -APP1OBJS= $(OBJ)$/svdem.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -ALLTAR : $(BIN)$/applicat.rdb - -$(BIN)$/applicat.rdb : makefile.mk $(UNOUCRRDB) - rm -f $@ - $(GNUCOPY) $(UNOUCRRDB) $@ - cd $(BIN) && \ - regcomp -register -r applicat.rdb \ - -c i18nsearch.uno$(DLLPOST) \ - -c i18npool.uno$(DLLPOST) diff --git a/svtools/workben/toolpanel/makefile.mk b/svtools/workben/toolpanel/makefile.mk deleted file mode 100644 index e64e3cd8eccd..000000000000 --- a/svtools/workben/toolpanel/makefile.mk +++ /dev/null @@ -1,110 +0,0 @@ -#************************************************************************* -# -# 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.16 $ -# -# 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=svtools -TARGET=toolpaneltest -TARGETTYPE=GUI -LIBTARGET=NO - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -CXXFILES= toolpaneltest.cxx - -OBJFILES= $(OBJ)$/toolpaneltest.obj - -APP1TARGET= $(TARGET) -APP1OBJS= $(OBJFILES) -APP1STDLIBS=\ - $(VCLLIB) \ - $(UCBHELPERLIB) \ - $(SALLIB) \ - $(TOOLSLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(BASEGFXLIB) \ - $(SVTOOLLIB) \ - -APP1RAPTH=BRAND - -.IF "$(GUI)"!="UNX" -APP1DEF= $(MISC)$/$(TARGET).def -.ENDIF - -.IF "$(COM)"=="GCC" -ADDOPTFILES=$(OBJ)$/toolpaneltest.obj -add_cflagscxx="-frtti -fexceptions" -.ENDIF - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - - -# ------------------------------------------------------------------ -# MAC -# ------------------------------------------------------------------ - -.IF "$(GUI)" == "MAC" - -$(MISC)$/$(TARGET).def: makefile - echo Kein Def-File fuer Applikationen auf Mac -.ENDIF - - -# ------------------------------------------------------------------ -# Windows -# ------------------------------------------------------------------ - -.IF "$(GUI)" == "WIN" - -$(MISC)$/$(TARGET).def: makefile - echo NAME $(TARGET) >$@ - echo DESCRIPTION 'ToolPanel - Testprogramm' >>$@ - echo EXETYPE WINDOWS >>$@ - echo STUB 'winSTUB.EXE' >>$@ - echo PROTMODE >>$@ - echo CODE PRELOAD MOVEABLE DISCARDABLE >>$@ - echo DATA PRELOAD MOVEABLE MULTIPLE >>$@ - echo HEAPSIZE 8192 >>$@ - echo STACKSIZE 32768 >>$@ - -.ENDIF - diff --git a/svtools/workben/treecontrol/makefile.mk b/svtools/workben/treecontrol/makefile.mk deleted file mode 100644 index 2558ed2c9a94..000000000000 --- a/svtools/workben/treecontrol/makefile.mk +++ /dev/null @@ -1,91 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svtools -TARGET=treetest -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -APP1NOSAL= TRUE -APP1TARGET= treetest -APP1OBJS= $(OBJ)$/treetest.obj -APP1STDLIBS=$(SOTLIB) \ - $(COMPHELPERLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) - -# $(SVTOOLLIB) \ - -APP2DEF= $(MISC)$/treetest.def - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - - -# ------------------------------------------------------------------ -# Windows -# ------------------------------------------------------------------ - -.IF "$(GUI)" == "WIN" - -$(MISC)$/treetest.def: makefile.mk - echo NAME treetest >$@ - echo DESCRIPTION 'StarView - Testprogramm' >>$@ - echo EXETYPE WINDOWS >>$@ - echo STUB 'winSTUB.EXE' >>$@ - echo PROTMODE >>$@ - echo CODE PRELOAD MOVEABLE DISCARDABLE >>$@ - echo DATA PRELOAD MOVEABLE MULTIPLE >>$@ - echo HEAPSIZE 8192 >>$@ - echo STACKSIZE 32768 >>$@ - -.ENDIF - -ALLTAR : $(BIN)$/treetest.rdb - -$(BIN)$/treetest.rdb : makefile.mk $(UNOUCRRDB) - rm -f $@ - $(GNUCOPY) $(UNOUCRRDB) $@ - +cd $(BIN) && \ - regcomp -register -r treetest.rdb \ - -c i18nsearch.uno$(DLLPOST) \ - -c i18npool.uno$(DLLPOST) \ - -c connector.uno$(DLLPOST) \ - -c remotebridge.uno$(DLLPOST) \ - -c bridgefac.uno$(DLLPOST) \ - -c uuresolver.uno$(DLLPOST) \ - -c $(DLLPRE)tk$(DLLPOSTFIX)$(DLLPOST) diff --git a/svtools/workben/unodialog/makefile.mk b/svtools/workben/unodialog/makefile.mk deleted file mode 100644 index f18feffce5c3..000000000000 --- a/svtools/workben/unodialog/makefile.mk +++ /dev/null @@ -1,90 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJINC=$(PRJ)/inc -PRJNAME=svtools -TARGET=udlg -USE_DEFFILE=TRUE - -ENABLE_EXCEPTIONS=TRUE -VISIBILITY_HIDDEN=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk - -# --- Files ------------------------------------- - -# ... resource files ............................ - -SRS1NAME=$(TARGET) -SRC1FILES = \ - roadmapskeleton.src - -# ... object files ............................ -SLOFILES= $(SLO)$/unodialogsample.obj \ - $(SLO)$/roadmapskeleton.obj \ - $(SLO)$/roadmapskeletonpages.obj \ - $(SLO)$/udlg_module.obj \ - $(SLO)$/udlg_services.obj \ - -# --- library ----------------------------------- - -SHL1TARGET=$(TARGET)$(DLLPOSTFIX) -SHL1VERSIONMAP=$(SOLARENV)/src/component.map - -SHL1STDLIBS= \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(COMPHELPERLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(SALLIB) \ - $(SVTOOLLIB) \ - $(VCLLIB) - -SHL1LIBS= $(SLB)$/$(TARGET).lib -SHL1IMPLIB= i$(TARGET) -SHL1DEPN= $(SHL1LIBS) -SHL1DEF= $(MISC)$/$(SHL1TARGET).def - -DEF1NAME= $(SHL1TARGET) - -# --- .res files ------------------------------- - -RES1FILELIST=\ - $(SRS)$/$(TARGET).srs - -RESLIB1NAME=$(TARGET) -RESLIB1IMAGES=$(PRJ)$/res -RESLIB1SRSFILES=$(RES1FILELIST) - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/svl/source/svsql/makefile.mk b/toolkit/AllLangResTarget_tk.mk index e837d022fb1e..784063934112 100644 --- a/svl/source/svsql/makefile.mk +++ b/toolkit/AllLangResTarget_tk.mk @@ -2,7 +2,7 @@ # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # -# Copyright 2000, 2010 Oracle and/or its affiliates. +# Copyright 2009 by Sun Microsystems, Inc. # # OpenOffice.org - a multi-platform office productivity suite # @@ -14,33 +14,32 @@ # # 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 +# 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 +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # #************************************************************************* -PRJ=..$/.. +$(eval $(call gb_AllLangResTarget_AllLangResTarget,tk)) -PRJNAME=svl -TARGET=svsql +$(eval $(call gb_AllLangResTarget_set_reslocation,tk,toolkit)) -# --- Settings ----------------------------------------------------- +$(eval $(call gb_AllLangResTarget_add_srs,tk,\ + toolkit/awt \ +)) -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svl.pmk +$(eval $(call gb_SrsTarget_SrsTarget,toolkit/awt)) -# --- Files -------------------------------------------------------- - -SLOFILES = \ - $(SLO)$/converter.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk +$(eval $(call gb_SrsTarget_set_include,toolkit/awt,\ + $$(INCLUDE) \ + -I$(SRCDIR)/toolkit/source/awt \ +)) +$(eval $(call gb_SrsTarget_add_files,toolkit/awt,\ + toolkit/source/awt/xthrobber.src \ +)) diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk new file mode 100644 index 000000000000..ab51c1e282bb --- /dev/null +++ b/toolkit/Library_tk.mk @@ -0,0 +1,188 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,tk)) + +$(eval $(call gb_Library_set_componentfile,tk,toolkit/util/tk)) + +$(eval $(call gb_Library_add_package_headers,tk,toolkit_inc)) + +#$(eval $(call gb_Library_add_precompiled_header,tk,$(SRCDIR)/toolkit/inc/pch/precompiled_toolkit)) + +$(eval $(call gb_Library_set_include,tk,\ + $$(INCLUDE) \ + -I$(WORKDIR)/inc/toolkit/ \ + -I$(SRCDIR)/toolkit/inc \ + -I$(SRCDIR)/toolkit/inc/pch \ + -I$(SRCDIR)/toolkit/source \ + -I$(OUTDIR)/inc/toolkit \ + -I$(OUTDIR)/inc/offuh \ +)) + +$(eval $(call gb_Library_set_defs,tk,\ + $$(DEFS) \ + -DTOOLKIT_DLLIMPLEMENTATION \ +)) + +$(eval $(call gb_Library_add_linked_libs,tk,\ + comphelper \ + cppu \ + cppuhelper \ + sal \ + stl \ + tl \ + utl \ + vcl \ +)) + +$(eval $(call gb_Library_add_exception_objects,tk,\ + toolkit/source/awt/asynccallback \ + toolkit/source/awt/stylesettings \ + toolkit/source/awt/vclxaccessiblecomponent \ + toolkit/source/awt/vclxbitmap \ + toolkit/source/awt/vclxbutton \ + toolkit/source/awt/vclxcontainer \ + toolkit/source/awt/vclxdevice \ + toolkit/source/awt/vclxdialog \ + toolkit/source/awt/vclxfixedline \ + toolkit/source/awt/vclxfont \ + toolkit/source/awt/vclxgraphics \ + toolkit/source/awt/vclxmenu \ + toolkit/source/awt/vclxplugin \ + toolkit/source/awt/vclxpointer \ + toolkit/source/awt/vclxprinter \ + toolkit/source/awt/vclxregion \ + toolkit/source/awt/vclxscroller \ + toolkit/source/awt/vclxspinbutton \ + toolkit/source/awt/vclxsplitter \ + toolkit/source/awt/vclxsystemdependentwindow \ + toolkit/source/awt/vclxtabcontrol \ + toolkit/source/awt/vclxtabpage \ + toolkit/source/awt/vclxtoolkit \ + toolkit/source/awt/vclxtopwindow \ + toolkit/source/awt/vclxwindow \ + toolkit/source/awt/vclxwindow1 \ + toolkit/source/awt/vclxwindows \ + toolkit/source/awt/xsimpleanimation \ + toolkit/source/awt/xthrobber \ + toolkit/source/controls/accessiblecontrolcontext \ + toolkit/source/controls/dialogcontrol \ + toolkit/source/controls/eventcontainer \ + toolkit/source/controls/formattedcontrol \ + toolkit/source/controls/geometrycontrolmodel \ + toolkit/source/controls/grid/defaultgridcolumnmodel \ + toolkit/source/controls/grid/defaultgriddatamodel \ + toolkit/source/controls/grid/gridcolumn \ + toolkit/source/controls/grid/gridcontrol \ + toolkit/source/controls/roadmapcontrol \ + toolkit/source/controls/roadmapentry \ + toolkit/source/controls/stdtabcontroller \ + toolkit/source/controls/stdtabcontrollermodel \ + toolkit/source/controls/tkscrollbar \ + toolkit/source/controls/tksimpleanimation \ + toolkit/source/controls/tkspinbutton \ + toolkit/source/controls/tkthrobber \ + toolkit/source/controls/tree/treecontrol \ + toolkit/source/controls/tree/treedatamodel \ + toolkit/source/controls/unocontrol \ + toolkit/source/controls/unocontrolbase \ + toolkit/source/controls/unocontrolcontainer \ + toolkit/source/controls/unocontrolcontainermodel \ + toolkit/source/controls/unocontrolmodel \ + toolkit/source/controls/unocontrols \ + toolkit/source/helper/accessibilityclient \ + toolkit/source/helper/externallock \ + toolkit/source/helper/fixedhyperbase \ + toolkit/source/helper/formpdfexport \ + toolkit/source/helper/imagealign \ + toolkit/source/helper/listenermultiplexer \ + toolkit/source/helper/property \ + toolkit/source/helper/registerservices \ + toolkit/source/helper/servicenames \ + toolkit/source/helper/throbberimpl \ + toolkit/source/helper/tkresmgr \ + toolkit/source/helper/unomemorystream \ + toolkit/source/helper/unopropertyarrayhelper \ + toolkit/source/helper/unowrapper \ + toolkit/source/helper/vclunohelper \ + toolkit/source/layout/core/bin \ + toolkit/source/layout/core/box \ + toolkit/source/layout/core/box-base \ + toolkit/source/layout/core/byteseq \ + toolkit/source/layout/core/container \ + toolkit/source/layout/core/dialogbuttonhbox \ + toolkit/source/layout/core/factory \ + toolkit/source/layout/core/flow \ + toolkit/source/layout/core/helper \ + toolkit/source/layout/core/import \ + toolkit/source/layout/core/localized-string \ + toolkit/source/layout/core/proplist \ + toolkit/source/layout/core/root \ + toolkit/source/layout/core/table \ + toolkit/source/layout/core/timer \ + toolkit/source/layout/core/translate \ + toolkit/source/layout/core/vcl \ + toolkit/source/layout/vcl/wbutton \ + toolkit/source/layout/vcl/wcontainer \ + toolkit/source/layout/vcl/wfield \ + toolkit/source/layout/vcl/wrapper \ +)) + +ifeq ($(GUIBASE),aqua) +$(eval $(call gb_Library_set_cxxflags,tk,\ + $$(CXXFLAGS) $(gb_OBJCXXFLAGS))) +endif + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,tk,\ + X11 \ + dl \ + m \ + pthread \ +)) +endif +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,tk,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + mingwex \ + kernel32 \ + msvcrt \ +)) +else +$(eval $(call gb_Library_add_linked_libs,tk,\ + kernel32 \ + msvcrt \ + uwinapi \ +)) +endif +endif +# vim: set noet sw=4 ts=4: diff --git a/toolkit/Makefile b/toolkit/Makefile new file mode 100644 index 000000000000..a79aff831024 --- /dev/null +++ b/toolkit/Makefile @@ -0,0 +1,38 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif + +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk + +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) + +# vim: set noet sw=4 ts=4: diff --git a/toolkit/Module_toolkit.mk b/toolkit/Module_toolkit.mk new file mode 100644 index 000000000000..666fd44a6db3 --- /dev/null +++ b/toolkit/Module_toolkit.mk @@ -0,0 +1,38 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Module_Module,toolkit)) + +$(eval $(call gb_Module_add_targets,toolkit,\ + AllLangResTarget_tk \ + Library_tk \ + Package_inc \ + Package_source \ + Package_util \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/toolkit/Package_inc.mk b/toolkit/Package_inc.mk new file mode 100644 index 000000000000..3fc23a5b9f1f --- /dev/null +++ b/toolkit/Package_inc.mk @@ -0,0 +1,68 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,toolkit_inc,$(SRCDIR)/toolkit/inc)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/layout/layout-post.hxx,layout/layout-post.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/layout/layout-pre.hxx,layout/layout-pre.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/layout/layout.hxx,layout/layout.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxaccessiblecomponent.hxx,toolkit/awt/vclxaccessiblecomponent.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxcontainer.hxx,toolkit/awt/vclxcontainer.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxdevice.hxx,toolkit/awt/vclxdevice.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxfont.hxx,toolkit/awt/vclxfont.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxmenu.hxx,toolkit/awt/vclxmenu.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxsystemdependentwindow.hxx,toolkit/awt/vclxsystemdependentwindow.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxtoolkit.hxx,toolkit/awt/vclxtoolkit.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxtopwindow.hxx,toolkit/awt/vclxtopwindow.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxwindow.hxx,toolkit/awt/vclxwindow.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/awt/vclxwindows.hxx,toolkit/awt/vclxwindows.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/controls/unocontrol.hxx,toolkit/controls/unocontrol.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/controls/unocontrolbase.hxx,toolkit/controls/unocontrolbase.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/controls/unocontrolmodel.hxx,toolkit/controls/unocontrolmodel.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/controls/unocontrols.hxx,toolkit/controls/unocontrols.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/dllapi.h,toolkit/dllapi.h)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/accessibilityclient.hxx,toolkit/helper/accessibilityclient.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/accessiblefactory.hxx,toolkit/helper/accessiblefactory.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/convert.hxx,toolkit/helper/convert.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/emptyfontdescriptor.hxx,toolkit/helper/emptyfontdescriptor.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/externallock.hxx,toolkit/helper/externallock.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/fixedhyperbase.hxx,toolkit/helper/fixedhyperbase.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/formpdfexport.hxx,toolkit/helper/formpdfexport.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/imagealign.hxx,toolkit/helper/imagealign.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/listenermultiplexer.hxx,toolkit/helper/listenermultiplexer.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/macros.hxx,toolkit/helper/macros.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/mutexandbroadcasthelper.hxx,toolkit/helper/mutexandbroadcasthelper.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/mutexhelper.hxx,toolkit/helper/mutexhelper.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/property.hxx,toolkit/helper/property.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/servicenames.hxx,toolkit/helper/servicenames.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/solarrelease.hxx,toolkit/helper/solarrelease.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/throbberimpl.hxx,toolkit/helper/throbberimpl.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/tkresmgr.hxx,toolkit/helper/tkresmgr.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/unomemorystream.hxx,toolkit/helper/unomemorystream.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/unopropertyarrayhelper.hxx,toolkit/helper/unopropertyarrayhelper.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/unowrapper.hxx,toolkit/helper/unowrapper.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/helper/vclunohelper.hxx,toolkit/helper/vclunohelper.hxx)) +$(eval $(call gb_Package_add_file,toolkit_inc,inc/toolkit/unohlp.hxx,toolkit/helper/vclunohelper.hxx)) diff --git a/toolkit/Package_source.mk b/toolkit/Package_source.mk new file mode 100644 index 000000000000..41f46138df2b --- /dev/null +++ b/toolkit/Package_source.mk @@ -0,0 +1,47 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,toolkit_source,$(SRCDIR)/toolkit/source)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/bin.hxx,layout/core/bin.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/box-base.hxx,layout/core/box-base.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/box.hxx,layout/core/box.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/container.hxx,layout/core/container.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/dialogbuttonhbox.hxx,layout/core/dialogbuttonhbox.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/factory.hxx,layout/core/factory.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/flow.hxx,layout/core/flow.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/helper.hxx,layout/core/helper.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/import.hxx,layout/core/import.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/localized-string.hxx,layout/core/localized-string.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/precompiled_xmlscript.hxx,layout/core/precompiled_xmlscript.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/proplist.hxx,layout/core/proplist.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/root.hxx,layout/core/root.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/table.hxx,layout/core/table.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/timer.hxx,layout/core/timer.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/translate.hxx,layout/core/translate.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/core/vcl.hxx,layout/core/vcl.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/layout/vcl/wrapper.hxx,layout/vcl/wrapper.hxx)) +$(eval $(call gb_Package_add_file,toolkit_source,inc/toolkit/awt/vclxdialog.hxx,awt/vclxdialog.hxx)) diff --git a/toolkit/Package_util.mk b/toolkit/Package_util.mk new file mode 100644 index 000000000000..990248eb142d --- /dev/null +++ b/toolkit/Package_util.mk @@ -0,0 +1,29 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2009 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,toolkit_util,$(SRCDIR)/toolkit/util)) +$(eval $(call gb_Package_add_file,toolkit_util,xml/toolkit.xml,toolkit.xml)) diff --git a/toolkit/inc/layout/layout.hxx b/toolkit/inc/layout/layout.hxx index 5d013e8a74c4..b4b219b850e2 100644 --- a/toolkit/inc/layout/layout.hxx +++ b/toolkit/inc/layout/layout.hxx @@ -38,9 +38,9 @@ #include <tools/string.hxx> #include <vcl/bitmap.hxx> #include <vcl/combobox.h> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include <vcl/lstbox.h> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> class Button; class ComboBox; diff --git a/toolkit/inc/makefile.mk b/toolkit/inc/makefile.mk deleted file mode 100644 index 41100071a4d8..000000000000 --- a/toolkit/inc/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=.. - -PRJNAME=toolkit -TARGET=inc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" - diff --git a/toolkit/inc/pch/precompiled_toolkit.hxx b/toolkit/inc/pch/precompiled_toolkit.hxx index d0baff3b8343..77be02429484 100644 --- a/toolkit/inc/pch/precompiled_toolkit.hxx +++ b/toolkit/inc/pch/precompiled_toolkit.hxx @@ -327,7 +327,7 @@ #include "vcl/gradient.hxx" #include "vcl/image.hxx" #include "vcl/jobset.hxx" -#include "vcl/mapunit.hxx" +#include "tools/mapunit.hxx" #include "vcl/menu.hxx" #include "vcl/metric.hxx" #include "vcl/outdev.hxx" diff --git a/toolkit/inc/toolkit/awt/vclxtoolkit.hxx b/toolkit/inc/toolkit/awt/vclxtoolkit.hxx index 3f37ac58200f..31de39bf1fc3 100644 --- a/toolkit/inc/toolkit/awt/vclxtoolkit.hxx +++ b/toolkit/inc/toolkit/awt/vclxtoolkit.hxx @@ -41,7 +41,7 @@ #include <osl/mutex.hxx> #include <osl/module.h> #include <tools/link.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <toolkit/dllapi.h> diff --git a/toolkit/inc/toolkit/helper/vclunohelper.hxx b/toolkit/inc/toolkit/helper/vclunohelper.hxx index cc11f3a586bb..fc35c480d854 100644 --- a/toolkit/inc/toolkit/helper/vclunohelper.hxx +++ b/toolkit/inc/toolkit/helper/vclunohelper.hxx @@ -64,8 +64,8 @@ namespace com { namespace sun { namespace star { namespace awt { #include <vcl/bitmapex.hxx> #include <vcl/region.hxx> #include <vcl/metric.hxx> -#include <vcl/mapunit.hxx> -#include <vcl/fldunit.hxx> +#include <tools/mapunit.hxx> +#include <tools/fldunit.hxx> #include <tools/poly.hxx> class Window; diff --git a/toolkit/prj/build.lst b/toolkit/prj/build.lst index f4854de8e0c4..b851421c6f8e 100644 --- a/toolkit/prj/build.lst +++ b/toolkit/prj/build.lst @@ -1,22 +1,3 @@ -ti toolkit : vcl NULL -ti toolkit usr1 - all ti_mkout NULL -ti toolkit\prj get - all ti_prj NULL -ti toolkit\inc nmake - all ti_inc NULL -ti toolkit\uiconfig\layout nmake - all ti_uiconfig_layout NULL -ti toolkit\source\helper nmake - all ti_helper ti_inc NULL -ti toolkit\source\awt nmake - all ti_awt ti_inc NULL -ti toolkit\source\controls nmake - all ti_controls ti_inc NULL -ti toolkit\source\controls\tree nmake - all ti_tree NULL -ti toolkit\source\controls\grid nmake - all ti_grid NULL -ti toolkit\source\layout\core nmake - all ti_layout_core NULL -ti toolkit\source\layout\vcl nmake - all ti_layout_vcl NULL -ti toolkit\util nmake - all ti_util ti_awt ti_controls ti_layout_core ti_helper ti_tree ti_grid ti_layout_vcl NULL - -ti toolkit\qa\unoapi nmake - all ti_qa_unoapi NULL - - -# fail on unxsoli4 -#ti toolkit\qa\complex\xunitconversion nmake - all ti_complex_conv ti_util NULL - -# fails -# ti toolkit\qa\complex\toolkit nmake - all ti_complex_ti ti_qa_complex_toolkit_interface_tests ti_util NULL +ti toolkit : LIBXSLT:libxslt vcl NULL +ti toolkit\prj nmake - all ti_prj NULL +ti toolkit\qa\unoapi nmake - all ti_qa_unoapi NULL diff --git a/toolkit/prj/d.lst b/toolkit/prj/d.lst index 01eb5026e401..e69de29bb2d1 100644 --- a/toolkit/prj/d.lst +++ b/toolkit/prj/d.lst @@ -1,66 +0,0 @@ -mkdir: %COMMON_DEST%\bin%_EXT%\hid -mkdir: %_DEST%\inc%_EXT%\toolkit -mkdir: %_DEST%\inc%_EXT%\toolkit\helper -mkdir: %_DEST%\inc%_EXT%\toolkit\awt -mkdir: %_DEST%\inc%_EXT%\toolkit\controls - -..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid -..\%__SRC%\lib\itk.lib %_DEST%\lib%_EXT%\itk.lib -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT% -..\%__SRC%\lib\*.sl %_DEST%\lib%_EXT%\*.sl -..\%__SRC%\lib\*.a %_DEST%\lib%_EXT%\*.a -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib -..\%__SRC%\bin\tk*.res %_DEST%\bin%_EXT%\tk*res -..\%__SRC%\bin\tk?????.sym %_DEST%\bin%_EXT%\tk?????.sym -..\%__SRC%\bin\tk?????.dll %_DEST%\bin%_EXT%\tk?????.dll -..\%__SRC%\misc\tk?????.map %_DEST%\bin%_EXT%\tk?????.map - -..\util\toolkit.xml %_DEST%\xml%_EXT%\toolkit.xml - -..\inc\toolkit\awt\vclxaccessiblecomponent.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxaccessiblecomponent.hxx -..\inc\toolkit\awt\vclxcontainer.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxcontainer.hxx -..\inc\toolkit\awt\vclxdevice.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxdevice.hxx -..\inc\toolkit\awt\vclxfont.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxfont.hxx -..\inc\toolkit\awt\vclxtopwindow.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxtopwindow.hxx -..\inc\toolkit\awt\vclxtoolkit.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxtoolkit.hxx -..\inc\toolkit\awt\vclxwindow.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxwindow.hxx -..\inc\toolkit\awt\vclxsystemdependentwindow.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxsystemdependentwindow.hxx -..\source\awt\vclxdialog.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxdialog.hxx -..\inc\toolkit\awt\vclxwindows.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxwindows.hxx -..\inc\toolkit\awt\vclxmenu.hxx %_DEST%\inc%_EXT%\toolkit\awt\vclxmenu.hxx - -..\inc\toolkit\controls\unocontrol.hxx %_DEST%\inc%_EXT%\toolkit\controls\unocontrol.hxx -..\inc\toolkit\controls\unocontrols.hxx %_DEST%\inc%_EXT%\toolkit\controls\unocontrols.hxx -..\inc\toolkit\controls\unocontrolmodel.hxx %_DEST%\inc%_EXT%\toolkit\controls\unocontrolmodel.hxx -..\inc\toolkit\controls\unocontrolbase.hxx %_DEST%\inc%_EXT%\toolkit\controls\unocontrolbase.hxx -..\inc\toolkit\helper\servicenames.hxx %_DEST%\inc%_EXT%\toolkit\helper\servicenames.hxx - -..\inc\toolkit\helper\emptyfontdescriptor.hxx %_DEST%\inc%_EXT%\toolkit\helper\emptyfontdescriptor.hxx -..\inc\toolkit\helper\vclunohelper.hxx %_DEST%\inc%_EXT%\toolkit\helper\vclunohelper.hxx -..\inc\toolkit\helper\convert.hxx %_DEST%\inc%_EXT%\toolkit\helper\convert.hxx -..\inc\toolkit\helper\property.hxx %_DEST%\inc%_EXT%\toolkit\helper\property.hxx -..\inc\toolkit\helper\macros.hxx %_DEST%\inc%_EXT%\toolkit\helper\macros.hxx -..\inc\toolkit\helper\mutexhelper.hxx %_DEST%\inc%_EXT%\toolkit\helper\mutexhelper.hxx -..\inc\toolkit\helper\mutexandbroadcasthelper.hxx %_DEST%\inc%_EXT%\toolkit\helper\mutexandbroadcasthelper.hxx -..\inc\toolkit\helper\listenermultiplexer.hxx %_DEST%\inc%_EXT%\toolkit\helper\listenermultiplexer.hxx -..\inc\toolkit\helper\unowrapper.hxx %_DEST%\inc%_EXT%\toolkit\helper\unowrapper.hxx -..\inc\toolkit\helper\externallock.hxx %_DEST%\inc%_EXT%\toolkit\helper\externallock.hxx -..\inc\toolkit\helper\formpdfexport.hxx %_DEST%\inc%_EXT%\toolkit\helper/formpdfexport.hxx -..\inc\toolkit\helper\accessiblefactory.hxx %_DEST%\inc%_EXT%\toolkit\helper\accessiblefactory.hxx -..\inc\toolkit\helper\fixedhyperbase.hxx %_DEST%\inc%_EXT%\toolkit\helper\fixedhyperbase.hxx -..\inc\toolkit\helper\unopropertyarrayhelper.hxx %_DEST%\inc%_EXT%\toolkit\helper\unopropertyarrayhelper.hxx - -..\inc\toolkit\helper\vclunohelper.hxx %_DEST%\inc%_EXT%\toolkit\unohlp.hxx -..\inc\toolkit\dllapi.h %_DEST%\inc%_EXT%\toolkit\dllapi.h - -mkdir: %_DEST%\inc%_EXT%\layout -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib - -..\inc\layout\*.hxx %_DEST%\inc%_EXT%\layout\*.hxx -mkdir: %_DEST%\inc%_EXT%\layout\core -..\source\layout\core\*.hxx %_DEST%\inc%_EXT%\layout\core\*.hxx -mkdir: %_DEST%\inc%_EXT%\layout\vcl -..\source\layout\vcl\*.hxx %_DEST%\inc%_EXT%\layout\vcl\*.hxx - -..\%__SRC%\bin\*-layout.zip %_DEST%\pck%_EXT%\*.* -..\%__SRC%\misc\tk.component %_DEST%\xml%_EXT%\tk.component diff --git a/svtools/source/filter.vcl/ixpm/makefile.mk b/toolkit/prj/makefile.mk index 98f93290d325..c73a3d944bbf 100644 --- a/svtools/source/filter.vcl/ixpm/makefile.mk +++ b/toolkit/prj/makefile.mk @@ -25,19 +25,16 @@ # #************************************************************************* -PRJ=..$/..$/.. +PRJ=.. +TARGET=prj -PRJNAME=svtools -TARGET=ixpm +.INCLUDE : settings.mk -# --- Settings ----------------------------------------------------- +.IF "$(VERBOSE)"!="" +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk -SOLARINC+=-I../../inc - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/xpmread.obj - -.INCLUDE : target.mk +all: + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) diff --git a/toolkit/qa/complex/toolkit/interface_tests/makefile.mk b/toolkit/qa/complex/toolkit/interface_tests/makefile.mk deleted file mode 100755 index 7d8c4c951d4e..000000000000 --- a/toolkit/qa/complex/toolkit/interface_tests/makefile.mk +++ /dev/null @@ -1,57 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = ../../../.. -TARGET = Toolkit -PRJNAME = $(TARGET) -PACKAGE = complex/toolkit/interface_tests - -# --- Settings ----------------------------------------------------- -.INCLUDE: settings.mk - - -#----- compile .java files ----------------------------------------- - -JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar -JAVAFILES = _XAccessibleComponent.java \ - _XAccessibleContext.java \ - _XAccessibleExtendedComponent.java \ - _XAccessibleEventBroadcaster.java \ - _XAccessibleText.java \ - _XRequestCallback.java -JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)/$(PACKAGE)/$(i:b).class) - -# --- Targets ------------------------------------------------------ - -.IF "$(depend)" == "" -ALL : ALLTAR -.ELSE -ALL: ALLDEP -.ENDIF - -.INCLUDE : target.mk - diff --git a/toolkit/qa/complex/toolkit/makefile.mk b/toolkit/qa/complex/toolkit/makefile.mk deleted file mode 100755 index 70918d602624..000000000000 --- a/toolkit/qa/complex/toolkit/makefile.mk +++ /dev/null @@ -1,120 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = toolkit -TARGET = qa_complex_toolkit - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/toolkit - -JAVATESTFILES = CheckAccessibleStatusBar.java \ - CheckAccessibleStatusBarItem.java \ - CheckAsyncCallback.java \ - CallbackClass.java - -JAVAFILES = $(JAVATESTFILES) \ - _XAccessibleComponent.java \ - _XAccessibleContext.java \ - _XAccessibleEventBroadcaster.java \ - _XAccessibleExtendedComponent.java \ - _XAccessibleText.java \ - _XRequestCallback.java - -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) - -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END - - -# PRJ = ..$/..$/.. -# TARGET = Toolkit -# PRJNAME = $(TARGET) -# PACKAGE = complex$/toolkit -# -# # --- Settings ----------------------------------------------------- -# .INCLUDE: settings.mk -# -# -# #----- compile .java files ----------------------------------------- -# -# JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar -# JAVAFILES = CheckAccessibleStatusBar.java CheckAccessibleStatusBarItem.java CheckAsyncCallback.java CallbackClass.java -# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) -# SUBDIRS = interface_tests -# -# #----- make a jar from compiled files ------------------------------ -# -# MAXLINELENGTH = 100000 -# -# JARCLASSDIRS = $(PACKAGE) -# JARTARGET = $(TARGET).jar -# JARCOMPRESS = TRUE -# -# # --- Parameters for the test -------------------------------------- -# -# # start an office if the parameter is set for the makefile -# .IF "$(OFFICE)" == "" -# CT_APPEXECCOMMAND = -# .ELSE -# CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;" -# .ENDIF -# -# # test base is java complex -# CT_TESTBASE = -tb java_complex -# -# # build up package name with "." instead of $/ -# CT_PACKAGE = -o $(PACKAGE:s\$/\.\) -# -# # start the runner application -# CT_APP = org.openoffice.Runner -# -# # --- Targets ------------------------------------------------------ -# -# .INCLUDE : target.mk -# -# run: \ -# CheckAccessibleStatusBarItem -# -# CheckAccessibleStatusBar: -# +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_PACKAGE).CheckAccessibleStatusBar -# -# CheckAccessibleStatusBarItem: -# +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) $(CT_PACKAGE).CheckAccessibleStatusBarItem -# diff --git a/toolkit/qa/complex/xunitconversion/makefile.mk b/toolkit/qa/complex/xunitconversion/makefile.mk deleted file mode 100644 index bc5a0e7c5949..000000000000 --- a/toolkit/qa/complex/xunitconversion/makefile.mk +++ /dev/null @@ -1,52 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -.IF "$(OOO_SUBSEQUENT_TESTS)" == "" -nothing .PHONY: -.ELSE - -PRJ = ../../.. -PRJNAME = sc -TARGET = qa_complex_xunitconversiontest - -.IF "$(OOO_JUNIT_JAR)" != "" -PACKAGE = complex/xunitconversion - -JAVATESTFILES = \ - XUnitConversionTest.java -JAVAFILES = $(JAVATESTFILES) -JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar -EXTRAJARFILES = $(OOO_JUNIT_JAR) -.END - -.INCLUDE: settings.mk -.INCLUDE: target.mk -.INCLUDE: installationtest.mk - -ALLTAR : javatest - -.END diff --git a/toolkit/qa/unoapi/knownissues.xcl b/toolkit/qa/unoapi/knownissues.xcl index 8df098a98c63..273b4b72dbe2 100644 --- a/toolkit/qa/unoapi/knownissues.xcl +++ b/toolkit/qa/unoapi/knownissues.xcl @@ -178,7 +178,6 @@ toolkit.UnoControlDialogModel::com::sun::star::lang::XComponent toolkit.UnoControlFileControlModel::com::sun::star::lang::XComponent toolkit.UnoControlGroupBox::com::sun::star::lang::XComponent toolkit.UnoControlContainer::com::sun::star::lang::XComponent -toolkit.MutableTreeDataModel::com::sun::star::lang::XComponent toolkit.UnoControlFixedText::com::sun::star::lang::XComponent toolkit.UnoControlListBox::com::sun::star::lang::XComponent toolkit.UnoControlCheckBoxModel::com::sun::star::lang::XComponent diff --git a/toolkit/source/awt/makefile.mk b/toolkit/source/awt/makefile.mk deleted file mode 100644 index 88b40a597410..000000000000 --- a/toolkit/source/awt/makefile.mk +++ /dev/null @@ -1,84 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=toolkit -TARGET=awt - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(GUIBASE)"=="aqua" -CFLAGSCXX+=$(OBJCXXFLAGS) -.ENDIF # "$(GUIBASE)"=="aqua" - -SLOFILES= \ - $(SLO)$/stylesettings.obj \ - $(SLO)$/vclxaccessiblecomponent.obj \ - $(SLO)$/vclxbitmap.obj \ - $(SLO)$/vclxcontainer.obj \ - $(SLO)$/vclxdevice.obj \ - $(SLO)$/vclxfont.obj \ - $(SLO)$/vclxgraphics.obj \ - $(SLO)$/vclxmenu.obj \ - $(SLO)$/vclxpointer.obj \ - $(SLO)$/vclxprinter.obj \ - $(SLO)$/vclxregion.obj \ - $(SLO)$/vclxsystemdependentwindow.obj \ - $(SLO)$/vclxtoolkit.obj \ - $(SLO)$/vclxtopwindow.obj \ - $(SLO)$/vclxwindow.obj \ - $(SLO)$/vclxwindow1.obj \ - $(SLO)$/vclxwindows.obj \ - $(SLO)$/vclxspinbutton.obj \ - $(SLO)$/xsimpleanimation.obj \ - $(SLO)$/xthrobber.obj \ - $(SLO)$/asynccallback.obj\ - $(SLO)/vclxbutton.obj\ - $(SLO)/vclxdialog.obj\ - $(SLO)/vclxfixedline.obj\ - $(SLO)/vclxplugin.obj\ - $(SLO)/vclxscroller.obj\ - $(SLO)/vclxsplitter.obj\ - $(SLO)/vclxtabcontrol.obj\ - $(SLO)/vclxtabpage.obj - -SRS1NAME=$(TARGET) -SRC1FILES=\ - xthrobber.src - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/toolkit/source/awt/vclxplugin.hxx b/toolkit/source/awt/vclxplugin.hxx index 49a2b2950854..2b42eecc5872 100644 --- a/toolkit/source/awt/vclxplugin.hxx +++ b/toolkit/source/awt/vclxplugin.hxx @@ -29,7 +29,7 @@ #define LAYOUT_AWT_VCLXPLUGIN_HXX #include <toolkit/awt/vclxwindow.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> class Control; namespace layoutimpl diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 06c9167336a8..6c6b9dc4b2c8 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -173,7 +173,7 @@ namespace toolkit _pWindow->SetStyle( nStyle ); } - static void setVisualEffect( const Any& _rValue, Window* _pWindow, void (StyleSettings::*pSetter)( USHORT ), sal_Int16 _nFlatBits, sal_Int16 _n3DBits ) + static void setVisualEffect( const Any& _rValue, Window* _pWindow ) { AllSettings aSettings = _pWindow->GetSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings(); @@ -183,22 +183,22 @@ namespace toolkit switch ( nStyle ) { case FLAT: - (aStyleSettings.*pSetter)( _nFlatBits ); + aStyleSettings.SetOptions( aStyleSettings.GetOptions() & ~STYLE_OPTION_MONO ); break; case LOOK3D: default: - (aStyleSettings.*pSetter)( _n3DBits ); + aStyleSettings.SetOptions( aStyleSettings.GetOptions() | STYLE_OPTION_MONO ); } aSettings.SetStyleSettings( aStyleSettings ); _pWindow->SetSettings( aSettings ); } - static Any getVisualEffect( Window* _pWindow, USHORT (StyleSettings::*pGetter)( ) const, sal_Int16 _nFlatBits ) + static Any getVisualEffect( Window* _pWindow ) { Any aEffect; StyleSettings aStyleSettings = _pWindow->GetSettings().GetStyleSettings(); - if ( (aStyleSettings.*pGetter)() == _nFlatBits ) + if ( (aStyleSettings.GetOptions() & STYLE_OPTION_MONO) ) aEffect <<= (sal_Int16)FLAT; else aEffect <<= (sal_Int16)LOOK3D; @@ -961,7 +961,7 @@ void VCLXCheckBox::setProperty( const ::rtl::OUString& PropertyName, const ::com switch ( nPropType ) { case BASEPROPERTY_VISUALEFFECT: - ::toolkit::setVisualEffect( Value, pCheckBox, &StyleSettings::SetCheckBoxStyle, STYLE_CHECKBOX_MONO, STYLE_CHECKBOX_WIN ); + ::toolkit::setVisualEffect( Value, pCheckBox ); break; case BASEPROPERTY_TRISTATE: @@ -998,7 +998,7 @@ void VCLXCheckBox::setProperty( const ::rtl::OUString& PropertyName, const ::com switch ( nPropType ) { case BASEPROPERTY_VISUALEFFECT: - aProp = ::toolkit::getVisualEffect( pCheckBox, &StyleSettings::GetCheckBoxStyle, STYLE_CHECKBOX_MONO ); + aProp = ::toolkit::getVisualEffect( pCheckBox ); break; case BASEPROPERTY_TRISTATE: aProp <<= (sal_Bool)pCheckBox->IsTriStateEnabled(); @@ -1133,7 +1133,7 @@ void VCLXRadioButton::setProperty( const ::rtl::OUString& PropertyName, const :: switch ( nPropType ) { case BASEPROPERTY_VISUALEFFECT: - ::toolkit::setVisualEffect( Value, pButton, &StyleSettings::SetRadioButtonStyle, STYLE_RADIOBUTTON_MONO, STYLE_RADIOBUTTON_WIN ); + ::toolkit::setVisualEffect( Value, pButton ); break; case BASEPROPERTY_STATE: @@ -1176,7 +1176,7 @@ void VCLXRadioButton::setProperty( const ::rtl::OUString& PropertyName, const :: switch ( nPropType ) { case BASEPROPERTY_VISUALEFFECT: - aProp = ::toolkit::getVisualEffect( pButton, &StyleSettings::GetRadioButtonStyle, STYLE_RADIOBUTTON_MONO ); + aProp = ::toolkit::getVisualEffect( pButton ); break; case BASEPROPERTY_STATE: aProp <<= (sal_Int16) ( pButton->IsChecked() ? 1 : 0 ); diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx b/toolkit/source/controls/grid/defaultgriddatamodel.cxx index 7ffafdf0ddb6..adc40b0426d7 100644 --- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx +++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx @@ -198,7 +198,7 @@ void SAL_CALL DefaultGridDataModel::removeRow(::sal_Int32 index) throw (::com::s ::rtl::OUString headerName( (::rtl::OUString) rowHeaders[index] ); rowHeaders.erase(rowHeaders.begin() + index); - Sequence< Any >& rowData ( (Sequence< Any >&)data[index] ); + Sequence< Any > rowData ( (Sequence< Any >&)data[index] ); data.erase(data.begin() + index); broadcast_remove( index, headerName, rowData); } @@ -241,7 +241,7 @@ void SAL_CALL DefaultGridDataModel::removeAll() throw (RuntimeException) { rowHeaders.clear(); data.clear(); - broadcast_remove( -1, ::rtl::OUString(), 0); + broadcast_remove( -1, ::rtl::OUString(), Sequence< Any >()); } //--------------------------------------------------------------------- void SAL_CALL DefaultGridDataModel::setRowHeaderWidth(sal_Int32 _value) throw (::com::sun::star::uno::RuntimeException) diff --git a/toolkit/source/controls/grid/makefile.mk b/toolkit/source/controls/grid/makefile.mk deleted file mode 100644 index 70bfc34b9d02..000000000000 --- a/toolkit/source/controls/grid/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=toolkit -TARGET=grid - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/gridcontrol.obj\ - $(SLO)$/defaultgriddatamodel.obj\ - $(SLO)$/defaultgridcolumnmodel.obj\ - $(SLO)$/gridcolumn.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/toolkit/source/controls/makefile.mk b/toolkit/source/controls/makefile.mk deleted file mode 100644 index 1ce9f7b22c8c..000000000000 --- a/toolkit/source/controls/makefile.mk +++ /dev/null @@ -1,66 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=toolkit -TARGET=controls - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/accessiblecontrolcontext.obj \ - $(SLO)$/geometrycontrolmodel.obj \ - $(SLO)$/eventcontainer.obj \ - $(SLO)$/stdtabcontroller.obj \ - $(SLO)$/stdtabcontrollermodel.obj \ - $(SLO)$/unocontrol.obj \ - $(SLO)$/unocontrolbase.obj \ - $(SLO)$/unocontrolcontainer.obj \ - $(SLO)$/unocontrolcontainermodel.obj \ - $(SLO)$/unocontrolmodel.obj \ - $(SLO)$/unocontrols.obj \ - $(SLO)$/formattedcontrol.obj \ - $(SLO)$/roadmapcontrol.obj \ - $(SLO)$/roadmapentry.obj \ - $(SLO)$/dialogcontrol.obj \ - $(SLO)$/tkscrollbar.obj \ - $(SLO)$/tkspinbutton.obj \ - $(SLO)$/tksimpleanimation.obj \ - $(SLO)$/tkthrobber.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/toolkit/source/controls/tree/makefile.mk b/toolkit/source/controls/tree/makefile.mk deleted file mode 100644 index 4e72b62b416b..000000000000 --- a/toolkit/source/controls/tree/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=toolkit -TARGET=tree - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/treecontrol.obj\ - $(SLO)$/treedatamodel.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/toolkit/source/helper/makefile.mk b/toolkit/source/helper/makefile.mk deleted file mode 100644 index bf10b0aa0178..000000000000 --- a/toolkit/source/helper/makefile.mk +++ /dev/null @@ -1,64 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=toolkit -TARGET=helper - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/listenermultiplexer.obj \ - $(SLO)$/property.obj \ - $(SLO)$/registerservices.obj \ - $(SLO)$/servicenames.obj \ - $(SLO)$/tkresmgr.obj \ - $(SLO)$/unomemorystream.obj \ - $(SLO)$/unopropertyarrayhelper.obj \ - $(SLO)$/unowrapper.obj \ - $(SLO)$/vclunohelper.obj \ - $(SLO)$/externallock.obj \ - $(SLO)$/imagealign.obj \ - $(SLO)$/throbberimpl.obj \ - $(SLO)$/formpdfexport.obj \ - $(SLO)$/accessibilityclient.obj \ - $(SLO)$/fixedhyperbase.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/toolkit/source/layout/core/makefile.mk b/toolkit/source/layout/core/makefile.mk deleted file mode 100644 index 2c90921799af..000000000000 --- a/toolkit/source/layout/core/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=../../.. -PRJNAME=toolkit -TARGET=layout-core -ENABLE_EXCEPTIONS=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -# FIXME: This is bad, hmkay -CFLAGS+= -I$(PRJ)/source - -SLOFILES= \ - $(SLO)$/bin.obj \ - $(SLO)$/box-base.obj \ - $(SLO)$/box.obj \ - $(SLO)$/byteseq.obj \ - $(SLO)$/container.obj \ - $(SLO)$/dialogbuttonhbox.obj \ - $(SLO)$/factory.obj \ - $(SLO)$/flow.obj \ - $(SLO)$/helper.obj \ - $(SLO)$/import.obj \ - $(SLO)$/localized-string.obj \ - $(SLO)$/proplist.obj \ - $(SLO)$/root.obj \ - $(SLO)$/table.obj \ - $(SLO)$/timer.obj \ - $(SLO)$/translate.obj\ - $(SLO)$/vcl.obj\ -# - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/toolkit/source/layout/vcl/makefile.mk b/toolkit/source/layout/vcl/makefile.mk deleted file mode 100644 index 529ddc31d97e..000000000000 --- a/toolkit/source/layout/vcl/makefile.mk +++ /dev/null @@ -1,52 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=../../.. -PRJNAME=toolkit -TARGET=layout-vcl -ENABLE_EXCEPTIONS=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -.IF "$(COMNAME)" == "gcc3" -CFLAGS+=-Wall -fno-default-inline -.ENDIF - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/wrapper.obj \ - $(SLO)$/wbutton.obj \ - $(SLO)$/wcontainer.obj \ - $(SLO)$/wfield.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/toolkit/src2xml/src-sw.lst b/toolkit/src2xml/src-sw.lst index 8d43400462d8..a0e7245fc4f4 100644 --- a/toolkit/src2xml/src-sw.lst +++ b/toolkit/src2xml/src-sw.lst @@ -51,7 +51,6 @@ ../../sw/source/ui/fldui/DropDownFieldDialog.src ../../sw/source/ui/fldui/fldui.src ../../sw/source/ui/fmtui/tmpdlg.src -../../sw/source/ui/fmtui/fmtui.src ../../sw/source/ui/index/cnttab.src ../../sw/source/ui/index/multmrk.src ../../sw/source/ui/index/idxmrk.src diff --git a/toolkit/src2xml/src.lst b/toolkit/src2xml/src.lst index 4a5876b84a08..a402a6b633c9 100644 --- a/toolkit/src2xml/src.lst +++ b/toolkit/src2xml/src.lst @@ -170,7 +170,6 @@ ../../sw/source/ui/fldui/DropDownFieldDialog.src ../../sw/source/ui/fldui/fldui.src ../../sw/source/ui/fmtui/tmpdlg.src -../../sw/source/ui/fmtui/fmtui.src ../../sw/source/ui/index/cnttab.src ../../sw/source/ui/index/multmrk.src ../../sw/source/ui/index/idxmrk.src diff --git a/toolkit/test/accessibility/makefile.mk b/toolkit/test/accessibility/makefile.mk deleted file mode 100644 index cc6f410f7404..000000000000 --- a/toolkit/test/accessibility/makefile.mk +++ /dev/null @@ -1,127 +0,0 @@ -# This is the dmake version. - -# copied from settings.mk -SOLARBINDIR=$(SOLARVERSION)$/$(INPATH)$/bin$(UPDMINOREXT) - -# Please modify the following lines to match your environment: -# If you use the run: target at the end of the file, then adapt port number. -PORT_NUMBER = 5678 - -# The following variables probably don't need to be changed. -JAVAC = javac -JAVA = java -# The JAR_PATH points to the jar files of your local office installation. -JAR_PATH = $(SOLARBINDIR)$/ - - -# The rest of this makefile should not need to be touched. - -all : AccessibilityWorkBench - -JAR_FILES = \ - unoil.jar \ - ridl.jar \ - jurt.jar \ - juh.jar \ - java_uno.jar - -JAVA_FILES = \ - AccTreeNode.java \ - AccessibilityTree.java \ - AccessibilityTreeModel.java \ - AccessibilityTreeModelBase.java \ - AccessibilityWorkBench.java \ - AccessibleActionHandler.java \ - AccessibleActionNode.java \ - AccessibleCellHandler.java \ - AccessibleComponentHandler.java \ - AccessibleContextHandler.java \ - AccessibleEditableTextHandler.java \ - AccessibleExtendedComponentHandler.java \ - AccessibleHyperlinkHandler.java \ - AccessibleHypertextHandler.java \ - AccessibleImageHandler.java \ - AccessibleRelationHandler.java \ - AccessibleSelectionHandler.java \ - AccessibleTableHandler.java \ - AccessibleTextHandler.java \ - AccessibleTreeCellRenderer.java \ - AccessibleTreeHandler.java \ - AccessibleTreeNode.java \ - AccessibleUNOHandler.java \ - Canvas.java \ - CanvasShape.java \ - ChildEventHandler.java \ - ContextEventHandler.java \ - EventHandler.java \ - EventListener.java \ - EventLogger.java \ - EventQueue.java \ - FrameActionListener.java \ - GeometryEventHandler.java \ - HelpWindow.java \ - InformationWriter.java \ - MessageArea.java \ - NodeFactory.java \ - NodeHandler.java \ - NodeMap.java \ - OfficeConnection.java \ - Options.java \ - QueuedListener.java \ - QueuedTopWindowListener.java \ - SelectionDialog.java \ - SimpleOffice.java \ - StringNode.java \ - TableEventHandler.java \ - TextLogger.java \ - TextUpdateListener.java \ - TopWindowListener.java \ - VectorNode.java - -JAVA_CLASSPATHS := \ - . \ - $(foreach,i,$(JAR_FILES) $(JAR_PATH)$i) \ - $(CLASSPATH) - -CLASSPATH !:=$(JAVA_CLASSPATHS:t$(PATH_SEPERATOR)) - -JFLAGS = -deprecation -classpath $(CLASSPATH) - -%.class : %.java - $(JAVAC) $(JFLAGS) $< - -%.class : %.java - $(JAVAC) $(JFLAGS) $< - -AccessibilityWorkBench : ObjectView Tools $(JAVA_FILES:b:+".class") - -ObjectView .SETDIR=ov : - @echo "making package ObjectView" - dmake - -Tools .SETDIR=tools : - @echo "making package Tools" - dmake - -# Remove all class files. -clean : ObjectView.clean Tools.clean - rm *.class - rm AccessibilityWorkBench.jar -ObjectView.clean .SETDIR=ov : - rm *.class -Tools.clean .SETDIR=tools : - rm *.class - -# Create a jar file of all files neccessary to build and run the work bench. -dist: AccessibilityWorkBench.jar - -AccessibilityWorkBench.jar: $(JAVA_FILES:b:+".class") jawb.mf - jar -cfm AccessibilityWorkBench.jar jawb.mf *.class ov\*.class tools\*.class - -# Example of how to run the work bench. -run: all - $(JAVA) -classpath $(CLASSPATH) AccessibilityWorkBench -p $(PORT_NUMBER) - -runjar: all dist - $(JAVA) -classpath $(CLASSPATH) -jar AccessibilityWorkBench.jar -p $(PORT_NUMBER) - diff --git a/toolkit/test/accessibility/ov/makefile.mk b/toolkit/test/accessibility/ov/makefile.mk deleted file mode 100644 index 56fb563eeee0..000000000000 --- a/toolkit/test/accessibility/ov/makefile.mk +++ /dev/null @@ -1,51 +0,0 @@ -# This is the dmake version. - -# copied from settings.mk -SOLARBINDIR=$(SOLARVERSION)$/$(INPATH)$/bin$(UPDMINOREXT) - -# Please modify the following lines to match your environment: -# If you use the run: target at the end of the file, then adapt port number. -PORT_NUMBER = 5678 - -# The following variables probably don't need to be changed. -JAVAC = javac -JAVA = java -# The JAR_PATH points to the jar files of your local office installation. -JAR_PATH = $(SOLARBINDIR)$/ - - -# The rest of this makefile should not need to be touched. - -all : ov - -JAR_FILES = \ - unoil.jar \ - ridl.jar \ - jurt.jar \ - juh.jar \ - java_uno.jar - -JAVA_FILES = \ - ov/ObjectViewContainer.java \ - ov/ObjectView.java \ - ov/ListeningObjectView.java \ - ov/ContextView.java \ - ov/FocusView.java \ - ov/SelectionView.java \ - ov/TextView.java -# ov/StateSetView.java \ - - -JAVA_CLASSPATHS := \ - . .. \ - $(foreach,i,$(JAR_FILES) $(JAR_PATH)$i) \ - $(CLASSPATH) - -CLASSPATH !:=$(JAVA_CLASSPATHS:t$(PATH_SEPERATOR)) - -JFLAGS = -deprecation -classpath $(CLASSPATH) - -%.class : %.java - $(JAVAC) $(JFLAGS) $< - -ov : $(JAVA_FILES:b:+".class") diff --git a/toolkit/test/accessibility/tools/makefile.mk b/toolkit/test/accessibility/tools/makefile.mk deleted file mode 100644 index 045ba6f65b49..000000000000 --- a/toolkit/test/accessibility/tools/makefile.mk +++ /dev/null @@ -1,42 +0,0 @@ -# copied from settings.mk -SOLARBINDIR=$(SOLARVERSION)$/$(INPATH)$/bin$(UPDMINOREXT) - -# Please modify the following lines to match your environment: -# If you use the run: target at the end of the file, then adapt port number. -PORT_NUMBER = 5678 - -# The following variables probably don't need to be changed. -JAVAC = javac -JAVA = java -# The JAR_PATH points to the jar files of your local office installation. -JAR_PATH = $(SOLARBINDIR)$/ - - -# The rest of this makefile should not need to be touched. - -all : tools - -JAR_FILES = \ - unoil.jar \ - ridl.jar \ - jurt.jar \ - juh.jar \ - java_uno.jar - -JAVA_FILES = \ - tools/NameProvider.java - - -JAVA_CLASSPATHS := \ - . .. \ - $(foreach,i,$(JAR_FILES) $(JAR_PATH)$i) \ - $(CLASSPATH) - -CLASSPATH !:=$(JAVA_CLASSPATHS:t$(PATH_SEPERATOR)) - -JFLAGS = -deprecation -classpath $(CLASSPATH) - -%.class : %.java - $(JAVAC) $(JFLAGS) $< - -tools : $(JAVA_FILES:b:+".class") diff --git a/toolkit/util/makefile.mk b/toolkit/util/makefile.mk deleted file mode 100644 index 2e9adce4f6bd..000000000000 --- a/toolkit/util/makefile.mk +++ /dev/null @@ -1,93 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -# tk.dxp should contain all c functions that have to be exported. MT 2001/11/29 - -PRJ=.. - -PRJNAME=toolkit -TARGET=tk -TARGET2=tka -USE_DEFFILE=TRUE - -# --- Settings ----------------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - - -# --- Allgemein ---------------------------------------------------------- - -# ======================================================================== -# = tk lib: the "classic" toolkit library - -LIB1TARGET= $(SLB)$/$(TARGET).lib -LIB1FILES= $(SLB)$/awt.lib \ - $(SLB)$/tree.lib \ - $(SLB)$/grid.lib \ - $(SLB)$/controls.lib \ - $(SLB)$/helper.lib\ - $(SLB)$/layout-core.lib \ - $(SLB)$/layout-vcl.lib - -SHL1TARGET= tk$(DLLPOSTFIX) -SHL1IMPLIB= itk -SHL1USE_EXPORTS=name - -SHL1STDLIBS=\ - $(VCLLIB) \ - $(UNOTOOLSLIB) \ - $(TOOLSLIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(SALLIB) - -SHL1LIBS= $(LIB1TARGET) -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -SHL1DEPN=$(LIB1TARGET) - -DEF1NAME =$(SHL1TARGET) -DEF1DEPN =$(LIB1TARGET) -DEF1DES =TK -DEFLIB1NAME =tk - -RESLIB1IMAGES=$(PRJ)$/source$/awt -RES1FILELIST=$(SRS)$/awt.srs -RESLIB1NAME=$(TARGET) -RESLIB1SRSFILES=$(RES1FILELIST) - -# --- Footer ------------------------------------------------------------- -.INCLUDE : target.mk - -ALLTAR : $(MISC)/tk.component - -$(MISC)/tk.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \ - tk.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt tk.component diff --git a/toolkit/workben/layout/makefile.mk b/toolkit/workben/layout/makefile.mk deleted file mode 100644 index 53797e5a3102..000000000000 --- a/toolkit/workben/layout/makefile.mk +++ /dev/null @@ -1,151 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=../.. -PRJNAME=toolkit -TARGET=test -TARGETTYPE=GUI -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE - -.INCLUDE : settings.mk - -.IF "$(ENABLE_LAYOUT)" == "TRUE" - -# Allow zoom and wordcount to be built without depending on svx,sv,sfx2 -CFLAGS += -I../$(PRJ)/svx/inc -I../$(PRJ)/svtools/inc -I../$(PRJ)/sfx2/inc -I../$(PRJ)/sc/inc -I../$(PRJ)/sc/source/ui/inc -I../$(PRJ)/sw/inc - -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -.IF "$(COMNAME)" == "gcc3" -CFLAGS+=-Wall -Wno-non-virtual-dtor -.ENDIF - -CXXFILES=\ - editor.cxx \ - plugin.cxx \ - recover.cxx \ - wordcountdialog.cxx \ - test.cxx \ - zoom.cxx - -OBJFILES=\ - $(OBJ)$/editor.obj \ - $(OBJ)$/plugin.obj \ - $(OBJ)$/recover.obj \ - $(OBJ)$/test.obj \ - $(OBJ)$/tpsort.obj \ - $(OBJ)$/sortdlg.obj \ - $(OBJ)$/wordcountdialog.obj \ - $(OBJ)$/zoom.obj - -APP1TARGET=$(TARGET) -APP1OBJS=$(OBJFILES) -APP1STDLIBS= \ - $(TOOLSLIB) \ - $(COMPHELPERLIB) \ - $(VCLLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(SALLIB) \ - $(XMLSCRIPTLIB) \ - $(TKLIB) \ - $(SVXLIB) \ - $(ISCLIB) \ -# - -svtools = $(INCCOM)/svtools -default: ALLTAR - -.INCLUDE : target.mk - -XML_FILES=\ - insert-sheet.xml\ - message-box.xml\ - move-copy-sheet.xml\ - recover.xml\ - sort-options.xml\ - string-input.xml\ - tab-dialog.xml\ - wordcount.xml\ - zoom.xml\ - -TRALAY=$(AUGMENT_LIBRARY_PATH) tralay -XML_LANGS=$(alllangiso) - -ALLTAR: localize.sdf $(BIN)/testrc $(svtools) $(foreach,i,$(XML_FILES) en-US/$i) - -$(XML_LANGS:f:t"/%.xml ")/%.xml: %.xml - $(TRALAY) -m localize.sdf -o . -l $(XML_LANGS:f:t" -l ") $< - rm -rf en-US - -$(BIN)/%: %.in - cp $< $@ - -$(svtools): -# FIXME: there's a bug in svtools layout or usage -# Include files are in svtools/inc, but are referenced as <svtools/..> -# They probably should be in svtools/inc/svtools -# This means that include files can only be included after svtools -# is built, which would mean a circular dependency, -# because svtools depends on toolkit. - ln -sf ..$/$(PRJ)$/svtools$/inc $(INCCOM)$/svtools - -dist .PHONY : - cp -pv message-box.xml $(PRJ)/uiconfig/layout - cp -pv tab-dialog.xml $(PRJ)/uiconfig/layout - $(SHELL) ./un-test.sh zoom.cxx > ../$(PRJ)/svx/source/dialog/zoom.cxx - $(SHELL) ./un-test.sh zoom.hxx > ../$(PRJ)/svx/source/dialog/zoom.hxx - touch ../$(PRJ)/svx/source/dialog/dlgfact.cxx - cp -pv zoom.xml ../$(PRJ)/svx/uiconfig/layout - $(SHELL) ./un-test.sh wordcountdialog.cxx > ../$(PRJ)/sw/source/ui/dialog/wordcountdialog.cxx - $(SHELL) ./un-test.sh wordcountdialog.hxx > ../$(PRJ)/sw/source/ui/inc/wordcountdialog.hxx - touch ../$(PRJ)/sw/source/ui/dialog/swdlgfact.cxx - cp -pv wordcount.xml ../$(PRJ)/sw/uiconfig/layout - # FIXME: broken setup - ln -sf ../inc/wordcountdialog.hxx ../$(PRJ)/sw/source/ui/dialog/wordcountdialog.hxx - $(SHELL) ./un-test.sh tpsort.cxx > ../$(PRJ)/sc/source/ui/dbgui/tpsort.cxx - $(SHELL) ./un-test.sh tpsort.hxx > ../$(PRJ)/sc/source/ui/inc/tpsort.hxx - $(SHELL) ./un-test.sh sortdlg.cxx > ../$(PRJ)/sc/source/ui/dbgui/sortdlg.cxx - $(SHELL) ./un-test.sh sortdlg.hxx > ../$(PRJ)/sc/source/ui/inc/sortdlg.hxx - touch ../$(PRJ)/sc/source/ui/attrdlg/scdlgfact.cxx - touch ../$(PRJ)/sc/source/ui/view/cellsh2.cxx - cp -pv insert-sheet.xml ../$(PRJ)/sc/uiconfig/layout - cp -pv move-copy-sheet.xml ../$(PRJ)/sc/uiconfig/layout - cp -pv sort-options.xml ../$(PRJ)/sc/uiconfig/layout - cp -pv string-input.xml ../$(PRJ)/sc/uiconfig/layout - -localize.sdf: $(PRJ)/../svx/source/dialog/localize.sdf $(PRJ)/../sw/source/ui/dialog/localize.sdf $(PRJ)/../sc/source/ui/src/localize.sdf - grep sortdlg.src $(PRJ)/../sc/source/ui/src/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sc\\uiconfig\\layout\\sort-options.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SCDLG_SORT_title/' > sort-options-$@ - grep wordcountdialog.src $(PRJ)/../sw/source/ui/dialog/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "sw\\uiconfig\\layout\\wordcount.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tDLG_WORDCOUNT_title/' > wordcount-$@ - grep zoom.src $(PRJ)/source/dialog/localize.sdf | awk -F'\t' '{{printf "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "layout", "svx\\uiconfig\\layout\\zoom.xml", $$3, "layout", $$6 "_label", "", "", $$8, "0", $$10, $$11, $$12, "", $$14, $$15}}' | sed -e 's/\(\(FL\|STR\)_[^\t]*\)_label/\1_text/' -e 's/\t_label/\tRID_SVXDLG_ZOOM_title/' > zoom-$@ - echo '#empty' | cat - sort-options-$@ wordcount-$@ zoom-$@ > $@ - rm -f *-$@ - -.ELSE # ENABLE_LAYOUT != TRUE -all .PHONY: -.ENDIF # ENABLE_LAYOUT != TRUE diff --git a/toolkit/workben/makefile.mk b/toolkit/workben/makefile.mk deleted file mode 100644 index 8e54c7737a20..000000000000 --- a/toolkit/workben/makefile.mk +++ /dev/null @@ -1,84 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=toolkit -TARGET=unodialog -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE - - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -CXXFILES= unodialog.cxx - -OBJFILES= $(OBJ)$/unodialog.obj - - -APP2NOSAL= TRUE -APP2TARGET= unodialog -APP2OBJS= $(OBJ)$/unodialog.obj -APP2STDLIBS=$(TOOLSLIB) \ - $(SOTLIB) \ - $(COMPHELPERLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(VCLLIB) \ - $(SALLIB) - -# $(SVTOOLLIB) \ - -APP2DEF= $(MISC)$/unodialog.def - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - - -# ------------------------------------------------------------------ -# Windows -# ------------------------------------------------------------------ - -.IF "$(GUI)" == "WIN" - -$(MISC)$/unodialog.def: makefile.mk - echo NAME unodialog >$@ - echo DESCRIPTION 'StarView - Testprogramm' >>$@ - echo EXETYPE WINDOWS >>$@ - echo STUB 'winSTUB.EXE' >>$@ - echo PROTMODE >>$@ - echo CODE PRELOAD MOVEABLE DISCARDABLE >>$@ - echo DATA PRELOAD MOVEABLE MULTIPLE >>$@ - echo HEAPSIZE 8192 >>$@ - echo STACKSIZE 32768 >>$@ - -.ENDIF diff --git a/tools/Executable_mkunroll.mk b/tools/Executable_mkunroll.mk new file mode 100644 index 000000000000..5f9753a2a88f --- /dev/null +++ b/tools/Executable_mkunroll.mk @@ -0,0 +1,92 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Executable_Executable,mkunroll)) + +$(eval $(call gb_Executable_set_include,mkunroll,\ + $$(INCLUDE) \ + -I$(SRCDIR)/tools/inc/ \ + -I$(SRCDIR)/tools/inc/pch \ + -I$(SRCDIR)/tools/bootstrp/ \ +)) + +$(eval $(call gb_Executable_set_cxxflags,mkunroll,\ + $$(CXXFLAGS) \ + -D_TOOLS_STRINGLIST \ +)) + +$(eval $(call gb_Executable_add_linked_libs,mkunroll,\ + basegfx \ + sal \ + stl \ + tl \ + vos3 \ +)) + +# used to link against basegfxlx comphelp4gcc3 i18nisolang1gcc3 ucbhelper4gcc3 uno_cppu uno_cppuhelpergcc3 uno_salhelpergcc3 - seems to be superficial + +$(eval $(call gb_Executable_add_exception_objects,mkunroll,\ + tools/bootstrp/addexes2/mkfilt \ + tools/bootstrp/appdef \ + tools/bootstrp/cppdep \ + tools/bootstrp/inimgr \ + tools/bootstrp/prj \ +)) + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Executable_add_linked_libs,mkunroll,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Executable_add_linked_libs,mkunroll,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +endif + +ifeq ($(OS),LINUX) +$(eval $(call gb_Executable_add_linked_libs,mkunroll,\ + dl \ + pthread \ +)) +endif + +# vim: set noet sw=4 ts=4: diff --git a/tools/Executable_rscdep.mk b/tools/Executable_rscdep.mk new file mode 100644 index 000000000000..85551407d335 --- /dev/null +++ b/tools/Executable_rscdep.mk @@ -0,0 +1,97 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Executable_Executable,rscdep)) + +$(eval $(call gb_Executable_set_include,rscdep,\ + $$(INCLUDE) \ + -I$(SRCDIR)/tools/inc/ \ + -I$(SRCDIR)/tools/inc/pch \ + -I$(SRCDIR)/tools/bootstrp/ \ +)) + +$(eval $(call gb_Executable_set_cxxflags,rscdep,\ + $$(CXXFLAGS) \ + -D_TOOLS_STRINGLIST \ +)) + +$(eval $(call gb_Executable_add_linked_libs,rscdep,\ + sal \ + stl \ + tl \ + vos3 \ +)) + +$(eval $(call gb_Executable_add_exception_objects,rscdep,\ + tools/bootstrp/appdef \ + tools/bootstrp/cppdep \ + tools/bootstrp/inimgr \ + tools/bootstrp/prj \ + tools/bootstrp/rscdep \ +)) + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +ifeq ($(HAVE_GETOPT),YES) +$(eval $(call gb_Executable_set_cxxflags,rscdep,\ + $$(CXXFLAGS) \ + -DHAVE_GETOPT \ +)) +endif +$(eval $(call gb_Executable_add_linked_libs,rscdep,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Executable_add_linked_libs,rscdep,\ + gnu_getopt \ +)) +$(eval $(call gb_Executable_add_linked_libs,rscdep,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +endif + +ifeq ($(OS),LINUX) +$(eval $(call gb_Executable_add_linked_libs,rscdep,\ + dl \ + pthread \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/tools/Executable_so_checksum.mk b/tools/Executable_so_checksum.mk new file mode 100644 index 000000000000..1c0faf30b015 --- /dev/null +++ b/tools/Executable_so_checksum.mk @@ -0,0 +1,84 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Executable_Executable,so_checksum)) + +$(eval $(call gb_Executable_set_include,so_checksum,\ + $$(INCLUDE) \ + -I$(SRCDIR)/tools/inc/ \ + -I$(SRCDIR)/tools/inc/pch \ + -I$(SRCDIR)/tools/bootstrp/ \ +)) + +$(eval $(call gb_Executable_set_cxxflags,so_checksum,\ + $$(CXXFLAGS) \ + -D_TOOLS_STRINGLIST \ +)) + +$(eval $(call gb_Executable_add_linked_libs,so_checksum,\ + sal \ + tl \ +)) +# used to link against basegfxlx comphelp4gcc3 i18nisolang1gcc3 ucbhelper4gcc3 uno_cppu uno_cppuhelpergcc3 uno_salhelpergcc3 vos3gcc3 - seems to be superficial + +$(eval $(call gb_Executable_add_exception_objects,so_checksum,\ + tools/bootstrp/md5 \ + tools/bootstrp/so_checksum \ +)) + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Executable_add_linked_libs,so_checksum,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Executable_add_linked_libs,so_checksum,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +endif + +ifeq ($(OS),LINUX) +$(eval $(call gb_Executable_add_linked_libs,so_checksum,\ + dl \ + pthread \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/tools/Executable_sspretty.mk b/tools/Executable_sspretty.mk new file mode 100644 index 000000000000..637acf2afd0e --- /dev/null +++ b/tools/Executable_sspretty.mk @@ -0,0 +1,89 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Executable_Executable,sspretty)) + +$(eval $(call gb_Executable_set_include,sspretty,\ + $$(INCLUDE) \ + -I$(SRCDIR)/tools/inc/ \ + -I$(SRCDIR)/tools/inc/pch \ + -I$(SRCDIR)/tools/bootstrp/ \ +)) + +$(eval $(call gb_Executable_set_cxxflags,sspretty,\ + $$(CXXFLAGS) \ + -D_TOOLS_STRINGLIST \ +)) + +$(eval $(call gb_Executable_add_linked_libs,sspretty,\ + sal \ + stl \ + tl \ + vos3 \ +)) +# used to link against basegfxlx comphelp4gcc3 i18nisolang1gcc3 ucbhelper4gcc3 uno_cppu uno_cppuhelpergcc3 uno_salhelpergcc3 - seems to be superficial + +$(eval $(call gb_Executable_add_exception_objects,sspretty,\ + tools/bootstrp/appdef \ + tools/bootstrp/cppdep \ + tools/bootstrp/inimgr \ + tools/bootstrp/prj \ + tools/bootstrp/sspretty \ +)) + +ifeq ($(OS),WNT) +ifneq ($(USE_MINGW),) +$(eval $(call gb_Executable_add_linked_libs,sspretty,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + kernel32 \ + msvcrt \ + user32 \ +)) +else +$(eval $(call gb_Executable_add_linked_libs,sspretty,\ + kernel32 \ + msvcrt \ + oldnames \ + user32 \ + uwinapi \ +)) +endif +endif + +ifeq ($(OS),LINUX) +$(eval $(call gb_Executable_add_linked_libs,sspretty,\ + dl \ + pthread \ +)) +endif +# vim: set noet sw=4 ts=4: diff --git a/tools/Library_tl.mk b/tools/Library_tl.mk new file mode 100644 index 000000000000..fe91657e42f4 --- /dev/null +++ b/tools/Library_tl.mk @@ -0,0 +1,200 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Library_Library,tl)) + +$(eval $(call gb_Library_add_package_headers,tl,tools_inc)) + +$(eval $(call gb_Library_add_precompiled_header,tl,$(SRCDIR)/tools/inc/pch/precompiled_tools)) + +$(eval $(call gb_Library_set_include,tl,\ + $$(INCLUDE) \ + -I$(OUTDIR)/inc \ + -I$(WORKDIR)/inc/tools \ + -I$(SRCDIR)/tools/inc \ + -I$(SRCDIR)/tools/inc/pch \ + -I$(SRCDIR)/solenv/inc \ + -I$(SRCDIR)/solenv/inc/Xp31 \ + -I$(OUTDIR)/inc/tools \ + -I$(OUTDIR)/inc/offuh \ + -I$(OUTDIR)/inc/stl \ +)) + +$(eval $(call gb_Library_set_defs,tl,\ + $$(DEFS) \ + -DTOOLS_DLLIMPLEMENTATION \ + -DVCL \ +)) + +$(eval $(call gb_Library_add_linked_libs,tl,\ + basegfx \ + comphelper \ + i18nisolang1 \ + stl \ + cppu \ + sal \ + vos3 \ +)) + + +$(eval $(call gb_Library_add_exception_objects,tl,\ + tools/source/communi/geninfo \ + tools/source/communi/parser \ + tools/source/datetime/datetime \ + tools/source/datetime/tdate \ + tools/source/datetime/ttime \ + tools/source/debug/debug \ + tools/source/debug/stcktree \ + tools/source/fsys/comdep \ + tools/source/fsys/dirent \ + tools/source/fsys/filecopy \ + tools/source/fsys/fstat \ + tools/source/fsys/tdir \ + tools/source/fsys/tempfile \ + tools/source/fsys/urlobj \ + tools/source/fsys/wldcrd \ + tools/source/generic/b3dtrans \ + tools/source/generic/bigint \ + tools/source/generic/color \ + tools/source/generic/config \ + tools/source/generic/fract \ + tools/source/generic/gen \ + tools/source/generic/line \ + tools/source/generic/link \ + tools/source/generic/poly \ + tools/source/generic/poly2 \ + tools/source/generic/svborder \ + tools/source/generic/toolsin \ + tools/source/generic/svlibrary \ + tools/source/inet/inetmime \ + tools/source/inet/inetmsg \ + tools/source/inet/inetstrm \ + tools/source/memtools/contnr \ + tools/source/memtools/mempool \ + tools/source/memtools/multisel \ + tools/source/memtools/table \ + tools/source/memtools/unqidx \ + tools/source/misc/appendunixshellword \ + tools/source/misc/extendapplicationenvironment \ + tools/source/misc/getprocessworkingdir \ + tools/source/misc/solarmutex \ + tools/source/rc/isofallback \ + tools/source/rc/rc \ + tools/source/rc/resary \ + tools/source/rc/resmgr \ + tools/source/ref/errinf \ + tools/source/ref/globname \ + tools/source/ref/pstm \ + tools/source/ref/ref \ + tools/source/stream/cachestr \ + tools/source/stream/stream \ + tools/source/stream/strmsys \ + tools/source/stream/vcompat \ + tools/source/string/debugprint \ + tools/source/string/tenccvt \ + tools/source/string/tstring \ + tools/source/string/tustring \ + tools/source/testtoolloader/testtoolloader \ + tools/source/zcodec/zcodec \ +)) + +ifeq ($(GUI),UNX) +$(eval $(call gb_Library_add_exception_objects,tl,\ + tools/unx/source/dll/toolsdll \ +)) +endif + +ifeq ($(SYSTEM_ZLIB),YES) +$(eval $(call gb_Library_set_cxxflags,tl,\ + $$(CXXFLAGS) \ + -DSYSTEM_ZLIB \ +)) +$(eval $(call gb_Library_add_linked_libs,tl,\ + z \ +)) +else +$(eval $(call gb_Library_add_linked_static_libs,tl,\ + zlib \ +)) +endif + +ifeq ($(OS),LINUX) +$(eval $(call gb_Library_add_linked_libs,tl,\ + dl \ + m \ + pthread \ +)) +endif + +ifeq ($(OS),WNT) +$(eval $(call gb_Library_set_include,tl,\ + $$(INCLUDE) \ + -I$(SRCDIR)/tools/win/inc \ +)) + +$(eval $(call gb_Library_add_exception_objects,tl,\ + tools/win/source/dll/toolsdll \ +)) + +ifneq ($(USE_MINGW),) +$(eval $(call gb_Library_add_linked_libs,tl,\ + mingwthrd \ + $(gb_MINGW_LIBSTDCPP) \ + mingw32 \ + $(gb_MINGW_LIBGCC) \ + uwinapi \ + moldname \ + mingwex \ + advapi32 \ + kernel32 \ + mpr \ + msvcrt \ + ole32 \ + shell32 \ + user32 \ + uuid \ +)) +else +$(eval $(call gb_Library_add_linked_libs,tl,\ + advapi32 \ + kernel32 \ + mpr \ + msvcrt \ + oldnames \ + ole32 \ + shell32 \ + user32 \ + uuid \ + uwinapi \ +)) +endif +endif +# tools/source/string/debugprint -DDEBUG -DEXCEPTIONS_OFF -DOSL_DEBUG_LEVEL=2 -DSHAREDLIB -DTOOLS_DLLIMPLEMENTATION -D_DLL_ -O0 -fno-exceptions -fpic -fvisibility=hidden -g +# -DOPTIMIZE +# no -DTOOLS_DLLIMPLEMENTATION on toolsdll +# -DEXCEPTIONS_OFF -fno-exceptions on geninfo parser datetime tdate ttime bigint color config fract gen line link poly2 svborder toolsin inetmime inetmsg inetstrm contnr mempool multisel table unqidx cachestr stream strmsys vcompat tenccvt tstring tustring testtoolloader +# vim: set noet sw=4 ts=4: diff --git a/tools/Makefile b/tools/Makefile new file mode 100644 index 000000000000..a79aff831024 --- /dev/null +++ b/tools/Makefile @@ -0,0 +1,38 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +ifeq ($(strip $(SOLARENV)),) +$(error No environment set!) +endif + +gb_PARTIALBUILD := T +GBUILDDIR := $(SOLARENV)/gbuild +include $(GBUILDDIR)/gbuild.mk + +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) + +# vim: set noet sw=4 ts=4: diff --git a/tools/Module_tools.mk b/tools/Module_tools.mk new file mode 100644 index 000000000000..9e233408b317 --- /dev/null +++ b/tools/Module_tools.mk @@ -0,0 +1,41 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + + +$(eval $(call gb_Module_Module,tools)) + +$(eval $(call gb_Module_add_targets,tools,\ + Executable_mkunroll \ + Executable_rscdep \ + Executable_so_checksum \ + Executable_sspretty \ + Library_tl \ + Package_inc \ + StaticLibrary_ooopathutils \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/tools/Package_inc.mk b/tools/Package_inc.mk new file mode 100644 index 000000000000..97d99653c312 --- /dev/null +++ b/tools/Package_inc.mk @@ -0,0 +1,110 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# <http://www.openoffice.org/license.html> +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +$(eval $(call gb_Package_Package,tools_inc,$(SRCDIR)/tools/inc)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/StringListResource.hxx,tools/StringListResource.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/appendunixshellword.hxx,tools/appendunixshellword.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/b3dtrans.hxx,tools/b3dtrans.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/bigint.hxx,tools/bigint.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/cachestr.hxx,tools/cachestr.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/color.hxx,tools/color.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/config.hxx,tools/config.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/contnr.hxx,tools/contnr.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/date.hxx,tools/date.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/datetime.hxx,tools/datetime.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/debug.hxx,tools/debug.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/diagnose_ex.h,tools/diagnose_ex.h)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/dynary.hxx,tools/dynary.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/errcode.hxx,tools/errcode.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/errinf.hxx,tools/errinf.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/extendapplicationenvironment.hxx,tools/extendapplicationenvironment.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/fldunit.hxx,tools/fldunit.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/fontenum.hxx,tools/fontenum.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/fract.hxx,tools/fract.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/fsys.hxx,tools/fsys.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/gen.hxx,tools/gen.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/geninfo.hxx,tools/geninfo.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/getprocessworkingdir.hxx,tools/getprocessworkingdir.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/globname.hxx,tools/globname.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/inetdef.hxx,tools/inetdef.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/inetmime.hxx,tools/inetmime.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/inetmsg.hxx,tools/inetmsg.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/inetstrm.hxx,tools/inetstrm.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/iparser.hxx,tools/iparser.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/isofallback.hxx,tools/isofallback.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/line.hxx,tools/line.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/link.hxx,tools/link.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/list.hxx,tools/list.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/mapunit.hxx,tools/mapunit.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/mempool.hxx,tools/mempool.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/multisel.hxx,tools/multisel.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/ownlist.hxx,tools/ownlist.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/pathutils.hxx,tools/pathutils.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/poly.hxx,tools/poly.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/postsys.h,tools/postsys.h)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/postwin.h,tools/postwin.h)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/postx.h,tools/postx.h)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/presys.h,tools/presys.h)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/prewin.h,tools/prewin.h)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/prex.h,tools/prex.h)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/pstm.hxx,tools/pstm.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/queue.hxx,tools/queue.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/rc.h,tools/rc.h)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/rc.hxx,tools/rc.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/rcid.h,tools/rcid.h)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/ref.hxx,tools/ref.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/resary.hxx,tools/resary.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/resid.hxx,tools/resid.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/resmgr.hxx,tools/resmgr.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/rtti.hxx,tools/rtti.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/shl.hxx,tools/shl.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/simplerm.hxx,tools/simplerm.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/solar.h,tools/solar.h)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/solarmutex.hxx,tools/solarmutex.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/stack.hxx,tools/stack.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/stream.hxx,tools/stream.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/string.hxx,tools/string.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/svborder.hxx,tools/svborder.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/svlibrary.hxx,tools/svlibrary.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/svwin.h,tools/svwin.h)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/table.hxx,tools/table.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/tempfile.hxx,tools/tempfile.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/tenccvt.hxx,tools/tenccvt.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/testtoolloader.hxx,tools/testtoolloader.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/time.hxx,tools/time.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/tools.h,tools/tools.h)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/toolsdllapi.h,tools/toolsdllapi.h)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/unqid.hxx,tools/unqid.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/unqidx.hxx,tools/unqidx.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/urlobj.hxx,tools/urlobj.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/vcompat.hxx,tools/vcompat.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/vector2d.hxx,tools/vector2d.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/weakbase.h,tools/weakbase.h)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/weakbase.hxx,tools/weakbase.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/wintypes.hxx,tools/wintypes.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/wldcrd.hxx,tools/wldcrd.hxx)) +$(eval $(call gb_Package_add_file,tools_inc,inc/tools/zcodec.hxx,tools/zcodec.hxx)) diff --git a/svtools/source/config/test/makefile.mk b/tools/StaticLibrary_ooopathutils.mk index 71bea788d8de..a5b12532c60b 100644..100755 --- a/svtools/source/config/test/makefile.mk +++ b/tools/StaticLibrary_ooopathutils.mk @@ -14,49 +14,41 @@ # # 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 +# 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 +# version 3 along with OpenOffice.org. If not, see # <http://www.openoffice.org/license.html> # for a copy of the LGPLv3 License. # #************************************************************************* -PRJ=..$/..$/.. -PRJNAME= svtools -TARGET= test_configitems -LIBTARGET= NO -ENABLE_EXCEPTIONS= TRUE -USE_DEFFILE= TRUE +$(eval $(call gb_StaticLibrary_StaticLibrary,ooopathutils)) -# --- Settings ----------------------------------------------------- +$(eval $(call gb_StaticLibrary_add_package_headers,ooopathutils,tools_inc)) -.INCLUDE : settings.mk +$(eval $(call gb_StaticLibrary_add_exception_objects,ooopathutils,\ + tools/source/misc/pathutils \ +)) -# --- application: "test" -------------------------------------------------- -APP1TARGET= test +# HACK for now +# We really should fix the clients of this to link against the static library +# Instead of this evil linking of an object from $(OUTDIR) +define StaticLibrary_ooopathutils_hack +$(call gb_StaticLibrary_get_target,ooopathutils) : $(OUTDIR)/lib/$(1) +$$(eval $$(call gb_Deliver_add_deliverable,$(OUTDIR)/lib/$(1),$(call gb_CxxObject_get_target,tools/source/misc/pathutils))) -APP1OBJS= $(SLO)$/test.obj \ - $(SLO)$/dynamicmenuoptions.obj +$(OUTDIR)/lib/$(1) : $(call gb_CxxObject_get_target,tools/source/misc/pathutils) + $$(call gb_Deliver_deliver,$$<,$$@) -DEPOBJFILES=$(APP1OBJS) - -APP1STDLIBS= $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(COMPHELPERLIB) \ - $(UNOTOOLSLIB) \ - $(SALLIB) \ - $(VOSLIB) \ - $(TOOLSLIB) \ - $(VCLLIB) - -APP1DEPN= $(SLO)$/dynamicmenuoptions.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk +endef +ifeq ($(OS),WNT) +$(eval $(call StaticLibrary_ooopathutils_hack,pathutils-obj.obj)) +else +$(eval $(call StaticLibrary_ooopathutils_hack,pathutils-obj.o)) +endif +# vim: set noet sw=4 ts=4: diff --git a/tools/bootstrp/addexes/makefile.mk b/tools/bootstrp/addexes/makefile.mk deleted file mode 100644 index 324de9479502..000000000000 --- a/tools/bootstrp/addexes/makefile.mk +++ /dev/null @@ -1,49 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=tools -TARGET=addexes -TARGETTYPE=CUI - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CDEFS+=-D_TOOLS_STRINGLIST - -# --- Files -------------------------------------------------------- - -APP1TARGET= txtrepl -APP1OBJS= $(OBJ)$/replace.obj -APP1STDLIBS=$(TOOLSLIB) - -DEPOBJFILES = $(APP1OBJS) -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/bootstrp/addexes2/makefile.mk b/tools/bootstrp/addexes2/makefile.mk deleted file mode 100644 index 492d6f3105ed..000000000000 --- a/tools/bootstrp/addexes2/makefile.mk +++ /dev/null @@ -1,56 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=tools -TARGET=addexes2 -TARGETTYPE=CUI - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -APP1TARGET= mkunroll -APP1OBJS= $(OBJ)$/mkfilt.obj -APP1STDLIBS= $(SALLIB) $(VOSLIB) $(TOOLSLIB) -.IF "$(OS)"=="LINUX" -APP1STDLIBS+=-lpthread -.ENDIF -.IF "$(OS)"=="NETBSD" -APP1STDLIBS+=-lpthread -.ENDIF -APP1LIBS= $(LB)$/btstrp.lib $(LB)$/bootstrp2.lib -APP1DEPN= $(LB)$/atools.lib $(LB)$/btstrp.lib $(LB)$/bootstrp2.lib - - -DEPOBJFILES = $(APP1OBJS) -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/bootstrp/command.cxx b/tools/bootstrp/command.cxx deleted file mode 100644 index 2ab0cc8dc4a6..000000000000 --- a/tools/bootstrp/command.cxx +++ /dev/null @@ -1,690 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_tools.hxx" - -#ifdef SCO -#define _IOSTREAM_H -#endif - -#ifdef PRECOMPILED -#include "first.hxx" -#endif - -#include <tools/fsys.hxx> -#include <tools/stream.hxx> -#include "bootstrp/command.hxx" -#include <tools/debug.hxx> -#include "bootstrp/appdef.hxx" - -#ifdef _MSC_VER -#pragma warning (push,1) -#endif - -#include <iostream> -#include <string.h> -#include <stdlib.h> -#include <stdio.h> -#include <ctype.h> -#include <errno.h> - -#ifdef _MSC_VER -#pragma warning (pop) -#endif - -//#define MH_TEST2 1 // fuers direkte Testen - -#if defined(WNT) || defined(OS2) -#ifdef _MSC_VER -#pragma warning (push,1) -#endif -#include <process.h> // for _SPAWN -#ifdef _MSC_VER -#pragma warning (pop) -#endif -#endif -#ifdef UNX -#include <sys/types.h> -#include <unistd.h> -#if ( defined NETBSD ) || defined (FREEBSD) || defined (AIX) \ - || defined (HPUX) || defined (MACOSX) -#include <sys/wait.h> -#else -#include <wait.h> -#endif -#define P_WAIT 1 // erstmal einen dummz -#endif - -#if defined WNT -#include <tools/svwin.h> -#endif - -#if defined(WNT) || defined(OS2) -#define cPathSeperator ';' -#endif -#ifdef UNX -#define cPathSeperator ':' -#endif - -/*****************************************************************************/ -CommandLine::CommandLine(BOOL bWrite) -/*****************************************************************************/ - : bTmpWrite(bWrite) -{ - CommandBuffer = new char [1]; - if (CommandBuffer == NULL) { - //cout << "Error: nospace" << endl; - exit(0); - } - CommandBuffer[0] = '\0'; - nArgc = 0; - ppArgv = new char * [1]; - ppArgv[0] = NULL; - - ComShell = new char [128]; - char* pTemp = getenv("COMMAND_SHELL"); - if(!pTemp) - strcpy(ComShell,COMMAND_SHELL); - else - strcpy(ComShell,pTemp); - - strcpy(&ComShell[strlen(ComShell)]," -C "); -} - -/*****************************************************************************/ -CommandLine::CommandLine(const char *CommandString, BOOL bWrite) -/*****************************************************************************/ - : bTmpWrite(bWrite) -{ - CommandBuffer = new char [1]; - if (CommandBuffer == NULL) { - //cout << "Error: nospace" << endl; - exit(0); - } - nArgc = 0; - ppArgv = new char * [1]; - ppArgv[0] = NULL; - - ComShell = new char [128]; - char* pTemp = getenv("COMMAND_SHELL"); - if(!pTemp) - strcpy(ComShell,COMMAND_SHELL); - else - strcpy(ComShell,pTemp); - - strcpy(&ComShell[strlen(ComShell)]," -C "); - - BuildCommand(CommandString); -} - -/*****************************************************************************/ -CommandLine::CommandLine(const CommandLine& CCommandLine, BOOL bWrite) -/*****************************************************************************/ - : bTmpWrite(bWrite) -{ - CommandBuffer = new char [1]; - if (CommandBuffer == NULL) { - //cout << "Error: nospace" << endl; - exit(0); - } - nArgc = 0; - ppArgv = new char * [1]; - ppArgv[0] = NULL; - - ComShell = new char [128]; - char* pTemp = getenv("COMMAND_SHELL"); - if(!pTemp) - strcpy(ComShell,COMMAND_SHELL); - else - strcpy(ComShell,pTemp); - - strcpy(&ComShell[strlen(ComShell)]," -C "); - - BuildCommand(CCommandLine.CommandBuffer); -} - -/*****************************************************************************/ -CommandLine::~CommandLine() -/*****************************************************************************/ -{ - delete [] CommandBuffer; - delete [] ComShell; - //for (int i = 0; ppArgv[i] != '\0'; i++) { - for (int i = 0; ppArgv[i] != 0; i++) { - delete [] ppArgv[i]; - } - delete [] ppArgv; - -} - -/*****************************************************************************/ -CommandLine& CommandLine::operator=(const CommandLine& CCommandLine) -/*****************************************************************************/ -{ - strcpy (CommandBuffer, CCommandLine.CommandBuffer); - for (int i = 0; i != nArgc; i++) { - delete [] ppArgv[i]; - } - delete [] ppArgv; - ppArgv = new char * [1]; - ppArgv[0] = NULL; - BuildCommand(CommandBuffer); - return *this; -} - -/*****************************************************************************/ -CommandLine& CommandLine::operator=(const char *CommandString) -/*****************************************************************************/ -{ - strcpy (CommandBuffer, CommandString); - for (int i = 0; i != nArgc; i++) { - delete [] ppArgv[i]; - } - delete [] ppArgv; - ppArgv = new char * [1]; - ppArgv[0] = NULL; - BuildCommand(CommandBuffer); - - return *this; -} - -/*****************************************************************************/ -void CommandLine::Print() -/*****************************************************************************/ -{ - //cout << "******* start print *******" << endl; - //cout << "nArgc = " << nArgc << endl; - //cout << "CommandBuffer = " << CommandBuffer << endl; - for (int i = 0; ppArgv[i] != NULL; i++) { - //cout << "ppArgv[" << i << "] = " << ppArgv[i] << endl; - } - //cout << "******** end print ********" << endl; -} - -/*****************************************************************************/ -void CommandLine::BuildCommand(const char *CommandString) -/*****************************************************************************/ -{ - int index = 0, pos=0; - char buffer[1024]; - char WorkString[1024]; - - strcpy(WorkString,CommandString); - - //falls LogWindow -> in tmpfile schreiben - if(bTmpWrite) - { - strcpy(&WorkString[strlen(WorkString)]," >&"); - strcpy(&WorkString[strlen(WorkString)],getenv("TMP")); - strcpy(&WorkString[strlen(WorkString)],TMPNAME); - } - - // delete old memory and get some new memory for CommandBuffer - - delete [] CommandBuffer; - CommandBuffer = new char [strlen(ComShell)+strlen(WorkString)+1]; - if (CommandBuffer == NULL) { - //cout << "Error: nospace" << endl; - exit(0); - } - strcpy (CommandBuffer, ComShell); - strcpy (&CommandBuffer[strlen(ComShell)], WorkString); - - CommandString = CommandBuffer; - - // get the number of tokens - Strtokens(CommandString); - - // delete the space for the old CommandLine - - for (int i = 0; ppArgv[i] != 0; i++) { - delete [] ppArgv[i]; - } - delete [] ppArgv; - - /* get space for the new command line */ - - ppArgv = (char **) new char * [nArgc+1]; - if (ppArgv == NULL) { - //cout << "Error: no space" << endl; - exit(0); - } - - // flush the white space - - while ( isspace(*CommandString) ) - CommandString++; - - index = 0; - - // start the loop to build all the individual tokens - - while (*CommandString != '\0') { - - pos = 0; - - // copy the token until white space is found - - while ( !isspace(*CommandString) && *CommandString != '\0') { - - buffer[pos++] = *CommandString++; - - } - - buffer[pos] = '\0'; - - // get space for the individual tokens - - ppArgv[index] = (char *) new char [strlen(buffer)+1]; - if (ppArgv[index] == NULL) { - //cout << "Error: nospace" << endl; - exit(0); - } - - // copy the token - - strcpy (ppArgv[index++], buffer); - - // flush while space - - while ( isspace(*CommandString) ) - CommandString++; - - } - - // finish by setting the las pointer to NULL - ppArgv[nArgc]= NULL; - -} - -/*****************************************************************************/ -void CommandLine::Strtokens(const char *CommandString) -/*****************************************************************************/ -{ - int count = 0; - const char *temp; - - temp = CommandString; - - /* bypass white space */ - - while (isspace(*temp)) temp++; - - for (count=0; *temp != '\0'; count++) { - - /* continue until white space of string terminator is found */ - - while ((!isspace(*temp)) && (*temp != '\0')) temp++; - - /* bypass white space */ - - while (isspace(*temp)) temp++; - - } - nArgc = count; -} - -/*****************************************************************************/ -CCommand::CCommand( ByteString &rString ) -/*****************************************************************************/ -{ - rString.SearchAndReplace( '\t', ' ' ); - aCommand = rString.GetToken( 0, ' ' ); - aCommandLine = Search( "PATH" ); -#ifndef UNX - aCommandLine += " /c "; -#else - aCommandLine += " -c "; -#endif - - ByteString sCmd( rString.GetToken( 0, ' ' )); - ByteString sParam( rString.Copy( sCmd.Len())); - - aCommandLine += Search( "PATH", sCmd ); - aCommandLine += sParam; - - ImplInit(); -} - -/*****************************************************************************/ -CCommand::CCommand( const char *pChar ) -/*****************************************************************************/ -{ - ByteString aString = pChar; - aString.SearchAndReplace( '\t', ' ' ); - aCommand = aString.GetToken( 0, ' ' ); - - aCommandLine = Search( "PATH" ); -#ifndef UNX - aCommandLine += " /c "; -#else - aCommandLine += " -c "; -#endif - ByteString rString( pChar ); - - ByteString sCmd( rString.GetToken( 0, ' ' )); - ByteString sParam( rString.Copy( sCmd.Len())); - - aCommandLine += Search( "PATH", sCmd ); - aCommandLine += sParam; - - ImplInit(); -} - -/*****************************************************************************/ -void CCommand::ImplInit() -/*****************************************************************************/ -{ - char pTmpStr[255]; - size_t *pPtr; - char *pChar; - int nVoid = sizeof( size_t * ); - nArgc = aCommandLine.GetTokenCount(' '); - ULONG nLen = aCommandLine.Len(); - - ppArgv = (char **) new char[ (ULONG)(nLen + nVoid * (nArgc +2) + nArgc ) ]; - pChar = (char *) ppArgv + ( (1+nArgc) * nVoid ); - pPtr = (size_t *) ppArgv; - for ( xub_StrLen i=0; i<nArgc; i++ ) - { - (void) strcpy( pTmpStr, aCommandLine.GetToken(i, ' ' ).GetBuffer() ); - size_t nStrLen = strlen( pTmpStr ) + 1; - strcpy( pChar, pTmpStr ); - *pPtr = (sal_uIntPtr) pChar; - pChar += nStrLen; - pPtr += 1; -#ifdef UNX - if ( i == 1 ) - { - USHORT nWo = aCommandLine.Search("csh -c "); - if (nWo != STRING_NOTFOUND) - aCommandLine.Erase(0, nWo + 7); - else - aCommandLine.Erase(0, 16); - i = nArgc; - strcpy( pChar, aCommandLine.GetBuffer() ); - *pPtr = (sal_uIntPtr) pChar; - pPtr += 1; - } -#endif - } - *pPtr = 0; -} - -/*****************************************************************************/ -CCommand::operator int() -/*****************************************************************************/ -{ - int nRet; -#if defined WNT - nRet = _spawnv( P_WAIT, ppArgv[0], (const char **) ppArgv ); -#elif defined OS2 - nRet = _spawnv( P_WAIT, ppArgv[0], ppArgv ); -#elif defined UNX - //fprintf( stderr, "CComand : operator (int) not implemented\n"); - // **** Unix Implementierung *************** - pid_t pid; - - if (( pid = fork()) < 0 ) - { - DBG_ASSERT( FALSE, "fork error" ); - } - else if ( pid == 0 ) - { - if ( execv( ppArgv[0], (char * const *) ppArgv ) < 0 ) - { - DBG_ASSERT( FALSE, "execv failed" ); - } - } - //fprintf( stderr, "parent: %s %s\n", ppArgv[0] , ppArgv[1] ); - if ( (nRet = waitpid( pid, NULL, 0 ) < 0) ) - { - DBG_ASSERT( FALSE, "wait error" ); - } -#endif - - switch ( errno ) - { - case E2BIG : - nError = COMMAND_TOOBIG; - break; - case EINVAL : - nError = COMMAND_INVALID; - break; - case ENOENT: - nError = COMMAND_NOTFOUND; - break; - case ENOEXEC : - nError = COMMAND_NOEXEC; - break; - case ENOMEM : - nError = COMMAND_NOMEM; - break; - default: - nError = COMMAND_UNKNOWN; - } - - if ( nRet ) - fprintf( stderr, "Program returned with errros\n"); - return nRet; -} - -/*****************************************************************************/ -ByteString CCommand::Search(ByteString aEnv, ByteString sItem) -/*****************************************************************************/ -{ - // default wird eine Shell im Path gesucht, - // wenn aber compsec gestzt ist holen wir uns die - // Shell von dort - if ( sItem.Equals( COMMAND_SHELL )) - { - ByteString aComspec = GetEnv( "COMSPEC" ); - if ( !aComspec.Equals("")) - return aComspec; - } - - DirEntry aItem( String( sItem, RTL_TEXTENCODING_ASCII_US )); - if ( aItem.Exists()) - return sItem; - - ByteString aEntry, sReturn; - ByteString sEnv( aEnv ); - ByteString sEnvironment = GetEnv( sEnv.GetBuffer()); - xub_StrLen nCount = sEnvironment.GetTokenCount( cPathSeperator ); - - BOOL bFound = FALSE; - - for ( xub_StrLen i=0; i<nCount && !bFound; i++ ) - { - aEntry = sEnvironment.GetToken(i, cPathSeperator ); -#ifndef UNX - aEntry += '\\'; -#else - aEntry += '/'; -#endif - aEntry += sItem; - - String sEntry( aEntry, RTL_TEXTENCODING_ASCII_US ); - DirEntry aDirEntry( sEntry ); - aDirEntry.ToAbs(); - if ( aDirEntry.Exists()) { - sReturn = aEntry; - bFound = TRUE; - } - } - if ( !bFound ) - { - sEnv = sEnv.ToUpperAscii(); - ByteString sEnvironment2 = GetEnv(sEnv.GetBuffer() ); - xub_StrLen nCount2 = sEnvironment2.GetTokenCount( cPathSeperator ); - for ( xub_StrLen i=0; i<nCount2 && !bFound; i++ ) - { - aEntry = sEnvironment2.GetToken(i, cPathSeperator ); -#ifndef UNX - aEntry += '\\'; -#else - aEntry += '/'; -#endif - aEntry += sItem; - - String sEntry( aEntry, RTL_TEXTENCODING_ASCII_US ); - DirEntry aDirEntry( sEntry ); - aDirEntry.ToAbs(); - if ( aDirEntry.Exists()) { - sReturn = aEntry; - bFound = TRUE; - } - } - } - - if ( sReturn.Equals( "" )) - sReturn = sItem; - - return sReturn; -} - -/*****************************************************************************/ -CCommandd::CCommandd( ByteString &rString, CommandBits nBits ) -/*****************************************************************************/ - : CCommand( rString ), - nFlag( nBits ) -{ -} - - -/*****************************************************************************/ -CCommandd::CCommandd( const char *pChar, CommandBits nBits ) -/*****************************************************************************/ - : CCommand( pChar ), - nFlag( nBits ) -{ -} - -/*****************************************************************************/ -CCommandd::operator int() -/*****************************************************************************/ -{ - int nRet = 0; - -#ifdef WNT - LPCTSTR lpApplicationName = NULL; - LPTSTR lpCommandLine = (char *) GetCommandLine_().GetBuffer(); - LPSECURITY_ATTRIBUTES lpProcessAttributes = NULL; - LPSECURITY_ATTRIBUTES lpThreadAttributes = NULL; - BOOL bInheritHandles = TRUE; - - // wie wuenschen wir denn gestartet zu werden ?? - DWORD dwCreationFlags; - - if ( nFlag & COMMAND_EXECUTE_START ) - dwCreationFlags = DETACHED_PROCESS; - else - dwCreationFlags = CREATE_NEW_CONSOLE; - - // wir erben vom Vaterprozess - LPVOID lpEnvironment = NULL; - - // das exe im Pfad suchen - LPCTSTR lpCurrentDirectory = NULL; - - // in dieser Struktur bekommen wir die erzeugte Processinfo - // zurueck - PROCESS_INFORMATION aProcessInformation; - - // weiteres Startupinfo anlegen - STARTUPINFO aStartupInfo; - - aStartupInfo.cb = sizeof( STARTUPINFO ); - aStartupInfo.lpReserved = NULL; - aStartupInfo.lpDesktop = NULL; - - // das Fenster bekommt den Namen des Exes - aStartupInfo.lpTitle = NULL; - aStartupInfo.dwX = 100; - aStartupInfo.dwY = 100; - //aStartupInfo.dwXSize = 400; - //aStartupInfo.dwYSize = 400; - aStartupInfo.dwXCountChars = 40; - aStartupInfo.dwYCountChars = 40; - - // Farben setzen - aStartupInfo.dwFillAttribute = FOREGROUND_RED | BACKGROUND_RED | - BACKGROUND_BLUE | BACKGROUND_GREEN; - -// aStartupInfo.dwFlags = STARTF_USESTDHANDLES; - //aStartupInfo.wShowWindow = SW_NORMAL; //SW_SHOWDEFAULT; - //aStartupInfo.wShowWindow = SW_HIDE; //SW_SHOWNOACTIVATE; - aStartupInfo.wShowWindow = SW_SHOWNOACTIVATE; - aStartupInfo.cbReserved2 = NULL; - aStartupInfo.lpReserved2 = NULL; - //aStartupInfo.hStdInput = stdin; - //aStartupInfo.hStdOutput = stdout; - //aStartupInfo.hStdError = stderr; - - if ( nFlag & COMMAND_EXECUTE_HIDDEN ) - { - aStartupInfo.wShowWindow = SW_HIDE; - aStartupInfo.dwFlags = aStartupInfo.dwFlags | STARTF_USESHOWWINDOW; - } - - bool bProcess = CreateProcess( lpApplicationName, - lpCommandLine, lpProcessAttributes, - lpThreadAttributes, bInheritHandles, - dwCreationFlags, lpEnvironment, lpCurrentDirectory, - &aStartupInfo, &aProcessInformation ); - - LPVOID lpMsgBuf; - - if ( bProcess ) - { - FormatMessage( - FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, - GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - (LPTSTR) &lpMsgBuf, - 0, - NULL ); - - ByteString aErrorString = (char *) lpMsgBuf; - - if ( nFlag & COMMAND_EXECUTE_WAIT ) - { - DWORD aProcessState = STILL_ACTIVE; - while(aProcessState == STILL_ACTIVE) - { - GetExitCodeProcess(aProcessInformation.hProcess,&aProcessState); - } - } - } - else - fprintf( stderr, "Can not start Process !" ); - -#endif - return nRet; -} diff --git a/tools/bootstrp/makefile.mk b/tools/bootstrp/makefile.mk deleted file mode 100644 index 41188d2117d0..000000000000 --- a/tools/bootstrp/makefile.mk +++ /dev/null @@ -1,108 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=tools -TARGET=btstrp -TARGET1=bootstrp2 -TARGETTYPE=CUI -LIBTARGET=NO -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CDEFS+=-D_TOOLS_STRINGLIST - -.IF "$(HAVE_GETOPT)" == "YES" -CDEFS += -DHAVE_GETOPT -.ENDIF - -# --- Files -------------------------------------------------------- - -OBJFILES= \ - $(OBJ)$/appdef.obj \ - $(OBJ)$/command.obj \ - $(OBJ)$/cppdep.obj\ - $(OBJ)$/inimgr.obj\ - $(OBJ)$/mkcreate.obj \ - $(OBJ)$/sstring.obj \ - $(OBJ)$/prj.obj - -SLOFILES= \ - $(SLO)$/appdef.obj \ - $(SLO)$/command.obj \ - $(SLO)$/cppdep.obj \ - $(SLO)$/inimgr.obj \ - $(SLO)$/mkcreate.obj \ - $(SLO)$/sstring.obj \ - $(SLO)$/prj.obj - - -LIB1TARGET= $(LB)$/$(TARGET).lib -LIB1ARCHIV= $(LB)$/lib$(TARGET).a -LIB1OBJFILES=\ - $(OBJ)$/appdef.obj \ - $(OBJ)$/command.obj \ - $(OBJ)$/cppdep.obj \ - $(OBJ)$/inimgr.obj \ - $(OBJ)$/mkcreate.obj \ - $(OBJ)$/sstring.obj - -LIB2TARGET= $(LB)$/$(TARGET1).lib -LIB2ARCHIV= $(LB)$/lib$(TARGET1).a -LIB2OBJFILES=\ - $(OBJ)$/prj.obj - -APP1TARGET= sspretty -APP1OBJS= $(OBJ)$/sspretty.obj -APP1LIBS= $(LB)$/$(TARGET).lib $(LB)$/$(TARGET1).lib -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) $(BASEGFXLIB) $(UCBHELPERLIB) $(CPPULIB) $(COMPHELPERLIB) $(I18NISOLANGLIB) $(CPPUHELPERLIB) $(SALHELPERLIB) -.IF "$(HAVE_GETOPT)" != "YES" -.IF "$(OS)"=="WNT" -APP2STDLIBS+=gnu_getopt.lib -.ENDIF -.ENDIF -APP2RPATH= NONE -APP2RPATH= NONE -APP2RPATH= NONE - -APP3TARGET= so_checksum -APP3OBJS= $(OBJ)$/md5.obj \ - $(OBJ)$/so_checksum.obj -APP3STDLIBS= $(TOOLSLIB) $(SALLIB) $(VOSLIB) $(BASEGFXLIB) $(UCBHELPERLIB) $(CPPULIB) $(COMPHELPERLIB) $(I18NISOLANGLIB) $(CPPUHELPERLIB) $(SALHELPERLIB) - -DEPOBJFILES = $(APP1OBJS) $(APP2OBJS) $(APP3OBJS) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/bootstrp/prj.cxx b/tools/bootstrp/prj.cxx index 4f4d44a33536..e5ed5b2451e9 100644 --- a/tools/bootstrp/prj.cxx +++ b/tools/bootstrp/prj.cxx @@ -29,7 +29,7 @@ #include "precompiled_tools.hxx" #include <stdlib.h> #include <stdio.h> -#include "bootstrp/sstring.hxx" +//#include "bootstrp/sstring.hxx" #include <vos/mutex.hxx> #include <tools/stream.hxx> @@ -37,6 +37,8 @@ #include "bootstrp/prj.hxx" #include "bootstrp/inimgr.hxx" +DECLARE_LIST( UniStringList, UniString* ) + //#define TEST 1 #if defined(WNT) || defined(OS2) @@ -47,7 +49,7 @@ #define PATH_DELIMETER '/' #endif -Link Star::aDBNotFoundHdl; +//Link Star::aDBNotFoundHdl; // // class SimpleConfig @@ -166,1435 +168,3 @@ ByteString SimpleConfig::GetCleanedNextLine( BOOL bReadComments ) return aTmpStr; } - - -// -// class CommandData -// - -/*****************************************************************************/ -CommandData::CommandData() -/*****************************************************************************/ -{ - nOSType = 0; - nCommand = 0; - pDepList = 0; -} - -/*****************************************************************************/ -CommandData::~CommandData() -/*****************************************************************************/ -{ - if ( pDepList ) - { - ByteString *pString = pDepList->First(); - while ( pString ) - { - delete pString; - pString = pDepList->Next(); - } - delete pDepList; - - pDepList = NULL; - } -} - -/*****************************************************************************/ -ByteString CommandData::GetOSTypeString() -/*****************************************************************************/ -{ - ByteString aRetStr; - - switch (nOSType) - { - case OS_WIN16 | OS_WIN32 | OS_OS2 | OS_UNX : - aRetStr = "all"; - break; - case OS_WIN32 | OS_WIN16 : - aRetStr = "w"; - break; - case OS_OS2 : - aRetStr = "p"; - break; - case OS_UNX : - aRetStr = "u"; - break; - case OS_WIN16 : - aRetStr = "d"; - break; - case OS_WIN32 : - aRetStr = "n"; - break; - default : - aRetStr = "none"; - } - - return aRetStr; -} - -/*****************************************************************************/ -ByteString CommandData::GetCommandTypeString() -/*****************************************************************************/ -{ - ByteString aRetStr; - - switch (nCommand) - { - case COMMAND_NMAKE : - aRetStr = "nmake"; - break; - case COMMAND_GET : - aRetStr = "get"; - break; - default : - aRetStr = "usr"; - aRetStr += ByteString::CreateFromInt64( nCommand + 1 - COMMAND_USER_START ); - - } - - return aRetStr; -} - -/*****************************************************************************/ -CommandData* Prj::GetDirectoryList ( USHORT, USHORT ) -/*****************************************************************************/ -{ - return (CommandData *)NULL; -} - -/*****************************************************************************/ -CommandData* Prj::GetDirectoryData( ByteString aLogFileName ) -/*****************************************************************************/ -{ - CommandData *pData = NULL; - ULONG nObjCount = Count(); - for ( ULONG i=0; i<nObjCount; i++ ) - { - pData = GetObject(i); - if ( pData->GetLogFile() == aLogFileName ) - return pData; - } - return NULL; -} - -// -// class Prj -// - -/*****************************************************************************/ -Prj::Prj() : - bVisited( FALSE ), - pPrjInitialDepList(0), - pPrjDepList(0), - bHardDependencies( FALSE ), - bSorted( FALSE ) -/*****************************************************************************/ -{ -} - -/*****************************************************************************/ -Prj::Prj( ByteString aName ) : - bVisited( FALSE ), - aProjectName( aName ), - pPrjInitialDepList(0), - pPrjDepList(0), - bHardDependencies( FALSE ), - bSorted( FALSE ) -/*****************************************************************************/ -{ -} - -/*****************************************************************************/ -Prj::~Prj() -/*****************************************************************************/ -{ - if ( pPrjDepList ) - { - ByteString *pString = pPrjDepList->First(); - while ( pString ) - { - delete pString; - pString = pPrjDepList->Next(); - } - delete pPrjDepList; - - pPrjDepList = NULL; - } - - if ( pPrjInitialDepList ) - { - ByteString *pString = pPrjInitialDepList->First(); - while ( pString ) - { - delete pString; - pString = pPrjInitialDepList->Next(); - } - delete pPrjInitialDepList; - - pPrjInitialDepList = NULL; - } -} - -/*****************************************************************************/ -void Prj::AddDependencies( ByteString aStr ) -/*****************************************************************************/ -{ - - // needs dirty flag - not expanded - if ( !pPrjDepList ) - pPrjDepList = new SByteStringList; - - pPrjDepList->PutString( new ByteString(aStr) ); - - if ( !pPrjInitialDepList ) - pPrjInitialDepList = new SByteStringList; - - pPrjInitialDepList->PutString( new ByteString(aStr) ); -} - -/*****************************************************************************/ -SByteStringList* Prj::GetDependencies( BOOL bExpanded ) -/*****************************************************************************/ -{ - if ( bExpanded ) - return pPrjDepList; - else - return pPrjInitialDepList; -} - - - -/*****************************************************************************/ -BOOL Prj::InsertDirectory ( ByteString aDirName, USHORT aWhat, - USHORT aWhatOS, ByteString aLogFileName, - const ByteString &rClientRestriction ) -/*****************************************************************************/ -{ - CommandData* pData = new CommandData(); - - pData->SetPath( aDirName ); - pData->SetCommandType( aWhat ); - pData->SetOSType( aWhatOS ); - pData->SetLogFile( aLogFileName ); - pData->SetClientRestriction( rClientRestriction ); - - Insert( pData ); - - return FALSE; -} - -/*****************************************************************************/ -// -// removes directory and existing dependencies on it -// -CommandData* Prj::RemoveDirectory ( ByteString aLogFileName ) -/*****************************************************************************/ -{ - ULONG nCountMember = Count(); - CommandData* pData; - CommandData* pDataFound = NULL; - SByteStringList* pDataDeps; - - for ( USHORT i = 0; i < nCountMember; i++ ) - { - pData = GetObject( i ); - if ( pData->GetLogFile() == aLogFileName ) - pDataFound = pData; - else - { - pDataDeps = pData->GetDependencies(); - if ( pDataDeps ) - { - ByteString* pString; - ULONG nDataDepsCount = pDataDeps->Count(); - for ( ULONG j = nDataDepsCount; j > 0; j-- ) - { - pString = pDataDeps->GetObject( j - 1 ); - if ( pString->GetToken( 0, '.') == aLogFileName ) - pDataDeps->Remove( pString ); - } - } - } - } - - Remove( pDataFound ); - - return pDataFound; -} - -// -// class Star -// - -/*****************************************************************************/ -Star::Star() -/*****************************************************************************/ -{ - // this ctor is only used by StarWriter -} - -/*****************************************************************************/ -Star::Star(String aFileName, USHORT nMode ) -/*****************************************************************************/ - : nStarMode( nMode ) -{ - Read( aFileName ); -} - -/*****************************************************************************/ -Star::Star( SolarFileList *pSolarFiles ) -/*****************************************************************************/ - : nStarMode( STAR_MODE_MULTIPLE_PARSE ) -{ - // this ctor is used by StarBuilder to get the information for the whole workspace - Read( pSolarFiles ); -} - -/*****************************************************************************/ -Star::Star( GenericInformationList *pStandLst, ByteString &rVersion, - BOOL bLocal, const char *pSourceRoot ) -/*****************************************************************************/ -{ - ByteString sPath( rVersion ); - String sSrcRoot; - if ( pSourceRoot ) - sSrcRoot = String::CreateFromAscii( pSourceRoot ); - -#ifdef UNX - sPath += "/settings/UNXSOLARLIST"; -#else - sPath += "/settings/SOLARLIST"; -#endif - GenericInformation *pInfo = pStandLst->GetInfo( sPath, TRUE ); - - if( pInfo && pInfo->GetValue().Len()) { - ByteString sFile( pInfo->GetValue()); - if ( bLocal ) { - IniManager aIniManager; - aIniManager.ToLocal( sFile ); - } - String sFileName( sFile, RTL_TEXTENCODING_ASCII_US ); - nStarMode = STAR_MODE_SINGLE_PARSE; - Read( sFileName ); - } - else { - SolarFileList *pFileList = new SolarFileList(); - - sPath = rVersion; - sPath += "/drives"; - - GenericInformation *pInfo2 = pStandLst->GetInfo( sPath, TRUE ); - if ( pInfo2 && pInfo2->GetSubList()) { - GenericInformationList *pDrives = pInfo2->GetSubList(); - for ( ULONG i = 0; i < pDrives->Count(); i++ ) { - GenericInformation *pDrive = pDrives->GetObject( i ); - if ( pDrive ) { - DirEntry aEntry; - BOOL bOk = FALSE; - if ( sSrcRoot.Len()) { - aEntry = DirEntry( sSrcRoot ); - bOk = TRUE; - } - else { -#ifdef UNX - sPath = "UnixVolume"; - GenericInformation *pUnixVolume = pDrive->GetSubInfo( sPath ); - if ( pUnixVolume ) { - String sRoot( pUnixVolume->GetValue(), RTL_TEXTENCODING_ASCII_US ); - aEntry = DirEntry( sRoot ); - bOk = TRUE; - } -#else - bOk = TRUE; - String sRoot( *pDrive, RTL_TEXTENCODING_ASCII_US ); - sRoot += String::CreateFromAscii( "\\" ); - aEntry = DirEntry( sRoot ); -#endif - } - if ( bOk ) { - sPath = "projects"; - GenericInformation *pProjectsKey = pDrive->GetSubInfo( sPath, TRUE ); - if ( pProjectsKey ) { - if ( !sSrcRoot.Len()) { - sPath = rVersion; - sPath += "/settings/PATH"; - GenericInformation *pPath = pStandLst->GetInfo( sPath, TRUE ); - if( pPath ) { - ByteString sAddPath( pPath->GetValue()); -#ifdef UNX - sAddPath.SearchAndReplaceAll( "\\", "/" ); -#else - sAddPath.SearchAndReplaceAll( "/", "\\" ); -#endif - String ssAddPath( sAddPath, RTL_TEXTENCODING_ASCII_US ); - aEntry += DirEntry( ssAddPath ); - } - } - GenericInformationList *pProjects = pProjectsKey->GetSubList(); - if ( pProjects ) { - String sPrjDir( String::CreateFromAscii( "prj" )); - String sSolarFile( String::CreateFromAscii( "build.lst" )); - - for ( ULONG j = 0; j < pProjects->Count(); j++ ) { - ByteString sProject( *pProjects->GetObject( j )); - String ssProject( sProject, RTL_TEXTENCODING_ASCII_US ); - - DirEntry aPrjEntry( aEntry ); - - aPrjEntry += DirEntry( ssProject ); - aPrjEntry += DirEntry( sPrjDir ); - aPrjEntry += DirEntry( sSolarFile ); - - pFileList->Insert( new String( aPrjEntry.GetFull()), LIST_APPEND ); - - ByteString sFile( aPrjEntry.GetFull(), RTL_TEXTENCODING_ASCII_US ); - } - } - } - } - } - } - } - Read( pFileList ); - } -} - -/*****************************************************************************/ -Star::~Star() -/*****************************************************************************/ -{ -} - -/*****************************************************************************/ -BOOL Star::NeedsUpdate() -/*****************************************************************************/ -{ - aMutex.acquire(); - for ( ULONG i = 0; i < aLoadedFilesList.Count(); i++ ) - if ( aLoadedFilesList.GetObject( i )->NeedsUpdate()) { - aMutex.release(); - return TRUE; - } - - aMutex.release(); - return FALSE; -} - -/*****************************************************************************/ -void Star::Read( String &rFileName ) -/*****************************************************************************/ -{ - ByteString aString; - aFileList.Insert( new String( rFileName )); - - DirEntry aEntry( rFileName ); - aEntry.ToAbs(); - aEntry = aEntry.GetPath().GetPath().GetPath(); - sSourceRoot = aEntry.GetFull(); - - while( aFileList.Count()) { - StarFile *pFile = new StarFile( *aFileList.GetObject(( ULONG ) 0 )); - if ( pFile->Exists()) { - SimpleConfig aSolarConfig( *aFileList.GetObject(( ULONG ) 0 )); - while (( aString = aSolarConfig.GetNext()) != "" ) - InsertToken (( char * ) aString.GetBuffer()); - } - aMutex.acquire(); - aLoadedFilesList.Insert( pFile, LIST_APPEND ); - aMutex.release(); - aFileList.Remove(( ULONG ) 0 ); - } - // resolve all dependencies recursive - Expand_Impl(); -} - -/*****************************************************************************/ -void Star::Read( SolarFileList *pSolarFiles ) -/*****************************************************************************/ -{ - while( pSolarFiles->Count()) { - ByteString aString; - - StarFile *pFile = new StarFile( *pSolarFiles->GetObject(( ULONG ) 0 )); - if ( pFile->Exists()) { - SimpleConfig aSolarConfig( *pSolarFiles->GetObject(( ULONG ) 0 )); - while (( aString = aSolarConfig.GetNext()) != "" ) - InsertToken (( char * ) aString.GetBuffer()); - } - - aMutex.acquire(); - aLoadedFilesList.Insert( pFile, LIST_APPEND ); - aMutex.release(); - delete pSolarFiles->Remove(( ULONG ) 0 ); - } - delete pSolarFiles; - - Expand_Impl(); -} - -/*****************************************************************************/ -String Star::CreateFileName( String sProject ) -/*****************************************************************************/ -{ - // this method is used to find solarlist parts of nabours (other projects) - String sPrjDir( String::CreateFromAscii( "prj" )); - String sSolarFile( String::CreateFromAscii( "build.lst" )); - - DirEntry aEntry( sSourceRoot ); - aEntry += DirEntry( sProject ); - aEntry += DirEntry( sPrjDir ); - aEntry += DirEntry( sSolarFile ); - - if ( !aEntry.Exists() && aDBNotFoundHdl.IsSet()) - aDBNotFoundHdl.Call( &sProject ); - - return aEntry.GetFull(); -} - -/*****************************************************************************/ -void Star::InsertSolarList( String sProject ) -/*****************************************************************************/ -{ - // inserts a new solarlist part of another project - String sFileName( CreateFileName( sProject )); - - for ( ULONG i = 0; i < aFileList.Count(); i++ ) { - if (( *aFileList.GetObject( i )) == sFileName ) - return; - } - - ByteString ssProject( sProject, RTL_TEXTENCODING_ASCII_US ); - if ( HasProject( ssProject )) - return; - - aFileList.Insert( new String( sFileName ), LIST_APPEND ); -} - -/*****************************************************************************/ -void Star::ExpandPrj_Impl( Prj *pPrj, Prj *pDepPrj ) -/*****************************************************************************/ -{ - if ( pDepPrj->bVisited ) - return; - - pDepPrj->bVisited = TRUE; - - SByteStringList* pPrjLst = pPrj->GetDependencies(); - SByteStringList* pDepLst = NULL; - ByteString* pDepend; - ByteString* pPutStr; - Prj *pNextPrj = NULL; - ULONG i, nRetPos; - - if ( pPrjLst ) { - pDepLst = pDepPrj->GetDependencies(); - if ( pDepLst ) { - for ( i = 0; i < pDepLst->Count(); i++ ) { - pDepend = pDepLst->GetObject( i ); - pPutStr = new ByteString( *pDepend ); - nRetPos = pPrjLst->PutString( pPutStr ); - if( nRetPos == NOT_THERE ) - delete pPutStr; - pNextPrj = GetPrj( *pDepend ); - if ( pNextPrj ) { - ExpandPrj_Impl( pPrj, pNextPrj ); - } - } - } - } -} - -/*****************************************************************************/ -void Star::Expand_Impl() -/*****************************************************************************/ -{ - for ( ULONG i = 0; i < Count(); i++ ) { - for ( ULONG j = 0; j < Count(); j++ ) - GetObject( j )->bVisited = FALSE; - - Prj* pPrj = GetObject( i ); - ExpandPrj_Impl( pPrj, pPrj ); - } -} - -/*****************************************************************************/ -void Star::InsertToken ( char *yytext ) -/*****************************************************************************/ -{ - static int i = 0; - static ByteString aDirName, aWhat, aWhatOS, - sClientRestriction, aLogFileName, aProjectName, aPrefix, aCommandPara; - static BOOL bPrjDep = FALSE; - static BOOL bHardDep = FALSE; - static USHORT nCommandType, nOSType; - CommandData* pCmdData; - static SByteStringList *pStaticDepList; - Prj* pPrj; - - switch (i) - { - case 0: - aPrefix = yytext; - pStaticDepList = 0; - break; - case 1: - aDirName = yytext; - break; - case 2: - if ( !strcmp( yytext, ":" )) - { - bPrjDep = TRUE; - bHardDep = FALSE; - i = 9; - } - else if ( !strcmp( yytext, "::" )) - { - bPrjDep = TRUE; - bHardDep = TRUE; - i = 9; - } - else - { - bPrjDep = FALSE; - bHardDep = FALSE; - - aWhat = yytext; - if ( aWhat == "nmake" ) - nCommandType = COMMAND_NMAKE; - else if ( aWhat == "get" ) - nCommandType = COMMAND_GET; - else { - ULONG nOffset = aWhat.Copy( 3 ).ToInt32(); - nCommandType = sal::static_int_cast< USHORT >( - COMMAND_USER_START + nOffset - 1); - } - } - break; - case 3: - if ( !bPrjDep ) - { - aWhat = yytext; - if ( aWhat == "-" ) - { - aCommandPara = ByteString(); - } - else - aCommandPara = aWhat; - } - break; - case 4: - if ( !bPrjDep ) - { - aWhatOS = yytext; - if ( aWhatOS.GetTokenCount( ',' ) > 1 ) { - sClientRestriction = aWhatOS.Copy( aWhatOS.GetToken( 0, ',' ).Len() + 1 ); - aWhatOS = aWhatOS.GetToken( 0, ',' ); - } - if ( aWhatOS == "all" ) - nOSType = ( OS_WIN16 | OS_WIN32 | OS_OS2 | OS_UNX ); - else if ( aWhatOS == "w" ) - nOSType = ( OS_WIN16 | OS_WIN32 ); - else if ( aWhatOS == "p" ) - nOSType = OS_OS2; - else if ( aWhatOS == "u" ) - nOSType = OS_UNX; - else if ( aWhatOS == "d" ) - nOSType = OS_WIN16; - else if ( aWhatOS == "n" ) - nOSType = OS_WIN32; - else - nOSType = OS_NONE; - } - break; - case 5: - if ( !bPrjDep ) - { - aLogFileName = yytext; - } - break; - default: - if ( !bPrjDep ) - { - ByteString aItem = yytext; - if ( aItem == "NULL" ) - { - // Liste zu Ende - i = -1; - } - else - { - // ggfs. Dependency liste anlegen und ergaenzen - if ( !pStaticDepList ) - pStaticDepList = new SByteStringList; - pStaticDepList->PutString( new ByteString( aItem )); - } - } - else - { - ByteString aItem = yytext; - if ( aItem == "NULL" ) - { - // Liste zu Ende - i = -1; - bPrjDep= FALSE; - } - else - { - aProjectName = aDirName.GetToken ( 0, '\\'); - if ( HasProject( aProjectName )) - { - pPrj = GetPrj( aProjectName ); - // Projekt exist. schon, neue Eintraege anhaengen - } - else - { - // neues Project anlegen - pPrj = new Prj ( aProjectName ); - pPrj->SetPreFix( aPrefix ); - Insert(pPrj,LIST_APPEND); - } - pPrj->AddDependencies( aItem ); - pPrj->HasHardDependencies( bHardDep ); - - if ( nStarMode == STAR_MODE_RECURSIVE_PARSE ) { - String sItem( aItem, RTL_TEXTENCODING_ASCII_US ); - InsertSolarList( sItem ); - } - } - } - break; - } - /* Wenn dieses Project noch nicht vertreten ist, in die Liste - der Solar-Projekte einfuegen */ - if ( i == -1 ) - { - aProjectName = aDirName.GetToken ( 0, '\\'); - if ( HasProject( aProjectName )) - { - pPrj = GetPrj( aProjectName ); - // Projekt exist. schon, neue Eintraege anhaengen - } - else - { - // neues Project anlegen - pPrj = new Prj ( aProjectName ); - pPrj->SetPreFix( aPrefix ); - Insert(pPrj,LIST_APPEND); - } - - pCmdData = new CommandData; - pCmdData->SetPath( aDirName ); - pCmdData->SetCommandType( nCommandType ); - pCmdData->SetCommandPara( aCommandPara ); - pCmdData->SetOSType( nOSType ); - pCmdData->SetLogFile( aLogFileName ); - pCmdData->SetClientRestriction( sClientRestriction ); - if ( pStaticDepList ) - pCmdData->SetDependencies( pStaticDepList ); - - pStaticDepList = 0; - pPrj->Insert ( pCmdData, LIST_APPEND ); - aDirName =""; - aWhat =""; - aWhatOS = ""; - sClientRestriction = ""; - aLogFileName = ""; - nCommandType = 0; - nOSType = 0; - } - i++; - - // und wer raeumt die depLst wieder ab ? -} - -/*****************************************************************************/ -BOOL Star::HasProject ( ByteString aProjectName ) -/*****************************************************************************/ -{ - Prj *pPrj; - int nCountMember; - - nCountMember = Count(); - - for ( int i=0; i<nCountMember; i++) - { - pPrj = GetObject(i); - if ( pPrj->GetProjectName().EqualsIgnoreCaseAscii(aProjectName) ) - return TRUE; - } - return FALSE; -} - -/*****************************************************************************/ -Prj* Star::GetPrj ( ByteString aProjectName ) -/*****************************************************************************/ -{ - Prj* pPrj; - int nCountMember = Count(); - for ( int i=0;i<nCountMember;i++) - { - pPrj = GetObject(i); - if ( pPrj->GetProjectName().EqualsIgnoreCaseAscii(aProjectName) ) - return pPrj; - } -// return (Prj*)NULL; - return 0L ; -} - -/*****************************************************************************/ -ByteString Star::GetPrjName( DirEntry &aPath ) -/*****************************************************************************/ -{ - ByteString aRetPrj, aDirName; - ByteString aFullPathName = ByteString( aPath.GetFull(), gsl_getSystemTextEncoding()); - - xub_StrLen nToken = aFullPathName.GetTokenCount(PATH_DELIMETER); - for ( xub_StrLen i=0; i< nToken; i++ ) - { - aDirName = aFullPathName.GetToken( i, PATH_DELIMETER ); - if ( HasProject( aDirName )) - { - aRetPrj = aDirName; - break; - } - } - - return aRetPrj; -} - - -// -// class StarWriter -// - -/*****************************************************************************/ -StarWriter::StarWriter( String aFileName, BOOL bReadComments, USHORT nMode ) -/*****************************************************************************/ -{ - Read ( aFileName, bReadComments, nMode ); -} - -/*****************************************************************************/ -StarWriter::StarWriter( SolarFileList *pSolarFiles, BOOL bReadComments ) -/*****************************************************************************/ -{ - Read( pSolarFiles, bReadComments ); -} - -/*****************************************************************************/ -StarWriter::StarWriter( GenericInformationList *pStandLst, ByteString &rVersion, - BOOL bLocal, const char *pSourceRoot ) -/*****************************************************************************/ -{ - ByteString sPath( rVersion ); - String sSrcRoot; - if ( pSourceRoot ) - sSrcRoot = String::CreateFromAscii( pSourceRoot ); - -#ifdef UNX - sPath += "/settings/UNXSOLARLIST"; -#else - sPath += "/settings/SOLARLIST"; -#endif - GenericInformation *pInfo = pStandLst->GetInfo( sPath, TRUE ); - - if( pInfo && pInfo->GetValue().Len()) { - ByteString sFile( pInfo->GetValue()); - if ( bLocal ) { - IniManager aIniManager; - aIniManager.ToLocal( sFile ); - } - String sFileName( sFile, RTL_TEXTENCODING_ASCII_US ); - nStarMode = STAR_MODE_SINGLE_PARSE; - Read( sFileName ); - } - else { - SolarFileList *pFileList = new SolarFileList(); - - sPath = rVersion; - sPath += "/drives"; - - GenericInformation *pInfo2 = pStandLst->GetInfo( sPath, TRUE ); - if ( pInfo2 && pInfo2->GetSubList()) { - GenericInformationList *pDrives = pInfo2->GetSubList(); - for ( ULONG i = 0; i < pDrives->Count(); i++ ) { - GenericInformation *pDrive = pDrives->GetObject( i ); - if ( pDrive ) { - DirEntry aEntry; - BOOL bOk = FALSE; - if ( sSrcRoot.Len()) { - aEntry = DirEntry( sSrcRoot ); - bOk = TRUE; - } - else { -#ifdef UNX - sPath = "UnixVolume"; - GenericInformation *pUnixVolume = pDrive->GetSubInfo( sPath ); - if ( pUnixVolume ) { - String sRoot( pUnixVolume->GetValue(), RTL_TEXTENCODING_ASCII_US ); - aEntry = DirEntry( sRoot ); - bOk = TRUE; - } -#else - bOk = TRUE; - String sRoot( *pDrive, RTL_TEXTENCODING_ASCII_US ); - sRoot += String::CreateFromAscii( "\\" ); - aEntry = DirEntry( sRoot ); -#endif - } - if ( bOk ) { - sPath = "projects"; - GenericInformation *pProjectsKey = pDrive->GetSubInfo( sPath, TRUE ); - if ( pProjectsKey ) { - if ( !sSrcRoot.Len()) { - sPath = rVersion; - sPath += "/settings/PATH"; - GenericInformation *pPath = pStandLst->GetInfo( sPath, TRUE ); - if( pPath ) { - ByteString sAddPath( pPath->GetValue()); -#ifdef UNX - sAddPath.SearchAndReplaceAll( "\\", "/" ); -#else - sAddPath.SearchAndReplaceAll( "/", "\\" ); -#endif - String ssAddPath( sAddPath, RTL_TEXTENCODING_ASCII_US ); - aEntry += DirEntry( ssAddPath ); - } - } - GenericInformationList *pProjects = pProjectsKey->GetSubList(); - if ( pProjects ) { - String sPrjDir( String::CreateFromAscii( "prj" )); - String sSolarFile( String::CreateFromAscii( "build.lst" )); - - for ( ULONG j = 0; j < pProjects->Count(); j++ ) { - ByteString sProject( *pProjects->GetObject( j )); - String ssProject( sProject, RTL_TEXTENCODING_ASCII_US ); - - DirEntry aPrjEntry( aEntry ); - - aPrjEntry += DirEntry( ssProject ); - aPrjEntry += DirEntry( sPrjDir ); - aPrjEntry += DirEntry( sSolarFile ); - - pFileList->Insert( new String( aPrjEntry.GetFull()), LIST_APPEND ); - - ByteString sFile( aPrjEntry.GetFull(), RTL_TEXTENCODING_ASCII_US ); - fprintf( stdout, "%s\n", sFile.GetBuffer()); - } - } - } - } - } - } - } - Read( pFileList ); - } -} - -/*****************************************************************************/ -void StarWriter::CleanUp() -/*****************************************************************************/ -{ - Expand_Impl(); -} - -/*****************************************************************************/ -USHORT StarWriter::Read( String aFileName, BOOL bReadComments, USHORT nMode ) -/*****************************************************************************/ -{ - nStarMode = nMode; - - ByteString aString; - aFileList.Insert( new String( aFileName )); - - DirEntry aEntry( aFileName ); - aEntry.ToAbs(); - aEntry = aEntry.GetPath().GetPath().GetPath(); - sSourceRoot = aEntry.GetFull(); - - while( aFileList.Count()) { - - StarFile *pFile = new StarFile( *aFileList.GetObject(( ULONG ) 0 )); - if ( pFile->Exists()) { - SimpleConfig aSolarConfig( *aFileList.GetObject(( ULONG ) 0 )); - while (( aString = aSolarConfig.GetCleanedNextLine( bReadComments )) != "" ) - InsertTokenLine ( aString ); - } - - aMutex.acquire(); - aLoadedFilesList.Insert( pFile, LIST_APPEND ); - aMutex.release(); - delete aFileList.Remove(( ULONG ) 0 ); - } - // resolve all dependencies recursive - Expand_Impl(); - - // Die gefundenen Abhaengigkeiten rekursiv aufloesen - Expand_Impl(); - return 0; -} - -/*****************************************************************************/ -USHORT StarWriter::Read( SolarFileList *pSolarFiles, BOOL bReadComments ) -/*****************************************************************************/ -{ - nStarMode = STAR_MODE_MULTIPLE_PARSE; - - // this ctor is used by StarBuilder to get the information for the whole workspace - while( pSolarFiles->Count()) { - ByteString aString; - - StarFile *pFile = new StarFile( *pSolarFiles->GetObject(( ULONG ) 0 )); - if ( pFile->Exists()) { - SimpleConfig aSolarConfig( *pSolarFiles->GetObject(( ULONG ) 0 )); - while (( aString = aSolarConfig.GetCleanedNextLine( bReadComments )) != "" ) - InsertTokenLine ( aString ); - } - - aMutex.acquire(); - aLoadedFilesList.Insert( pFile, LIST_APPEND ); - aMutex.release(); - delete pSolarFiles->Remove(( ULONG ) 0 ); - } - delete pSolarFiles; - - Expand_Impl(); - return 0; -} - -/*****************************************************************************/ -USHORT StarWriter::WritePrj( Prj *pPrj, SvFileStream& rStream ) -/*****************************************************************************/ -{ - ByteString aDataString; - ByteString aTab('\t'); - ByteString aSpace(' '); - ByteString aEmptyString(""); - SByteStringList* pCmdDepList; - - CommandData* pCmdData = NULL; - if ( pPrj->Count() > 0 ) - { - pCmdData = pPrj->First(); - SByteStringList* pPrjDepList = pPrj->GetDependencies( FALSE ); - if ( pPrjDepList != 0 ) - { - aDataString = pPrj->GetPreFix(); - aDataString += aTab; - aDataString += pPrj->GetProjectName(); - aDataString += aTab; - if ( pPrj->HasHardDependencies()) - aDataString+= ByteString("::"); - else - aDataString+= ByteString(":"); - aDataString += aTab; - for ( USHORT i = 0; i< pPrjDepList->Count(); i++ ) { - aDataString += *pPrjDepList->GetObject( i ); - aDataString += aSpace; - } - aDataString+= "NULL"; - - rStream.WriteLine( aDataString ); - - pCmdData = pPrj->Next(); - } - if ( pCmdData ) { - do - { - if (( aDataString = pCmdData->GetComment()) == aEmptyString ) - { - aDataString = pPrj->GetPreFix(); - aDataString += aTab; - - aDataString+= pCmdData->GetPath(); - aDataString += aTab; - USHORT nPathLen = pCmdData->GetPath().Len(); - if ( nPathLen < 40 ) - for ( int i = 0; i < 9 - pCmdData->GetPath().Len() / 4 ; i++ ) - aDataString += aTab; - else - for ( int i = 0; i < 12 - pCmdData->GetPath().Len() / 4 ; i++ ) - aDataString += aTab; - aDataString += pCmdData->GetCommandTypeString(); - aDataString += aTab; - if ( pCmdData->GetCommandType() == COMMAND_GET ) - aDataString += aTab; - if ( pCmdData->GetCommandPara() == aEmptyString ) - aDataString+= ByteString("-"); - else - aDataString+= pCmdData->GetCommandPara(); - aDataString += aTab; - aDataString+= pCmdData->GetOSTypeString(); - if ( pCmdData->GetClientRestriction().Len()) { - aDataString += ByteString( "," ); - aDataString += pCmdData->GetClientRestriction(); - } - aDataString += aTab; - aDataString += pCmdData->GetLogFile(); - aDataString += aSpace; - - pCmdDepList = pCmdData->GetDependencies(); - if ( pCmdDepList ) - for ( USHORT i = 0; i< pCmdDepList->Count(); i++ ) { - aDataString += *pCmdDepList->GetObject( i ); - aDataString += aSpace; - } - aDataString += "NULL"; - } - - rStream.WriteLine( aDataString ); - - pCmdData = pPrj->Next(); - } while ( pCmdData ); - } - } - return 0; -} - -/*****************************************************************************/ -USHORT StarWriter::Write( String aFileName ) -/*****************************************************************************/ -{ - SvFileStream aFileStream; - - aFileStream.Open( aFileName, STREAM_WRITE | STREAM_TRUNC); - - if ( Count() > 0 ) - { - Prj* pPrj = First(); - do - { - WritePrj( pPrj, aFileStream ); - pPrj = Next(); - } while ( pPrj ); - } - - aFileStream.Close(); - - return 0; -} - -/*****************************************************************************/ -USHORT StarWriter::WriteMultiple( String rSourceRoot ) -/*****************************************************************************/ -{ - if ( Count() > 0 ) - { - String sPrjDir( String::CreateFromAscii( "prj" )); - String sSolarFile( String::CreateFromAscii( "build.lst" )); - - Prj* pPrj = First(); - do - { - String sName( pPrj->GetProjectName(), RTL_TEXTENCODING_ASCII_US ); - - DirEntry aEntry( rSourceRoot ); - aEntry += DirEntry( sName ); - aEntry += DirEntry( sPrjDir ); - aEntry += DirEntry( sSolarFile ); - - SvFileStream aFileStream; - aFileStream.Open( aEntry.GetFull(), STREAM_WRITE | STREAM_TRUNC); - - WritePrj( pPrj, aFileStream ); - - aFileStream.Close(); - - pPrj = Next(); - } while ( pPrj ); - } - - return 0; -} - -/*****************************************************************************/ -void StarWriter::InsertTokenLine ( ByteString& rString ) -/*****************************************************************************/ -{ - int i = 0; - ByteString aWhat, aWhatOS, - sClientRestriction, aLogFileName, aProjectName, aPrefix, aCommandPara; - static ByteString aDirName; - BOOL bPrjDep = FALSE; - BOOL bHardDep = FALSE; - USHORT nCommandType = 0; - USHORT nOSType = 0; - CommandData* pCmdData; - SByteStringList *pDepList2 = NULL; - Prj* pPrj; - - ByteString aEmptyString; - ByteString aToken = rString.GetToken( 0, '\t' ); - ByteString aCommentString; - - const char* yytext = aToken.GetBuffer(); - - while ( !( aToken == aEmptyString ) ) - { - switch (i) - { - case 0: - if ( rString.Search( "#" ) == 0 ) - { - i = -1; - aCommentString = rString; - rString = aEmptyString; - if ( Count() == 0 ) - aDirName = "null_entry" ; //comments at begin of file - break; - } - aPrefix = yytext; - pDepList2 = NULL; - break; - case 1: - aDirName = yytext; - break; - case 2: - if ( !strcmp( yytext, ":" )) - { - bPrjDep = TRUE; - bHardDep = FALSE; - i = 9; - } - else if ( !strcmp( yytext, "::" )) - { - bPrjDep = TRUE; - bHardDep = TRUE; - i = 9; - } - else - { - bPrjDep = FALSE; - bHardDep = FALSE; - - aWhat = yytext; - if ( aWhat == "nmake" ) - nCommandType = COMMAND_NMAKE; - else if ( aWhat == "get" ) - nCommandType = COMMAND_GET; - else { - ULONG nOffset = aWhat.Copy( 3 ).ToInt32(); - nCommandType = sal::static_int_cast< USHORT >( - COMMAND_USER_START + nOffset - 1); - } - } - break; - case 3: - if ( !bPrjDep ) - { - aWhat = yytext; - if ( aWhat == "-" ) - { - aCommandPara = ByteString(); - } - else - aCommandPara = aWhat; - } - break; - case 4: - if ( !bPrjDep ) - { - aWhatOS = yytext; - if ( aWhatOS.GetTokenCount( ',' ) > 1 ) { - sClientRestriction = aWhatOS.Copy( aWhatOS.GetToken( 0, ',' ).Len() + 1 ); - aWhatOS = aWhatOS.GetToken( 0, ',' ); - } - aWhatOS = aWhatOS.GetToken( 0, ',' ); - if ( aWhatOS == "all" ) - nOSType = ( OS_WIN16 | OS_WIN32 | OS_OS2 | OS_UNX ); - else if ( aWhatOS == "w" ) - nOSType = ( OS_WIN16 | OS_WIN32 ); - else if ( aWhatOS == "p" ) - nOSType = OS_OS2; - else if ( aWhatOS == "u" ) - nOSType = OS_UNX; - else if ( aWhatOS == "d" ) - nOSType = OS_WIN16; - else if ( aWhatOS == "n" ) - nOSType = OS_WIN32; - else - nOSType = OS_NONE; - } - break; - case 5: - if ( !bPrjDep ) - { - aLogFileName = yytext; - } - break; - default: - if ( !bPrjDep ) - { - ByteString aItem = yytext; - if ( aItem == "NULL" ) - { - // Liste zu Ende - i = -1; - } - else - { - // ggfs. Dependency liste anlegen und ergaenzen - if ( !pDepList2 ) - pDepList2 = new SByteStringList; - pDepList2->PutString( new ByteString( aItem )); - } - } - else - { - ByteString aItem = yytext; - if ( aItem == "NULL" ) - { - // Liste zu Ende - i = -1; - bPrjDep= FALSE; - } - else - { - aProjectName = aDirName.GetToken ( 0, '\\'); - if ( HasProject( aProjectName )) - { - pPrj = GetPrj( aProjectName ); - // Projekt exist. schon, neue Eintraege anhaengen - } - else - { - // neues Project anlegen - pPrj = new Prj ( aProjectName ); - pPrj->SetPreFix( aPrefix ); - Insert(pPrj,LIST_APPEND); - } - pPrj->AddDependencies( aItem ); - pPrj->HasHardDependencies( bHardDep ); - - if ( nStarMode == STAR_MODE_RECURSIVE_PARSE ) { - String sItem( aItem, RTL_TEXTENCODING_ASCII_US ); - InsertSolarList( sItem ); - } - } - - } - break; - } - /* Wenn dieses Project noch nicht vertreten ist, in die Liste - der Solar-Projekte einfuegen */ - if ( i == -1 ) - { - aProjectName = aDirName.GetToken ( 0, '\\'); - if ( HasProject( aProjectName )) - { - pPrj = GetPrj( aProjectName ); - // Projekt exist. schon, neue Eintraege anhaengen - } - else - { - // neues Project anlegen - pPrj = new Prj ( aProjectName ); - pPrj->SetPreFix( aPrefix ); - Insert(pPrj,LIST_APPEND); - } - - pCmdData = new CommandData; - pCmdData->SetPath( aDirName ); - pCmdData->SetCommandType( nCommandType ); - pCmdData->SetCommandPara( aCommandPara ); - pCmdData->SetOSType( nOSType ); - pCmdData->SetLogFile( aLogFileName ); - pCmdData->SetComment( aCommentString ); - pCmdData->SetClientRestriction( sClientRestriction ); - if ( pDepList2 ) - pCmdData->SetDependencies( pDepList2 ); - - pPrj->Insert ( pCmdData, LIST_APPEND ); - - } - i++; - - rString.Erase(0, aToken.Len()+1); - aToken = rString.GetToken( 0, '\t' ); - yytext = aToken.GetBuffer(); - - } - // und wer raeumt die depLst wieder ab ? -} - -/*****************************************************************************/ -BOOL StarWriter::InsertProject ( Prj* ) -/*****************************************************************************/ -{ - return FALSE; -} - -/*****************************************************************************/ -Prj* StarWriter::RemoveProject ( ByteString aProjectName ) -/*****************************************************************************/ -{ - ULONG nCountMember = Count(); - Prj* pPrj; - Prj* pPrjFound = NULL; - SByteStringList* pPrjDeps; - - for ( USHORT i = 0; i < nCountMember; i++ ) - { - pPrj = GetObject( i ); - if ( pPrj->GetProjectName() == aProjectName ) - pPrjFound = pPrj; - else - { - pPrjDeps = pPrj->GetDependencies( FALSE ); - if ( pPrjDeps ) - { - ByteString* pString; - ULONG nPrjDepsCount = pPrjDeps->Count(); - for ( ULONG j = nPrjDepsCount; j > 0; j-- ) - { - pString = pPrjDeps->GetObject( j - 1 ); - if ( pString->GetToken( 0, '.') == aProjectName ) - pPrjDeps->Remove( pString ); - } - } - } - } - - Remove( pPrjFound ); - - return pPrjFound; -} - -// -// class StarFile -// - -/*****************************************************************************/ -StarFile::StarFile( const String &rFile ) -/*****************************************************************************/ - : aFileName( rFile ) -{ - DirEntry aEntry( aFileName ); - if ( aEntry.Exists()) { - bExists = TRUE; - FileStat aStat( aEntry ); - aDate = aStat.DateModified(); - aTime = aStat.TimeModified(); - } - else - bExists = FALSE; -} - -/*****************************************************************************/ -BOOL StarFile::NeedsUpdate() -/*****************************************************************************/ -{ - DirEntry aEntry( aFileName ); - if ( aEntry.Exists()) { - if ( !bExists ) { - bExists = TRUE; - return TRUE; - } - FileStat aStat( aEntry ); - if (( aStat.DateModified() > aDate ) || - (( aStat.DateModified() == aDate ) && ( aStat.TimeModified() > aTime ))) - return TRUE; - } - return FALSE; -} - diff --git a/tools/bootstrp/rscdep.cxx b/tools/bootstrp/rscdep.cxx index 37edfc6a8c18..9eddce53a678 100644 --- a/tools/bootstrp/rscdep.cxx +++ b/tools/bootstrp/rscdep.cxx @@ -80,7 +80,7 @@ void RscHrcDep::Execute() //static String aDelim; -SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) +int main( int argc, char** argv ) { int c; char aBuf[255]; diff --git a/tools/bootstrp/sstring.cxx b/tools/bootstrp/sstring.cxx deleted file mode 100644 index 8c83dedf72ec..000000000000 --- a/tools/bootstrp/sstring.cxx +++ /dev/null @@ -1,317 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_tools.hxx" - -#ifndef _TOOLS_STRINGLIST -# define _TOOLS_STRINGLIST -#endif - -#define ENABLE_BYTESTRING_STREAM_OPERATORS -#include <tools/stream.hxx> -#include "bootstrp/sstring.hxx" - -SByteStringList::SByteStringList() -{ -} - -SByteStringList::~SByteStringList() -{ -} - -ULONG SByteStringList::IsString( ByteString* pStr ) -{ - ULONG nRet = NOT_THERE; - if ( (nRet = GetPrevString( pStr )) != 0 ) - { - ByteString* pString = GetObject( nRet ); - if ( *pString == *pStr ) - return nRet; - else - return NOT_THERE; - } - else - { - ByteString* pString = GetObject( 0 ); - if ( pString && (*pString == *pStr) ) - return 0; - else - return NOT_THERE; - } -} - -ULONG SByteStringList::GetPrevString( ByteString* pStr ) -{ - ULONG nRet = 0; - BOOL bFound = FALSE; - ULONG nCountMember = Count(); - ULONG nUpper = nCountMember; - ULONG nLower = 0; - ULONG nCurrent = nUpper / 2; - ULONG nRem = 0; - ByteString* pString; - - do - { - if ( (nCurrent == nLower) || (nCurrent == nUpper) ) - return nLower; - pString = GetObject( nCurrent ); - StringCompare nResult = pStr->CompareTo( *pString ); - if ( nResult == COMPARE_LESS ) - { - nUpper = nCurrent; - nCurrent = (nCurrent + nLower) /2; - } - else if ( nResult == COMPARE_GREATER ) - { - nLower = nCurrent; - nCurrent = (nUpper + nCurrent) /2; - } - else if ( nResult == COMPARE_EQUAL ) - return nCurrent; - if ( nRem == nCurrent ) - return nCurrent; - nRem = nCurrent; - } - while ( !bFound ); - return nRet; -} - -/************************************************************************** -* -* Sortiert einen ByteString in die Liste ein und gibt die Position, -* an der einsortiert wurde, zurueck -* -**************************************************************************/ - -ULONG SByteStringList::PutString( ByteString* pStr ) -{ - ULONG nPos = GetPrevString ( pStr ); - if ( Count() ) - { - { - ByteString* pString = GetObject( 0 ); - if ( pString->CompareTo( *pStr ) == COMPARE_GREATER ) - { - Insert( pStr, (ULONG)0 ); - return (ULONG)0; - } - } - ByteString* pString = GetObject( nPos ); - if ( *pStr != *pString ) - { - Insert( pStr, nPos+1 ); - return ( nPos +1 ); - } - } - else - { - Insert( pStr ); - return (ULONG)0; - } - - return NOT_THERE; -} - -ByteString* SByteStringList::RemoveString( const ByteString& rName ) -{ - ULONG i; - ByteString* pReturn; - - for( i = 0 ; i < Count(); i++ ) - { - if ( rName == *GetObject( i ) ) - { - pReturn = GetObject(i); - Remove(i); - return pReturn; - } - } - - return NULL; -} - -void SByteStringList::CleanUp() -{ - ByteString* pByteString = First(); - while (pByteString) { - delete pByteString; - pByteString = Next(); - } - Clear(); -} - -SByteStringList& SByteStringList::operator<< ( SvStream& rStream ) -{ - sal_uInt32 nListCount; - rStream >> nListCount; - for ( USHORT i = 0; i < nListCount; i++ ) { - ByteString* pByteString = new ByteString(); - rStream >> *pByteString; - Insert (pByteString, LIST_APPEND); - } - return *this; -} - -SByteStringList& SByteStringList::operator>> ( SvStream& rStream ) -{ - sal_uInt32 nListCount = Count(); - rStream << nListCount; - ByteString* pByteString = First(); - while (pByteString) { - rStream << *pByteString; - pByteString = Next(); - } - return *this; -} - - - - - - - -SUniStringList::SUniStringList() -{ -} - -SUniStringList::~SUniStringList() -{ -} - -ULONG SUniStringList::IsString( UniString* pStr ) -{ - ULONG nRet = NOT_THERE; - if ( (nRet = GetPrevString( pStr )) != 0 ) - { - UniString* pString = GetObject( nRet ); - if ( *pString == *pStr ) - return nRet; - else - return NOT_THERE; - } - else - { - UniString* pString = GetObject( 0 ); - if ( pString && (*pString == *pStr) ) - return 0; - else - return NOT_THERE; - } -} - -ULONG SUniStringList::GetPrevString( UniString* pStr ) -{ - ULONG nRet = 0; - BOOL bFound = FALSE; - ULONG nCountMember = Count(); - ULONG nUpper = nCountMember; - ULONG nLower = 0; - ULONG nCurrent = nUpper / 2; - ULONG nRem = 0; - UniString* pString; - - do - { - if ( (nCurrent == nLower) || (nCurrent == nUpper) ) - return nLower; - pString = GetObject( nCurrent ); - StringCompare nResult = pStr->CompareTo( *pString ); - if ( nResult == COMPARE_LESS ) - { - nUpper = nCurrent; - nCurrent = (nCurrent + nLower) /2; - } - else if ( nResult == COMPARE_GREATER ) - { - nLower = nCurrent; - nCurrent = (nUpper + nCurrent) /2; - } - else if ( nResult == COMPARE_EQUAL ) - return nCurrent; - if ( nRem == nCurrent ) - return nCurrent; - nRem = nCurrent; - } - while ( !bFound ); - return nRet; -} - -/************************************************************************** -* -* Sortiert einen UniString in die Liste ein und gibt die Position, -* an der einsortiert wurde, zurueck -* -**************************************************************************/ - -ULONG SUniStringList::PutString( UniString* pStr ) -{ - ULONG nPos = GetPrevString ( pStr ); - if ( Count() ) - { - { - UniString* pString = GetObject( 0 ); - if ( pString->CompareTo( *pStr ) == COMPARE_GREATER ) - { - Insert( pStr, (ULONG)0); - return (ULONG)0; - } - } - UniString* pString = GetObject( nPos ); - if ( *pStr != *pString ) - { - Insert( pStr, nPos+1 ); - return ( nPos +1 ); - } - } - else - { - Insert( pStr ); - return (ULONG)0; - } - - return NOT_THERE; -} - -UniString* SUniStringList::RemoveString( const UniString& rName ) -{ - ULONG i; - UniString* pReturn; - - for( i = 0 ; i < Count(); i++ ) - { - if ( rName == *GetObject( i ) ) - { - pReturn = GetObject(i); - Remove(i); - return pReturn; - } - } - - return NULL; -} diff --git a/tools/inc/bootstrp/command.hxx b/tools/inc/bootstrp/command.hxx deleted file mode 100644 index 638beb6cce1f..000000000000 --- a/tools/inc/bootstrp/command.hxx +++ /dev/null @@ -1,163 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef COMMAND_HXX -#define COMMAND_HXX - -#include <iostream> - -#include <tools/stream.hxx> -#define STRLEN 100 -#ifndef UNX -#define TMPNAME "\\command.tmp" -#else -#define TMPNAME "/tmp/command.tmp" -#endif - -/** Different types of spawnable programs -*/ -enum ExeType -{ - EXE, /// programm is a native executable - BAT, /// programm is a DOS-Batch - BTM /// programm is a 4DOS-Batch -}; - -#define COMMAND_NOTFOUND 0x0001 -#define COMMAND_TOOBIG 0x0002 -#define COMMAND_INVALID 0x0004 -#define COMMAND_NOEXEC 0x0008 -#define COMMAND_NOMEM 0x0010 -#define COMMAND_UNKNOWN 0x0020 - -#ifdef WNT -#define COMMAND_SHELL "4nt.exe" -#endif -#ifdef OS2 -#define COMMAND_SHELL "4os2.exe" -#endif -#ifdef UNX -#define COMMAND_SHELL "csh" -#endif - -class CommandLine; -class LogWindow; - -class CommandLine -{ -friend class ChildProcess; -private: - char *CommandBuffer; - char *ComShell; - char **ppArgv; - BOOL bTmpWrite; - -public: - CommandLine(BOOL bTmpWrite = FALSE); - CommandLine(const char *, BOOL bTmpWrite = FALSE); - CommandLine(const CommandLine&, BOOL bTmpWrite = FALSE); - virtual ~CommandLine(); - - int nArgc; - - CommandLine& operator=(const CommandLine&); - CommandLine& operator=(const char *); - void BuildCommand(const char *); - char** GetCommand(void) { return ppArgv; } - void Strtokens(const char *); - void Print(); -}; - -/** Declares and spawns a child process. - The spawned programm could be a native executable or a schell script. -*/ -class CCommand -{ -private: - ByteString aCommandLine; - ByteString aCommand; - char *pArgv; - char **ppArgv; - ULONG nArgc; - int nError; - -protected: - void ImplInit(); - void Initpp( ULONG nCount, ByteString &rStr ); - -public: - /** Creates the process specified without spawning it - @param rString specifies the programm or shell scrip - */ - CCommand( ByteString &rString ); - - /** Creates the process specified without spawning it - @param pChar specifies the programm or shell scrip - */ - CCommand( const char *pChar ); - - /** Try to find the given programm in specified path - @param sEnv specifies the current search path, defaulted by environment - @param sItem specifies the system shell - @return the Location (when programm was found) - */ - static ByteString Search( ByteString sEnv, - ByteString sItem = COMMAND_SHELL ); - - /** Spawns the Process - @return 0 when spawned without errors, otherwise a error code - */ - operator int(); - - ByteString GetCommandLine_() { return aCommandLine; } - ByteString GetCommand() { return aCommand; } - - char** GetCommandStr() { return ppArgv; } -}; - -#define COMMAND_EXECUTE_WINDOW 0x0000001 -#define COMMAND_EXECUTE_CONSOLE 0x0000002 -#define COMMAND_EXECUTE_HIDDEN 0x0000004 -#define COMMAND_EXECUTE_START 0x0000008 -#define COMMAND_EXECUTE_WAIT 0x0000010 -#define COMMAND_EXECUTE_REMOTE 0x1000000 - -typedef ULONG CommandBits; - -/** Allowes to spawn programms hidden, waiting etc. - @see CCommand -*/ -class CCommandd : public CCommand -{ - CommandBits nFlag; -public: - CCommandd( ByteString &rString, CommandBits nBits ); - CCommandd( const char *pChar, CommandBits nBits ); - operator int(); -}; - -#endif diff --git a/tools/inc/bootstrp/listmacr.hxx b/tools/inc/bootstrp/listmacr.hxx deleted file mode 100644 index 8c678ff32275..000000000000 --- a/tools/inc/bootstrp/listmacr.hxx +++ /dev/null @@ -1,60 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _LISTMACR_HXX -#define _LISTMACR_HXX - -#define DECL_DEST_LIST( TmpListType, ListType, PointerType ) \ -DECLARE_LIST(TmpListType, PointerType) \ -class ListType : public TmpListType \ -{ \ -public: \ - void ClearAndDelete() \ - { \ - while ( Count()) { \ - PointerType pTmp = GetObject(( ULONG ) 0 ); \ - delete pTmp; \ - Remove(( ULONG ) 0 ); \ - } \ - } \ - ~ListType() \ - { \ - ClearAndDelete(); \ - } \ -}; \ - -#endif - - - - - - - - - - diff --git a/tools/inc/bootstrp/mkcreate.hxx b/tools/inc/bootstrp/mkcreate.hxx index 991b5961a096..5510fb87f7b9 100644 --- a/tools/inc/bootstrp/mkcreate.hxx +++ b/tools/inc/bootstrp/mkcreate.hxx @@ -29,7 +29,9 @@ #define _MK_CREATE_HXX #include <tools/string.hxx> -#include "bootstrp/sstring.hxx" +//#include "bootstrp/sstring.hxx" + +DECLARE_LIST( UniStringList, UniString* ) #include <tools/list.hxx> #include "bootstrp/prj.hxx" diff --git a/tools/inc/bootstrp/prj.hxx b/tools/inc/bootstrp/prj.hxx index 994418bae4b5..4b1ff91feb7b 100644 --- a/tools/inc/bootstrp/prj.hxx +++ b/tools/inc/bootstrp/prj.hxx @@ -30,98 +30,6 @@ #include <tools/fsys.hxx> #include <tools/stream.hxx> -#include "bootstrp/listmacr.hxx" -#include <vos/mutex.hxx> - -#define OS_NONE 0x0000 -#define OS_WIN16 0x0001 -#define OS_WIN32 0x0002 -#define OS_OS2 0x0004 -#define OS_UNX 0x0008 -#define OS_ALL ( OS_WIN16 | OS_WIN32 | OS_OS2 | OS_UNX ) - -#define COMMAND_PROJECTROOT 0x0000 -#define COMMAND_NMAKE 0x0001 -#define COMMAND_GET 0x0002 -#define COMMAND_USER_START 0x0003 -#define COMMAND_USER_END 0xFFFE -#define COMMAND_ALLDIRS 0xFFFF - -class SByteStringList; -class GenericInformationList; - -/* -// Pfade auf Konfigurationsdateien des Build-Servers - -#define REQUEST_DIR \\src\data4\source\b_server\server\newjob -*/ -/********************************************************************* -* -* Die Klasse CommandData haelte alle Informationen, die fuer die -* Abarbeitung eines Kommandos (nmake, get) noetig sind -* -*********************************************************************/ - -class CommandData -{ - ByteString aPrj; - ByteString aLogFileName; - ByteString aInpath; - ByteString aUpd; - ByteString aUpdMinor; - ByteString aProduct; - ByteString aCommand; - ByteString aPath; - ByteString aPrePath; - ByteString aPreFix; - ByteString aCommandPara; - ByteString aComment; - ByteString sClientRestriction; - SByteStringList *pDepList; - USHORT nOSType; - USHORT nCommand; - - ULONG nDepth; // Tiefe der Abhaenigkeit - -public: - CommandData(); - ~CommandData(); - ByteString GetProjectName(){return aPrj;} - void SetProjectName( ByteString aName ){aPrj = aName;} - ByteString GetLogFile(){return aLogFileName;} - void SetLogFile( ByteString aName ){aLogFileName = aName;} - ByteString GetInpath(){return aInpath;} - void SetInpath( ByteString aName ){aInpath = aName;} - ByteString GetUpd(){return aUpd;} - void SetUpd( ByteString aName ){aUpd = aName;} - ByteString GetUpdMinor(){return aUpdMinor;} - void SetUpdMinor( ByteString aName ){aUpdMinor = aName;} - ByteString GetProduct(){return aProduct;} - void SetProduct( ByteString aName ){aProduct = aName;} - ByteString GetCommand(){return aCommand;} - void SetCommand ( ByteString aName ){aCommand = aName;} - ByteString GetCommandPara(){return aCommandPara;} - void SetCommandPara ( ByteString aName ){aCommandPara = aName;} - ByteString GetComment(){return aComment;} - void SetComment ( ByteString aCommentString ){aComment = aCommentString;} - ByteString GetPath(){return aPath;} - void SetPath( ByteString aName ){aPath = aName;} - ByteString GetPrePath(){return aPrePath;} - void SetPrePath( ByteString aName ){aPrePath = aName;} - USHORT GetOSType(){return nOSType;} - ByteString GetOSTypeString(); - void SetOSType( USHORT nType ){nOSType = nType;} - USHORT GetCommandType(){return nCommand;} - ByteString GetCommandTypeString(); - void SetCommandType( USHORT nCommandType ){nCommand = nCommandType;} - SByteStringList* GetDependencies(){return pDepList;} - void SetDependencies( SByteStringList *pList ){pDepList = pList;} - ByteString GetClientRestriction() { return sClientRestriction; } - void SetClientRestriction( ByteString sRestriction ) { sClientRestriction = sRestriction; } - - void AddDepth(){nDepth++;} - ULONG GetDepth(){return nDepth;} -}; /********************************************************************* * @@ -147,185 +55,4 @@ public: ByteString GetCleanedNextLine( BOOL bReadComments = FALSE ); }; -#define ENV_GUI 0x00000000 -#define ENV_OS 0x00000001 -#define ENV_UPD 0x00000002 -#define ENV_UPDMIN 0x00000004 -#define ENV_INPATH 0x00000008 -#define ENV_OUTPATH 0x00000010 -#define ENV_GUIBASE 0x00000020 -#define ENV_CVER 0x00000040 -#define ENV_GVER 0x00000080 -#define ENV_GUIENV 0x00000100 -#define ENV_CPU 0x00000200 -#define ENV_CPUNAME 0x00000400 -#define ENV_DLLSUFF 0x00000800 -#define ENV_COMEX 0x00001000 -#define ENV_COMPATH 0x00002000 -#define ENV_INCLUDE 0x00004000 -#define ENV_LIB 0x00008000 -#define ENV_PATH 0x00010000 -#define ENV_SOLVER 0x00020000 -#define ENV_SOLENV 0x00040000 -#define ENV_SOLROOT 0x00080000 -#define ENV_DEVROOT 0x00100000 -#define ENV_EMERG 0x00200000 -#define ENV_STAND 0x00400000 - -/********************************************************************* -* -* class Prj -* alle Daten eines Projektes werden hier gehalten -* -*********************************************************************/ - -DECL_DEST_LIST ( PrjList_tmp, PrjList, CommandData * ) - -class Star; -class Prj : public PrjList -{ -friend class Star; -private: - BOOL bVisited; - - ByteString aPrjPath; - ByteString aProjectName; - ByteString aProjectPrefix; // max. 2-buchstabige Abk. - SByteStringList* pPrjInitialDepList; - SByteStringList* pPrjDepList; - BOOL bHardDependencies; - BOOL bSorted; - -public: - Prj(); - Prj( ByteString aName ); - ~Prj(); - void SetPreFix( ByteString aPre ){aProjectPrefix = aPre;} - ByteString GetPreFix(){return aProjectPrefix;} - ByteString GetProjectName() - {return aProjectName;} - void SetProjectName(ByteString aName) - {aProjectName = aName;} - BOOL InsertDirectory( ByteString aDirName , USHORT aWhat, - USHORT aWhatOS, ByteString aLogFileName, - const ByteString &rClientRestriction ); - CommandData* RemoveDirectory( ByteString aLogFileName ); - CommandData* GetDirectoryList ( USHORT nWhatOs, USHORT nCommand ); - CommandData* GetDirectoryData( ByteString aLogFileName ); - inline CommandData* GetData( ByteString aLogFileName ) - { return GetDirectoryData( aLogFileName ); }; - - SByteStringList* GetDependencies( BOOL bExpanded = TRUE ); - void AddDependencies( ByteString aStr ); - void HasHardDependencies( BOOL bHard ) { bHardDependencies = bHard; } - BOOL HasHardDependencies() { return bHardDependencies; } -}; - -/********************************************************************* -* -* class Star -* Diese Klasse liest die Projectstruktur aller StarDivision Projekte -* aus \\dev\data1\upenv\data\config\solar.lst aus -* -*********************************************************************/ - -DECL_DEST_LIST ( StarList_tmp, StarList, Prj* ) -DECLARE_LIST ( SolarFileList, String* ) - -class StarFile -{ -private: - String aFileName; - Date aDate; - Time aTime; - - BOOL bExists; - -public: - StarFile( const String &rFile ); - const String &GetName() { return aFileName; } - Date GetDate() { return aDate; } - Time GetTime() { return aTime; } - - BOOL NeedsUpdate(); - BOOL Exists() { return bExists; } -}; - -DECLARE_LIST( StarFileList, StarFile * ) - -#define STAR_MODE_SINGLE_PARSE 0x0000 -#define STAR_MODE_RECURSIVE_PARSE 0x0001 -#define STAR_MODE_MULTIPLE_PARSE 0x0002 - -class Star : public StarList -{ -private: - ByteString aStarName; - - static Link aDBNotFoundHdl; -protected: - vos:: OMutex aMutex; - - USHORT nStarMode; - SolarFileList aFileList; - StarFileList aLoadedFilesList; - String sSourceRoot; - - void InsertSolarList( String sProject ); - String CreateFileName( String sProject ); - - void Expand_Impl(); - void ExpandPrj_Impl( Prj *pPrj, Prj *pDepPrj ); - -private: - void Read( String &rFileName ); - void Read( SolarFileList *pSOlarFiles ); - -public: - Star(); - Star( String aFileName, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - Star( SolarFileList *pSolarFiles ); - Star( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE, - const char *pSourceRoot = NULL ); - - ~Star(); - - static void SetDBNotFoundHdl( const Link &rLink ) { aDBNotFoundHdl = rLink; } - - ByteString GetName(){ return aStarName; }; - - BOOL HasProject( ByteString aProjectName ); - Prj* GetPrj( ByteString aProjectName ); - ByteString GetPrjName( DirEntry &rPath ); - - void InsertToken( char *pChar ); - BOOL NeedsUpdate(); - - USHORT GetMode() { return nStarMode; } -}; - -class StarWriter : public Star -{ -private: - USHORT WritePrj( Prj *pPrj, SvFileStream& rStream ); - -public: - StarWriter( String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - StarWriter( SolarFileList *pSolarFiles, BOOL bReadComments = FALSE ); - StarWriter( GenericInformationList *pStandLst, ByteString &rVersion, BOOL bLocal = FALSE, - const char *pSourceRoot = NULL ); - - void CleanUp(); - - BOOL InsertProject ( Prj* pNewPrj ); - Prj* RemoveProject ( ByteString aProjectName ); - - USHORT Read( String aFileName, BOOL bReadComments = FALSE, USHORT nMode = STAR_MODE_SINGLE_PARSE ); - USHORT Read( SolarFileList *pSolarFiles, BOOL bReadComments = FALSE ); - USHORT Write( String aFileName ); - USHORT WriteMultiple( String rSourceRoot ); - - void InsertTokenLine( ByteString& rString ); -}; - #endif diff --git a/tools/inc/bootstrp/sstring.hxx b/tools/inc/bootstrp/sstring.hxx deleted file mode 100644 index 933770887e37..000000000000 --- a/tools/inc/bootstrp/sstring.hxx +++ /dev/null @@ -1,105 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SSTRING_HXX -#define _SSTRING_HXX - -#include <tools/string.hxx> -#include <tools/list.hxx> - -#define NOT_THERE LIST_ENTRY_NOTFOUND - -#define SStringList SUniStringList -#define StringList UniStringList - -DECLARE_LIST( ByteStringList, ByteString* ) -DECLARE_LIST( UniStringList, UniString* ) - -class SvStream; - -// --------------------- -// - class SStringList - -// --------------------- - -class SByteStringList : public ByteStringList -{ -public: - SByteStringList(); - ~SByteStringList(); - - // neuen ByteString in Liste einfuegen - ULONG PutString( ByteString* ); - ByteString* RemoveString( const ByteString& rName ); - - // Position des ByteString in Liste, wenn nicht enthalten, dann - // return = NOT_THERE - ULONG IsString( ByteString* ); - - // Vorgaenger ermitteln ( auch wenn selbst noch nicht in - // Liste enthalten - ULONG GetPrevString( ByteString* ); - void CleanUp(); - - SByteStringList& operator<< ( SvStream& rStream ); - SByteStringList& operator>> ( SvStream& rStream ); -}; - -// --------------------- -// - class SUniStringList - -// --------------------- - -class SUniStringList : public UniStringList -{ -public: - SUniStringList(); - ~SUniStringList(); - - // neuen UniString in Liste einfuegen - ULONG PutString( UniString* ); - UniString* RemoveString( const UniString& rName ); - - // Position des UniString in Liste, wenn nicht enthalten, dann - // return = NOT_THERE - ULONG IsString( UniString* ); - - // Vorgaenger ermitteln ( auch wenn selbst noch nicht in - // Liste enthalten - ULONG GetPrevString( UniString* ); -}; - -class Text -{ -protected: - String aString; - -public: - Text( char* pChar ); - Text( String &rStr ) { aString = rStr; } - void Stderr(); -}; - -#endif diff --git a/tools/inc/makefile.mk b/tools/inc/makefile.mk deleted file mode 100644 index a3a76dc94a11..000000000000 --- a/tools/inc/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=.. - -PRJNAME=tools -TARGET=inc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" - diff --git a/tools/inc/tools/fldunit.hxx b/tools/inc/tools/fldunit.hxx index 637539f6dd6f..0154b4403501 100644 --- a/tools/inc/tools/fldunit.hxx +++ b/tools/inc/tools/fldunit.hxx @@ -32,7 +32,6 @@ // - FieldTypes - // -------------- -// By changes you must also change: rsc/vclrsc.hxx enum FieldUnit { FUNIT_NONE, FUNIT_MM, FUNIT_CM, FUNIT_M, FUNIT_KM, FUNIT_TWIP, FUNIT_POINT, FUNIT_PICA, FUNIT_INCH, FUNIT_FOOT, FUNIT_MILE, FUNIT_CUSTOM, diff --git a/tools/inc/tools/mapunit.hxx b/tools/inc/tools/mapunit.hxx index 0b5f5d044d19..b30d3865d862 100644 --- a/tools/inc/tools/mapunit.hxx +++ b/tools/inc/tools/mapunit.hxx @@ -32,7 +32,6 @@ // - MapMode-Types - // ----------------- -// By changes you must also change: rsc/vclrsc.hxx enum MapUnit { MAP_100TH_MM, MAP_10TH_MM, MAP_MM, MAP_CM, MAP_1000TH_INCH, MAP_100TH_INCH, MAP_10TH_INCH, MAP_INCH, MAP_POINT, MAP_TWIP, MAP_PIXEL, MAP_SYSFONT, MAP_APPFONT, diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx index 9c7052e22d77..cfa08c325573 100644 --- a/tools/inc/tools/wintypes.hxx +++ b/tools/inc/tools/wintypes.hxx @@ -124,7 +124,6 @@ typedef USHORT WindowType; // - Window-Bits - // --------------- -// By changes you must also change: rsc/vclrsc.hxx typedef sal_Int64 WinBits; // Window-Bits fuer Window @@ -239,9 +238,6 @@ typedef sal_Int64 WinBits; #define WB_SCROLL ((WinBits)0x02000000) #define WB_FORCETABCYCLE ((WinBits)0x04000000) -// Window-Bits for TabControl -#define WB_SINGLELINE ((WinBits)0x02000000) - // Window-Bits for DockingWindows #define WB_DOCKBORDER ((WinBits)0x00001000) @@ -305,7 +301,6 @@ typedef sal_Int64 WinBits; // - WindowAlign - // --------------- -// By changes you must also change: rsc/vclrsc.hxx enum WindowAlign { WINDOWALIGN_LEFT, WINDOWALIGN_TOP, WINDOWALIGN_RIGHT, WINDOWALIGN_BOTTOM }; enum ImageAlign { IMAGEALIGN_LEFT, IMAGEALIGN_TOP, IMAGEALIGN_RIGHT, IMAGEALIGN_BOTTOM, IMAGEALIGN_LEFT_TOP, IMAGEALIGN_LEFT_BOTTOM, IMAGEALIGN_TOP_LEFT, @@ -317,7 +312,6 @@ enum SymbolAlign { SYMBOLALIGN_LEFT, SYMBOLALIGN_RIGHT }; // - TriState - // ------------ -// By changes you must also change: rsc/vclrsc.hxx enum TriState { STATE_NOCHECK, STATE_CHECK, STATE_DONTKNOW }; diff --git a/tools/os2/source/dll/makefile.mk b/tools/os2/source/dll/makefile.mk deleted file mode 100644 index 97cff795defb..000000000000 --- a/tools/os2/source/dll/makefile.mk +++ /dev/null @@ -1,46 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=TOOLS -TARGET=dll - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -CXXFILES= toolsdll.cxx - -SLOFILES= $(SLO)$/toolsdll.obj - -OBJFILES= $(OBJ)$/toolsdll.obj -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/prj/build.lst b/tools/prj/build.lst index 659ecfe66cab..3194cbb4e87c 100644 --- a/tools/prj/build.lst +++ b/tools/prj/build.lst @@ -1,30 +1,3 @@ -tl tools : cppu external offuh vos ZLIB:zlib EXPAT:expat basegfx comphelper i18npool NULL -tl tools usr1 - all tl_mkout NULL -tl tools\bootstrp\isdll get - all tl_bsisdll NULL -tl tools\bootstrp\addexes get - all tl_bsexes NULL -tl tools\inc nmake - all tl_inc NULL -tl tools\prj get - all tl_prj NULL -tl tools\prj usr7 - all tl_deliver NULL -tl tools\prj usr42 - all tl_zn NULL -tl tools\workben get - all tl_wben NULL -tl tools\source\testtoolloader nmake - all tl_ttloader tl_inc NULL -tl tools\source\generic nmake - all tl_gen tl_fsys tl_inc NULL -tl tools\source\memtools nmake - all tl_mem tl_fsys tl_inc NULL -tl tools\source\debug nmake - all tl_deb tl_fsys tl_inc NULL -tl tools\source\datetime nmake - all tl_dat tl_fsys tl_inc NULL -tl tools\source\stream nmake - all tl_str tl_fsys tl_inc NULL -tl tools\source\rc nmake - all tl_rc tl_fsys tl_inc NULL -tl tools\source\ref nmake - all tl_ref tl_fsys tl_inc NULL -tl tools\source\fsys nmake - all tl_fsys tl_inc NULL -tl tools\source\zcodec nmake - all tl_zco tl_fsys tl_inc NULL -tl tools\source\communi nmake - all tl_com tl_fsys tl_inc NULL -tl tools\source\inet nmake - all tl_inet tl_fsys tl_inc NULL -tl tools\source\string nmake - all tl_string tl_fsys tl_inc NULL -tl tools\source\misc nmake - all tl_misc tl_inc NULL -tl tools\win\source\dll nmake - w tl_dllw tl_inc NULL -tl tools\os2\source\dll nmake - p tl_dllp tl_inc NULL -tl tools\unx\source\dll nmake - u tl_dllu tl_inc NULL -tl tools\util nmake - all tl_utl tl_com tl_dat tl_deb tl_dllu.u tl_dllp.p tl_dllw.w tl_fsys tl_gen tl_inet tl_mem tl_rc tl_ref tl_str tl_string tl_misc tl_zco tl_ttloader NULL -tl tools\bootstrp nmake - all tl_bstrp tl_utl tl_inc NULL -tl tools\bootstrp\addexes2 nmake - all tl_bsexes2 tl_bstrp tl_inc NULL - +tl tools : cppu external offuh vos ZLIB:zlib EXPAT:expat basegfx comphelper i18npool NULL +tl tools usr1 - all tl_mkout NULL +tl tools\prj nmake - all tl_prj NULL diff --git a/tools/prj/d.lst b/tools/prj/d.lst index f2c508342015..e69de29bb2d1 100644 --- a/tools/prj/d.lst +++ b/tools/prj/d.lst @@ -1,124 +0,0 @@ -mkdir: %_DEST%\inc%_EXT%\bootstrp - -..\%__SRC%\misc\_ooo_st_btstrp.pdb %_DEST%\lib%_EXT%\_ooo_st_btstrp.pdb -..\%__SRC%\bin\mkunroll* %_DEST%\bin%_EXT% -..\%__SRC%\bin\tl?????.dll %_DEST%\bin%_EXT%\tl?????.dll -..\%__SRC%\bin\tl?????.sym %_DEST%\bin%_EXT%\tl?????.sym -..\%__SRC%\lib\atools.lib %_DEST%\lib%_EXT%\atools.lib -..\%__SRC%\lib\btstrp.lib %_DEST%\lib%_EXT%\btstrp.lib -..\%__SRC%\lib\bootstrp2.lib %_DEST%\lib%_EXT%\bootstrp2.lib -..\%__SRC%\lib\itools.lib %_DEST%\lib%_EXT%\itools.lib -..\%__SRC%\lib\lib*.a %_DEST%\lib%_EXT%\lib*.a -..\%__SRC%\lib\lib*.sl %_DEST%\lib%_EXT%\lib*.sl -..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%\lib*.so -..\%__SRC%\lib\lib*.so.* %_DEST%\lib%_EXT%\lib*.so.* -..\%__SRC%\lib\lib*.dylib %_DEST%\lib%_EXT%\lib*.dylib -..\%__SRC%\lib\stdstrm.lib %_DEST%\lib%_EXT%\stdstrm.lib -..\%__SRC%\misc\tl?????.map %_DEST%\bin%_EXT%\tl?????.map -..\%__SRC%\slb\btstrpsh.lib %_DEST%\lib%_EXT%\btstrpsh.lib - -..\inc\bootstrp\command.hxx %_DEST%\inc%_EXT%\bootstrp\command.hxx -..\inc\bootstrp\inimgr.hxx %_DEST%\inc%_EXT%\bootstrp\inimgr.hxx -..\inc\bootstrp\listmacr.hxx %_DEST%\inc%_EXT%\bootstrp\listmacr.hxx -..\inc\bootstrp\mkcreate.hxx %_DEST%\inc%_EXT%\bootstrp\mkcreate.hxx -..\inc\bootstrp\prj.hxx %_DEST%\inc%_EXT%\bootstrp\prj.hxx -..\inc\bootstrp\sstring.hxx %_DEST%\inc%_EXT%\bootstrp\sstring.hxx - -..\inc\tools\toolsdllapi.h %_DEST%\inc%_EXT%\tools\toolsdllapi.h -..\inc\tools\weakbase.hxx %_DEST%\inc%_EXT%\tools\weakbase.hxx -..\inc\tools\weakbase.h %_DEST%\inc%_EXT%\tools\weakbase.h - -..\inc\tools\postwin.h %_DEST%\inc%_EXT%\tools\postwin.h -..\inc\tools\prewin.h %_DEST%\inc%_EXT%\tools\prewin.h - -..\inc\tools\postx.h %_DEST%\inc%_EXT%\tools\postx.h -..\inc\tools\prex.h %_DEST%\inc%_EXT%\tools\prex.h - -..\inc\tools\svlibrary.hxx %_DEST%\inc%_EXT%\tools\svlibrary.hxx -..\inc\tools\solarmutex.hxx %_DEST%\inc%_EXT%\tools\solarmutex.hxx -..\inc\tools\wintypes.hxx %_DEST%\inc%_EXT%\tools\wintypes.hxx -..\inc\tools\mapunit.hxx %_DEST%\inc%_EXT%\tools\mapunit.hxx -..\inc\tools\fldunit.hxx %_DEST%\inc%_EXT%\tools\fldunit.hxx -..\inc\tools\fontenum.hxx %_DEST%\inc%_EXT%\tools\fontenum.hxx -..\inc\tools\agapi.hxx %_DEST%\inc%_EXT%\tools\agapi.hxx -..\inc\tools\agitem.hxx %_DEST%\inc%_EXT%\tools\agitem.hxx -..\inc\tools\appendunixshellword.hxx %_DEST%\inc%_EXT%\tools\appendunixshellword.hxx -..\inc\tools\bigint.hxx %_DEST%\inc%_EXT%\tools\bigint.hxx -..\inc\tools\cachestr.hxx %_DEST%\inc%_EXT%\tools\cachestr.hxx -..\inc\tools\color.hxx %_DEST%\inc%_EXT%\tools\color.hxx -..\inc\tools\contnr.hxx %_DEST%\inc%_EXT%\tools\contnr.hxx -..\inc\tools\date.hxx %_DEST%\inc%_EXT%\tools\date.hxx -..\inc\tools\datetime.hxx %_DEST%\inc%_EXT%\tools\datetime.hxx -..\inc\tools\debug.hxx %_DEST%\inc%_EXT%\tools\debug.hxx -..\inc\tools\diagnose_ex.h %_DEST%\inc%_EXT%\tools\diagnose_ex.h -..\inc\tools\download.hxx %_DEST%\inc%_EXT%\tools\download.hxx -..\inc\tools\dynary.hxx %_DEST%\inc%_EXT%\tools\dynary.hxx -..\inc\tools\errcode.hxx %_DEST%\inc%_EXT%\tools\errcode.hxx -..\inc\tools\errinf.hxx %_DEST%\inc%_EXT%\tools\errinf.hxx -..\inc\tools\extendapplicationenvironment.hxx %_DEST%\inc%_EXT%\tools\extendapplicationenvironment.hxx -..\inc\tools\fract.hxx %_DEST%\inc%_EXT%\tools\fract.hxx -..\inc\tools\fsys.hxx %_DEST%\inc%_EXT%\tools\fsys.hxx -..\inc\tools\eacopier.hxx %_DEST%\inc%_EXT%\tools\eacopier.hxx -..\inc\tools\gen.hxx %_DEST%\inc%_EXT%\tools\gen.hxx -..\inc\tools\globname.hxx %_DEST%\inc%_EXT%\tools\globname.hxx -..\inc\tools\inetdef.hxx %_DEST%\inc%_EXT%\tools\inetdef.hxx -..\inc\tools\inetmime.hxx %_DEST%\inc%_EXT%\tools\inetmime.hxx -..\inc\tools\inetmsg.hxx %_DEST%\inc%_EXT%\tools\inetmsg.hxx -..\inc\tools\inetstrm.hxx %_DEST%\inc%_EXT%\tools\inetstrm.hxx -..\inc\tools\link.hxx %_DEST%\inc%_EXT%\tools\link.hxx -..\inc\tools\list.hxx %_DEST%\inc%_EXT%\tools\list.hxx -..\inc\tools\mempool.hxx %_DEST%\inc%_EXT%\tools\mempool.hxx -..\inc\tools\multisel.hxx %_DEST%\inc%_EXT%\tools\multisel.hxx -..\inc\tools\ownlist.hxx %_DEST%\inc%_EXT%\tools\ownlist.hxx -..\inc\tools\postsys.h %_DEST%\inc%_EXT%\tools\postsys.h -..\inc\tools\presys.h %_DEST%\inc%_EXT%\tools\presys.h -..\inc\tools\pstm.hxx %_DEST%\inc%_EXT%\tools\pstm.hxx -..\inc\tools\queue.hxx %_DEST%\inc%_EXT%\tools\queue.hxx -..\inc\tools\rc.h %_DEST%\inc%_EXT%\tools\rc.h -..\inc\tools\rc.hxx %_DEST%\inc%_EXT%\tools\rc.hxx -..\inc\tools\rcid.h %_DEST%\inc%_EXT%\tools\rcid.h -..\inc\tools\ref.hxx %_DEST%\inc%_EXT%\tools\ref.hxx -..\inc\tools\resid.hxx %_DEST%\inc%_EXT%\tools\resid.hxx -..\inc\tools\resmgr.hxx %_DEST%\inc%_EXT%\tools\resmgr.hxx -..\inc\tools\StringListResource.hxx %_DEST%\inc%_EXT%\tools\StringListResource.hxx -..\inc\tools\isofallback.hxx %_DEST%\inc%_EXT%\tools\isofallback.hxx -..\inc\tools\rtti.hxx %_DEST%\inc%_EXT%\tools\rtti.hxx -..\inc\tools\shl.hxx %_DEST%\inc%_EXT%\tools\shl.hxx -..\inc\tools\simplerm.hxx %_DEST%\inc%_EXT%\tools\simplerm.hxx -..\inc\tools\solar.h %_DEST%\inc%_EXT%\tools\solar.h -..\inc\tools\stack.hxx %_DEST%\inc%_EXT%\tools\stack.hxx -..\inc\tools\stream.hxx %_DEST%\inc%_EXT%\tools\stream.hxx -..\inc\tools\string.hxx %_DEST%\inc%_EXT%\tools\string.hxx -..\inc\tools\svwin.h %_DEST%\inc%_EXT%\tools\svwin.h -..\inc\tools\table.hxx %_DEST%\inc%_EXT%\tools\table.hxx -..\inc\tools\tenccvt.hxx %_DEST%\inc%_EXT%\tools\tenccvt.hxx -..\inc\tools\time.hxx %_DEST%\inc%_EXT%\tools\time.hxx -..\inc\tools\tools.h %_DEST%\inc%_EXT%\tools\tools.h -..\inc\tools\unqid.hxx %_DEST%\inc%_EXT%\tools\unqid.hxx -..\inc\tools\unqidx.hxx %_DEST%\inc%_EXT%\tools\unqidx.hxx -..\inc\tools\urlkeys.hxx %_DEST%\inc%_EXT%\tools\urlkeys.hxx -..\inc\tools\urlobj.hxx %_DEST%\inc%_EXT%\tools\urlobj.hxx -..\inc\tools\vcompat.hxx %_DEST%\inc%_EXT%\tools\vcompat.hxx -..\inc\tools\wldcrd.hxx %_DEST%\inc%_EXT%\tools\wldcrd.hxx -..\inc\tools\zcodec.hxx %_DEST%\inc%_EXT%\tools\zcodec.hxx -..\inc\tools\tempfile.hxx %_DEST%\inc%_EXT%\tools\tempfile.hxx -..\inc\tools\geninfo.hxx %_DEST%\inc%_EXT%\tools\geninfo.hxx -..\inc\tools\iparser.hxx %_DEST%\inc%_EXT%\tools\iparser.hxx -..\inc\tools\config.hxx %_DEST%\inc%_EXT%\tools\config.hxx -..\inc\tools\resary.hxx %_DEST%\inc%_EXT%\tools\resary.hxx -..\inc\tools\poly.hxx %_DEST%\inc%_EXT%\tools\poly.hxx -..\inc\tools\line.hxx %_DEST%\inc%_EXT%\tools\line.hxx -..\inc\tools\vector2d.hxx %_DEST%\inc%_EXT%\tools\vector2d.hxx -..\inc\tools\testtoolloader.hxx %_DEST%\inc%_EXT%\tools\testtoolloader.hxx -..\inc\tools\svborder.hxx %_DEST%\inc%_EXT%\tools\svborder.hxx -..\inc\tools\getprocessworkingdir.hxx %_DEST%\inc%_EXT%\tools\getprocessworkingdir.hxx -..\inc\tools\b3dtrans.hxx %_DEST%\inc%_EXT%\tools\b3dtrans.hxx - -..\%__SRC%\bin\rscdep.exe %_DEST%\bin%_EXT%\rscdep.exe -..\%__SRC%\bin\rscdep %_DEST%\bin%_EXT%\rscdep -..\%__SRC%\bin\so_checksum.exe %_DEST%\bin%_EXT%\so_checksum.exe -..\%__SRC%\bin\so_checksum %_DEST%\bin%_EXT%\so_checksum - -..\inc\tools\pathutils.hxx %_DEST%\inc%_EXT%\tools\pathutils.hxx -..\%__SRC%\obj\pathutils.obj %_DEST%\lib%_EXT%\pathutils-obj.obj -..\%__SRC%\slo\pathutils.obj %_DEST%\lib%_EXT%\pathutils-slo.obj diff --git a/svtools/source/filter.vcl/ixbm/makefile.mk b/tools/prj/makefile.mk index 55708d2f2630..c73a3d944bbf 100644 --- a/svtools/source/filter.vcl/ixbm/makefile.mk +++ b/tools/prj/makefile.mk @@ -25,20 +25,16 @@ # #************************************************************************* -PRJ=..$/..$/.. +PRJ=.. +TARGET=prj -PRJNAME=svtools -TARGET=ixbm +.INCLUDE : settings.mk -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/svt.pmk -SOLARINC+=-I../../inc - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/xbmread.obj - -.INCLUDE : target.mk +.IF "$(VERBOSE)"!="" +VERBOSEFLAG := +.ELSE +VERBOSEFLAG := -s +.ENDIF +all: + cd $(PRJ) && $(GNUMAKE) $(VERBOSEFLAG) -r -j$(MAXPROCESS) $(gb_MAKETARGET) diff --git a/tools/qa/makefile.mk b/tools/qa/makefile.mk deleted file mode 100644 index abaea848c1db..000000000000 --- a/tools/qa/makefile.mk +++ /dev/null @@ -1,52 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = .. -PRJNAME = tools -TARGET = qa -ENABLE_EXCEPTIONS = TRUE - -.INCLUDE: settings.mk - -CFLAGSCXX += $(CPPUNIT_CFLAGS) -DLLPRE = # no leading "lib" on .so files - -SHL1TARGET = test_pathutils -SHL1OBJS = $(SLO)$/test_pathutils.obj $(SLO)$/pathutils.obj -SHL1STDLIBS = $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB) -SHL1VERSIONMAP = version.map -SHL1IMPLIB = i$(SHL1TARGET) -DEF1NAME = $(SHL1TARGET) - -SLOFILES = $(SHL1OBJS) - -.INCLUDE: target.mk - -ALLTAR: test - -test .PHONY: $(SHL1TARGETN) - $(TESTSHL2) $(SHL1TARGETN) -forward $(BIN)$/$(TARGET).rdb diff --git a/tools/source/communi/makefile.mk b/tools/source/communi/makefile.mk deleted file mode 100644 index 1795081a9ec5..000000000000 --- a/tools/source/communi/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=TOOLS -TARGET=communi - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -OBJFILES= \ - $(OBJ)$/parser.obj \ - $(OBJ)$/geninfo.obj \ - -SLOFILES= \ - $(SLO)$/parser.obj \ - $(SLO)$/geninfo.obj \ - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/source/datetime/makefile.mk b/tools/source/datetime/makefile.mk deleted file mode 100644 index 3d46cc6ce1b0..000000000000 --- a/tools/source/datetime/makefile.mk +++ /dev/null @@ -1,50 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=tools -TARGET=datetime - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/tdate.obj \ - $(SLO)$/ttime.obj \ - $(SLO)$/datetime.obj - -OBJFILES= $(OBJ)$/tdate.obj \ - $(OBJ)$/ttime.obj \ - $(OBJ)$/datetime.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/source/debug/makefile.mk b/tools/source/debug/makefile.mk deleted file mode 100644 index 925ae90f333d..000000000000 --- a/tools/source/debug/makefile.mk +++ /dev/null @@ -1,53 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=tools -TARGET=debug - -ENABLE_EXCEPTIONS := TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -CXXFILES= debug.cxx \ - stcktree.cxx - -SLOFILES= $(SLO)$/debug.obj \ - $(SLO)$/stcktree.obj - -OBJFILES= $(OBJ)$/debug.obj \ - $(OBJ)$/stcktree.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/source/fsys/makefile.mk b/tools/source/fsys/makefile.mk deleted file mode 100644 index b1d34d6347f3..000000000000 --- a/tools/source/fsys/makefile.mk +++ /dev/null @@ -1,67 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=tools -TARGET=fsys -ENABLE_EXCEPTIONS=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -.IF "$(COM)"=="GCC" -CFLAGSCXX+=-fexceptions -.ENDIF - - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/tempfile.obj \ - $(SLO)$/wldcrd.obj \ - $(SLO)$/fstat.obj \ - $(SLO)$/comdep.obj \ - $(SLO)$/filecopy.obj \ - $(SLO)$/dirent.obj \ - $(SLO)$/tdir.obj \ - $(SLO)$/urlobj.obj - -OBJFILES= $(OBJ)$/wldcrd.obj \ - $(OBJ)$/fstat.obj \ - $(OBJ)$/comdep.obj \ - $(OBJ)$/filecopy.obj \ - $(OBJ)$/dirent.obj \ - $(OBJ)$/tdir.obj \ - $(OBJ)$/urlobj.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/tools/source/generic/makefile.mk b/tools/source/generic/makefile.mk deleted file mode 100644 index 07bab82f32b0..000000000000 --- a/tools/source/generic/makefile.mk +++ /dev/null @@ -1,71 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=tools -TARGET=gen - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -EXCEPTIONSFILES = $(SLO)$/poly.obj $(OBJ)$/poly.obj $(SLO)$/svlibrary.obj - -SLOFILES= $(SLO)$/toolsin.obj \ - $(SLO)$/svlibrary.obj \ - $(SLO)$/b3dtrans.obj \ - $(SLO)$/link.obj \ - $(SLO)$/bigint.obj \ - $(SLO)$/fract.obj \ - $(SLO)$/color.obj \ - $(SLO)$/gen.obj \ - $(SLO)$/config.obj \ - $(SLO)$/poly.obj \ - $(SLO)$/poly2.obj \ - $(SLO)$/svborder.obj \ - $(SLO)$/line.obj - -OBJFILES= $(OBJ)$/toolsin.obj \ - $(OBJ)$/b3dtrans.obj \ - $(OBJ)$/link.obj \ - $(OBJ)$/bigint.obj \ - $(OBJ)$/fract.obj \ - $(OBJ)$/color.obj \ - $(OBJ)$/gen.obj \ - $(OBJ)$/config.obj \ - $(OBJ)$/poly.obj \ - $(OBJ)$/poly2.obj \ - $(OBJ)$/svborder.obj \ - $(OBJ)$/line.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/source/makefile.mk b/tools/source/makefile.mk deleted file mode 100644 index 8c3f3167635e..000000000000 --- a/tools/source/makefile.mk +++ /dev/null @@ -1,58 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -TARGET=source - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -.IF "$(GUI)" == "UNX" -SUBDIRS+= solar -.ENDIF - -SUBDIRS+= \ - datetime \ - timestamp \ - debug \ - fsys \ - generic \ - intntl \ - memtools \ - misc \ - rc \ - ref \ - stream \ - zcodec - - -.INCLUDE : target.mk - diff --git a/tools/source/memtools/makefile.mk b/tools/source/memtools/makefile.mk deleted file mode 100644 index de03a0d50cc3..000000000000 --- a/tools/source/memtools/makefile.mk +++ /dev/null @@ -1,56 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=tools -TARGET=mtools - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/contnr.obj \ - $(SLO)$/table.obj \ - $(SLO)$/unqidx.obj \ - $(SLO)$/mempool.obj \ - $(SLO)$/multisel.obj - -EXCEPTIONSFILES= $(SLO)$/multisel.obj $(OBJ)$/multisel.obj - -OBJFILES= $(OBJ)$/contnr.obj \ - $(OBJ)$/table.obj \ - $(OBJ)$/unqidx.obj \ - $(OBJ)$/mempool.obj \ - $(OBJ)$/multisel.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/source/misc/makefile.mk b/tools/source/misc/makefile.mk deleted file mode 100644 index a426bb4053c3..000000000000 --- a/tools/source/misc/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ = ..$/.. -PRJNAME = tools -TARGET = misc -LIBTARGET = NO -ENABLE_EXCEPTIONS = TRUE - -.INCLUDE: settings.mk -.INCLUDE: $(PRJ)$/util$/makefile.pmk - -LIB1TARGET = $(SLB)$/$(TARGET).lib -LIB1OBJFILES = \ - $(SLO)$/appendunixshellword.obj \ - $(SLO)$/extendapplicationenvironment.obj \ - $(SLO)$/solarmutex.obj \ - $(SLO)$/getprocessworkingdir.obj - -OBJFILES = $(OBJ)$/pathutils.obj -SLOFILES = $(SLO)$/pathutils.obj $(LIB1OBJFILES) $(SLO)$/solarmutex.obj - -.INCLUDE: target.mk diff --git a/tools/source/misc/pathutils.cxx b/tools/source/misc/pathutils.cxx index 397bade136e7..4685f96ca187 100644 --- a/tools/source/misc/pathutils.cxx +++ b/tools/source/misc/pathutils.cxx @@ -25,7 +25,6 @@ * ************************************************************************/ -#include "precompiled_tools.hxx" #include "sal/config.h" #if defined WNT diff --git a/tools/source/rc/makefile.mk b/tools/source/rc/makefile.mk deleted file mode 100644 index f8b46f38a0f7..000000000000 --- a/tools/source/rc/makefile.mk +++ /dev/null @@ -1,53 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=tools -TARGET=rc -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/rc.obj \ - $(SLO)$/isofallback.obj \ - $(SLO)$/resmgr.obj \ - $(SLO)$/resary.obj - -OBJFILES= $(OBJ)$/rc.obj \ - $(OBJ)$/isofallback.obj \ - $(OBJ)$/resmgr.obj \ - $(OBJ)$/resary.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/source/ref/makefile.mk b/tools/source/ref/makefile.mk deleted file mode 100644 index c87f8a740a4f..000000000000 --- a/tools/source/ref/makefile.mk +++ /dev/null @@ -1,53 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=tools -TARGET=ref -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/ref.obj \ - $(SLO)$/pstm.obj \ - $(SLO)$/globname.obj \ - $(SLO)$/errinf.obj - -OBJFILES= $(OBJ)$/ref.obj \ - $(OBJ)$/pstm.obj \ - $(OBJ)$/globname.obj \ - $(OBJ)$/errinf.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/source/stream/makefile.mk b/tools/source/stream/makefile.mk deleted file mode 100644 index ee548934c6c6..000000000000 --- a/tools/source/stream/makefile.mk +++ /dev/null @@ -1,58 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=tools -TARGET=stream - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= $(SLO)$/stream.obj \ - $(SLO)$/strmsys.obj \ - $(SLO)$/cachestr.obj \ - $(SLO)$/vcompat.obj - -OBJFILES+= $(OBJ)$/stream.obj \ - $(OBJ)$/strmsys.obj \ - $(OBJ)$/cachestr.obj \ - $(OBJ)$/vcompat.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -$(SLO)$/strmsys.obj : \ - strmwnt.cxx \ - strmos2.cxx \ - strmunx.cxx - diff --git a/tools/source/string/makefile.mk b/tools/source/string/makefile.mk deleted file mode 100644 index 4caa31672472..000000000000 --- a/tools/source/string/makefile.mk +++ /dev/null @@ -1,79 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=tools -TARGET=str - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -ALWAYSDBGFILES = $(SLO)$/debugprint.obj - -.IF "$(ALWAYSDBGFILES)" != "" -ALWAYSDBGTARGET=do_it_alwaysdebug -.ENDIF - -SLOFILES= $(SLO)$/tstring.obj \ - $(SLO)$/tustring.obj \ - $(SLO)$/tenccvt.obj \ - $(SLO)$/debugprint.obj - -OBJFILES= $(OBJ)$/tstring.obj \ - $(OBJ)$/tustring.obj \ - $(OBJ)$/tenccvt.obj \ - $(OBJ)$/debugprint.obj - -# --- Targets ------------------------------------------------------ - -.IF "$(ALWAYSDBG_FLAG)"=="" -TARGETDEPS+=$(ALWAYSDBGTARGET) -.ENDIF - -.INCLUDE : target.mk - -.IF "$(ALWAYSDBGTARGET)" != "" -.IF "$(ALWAYSDBG_FLAG)" == "" -# -------------------------------------------------- -# - ALWAYSDBG - files always compiled with debugging -# -------------------------------------------------- -$(ALWAYSDBGTARGET): - @echo --- ALWAYSDBGFILES --- - @dmake $(MFLAGS) $(MAKEFILE) debug=true $(ALWAYSDBGFILES) ALWAYSDBG_FLAG=TRUE $(CALLMACROS) - @echo --- ALWAYSDBGFILES OVER --- - -$(ALWAYSDBGFILES): - @echo --- ALWAYSDBG --- - @dmake $(MFLAGS) $(MAKEFILE) debug=true ALWAYSDBG_FLAG=TRUE $(CALLMACROS) $@ - @echo --- ALWAYSDBG OVER --- -.ENDIF -.ENDIF diff --git a/tools/source/testtoolloader/makefile.mk b/tools/source/testtoolloader/makefile.mk deleted file mode 100644 index 3d5cb8223e3f..000000000000 --- a/tools/source/testtoolloader/makefile.mk +++ /dev/null @@ -1,45 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=TOOLS -TARGET=testtoolloader - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/testtoolloader.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/source/zcodec/makefile.mk b/tools/source/zcodec/makefile.mk deleted file mode 100644 index 9067b45c3b5d..000000000000 --- a/tools/source/zcodec/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=tools -TARGET=zcodec - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -.IF "$(SYSTEM_ZLIB)" == "YES" -CFLAGS+=-DSYSTEM_ZLIB -.ENDIF -SLOFILES= $(SLO)$/zcodec.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/test/makefile.mk b/tools/test/makefile.mk deleted file mode 100644 index ab2cfd8e6676..000000000000 --- a/tools/test/makefile.mk +++ /dev/null @@ -1,65 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=tools -TARGET=tests - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -CFLAGSCXX += $(CPPUNIT_CFLAGS) - -# --- Common ---------------------------------------------------------- - -SHL1OBJS= \ - $(SLO)$/tests.obj - -SHL1TARGET= tests -SHL1STDLIBS= $(SALLIB) \ - $(TOOLSLIB) \ - $(TESTSHL2LIB) \ - $(CPPUNITLIB) - -SHL1IMPLIB= i$(SHL1TARGET) - -DEF1NAME =$(SHL1TARGET) -SHL1VERSIONMAP = export.map - -#------------------------------- All object files ---------------------------- - -# do this here, so we get right dependencies -SLOFILES=$(SHL1OBJS) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk -.INCLUDE : _cppunit.mk diff --git a/tools/unx/source/dll/makefile.mk b/tools/unx/source/dll/makefile.mk deleted file mode 100644 index da1d73f04682..000000000000 --- a/tools/unx/source/dll/makefile.mk +++ /dev/null @@ -1,48 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=TOOLS -TARGET=dll - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -CXXFILES= toolsdll.cxx - -SLOFILES= $(SLO)$/toolsdll.obj - -OBJFILES= $(OBJ)$/toolsdll.obj - - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk diff --git a/tools/util/makefile.mk b/tools/util/makefile.mk deleted file mode 100644 index 1574addcf59c..000000000000 --- a/tools/util/makefile.mk +++ /dev/null @@ -1,173 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. - -PRJNAME=TOOLS -TARGET=tools -ENABLE_EXCEPTIONS=true - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Allgemein ---------------------------------------------------- - -# --- STDSTRM.LIB --- -LIB3TARGET= $(LB)$/stdstrm.lib -LIB3ARCHIV= $(LB)$/libstdstrm.a -LIB3FILES= $(LB)$/stream.lib - -LIB7TARGET= $(LB)$/a$(TARGET).lib -LIB7ARCHIV= $(LB)$/liba$(TARGET).a -LIB7FILES= $(LB)$/gen.lib \ - $(LB)$/str.lib \ - $(LB)$/mtools.lib \ - $(LB)$/datetime.lib \ - $(LB)$/fsys.lib \ - $(LB)$/communi.lib \ - $(LB)$/stream.lib \ - $(LB)$/ref.lib \ - $(LB)$/rc.lib \ - $(LB)$/inet.lib \ - $(LB)$/debug.lib - - -LIB7FILES+= $(LB)$/dll.lib - -# --- TOOLS.LIB --- -LIB1TARGET:= $(SLB)$/$(TARGET).lib -LIB1FILES+= \ - $(SLB)$/gen.lib \ - $(SLB)$/str.lib \ - $(SLB)$/mtools.lib \ - $(SLB)$/datetime.lib \ - $(SLB)$/fsys.lib \ - $(SLB)$/communi.lib \ - $(SLB)$/stream.lib \ - $(SLB)$/ref.lib \ - $(SLB)$/rc.lib \ - $(SLB)$/debug.lib \ - $(SLB)$/zcodec.lib \ - $(SLB)$/inet.lib \ - $(SLB)$/testtoolloader.lib \ - $(SLB)$/misc.lib - -.IF "$(OS)"=="MACOSX" -SHL1STDLIBS += $(CPPULIB) \ - $(ZLIB3RDLIB) -.ELSE -SHL1STDLIBS += $(ZLIB3RDLIB) \ - $(CPPULIB) -.ENDIF - -LIB1FILES+= $(SLB)$/dll.lib - - -.IF "$(BIG_TOOLS)"!="" -.IF "$(GUI)"=="WNT" -#SOLARLIBDIR=$(SOLARVER)\$((INPATH)\lib -#SOLARLIBDIR=..\$(INPATH)\lib -# bei lokalen osl rtl oder vos das SOLARLIBDIR bitte patchen ! -LIB1FILES+= $(SOLARLIBDIR)\xosl.lib \ - $(SOLARLIBDIR)\xrtl.lib \ - $(SOLARLIBDIR)\xvos.lib -SHL1STDLIBS+= $(WSOCK32LIB) -.ENDIF -.ENDIF # "$(BIG_TOOLS)"!="" - -# --- TOOLS.DLL --- - -SHL1TARGET= tl$(DLLPOSTFIX) -SHL1LIBS= $(LIB1TARGET) -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -SHL1IMPLIB= itools -SHL1USE_EXPORTS=name -SHL1STDLIBS+= $(SALLIB) $(VOSLIB) $(BASEGFXLIB) $(I18NISOLANGLIB) $(COMPHELPERLIB) - -.IF "$(GUI)"=="WNT" -SHL1STDLIBS+= $(SHELL32LIB) \ - $(MPRLIB) \ - $(OLE32LIB) \ - $(UUIDLIB) \ - $(ADVAPI32LIB) -.ENDIF - -DEF1NAME =$(SHL1TARGET) -DEF1DEPN = \ - $(MISC)$/$(SHL1TARGET).flt \ - $(HXX1FILES) \ - $(HXX2FILES) \ - $(HXX3FILES) \ - $(HXX4FILES) \ - $(HXX5FILES) \ - $(HXX6FILES) \ - $(HXX7FILES) \ - $(HXX8FILES) \ - $(HXX9FILES) \ - $(HXX10FILES) \ - $(HXX11FILES) \ - $(HXX12FILES) \ - $(HXX13FILES) \ - $(HXX14FILES) \ - $(HXX15FILES) \ - $(HXX16FILES) \ - $(HXX17FILES) \ - $(HXX18FILES) \ - $(HXX19FILES) \ - $(HXX20FILES) \ - makefile.mk - -DEFLIB1NAME =tools - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -# --- TOOLS.FLT --- -$(MISC)$/$(SHL1TARGET).flt: makefile.mk - @echo ------------------------------ - @echo Making: $@ - @echo Imp>$@ - @echo PointerList>>$@ - @echo DbgCheck>>$@ - @echo LabelList>>$@ - @echo ActionList>>$@ - @echo CBlock>>$@ - @echo DirEntryStack>>$@ - @echo readdir>>$@ - @echo closedir>>$@ - @echo opendir>>$@ - @echo volumeid>>$@ - @echo MsDos2Time>>$@ - @echo MsDos2Date>>$@ - @echo __new_alloc>>$@ - @echo __CT>>$@ - @echo unnamed>>$@ -.IF "$(COM)"=="BLC" - @echo WEP>>$@ -.ENDIF diff --git a/tools/win/inc/shellex.h b/tools/win/inc/shellex.h deleted file mode 100644 index f81502a3382b..000000000000 --- a/tools/win/inc/shellex.h +++ /dev/null @@ -1,115 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SHELLEX_H_ -#define _SHELLEX_H_ - -#ifndef _SHLOBJ_H_ -#include <shlobj.h> -#endif - -#ifdef __cplusplus -extern "C" { -#define WINSHELLCALL inline -#else -#define WINSHELLCALL static -#endif - -#define SHChangeNotifyRegister_PROC_STR MAKEINTRESOURCE(2) -#define SHChangeNotifyDeregister_PROC_STR MAKEINTRESOURCE(4) - -#define SHCNF_ACCEPT_INTERRUPTS 0x0001 -#define SHCNF_ACCEPT_NON_INTERRUPTS 0x0002 -#define SHCNF_NO_PROXY 0x8000 - -#define SHCNF_ACCEPT_ALL (SHCNF_ACCEPT_INTERRUPTS | SHCNF_ACCEPT_NON_INTERRUPTS) - -typedef struct tagNOTIFYREGISTER { - LPCITEMIDLIST pidlPath; - BOOL bWatchSubtree; -} NOTIFYREGISTER; - -typedef NOTIFYREGISTER *LPNOTIFYREGISTER; -typedef NOTIFYREGISTER const *LPCNOTIFYREGISTER; - -typedef HANDLE (WINAPI *SHChangeNotifyRegister_PROC)( - HWND hWnd, - DWORD dwFlags, - LONG wEventMask, - UINT uMsg, - ULONG cItems, - LPCNOTIFYREGISTER lpItems); - - -WINSHELLCALL HANDLE WINAPI SHChangeNotifyRegister( - HWND hWnd, - DWORD dwFlags, - LONG wEventMask, - UINT uMsg, - ULONG cItems, - LPCNOTIFYREGISTER lpItems) - -{ - HMODULE hModule = GetModuleHandle( "SHELL32" ); - HANDLE hNotify = NULL; - - if ( hModule ) - { - SHChangeNotifyRegister_PROC lpfnSHChangeNotifyRegister = (SHChangeNotifyRegister_PROC)GetProcAddress( hModule, SHChangeNotifyRegister_PROC_STR ); - if ( lpfnSHChangeNotifyRegister ) - hNotify = lpfnSHChangeNotifyRegister( hWnd, dwFlags, wEventMask, uMsg, cItems, lpItems ); - } - - return hNotify; -} - - - -typedef BOOL (WINAPI *SHChangeNotifyDeregister_PROC)( - HANDLE hNotify); - -WINSHELLCALL BOOL WINAPI SHChangeNotifyDeregister( HANDLE hNotify ) -{ - HMODULE hModule = GetModuleHandle( "SHELL32" ); - BOOL fSuccess = FALSE; - - if ( hModule ) - { - SHChangeNotifyDeregister_PROC lpfnSHChangeNotifyDeregister = (SHChangeNotifyDeregister_PROC)GetProcAddress( hModule, SHChangeNotifyDeregister_PROC_STR ); - if ( lpfnSHChangeNotifyDeregister ) - fSuccess = lpfnSHChangeNotifyDeregister( hNotify ); - } - - return fSuccess; -} - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/tools/win/inc/shutil.h b/tools/win/inc/shutil.h deleted file mode 100644 index 1daae442292d..000000000000 --- a/tools/win/inc/shutil.h +++ /dev/null @@ -1,215 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SHUTIL_H_ -#define _SHUTIL_H_ - -#if defined WNT - -#ifndef _SHOBJ_H -#include <shlobj.h> -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#define PROTOCOL_FILE "file:" -#define MAX_URL (MAX_PATH + sizeof(PROTOCOL_FILE)) - -#define SHUTIL_TO_DELIVER - -//-------------------------------------------------------------------------- - -void * WINAPI WIN_SHAlloc( ULONG cb ); -void * WINAPI WIN_SHRealloc( void *pv, ULONG cb ); -void WINAPI WIN_SHFree( void *pv ); - -//-------------------------------------------------------------------------- - -ULONG WINAPI WIN_SHGetIDListSize( LPCITEMIDLIST pidl ); -BOOL WINAPI WIN_SHCloneIDList( LPCITEMIDLIST pidl, LPITEMIDLIST *ppidl ); -BOOL WINAPI WIN_SHAppendIDList( LPCITEMIDLIST pidl, LPITEMIDLIST *ppidl ); -LONG WINAPI WIN_SHCompareIDList( LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2 ); - -LONG WINAPI WIN_SHGetIDListTokenCount( LPCITEMIDLIST pidl ); -BOOL WINAPI WIN_SHGetIDListToken( LPCITEMIDLIST pidl, ULONG nToken, LPITEMIDLIST *ppidl ); - -BOOL WINAPI WIN_SHSplitIDList( - LPCITEMIDLIST pidl, - LPITEMIDLIST * pidlFolder, - LPITEMIDLIST * pidlItem - ); - -BOOL WINAPI WIN_SHSplitIDListEx( - LPCITEMIDLIST pidl, - LPITEMIDLIST * pidlParent, - LPITEMIDLIST * pidlChild, - ULONG nLevel - ); - -//-------------------------------------------------------------------------- - -#define WIN_SHGetSpecialFolderLocation( nFolder, ppidl ) \ - ((BOOL)(NOERROR == SHGetSpecialFolderLocation( GetFocus(), nFolder, ppidl ))) - -#define WIN_SHGetPathFromIDList( pidl, pszPath ) \ - SHGetPathFromIDList( pidl, pszPath ) - -// #define SHGP_CLSID 0x00000001 - -// BOOL WINAPI WIN_SHGetPathFromIDListEx( LPCITEMIDLIST pidl, LPSTR pszBuffer, UINT uFlags ); - -BOOL WINAPI WIN_SHGetIDListFromPath( LPCSTR pszPath, LPITEMIDLIST *ppidl ); - -BOOL WINAPI WIN_SHGetPathFromURL( LPCSTR pszURL, LPSTR pszPath ); -BOOL WINAPI WIN_SHGetURLFromPath( LPCSTR pszPath, LPSTR pszURL ); - -BOOL WINAPI WIN_SHGetFolderFromIDList( LPCITEMIDLIST pidl, LPSHELLFOLDER *ppshf ); -BOOL WINAPI WIN_SHGetSpecialFolder( int nFolder, LPSHELLFOLDER *ppshf ); -BOOL WINAPI WIN_SHGetFolderFromPath( LPCSTR pszPath, LPSHELLFOLDER *ppshf ); - -BOOL WINAPI WIN_SHGetSpecialFolderPath( int nFolder, LPSTR pszPath ); - -HRESULT WINAPI WIN_SHGetDataFromIDList( - LPSHELLFOLDER psf, - LPCITEMIDLIST pidl, - int nFormat, - PVOID pv, - int cb - ); - - -//-------------------------------------------------------------------------- - -#define SHIC_PIDL 0x00000001 -#define SHIC_NO_UI 0x00000002 - -#define CMDSTR_OPENA "open" -#define CMDSTR_EXPLOREA "explore" -#define CMDSTR_FINDA "find" - -#define CMDSTR_OPENW L"open" -#define CMDSTR_EXPLOREW L"explore" -#define CMDSTR_FINDW L"find" - -#ifdef UNICODE -#define CMDSTR_OPEN CMDSTR_OPENW -#define CMDSTR_EXPLORE CMDSTR_EXPLOREW -#define CMDSTR_FIND CMDSTR_FINDW -#else -#define CMDSTR_OPEN CMDSTR_OPENA -#define CMDSTR_EXPLORE CMDSTR_EXPLOREA -#define CMDSTR_FIND CMDSTR_FINDA -#endif - -#define CMDSTR_DEFAULT MAKEINTRESOURCE(0x00) - -#define CMDSTR_LINK MAKEINTRESOURCE(0x10) -#define CMDSTR_DELETE MAKEINTRESOURCE(0x11) -#define CMDSTR_RENAME MAKEINTRESOURCE(0x12) -#define CMDSTR_PROPERTIES MAKEINTRESOURCE(0x13) -#define CMDSTR_CUT MAKEINTRESOURCE(0x18) -#define CMDSTR_COPY MAKEINTRESOURCE(0x19) - -BOOL WINAPI WIN_SHInvokeCommand( - HWND hwndOwner, - DWORD dwFlags, - LPCTSTR lpPath, - LPCSTR lpVerb, - LPCSTR lpParameters, - LPCSTR lpDirectory, - int nShow - ); - -//-------------------------------------------------------------------------- - -BOOL WINAPI WIN_SHStrRetToMultiByte( - LPCITEMIDLIST pidl, - const STRRET * pStr, - LPSTR lpMultiByte, - int cchMultiByte - ); - -DWORD WIN_SHBuildCRC( LPVOID pBytes, ULONG nBytes ); - -DWORD WINAPI WIN_GetShellVersion(VOID); - -HIMAGELIST WINAPI WIN_SHGetSystemImageList( UINT uFlags ); - -//-------------------------------------------------------------------------- - -/* - -ULONG WINAPI WIN_CreateStringFromBinary ( - LPCVOID pv, - ULONG cbSize, - LPSTR pszString, - ULONG cbStringSize - ); - -ULONG WINAPI WIN_CreateBinaryFromString( - LPCSTR pszStr, - LPVOID pBuffer, - ULONG cbSize - ); -*/ - -//-------------------------------------------------------------------------- - -DWORD WINAPI WIN_SHSetValue( - HKEY hKey, - LPCTSTR pszSubKey, - LPCTSTR pszValue, - DWORD dwType, - LPCVOID pvData, - DWORD cbData - ); - -DWORD WINAPI WIN_SHGetValue( - HKEY hKey, - LPCTSTR pszSubKey, - LPCTSTR pszValue, - LPDWORD pdwType, - LPVOID pvData, - LPDWORD pcbData - ); - -DWORD WINAPI WIN_SHDeleteValue( - HKEY hKey, - LPCTSTR pszSubKey, - LPCTSTR pszValue - ); - -#ifdef __cplusplus -} -#endif - -#endif - -#endif // _SHUTIL_H_ - diff --git a/tools/win/inc/winshell.hxx b/tools/win/inc/winshell.hxx deleted file mode 100644 index a8be1e7d1344..000000000000 --- a/tools/win/inc/winshell.hxx +++ /dev/null @@ -1,386 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _WINSHELL_HXX -#define _WINSHELL_HXX - -#if defined WNT - -#include <tools/prewin.h> -#include "shutil.h" -#include <tools/postwin.h> - -#include <tools/string.hxx> - -//---------------------------------------------------------------------------- -// CItemIDList -//---------------------------------------------------------------------------- - -class CItemIDList -{ -public: - CItemIDList(); - CItemIDList( const CItemIDList & ); - CItemIDList( LPCITEMIDLIST ); - CItemIDList( const String & ); - CItemIDList( int nFolder ); - ~CItemIDList(); - - CItemIDList & operator = ( const CItemIDList & ); - CItemIDList & operator += ( const CItemIDList & ); - CItemIDList operator + ( const CItemIDList & ) const; - - int operator == ( const CItemIDList & ) const; - int operator != ( const CItemIDList & rIDList ) const - { return ! operator == ( rIDList ); }; - - operator LPCITEMIDLIST() const - { return m_pidl; }; - - int GetTokenCount() const; - CItemIDList GetToken( int nIndex ) const; - CItemIDList GetParent( int nLevelFromBottom = 1) const; - CItemIDList GetChild( int nLevelFromBottom = 1 ) const; - void Split( CItemIDList & rParent, CItemIDList & rChild, int nLevelFromBottom = 1 ) const; - - CItemIDList operator []( int nIndex ) const - { return GetToken( nIndex ); }; - - String GetFilePath() const; - - BOOL IsValid() const - { return m_pidl != NULL && m_pidl->mkid.cb != sizeof(USHORT); } - - int GetRootID() const - { return m_nFolder; } - -protected: - ITEMIDLIST *m_pidl; - int m_nFolder; -}; - - -inline CItemIDList CItemIDList::operator + ( const CItemIDList & rIDList ) const -{ - CItemIDList aCopy( *this ); - aCopy += rIDList; - return aCopy; -} - -//---------------------------------------------------------------------------- -// Types for CShellFolder -//---------------------------------------------------------------------------- - -// Notification Events fuer CShellFolder - -enum NotificationEvent -{ - NotificationEvent_Error, - NotificationEvent_Signaled, - NotificationEvent_Canceled -}; - -// Volume information - -typedef struct _WIN32_VOLUME_DATA -{ - TCHAR cDeviceName[MAX_PATH]; - TCHAR cVolumeName[MAX_PATH]; - TCHAR cFileSystemName[MAX_PATH]; - DWORD dwSerialNumber; - DWORD dwFileSystemFlags; - DWORD nMaxComponentLength; -} WIN32_VOLUME_DATA; - -// Bekannte Class-IDs fuer wichtige Ordner - -// {871C5380-42A0-1069-A2EA-08002B30309D} Internet Explorer 4.0 -static const GUID CLSID_IE4 = -{ 0x871C5380, 0x42A0, 0x1069, { 0xA2, 0xEA, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D } }; - -// {208D2C60-3AEA-1069-A2D7-08002B30309D} Netzwerkumgebung -static const GUID CLSID_Network = -{ 0x208D2C60, 0x3AEA, 0x1069, { 0xA2, 0xD7, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D } }; - -// {645FF040-5081-101B-9F08-00AA002F954E} Papierkorb -static const GUID CLSID_RecycleBin = -{ 0x645FF040, 0x5081, 0x101B, { 0x9F, 0x08, 0x00, 0xAA, 0x00, 0x2F, 0x95, 0x4E } }; - -// {20D04FE0-3AEA-1069-A2D8-08002B30309D} Arbeitsplatz -static const GUID CLSID_MyComputer = -{ 0x20D04FE0, 0x3AEA, 0x1069, { 0xA2, 0xD8, 0x08, 0x00, 0x2B, 0x30, 0x30, 0x9D } }; - -// {D6277990-4C6A-11CF-8D87-00AA0060F5BF} Geplante Vorgnge -static const GUID CLSID_Tasks = -{ 0xD6277990, 0x4C6A, 0x11CF, { 0x8D, 0x87, 0x00, 0xAA, 0x00, 0x60, 0xF5, 0xBF } }; - -// Fehlt im Header - -#define SHGDN_INCLUDE_NONFILESYS 0x2000 - -#define CSIDL_UNKNOWN -1 -#define CSIDL_ROOT -2 -#define CSIDL_SYSTEM -3 - -// Suchmaske fuer IEnumIDList - -#define SHCONTF_ALL (SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN) - -// SHITEM Prefix Kinds - -#define SHGII_CONTAINER_MASK 0x70 - -#define SHGII_COMPUTER 0x20 - -#define SHGII_COMPUTER_REMOVABLE 0x22 -#define SHGII_COMPUTER_FIXED 0x23 -#define SHGII_COMPUTER_REMOTE 0x24 -#define SHGII_COMPUTER_CDROM 0x25 -#define SHGII_COMPUTER_RAMDISK 0x26 -#define SHGII_COMPUTER_FLOPPY525 0x28 -#define SHGII_COMPUTER_FLOPPY35 0x29 -#define SHGII_COMPUTER_NETWORK 0x2A -#define SHGII_COMPUTER_REGITEM 0x2E - -#define SHGII_ROOT 0x10 -#define SHGII_ROOT_REGITEM 0x1F - -#define SHGII_NETWORK 0x40 -#define SHGII_NETWORK_TREE 0x47 -#define SHGII_NETWORK_SERVER 0x42 -#define SHGII_NETWORK_DIRECTORY 0x43 -#define SHGII_NETWORK_PRINTER 0x41 - -#define SHGII_FILESYSTEM 0x30 -#define SHGII_FILESYSTEM_FILE 0x31 -#define SHGII_FILESYSTEM_DIRECTORY 0x32 - -#define SHGII_ANCESTOR 0x80 - -#define SHITEMCONTAINER( pidl ) ((pidl)->mkid.abID[0] & SHGII_CONTAINER_MASK) -#define SHITEMKIND( pidl ) ((pidl)->mkid.abID[0] & 0x7F) - -//---------------------------------------------------------------------------- -// CShellFolderData -//---------------------------------------------------------------------------- - -class CShellFolderData -{ -protected: - CShellFolderData(); - virtual ~CShellFolderData(); - - IShellFolder *m_pShellFolder; - IEnumIDList *m_pEnumIDList; - IShellIcon *m_pShellIcon; - BOOL m_bIsOpen; - HANDLE m_hCancelEvent; - DWORD m_dwContentFlags; -}; - -//---------------------------------------------------------------------------- -// CShellFolder -//---------------------------------------------------------------------------- - -// Ganz "normaler" Ordner basierend auf dem IShellFolder Interface - -class CShellFolder : public CShellFolderData -{ -public: - CShellFolder( const CItemIDList & ); - CShellFolder( const CShellFolder & ); - CShellFolder( IShellFolder * ); - - // Retrieval of Item IDs - - virtual BOOL Reset(); - - BOOL GetNextValidID( CItemIDList & ); - - virtual BOOL GetNextID( CItemIDList & ); - virtual BOOL ValidateID( const CItemIDList & ); - - // Getting information about Items - - virtual BOOL GetAttributesOf( const CItemIDList &, LPDWORD pdwInOut ); - virtual BOOL GetNameOf( const CItemIDList &, String & ); - - virtual BOOL GetFileInfo( const CItemIDList &, WIN32_FIND_DATA * ); - virtual BOOL GetVolumeInfo( const CItemIDList & rIDList, WIN32_VOLUME_DATA * ); - - // Modifying the folder contents - - virtual BOOL SetNameOf( const CItemIDList &, const String &, CItemIDList & ); - virtual BOOL DeleteItem( const CItemIDList & ); - - // Comparison of IDs - - virtual int CompareIDs( const CItemIDList &, const CItemIDList & ); - - // UI Components - - virtual IContextMenu *GetContextMenu( int nItems, const CItemIDList * ); - virtual String GetIconLocation( const CItemIDList & ); - - // Notifications - - virtual NotificationEvent WaitForChanges(); - virtual void CancelWaitNotifications(); - -protected: - CShellFolder() : CShellFolderData() {}; - - void Initialize( IShellFolder *pShellFolder ); - void Initialize( LPCITEMIDLIST ); -}; - -//---------------------------------------------------------------------------- -// CFileSystemFolder -//---------------------------------------------------------------------------- - -// Reiner !!! Filesystem-Ordner. Benutzt optimierten Notification Mechanismus - -class CFileSystemFolder : public CShellFolder -{ -public: - CFileSystemFolder( LPCSTR pszPath ); - - virtual NotificationEvent WaitForChanges(); - -protected: - CFileSystemFolder() : CShellFolder() {}; - - void Initialize( LPCTSTR pszPath ); - - TCHAR m_szPath[MAX_PATH]; -}; - -//---------------------------------------------------------------------------- -// CSpecialFolder -//---------------------------------------------------------------------------- - -// Wie SHellFolder, aber andere Konstruktion ueber definierte Junktion-Points - -class CSpecialFolder : public CShellFolder -{ -public: - CSpecialFolder( int nFolder ); - -protected: - CSpecialFolder() : CShellFolder() {}; - - void Initialize( int nFolder ); - - int m_nFolder; -}; - -//---------------------------------------------------------------------------- -// CMyComputerFolder -//---------------------------------------------------------------------------- - -// Der MS-Windows "Arbeitsplatz" - -class CMyComputerFolder : public CSpecialFolder -{ -public: - CMyComputerFolder() : CSpecialFolder( CSIDL_DRIVES ) {}; -}; - -//---------------------------------------------------------------------------- -// CVolumesFolder -//---------------------------------------------------------------------------- - -// Wie CMyComputersFolder, enthlt aber nur die Laufwerke - -class CVolumesFolder : public CMyComputerFolder -{ -public: - CVolumesFolder() : CMyComputerFolder() {}; - - virtual BOOL ValidateID( const CItemIDList & ); - virtual NotificationEvent WaitForChanges(); -}; - -//---------------------------------------------------------------------------- -// CWorkplaceFolder -//---------------------------------------------------------------------------- - -// Wie CMyComputersFolder, enthlt aber keine!!! Laufwerke - -class CWorkplaceFolder : public CMyComputerFolder -{ - CWorkplaceFolder() : CMyComputerFolder() {}; - - virtual BOOL ValidateID( const CItemIDList & ); - virtual NotificationEvent WaitForChanges(); -}; - -//---------------------------------------------------------------------------- -// CDesktopFolder -//---------------------------------------------------------------------------- - -// Der MS-Windows Desktop - -class CDesktopFolder : public CSpecialFolder -{ -public: - CDesktopFolder() : CSpecialFolder( CSIDL_DESKTOP ) {}; -}; - -//---------------------------------------------------------------------------- -// CDesktopAncestorsFolder -//---------------------------------------------------------------------------- - -// Wie CDesktopFolder, enthlt aber nur Arbeitsplatz und Netzwerk - -class CDesktopAncestorsFolder : public CDesktopFolder -{ -public: - CDesktopAncestorsFolder() : CDesktopFolder() {}; - - virtual BOOL ValidateID( const CItemIDList & ); - virtual NotificationEvent WaitForChanges(); -}; - -//---------------------------------------------------------------------------- -// CDesktopContentsFolder -//---------------------------------------------------------------------------- - -// Wie CDesktopFolder, aber ohne!!! Arbeitsplatz und Netzwerk - -class CDesktopContentsFolder : public CDesktopFolder -{ -public: - CDesktopContentsFolder() : CDesktopFolder() {}; - - virtual BOOL ValidateID( const CItemIDList & ); - virtual NotificationEvent WaitForChanges(); -}; - -#endif - -#endif // _WINSHELL_HXX diff --git a/tools/win/source/dll/makefile.mk b/tools/win/source/dll/makefile.mk deleted file mode 100644 index 403da065d653..000000000000 --- a/tools/win/source/dll/makefile.mk +++ /dev/null @@ -1,56 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. - -PRJNAME=TOOLS -TARGET=dll - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -.INCLUDE: $(PRJ)$/util$/makefile.pmk - -# --- WNT ---------------------------------------------------------- - -.IF "$(GUI)" == "WNT" - -# --- Files -------------------------------------------------------- - -CXXFILES= toolsdll.cxx - -SLOFILES= $(SLO)$/toolsdll.obj - -OBJFILES= $(OBJ)$/toolsdll.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.ENDIF - diff --git a/tools/win/source/fastfsys/makefile.mk b/tools/win/source/fastfsys/makefile.mk deleted file mode 100644 index 12df85d6a2f3..000000000000 --- a/tools/win/source/fastfsys/makefile.mk +++ /dev/null @@ -1,71 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..\..\.. - -PRJNAME=TOOLS -TARGET=fastfsys - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- WNT ---------------------------------------------------------- - -.IF "$(GUI)" == "WNT" - -# --- Files -------------------------------------------------------- - - -OBJFILES= $(OBJ)$/shutil.obj \ - $(OBJ)$/shidl.obj \ - $(OBJ)$/shmalloc.obj \ - $(OBJ)$/fffolder.obj \ - $(OBJ)$/ffmenu.obj \ - $(OBJ)$/ffitem.obj \ - $(OBJ)$/fflink.obj \ - $(OBJ)$/ffparser.obj \ - $(OBJ)$/wincidl.obj \ - $(OBJ)$/wincshf.obj - - -SLOFILES= $(SLO)$/shutil.obj \ - $(SLO)$/shidl.obj \ - $(SLO)$/shmalloc.obj \ - $(SLO)$/fffolder.obj \ - $(SLO)$/ffmenu.obj \ - $(SLO)$/ffitem.obj \ - $(SLO)$/fflink.obj \ - $(SLO)$/ffparser.obj \ - $(SLO)$/wincidl.obj \ - $(SLO)$/wincshf.obj - -# --- Targets ------------------------------------------------------ - -.ENDIF - -.INCLUDE : target.mk diff --git a/unotools/prj/build.lst b/unotools/prj/build.lst index 70402fb3dbd5..d6f10335c254 100644 --- a/unotools/prj/build.lst +++ b/unotools/prj/build.lst @@ -1,4 +1,4 @@ -ut unotools : comphelper cppuhelper offuh tools ucbhelper NULL +ut unotools : LIBXSLT:libxslt comphelper cppuhelper offuh tools ucbhelper NULL ut unotools usr1 - all ut_mkout NULL ut unotools\inc nmake - all ut_inc NULL ut unotools\source\misc nmake - all ut_misc ut_config ut_inc NULL diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx index 7f2250c611fc..f76ce48eebdf 100644 --- a/unotools/source/config/viewoptions.cxx +++ b/unotools/source/config/viewoptions.cxx @@ -781,7 +781,7 @@ css::uno::Reference< css::uno::XInterface > SvtViewOptionsBase_Impl::impl_getSet xNode = ::comphelper::ConfigurationHelper::makeSureSetNodeExists(m_xRoot, m_sListName, sNode); else { - if (m_xSet.is()) + if (m_xSet.is() && m_xSet->hasByName(sNode) ) m_xSet->getByName(sNode) >>= xNode; } } diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx index 87fddc0c65cd..26742151ee3d 100644 --- a/unotools/source/ucbhelper/tempfile.cxx +++ b/unotools/source/ucbhelper/tempfile.cxx @@ -237,7 +237,7 @@ void CreateTempName_Impl( String& rName, sal_Bool bKeep, sal_Bool bDir = sal_Tru /* RW permission for the user only! */ mode_t old_mode = umask(077); #endif - FileBase::RC err = aFile.open(osl_File_OpenFlag_Create); + FileBase::RC err = aFile.open( osl_File_OpenFlag_Create | osl_File_OpenFlag_NoLock ); #ifdef UNX umask(old_mode); #endif diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx index f21855d20aed..9f4c39b397e1 100644 --- a/unotools/source/ucbhelper/ucblockbytes.cxx +++ b/unotools/source/ucbhelper/ucblockbytes.cxx @@ -1538,7 +1538,16 @@ ErrCode UcbLockBytes::Flush() const Reference <XOutputStream > xOutputStream = getOutputStream_Impl(); if ( !xOutputStream.is() ) return ERRCODE_IO_CANTWRITE; - xOutputStream->flush(); + + try + { + xOutputStream->flush(); + } + catch( Exception ) + { + return ERRCODE_IO_CANTWRITE; + } + return ERRCODE_NONE; } diff --git a/vcl/aqua/inc/salobj.h b/vcl/aqua/inc/salobj.h index 0041b22c16a0..56b07cea4262 100644 --- a/vcl/aqua/inc/salobj.h +++ b/vcl/aqua/inc/salobj.h @@ -81,6 +81,7 @@ public: virtual void SetBackground(); virtual void SetBackground( SalColor nSalColor ); virtual const SystemEnvData* GetSystemData() const; + virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); }; #endif // _SV_SALOBJ_H diff --git a/vcl/aqua/source/app/vclnsapp.mm b/vcl/aqua/source/app/vclnsapp.mm index 06af0358c52b..5a476e0a54cc 100755 --- a/vcl/aqua/source/app/vclnsapp.mm +++ b/vcl/aqua/source/app/vclnsapp.mm @@ -360,68 +360,29 @@ -(NSApplicationTerminateReply)applicationShouldTerminate: (NSApplication *) app { - YIELD_GUARD; - - SalData* pSalData = GetSalData(); - #if 1 // currently do some really bad hack - if( ! pSalData->maFrames.empty() ) + NSApplicationTerminateReply aReply = NSTerminateNow; { - /* #i92766# something really weird is going on with the retain count of - our windows; sometimes we get a duplicate free before exit on one of our - NSWindows. The reason is unclear; to avoid this currently we retain them once more - - FIXME: this is a really bad hack, relying on the system to catch the leaked - resources. Find out what really goes on here and fix it ! - */ - std::vector< NSWindow* > aHackRetainedWindows; - for( std::list< AquaSalFrame* >::iterator it = pSalData->maFrames.begin(); - it != pSalData->maFrames.end(); ++it ) - { - #if OSL_DEBUG_LEVEL > 1 - Window* pWin = (*it)->GetWindow(); - String aTitle = pWin->GetText(); - Window* pClient = pWin->ImplGetClientWindow(); - fprintf( stderr, "retaining %p (old count %d) windowtype=%s clienttyp=%s title=%s\n", - (*it)->mpWindow, [(*it)->mpWindow retainCount], - typeid(*pWin).name(), pClient ? typeid(*pClient).name() : "<nil>", - rtl::OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 ).getStr() - ); - #endif - [(*it)->mpWindow retain]; - aHackRetainedWindows.push_back( (*it)->mpWindow ); - } - if( pSalData->maFrames.front()->CallCallback( SALEVENT_SHUTDOWN, NULL ) ) + YIELD_GUARD; + + SalData* pSalData = GetSalData(); + if( ! pSalData->maFrames.empty() ) { - for( std::vector< NSWindow* >::iterator it = aHackRetainedWindows.begin(); - it != aHackRetainedWindows.end(); ++it ) - { - // clean up the retaing count again from the shutdown workaround - #if OSL_DEBUG_LEVEL > 1 - fprintf( stderr, "releasing %p\n", (*it) ); - #endif - [(*it) release]; - } - return NSTerminateCancel; + // the following QueryExit will likely present a message box, activate application + [NSApp activateIgnoringOtherApps: YES]; + aReply = pSalData->maFrames.front()->CallCallback( SALEVENT_SHUTDOWN, NULL ) ? NSTerminateCancel : NSTerminateNow; } - #if OSL_DEBUG_LEVEL > 1 - for( std::list< AquaSalFrame* >::iterator it = pSalData->maFrames.begin(); - it != pSalData->maFrames.end(); ++it ) + + if( aReply == NSTerminateNow ) { - Window* pWin = (*it)->GetWindow(); - String aTitle = pWin->GetText(); - Window* pClient = pWin->ImplGetClientWindow(); - fprintf( stderr, "frame still alive: NSWindow %p windowtype=%s clienttyp=%s title=%s\n", - (*it)->mpWindow, typeid(*pWin).name(), pClient ? typeid(*pClient).name() : "<nil>", - rtl::OUStringToOString( aTitle, RTL_TEXTENCODING_UTF8 ).getStr() - ); + ApplicationEvent aEv( String(), ApplicationAddress(), ByteString( "PRIVATE:DOSHUTDOWN" ), String() ); + GetpApp()->AppEvent( aEv ); + ImplImageTreeSingletonRef()->shutDown(); + // DeInitVCL should be called in ImplSVMain - unless someon _exits first which + // can occur in Desktop::doShutdown for example } - #endif } - #else // the clean version follows - return pSalData->maFrames.front()->CallCallback( SALEVENT_SHUTDOWN, NULL ) ? NSTerminateCancel : NSTerminateNow; - #endif - ImplImageTreeSingletonRef()->shutDown(); - return NSTerminateNow; + + return aReply; } -(void)systemColorsChanged: (NSNotification*) pNotification diff --git a/vcl/aqua/source/dtrans/service_entry.cxx b/vcl/aqua/source/dtrans/service_entry.cxx index 16308951bcfe..222b5cf40e04 100644 --- a/vcl/aqua/source/dtrans/service_entry.cxx +++ b/vcl/aqua/source/dtrans/service_entry.cxx @@ -34,6 +34,7 @@ #include "DropTarget.hxx" #include "aqua_clipboard.hxx" #include "osl/diagnose.h" +#include "vcl/svapp.hxx" using namespace ::osl; using namespace ::rtl; @@ -45,6 +46,9 @@ using namespace ::com::sun::star::datatransfer::clipboard; Reference< XInterface > AquaSalInstance::CreateClipboard( const Sequence< Any >& i_rArguments ) { + if ( Application::IsHeadlessModeEnabled() ) + return SalInstance::CreateClipboard( i_rArguments ); + SalData* pSalData = GetSalData(); if( ! pSalData->mxClipboard.is() ) pSalData->mxClipboard = Reference<XInterface>(static_cast< XClipboard* >(new AquaClipboard()), UNO_QUERY); @@ -54,11 +58,17 @@ Reference< XInterface > AquaSalInstance::CreateClipboard( const Sequence< Any >& Reference<XInterface> AquaSalInstance::CreateDragSource() { + if ( Application::IsHeadlessModeEnabled() ) + return SalInstance::CreateDragSource(); + return Reference<XInterface>(static_cast< XInitialization* >(new DragSource()), UNO_QUERY); } Reference<XInterface> AquaSalInstance::CreateDropTarget() { - return Reference<XInterface>(static_cast< XInitialization* >(new DropTarget()), UNO_QUERY); + if ( Application::IsHeadlessModeEnabled() ) + return SalInstance::CreateDropTarget(); + + return Reference<XInterface>(static_cast< XInitialization* >(new DropTarget()), UNO_QUERY); } diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm index d19290d8320a..93945570dc96 100644 --- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm +++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm @@ -322,6 +322,9 @@ class ControllerProperties GDIMetaFile aMtf; PrinterController::PageSize aPageSize( mpController->getFilteredPageFile( i_nPage, aMtf, false ) ); VirtualDevice aDev; + if( mpController->getPrinter()->GetPrinterOptions().IsConvertToGreyscales() ) + aDev.SetDrawMode( aDev.GetDrawMode() | ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT | + DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) ); // see salprn.cxx, currently we pretend to be a 720dpi device on printers aDev.SetReferenceDevice( 720, 720 ); aDev.EnableOutput( TRUE ); diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx index e1daf649f6da..070c0753637d 100644 --- a/vcl/aqua/source/gdi/salgdi.cxx +++ b/vcl/aqua/source/gdi/salgdi.cxx @@ -2356,8 +2356,10 @@ void AquaSalGraphics::GetGlyphWidths( const ImplFontData* pFontData, bool bVerti const ImplFontCharMap* pMap = mpMacFontData->GetImplFontCharMap(); DBG_ASSERT( pMap && pMap->GetCharCount(), "no charmap" ); + pMap->AddReference(); // TODO: add and use RAII object instead // get unicode<->glyph encoding + // TODO? avoid sft mapping by using the pMap itself int nCharCount = pMap->GetCharCount(); sal_uInt32 nChar = pMap->GetFirstChar(); for(; --nCharCount >= 0; nChar = pMap->GetNextChar( nChar ) ) diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx index eb09a44f5edd..f633dbbdcdce 100644 --- a/vcl/aqua/source/gdi/salvd.cxx +++ b/vcl/aqua/source/gdi/salvd.cxx @@ -33,6 +33,7 @@ #include "salgdi.h" #include "saldata.hxx" #include "salframe.h" +#include <vcl/svapp.hxx> #include "vcl/sysdata.hxx" @@ -197,9 +198,27 @@ BOOL AquaSalVirtualDevice::SetSize( long nDX, long nDY ) pSalFrame = *GetSalData()->maFrames.begin(); if( pSalFrame ) { - NSGraphicsContext* pNSContext = [NSGraphicsContext graphicsContextWithWindow: pSalFrame->getWindow()]; - if( pNSContext ) - xCGContext = reinterpret_cast<CGContextRef>([pNSContext graphicsPort]); + // #i91990# + NSWindow* pWindow = pSalFrame->getWindow(); + if ( pWindow ) + { + NSGraphicsContext* pNSContext = [NSGraphicsContext graphicsContextWithWindow: pWindow]; + if( pNSContext ) + xCGContext = reinterpret_cast<CGContextRef>([pNSContext graphicsPort]); + } + else + { + // fall back to a bitmap context + mnBitmapDepth = 32; + const CGColorSpaceRef aCGColorSpace = GetSalData()->mxRGBSpace; + const CGBitmapInfo aCGBmpInfo = kCGImageAlphaNoneSkipFirst; + const int nBytesPerRow = (mnBitmapDepth * nDX) / 8; + + void* pRawData = rtl_allocateMemory( nBytesPerRow * nDY ); + mxBitmapContext = ::CGBitmapContextCreate( pRawData, nDX, nDY, + 8, nBytesPerRow, aCGColorSpace, aCGBmpInfo ); + xCGContext = mxBitmapContext; + } } } diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx index 4530778c5775..17e034bd6e3d 100644 --- a/vcl/aqua/source/window/salframe.cxx +++ b/vcl/aqua/source/window/salframe.cxx @@ -191,8 +191,17 @@ void AquaSalFrame::initWindowAndView() mnStyleMask |= NSTitledWindowMask; } + // #i91990# support GUI-less (daemon) execution + @try + { mpWindow = [[SalFrameWindow alloc] initWithSalFrame: this]; mpView = [[SalFrameView alloc] initWithSalFrame: this]; + } + @catch ( id exception ) + { + return; + } + if( (mnStyle & SAL_FRAME_STYLE_TOOLTIP) ) [mpWindow setIgnoresMouseEvents: YES]; else @@ -291,6 +300,9 @@ BOOL AquaSalFrame::PostEvent( void *pData ) // ----------------------------------------------------------------------- void AquaSalFrame::SetTitle(const XubString& rTitle) { + if ( !mpWindow ) + return; + // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); @@ -405,6 +417,9 @@ void AquaSalFrame::SendPaintEvent( const Rectangle* pRect ) void AquaSalFrame::Show(BOOL bVisible, BOOL bNoActivate) { + if ( !mpWindow ) + return; + // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); @@ -563,6 +578,8 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState ) // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); + if ( mpWindow ) + { // set normal state NSRect aStateRect = [mpWindow frame]; aStateRect = [NSWindow contentRectForFrameRect: aStateRect styleMask: mnStyleMask]; @@ -599,6 +616,7 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState ) if( [mpWindow isZoomed] ) [mpWindow zoom: NSApp]; } + } // get new geometry UpdateFrameGeometry(); @@ -619,7 +637,7 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState ) if( nEvent ) CallCallback( nEvent, NULL ); - if( mbShown ) + if( mbShown && mpWindow ) { // trigger filling our backbuffer SendPaintEvent(); @@ -633,6 +651,9 @@ void AquaSalFrame::SetWindowState( const SalFrameState* pState ) BOOL AquaSalFrame::GetWindowState( SalFrameState* pState ) { + if ( !mpWindow ) + return FALSE; + // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); @@ -670,6 +691,9 @@ BOOL AquaSalFrame::GetWindowState( SalFrameState* pState ) void AquaSalFrame::SetScreenNumber(unsigned int nScreen) { + if ( !mpWindow ) + return; + // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); @@ -704,6 +728,9 @@ void AquaSalFrame::SetScreenNumber(unsigned int nScreen) void AquaSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay ) { + if ( !mpWindow ) + return; + // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); @@ -814,6 +841,9 @@ public: void AquaSalFrame::StartPresentation( BOOL bStart ) { + if ( !mpWindow ) + return; + // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); @@ -841,6 +871,9 @@ void AquaSalFrame::SetAlwaysOnTop( BOOL bOnTop ) void AquaSalFrame::ToTop(USHORT nFlags) { + if ( !mpWindow ) + return; + // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); @@ -900,6 +933,9 @@ NSCursor* AquaSalFrame::getCurrentCursor() const void AquaSalFrame::SetPointer( PointerStyle ePointerStyle ) { + if ( !mpWindow ) + return; + // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); @@ -1198,6 +1234,9 @@ void AquaSalFrame::getResolution( long& o_rDPIX, long& o_rDPIY ) // doesn't make the anything cleaner for now void AquaSalFrame::UpdateSettings( AllSettings& rSettings ) { + if ( !mpWindow ) + return; + // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); @@ -1312,6 +1351,9 @@ void AquaSalFrame::Beep( SoundType eSoundType ) void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHORT nFlags) { + if ( !mpWindow ) + return; + // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); @@ -1399,6 +1441,9 @@ void AquaSalFrame::SetPosSize(long nX, long nY, long nWidth, long nHeight, USHOR void AquaSalFrame::GetWorkArea( Rectangle& rRect ) { + if ( !mpWindow ) + return; + // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); @@ -1537,11 +1582,15 @@ void AquaSalFrame::SetMenu( SalMenu* pSalMenu ) void AquaSalFrame::SetExtendedFrameStyle( SalExtStyle nStyle ) { + if ( mpWindow ) + { // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); if( (mnExtStyle & SAL_FRAME_EXT_STYLE_DOCMODIFIED) != (nStyle & SAL_FRAME_EXT_STYLE_DOCMODIFIED) ) [mpWindow setDocumentEdited: (nStyle & SAL_FRAME_EXT_STYLE_DOCMODIFIED) ? YES : NO]; + } + mnExtStyle = nStyle; } @@ -1572,6 +1621,11 @@ void AquaSalFrame::SetParent( SalFrame* pNewParent ) void AquaSalFrame::UpdateFrameGeometry() { + if ( !mpWindow ) + { + return; + } + // keep in mind that view and window coordinates are lower left // whereas vcl's are upper left @@ -1644,6 +1698,11 @@ void AquaSalFrame::CaptureMouse( BOOL bCapture ) void AquaSalFrame::ResetClipRegion() { + if ( !mpWindow ) + { + return; + } + // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); @@ -1662,6 +1721,11 @@ void AquaSalFrame::ResetClipRegion() void AquaSalFrame::BeginSetClipRegion( ULONG nRects ) { + if ( !mpWindow ) + { + return; + } + // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); @@ -1696,6 +1760,11 @@ void AquaSalFrame::UnionClipRegion( long nX, long nY, long nWidth, long nHeight void AquaSalFrame::EndSetClipRegion() { + if ( !mpWindow ) + { + return; + } + // #i113170# may not be the main thread if called from UNO API SalData::ensureThreadAutoreleasePool(); diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm index 240a915e4e12..bc87ea444710 100755 --- a/vcl/aqua/source/window/salframeview.mm +++ b/vcl/aqua/source/window/salframeview.mm @@ -154,7 +154,9 @@ static AquaSalFrame* getMouseContainerFrame() NSRect aRect = { { pFrame->maGeometry.nX, pFrame->maGeometry.nY }, { pFrame->maGeometry.nWidth, pFrame->maGeometry.nHeight } }; pFrame->VCLToCocoa( aRect ); - return [super initWithContentRect: aRect styleMask: mpFrame->getStyleMask() backing: NSBackingStoreBuffered defer: NO ]; + NSWindow* pNSWindow = [super initWithContentRect: aRect styleMask: mpFrame->getStyleMask() backing: NSBackingStoreBuffered defer: NO ]; + [pNSWindow useOptimizedDrawing: YES]; // OSX recommendation when there are no overlapping subviews within the receiver + return pNSWindow; } -(AquaSalFrame*)getSalFrame diff --git a/vcl/aqua/source/window/salobj.cxx b/vcl/aqua/source/window/salobj.cxx index 07d337dcc81a..f300929f04fe 100644 --- a/vcl/aqua/source/window/salobj.cxx +++ b/vcl/aqua/source/window/salobj.cxx @@ -237,3 +237,9 @@ const SystemEnvData* AquaSalObject::GetSystemData() const return &maSysData; } +// ----------------------------------------------------------------------- + +void AquaSalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ ) +{ +} + diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx index ab92445b5e03..ddd023a3aaa4 100644 --- a/vcl/inc/vcl/button.hxx +++ b/vcl/inc/vcl/button.hxx @@ -78,7 +78,6 @@ public: ~Button(); virtual void Click(); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); void SetClickHdl( const Link& rLink ) { maClickHdl = rLink; } const Link& GetClickHdl() const { return maClickHdl; } diff --git a/vcl/inc/vcl/field.hxx b/vcl/inc/vcl/field.hxx index e1f39cc78966..6be9fd8d42c5 100644 --- a/vcl/inc/vcl/field.hxx +++ b/vcl/inc/vcl/field.hxx @@ -34,7 +34,7 @@ #include <tools/time.hxx> #include <vcl/spinfld.hxx> #include <vcl/combobox.hxx> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> namespace com { namespace sun { namespace star { namespace lang { struct Locale; } } } } diff --git a/vcl/inc/vcl/fldunit.hxx b/vcl/inc/vcl/fldunit.hxx deleted file mode 100644 index aa76f34332d6..000000000000 --- a/vcl/inc/vcl/fldunit.hxx +++ /dev/null @@ -1,33 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _VCL_FLDUNIT_HXX -#define _VCL_FLDUNIT_HXX - -#include <tools/fldunit.hxx> - -#endif // _VCL_FLDUNIT_HXX diff --git a/vcl/inc/vcl/lazydelete.hxx b/vcl/inc/vcl/lazydelete.hxx index 4176d5b4454f..dad10fb62b33 100644 --- a/vcl/inc/vcl/lazydelete.hxx +++ b/vcl/inc/vcl/lazydelete.hxx @@ -39,6 +39,8 @@ #include <stdio.h> #endif +#include <com/sun/star/lang/XComponent.hpp> + namespace vcl { /* Helpers for lazy object deletion @@ -256,6 +258,43 @@ namespace vcl // ownership is transfered ! T* set( T* i_pNew ) { T* pOld = m_pT; m_pT = i_pNew; return pOld; } }; + + /** Similar to DeleteOnDeinit, the DeleteUnoReferenceOnDeinit + template class makes sure that a static UNO object is disposed + and released at the right time. + + Use like + static DeleteUnoReferenceOnDeinit<lang::XMultiServiceFactory> + xStaticFactory (<create factory object>); + Reference<lang::XMultiServiceFactory> xFactory (xStaticFactory.get()); + if (xFactory.is()) + <do something with xFactory> + */ + template <typename I> + class DeleteUnoReferenceOnDeinit : public ::vcl::DeleteOnDeinitBase + { + ::com::sun::star::uno::Reference<I> m_xI; + virtual void doCleanup() { set(NULL); } + public: + DeleteUnoReferenceOnDeinit(const ::com::sun::star::uno::Reference<I>& r_xI ) : m_xI( r_xI ) { + addDeinitContainer( this ); } + virtual ~DeleteUnoReferenceOnDeinit() {} + + ::com::sun::star::uno::Reference<I> get (void) { return m_xI; } + + void set (const ::com::sun::star::uno::Reference<I>& r_xNew ) + { + ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> xComponent (m_xI, ::com::sun::star::uno::UNO_QUERY); + m_xI = r_xNew; + if (xComponent.is()) try + { + xComponent->dispose(); + } + catch( ::com::sun::star::uno::Exception& ) + { + } + } + }; } #endif diff --git a/vcl/inc/vcl/mapmod.hxx b/vcl/inc/vcl/mapmod.hxx index b2ea32958e90..260a5f4f86c2 100644 --- a/vcl/inc/vcl/mapmod.hxx +++ b/vcl/inc/vcl/mapmod.hxx @@ -33,7 +33,7 @@ #include <vcl/sv.h> #include <vcl/dllapi.h> #include <tools/resid.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> class SvStream; diff --git a/vcl/inc/vcl/mapunit.hxx b/vcl/inc/vcl/mapunit.hxx deleted file mode 100644 index b4c757c538e6..000000000000 --- a/vcl/inc/vcl/mapunit.hxx +++ /dev/null @@ -1,33 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _VCL_MAPUNIT_HXX -#define _VCL_MAPUNIT_HXX - -#include <tools/mapunit.hxx> - -#endif // _VCL_MAPUNIT_HXX diff --git a/vcl/inc/vcl/outfont.hxx b/vcl/inc/vcl/outfont.hxx index 4bbf7176ddb2..7ad233449d93 100644 --- a/vcl/inc/vcl/outfont.hxx +++ b/vcl/inc/vcl/outfont.hxx @@ -39,8 +39,6 @@ #include <hash_map> -#include <com/sun/star/linguistic2/XLinguServiceManager.hpp> - class ImplDevFontListData; class ImplGetDevFontList; class ImplGetDevSizeList; @@ -54,6 +52,8 @@ class ConvertChar; struct FontMatchStatus; class OutputDevice; +namespace com { namespace sun { namespace star { namespace lang { struct Locale; }}}} + // ---------------------- // - ImplFontAttributes - // ---------------------- @@ -140,7 +140,7 @@ public: virtual ImplFontData* Clone() const = 0; protected: - ImplFontData( const ImplDevFontAttributes&, int nMagic ); + explicit ImplFontData( const ImplDevFontAttributes&, int nMagic ); void SetBitmapSize( int nW, int nH ) { mnWidth=nW; mnHeight=nH; } long mnWidth; // Width (in pixels) @@ -199,8 +199,8 @@ private: ImplGlyphFallbackFontSubstitution* mpFallbackHook; // device specific glyh fallback substitution public: - ImplDevFontList(); - ~ImplDevFontList(); + explicit ImplDevFontList(); + virtual ~ImplDevFontList(); // fill the list with device fonts void Add( ImplFontData* ); @@ -226,7 +226,7 @@ public: ImplGetDevSizeList* GetDevSizeList( const String& rFontName ) const; //used by 2-level font fallback - ImplDevFontListData* ImplFindByLocale(com::sun::star::lang::Locale lc) const; + ImplDevFontListData* ImplFindByLocale( com::sun::star::lang::Locale& ) const; protected: void InitMatchData() const; @@ -267,7 +267,7 @@ struct ImplKernPairData class ImplFontMetricData : public ImplFontAttributes { public: - ImplFontMetricData( const ImplFontSelectData& ); + explicit ImplFontMetricData( const ImplFontSelectData& ); void ImplInitTextLineSize( const OutputDevice* pDev ); void ImplInitAboveTextLineSize(); @@ -327,7 +327,7 @@ public: // TODO: hide members behind accessor methods class VCL_DLLPUBLIC ImplFontEntry { public: - ImplFontEntry( const ImplFontSelectData& ); + explicit ImplFontEntry( const ImplFontSelectData& ); virtual ~ImplFontEntry(); public: // TODO: make data members private diff --git a/vcl/inc/vcl/print.hxx b/vcl/inc/vcl/print.hxx index 810fbd353f8c..40d88ca373db 100644 --- a/vcl/inc/vcl/print.hxx +++ b/vcl/inc/vcl/print.hxx @@ -208,6 +208,11 @@ public: BOOL IsConvertToGreyscales() const { return mbConvertToGreyscales; } void SetConvertToGreyscales( BOOL bSet ) { mbConvertToGreyscales = bSet; } + + // read printer options from configuration, parameter decides whether the set for + // print "to printer" or "to file" should be read. + // returns true if config was read, false if an error occured + bool ReadFromConfig( bool bFile ); }; // ----------- @@ -313,7 +318,12 @@ public: BOOL Setup( Window* pWindow = NULL ); BOOL SetPrinterProps( const Printer* pPrinter ); - void SetPrinterOptions( const PrinterOptions& rOptions ) { *mpPrinterOptions = rOptions; } + // SetPrinterOptions is used internally only now + // in earlier times it was used only to set the options loaded directly from the configuration + // in SfxPrinter::InitJob, this is now handled internally + // should the need arise to set the printer options outside vcl, also a method would have to be devised + // to not override these again internally + SAL_DLLPRIVATE void SetPrinterOptions( const PrinterOptions& rOptions ); const PrinterOptions& GetPrinterOptions() const { return( *mpPrinterOptions ); } BOOL SetOrientation( Orientation eOrient ); @@ -349,10 +359,6 @@ public: BOOL IsPrinting() const { return mbPrinting; } - void SetPrintFile( const XubString& rFileName ) { maPrintFile = rFileName; } - const XubString& GetPrintFile() const { return maPrintFile; } - void EnablePrintFile( BOOL bEnable ) { mbPrintFile = bEnable; } - BOOL IsPrintFileEnabled() const { return mbPrintFile; } BOOL AbortJob(); const XubString& GetCurJobName() const { return maJobName; } USHORT GetCurPage() const { return mnCurPage; } @@ -538,6 +544,7 @@ public: SAL_DLLPRIVATE com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > getPageParametersProtected( int i_nPage ) const; SAL_DLLPRIVATE ULONG removeTransparencies( GDIMetaFile& i_rIn, GDIMetaFile& o_rOut ); + SAL_DLLPRIVATE void resetPrinterOptions( bool i_bFileOutput ); }; class VCL_DLLPUBLIC PrinterOptionsHelper @@ -620,28 +627,34 @@ class VCL_DLLPUBLIC PrinterOptionsHelper , mbEnabled( i_bEnabled ) {} }; + // note: in the following helper functions HelpIds are expected as an rtl::OUString + // the normal HelpId form is rtl::OString (byte string instead of UTF16 string) + // this is because the whole interface is base on UNO properties; in fact the structures + // are passed over UNO interfaces. UNO does not know a byte string, hence the string is + // transported via UTF16 strings. + // general control static com::sun::star::uno::Any getUIControlOpt( const rtl::OUString& i_rTitle, - const com::sun::star::uno::Sequence< rtl::OUString >& i_rHelpText, + const com::sun::star::uno::Sequence< rtl::OUString >& i_rHelpId, const rtl::OUString& i_rType, const com::sun::star::beans::PropertyValue* i_pValue = NULL, const UIControlOptions& i_rControlOptions = UIControlOptions() ); // create a group (e.g. a TabPage); following controls will be grouped in it until the next // group begins - static com::sun::star::uno::Any getGroupControlOpt( const rtl::OUString& i_rTitle, const rtl::OUString& i_rHelpText ); + static com::sun::star::uno::Any getGroupControlOpt( const rtl::OUString& i_rTitle, const rtl::OUString& i_rHelpId ); // create a subgroup (e.g. a FixedLine); following controls will be grouped in it until the next // subgroup or group begins // setting bJobPage = true will make the subgroup appear on the first page of the print dialog static com::sun::star::uno::Any getSubgroupControlOpt( const rtl::OUString& i_rTitle, - const rtl::OUString& i_rHelpText, + const rtl::OUString& i_rHelpId, const UIControlOptions& i_rControlOptions = UIControlOptions() ); // create a bool option (usually a checkbox) static com::sun::star::uno::Any getBoolControlOpt( const rtl::OUString& i_rTitle, - const rtl::OUString& i_rHelpText, + const rtl::OUString& i_rHelpId, const rtl::OUString& i_rProperty, sal_Bool i_bValue, const UIControlOptions& i_rControlOptions = UIControlOptions() @@ -649,7 +662,7 @@ class VCL_DLLPUBLIC PrinterOptionsHelper // create a set of choices (either a radio button group or a list box) static com::sun::star::uno::Any getChoiceControlOpt( const rtl::OUString& i_rTitle, - const com::sun::star::uno::Sequence< rtl::OUString >& i_rHelpText, + const com::sun::star::uno::Sequence< rtl::OUString >& i_rHelpId, const rtl::OUString& i_rProperty, const com::sun::star::uno::Sequence< rtl::OUString >& i_rChoices, sal_Int32 i_nValue, @@ -661,7 +674,7 @@ class VCL_DLLPUBLIC PrinterOptionsHelper // create an integer range (e.g. a spin field) // note: max value < min value means do not apply min/max values static com::sun::star::uno::Any getRangeControlOpt( const rtl::OUString& i_rTitle, - const rtl::OUString& i_rHelpText, + const rtl::OUString& i_rHelpId, const rtl::OUString& i_rProperty, sal_Int32 i_nValue, sal_Int32 i_nMinValue = -1, @@ -672,7 +685,7 @@ class VCL_DLLPUBLIC PrinterOptionsHelper // create a string field // note: max value < min value means do not apply min/max values static com::sun::star::uno::Any getEditControlOpt( const rtl::OUString& i_rTitle, - const rtl::OUString& i_rHelpText, + const rtl::OUString& i_rHelpId, const rtl::OUString& i_rProperty, const rtl::OUString& i_rValue, const UIControlOptions& i_rControlOptions = UIControlOptions() diff --git a/vcl/inc/vcl/prndlg.hxx b/vcl/inc/vcl/prndlg.hxx index 1d16a2241485..d21e517d12f7 100644 --- a/vcl/inc/vcl/prndlg.hxx +++ b/vcl/inc/vcl/prndlg.hxx @@ -59,6 +59,7 @@ namespace vcl VirtualDevice maPageVDev; rtl::OUString maReplacementString; rtl::OUString maToolTipString; + bool mbGreyscale; FixedLine maHorzDim; FixedLine maVertDim; @@ -73,7 +74,8 @@ namespace vcl virtual void DataChanged( const DataChangedEvent& ); void setPreview( const GDIMetaFile&, const Size&, const rtl::OUString&, - sal_Int32 i_nDPIX, sal_Int32 i_nDPIY + sal_Int32 i_nDPIX, sal_Int32 i_nDPIY, + bool i_bGreyscale ); }; diff --git a/vcl/inc/vcl/salatype.hxx b/vcl/inc/vcl/salatype.hxx deleted file mode 100644 index d9e25c0cada9..000000000000 --- a/vcl/inc/vcl/salatype.hxx +++ /dev/null @@ -1,47 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALATYPE_HXX -#define _SV_SALATYPE_HXX - -#include <vcl/sv.h> - -// --------------------- -// - Application-Types - -// --------------------- - -// Derzeit doppelt und in apptypes.hxx auch vorhanden - -#define INPUT_MOUSE 0x0001 -#define INPUT_KEYBOARD 0x0002 -#define INPUT_PAINT 0x0004 -#define INPUT_TIMER 0x0008 -#define INPUT_OTHER 0x0010 -#define INPUT_MOUSEANDKEYBOARD (INPUT_MOUSE | INPUT_KEYBOARD) -#define INPUT_ANY (INPUT_MOUSEANDKEYBOARD | INPUT_PAINT | INPUT_TIMER | INPUT_OTHER) - -#endif // _SV_SALATYPE_HXX diff --git a/vcl/inc/vcl/salctrlhandle.hxx b/vcl/inc/vcl/salctrlhandle.hxx deleted file mode 100644 index 4a0a3a0f5b0a..000000000000 --- a/vcl/inc/vcl/salctrlhandle.hxx +++ /dev/null @@ -1,48 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_SALCTRLHANDLE_HXX -#define _SV_SALCTRLHANDLE_HXX - -/* SalControlHandle: - * - * Container for platform-specific handles and data - * about controls. Lives as long as the VCL control - * lives. - */ - -class SalControlHandle -{ - public: - SalControlHandle() {} - virtual ~SalControlHandle(); - - // TODO: derive Sal implementation - //SalControlHandleData maData; -}; - -#endif diff --git a/vcl/inc/vcl/salctype.hxx b/vcl/inc/vcl/salctype.hxx index 1566f02a1299..0cb037ad40e1 100644 --- a/vcl/inc/vcl/salctype.hxx +++ b/vcl/inc/vcl/salctype.hxx @@ -28,6 +28,9 @@ #ifndef _SV_SALCTYPE_HXX #define _SV_SALCTYPE_HXX +#include <com/sun/star/script/XInvocation.hpp> +#include <com/sun/star/uno/Reference.hxx> + #include <vcl/graph.hxx> // ----------- @@ -77,4 +80,13 @@ typedef ULONG (*SALGRFCVTPROC)( void* pInst, ULONG nInFormat, void* pInBuffer, ULONG nInBufSize, ULONG nOutFormat, void** ppOutBuffer ); +// ------------------- +// - BitmapConverter - +// ------------------- + +namespace vcl +{ +com::sun::star::uno::Reference< com::sun::star::script::XInvocation > createBmpConverter(); +} + #endif // _SV_SALCTYPE_HXX diff --git a/vcl/inc/vcl/salframe.hxx b/vcl/inc/vcl/salframe.hxx index 08548d7dda40..d82a2099f315 100644 --- a/vcl/inc/vcl/salframe.hxx +++ b/vcl/inc/vcl/salframe.hxx @@ -270,7 +270,6 @@ public: // done setting up the clipregion virtual void EndSetClipRegion() = 0; - // Callbacks (indepent part in vcl/source/window/winproc.cxx) // for default message handling return 0 void SetCallback( Window* pWindow, SALFRAMEPROC pProc ) diff --git a/vcl/inc/vcl/salgdi.hxx b/vcl/inc/vcl/salgdi.hxx index d8276406746e..b4769c045708 100644 --- a/vcl/inc/vcl/salgdi.hxx +++ b/vcl/inc/vcl/salgdi.hxx @@ -36,7 +36,6 @@ #include "vos/thread.hxx" #include "vcl/outdev.hxx" #include "vcl/salnativewidgets.hxx" -#include "vcl/salctrlhandle.hxx" #include <map> diff --git a/vcl/inc/vcl/salnativewidgets.hxx b/vcl/inc/vcl/salnativewidgets.hxx index 19c34cbc5e34..621cf0e90c5a 100644..100755 --- a/vcl/inc/vcl/salnativewidgets.hxx +++ b/vcl/inc/vcl/salnativewidgets.hxx @@ -175,6 +175,7 @@ typedef sal_uInt32 ControlPart; #define PART_MENU_ITEM 250 #define PART_MENU_ITEM_CHECK_MARK 251 #define PART_MENU_ITEM_RADIO_MARK 252 +#define PART_MENU_SEPARATOR 253 /* #i77549# HACK: for scrollbars in case of thumb rect, page up and page down rect we @@ -432,6 +433,24 @@ public: int maTopDockingAreaHeight; }; +/* MenupopupValue: + * + * Value container for menu items; specifies the rectangle for the whole item which + * may be useful when drawing parts with a smaller rectangle. + */ +class MenupopupValue : public ImplControlValue +{ +public: + MenupopupValue() : ImplControlValue( CTRL_MENU_POPUP, BUTTONVALUE_DONTKNOW, 0 ) + {} + MenupopupValue( long i_nGutterWidth, const Rectangle& i_rItemRect ) + : ImplControlValue( CTRL_MENU_POPUP, BUTTONVALUE_DONTKNOW, i_nGutterWidth ) + , maItemRect( i_rItemRect ) + {} + virtual ~MenupopupValue(); + Rectangle maItemRect; +}; + /* PushButtonValue: * * Value container for pushbuttons specifying additional drawing hints diff --git a/vcl/inc/vcl/salobj.hxx b/vcl/inc/vcl/salobj.hxx index e453bf5c6f87..adf0e0a3d45d 100644 --- a/vcl/inc/vcl/salobj.hxx +++ b/vcl/inc/vcl/salobj.hxx @@ -73,6 +73,8 @@ public: virtual const SystemEnvData* GetSystemData() const = 0; + virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ) = 0; + void SetCallback( void* pInst, SALOBJECTPROC pProc ) { m_pInst = pInst; m_pCallback = pProc; } long CallCallback( USHORT nEvent, const void* pEvent ) diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx index 24fd30750501..cc5cbcbc4d0f 100644 --- a/vcl/inc/vcl/settings.hxx +++ b/vcl/inc/vcl/settings.hxx @@ -423,10 +423,6 @@ private: ULONG mnOptions; USHORT mnScreenZoom; USHORT mnScreenFontZoom; - USHORT mnRadioButtonStyle; - USHORT mnCheckBoxStyle; - USHORT mnPushButtonStyle; - USHORT mnTabControlStyle; USHORT mnHighContrast; USHORT mnUseSystemUIFonts; USHORT mnAutoMnemonic; @@ -457,11 +453,6 @@ private: #define STYLE_OPTION_SPINARROW ((ULONG)0x00000080) #define STYLE_OPTION_SPINUPDOWN ((ULONG)0x00000100) #define STYLE_OPTION_NOMNEMONICS ((ULONG)0x00000200) -#define STYLE_OPTION_WINSTYLE ((ULONG)0x00010000) -#define STYLE_OPTION_OS2STYLE ((ULONG)0x00020000) -#define STYLE_OPTION_MACSTYLE ((ULONG)0x00040000) -#define STYLE_OPTION_UNIXSTYLE ((ULONG)0x00080000) -#define STYLE_OPTION_SYSTEMSTYLE ((ULONG)0x000F0000) #define STYLE_OPTION_HIDEDISABLED ((ULONG)0x00100000) #define DRAGFULL_OPTION_WINDOWMOVE ((ULONG)0x00000001) @@ -488,28 +479,8 @@ private: #define DISPLAY_OPTION_AA_DISABLE ((ULONG)0x00000001) -#define STYLE_RADIOBUTTON_WIN ((USHORT)0x0001) -#define STYLE_RADIOBUTTON_OS2 ((USHORT)0x0002) -#define STYLE_RADIOBUTTON_MAC ((USHORT)0x0003) -#define STYLE_RADIOBUTTON_UNIX ((USHORT)0x0004) -#define STYLE_RADIOBUTTON_MONO ((USHORT)0x0005) -#define STYLE_RADIOBUTTON_STYLE ((USHORT)0x000F) - -#define STYLE_CHECKBOX_WIN ((USHORT)0x0001) -#define STYLE_CHECKBOX_OS2 ((USHORT)0x0002) -#define STYLE_CHECKBOX_MAC ((USHORT)0x0003) -#define STYLE_CHECKBOX_UNIX ((USHORT)0x0004) -#define STYLE_CHECKBOX_MONO ((USHORT)0x0005) -#define STYLE_CHECKBOX_STYLE ((USHORT)0x000F) - -#define STYLE_PUSHBUTTON_WIN ((USHORT)0x0001) -#define STYLE_PUSHBUTTON_OS2 ((USHORT)0x0002) -#define STYLE_PUSHBUTTON_MAC ((USHORT)0x0003) -#define STYLE_PUSHBUTTON_UNIX ((USHORT)0x0004) -#define STYLE_PUSHBUTTON_STYLE ((USHORT)0x000F) - -#define STYLE_TABCONTROL_SINGLELINE ((USHORT)0x0001) -#define STYLE_TABCONTROL_COLOR ((USHORT)0x0002) +#define STYLE_RADIOBUTTON_MONO ((USHORT)0x0001) // legacy +#define STYLE_CHECKBOX_MONO ((USHORT)0x0001) // legacy #define STYLE_TOOLBAR_ICONSIZE_UNKNOWN ((ULONG)0) #define STYLE_TOOLBAR_ICONSIZE_SMALL ((ULONG)1) @@ -813,23 +784,6 @@ public: const Font& GetIconFont() const { return mpData->maIconFont; } - void SetRadioButtonStyle( USHORT nStyle ) - { CopyData(); mpData->mnRadioButtonStyle = nStyle; } - USHORT GetRadioButtonStyle() const - { return mpData->mnRadioButtonStyle; } - void SetCheckBoxStyle( USHORT nStyle ) - { CopyData(); mpData->mnCheckBoxStyle = nStyle; } - USHORT GetCheckBoxStyle() const - { return mpData->mnCheckBoxStyle; } - void SetPushButtonStyle( USHORT nStyle ) - { CopyData(); mpData->mnPushButtonStyle = nStyle; } - USHORT GetPushButtonStyle() const - { return mpData->mnPushButtonStyle; } - void SetTabControlStyle( USHORT nStyle ) - { CopyData(); mpData->mnTabControlStyle = nStyle; } - USHORT GetTabControlStyle() const - { return mpData->mnTabControlStyle; } - void SetBorderSize( long nSize ) { CopyData(); mpData->mnBorderSize = nSize; } long GetBorderSize() const @@ -971,10 +925,6 @@ public: { CopyData(); mpData->maWorkspaceGradient = rWall; } void SetStandardStyles(); - void SetStandardWinStyles(); - void SetStandardOS2Styles(); - void SetStandardMacStyles(); - void SetStandardUnixStyles(); const StyleSettings& operator =( const StyleSettings& rSet ); diff --git a/vcl/inc/vcl/svids.hrc b/vcl/inc/vcl/svids.hrc index e915644aa8ec..432a30c3a748 100644 --- a/vcl/inc/vcl/svids.hrc +++ b/vcl/inc/vcl/svids.hrc @@ -31,11 +31,7 @@ #include "svl/solar.hrc" #define SV_RESID_STDOFFSET 0 -#define SV_RESID_WINOFFSET 1 -#define SV_RESID_OS2OFFSET 2 -#define SV_RESID_MACOFFSET 3 -#define SV_RESID_UNIXOFFSET 4 -#define SV_RESID_MONOOFFSET 5 +#define SV_RESID_MONOOFFSET 1 // Achtung: Diese Id's muessen min. 10 Werte auseinanderliegen, da // je nach Style noch ein Offset aufgerechnet wird diff --git a/vcl/inc/vcl/symbol.hxx b/vcl/inc/vcl/symbol.hxx index c7a745516856..0f0627fb41e3 100644 --- a/vcl/inc/vcl/symbol.hxx +++ b/vcl/inc/vcl/symbol.hxx @@ -71,9 +71,6 @@ typedef USHORT SymbolType; #define SYMBOL_DOCK ((SymbolType)32) #define SYMBOL_HIDE ((SymbolType)33) #define SYMBOL_HELP ((SymbolType)34) -#define SYMBOL_OS2CLOSE ((SymbolType)35) -#define SYMBOL_OS2FLOAT ((SymbolType)36) -#define SYMBOL_OS2HIDE ((SymbolType)37) #define SYMBOL_MENU SYMBOL_SPIN_DOWN #define SYMBOL_NOSYMBOL (SYMBOL_DONTKNOW) diff --git a/vcl/inc/vcl/tabctrl.hxx b/vcl/inc/vcl/tabctrl.hxx index ad702ac4dc54..430a99235b52 100644 --- a/vcl/inc/vcl/tabctrl.hxx +++ b/vcl/inc/vcl/tabctrl.hxx @@ -63,13 +63,9 @@ private: long mnMaxPageWidth; USHORT mnActPageId; USHORT mnCurPageId; - USHORT mnFirstPagePos; - USHORT mnLastFirstPagePos; BOOL mbFormat; BOOL mbRestoreHelpId; BOOL mbRestoreUnqId; - BOOL mbSingleLine; - BOOL mbScroll; BOOL mbSmallInvalidate; BOOL mbExtraSpace; Link maActivateHdl; @@ -78,22 +74,17 @@ private: using Control::ImplInitSettings; SAL_DLLPRIVATE void ImplInitSettings( BOOL bFont, BOOL bForeground, BOOL bBackground ); SAL_DLLPRIVATE ImplTabItem* ImplGetItem( USHORT nId ) const; - SAL_DLLPRIVATE void ImplScrollBtnsColor(); - SAL_DLLPRIVATE void ImplSetScrollBtnsState(); - SAL_DLLPRIVATE void ImplPosScrollBtns(); SAL_DLLPRIVATE Size ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth ); SAL_DLLPRIVATE Rectangle ImplGetTabRect( USHORT nPos, long nWidth = -1, long nHeight = -1 ); SAL_DLLPRIVATE void ImplChangeTabPage( USHORT nId, USHORT nOldId ); SAL_DLLPRIVATE BOOL ImplPosCurTabPage(); SAL_DLLPRIVATE void ImplActivateTabPage( BOOL bNext ); - SAL_DLLPRIVATE void ImplSetFirstPagePos( USHORT nPagePos ); SAL_DLLPRIVATE void ImplShowFocus(); SAL_DLLPRIVATE void ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bool bLayout = false, bool bFirstInGroup = false, bool bLastInGroup = false, bool bIsCurrentItem = false ); SAL_DLLPRIVATE void ImplPaint( const Rectangle& rRect, bool bLayout = false ); SAL_DLLPRIVATE void ImplFreeLayoutData(); SAL_DLLPRIVATE long ImplHandleKeyEvent( const KeyEvent& rKeyEvent ); - DECL_DLLPRIVATE_LINK( ImplScrollBtnHdl, PushButton* pBtn ); DECL_DLLPRIVATE_LINK( ImplListBoxSelectHdl, ListBox* ); DECL_DLLPRIVATE_LINK( ImplWindowEventListener, VclSimpleEvent* ); @@ -156,9 +147,6 @@ public: void SetCurPageId( USHORT nPageId ); USHORT GetCurPageId() const; - void SetFirstPageId( USHORT nPageId ); - USHORT GetFirstPageId() const { return GetPageId( mnFirstPagePos ); } - void SelectTabPage( USHORT nPageId ); void SetMaxPageWidth( long nMaxWidth ) { mnMaxPageWidth = nMaxWidth; } diff --git a/vcl/inc/vcl/windata.hxx b/vcl/inc/vcl/windata.hxx deleted file mode 100644 index 9436352e4927..000000000000 --- a/vcl/inc/vcl/windata.hxx +++ /dev/null @@ -1,49 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _SV_WINDATA_HXX -#define _SV_WINDATA_HXX - -#include <vcl/sv.h> - -class SalFrame; -class Window; - -// -------------- -// - Prototypes - -// -------------- - -long ImplWindowFrameProc( Window* pInst, SalFrame* pFrame, USHORT nEvent, const void* pEvent ); - -// ----------- -// - HitTest - -// ----------- - -#define WINDOW_HITTEST_INSIDE ((USHORT)0x0001) -#define WINDOW_HITTEST_TRANSPARENT ((USHORT)0x0002) - -#endif // _SV_WINDATA_HXX diff --git a/vcl/inc/vcl/window.h b/vcl/inc/vcl/window.h index 4a7f1c644400..c710156422bf 100644 --- a/vcl/inc/vcl/window.h +++ b/vcl/inc/vcl/window.h @@ -38,7 +38,7 @@ #ifndef _SV_POINTR_HXX #include <vcl/pointr.hxx> #endif -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <vcl/vclevent.hxx> #include <com/sun/star/uno/Reference.hxx> #include <cppuhelper/weakref.hxx> @@ -56,7 +56,6 @@ class VirtualDevice; class Cursor; class ImplDevFontList; class ImplFontCache; -class SalControlHandle; class VCLXWindow; class SalFrame; class SalObject; @@ -105,7 +104,18 @@ namespace vcl { } +// -------------- +// - Prototypes - +// -------------- +long ImplWindowFrameProc( Window* pInst, SalFrame* pFrame, USHORT nEvent, const void* pEvent ); + +// ----------- +// - HitTest - +// ----------- + +#define WINDOW_HITTEST_INSIDE ((USHORT)0x0001) +#define WINDOW_HITTEST_TRANSPARENT ((USHORT)0x0002) // --------------- // - ImplWinData - @@ -357,7 +367,8 @@ public: mbDisableAccessibleLabelForRelation:1, mbDisableAccessibleLabeledByRelation:1, mbHelpTextDynamic:1, - mbFakeFocusSet:1; + mbFakeFocusSet:1, + mbInterceptChildWindowKeyDown:1; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > mxDNDListenerContainer; }; diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx index 700a87695085..5ba3b615904e 100755 --- a/vcl/inc/vcl/window.hxx +++ b/vcl/inc/vcl/window.hxx @@ -35,7 +35,7 @@ #ifndef _SV_POINTR_HXX #include <vcl/pointr.hxx> #endif -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #ifndef _SV_APPTYPES_HXX #include <vcl/apptypes.hxx> #endif @@ -1114,6 +1114,9 @@ public: */ void doLazyDelete(); + // let the window intercept the KeyDown messages of the system children + void InterceptChildWindowKeyDown( sal_Bool bIntercept ); + virtual XubString GetSurroundingText() const; virtual Selection GetSurroundingTextSelection() const; diff --git a/vcl/inc/vcl/wintypes.hxx b/vcl/inc/vcl/wintypes.hxx deleted file mode 100644 index 6da4e4e3d988..000000000000 --- a/vcl/inc/vcl/wintypes.hxx +++ /dev/null @@ -1,33 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _SV_WINTYPES_HXX -#define _SV_WINTYPES_HXX - -#include <tools/wintypes.hxx> - -#endif // _SV_WINTYPES_HXX - diff --git a/vcl/os2/inc/salobj.h b/vcl/os2/inc/salobj.h index 5b4ac21ccdd6..04fdef90bf67 100644 --- a/vcl/os2/inc/salobj.h +++ b/vcl/os2/inc/salobj.h @@ -64,6 +64,7 @@ public: virtual void SetBackground(); virtual void SetBackground( SalColor nSalColor ); virtual const SystemEnvData* GetSystemData() const; + virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); }; #endif // _SV_SALOBJ_H diff --git a/vcl/os2/source/app/salinst.cxx b/vcl/os2/source/app/salinst.cxx index df564f36ee0a..9d74f281d680 100644 --- a/vcl/os2/source/app/salinst.cxx +++ b/vcl/os2/source/app/salinst.cxx @@ -43,7 +43,7 @@ #ifndef _SV_SALIDS_HRC #include <salids.hrc> #endif -#include <vcl/salatype.hxx> +#include <vcl/apptypes.hxx> #include <saldata.hxx> #include <salinst.h> #include <salframe.h> diff --git a/vcl/os2/source/window/salframe.cxx b/vcl/os2/source/window/salframe.cxx index f3314c725255..f465dc741a60 100644 --- a/vcl/os2/source/window/salframe.cxx +++ b/vcl/os2/source/window/salframe.cxx @@ -2122,8 +2122,6 @@ void Os2SalFrame::UpdateSettings( AllSettings& rSettings ) // --- Style settings --- StyleSettings aStyleSettings = rSettings.GetStyleSettings(); - BOOL bCompBorder = (aStyleSettings.GetOptions() & (STYLE_OPTION_MACSTYLE | STYLE_OPTION_UNIXSTYLE)) == 0; - // General settings LONG nDisplayTime = PrfQueryProfileInt( HINI_PROFILE, (PSZ)aControlPanel, (PSZ)"LogoDisplayTime", -1 ); ULONG nSalDisplayTime; @@ -2145,32 +2143,26 @@ void Os2SalFrame::UpdateSettings( AllSettings& rSettings ) // Size settings aStyleSettings.SetScrollBarSize( WinQuerySysValue( HWND_DESKTOP, SV_CYHSCROLL ) ); - if ( bCompBorder ) - { - aStyleSettings.SetTitleHeight( WinQuerySysValue( HWND_DESKTOP, SV_CYTITLEBAR ) ); - } + aStyleSettings.SetTitleHeight( WinQuerySysValue( HWND_DESKTOP, SV_CYTITLEBAR ) ); // Color settings - if ( bCompBorder ) - { - aStyleSettings.SetFaceColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_BUTTONMIDDLE, 0 ) ) ); - aStyleSettings.SetInactiveTabColor( aStyleSettings.GetFaceColor() ); - aStyleSettings.SetLightColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_BUTTONLIGHT, 0 ) ) ); - aStyleSettings.SetLightBorderColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_BUTTONMIDDLE, 0 ) ) ); - aStyleSettings.SetShadowColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_BUTTONDARK, 0 ) ) ); - aStyleSettings.SetDarkShadowColor( Color( COL_BLACK ) ); - aStyleSettings.SetDialogColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_DIALOGBACKGROUND, 0 ) ) ); - aStyleSettings.SetButtonTextColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_MENUTEXT, 0 ) ) ); - aStyleSettings.SetActiveColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_ACTIVETITLE, 0 ) ) ); - aStyleSettings.SetActiveTextColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_ACTIVETITLETEXT, 0 ) ) ); - aStyleSettings.SetActiveBorderColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_ACTIVEBORDER, 0 ) ) ); - aStyleSettings.SetDeactiveColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_INACTIVETITLE, 0 ) ) ); - aStyleSettings.SetDeactiveTextColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_INACTIVETITLETEXT, 0 ) ) ); - aStyleSettings.SetDeactiveBorderColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_INACTIVEBORDER, 0 ) ) ); - aStyleSettings.SetMenuColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_MENU, 0 ) ) ); - aStyleSettings.SetMenuTextColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_MENUTEXT, 0 ) ) ); - aStyleSettings.SetMenuBarTextColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_MENUTEXT, 0 ) ) ); - } + aStyleSettings.SetFaceColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_BUTTONMIDDLE, 0 ) ) ); + aStyleSettings.SetInactiveTabColor( aStyleSettings.GetFaceColor() ); + aStyleSettings.SetLightColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_BUTTONLIGHT, 0 ) ) ); + aStyleSettings.SetLightBorderColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_BUTTONMIDDLE, 0 ) ) ); + aStyleSettings.SetShadowColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_BUTTONDARK, 0 ) ) ); + aStyleSettings.SetDarkShadowColor( Color( COL_BLACK ) ); + aStyleSettings.SetDialogColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_DIALOGBACKGROUND, 0 ) ) ); + aStyleSettings.SetButtonTextColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_MENUTEXT, 0 ) ) ); + aStyleSettings.SetActiveColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_ACTIVETITLE, 0 ) ) ); + aStyleSettings.SetActiveTextColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_ACTIVETITLETEXT, 0 ) ) ); + aStyleSettings.SetActiveBorderColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_ACTIVEBORDER, 0 ) ) ); + aStyleSettings.SetDeactiveColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_INACTIVETITLE, 0 ) ) ); + aStyleSettings.SetDeactiveTextColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_INACTIVETITLETEXT, 0 ) ) ); + aStyleSettings.SetDeactiveBorderColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_INACTIVEBORDER, 0 ) ) ); + aStyleSettings.SetMenuColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_MENU, 0 ) ) ); + aStyleSettings.SetMenuTextColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_MENUTEXT, 0 ) ) ); + aStyleSettings.SetMenuBarTextColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_MENUTEXT, 0 ) ) ); aStyleSettings.SetDialogTextColor( aStyleSettings.GetButtonTextColor() ); aStyleSettings.SetRadioCheckTextColor( aStyleSettings.GetButtonTextColor() ); aStyleSettings.SetGroupTextColor( ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_WINDOWSTATICTEXT, 0 ) ) ); @@ -2187,11 +2179,8 @@ void Os2SalFrame::UpdateSettings( AllSettings& rSettings ) Color aMenuHighColor = ImplOS2ColorToSal( WinQuerySysColor( HWND_DESKTOP, SYSCLR_MENUHILITEBGND, 0 ) ); if ( ImplSalIsSameColor( aMenuHighColor, aStyleSettings.GetMenuColor() ) ) { - if ( bCompBorder ) - { - aStyleSettings.SetMenuHighlightColor( Color( COL_BLUE ) ); - aStyleSettings.SetMenuHighlightTextColor( Color( COL_WHITE ) ); - } + aStyleSettings.SetMenuHighlightColor( Color( COL_BLUE ) ); + aStyleSettings.SetMenuHighlightTextColor( Color( COL_WHITE ) ); } else { diff --git a/vcl/os2/source/window/salobj.cxx b/vcl/os2/source/window/salobj.cxx index 85ed1a606d08..e55ce448f7d0 100644 --- a/vcl/os2/source/window/salobj.cxx +++ b/vcl/os2/source/window/salobj.cxx @@ -566,3 +566,9 @@ void Os2SalObject::SetCallback( void* pInst, SALOBJECTPROC pProc ) } #endif +// ----------------------------------------------------------------------- + +void Os2SalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ ) +{ +} + diff --git a/vcl/prj/build.lst b/vcl/prj/build.lst index 0a6f6a95f605..af15ad73e19d 100644 --- a/vcl/prj/build.lst +++ b/vcl/prj/build.lst @@ -1,4 +1,4 @@ -vc vcl : l10n apple_remote BOOST:boost rsc sot ucbhelper unotools ICU:icu GRAPHITE:graphite i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offuh basegfx basebmp tools l10ntools icc SO:print_header cpputools shell svl NULL +vc vcl : l10n apple_remote BOOST:boost rsc sot ucbhelper unotools ICU:icu GRAPHITE:graphite i18npool i18nutil unoil ridljar X11_EXTENSIONS:x11_extensions offuh basegfx basebmp tools l10ntools icc SO:print_header cpputools shell svl LIBXSLT:libxslt 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/prj/d.lst b/vcl/prj/d.lst index 6d452e8ee43f..307064f7555d 100644 --- a/vcl/prj/d.lst +++ b/vcl/prj/d.lst @@ -23,7 +23,6 @@ mkdir: %_DEST%\inc%_EXT%\vcl ..\inc\vcl\bmpacc.hxx %_DEST%\inc%_EXT%\vcl\bmpacc.hxx ..\inc\vcl\btndlg.hxx %_DEST%\inc%_EXT%\vcl\btndlg.hxx ..\inc\vcl\button.hxx %_DEST%\inc%_EXT%\vcl\button.hxx -..\inc\vcl\button.hxx %_DEST%\inc%_EXT%\vcl\imagebtn.hxx ..\inc\vcl\cmdevt.h %_DEST%\inc%_EXT%\vcl\cmdevt.h ..\inc\vcl\cmdevt.hxx %_DEST%\inc%_EXT%\vcl\cmdevt.hxx ..\inc\vcl\combobox.h %_DEST%\inc%_EXT%\vcl\combobox.h @@ -42,7 +41,6 @@ mkdir: %_DEST%\inc%_EXT%\vcl ..\inc\vcl\field.hxx %_DEST%\inc%_EXT%\vcl\field.hxx ..\inc\vcl\fixbrd.hxx %_DEST%\inc%_EXT%\vcl\fixbrd.hxx ..\inc\vcl\fixed.hxx %_DEST%\inc%_EXT%\vcl\fixed.hxx -..\inc\vcl\fldunit.hxx %_DEST%\inc%_EXT%\vcl\fldunit.hxx ..\inc\vcl\floatwin.hxx %_DEST%\inc%_EXT%\vcl\floatwin.hxx ..\inc\vcl\fntstyle.hxx %_DEST%\inc%_EXT%\vcl\fntstyle.hxx ..\inc\vcl\font.hxx %_DEST%\inc%_EXT%\vcl\font.hxx @@ -70,7 +68,6 @@ mkdir: %_DEST%\inc%_EXT%\vcl ..\inc\vcl\lstbox.h %_DEST%\inc%_EXT%\vcl\lstbox.h ..\inc\vcl\lstbox.hxx %_DEST%\inc%_EXT%\vcl\lstbox.hxx ..\inc\vcl\mapmod.hxx %_DEST%\inc%_EXT%\vcl\mapmod.hxx -..\inc\vcl\mapunit.hxx %_DEST%\inc%_EXT%\vcl\mapunit.hxx ..\inc\vcl\menu.hxx %_DEST%\inc%_EXT%\vcl\menu.hxx ..\inc\vcl\menubtn.hxx %_DEST%\inc%_EXT%\vcl\menubtn.hxx ..\inc\vcl\metaact.hxx %_DEST%\inc%_EXT%\vcl\metaact.hxx @@ -129,7 +126,6 @@ mkdir: %_DEST%\inc%_EXT%\vcl ..\inc\vcl\waitobj.hxx %_DEST%\inc%_EXT%\vcl\waitobj.hxx ..\inc\vcl\wall.hxx %_DEST%\inc%_EXT%\vcl\wall.hxx ..\inc\vcl\window.hxx %_DEST%\inc%_EXT%\vcl\window.hxx -..\inc\vcl\wintypes.hxx %_DEST%\inc%_EXT%\vcl\wintypes.hxx ..\inc\vcl\wrkwin.hxx %_DEST%\inc%_EXT%\vcl\wrkwin.hxx ..\inc\vcl\threadex.hxx %_DEST%\inc%_EXT%\vcl\threadex.hxx ..\inc\vcl\evntpost.hxx %_DEST%\inc%_EXT%\vcl\evntpost.hxx diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 2a04389d8f44..73eaa8f965d2 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -38,7 +38,6 @@ #include <vcl/salbmp.hxx> #include <vcl/salobj.hxx> #include <vcl/salmenu.hxx> -#include <vcl/salctrlhandle.hxx> // this file contains the virtual destructors of the sal interface // compilers ususally put their vtables where the destructor is @@ -161,7 +160,4 @@ Rectangle SalMenu::GetMenuBarButtonRectPixel( USHORT, SalFrame* ) SalMenuItem::~SalMenuItem() { } -SalControlHandle::~SalControlHandle() -{ -} diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index b91afbbae9fe..dbc792039f80 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -419,10 +419,6 @@ ImplStyleData::ImplStyleData() mnCursorBlinkTime = STYLE_CURSOR_NOBLINKTIME; mnScreenZoom = 100; mnScreenFontZoom = 100; - mnRadioButtonStyle = 0; - mnCheckBoxStyle = 0; - mnPushButtonStyle = 0; - mnTabControlStyle = 0; mnLogoDisplayTime = LOGO_DISPLAYTIME_STARTTIME; mnDragFullOptions = DRAGFULL_OPTION_WINDOWMOVE | DRAGFULL_OPTION_WINDOWSIZE | DRAGFULL_OPTION_OBJECTMOVE | DRAGFULL_OPTION_OBJECTSIZE | @@ -523,10 +519,6 @@ ImplStyleData::ImplStyleData( const ImplStyleData& rData ) : mnCursorBlinkTime = rData.mnCursorBlinkTime; mnScreenZoom = rData.mnScreenZoom; mnScreenFontZoom = rData.mnScreenFontZoom; - mnRadioButtonStyle = rData.mnRadioButtonStyle; - mnCheckBoxStyle = rData.mnCheckBoxStyle; - mnPushButtonStyle = rData.mnPushButtonStyle; - mnTabControlStyle = rData.mnTabControlStyle; mnLogoDisplayTime = rData.mnLogoDisplayTime; mnDragFullOptions = rData.mnDragFullOptions; mnAnimationOptions = rData.mnAnimationOptions; @@ -617,12 +609,6 @@ void ImplStyleData::SetStandardStyles() maHighlightLinkColor = Color( COL_LIGHTBLUE ); maFontColor = Color( COL_BLACK ); - mnRadioButtonStyle &= ~STYLE_RADIOBUTTON_STYLE; - mnCheckBoxStyle &= ~STYLE_CHECKBOX_STYLE; - mnPushButtonStyle &= ~STYLE_PUSHBUTTON_STYLE; - mnTabControlStyle = 0; - - mnOptions &= ~(STYLE_OPTION_SYSTEMSTYLE | STDSYS_STYLE); mnBorderSize = 1; mnTitleHeight = 18; mnFloatTitleHeight = 13; @@ -874,34 +860,6 @@ void StyleSettings::SetStandardStyles() // ----------------------------------------------------------------------- -void StyleSettings::SetStandardWinStyles() -{ - return; // no more style changes since NWF -} - -// ----------------------------------------------------------------------- - -void StyleSettings::SetStandardOS2Styles() -{ - return; // no more style changes since NWF -} - -// ----------------------------------------------------------------------- - -void StyleSettings::SetStandardMacStyles() -{ - return; // no more style changes since NWF -} - -// ----------------------------------------------------------------------- - -void StyleSettings::SetStandardUnixStyles() -{ - return; // no more style changes since NWF -} - -// ----------------------------------------------------------------------- - Color StyleSettings::GetFaceGradientColor() const { // compute a brighter face color that can be used in gradients @@ -1036,10 +994,6 @@ BOOL StyleSettings::operator ==( const StyleSettings& rSet ) const (mpData->mnAntialiasedMin == rSet.mpData->mnAntialiasedMin) && (mpData->mnScreenZoom == rSet.mpData->mnScreenZoom) && (mpData->mnScreenFontZoom == rSet.mpData->mnScreenFontZoom) && - (mpData->mnRadioButtonStyle == rSet.mpData->mnRadioButtonStyle) && - (mpData->mnCheckBoxStyle == rSet.mpData->mnCheckBoxStyle) && - (mpData->mnPushButtonStyle == rSet.mpData->mnPushButtonStyle) && - (mpData->mnTabControlStyle == rSet.mpData->mnTabControlStyle) && (mpData->mnHighContrast == rSet.mpData->mnHighContrast) && (mpData->mnUseSystemUIFonts == rSet.mpData->mnUseSystemUIFonts) && (mpData->mnUseFlatBorders == rSet.mpData->mnUseFlatBorders) && diff --git a/vcl/source/app/sound.cxx b/vcl/source/app/sound.cxx index bac9d50dc5da..d180f2647135 100644 --- a/vcl/source/app/sound.cxx +++ b/vcl/source/app/sound.cxx @@ -38,6 +38,7 @@ #include <vcl/salframe.hxx> #include <tools/debug.hxx> #include <vcl/svdata.hxx> +#include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <vcl/salbtype.hxx> #include <vcl/sound.hxx> @@ -45,6 +46,10 @@ void Sound::Beep( SoundType eType, Window* pWindow ) { + // #i91990# + if ( Application::IsHeadlessModeEnabled() ) + return; + if( !pWindow ) { Window* pDefWindow = ImplGetDefaultWindow(); diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index e503172eb2c6..dd1ea7c0469e 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -45,7 +45,6 @@ #include "vcl/event.hxx" #include "vcl/vclevent.hxx" #include "vcl/virdev.hxx" -#include "vcl/windata.hxx" #include "vcl/window.h" #include "vcl/wrkwin.hxx" #include "vcl/idlemgr.hxx" diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index db7649a90258..82bec2214dff 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -769,47 +769,6 @@ BOOL Button::IsTextDisplayEnabled() } // ----------------------------------------------------------------------- -void Button::DataChanged( const DataChangedEvent& rDCEvt ) -{ - Control::DataChanged( rDCEvt ); - - // The flag SETTINGS_IN_UPDATE_SETTINGS is set when the settings changed due to a - // Application::SettingsChanged event. In this scenario we want to keep the style settings - // of our radio buttons and our check boxes. - if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && - ( rDCEvt.GetFlags() & SETTINGS_IN_UPDATE_SETTINGS ) ) - - { - const AllSettings* pOldSettings = rDCEvt.GetOldSettings(); - if ( pOldSettings ) - { - BOOL bResetStyleSettings = FALSE; - AllSettings aAllSettings = GetSettings(); - StyleSettings aStyleSetting = aAllSettings.GetStyleSettings(); - - USHORT nCheckBoxStyle = aStyleSetting.GetCheckBoxStyle(); - if ( nCheckBoxStyle != pOldSettings->GetStyleSettings().GetCheckBoxStyle() ) - { - aStyleSetting.SetCheckBoxStyle( pOldSettings->GetStyleSettings().GetCheckBoxStyle() ); - bResetStyleSettings = TRUE; - } - - USHORT nRadioButtonStyle = aStyleSetting.GetRadioButtonStyle(); - if ( nRadioButtonStyle != pOldSettings->GetStyleSettings().GetRadioButtonStyle() ) - { - aStyleSetting.SetRadioButtonStyle( pOldSettings->GetStyleSettings().GetRadioButtonStyle() ); - bResetStyleSettings = TRUE; - } - - if ( bResetStyleSettings ) - { - aAllSettings.SetStyleSettings( pOldSettings->GetStyleSettings() ); - SetSettings( aAllSettings ); - } - } - } -} - void Button::SetSmallSymbol (bool small) { ImplSetSmallSymbol (small); @@ -925,125 +884,6 @@ void PushButton::ImplDrawPushButtonFrame( Window* pDev, StyleSettings aStyleSettings = pDev->GetSettings().GetStyleSettings(); if ( pDev->IsControlBackground() ) aStyleSettings.Set3DColors( pDev->GetControlBackground() ); - - USHORT nPushButtonSysStyle = aStyleSettings.GetPushButtonStyle() & STYLE_PUSHBUTTON_STYLE; - if ( nPushButtonSysStyle == STYLE_PUSHBUTTON_MAC ) - { - pDev->SetLineColor(); - pDev->SetFillColor( aStyleSettings.GetFaceColor() ); - pDev->DrawRect( rRect ); - - if ( (aStyleSettings.GetOptions() & STYLE_OPTION_MONO) || - (pDev->GetOutDevType() == OUTDEV_PRINTER) ) - nStyle |= BUTTON_DRAW_MONO; - - if ( nStyle & BUTTON_DRAW_DEFAULT ) - { - if ( nStyle & BUTTON_DRAW_MONO ) - pDev->SetLineColor( Color( COL_BLACK ) ); - else - pDev->SetLineColor( aStyleSettings.GetDarkShadowColor() ); - - pDev->DrawLine( Point( rRect.Left()+3, rRect.Top() ), - Point( rRect.Right()-3, rRect.Top() ) ); - pDev->DrawLine( Point( rRect.Left()+3, rRect.Bottom() ), - Point( rRect.Right()-3, rRect.Bottom() ) ); - pDev->DrawLine( Point( rRect.Left(), rRect.Top()+3 ), - Point( rRect.Left(), rRect.Bottom()-3 ) ); - pDev->DrawLine( Point( rRect.Right(), rRect.Top()+3 ), - Point( rRect.Right(), rRect.Bottom()-3 ) ); - pDev->DrawPixel( Point( rRect.Left()+2, rRect.Top()+1 ) ); - pDev->DrawPixel( Point( rRect.Left()+1, rRect.Top()+2 ) ); - pDev->DrawPixel( Point( rRect.Right()-2, rRect.Top()+1 ) ); - pDev->DrawPixel( Point( rRect.Right()-1, rRect.Top()+2 ) ); - pDev->DrawPixel( Point( rRect.Left()+2, rRect.Bottom()-1 ) ); - pDev->DrawPixel( Point( rRect.Left()+1, rRect.Bottom()-2 ) ); - pDev->DrawPixel( Point( rRect.Right()-2, rRect.Bottom()-1 ) ); - pDev->DrawPixel( Point( rRect.Right()-1, rRect.Bottom()-2 ) ); - - if ( nStyle & BUTTON_DRAW_MONO ) - pDev->SetLineColor( Color( COL_BLACK ) ); - else - pDev->SetLineColor( aStyleSettings.GetShadowColor() ); - pDev->DrawLine( Point( rRect.Left()+3, rRect.Bottom()-1 ), - Point( rRect.Right()-3, rRect.Bottom()-1 ) ); - pDev->DrawLine( Point( rRect.Right()-1, rRect.Top()+3 ), - Point( rRect.Right()-1, rRect.Bottom()-3 ) ); - pDev->DrawPixel( Point( rRect.Right()-3, rRect.Bottom()-2 ) ); - pDev->DrawPixel( Point( rRect.Right()-2, rRect.Bottom()-2 ) ); - pDev->DrawPixel( Point( rRect.Right()-2, rRect.Bottom()-3 ) ); - } - - rRect.Left() += 2; - rRect.Top() += 2; - rRect.Right() -= 2; - rRect.Bottom() -= 2; - - if ( nStyle & BUTTON_DRAW_MONO ) - pDev->SetLineColor( Color( COL_BLACK ) ); - else - pDev->SetLineColor( aStyleSettings.GetDarkShadowColor() ); - - pDev->DrawLine( Point( rRect.Left()+2, rRect.Top() ), - Point( rRect.Right()-2, rRect.Top() ) ); - pDev->DrawLine( Point( rRect.Left()+2, rRect.Bottom() ), - Point( rRect.Right()-2, rRect.Bottom() ) ); - pDev->DrawLine( Point( rRect.Left(), rRect.Top()+2 ), - Point( rRect.Left(), rRect.Bottom()-2 ) ); - pDev->DrawLine( Point( rRect.Right(), rRect.Top()+2 ), - Point( rRect.Right(), rRect.Bottom()-2 ) ); - pDev->DrawPixel( Point( rRect.Left()+1, rRect.Top()+1 ) ); - pDev->DrawPixel( Point( rRect.Right()-1, rRect.Top()+1 ) ); - pDev->DrawPixel( Point( rRect.Left()+1, rRect.Bottom()-1 ) ); - pDev->DrawPixel( Point( rRect.Right()-1, rRect.Bottom()-1 ) ); - - pDev->SetLineColor(); - if ( nStyle & BUTTON_DRAW_CHECKED ) - pDev->SetFillColor( aStyleSettings.GetCheckedColor() ); - else - pDev->SetFillColor( aStyleSettings.GetFaceColor() ); - pDev->DrawRect( Rectangle( rRect.Left()+2, rRect.Top()+2, rRect.Right()-2, rRect.Bottom()-2 ) ); - - if ( !(nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED)) ) - { - if ( nStyle & BUTTON_DRAW_MONO ) - pDev->SetLineColor( Color( COL_BLACK ) ); - else - pDev->SetLineColor( aStyleSettings.GetShadowColor() ); - pDev->DrawLine( Point( rRect.Left()+2, rRect.Bottom()-1 ), - Point( rRect.Right()-2, rRect.Bottom()-1 ) ); - pDev->DrawLine( Point( rRect.Right()-1, rRect.Top()+2 ), - Point( rRect.Right()-1, rRect.Bottom()-2 ) ); - pDev->DrawPixel( Point( rRect.Right()-2, rRect.Bottom()-2 ) ); - pDev->SetLineColor( aStyleSettings.GetLightColor() ); - } - else - pDev->SetLineColor( aStyleSettings.GetShadowColor() ); - - if ( !(nStyle & BUTTON_DRAW_MONO) ) - { - pDev->DrawLine( Point( rRect.Left()+2, rRect.Top()+1 ), - Point( rRect.Right()-2, rRect.Top()+1 ) ); - pDev->DrawLine( Point( rRect.Left()+1, rRect.Top()+2 ), - Point( rRect.Left()+1, rRect.Bottom()-2 ) ); - pDev->DrawPixel( Point( rRect.Top()+2, rRect.Right()+2 ) ); - } - - rRect.Left() += 2; - rRect.Top() += 2; - rRect.Right() -= 2; - rRect.Bottom() -= 2; - - if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) ) - { - rRect.Left()++; - rRect.Top()++; - rRect.Right()++; - rRect.Bottom()++; - } - - return; - } } DecorationView aDecoView( pDev ); @@ -1070,20 +910,6 @@ BOOL PushButton::ImplHitTestPushButton( Window* pDev, Point aTempPoint; Rectangle aTestRect( aTempPoint, pDev->GetOutputSizePixel() ); - if ( !(pDev->GetStyle() & (WB_RECTSTYLE | WB_SMALLSTYLE)) ) - { - const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings(); - - USHORT nPushButtonSysStyle = rStyleSettings.GetPushButtonStyle() & STYLE_PUSHBUTTON_STYLE; - if ( nPushButtonSysStyle == STYLE_PUSHBUTTON_MAC ) - { - aTestRect.Left() += 2; - aTestRect.Top() += 2; - aTestRect.Right() -= 2; - aTestRect.Bottom() -= 2; - } - } - return aTestRect.IsInside( rPos ); } @@ -3274,7 +3100,7 @@ Image RadioButton::GetRadioImage( const AllSettings& rSettings, USHORT nFlags ) { ImplSVData* pSVData = ImplGetSVData(); const StyleSettings& rStyleSettings = rSettings.GetStyleSettings(); - USHORT nStyle = rStyleSettings.GetRadioButtonStyle() & STYLE_RADIOBUTTON_STYLE; + USHORT nStyle = 0; if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO ) nStyle = STYLE_RADIOBUTTON_MONO; @@ -4192,7 +4018,7 @@ Image CheckBox::GetCheckImage( const AllSettings& rSettings, USHORT nFlags ) { ImplSVData* pSVData = ImplGetSVData(); const StyleSettings& rStyleSettings = rSettings.GetStyleSettings(); - USHORT nStyle = rStyleSettings.GetCheckBoxStyle() & STYLE_CHECKBOX_STYLE; + USHORT nStyle = 0; if ( rStyleSettings.GetOptions() & STYLE_OPTION_MONO ) nStyle = STYLE_CHECKBOX_MONO; diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx index 1c83779da1a9..c264d01916fc 100644 --- a/vcl/source/control/menubtn.cxx +++ b/vcl/source/control/menubtn.cxx @@ -78,15 +78,6 @@ void MenuButton::ImplExecuteMenu() Point aPos( 0, 1 ); Size aSize = GetSizePixel(); Rectangle aRect( aPos, aSize ); - const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - if ( !((GetStyle() & (WB_RECTSTYLE | WB_SMALLSTYLE)) || - !(rStyleSettings.GetOptions() & STYLE_OPTION_MACSTYLE)) ) - { - aRect.Left() += 2; - aRect.Top() += 2; - aRect.Right() -= 2; - aRect.Bottom() -= 2; - } SetPressed( TRUE ); EndSelection(); mnCurItemId = mpMenu->Execute( this, aRect, POPUPMENU_EXECUTE_DOWN ); diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index 9c82bb096dec..4261965995fa 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -770,64 +770,7 @@ void ScrollBar::ImplDraw( USHORT nDrawFlags, OutputDevice* pOutDev ) if ( bEnabled ) { nStyle = BUTTON_DRAW_NOLIGHTBORDER; - // pressed thumbs only in OS2 style - if ( rStyleSettings.GetOptions() & STYLE_OPTION_OS2STYLE ) - if ( mnStateFlags & SCRBAR_STATE_THUMB_DOWN ) - nStyle |= BUTTON_DRAW_PRESSED; aTempRect = aDecoView.DrawButton( maThumbRect, nStyle ); - // OS2 style requires pattern on the thumb - if ( rStyleSettings.GetOptions() & STYLE_OPTION_OS2STYLE ) - { - if ( GetStyle() & WB_HORZ ) - { - if ( aTempRect.GetWidth() > 6 ) - { - long nX = aTempRect.Center().X(); - nX -= 6; - if ( nX < aTempRect.Left() ) - nX = aTempRect.Left(); - for ( int i = 0; i < 6; i++ ) - { - if ( nX > aTempRect.Right()-1 ) - break; - - pOutDev->SetLineColor( rStyleSettings.GetButtonTextColor() ); - pOutDev->DrawLine( Point( nX, aTempRect.Top()+1 ), - Point( nX, aTempRect.Bottom()-1 ) ); - nX++; - pOutDev->SetLineColor( rStyleSettings.GetLightColor() ); - pOutDev->DrawLine( Point( nX, aTempRect.Top()+1 ), - Point( nX, aTempRect.Bottom()-1 ) ); - nX++; - } - } - } - else - { - if ( aTempRect.GetHeight() > 6 ) - { - long nY = aTempRect.Center().Y(); - nY -= 6; - if ( nY < aTempRect.Top() ) - nY = aTempRect.Top(); - for ( int i = 0; i < 6; i++ ) - { - if ( nY > aTempRect.Bottom()-1 ) - break; - - pOutDev->SetLineColor( rStyleSettings.GetButtonTextColor() ); - pOutDev->DrawLine( Point( aTempRect.Left()+1, nY ), - Point( aTempRect.Right()-1, nY ) ); - nY++; - pOutDev->SetLineColor( rStyleSettings.GetLightColor() ); - pOutDev->DrawLine( Point( aTempRect.Left()+1, nY ), - Point( aTempRect.Right()-1, nY ) ); - nY++; - } - } - } - pOutDev->SetLineColor(); - } } else { diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx index daf733a57a33..26a4c1cfd205 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -713,13 +713,6 @@ void Slider::MouseButtonDown( const MouseEvent& rMEvt ) mnMouseOff = rMousePos.X()-aCenterPos.X(); else mnMouseOff = rMousePos.Y()-aCenterPos.Y(); - - // Im OS2-Look geben wir den Thumb gedrueckt aus - if ( GetSettings().GetStyleSettings().GetOptions() & STYLE_OPTION_OS2STYLE ) - { - mnStateFlags |= SLIDER_STATE_THUMB_DOWN; - ImplDraw( SLIDER_DRAW_THUMB ); - } } else if ( ImplIsPageUp( rMousePos ) ) { diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index e9696aa8c492..2c81b6af241b 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -75,8 +75,6 @@ struct ImplTabItem struct ImplTabCtrlData { - PushButton* mpLeftBtn; - PushButton* mpRightBtn; std::hash_map< int, int > maLayoutPageIdToLine; std::hash_map< int, int > maLayoutLineToPageId; std::vector< Rectangle > maTabRectangles; @@ -88,27 +86,6 @@ struct ImplTabCtrlData // ----------------------------------------------------------------------- -#if 0 -// not used -#define TABCOLORCOUNT 10 - -static ColorData aImplTabColorAry[TABCOLORCOUNT] = -{ - RGB_COLORDATA( 80, 216, 248 ), - RGB_COLORDATA( 128, 216, 168 ), - RGB_COLORDATA( 128, 144, 248 ), - RGB_COLORDATA( 208, 180, 168 ), - RGB_COLORDATA( 248, 252, 168 ), - RGB_COLORDATA( 168, 144, 168 ), - RGB_COLORDATA( 248, 144, 80 ), - RGB_COLORDATA( 248, 216, 80 ), - RGB_COLORDATA( 248, 180, 168 ), - RGB_COLORDATA( 248, 216, 168 ) -}; -#endif - -// ----------------------------------------------------------------------- - #define TAB_OFFSET 3 #define TAB_TABOFFSET_X 3 #define TAB_TABOFFSET_Y 3 @@ -132,9 +109,6 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle ) if ( !(nStyle & WB_NODIALOGCONTROL) ) nStyle |= WB_DIALOGCONTROL; - // no single line tabs since NWF - nStyle &= ~WB_SINGLELINE; - Control::ImplInit( pParent, nStyle, NULL ); mnLastWidth = 0; @@ -143,18 +117,12 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle ) mnMaxPageWidth = 0; mnActPageId = 0; mnCurPageId = 0; - mnFirstPagePos = 0; - mnLastFirstPagePos = 0; mbFormat = TRUE; mbRestoreHelpId = FALSE; mbRestoreUnqId = FALSE; - mbSingleLine = FALSE; - mbScroll = FALSE; mbSmallInvalidate = FALSE; mbExtraSpace = FALSE; mpTabCtrlData = new ImplTabCtrlData; - mpTabCtrlData->mpLeftBtn = NULL; - mpTabCtrlData->mpRightBtn = NULL; mpTabCtrlData->mpListBox = NULL; @@ -226,8 +194,6 @@ void TabControl::ImplInitSettings( BOOL bFont, SetBackground( pParent->GetBackground() ); } } - - ImplScrollBtnsColor(); } // ----------------------------------------------------------------------- @@ -299,10 +265,6 @@ TabControl::~TabControl() { if( mpTabCtrlData->mpListBox ) delete mpTabCtrlData->mpListBox; - if ( mpTabCtrlData->mpLeftBtn ) - delete mpTabCtrlData->mpLeftBtn; - if ( mpTabCtrlData->mpRightBtn ) - delete mpTabCtrlData->mpRightBtn; delete mpTabCtrlData; } } @@ -323,74 +285,6 @@ ImplTabItem* TabControl::ImplGetItem( USHORT nId ) const // ----------------------------------------------------------------------- -void TabControl::ImplScrollBtnsColor() -{ - if ( mpTabCtrlData && mpTabCtrlData->mpLeftBtn ) - { - mpTabCtrlData->mpLeftBtn->SetControlForeground(); - mpTabCtrlData->mpRightBtn->SetControlForeground(); - } -} - -// ----------------------------------------------------------------------- - -void TabControl::ImplSetScrollBtnsState() -{ - if ( mbScroll ) - { - mpTabCtrlData->mpLeftBtn->Enable( mnFirstPagePos != 0 ); - mpTabCtrlData->mpRightBtn->Enable( mnFirstPagePos < mnLastFirstPagePos ); - } -} - -// ----------------------------------------------------------------------- - -void TabControl::ImplPosScrollBtns() -{ - if ( mbScroll ) - { - if ( !mpTabCtrlData->mpLeftBtn ) - { - mpTabCtrlData->mpLeftBtn = new PushButton( this, WB_RECTSTYLE | WB_SMALLSTYLE | WB_NOPOINTERFOCUS | WB_REPEAT ); - mpTabCtrlData->mpLeftBtn->SetSymbol( SYMBOL_PREV ); - mpTabCtrlData->mpLeftBtn->SetClickHdl( LINK( this, TabControl, ImplScrollBtnHdl ) ); - } - if ( !mpTabCtrlData->mpRightBtn ) - { - mpTabCtrlData->mpRightBtn = new PushButton( this, WB_RECTSTYLE | WB_SMALLSTYLE | WB_NOPOINTERFOCUS | WB_REPEAT ); - mpTabCtrlData->mpRightBtn->SetSymbol( SYMBOL_NEXT ); - mpTabCtrlData->mpRightBtn->SetClickHdl( LINK( this, TabControl, ImplScrollBtnHdl ) ); - } - - Rectangle aRect = ImplGetTabRect( TAB_PAGERECT ); - aRect.Left() -= TAB_OFFSET; - aRect.Top() -= TAB_OFFSET; - aRect.Right() += TAB_OFFSET; - aRect.Bottom() += TAB_OFFSET; - long nX = aRect.Right()-mnBtnSize+1; - long nY = aRect.Top()-mnBtnSize; - mpTabCtrlData->mpRightBtn->SetPosSizePixel( nX, nY, mnBtnSize, mnBtnSize ); - nX -= mnBtnSize; - mpTabCtrlData->mpLeftBtn->SetPosSizePixel( nX, nY, mnBtnSize, mnBtnSize ); - ImplScrollBtnsColor(); - ImplSetScrollBtnsState(); - mpTabCtrlData->mpLeftBtn->Show(); - mpTabCtrlData->mpRightBtn->Show(); - } - else - { - if ( mpTabCtrlData ) - { - if ( mpTabCtrlData->mpLeftBtn ) - mpTabCtrlData->mpLeftBtn->Hide(); - if ( mpTabCtrlData->mpRightBtn ) - mpTabCtrlData->mpRightBtn->Hide(); - } - } -} - -// ----------------------------------------------------------------------- - Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth ) { pItem->maFormatText = pItem->maText; @@ -524,8 +418,6 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight nMaxWidth = mnMaxPageWidth; nMaxWidth -= GetItemsOffset().X(); - mbScroll = FALSE; - USHORT nLines = 0; USHORT nCurLine = 0; long nLineWidthAry[100]; @@ -650,8 +542,6 @@ Rectangle TabControl::ImplGetTabRect( USHORT nItemPos, long nWidth, long nHeight mnLastWidth = nWidth; mnLastHeight = nHeight; mbFormat = FALSE; - - ImplPosScrollBtns(); } return size_t(nItemPos) < mpTabCtrlData->maItemList.size() ? mpTabCtrlData->maItemList[nItemPos].maRect : Rectangle(); @@ -795,13 +685,6 @@ void TabControl::ImplActivateTabPage( BOOL bNext ) // ----------------------------------------------------------------------- -void TabControl::ImplSetFirstPagePos( USHORT ) -{ - return; // was only required for single line -} - -// ----------------------------------------------------------------------- - void TabControl::ImplShowFocus() { if ( !GetPageCount() || mpTabCtrlData->mpListBox ) @@ -1101,14 +984,6 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent ) // ----------------------------------------------------------------------- -IMPL_LINK( TabControl, ImplScrollBtnHdl, PushButton*, EMPTYARG ) -{ - ImplSetScrollBtnsState(); - return 0; -} - -// ----------------------------------------------------------------------- - IMPL_LINK( TabControl, ImplListBoxSelectHdl, ListBox*, EMPTYARG ) { SelectTabPage( GetPageId( mpTabCtrlData->mpListBox->GetSelectEntryPos() ) ); @@ -1387,19 +1262,14 @@ void TabControl::Resize() // Feststellen, was invalidiert werden muss Size aNewSize = Control::GetOutputSizePixel(); long nNewWidth = aNewSize.Width(); - if ( mbScroll ) - mbSmallInvalidate = FALSE; - else + for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin(); + it != mpTabCtrlData->maItemList.end(); ++it ) { - for( std::vector< ImplTabItem >::iterator it = mpTabCtrlData->maItemList.begin(); - it != mpTabCtrlData->maItemList.end(); ++it ) + if ( !it->mbFullVisible || + (it->maRect.Right()-2 >= nNewWidth) ) { - if ( !it->mbFullVisible || - (it->maRect.Right()-2 >= nNewWidth) ) - { - mbSmallInvalidate = FALSE; - break; - } + mbSmallInvalidate = FALSE; + break; } } @@ -2013,13 +1883,6 @@ USHORT TabControl::GetCurPageId() const // ----------------------------------------------------------------------- -void TabControl::SetFirstPageId( USHORT ) -{ - return; // was only required for single line -} - -// ----------------------------------------------------------------------- - void TabControl::SelectTabPage( USHORT nPageId ) { if ( nPageId && (nPageId != mnCurPageId) ) diff --git a/vcl/source/gdi/bmpconv.cxx b/vcl/source/gdi/bmpconv.cxx index d949f519d197..188b4e49f0c5 100644 --- a/vcl/source/gdi/bmpconv.cxx +++ b/vcl/source/gdi/bmpconv.cxx @@ -28,14 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" -#include <vcl/bitmap.hxx> -#include <vcl/impbmpconv.hxx> -#include <vcl/svapp.hxx> -#include <vos/mutex.hxx> -#include <tools/stream.hxx> -#include <com/sun/star/script/XInvocation.hpp> -#include <com/sun/star/awt/XBitmap.hpp> -#include <cppuhelper/compbase1.hxx> +#include "vcl/bitmap.hxx" +#include "vcl/svapp.hxx" +#include "vcl/salctype.hxx" +#include "vos/mutex.hxx" +#include "tools/stream.hxx" +#include "com/sun/star/script/XInvocation.hpp" +#include "com/sun/star/awt/XBitmap.hpp" +#include "cppuhelper/compbase1.hxx" using namespace com::sun::star::uno; diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 79d875542509..f398888a33b6 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -1441,7 +1441,7 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData ) rIStm >> mnLen; rIStm >> nAryLen; - if ( mnIndex > mnLen ) + if ( mnIndex + mnLen > maStr.Len() ) { mnIndex = 0; mpDXAry = 0; @@ -1481,6 +1481,12 @@ void MetaTextArrayAction::Read( SvStream& rIStm, ImplMetaReadData* pData ) sal_Unicode* pBuffer = maStr.AllocBuffer( nLen ); while ( nLen-- ) rIStm >> *pBuffer++; + + if ( mnIndex + mnLen > maStr.Len() ) + { + mnIndex = 0; + delete[] mpDXAry, mpDXAry = NULL; + } } } diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index f4ea98484c33..ca50e4bf6c82 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -1686,15 +1686,15 @@ void ImplDevFontList::InitMatchData() const } //---------------------------------------------------------------------------- -ImplDevFontListData* ImplDevFontList::ImplFindByLocale(com::sun::star::lang::Locale lc) const +ImplDevFontListData* ImplDevFontList::ImplFindByLocale( com::sun::star::lang::Locale& rLocale ) const { // get the default font for a specified locale const DefaultFontConfiguration& rDefaults = *DefaultFontConfiguration::get(); - String aDefault = rDefaults.getUserInterfaceFont( lc ); + const String aDefault = rDefaults.getUserInterfaceFont( rLocale ); ImplDevFontListData* pFontData = ImplFindByTokenNames( aDefault ); if( pFontData ) return pFontData; - return 0; + return NULL; } // ----------------------------------------------------------------------- diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx index 521f4d7ea62d..b5b745b708fa 100644..100755 --- a/vcl/source/gdi/outdevnative.cxx +++ b/vcl/source/gdi/outdevnative.cxx @@ -87,6 +87,10 @@ MenubarValue::~MenubarValue() { } +MenupopupValue::~MenupopupValue() +{ +} + PushButtonValue::~PushButtonValue() { } @@ -200,49 +204,20 @@ static boost::shared_ptr< ImplControlValue > lcl_transformControlValue( const Im case CTRL_GENERIC: aResult.reset( new ImplControlValue( rVal ) ); break; - default: - OSL_ENSURE( 0, "unknown ImplControlValue type !" ); - break; - } - return aResult; -} - -#if 0 -static void lcl_moveControlValue( ControlType nType, const ImplControlValue& aValue, const Point& rDelta ) -{ - switch( aValue.getType() ) - { - case CTRL_SLIDER: - { - SliderValue* pSlVal = static_cast<SliderValue*>(const_cast<ImplControlValue*>(&aValue)); - pSlVal->maThumbRect.Move( rDelta.X(), rDelta.Y() ); - } - break; - case CTRL_SCROLLBAR: - { - ScrollbarValue* pScVal = static_cast<ScrollbarValue*>(const_cast<ImplControlValue*>(&aValue)); - pScVal->maThumbRect.Move( rDelta.X(), rDelta.Y() ); - pScVal->maButton1Rect.Move( rDelta.X(), rDelta.Y() ); - pScVal->maButton2Rect.Move( rDelta.X(), rDelta.Y() ); - } - break; - case CTRL_SPINBOX: - case CTRL_SPINBUTTONS: + case CTRL_MENU_POPUP: { - SpinbuttonValue* pSpVal = static_cast<SpinbuttonValue*>(const_cast<ImplControlValue*>(&aValue)); - pSpVal->maUpperRect.Move( rDelta.X(), rDelta.Y() ); - pSpVal->maLowerRect.Move( rDelta.X(), rDelta.Y() ); + const MenupopupValue* pMVal = static_cast<const MenupopupValue*>(&rVal); + MenupopupValue* pNew = new MenupopupValue( *pMVal ); + pNew->maItemRect = rDev.ImplLogicToDevicePixel( pMVal->maItemRect ); + aResult.reset( pNew ); } break; - case CTRL_TOOLBAR: - { - ToolbarValue* pTVal = static_cast<ToolbarValue*>(const_cast<ImplControlValue*>(&aValue)); - pTVal->maGripRect.Move( rDelta.X(), rDelta.Y() ); - } + default: + OSL_ENSURE( 0, "unknown ImplControlValue type !" ); break; } + return aResult; } -#endif BOOL OutputDevice::DrawNativeControl( ControlType nType, ControlPart nPart, @@ -254,20 +229,6 @@ BOOL OutputDevice::DrawNativeControl( ControlType nType, if( !lcl_enableNativeWidget( *this ) ) return FALSE; - /* - if( !IsInPaint() && IsPaintTransparent() ) - { - // only required if called directly (ie, we're not in Paint() ): - // force redraw (Paint()) for transparent controls - // to trigger a repaint of the background - Region aClipRgn( GetClipRegion() ); - if( !rControlRegion.IsEmpty() ) - aClipRgn.Intersect( rControlRegion ); - Invalidate( aClipRgn, INVALIDATE_UPDATE ); - return TRUE; - } - */ - // make sure the current clip region is initialized correctly if ( !mpGraphics ) if ( !ImplGetGraphics() ) diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 2ea9bfcc4c11..78456992340f 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -57,8 +57,14 @@ #include <comphelper/processfactory.hxx> +#include "com/sun/star/beans/XPropertySet.hpp" +#include "com/sun/star/container/XNameAccess.hpp" +#include "com/sun/star/lang/XMultiServiceFactory.hpp" + using namespace com::sun::star::uno; using namespace com::sun::star::lang; +using namespace com::sun::star::beans; +using namespace com::sun::star::container; int nImplSysDialog = 0; @@ -130,6 +136,105 @@ PrinterOptions::~PrinterOptions() { } +#define PROPERTYNAME_REDUCETRANSPARENCY rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceTransparency")) +#define PROPERTYNAME_REDUCEDTRANSPARENCYMODE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedTransparencyMode")) +#define PROPERTYNAME_REDUCEGRADIENTS rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceGradients")) +#define PROPERTYNAME_REDUCEDGRADIENTMODE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedGradientMode")) +#define PROPERTYNAME_REDUCEDGRADIENTSTEPCOUNT rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedGradientStepCount")) +#define PROPERTYNAME_REDUCEBITMAPS rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceBitmaps")) +#define PROPERTYNAME_REDUCEDBITMAPMODE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedBitmapMode")) +#define PROPERTYNAME_REDUCEDBITMAPRESOLUTION rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedBitmapResolution")) +#define PROPERTYNAME_REDUCEDBITMAPINCLUDESTRANSPARENCY rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedBitmapIncludesTransparency")) +#define PROPERTYNAME_CONVERTTOGREYSCALES rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ConvertToGreyscales")) + +bool PrinterOptions::ReadFromConfig( bool i_bFile ) +{ + bool bSuccess = false; + // save old state in case something goes wrong + PrinterOptions aOldValues( *this ); + + // get the configuration service + Reference< XMultiServiceFactory > xConfigProvider; + Reference< XNameAccess > xConfigAccess; + try + { + // get service provider + Reference< XMultiServiceFactory > xSMgr( comphelper::getProcessServiceFactory() ); + // create configuration hierachical access name + if( xSMgr.is() ) + { + try + { + xConfigProvider = Reference< XMultiServiceFactory >( + xSMgr->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.ConfigurationProvider" ))), + UNO_QUERY ); + if( xConfigProvider.is() ) + { + Sequence< Any > aArgs(1); + PropertyValue aVal; + aVal.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); + if( i_bFile ) + aVal.Value <<= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Common/Print/Option/File" ) ); + else + aVal.Value <<= rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Common/Print/Option/Printer" ) ); + aArgs.getArray()[0] <<= aVal; + xConfigAccess = Reference< XNameAccess >( + xConfigProvider->createInstanceWithArguments( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationAccess" )), aArgs ), + UNO_QUERY ); + if( xConfigAccess.is() ) + { + Reference< XPropertySet > xSet( xConfigAccess, UNO_QUERY ); + if( xSet.is() ) + { + sal_Int32 nValue = 0; + sal_Bool bValue = 0; + if( xSet->getPropertyValue(PROPERTYNAME_REDUCETRANSPARENCY) >>= bValue ) + SetReduceTransparency( bValue ); + if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDTRANSPARENCYMODE) >>= nValue ) + SetReducedTransparencyMode( (PrinterTransparencyMode)nValue ); + if( xSet->getPropertyValue(PROPERTYNAME_REDUCEGRADIENTS) >>= bValue ) + SetReduceGradients( bValue ); + if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDGRADIENTMODE) >>= nValue ) + SetReducedGradientMode( (PrinterGradientMode)nValue ); + if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDGRADIENTSTEPCOUNT) >>= nValue ) + SetReducedGradientStepCount( (USHORT)nValue ); + if( xSet->getPropertyValue(PROPERTYNAME_REDUCEBITMAPS) >>= bValue ) + SetReduceBitmaps( bValue ); + if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDBITMAPMODE) >>= nValue ) + SetReducedBitmapMode( (PrinterBitmapMode)nValue ); + if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDBITMAPRESOLUTION) >>= nValue ) + SetReducedBitmapResolution( (USHORT)nValue ); + if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDBITMAPINCLUDESTRANSPARENCY) >>= bValue ) + SetReducedBitmapIncludesTransparency( bValue ); + if( xSet->getPropertyValue(PROPERTYNAME_CONVERTTOGREYSCALES) >>= bValue ) + SetConvertToGreyscales( bValue ); + + bSuccess = true; + } + } + } + } + catch( Exception& ) + { + } + } + } + catch( WrappedTargetException& ) + { + } + + if( ! bSuccess ) + *this = aOldValues; + return bSuccess; +} + +void Printer::SetPrinterOptions( const PrinterOptions& i_rOptions ) +{ + *mpPrinterOptions = i_rOptions; +} + // ------------- // - QueueInfo - // ------------- diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 98eac5e982d3..8207282add99 100755 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -533,10 +533,6 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl:: pSingleValue->Value >>= bSinglePrintJobs; } - // remark: currently it is still possible to use EnablePrintFile and - // SetPrintFileName to redirect printout into file - // it can be argued that those methods should be removed in favor - // of only using the LocalFileName property beans::PropertyValue* pFileValue = i_pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LocalFileName" ) ) ); if( pFileValue ) { @@ -553,6 +549,7 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptr<vcl:: XubString* pPrintFile = NULL; if ( mbPrintFile ) pPrintFile = &maPrintFile; + mpPrinterOptions->ReadFromConfig( mbPrintFile ); maJobName = i_rJobName; mnCurPage = 1; @@ -733,6 +730,13 @@ void PrinterController::setPrinter( const boost::shared_ptr<Printer>& i_rPrinter mpImplData->mnFixedPaperBin = -1; } +void PrinterController:: resetPrinterOptions( bool i_bFileOutput ) +{ + PrinterOptions aOpt; + aOpt.ReadFromConfig( i_bFileOutput ); + mpImplData->mpPrinter->SetPrinterOptions( aOpt ); +} + bool PrinterController::setupPrinter( Window* i_pParent ) { bool bRet = false; @@ -1729,7 +1733,7 @@ void PrinterOptionsHelper::appendPrintUIOptions( uno::Sequence< beans::PropertyV } Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle, - const Sequence< rtl::OUString >& i_rHelpTexts, + const Sequence< rtl::OUString >& i_rHelpIds, const rtl::OUString& i_rType, const PropertyValue* i_pVal, const PrinterOptionsHelper::UIControlOptions& i_rControlOptions @@ -1738,7 +1742,7 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle, sal_Int32 nElements = 1 // ControlType + (i_rTitle.getLength() ? 1 : 0) // Text - + (i_rHelpTexts.getLength() ? 1 : 0) // HelpText + + (i_rHelpIds.getLength() ? 1 : 0) // HelpId + (i_pVal ? 1 : 0) // Property + i_rControlOptions.maAddProps.getLength() // additional props + (i_rControlOptions.maGroupHint.getLength() ? 1 : 0) // grouping @@ -1761,10 +1765,10 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle, aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Text" ) ); aCtrl[nUsed++].Value = makeAny( i_rTitle ); } - if( i_rHelpTexts.getLength() ) + if( i_rHelpIds.getLength() ) { - aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpText" ) ); - aCtrl[nUsed++].Value = makeAny( i_rHelpTexts ); + aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HelpId" ) ); + aCtrl[nUsed++].Value = makeAny( i_rHelpIds ); } aCtrl[nUsed ].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ControlType" ) ); aCtrl[nUsed++].Value = makeAny( i_rType ); @@ -1813,53 +1817,53 @@ Any PrinterOptionsHelper::getUIControlOpt( const rtl::OUString& i_rTitle, return makeAny( aCtrl ); } -Any PrinterOptionsHelper::getGroupControlOpt( const rtl::OUString& i_rTitle, const rtl::OUString& i_rHelpText ) +Any PrinterOptionsHelper::getGroupControlOpt( const rtl::OUString& i_rTitle, const rtl::OUString& i_rHelpId ) { - Sequence< rtl::OUString > aHelpText; - if( i_rHelpText.getLength() > 0 ) + Sequence< rtl::OUString > aHelpId; + if( i_rHelpId.getLength() > 0 ) { - aHelpText.realloc( 1 ); - *aHelpText.getArray() = i_rHelpText; + aHelpId.realloc( 1 ); + *aHelpId.getArray() = i_rHelpId; } - return getUIControlOpt( i_rTitle, aHelpText, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Group" ) ) ); + return getUIControlOpt( i_rTitle, aHelpId, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Group" ) ) ); } Any PrinterOptionsHelper::getSubgroupControlOpt( const rtl::OUString& i_rTitle, - const rtl::OUString& i_rHelpText, + const rtl::OUString& i_rHelpId, const PrinterOptionsHelper::UIControlOptions& i_rControlOptions ) { - Sequence< rtl::OUString > aHelpText; - if( i_rHelpText.getLength() > 0 ) + Sequence< rtl::OUString > aHelpId; + if( i_rHelpId.getLength() > 0 ) { - aHelpText.realloc( 1 ); - *aHelpText.getArray() = i_rHelpText; + aHelpId.realloc( 1 ); + *aHelpId.getArray() = i_rHelpId; } - return getUIControlOpt( i_rTitle, aHelpText, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Subgroup" ) ), + return getUIControlOpt( i_rTitle, aHelpId, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Subgroup" ) ), NULL, i_rControlOptions ); } Any PrinterOptionsHelper::getBoolControlOpt( const rtl::OUString& i_rTitle, - const rtl::OUString& i_rHelpText, + const rtl::OUString& i_rHelpId, const rtl::OUString& i_rProperty, sal_Bool i_bValue, const PrinterOptionsHelper::UIControlOptions& i_rControlOptions ) { - Sequence< rtl::OUString > aHelpText; - if( i_rHelpText.getLength() > 0 ) + Sequence< rtl::OUString > aHelpId; + if( i_rHelpId.getLength() > 0 ) { - aHelpText.realloc( 1 ); - *aHelpText.getArray() = i_rHelpText; + aHelpId.realloc( 1 ); + *aHelpId.getArray() = i_rHelpId; } PropertyValue aVal; aVal.Name = i_rProperty; aVal.Value = makeAny( i_bValue ); - return getUIControlOpt( i_rTitle, aHelpText, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Bool" ) ), &aVal, i_rControlOptions ); + return getUIControlOpt( i_rTitle, aHelpId, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Bool" ) ), &aVal, i_rControlOptions ); } Any PrinterOptionsHelper::getChoiceControlOpt( const rtl::OUString& i_rTitle, - const Sequence< rtl::OUString >& i_rHelpText, + const Sequence< rtl::OUString >& i_rHelpId, const rtl::OUString& i_rProperty, const Sequence< rtl::OUString >& i_rChoices, sal_Int32 i_nValue, @@ -1882,11 +1886,11 @@ Any PrinterOptionsHelper::getChoiceControlOpt( const rtl::OUString& i_rTitle, PropertyValue aVal; aVal.Name = i_rProperty; aVal.Value = makeAny( i_nValue ); - return getUIControlOpt( i_rTitle, i_rHelpText, i_rType, &aVal, aOpt ); + return getUIControlOpt( i_rTitle, i_rHelpId, i_rType, &aVal, aOpt ); } Any PrinterOptionsHelper::getRangeControlOpt( const rtl::OUString& i_rTitle, - const rtl::OUString& i_rHelpText, + const rtl::OUString& i_rHelpId, const rtl::OUString& i_rProperty, sal_Int32 i_nValue, sal_Int32 i_nMinValue, @@ -1905,17 +1909,17 @@ Any PrinterOptionsHelper::getRangeControlOpt( const rtl::OUString& i_rTitle, aOpt.maAddProps[nUsed++].Value = makeAny( i_nMaxValue ); } - Sequence< rtl::OUString > aHelpText; - if( i_rHelpText.getLength() > 0 ) + Sequence< rtl::OUString > aHelpId; + if( i_rHelpId.getLength() > 0 ) { - aHelpText.realloc( 1 ); - *aHelpText.getArray() = i_rHelpText; + aHelpId.realloc( 1 ); + *aHelpId.getArray() = i_rHelpId; } PropertyValue aVal; aVal.Name = i_rProperty; aVal.Value = makeAny( i_nValue ); return getUIControlOpt( i_rTitle, - aHelpText, + aHelpId, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Range" ) ), &aVal, aOpt @@ -1923,23 +1927,23 @@ Any PrinterOptionsHelper::getRangeControlOpt( const rtl::OUString& i_rTitle, } Any PrinterOptionsHelper::getEditControlOpt( const rtl::OUString& i_rTitle, - const rtl::OUString& i_rHelpText, + const rtl::OUString& i_rHelpId, const rtl::OUString& i_rProperty, const rtl::OUString& i_rValue, const PrinterOptionsHelper::UIControlOptions& i_rControlOptions ) { - Sequence< rtl::OUString > aHelpText; - if( i_rHelpText.getLength() > 0 ) + Sequence< rtl::OUString > aHelpId; + if( i_rHelpId.getLength() > 0 ) { - aHelpText.realloc( 1 ); - *aHelpText.getArray() = i_rHelpText; + aHelpId.realloc( 1 ); + *aHelpId.getArray() = i_rHelpId; } PropertyValue aVal; aVal.Name = i_rProperty; aVal.Value = makeAny( i_rValue ); return getUIControlOpt( i_rTitle, - aHelpText, + aHelpId, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Edit" ) ), &aVal, i_rControlOptions diff --git a/vcl/source/src/btntext.src b/vcl/source/src/btntext.src index 6d2360dae6cb..b786184fa2f3 100644 --- a/vcl/source/src/btntext.src +++ b/vcl/source/src/btntext.src @@ -81,67 +81,3 @@ String SV_BUTTONTEXT_ABORT Text [ en-US ] = "~Abort"; }; -/* HelpTexte, die wir derzeit nicht mehr verwenden: -SV_BUTTONHELPTEXT_OK -{ - Text = "Schliet dieses Dialogfeld und speichert alle vorgenommenen nderungen." ; -}; - -SV_BUTTONHELPTEXT_CANCEL -{ - Text = "Schliet dieses Dialogfeld, ohne Ihre nderungen zu speichern." ; -}; - -SV_BUTTONHELPTEXT_HELP -{ - Text = "Zeigt Hilfe zu diesem Fenster an." ; -}; - -SV_BUTTONHELPTEXT_MORE -{ - Text = "Zeigt weitere Einstellmglichkeiten an oder versteckt diese wieder." ; -}; - -Finnische-Texte: -OK OK -CANCEL Peruuta -HELP ~Ohje -MORE ~Enemmn -YES ~Kyll -NO ~Ei -RETRY ~Yrituudelleen -*/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/vcl/source/src/images.src b/vcl/source/src/images.src index fdb1e755c86a..000d7215d80d 100644 --- a/vcl/source/src/images.src +++ b/vcl/source/src/images.src @@ -38,25 +38,6 @@ Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_STDOFFSET) File = "check.bmp"; }; -Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_WINOFFSET) -{ - File = "checkwin.bmp"; -}; - -Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_OS2OFFSET) -{ - File = "checkos2.bmp"; -}; - -Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_MACOFFSET) -{ - File = "checkmac.bmp"; -}; - -Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_UNIXOFFSET) -{ - File = "checkunx.bmp"; -}; Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_MONOOFFSET) { @@ -80,26 +61,6 @@ Bitmap (SV_RESID_BITMAP_RADIO + SV_RESID_STDOFFSET) File = "radio.bmp"; }; -Bitmap (SV_RESID_BITMAP_RADIO + SV_RESID_WINOFFSET) -{ - File = "radiowin.bmp"; -}; - -Bitmap (SV_RESID_BITMAP_RADIO + SV_RESID_OS2OFFSET) -{ - File = "radioos2.bmp"; -}; - -Bitmap (SV_RESID_BITMAP_RADIO + SV_RESID_MACOFFSET) -{ - File = "radiomac.bmp"; -}; - -Bitmap (SV_RESID_BITMAP_RADIO + SV_RESID_UNIXOFFSET) -{ - File = "radiounx.bmp"; -}; - Bitmap (SV_RESID_BITMAP_RADIO + SV_RESID_MONOOFFSET) { File = "radiomono.bmp"; diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src index 436ab40bdc5f..04ab77f09288 100644 --- a/vcl/source/src/print.src +++ b/vcl/source/src/print.src @@ -29,7 +29,7 @@ ModalDialog SV_DLG_PRINT { - HelpID = "vcl:ModalDialog:SV_DLG_PRINT"; + HelpID = ".HelpID:vcl:PrintDialog:Dialog"; Text [en-US] = "Print"; Closeable = TRUE; Sizeable = TRUE; @@ -45,16 +45,19 @@ ModalDialog SV_DLG_PRINT Pos = MAP_APPFONT( 240, 195 ); Size = MAP_APPFONT( 50, 15 ); Text [en-US] = "~Print"; + HelpID = ".HelpID:vcl:PrintDialog:OK"; }; CancelButton SV_PRINT_CANCEL { Pos = MAP_APPFONT( 295, 195 ); Size = MAP_APPFONT( 50, 15 ); + HelpID = ".HelpID:vcl:PrintDialog:Cancel"; }; HelpButton SV_PRINT_HELP { Pos = MAP_APPFONT( 5, 5 ); Size = MAP_APPFONT( 50, 15 ); + HelpID = ".HelpID:vcl:PrintDialog:Help"; }; Window SV_PRINT_PAGE_PREVIEW @@ -62,16 +65,16 @@ ModalDialog SV_DLG_PRINT Pos = MAP_APPFONT( 5, 5 ); Size = MAP_APPFONT( 130, 130 ); Border = FALSE; + HelpID = ".HelpID:vcl:PrintDialog:Preview"; }; NumericField SV_PRINT_PAGE_EDIT { - HelpID = "vcl:NumericField:SV_DLG_PRINT:SV_PRINT_PAGE_EDIT"; Pos = MAP_APPFONT( 5, 140 ); Size = MAP_APPFONT( 30, 12 ); SVLook = TRUE; Spin = FALSE; Border = TRUE; - HelpText [en-US] = "Select page to display in preview."; + HelpID = ".HelpID:vcl:PrintDialog:PageEdit"; }; FixedText SV_PRINT_PAGE_TXT { @@ -79,26 +82,25 @@ ModalDialog SV_DLG_PRINT Size = MAP_APPFONT( 30, 12 ); Text [ en-US ] = "/ %n"; VCenter = TRUE; + HelpID = ".HelpID:vcl:PrintDialog:NumPagesText"; }; PushButton SV_PRINT_PAGE_FORWARD { - HelpID = "vcl:PushButton:SV_DLG_PRINT:SV_PRINT_PAGE_FORWARD"; Pos = MAP_APPFONT( 95, 140 ); Size = MAP_APPFONT( 15, 12 ); - HelpText [en-US] = "Scroll one page forward."; + HelpID = ".HelpID:vcl:PrintDialog:ForwardBtn"; }; PushButton SV_PRINT_PAGE_BACKWARD { - HelpID = "vcl:PushButton:SV_DLG_PRINT:SV_PRINT_PAGE_BACKWARD"; Pos = MAP_APPFONT( 80, 140 ); Size = MAP_APPFONT( 15, 12 ); - HelpText [en-US] = "Scroll one page backward."; + HelpID = ".HelpID:vcl:PrintDialog:BackwardBtn"; }; TabControl SV_PRINT_TABCTRL { - HelpID = "vcl:TabControl:SV_DLG_PRINT:SV_PRINT_TABCTRL"; Pos = MAP_APPFONT( 140, 5 ); Size = MAP_APPFONT( 205, 175 ); + HelpID = ".HelpID:vcl:PrintDialog:TabPages"; }; FixedLine SV_PRINT_BUTTONLINE { @@ -128,7 +130,7 @@ ModalDialog SV_DLG_PRINT TabPage SV_PRINT_TAB_NUP { - HelpID = "vcl:TabPage:SV_PRINT_TAB_NUP"; + HelpID = ".HelpID:vcl:PrintDialog:NUpPage"; Text [en-US] = "Page Layout"; Hide = TRUE; @@ -138,38 +140,28 @@ ModalDialog SV_DLG_PRINT Size = MAP_APPFONT( 150, 10 ); Text [en-US] = "Layout"; }; - RadioButton SV_PRINT_PRT_NUP_DEFAULT_BTN - { - HelpID = "vcl:RadioButton:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_DEFAULT_BTN"; - Pos = MAP_APPFONT( 0, 0 ); - Size = MAP_APPFONT( 10, 10 ); - Text [en-US] = "~Default"; - HelpText [en-US] = "Print one page per sheet of paper."; - }; RadioButton SV_PRINT_PRT_NUP_BROCHURE_BTN { - HelpID = "vcl:RadioButton:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_BROCHURE_BTN"; + HelpID = ".HelpID:vcl:PrintDialog:NUpPage:Brochure"; Pos = MAP_APPFONT( 0, 0 ); Size = MAP_APPFONT( 10, 10 ); Text = ""; }; RadioButton SV_PRINT_PRT_NUP_PAGES_BTN { - HelpID = "vcl:RadioButton:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_PAGES_BTN"; + HelpID = ".HelpID:vcl:PrintDialog:NUpPage:PagesPerSheet"; Pos = MAP_APPFONT( 0, 0 ); Size = MAP_APPFONT( 10, 10 ); Text [en-US] = "Pa~ges per sheet"; - HelpText [en-US] = "Print multiple pages per sheet of paper."; }; ListBox SV_PRINT_PRT_NUP_PAGES_BOX { - HelpID = "vcl:ListBox:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_PAGES_BOX"; + HelpID = ".HelpID:vcl:PrintDialog:NUpPage:PagesPerSheetBox"; Pos = MAP_APPFONT( 0, 0 ); Size = MAP_APPFONT( 10, 80 ); Border = TRUE; DropDown = TRUE; CurPos = 0; - HelpText [en-US] = "Select how many pages to print per sheet of paper."; StringList [en-US] = { < "1"; 1; >; @@ -190,7 +182,7 @@ ModalDialog SV_DLG_PRINT }; NumericField SV_PRINT_PRT_NUP_COLS_EDT { - HelpID = "vcl:NumericField:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_COLS_EDT"; + HelpID = ".HelpID:vcl:PrintDialog:NUpPage:ColumnsBox"; Pos = MAP_APPFONT( 55, 20 ); Size = MAP_APPFONT( 40, 12 ); Border = TRUE; @@ -198,7 +190,6 @@ ModalDialog SV_DLG_PRINT Minimum = 1; Maximum = 32; Value = 1; - HelpText [en-US] = "Select number of columns."; }; FixedText SV_PRINT_PRT_NUP_TIMES_TXT { @@ -209,7 +200,7 @@ ModalDialog SV_DLG_PRINT }; NumericField SV_PRINT_PRT_NUP_ROWS_EDT { - HelpID = "vcl:NumericField:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_ROWS_EDT"; + HelpID = ".HelpID:vcl:PrintDialog:NUpPage:RowsBox"; Pos = MAP_APPFONT( 55, 35 ); Size = MAP_APPFONT( 40, 12 ); Border = TRUE; @@ -217,7 +208,6 @@ ModalDialog SV_DLG_PRINT Minimum = 1; Maximum = 32; Value = 1; - HelpText [en-US] = "Select number of rows."; }; FixedText SV_PRINT_PRT_NUP_MARGINS_PAGES_1_TXT { @@ -227,14 +217,13 @@ ModalDialog SV_DLG_PRINT }; MetricField SV_PRINT_PRT_NUP_MARGINS_PAGES_EDT { - HelpID = "vcl:MetricField:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_MARGINS_PAGES_EDT"; + HelpID = ".HelpID:vcl:PrintDialog:NUpPage:PageMarginBox"; Pos = MAP_APPFONT( 55, 95 ); Size = MAP_APPFONT( 40, 12 ); Spin = TRUE; Border = TRUE; Value = 0; Unit = FUNIT_MM; - HelpText [en-US] = "Select margin between individual pages on each sheet of paper."; }; FixedText SV_PRINT_PRT_NUP_MARGINS_PAGES_2_TXT { @@ -250,14 +239,13 @@ ModalDialog SV_DLG_PRINT }; MetricField SV_PRINT_PRT_NUP_MARGINS_SHEET_EDT { - HelpID = "vcl:MetricField:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_MARGINS_SHEET_EDT"; + HelpID = ".HelpID:vcl:PrintDialog:NUpPage:SheetMarginBox"; Pos = MAP_APPFONT( 155, 95 ); Size = MAP_APPFONT( 40, 12 ); Spin = TRUE; Border = TRUE; Value = 0; Unit = FUNIT_MM; - HelpText [en-US] = "Select margin between the printed pages and paper edge."; }; FixedText SV_PRINT_PRT_NUP_MARGINS_SHEET_2_TXT { @@ -273,7 +261,7 @@ ModalDialog SV_DLG_PRINT }; ListBox SV_PRINT_PRT_NUP_ORIENTATION_BOX { - HelpID = "vcl:ListBox:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_ORIENTATION_BOX"; + HelpID = ".HelpID:vcl:PrintDialog:NUpPage:OrientationBox"; Pos = MAP_APPFONT( 0, 0 ); Size = MAP_APPFONT( 10, 40 ); Border = TRUE; @@ -285,7 +273,6 @@ ModalDialog SV_DLG_PRINT < "Portrait"; SV_PRINT_PRT_NUP_ORIENTATION_PORTRAIT; >; < "Landscape"; SV_PRINT_PRT_NUP_ORIENTATION_LANDSCAPE; >; }; - HelpText [en-US] = "Select the orientation of the paper."; }; FixedText SV_PRINT_PRT_NUP_ORDER_TXT { @@ -295,7 +282,7 @@ ModalDialog SV_DLG_PRINT }; ListBox SV_PRINT_PRT_NUP_ORDER_BOX { - HelpID = "vcl:ListBox:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_ORDER_BOX"; + HelpID = ".HelpID:vcl:PrintDialog:NUpPage:OrderBox"; Pos = MAP_APPFONT( 0, 0 ); Size = MAP_APPFONT( 10, 50 ); DropDown = TRUE; @@ -308,21 +295,19 @@ ModalDialog SV_DLG_PRINT < "top to bottom, then left"; SV_PRINT_PRT_NUP_ORDER_TBRL; >; < "right to left, then down"; SV_PRINT_PRT_NUP_ORDER_RLTB; >; }; - HelpText [en-US] = "Select order in which pages are to be printed."; }; CheckBox SV_PRINT_PRT_NUP_BORDER_CB { - HelpID = "vcl:CheckBox:SV_PRINT_TAB_NUP:SV_PRINT_PRT_NUP_BORDER_CB"; + HelpID = ".HelpID:vcl:PrintDialog:NUpPage:BorderBox"; Pos = MAP_APPFONT( 10, 65 ); Size = MAP_APPFONT( 150, 12 ); Text [en-US] = "Draw a border around each page"; - HelpText [en-US] = "Check to draw a border around each page."; }; }; TabPage SV_PRINT_TAB_JOB { - HelpID = "vcl:TabPage:SV_PRINT_TAB_JOB"; + HelpID = ".HelpID:vcl:PrintDialog:JobPage"; Text [en-US] = "General"; Hide = TRUE; @@ -334,20 +319,18 @@ ModalDialog SV_DLG_PRINT }; ListBox SV_PRINT_PRINTERS { - HelpID = "vcl:ListBox:SV_PRINT_TAB_JOB:SV_PRINT_PRINTERS"; + HelpID = ".HelpID:vcl:PrintDialog:JobPage:PrinterList"; Pos = MAP_APPFONT( 5, 5 ); Size = MAP_APPFONT( 100, 80 ); Border = TRUE; Sort = TRUE; - HelpText [en-US] = "Select the printer to print on."; }; CheckBox SV_PRINT_DETAILS_BTN { - HelpID = "vcl:CheckBox:SV_PRINT_TAB_JOB:SV_PRINT_DETAILS_BTN"; + HelpID = ".HelpID:vcl:PrintDialog:JobPage:DetailsBtn"; Pos = MAP_APPFONT( 5, 5 ); Size = MAP_APPFONT( 5, 5 ); Text [en-US] = "Details"; - HelpText [en-US] = "Show/Hide detailed information of the selected printer."; }; FixedText SV_PRINT_STATUS_TXT { @@ -369,11 +352,10 @@ ModalDialog SV_DLG_PRINT }; PushButton SV_PRINT_PRT_SETUP { - HelpID = "vcl:PushButton:SV_PRINT_TAB_JOB:SV_PRINT_PRT_SETUP"; + HelpID = ".HelpID:vcl:PrintDialog:JobPage:Properties"; Pos = MAP_APPFONT( 115, 5 ); Size = MAP_APPFONT( 50, 15 ); Text [en-US] = "Properties..."; - HelpText [en-US] = "Call the setup dialog of the selected printer."; }; FixedLine SV_PRINT_COPIES { @@ -389,7 +371,7 @@ ModalDialog SV_DLG_PRINT }; NumericField SV_PRINT_COPYCOUNT_FIELD { - HelpID = "vcl:NumericField:SV_PRINT_TAB_JOB:SV_PRINT_COPYCOUNT_FIELD"; + HelpID = ".HelpID:vcl:PrintDialog:JobPage:Copies"; Pos = MAP_APPFONT( 10, 56 ); Size = MAP_APPFONT( 40, 12 ); Border = TRUE; @@ -397,7 +379,6 @@ ModalDialog SV_DLG_PRINT Minimum = 1; Maximum = 16384; Value = 1; - HelpText [en-US] = "Select the number of copies to be produced."; }; FixedImage SV_PRINT_COLLATE_IMAGE { @@ -406,11 +387,10 @@ ModalDialog SV_DLG_PRINT }; CheckBox SV_PRINT_COLLATE { - HelpID = "vcl:CheckBox:SV_PRINT_TAB_JOB:SV_PRINT_COLLATE"; + HelpID = ".HelpID:vcl:PrintDialog:JobPage:Collate"; Pos = MAP_APPFONT( 95, 45 ); Size = MAP_APPFONT( 70, 10 ); Text [en-US] = "Collate"; - HelpText [en-US] = "Select whether copies should be collated or not."; }; Image SV_PRINT_COLLATE_IMG @@ -436,9 +416,9 @@ ModalDialog SV_DLG_PRINT TabPage SV_PRINT_TAB_OPT { - HelpID = "vcl:TabPage:SV_PRINT_TAB_OPT"; Text [en-US] = "Options"; Hide = TRUE; + HelpID = ".HelpID:vcl:PrintDialog:OptPage"; FixedLine SV_PRINT_OPT_PRINT_FL { @@ -448,27 +428,24 @@ ModalDialog SV_DLG_PRINT }; CheckBox SV_PRINT_OPT_TOFILE { - HelpID = "vcl:CheckBox:SV_PRINT_TAB_OPT:SV_PRINT_OPT_TOFILE"; + HelpID = ".HelpID:vcl:PrintDialog:OptPage:ToFile"; Pos = MAP_APPFONT( 10, 20 ); Size = MAP_APPFONT( 200, 12 ); Text [en-US] = "Print to ~file"; - HelpText [en-US] = "Check to send output to a file instead of the actual printer."; }; CheckBox SV_PRINT_OPT_SINGLEJOBS { - HelpID = "vcl:CheckBox:SV_PRINT_TAB_OPT:SV_PRINT_OPT_SINGLEJOBS"; + HelpID = ".HelpID:vcl:PrintDialog:OptPage:SingleJobs"; Pos = MAP_APPFONT( 10, 35 ); Size = MAP_APPFONT( 200, 12 ); Text [en-US] = "~Create single print jobs for collated output"; - HelpText [en-US] = "Check to not rely on the printer to create collated copies but create a print job for each copy instead."; }; CheckBox SV_PRINT_OPT_REVERSE { - HelpID = "vcl:CheckBox:SV_PRINT_TAB_OPT:SV_PRINT_OPT_REVERSE"; + HelpID = ".HelpID:vcl:PrintDialog:OptPage:ToReverse"; Pos = MAP_APPFONT( 10, 50 ); Size = MAP_APPFONT( 200, 12 ); Text [en-US] = "Print in ~reverse page order"; - HelpText [en-US] = "Check to print pages in reverse order."; }; }; }; diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index e5c3dc525cec..d51988d4d5d3 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -44,71 +44,6 @@ // ======================================================================= -void ImplDrawOS2Symbol( OutputDevice* pDev, const Rectangle& rRect, - USHORT nStyle, BOOL bClose ) -{ - DecorationView aView( pDev ); - const StyleSettings& rStyleSettings = pDev->GetSettings().GetStyleSettings(); - Rectangle aRect = rRect; - Color aColor1; - Color aColor2; - - pDev->SetFillColor(); - - if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) ) - { - aColor1 = rStyleSettings.GetShadowColor(); - aColor2 = rStyleSettings.GetLightColor(); - } - else - { - aColor1 = rStyleSettings.GetLightColor(); - aColor2 = rStyleSettings.GetShadowColor(); - } - aView.DrawFrame( aRect, aColor1, aColor2 ); - - aRect.Left() += 2; - aRect.Top() += 2; - aRect.Right() -= 2; - aRect.Bottom() -= 2; - - if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) ) - pDev->SetLineColor( rStyleSettings.GetLightColor() ); - else - pDev->SetLineColor( rStyleSettings.GetShadowColor() ); - if ( bClose ) - { - pDev->DrawLine( aRect.TopLeft(), Point( aRect.Left(), aRect.Bottom()-2 ) ); - pDev->DrawLine( aRect.TopLeft(), Point( aRect.Right()-2, aRect.Top() ) ); - pDev->DrawLine( Point( aRect.Left()+2, aRect.Bottom()-1 ), - Point( aRect.Right()-1, aRect.Top()+2 ) ); - } - else - { - pDev->DrawLine( aRect.TopLeft(), aRect.BottomLeft() ); - pDev->DrawLine( aRect.TopLeft(), Point( aRect.Right()-1, aRect.Top() ) ); - } - - if ( nStyle & (BUTTON_DRAW_PRESSED | BUTTON_DRAW_CHECKED) ) - pDev->SetLineColor( rStyleSettings.GetShadowColor() ); - else - pDev->SetLineColor( rStyleSettings.GetLightColor() ); - if ( bClose ) - { - pDev->DrawLine( Point( aRect.Right(), aRect.Top()+2 ), aRect.BottomRight() ); - pDev->DrawLine( Point( aRect.Left()+2, aRect.Bottom() ), aRect.BottomRight() ); - pDev->DrawLine( Point( aRect.Right()-2, aRect.Top()+1 ), - Point( aRect.Left()+1, aRect.Bottom()-2 ) ); - } - else - { - pDev->DrawLine( aRect.TopRight(), aRect.BottomRight() ); - pDev->DrawLine( Point( aRect.Left()+1, aRect.Bottom() ), aRect.BottomRight() ); - } -} - -// ======================================================================= - static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect, SymbolType eType ) { @@ -630,41 +565,6 @@ static void ImplDrawSymbol( OutputDevice* pDev, const Rectangle& rRect, pDev->DrawRect( aRect ); } break; - - case SYMBOL_OS2CLOSE: - { - Rectangle aRect( nCenterX-n2, nCenterY-n2, - nCenterX+n2, nCenterY+n2 ); - ImplDrawOS2Symbol( pDev, aRect, 0, TRUE ); - } - break; - - case SYMBOL_OS2FLOAT: - { - Rectangle aRect( nCenterX-n2+4, nCenterY-n2+4, - nCenterX+n2-4, nCenterY+n2-3 ); - ImplDrawOS2Symbol( pDev, aRect, 0, FALSE ); - DecorationView aDecoView( pDev ); - Rectangle aRect2( nCenterX-n2, nCenterY-n2, - nCenterX-n2+2, nCenterY+n2 ); - aDecoView.DrawFrame( aRect2, - pDev->GetSettings().GetStyleSettings().GetLightColor(), - pDev->GetSettings().GetStyleSettings().GetShadowColor() ); - Rectangle aRect3( nCenterX+n2-2, nCenterY-n2, - nCenterX+n2, nCenterY+n2 ); - aDecoView.DrawFrame( aRect3, - pDev->GetSettings().GetStyleSettings().GetLightColor(), - pDev->GetSettings().GetStyleSettings().GetShadowColor() ); - } - break; - - case SYMBOL_OS2HIDE: - { - Rectangle aRect( nCenterX-n2+3, nCenterY-n2+3, - nCenterX+n2-3, nCenterY+n2-3 ); - ImplDrawOS2Symbol( pDev, aRect, 0, FALSE ); - } - break; } } diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 52ad54957dd0..5909ab9f8489 100644..100755 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -96,6 +96,7 @@ DBG_NAME( Menu ) #define EXTRASPACEY 2 #define EXTRAITEMHEIGHT 4 +#define GUTTERBORDER 8 // document closer #define IID_DOCUMENTCLOSE 1 @@ -2670,14 +2671,36 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData* // Separator if ( !bLayout && !bIsMenuBar && ( pData->eType == MENUITEM_SEPARATOR ) ) { - aTmpPos.Y() = aPos.Y() + ((pData->aSz.Height()-2)/2); - aTmpPos.X() = aPos.X() + 2 + nOuterSpace; - pWin->SetLineColor( rSettings.GetShadowColor() ); - pWin->DrawLine( aTmpPos, Point( aOutSz.Width() - 3 - 2*nOuterSpace, aTmpPos.Y() ) ); - aTmpPos.Y()++; - pWin->SetLineColor( rSettings.GetLightColor() ); - pWin->DrawLine( aTmpPos, Point( aOutSz.Width() - 3 - 2*nOuterSpace, aTmpPos.Y() ) ); - pWin->SetLineColor(); + bool bNativeOk = false; + if( pWin->IsNativeControlSupported( CTRL_MENU_POPUP, + PART_MENU_SEPARATOR ) ) + { + ControlState nState = 0; + if ( pData->bEnabled ) + nState |= CTRL_STATE_ENABLED; + if ( bHighlighted ) + nState |= CTRL_STATE_SELECTED; + Size aSz( pData->aSz ); + aSz.Width() = aOutSz.Width() - 2*nOuterSpace; + Rectangle aItemRect( aPos, aSz ); + MenupopupValue aVal( nTextPos-GUTTERBORDER, aItemRect ); + bNativeOk = pWin->DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_SEPARATOR, + aItemRect, + nState, + aVal, + OUString() ); + } + if( ! bNativeOk ) + { + aTmpPos.Y() = aPos.Y() + ((pData->aSz.Height()-2)/2); + aTmpPos.X() = aPos.X() + 2 + nOuterSpace; + pWin->SetLineColor( rSettings.GetShadowColor() ); + pWin->DrawLine( aTmpPos, Point( aOutSz.Width() - 3 - 2*nOuterSpace, aTmpPos.Y() ) ); + aTmpPos.Y()++; + pWin->SetLineColor( rSettings.GetLightColor() ); + pWin->DrawLine( aTmpPos, Point( aOutSz.Width() - 3 - 2*nOuterSpace, aTmpPos.Y() ) ); + pWin->SetLineColor(); + } } Rectangle aOuterCheckRect( Point( aPos.X()+nCheckPos, aPos.Y() ), Size( pData->aSz.Height(), pData->aSz.Height() ) ); @@ -2722,10 +2745,11 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData* aTmpPos.Y() = aOuterCheckRect.Top() + (aOuterCheckRect.GetHeight() - nCtrlHeight)/2; Rectangle aCheckRect( aTmpPos, Size( nCtrlHeight, nCtrlHeight ) ); + MenupopupValue aVal( nTextPos-GUTTERBORDER, Rectangle( aPos, pData->aSz ) ); pWin->DrawNativeControl( CTRL_MENU_POPUP, nPart, aCheckRect, nState, - ImplControlValue(), + aVal, OUString() ); } else if ( pData->bChecked ) // by default do nothing for unchecked items @@ -2845,16 +2869,6 @@ void Menu::ImplPaint( Window* pWin, USHORT nBorder, long nStartY, MenuItemData* aDecoView.DrawSymbol( Rectangle( aTmpPos, Size( nFontHeight/2, nFontHeight/2 ) ), SYMBOL_SPIN_RIGHT, pWin->GetTextColor(), nSymbolStyle ); -// if ( pData->nBits & MIB_POPUPSELECT ) -// { -// aTmpPos.Y() += nFontHeight/2 ; -// pWin->SetLineColor( rSettings.GetShadowColor() ); -// pWin->DrawLine( aTmpPos, Point( aTmpPos.X() + nFontHeight/3, aTmpPos.Y() ) ); -// pWin->SetLineColor( rSettings.GetLightColor() ); -// aTmpPos.Y()++; -// pWin->DrawLine( aTmpPos, Point( aTmpPos.X() + nFontHeight/3, aTmpPos.Y() ) ); -// pWin->SetLineColor(); -// } } if ( pThisItemOnly && bHighlighted ) @@ -4724,10 +4738,11 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight ) Push( PUSH_CLIPREGION ); IntersectClipRegion( Rectangle( Point( nX, nY ), Size( aSz.Width(), pData->aSz.Height() ) ) ); Rectangle aCtrlRect( Point( nX, 0 ), Size( aPxSize.Width()-nX, aPxSize.Height() ) ); + MenupopupValue aVal( pMenu->nTextPos-GUTTERBORDER, aItemRect ); DrawNativeControl( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL, aCtrlRect, CTRL_STATE_ENABLED, - ImplControlValue(), + aVal, OUString() ); if( bHighlight && IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM ) ) @@ -4736,7 +4751,7 @@ void MenuFloatingWindow::HighlightItem( USHORT nPos, BOOL bHighlight ) if( FALSE == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM, aItemRect, CTRL_STATE_SELECTED | ( pData->bEnabled? CTRL_STATE_ENABLED: 0 ), - ImplControlValue(), + aVal, OUString() ) ) { bDrawItemRect = bHighlight; @@ -5071,10 +5086,11 @@ void MenuFloatingWindow::Paint( const Rectangle& ) long nX = pMenu->pLogo ? pMenu->pLogo->aBitmap.GetSizePixel().Width() : 0; Size aPxSize( GetOutputSizePixel() ); aPxSize.Width() -= nX; + ImplControlValue aVal( pMenu->nTextPos-GUTTERBORDER ); DrawNativeControl( CTRL_MENU_POPUP, PART_ENTIRE_CONTROL, Rectangle( Point( nX, 0 ), aPxSize ), CTRL_STATE_ENABLED, - ImplControlValue(), + aVal, OUString() ); ImplInitClipRegion(); } diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 73420e6ef8b5..574cef4e5a07 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -60,15 +60,12 @@ using namespace com::sun::star::lang; using namespace com::sun::star::container; using namespace com::sun::star::beans; -#define HELPID_PREFIX ".HelpId:vcl:PrintDialog" -#define SMHID2( a, b ) SetHelpId( rtl::OString( HELPID_PREFIX ":" a ":" b ) ) -#define SMHID1( a ) SetHelpId( rtl::OString( HELPID_PREFIX ":" a ) ) - PrintDialog::PrintPreviewWindow::PrintPreviewWindow( Window* i_pParent, const ResId& i_rId ) : Window( i_pParent, i_rId ) , maOrigSize( 10, 10 ) , maPageVDev( *this ) , maToolTipString( String( VclResId( SV_PRINT_PRINTPREVIEW_TXT ) ) ) + , mbGreyscale( false ) , maHorzDim( this, WB_HORZ | WB_CENTER ) , maVertDim( this, WB_VERT | WB_VCENTER ) { @@ -269,6 +266,11 @@ void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& ) maPageVDev.Erase(); maPageVDev.Push(); maPageVDev.SetMapMode( MAP_100TH_MM ); + ULONG nOldDrawMode = maPageVDev.GetDrawMode(); + if( mbGreyscale ) + maPageVDev.SetDrawMode( maPageVDev.GetDrawMode() | + ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT | + DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) ); aMtf.WindStart(); aMtf.Scale( fScale, fScale ); aMtf.WindStart(); @@ -278,6 +280,7 @@ void PrintDialog::PrintPreviewWindow::Paint( const Rectangle& ) SetMapMode( MAP_PIXEL ); maPageVDev.SetMapMode( MAP_PIXEL ); DrawOutDev( aOffset, maPreviewSize, Point( 0, 0 ), aVDevSize, maPageVDev ); + maPageVDev.SetDrawMode( nOldDrawMode ); DecorationView aVw( this ); Rectangle aFrame( aOffset + Point( -1, -1 ), Size( maPreviewSize.Width() + 2, maPreviewSize.Height() + 2 ) ); @@ -309,7 +312,8 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi const Size& i_rOrigSize, const rtl::OUString& i_rReplacement, sal_Int32 i_nDPIX, - sal_Int32 i_nDPIY + sal_Int32 i_nDPIY, + bool i_bGreyscale ) { rtl::OUStringBuffer aBuf( 256 ); @@ -323,6 +327,7 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi maOrigSize = i_rOrigSize; maReplacementString = i_rReplacement; + mbGreyscale = i_bGreyscale; maPageVDev.SetReferenceDevice( i_nDPIX, i_nDPIY ); maPageVDev.EnableOutput( TRUE ); @@ -469,28 +474,6 @@ PrintDialog::NUpTabPage::NUpTabPage( Window* i_pParent, const ResId& rResId ) maPageMarginEdt.SetDecimalDigits( nDigits ); maSheetMarginEdt.SetDecimalDigits( nDigits ); - SMHID1( "NUpPage" ); - maNupLine.SMHID2("NUpPage", "Layout"); - maBrochureBtn.SMHID2("NUpPage", "Brochure" ); - maPagesBtn.SMHID2( "NUpPage", "PagesPerSheet" ); - maPagesBoxTitleTxt.SMHID2( "NUpPage", "PagesPerSheetLabel" ); - maNupPagesBox.SMHID2( "NUpPage", "PagesPerSheetBox" ); - maNupNumPagesTxt.SMHID2( "NUpPage", "Columns" ); - maNupColEdt.SMHID2( "NUpPage", "ColumnsBox" ); - maNupTimesTxt.SMHID2( "NUpPage", "Rows" ); - maNupRowsEdt.SMHID2( "NUpPage", "RowsBox" ); - maPageMarginTxt1.SMHID2( "NUpPage", "PageMargin" ); - maPageMarginEdt.SMHID2( "NUpPage", "PageMarginBox" ); - maPageMarginTxt2.SMHID2( "NUpPage", "PageMarginCont" ); - maSheetMarginTxt1.SMHID2( "NUpPage", "SheetMargin" ); - maSheetMarginEdt.SMHID2( "NUpPage", "SheetMarginBox" ); - maSheetMarginTxt2.SMHID2( "NUpPage", "SheetMarginCont" ); - maNupOrientationTxt.SMHID2( "NUpPage", "Orientation" ); - maNupOrientationBox.SMHID2( "NUpPage", "OrientationBox" ); - maNupOrderTxt.SMHID2( "NUpPage", "Order" ); - maNupOrderBox.SMHID2( "NUpPage", "OrderBox" ); - maBorderCB.SMHID2( "NUpPage", "BorderBox" ); - setupLayout(); } @@ -638,24 +621,6 @@ PrintDialog::JobTabPage::JobTabPage( Window* i_pParent, const ResId& rResId ) { FreeResource(); - SMHID1( "JobPage" ); - maPrinterFL.SMHID2( "JobPage", "Printer" ); - maPrinters.SMHID2( "JobPage", "PrinterList" ); - maDetailsBtn.SMHID2( "JobPage", "DetailsBtn" ); - maStatusLabel.SMHID2( "JobPage", "StatusLabel" ); - maStatusTxt.SMHID2( "JobPage", "StatusText" ); - maLocationLabel.SMHID2( "JobPage", "LocationLabel" ); - maLocationTxt.SMHID2( "JobPage", "LocationText" ); - maCommentLabel.SMHID2( "JobPage", "CommentLabel" ); - maCommentTxt.SMHID2( "JobPage", "CommentText" ); - maSetupButton.SMHID2( "JobPage", "Properties" ); - maCopies.SMHID2( "JobPage", "CopiesLine" ); - maCopySpacer.SMHID2( "JobPage", "CopySpacer" ); - maCopyCount.SMHID2( "JobPage", "CopiesText" ); - maCopyCountField.SMHID2( "JobPage", "Copies" ); - maCollateBox.SMHID2( "JobPage", "Collate" ); - maCollateImage.SMHID2( "JobPage", "CollateImage" ); - maCopySpacer.Show(); maStatusTxt.Show(); maCommentTxt.Show(); @@ -779,11 +744,6 @@ PrintDialog::OutputOptPage::OutputOptPage( Window* i_pParent, const ResId& i_rRe , maReverseOrderBox( this, VclResId( SV_PRINT_OPT_REVERSE ) ) { FreeResource(); - SMHID1( "OptPage" ); - maOptionsLine.SMHID2( "OptPage", "Options" ); - maToFileBox.SMHID2( "OptPage", "ToFile" ); - maCollateSingleJobsBox.SMHID2( "OptPage", "SingleJobs" ); - maReverseOrderBox.SMHID2( "OptPage", "Reverse" ); setupLayout(); } @@ -875,9 +835,6 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont // init reverse print maOptionsPage.maReverseOrderBox.Check( maPController->getReversePrint() ); - // get the first page - preparePreview( true, true ); - // fill printer listbox const std::vector< rtl::OUString >& rQueues( Printer::GetPrinterQueues() ); for( std::vector< rtl::OUString >::const_iterator it = rQueues.begin(); @@ -908,6 +865,12 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont maPController->setPrinter( boost::shared_ptr<Printer>( new Printer( Printer::GetDefaultPrinterName() ) ) ); } } + // not printing to file + maPController->resetPrinterOptions( false ); + + // get the first page + preparePreview( true, true ); + // update the text fields for the printer updatePrinterText(); @@ -995,18 +958,6 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont } } - // set HelpIDs - SMHID1( "Dialog" ); - maOKButton.SMHID1( "OK" ); - maCancelButton.SMHID1( "Cancel" ); - maHelpButton.SMHID1( "Help" ); - maPreviewWindow.SMHID1( "Preview" ); - maNumPagesText.SMHID1( "NumPagesText" ); - maPageEdit.SMHID1( "PageEdit" ); - maForwardBtn.SMHID1( "ForwardBtn" ); - maBackwardBtn.SMHID1( "BackwardBtn" ); - maTabCtrl.SMHID1( "TabPages" ); - // append further tab pages if( mbShowLayoutPage ) { @@ -1104,6 +1055,11 @@ void PrintDialog::readFromSettings() } } maOKButton.SetText( maOptionsPage.maToFileBox.IsChecked() ? maPrintToFileText : maPrintText ); + if( maOptionsPage.maToFileBox.IsChecked() ) + { + maPController->resetPrinterOptions( true ); + preparePreview( true, true ); + } } void PrintDialog::storeToSettings() @@ -1144,39 +1100,18 @@ bool PrintDialog::isSingleJobs() return maOptionsPage.maCollateSingleJobsBox.IsChecked(); } -static void setSmartId( Window* i_pWindow, const char* i_pType, sal_Int32 i_nId = -1, const rtl::OUString& i_rPropName = rtl::OUString() ) +void setHelpId( Window* i_pWindow, const Sequence< rtl::OUString >& i_rHelpIds, sal_Int32 i_nIndex ) { - rtl::OStringBuffer aBuf( 256 ); - aBuf.append( HELPID_PREFIX ); - if( i_rPropName.getLength() ) - { - aBuf.append( ':' ); - aBuf.append( rtl::OUStringToOString( i_rPropName, RTL_TEXTENCODING_UTF8 ) ); - } - if( i_pType ) - { - aBuf.append( ':' ); - aBuf.append( i_pType ); - } - if( i_nId >= 0 ) - { - aBuf.append( ':' ); - aBuf.append( i_nId ); - } - i_pWindow->SetHelpId( aBuf.makeStringAndClear() ); + if( i_nIndex >= 0 && i_nIndex < i_rHelpIds.getLength() ) + i_pWindow->SetHelpId( rtl::OUStringToOString( i_rHelpIds.getConstArray()[i_nIndex], RTL_TEXTENCODING_UTF8 ) ); } -static void setHelpText( Window* /*i_pWindow*/, const Sequence< rtl::OUString >& /*i_rHelpTexts*/, sal_Int32 /*i_nIndex*/ ) +static void setHelpText( Window* i_pWindow, const Sequence< rtl::OUString >& i_rHelpTexts, sal_Int32 i_nIndex ) { // without a help text set and the correct smartID, // help texts will be retrieved from the online help system - - // passed help texts for optional UI is used only for native dialogs which currently - // cannot access the same (rather implicit) mechanism - #if 0 if( i_nIndex >= 0 && i_nIndex < i_rHelpTexts.getLength() ) i_pWindow->SetHelpText( i_rHelpTexts.getConstArray()[i_nIndex] ); - #endif } void updateMaxSize( const Size& i_rCheckSize, Size& o_rMaxSize ) @@ -1213,6 +1148,7 @@ void PrintDialog::setupOptionalUI() Sequence< rtl::OUString > aChoices; Sequence< sal_Bool > aChoicesDisabled; Sequence< rtl::OUString > aHelpTexts; + Sequence< rtl::OUString > aHelpIds; sal_Int64 nMinValue = 0, nMaxValue = 0; sal_Int32 nCurHelpText = 0; rtl::OUString aGroupingHint; @@ -1287,6 +1223,18 @@ void PrintDialog::setupOptionalUI() } } } + else if( rEntry.Name.equalsAscii( "HelpId" ) ) + { + if( ! (rEntry.Value >>= aHelpIds ) ) + { + rtl::OUString aHelpId; + if( (rEntry.Value >>= aHelpId) ) + { + aHelpIds.realloc( 1 ); + *aHelpIds.getArray() = aHelpId; + } + } + } else if( rEntry.Name.equalsAscii( "HintNoLayoutPage" ) ) { sal_Bool bNoLayoutPage = sal_False; @@ -1359,7 +1307,7 @@ void PrintDialog::setupOptionalUI() maTabCtrl.SetTabPage( nOptPageId, pNewGroup ); // set help id - setSmartId( pNewGroup, "TabPage", nOptPageId ); + setHelpId( pNewGroup, aHelpIds, 0 ); // set help text setHelpText( pNewGroup, aHelpTexts, 0 ); @@ -1390,7 +1338,7 @@ void PrintDialog::setupOptionalUI() pNewSub->Show(); // set help id - setSmartId( pNewSub, "FixedLine", sal_Int32( nCurSubGroup++ ) ); + setHelpId( pNewSub, aHelpIds, 0 ); // set help text setHelpText( pNewSub, aHelpTexts, 0 ); // add group to current column @@ -1470,7 +1418,7 @@ void PrintDialog::setupOptionalUI() maControlToPropertyMap[pNewBox] = aPropertyName; // set help id - setSmartId( pNewBox, "CheckBox", -1, aPropertyName ); + setHelpId( pNewBox, aHelpIds, 0 ); // set help text setHelpText( pNewBox, aHelpTexts, 0 ); @@ -1493,9 +1441,10 @@ void PrintDialog::setupOptionalUI() pHeading->Show(); // set help id - setSmartId( pHeading, "FixedText", -1, aPropertyName ); + setHelpId( pHeading, aHelpIds, nCurHelpText ); // set help text - setHelpText( pHeading, aHelpTexts, nCurHelpText++ ); + setHelpText( pHeading, aHelpTexts, nCurHelpText ); + nCurHelpText++; // add fixed text to current column pCurColumn->addWindow( pHeading ); // add an indent to the current column @@ -1531,9 +1480,10 @@ void PrintDialog::setupOptionalUI() maControlToNumValMap[pBtn] = m; // set help id - setSmartId( pBtn, "RadioButton", m, aPropertyName ); + setHelpId( pBtn, aHelpIds, nCurHelpText ); // set help text - setHelpText( pBtn, aHelpTexts, nCurHelpText++ ); + setHelpText( pBtn, aHelpTexts, nCurHelpText ); + nCurHelpText++; // add the radio button to the column pLabel->setLabel( pBtn ); } @@ -1557,9 +1507,6 @@ void PrintDialog::setupOptionalUI() pHeading->SetText( aText ); pHeading->Show(); - // set help id - setSmartId( pHeading, "FixedText", -1, aPropertyName ); - // add to row pLabel = new vcl::LabeledElement( pFieldColumn.get(), 2 ); pFieldColumn->addChild( pLabel ); @@ -1586,7 +1533,7 @@ void PrintDialog::setupOptionalUI() pList->Show(); // set help id - setSmartId( pList, "ListBox", -1, aPropertyName ); + setHelpId( pList, aHelpIds, 0 ); // set help text setHelpText( pList, aHelpTexts, 0 ); @@ -1619,7 +1566,7 @@ void PrintDialog::setupOptionalUI() pField->Show(); // set help id - setSmartId( pField, "NumericField", -1, aPropertyName ); + setHelpId( pField, aHelpIds, 0 ); // set help text setHelpText( pField, aHelpTexts, 0 ); @@ -1646,7 +1593,7 @@ void PrintDialog::setupOptionalUI() pField->Show(); // set help id - setSmartId( pField, "Edit", -1, aPropertyName ); + setHelpId( pField, aHelpIds, 0 ); // set help text setHelpText( pField, aHelpTexts, 0 ); @@ -1936,7 +1883,8 @@ void PrintDialog::preparePreview( bool i_bNewPage, bool i_bMayUseCache ) Size aCurPageSize = aPrt->PixelToLogic( aPrt->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ); maPreviewWindow.setPreview( aMtf, aCurPageSize, nPages > 0 ? rtl::OUString() : maNoPageStr, - aPrt->ImplGetDPIX(), aPrt->ImplGetDPIY() + aPrt->ImplGetDPIX(), aPrt->ImplGetDPIY(), + aPrt->GetPrinterOptions().IsConvertToGreyscales() ); maForwardBtn.Enable( mnCurPage < nPages-1 ); @@ -2127,6 +2075,7 @@ IMPL_LINK( PrintDialog, SelectHdl, ListBox*, pBox ) String aNewPrinter( pBox->GetSelectEntry() ); // set new printer maPController->setPrinter( boost::shared_ptr<Printer>( new Printer( aNewPrinter ) ) ); + maPController->resetPrinterOptions( maOptionsPage.maToFileBox.IsChecked() ); // update text fields updatePrinterText(); } @@ -2157,8 +2106,7 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton ) Help* pHelp = Application::GetHelp(); if( pHelp ) { - // FIXME: find out proper help URL and use here - pHelp->Start( rtl::OStringToOUString( GetHelpId(), RTL_TEXTENCODING_UTF8 ), GetParent() ); + pHelp->Start( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:OK" ) ), &maOKButton ); } } else if( pButton == &maForwardBtn ) @@ -2172,7 +2120,9 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton ) else if( pButton == &maOptionsPage.maToFileBox ) { maOKButton.SetText( maOptionsPage.maToFileBox.IsChecked() ? maPrintToFileText : maPrintText ); + maPController->resetPrinterOptions( maOptionsPage.maToFileBox.IsChecked() ); getLayout()->resize(); + preparePreview( true, true ); } else if( pButton == &maNUpPage.maBrochureBtn ) { diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index f6bedc1bfa25..0762a07476e2 100755..100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -35,7 +35,6 @@ #include "vcl/salinst.hxx" #include "vcl/salgtype.hxx" #include "vcl/salgdi.hxx" -#include "vcl/salctrlhandle.hxx" #include "vcl/unohelp.hxx" #include "tools/time.hxx" @@ -44,7 +43,6 @@ #include "tools/rc.h" #endif #include "vcl/svdata.hxx" -#include "vcl/windata.hxx" #include "vcl/dbggui.hxx" #include "vcl/outfont.hxx" #include "vcl/outdev.h" @@ -68,6 +66,7 @@ #include "unotools/fontcfg.hxx" #include "vcl/sysdata.hxx" #include "vcl/sallayout.hxx" +#include "vcl/salctype.hxx" #include "vcl/button.hxx" // Button::GetStandardText #include "vcl/taskpanelist.hxx" #include "com/sun/star/awt/XWindowPeer.hpp" @@ -90,7 +89,6 @@ #include "vcl/unowrap.hxx" #include "vcl/dndlcon.hxx" #include "vcl/dndevdis.hxx" -#include "vcl/impbmpconv.hxx" #include "unotools/confignode.hxx" #include "vcl/gdimtf.hxx" @@ -270,19 +268,41 @@ bool Window::ImplCheckUIFont( const Font& rFont ) if( ImplGetSVData()->maGDIData.mbNativeFontConfig ) return true; + // create a text string using the localized text of important buttons String aTestText; - aTestText.Append( Button::GetStandardText( BUTTON_OK ) ); - aTestText.Append( Button::GetStandardText( BUTTON_CANCEL ) ); - aTestText.Append( Button::GetStandardText( BUTTON_YES ) ); - aTestText.Append( Button::GetStandardText( BUTTON_NO ) ); - aTestText.Append( Button::GetStandardText( BUTTON_RETRY ) ); - aTestText.Append( Button::GetStandardText( BUTTON_HELP ) ); - aTestText.Append( Button::GetStandardText( BUTTON_CLOSE ) ); - aTestText.Append( Button::GetStandardText( BUTTON_MORE ) ); - aTestText.Append( Button::GetStandardText( BUTTON_LESS ) ); - aTestText.Append( Button::GetStandardText( BUTTON_ABORT ) ); + static const StandardButtonType aTestButtons[] = + { + BUTTON_OK, BUTTON_CANCEL, BUTTON_CLOSE, BUTTON_ABORT, + BUTTON_YES, BUTTON_NO, BUTTON_MORE, BUTTON_IGNORE, + BUTTON_RETRY, BUTTON_HELP + }; + + const int nTestButtonCount = sizeof(aTestButtons)/sizeof(*aTestButtons); + for( int n = 0; n < nTestButtonCount; ++n ) + { + String aButtonStr = Button::GetStandardText( aTestButtons[n] ); + // #i115432# ignore mnemonic+accelerator part of each string + // TODO: use a string filtering method when it becomes available + const int nLen = aButtonStr.Len(); + bool bInside = false; + for( int i = 0; i < nLen; ++i ) { + const sal_Unicode c = aButtonStr.GetChar( i ); + if( (c == '(')) + bInside = true; + if( (c == ')')) + bInside = false; + if( (c == '~') + || (c == '(') || (c == ')') + || ((c >= 'A') && (c <= 'Z') && bInside) ) + aButtonStr.SetChar( i, ' ' ); + } + // append sanitized button text to test string + aTestText.Append( aButtonStr ); + } - return HasGlyphs( rFont, aTestText ) >= aTestText.Len(); + const int nFirstChar = HasGlyphs( rFont, aTestText ); + const bool bUIFontOk = (nFirstChar >= aTestText.Len()); + return bUIFontOk; } // ----------------------------------------------------------------------- @@ -4786,6 +4806,13 @@ void Window::doLazyDelete() } // ----------------------------------------------------------------------- +void Window::InterceptChildWindowKeyDown( sal_Bool bIntercept ) +{ + if( mpWindowImpl->mpSysObj ) + mpWindowImpl->mpSysObj->InterceptChildWindowKeyDown( bIntercept ); +} + +// ----------------------------------------------------------------------- void Window::MouseMove( const MouseEvent& rMEvt ) { @@ -9709,11 +9736,14 @@ Reference< rendering::XCanvas > Window::ImplGetCanvas( const Size& rFullscreenSi // ========================================= if ( xFactory.is() ) { - static Reference<lang::XMultiServiceFactory> xCanvasFactory( - xFactory->createInstance( - OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star." - "rendering.CanvasFactory") ) ), UNO_QUERY ); + static ::vcl::DeleteUnoReferenceOnDeinit<XMultiServiceFactory> xStaticCanvasFactory( + Reference<XMultiServiceFactory>( + xFactory->createInstance( + OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.rendering.CanvasFactory") ) ), + UNO_QUERY )); + uno::Reference<XMultiServiceFactory> xCanvasFactory(xStaticCanvasFactory.get()); + if(xCanvasFactory.is()) { #ifdef WNT diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index c964ad0d739b..2fce7e52f24c 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -42,7 +42,6 @@ #include <unotools/localedatawrapper.hxx> #include <vcl/svdata.hxx> #include <vcl/dbggui.hxx> -#include <vcl/windata.hxx> #include <vcl/timer.hxx> #include <vcl/event.hxx> #include <vcl/sound.hxx> diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 318f593ac6a3..ff615f5ede74 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -737,7 +737,7 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType, { BOOL returnVal = FALSE; // get a GC with current clipping region set - SelectFont(); + GetFontGC(); // theme changed ? @@ -3687,7 +3687,8 @@ GdkPixmap* GtkSalGraphics::NWGetPixmapFromScreen( Rectangle srcRect ) BOOL GtkSalGraphics::NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect ) { // The GC can't be null, otherwise we'd have no clip region - if( SelectFont() == NULL ) + GC aFontGC = GetFontGC(); + if( aFontGC == NULL ) { std::fprintf(stderr, "salnativewidgets.cxx: no valid GC\n" ); return( FALSE ); @@ -3702,7 +3703,7 @@ BOOL GtkSalGraphics::NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRe gdk_screen_get_number( gdk_drawable_get_screen( GDK_DRAWABLE(pPixmap) ) ), gdk_drawable_get_depth( GDK_DRAWABLE(pPixmap) ), GetDrawable(), m_nScreen, GetVisual().GetDepth(), - SelectFont(), + aFontGC, 0, 0, dstRect.GetWidth(), dstRect.GetHeight(), dstRect.Left(), dstRect.Top() ); return( TRUE ); diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index d04d5c0ce684..9181ee3fd40d 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -3339,7 +3339,9 @@ void GtkSalFrame::IMHandler::updateIMSpotLocation() aArea.y = aPosEvent.mnY; aArea.width = aPosEvent.mnWidth; aArea.height = aPosEvent.mnHeight; + m_pFrame->getDisplay()->GetXLib()->PushXErrorLevel( true ); gtk_im_context_set_cursor_location( m_pIMContext, &aArea ); + m_pFrame->getDisplay()->GetXLib()->PopXErrorLevel(); } void GtkSalFrame::IMHandler::setInputContext( SalInputContext* ) diff --git a/vcl/unx/gtk/window/gtkobject.cxx b/vcl/unx/gtk/window/gtkobject.cxx index 2a2bbe78078a..c5f5a168f653 100644 --- a/vcl/unx/gtk/window/gtkobject.cxx +++ b/vcl/unx/gtk/window/gtkobject.cxx @@ -209,3 +209,8 @@ void GtkSalObject::signalDestroy( GtkObject* pObj, gpointer object ) pThis->m_pSocket = NULL; } } + +void GtkSalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ ) +{ +} + diff --git a/vcl/unx/headless/svpdummies.cxx b/vcl/unx/headless/svpdummies.cxx index 5983ff18c34f..0a67b147804a 100644 --- a/vcl/unx/headless/svpdummies.cxx +++ b/vcl/unx/headless/svpdummies.cxx @@ -61,6 +61,7 @@ void SvpSalObject::GrabFocus() {} void SvpSalObject::SetBackground() {} void SvpSalObject::SetBackground( SalColor ) {} const SystemEnvData* SvpSalObject::GetSystemData() const { return &m_aSystemChildData; } +void SvpSalObject::InterceptChildWindowKeyDown( sal_Bool ) {} // SalI18NImeStatus SvpImeStatus::~SvpImeStatus() {} diff --git a/vcl/unx/headless/svpdummies.hxx b/vcl/unx/headless/svpdummies.hxx index febf7eef6bbe..ea7667ce51ca 100644 --- a/vcl/unx/headless/svpdummies.hxx +++ b/vcl/unx/headless/svpdummies.hxx @@ -58,6 +58,8 @@ public: virtual void SetBackground( SalColor nSalColor ); virtual const SystemEnvData* GetSystemData() const; + + virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); }; class SvpImeStatus : public SalI18NImeStatus diff --git a/vcl/unx/headless/svpinst.cxx b/vcl/unx/headless/svpinst.cxx index fc788b2a0530..09e359ca3f71 100644 --- a/vcl/unx/headless/svpinst.cxx +++ b/vcl/unx/headless/svpinst.cxx @@ -38,7 +38,7 @@ #include <vcl/salframe.hxx> #include <vcl/svdata.hxx> -#include <vcl/salatype.hxx> +#include <vcl/apptypes.hxx> #include <vcl/saldatabasic.hxx> #include <sal/types.h> diff --git a/vcl/unx/inc/i18n_im.hxx b/vcl/unx/inc/i18n_im.hxx index 297bc8edec17..a22a57b976c8 100644 --- a/vcl/unx/inc/i18n_im.hxx +++ b/vcl/unx/inc/i18n_im.hxx @@ -56,10 +56,6 @@ public: Bool FilterEvent( XEvent *pEvent, XLIB_Window window ); Bool AddConnectionWatch (Display *pDisplay, void *pConnectionHandler); - #ifdef _USE_PRINT_EXTENSION_ - void Invalidate() { mbUseable = False; } - #endif - SalI18N_InputMethod(); ~SalI18N_InputMethod(); }; diff --git a/vcl/unx/inc/plugins/gtk/gtkobject.hxx b/vcl/unx/inc/plugins/gtk/gtkobject.hxx index ea740249f1c6..9d3f235b8894 100644 --- a/vcl/unx/inc/plugins/gtk/gtkobject.hxx +++ b/vcl/unx/inc/plugins/gtk/gtkobject.hxx @@ -64,6 +64,7 @@ public: virtual const SystemEnvData* GetSystemData() const; + virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); }; #endif // _SV_SALOBJ_H diff --git a/vcl/unx/inc/saldisp.hxx b/vcl/unx/inc/saldisp.hxx index 99c9bea699d6..89efad3cde4d 100644 --- a/vcl/unx/inc/saldisp.hxx +++ b/vcl/unx/inc/saldisp.hxx @@ -269,15 +269,10 @@ public: class SalI18N_InputMethod; class SalI18N_KeyboardExtension; -class XlfdStorage; -class ExtendedFontStruct; -class ExtendedXlfd; class AttributeProvider; class SalUnicodeConverter; class SalConverterCache; -DECLARE_LIST( SalFontCache, ExtendedFontStruct* ) - extern "C" { struct SnDisplay; struct SnLauncheeContext; @@ -349,8 +344,6 @@ protected: SalI18N_KeyboardExtension *mpKbdExtension; AttributeProvider *mpFactory; - XlfdStorage *mpFontList; - const ExtendedXlfd *mpFallbackFactory; Display *pDisp_; // X Display int m_nDefaultScreen; // XDefaultScreen @@ -374,8 +367,6 @@ protected: XLIB_Cursor aPointerCache_[POINTER_COUNT]; SalFrame* m_pCapture; - mutable SalFontCache* m_pFontCache; - // Keyboard BOOL bNumLockFromXS_; // Num Lock handled by X Server int nNumLockIndex_; // modifier index in modmap @@ -397,7 +388,6 @@ protected: mutable XLIB_Time m_nLastUserEventTime; // mutable because changed on first access - void DestroyFontCache(); virtual long Dispatch( XEvent *pEvent ) = 0; void InitXinerama(); void InitRandR( XLIB_Window aRoot ) const; @@ -434,14 +424,6 @@ public: void PrintEvent( const ByteString &rComment, XEvent *pEvent ) const; - XlfdStorage* GetXlfdList() const; - ExtendedFontStruct* - GetFont( const ExtendedXlfd *pFont, - const Size& rPixelSize, sal_Bool bVertical ) const; - const ExtendedXlfd* - GetFallbackFactory() - { return mpFallbackFactory; } - void Beep() const; void ModifierMapping(); diff --git a/vcl/unx/inc/salgdi.h b/vcl/unx/inc/salgdi.h index b5fdce50eee9..8af62a5c6607 100644 --- a/vcl/unx/inc/salgdi.h +++ b/vcl/unx/inc/salgdi.h @@ -28,18 +28,15 @@ #ifndef _SV_SALGDI_H #define _SV_SALGDI_H - -// -=-= exports -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -class SalFontCacheItem; - // -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #include "salstd.hxx" #include "vcl/salgdi.hxx" #include "vcl/salgtype.hxx" #include "tools/fract.hxx" #include "vcl/dllapi.h" +#include <vcl/vclenum.hxx> +#include <vcl/sallayout.hxx> #include <deque> -#include "xfont.hxx" // -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= struct ImplFontMetricData; @@ -100,7 +97,6 @@ protected: Pixel nPenPixel_; GC pFontGC_; // Font attributes - ExtendedFontStructRef mXFont[ MAX_FALLBACK ]; ServerFont* mpServerFont[ MAX_FALLBACK ]; SalColor nTextColor_; @@ -185,7 +181,7 @@ protected: const SalBitmap &rTransparentBitmap, SalColor nTransparentColor ); - GC SelectFont(); + GC GetFontGC(); bool setFont( const ImplFontSelectData* pEntry, int nFallbackLevel ); void drawMaskedBitmap( const SalTwoRect* pPosAry, @@ -193,9 +189,6 @@ protected: const SalBitmap& rTransparentBitmap ); protected: - void DrawStringUCS2MB( ExtendedFontStruct& rFont, const Point&, - const sal_Unicode* pStr, int nLength ); - void DrawPrinterString( const SalLayout& ); void DrawServerFontString( const ServerFontLayout& ); @@ -386,19 +379,8 @@ inline Pixel X11SalGraphics::GetPixel( SalColor nSalColor ) const #ifdef DBG_UTIL #define stderr0( s ) fprintf( stderr, s ) -#define stderr1( s, a ) fprintf( stderr, s, a ) -#define stderr2( s, a, b ) fprintf( stderr, s, a, b ) -#define stderr3( s, a, b, c ) fprintf( stderr, s, a, b, c ) -#define stdass0( b ) (void)( !(b) \ - ? fprintf( stderr, "\"%s\" (%s line %d)\n", \ - #b, __FILE__, __LINE__ ) \ - : 0 ) #else #define stderr0( s ) ; -#define stderr1( s, a ) ; -#define stderr2( s, a, b ) ; -#define stderr3( s, a, b, c ) ; -#define stdass0( b ) ; #endif #endif // _SV_SALGDI_H diff --git a/vcl/unx/inc/salobj.h b/vcl/unx/inc/salobj.h index fa9f1309c8ca..d7d9334f281b 100644 --- a/vcl/unx/inc/salobj.h +++ b/vcl/unx/inc/salobj.h @@ -98,6 +98,7 @@ public: virtual const SystemEnvData* GetSystemData() const; + virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); }; #endif // _SV_SALOBJ_H diff --git a/vcl/unx/inc/xfont.hxx b/vcl/unx/inc/xfont.hxx deleted file mode 100644 index 4041ed7ce67d..000000000000 --- a/vcl/unx/inc/xfont.hxx +++ /dev/null @@ -1,162 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef EXTENDED_FONTSTRUCT_HXX -#define EXTENDED_FONTSTRUCT_HXX - -#ifndef _XLIB_H_ -#include <tools/prex.h> -#include <X11/Xlib.h> -#include <tools/postx.h> -#endif -#include <tools/ref.hxx> -#include <rtl/tencinfo.h> -#include <vcl/vclenum.hxx> -#include <vcl/sallayout.hxx> - -typedef unsigned short sal_MultiByte; - -class ImplFontMetricData; -class ExtendedXlfd; - -struct VerticalTextItem -{ - BOOL mbFixed; - XFontStruct* mpXFontStruct; - const sal_Unicode* mpString; - int mnLength; - int mnTransX; - int mnTransY; - int mnFixedAdvance; - int* mpAdvanceAry; - - VerticalTextItem( XFontStruct* pXFontStruct, - const sal_Unicode* pString, - int nLength, - int nTransX, - int nTransY, - int nFixedAdvance ) - : mbFixed( TRUE ), - mpXFontStruct( pXFontStruct ), - mpString( pString ), - mnLength( nLength ), - mnTransX( nTransX ), - mnTransY( nTransY ), - mnFixedAdvance( nFixedAdvance ) - {} - - VerticalTextItem( XFontStruct* pXFontStruct, - const sal_Unicode* pString, - int nLength, - int nTransX, - int nTransY, - int* pAdvanceAry ) - : mbFixed( FALSE ), - mpXFontStruct( pXFontStruct ), - mpString( pString ), - mnLength( nLength ), - mnTransX( nTransX ), - mnTransY( nTransY ), - mpAdvanceAry( pAdvanceAry ) - {} - - ~VerticalTextItem() - { - if (!mbFixed) - { - delete( mpAdvanceAry ); - } - } -}; - -class ExtendedFontStruct : public SvRefBase -{ - private: - Display* mpDisplay; - Size maPixelSize; - float mfXScale; - float mfYScale; - sal_Size mnDefaultWidth; - sal_Bool mbVertical; - rtl_TextEncoding mnCachedEncoding; - rtl_TextEncoding mnAsciiEncoding; - - ExtendedXlfd* mpXlfd; - XFontStruct** mpXFontStruct; - - // unicode range cache - mutable sal_uInt32* mpRangeCodes; - mutable int mnRangeCount; - - int LoadEncoding( rtl_TextEncoding nEncoding ); - FontPitch GetSpacing( rtl_TextEncoding nEncoding ); - bool GetFontBoundingBox( XCharStruct *pCharStruct, - int *pAscent, int *pDescent ) ; - - sal_Size GetDefaultWidth(); - sal_Size GetCharWidth8( sal_Unicode nFrom, sal_Unicode nTo, - sal_Int32 *pWidthArray, - rtl_TextEncoding nEncoding ); - sal_Size GetCharWidthUTF16( sal_Unicode nFrom, sal_Unicode nTo, - sal_Int32 *pWidthArray ); - sal_Size GetCharWidth16( sal_Unicode nFrom, sal_Unicode nTo, - sal_Int32 *pWidthArray, ExtendedFontStruct *pFallback ); - public: - ExtendedFontStruct( Display* pDisplay, - const Size& rPixelSize, sal_Bool bVertical, - ExtendedXlfd* pXlfd ); - ~ExtendedFontStruct(); - bool Match( const ExtendedXlfd *pXlfd, - const Size& rPixelSize, sal_Bool bVertical ) const; - XFontStruct* GetFontStruct( rtl_TextEncoding nEncoding ); - XFontStruct* GetFontStruct( sal_Unicode nChar, - rtl_TextEncoding *pEncoding ); - bool ToImplFontMetricData( ImplFontMetricData *pMetric ); - rtl_TextEncoding GetAsciiEncoding( int *pAsciiRange = NULL ) const; - sal_Size GetCharWidth( sal_Unicode, - sal_Int32* pPhysWidth, sal_Int32* pLogWidth ); - int GetFontCodeRanges( sal_uInt32* pCodePairs ) const; - bool HasUnicodeChar( sal_Unicode ) const; -}; - -// Declaration and Implementation for ExtendedFontStructRef: Add RefCounting -// to ExtendedFontStruct (it's not possible to separate decl and impl into -// a separate source file: all ref member functions are inline -SV_DECL_IMPL_REF( ExtendedFontStruct ); - -class X11FontLayout : public GenericSalLayout -{ -public: - X11FontLayout( ExtendedFontStruct& ); - virtual bool LayoutText( ImplLayoutArgs& ); - virtual void AdjustLayout( ImplLayoutArgs& ); - virtual void DrawText( SalGraphics& ) const; - -private: - ExtendedFontStruct& mrFont; -}; - -#endif /* EXTENDED_FONTSTRUCT_HXX */ diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index 2c04af384c51..5a5cd11c52d9 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -556,7 +556,7 @@ BOOL KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, if (returnVal) { - GC gc = SelectFont(); + GC gc = GetFontGC(); if( gc ) { diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx index 354c4d433d42..92d5f75f7315 100644 --- a/vcl/unx/source/app/saldisp.cxx +++ b/vcl/unx/source/app/saldisp.cxx @@ -375,11 +375,6 @@ sal_GetServerVendor( Display *p_display ) { vendor_none, NULL, 0 }, }; -#ifdef _USE_PRINT_EXTENSION_ - if ( ! XSalIsDisplay( p_display ) ) - return vendor_xprinter; -#endif - // handle regular server vendors char *p_name = ServerVendor( p_display ); vendor_t *p_vendor; @@ -508,7 +503,6 @@ BOOL SalDisplay::BestVisual( Display *pDisplay, SalDisplay::SalDisplay( Display *display ) : mpInputMethod( NULL ), - mpFallbackFactory ( NULL ), pDisp_( display ), m_pWMAdaptor( NULL ), m_pDtIntegrator( NULL ), @@ -557,7 +551,6 @@ void SalDisplay::doDestruct() m_pDtIntegrator = NULL; X11SalBitmap::ImplDestroyCache(); X11SalGraphics::releaseGlyphPeer(); - DestroyFontCache(); if( IsDisplay() ) { @@ -814,8 +807,6 @@ void SalDisplay::Init() eWindowManager_ = otherwm; nProperties_ = PROPERTY_DEFAULT; hEventGuard_ = NULL; - m_pFontCache = NULL; - mpFontList = (XlfdStorage*)NULL; mpFactory = (AttributeProvider*)NULL; m_pCapture = NULL; m_bXinerama = false; @@ -2575,6 +2566,7 @@ void SalDisplay::PrintInfo() const fprintf( stderr, "\tProperties \t0x%lX\n", GetProperties() ); if( eWindowManager_ != otherwm ) fprintf( stderr, "\tWindowmanager \t%d\n", eWindowManager_ ); + fprintf( stderr, "\tWMName \t%s\n", rtl::OUStringToOString( getWMAdaptor()->getWindowManagerName(), osl_getThreadTextEncoding() ).getStr() ); } fprintf( stderr, "Screen\n" ); fprintf( stderr, "\tResolution/Size \t%ld*%ld %ld*%ld %.1lf\"\n", diff --git a/vcl/unx/source/app/salinst.cxx b/vcl/unx/source/app/salinst.cxx index 88af0b70ef7e..f125d5f98fa6 100644 --- a/vcl/unx/source/app/salinst.cxx +++ b/vcl/unx/source/app/salinst.cxx @@ -45,7 +45,7 @@ #include "sm.hxx" #include "vcl/salwtype.hxx" -#include "vcl/salatype.hxx" +#include "vcl/apptypes.hxx" #include "vcl/helper.hxx" #include <tools/solarmutex.hxx> #include "vos/mutex.hxx" diff --git a/vcl/unx/source/gdi/makefile.mk b/vcl/unx/source/gdi/makefile.mk index 536aadcac015..123fcbcf9131 100644 --- a/vcl/unx/source/gdi/makefile.mk +++ b/vcl/unx/source/gdi/makefile.mk @@ -53,29 +53,19 @@ SLOFILES= \ $(SLO)$/salvd.obj \ $(SLO)$/dtint.obj \ $(SLO)$/salcvt.obj \ - $(SLO)$/xfont.obj \ - $(SLO)$/xlfd_attr.obj \ - $(SLO)$/xlfd_extd.obj \ - $(SLO)$/xlfd_smpl.obj \ $(SLO)$/salgdi3.obj \ $(SLO)$/gcach_xpeer.obj \ $(SLO)$/xrender_peer.obj \ $(SLO)$/pspgraphics.obj EXCEPTIONSFILES=\ - $(SLO)$/xlfd_extd.obj \ $(SLO)$/salgdi.obj \ $(SLO)$/salbmp.obj \ $(SLO)$/salgdi3.obj \ $(SLO)$/salcvt.obj -.IF "$(USE_XPRINT)" == "TRUE" -CFLAGS+=-D_USE_PRINT_EXTENSION_=1 -SLOFILES+=$(SLO)$/xprintext.obj -.ELSE SLOFILES+=$(SLO)$/salprnpsp.obj EXCEPTIONSFILES+=$(SLO)$/salprnpsp.obj -.ENDIF .IF "$(OS)"=="SOLARIS" SLOFILES+=$(SLO)$/cdeint.obj diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx index 9215f2e25b16..9dfbfff22d03 100644 --- a/vcl/unx/source/gdi/salgdi.cxx +++ b/vcl/unx/source/gdi/salgdi.cxx @@ -113,10 +113,7 @@ X11SalGraphics::X11SalGraphics() pFontGC_ = NULL; for( int i = 0; i < MAX_FALLBACK; ++i ) - { - mXFont[i] = NULL; mpServerFont[i] = NULL; - } nTextPixel_ = 0; nTextColor_ = MAKE_SALCOLOR( 0x00, 0x00, 0x00 ); // Black @@ -338,13 +335,8 @@ GC X11SalGraphics::SelectBrush() { XSetFillStyle ( pDisplay, pBrushGC_, FillSolid ); XSetForeground( pDisplay, pBrushGC_, nBrushPixel_ ); - #if defined(_USE_PRINT_EXTENSION_) - XSetBackground( pDisplay, pBrushGC_, - WhitePixel(pDisplay, DefaultScreen(pDisplay)) ); - #else if( bPrinter_ ) XSetTile( pDisplay, pBrushGC_, None ); - #endif } else { @@ -757,6 +749,7 @@ void X11SalGraphics::SetXORMode( bool bSet, bool ) { bXORMode_ = bSet; bPenGC_ = FALSE; + bFontGC_ = FALSE; bBrushGC_ = FALSE; bMonoGC_ = FALSE; bCopyGC_ = FALSE; diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx index 62e575ebc5ef..d9f81c0f67d2 100644 --- a/vcl/unx/source/gdi/salgdi3.cxx +++ b/vcl/unx/source/gdi/salgdi3.cxx @@ -46,11 +46,7 @@ #include "salgdi.h" #include "pspgraphics.h" #include "salvd.h" -#include "xfont.hxx" #include <vcl/sysdata.hxx> -#include "xlfd_attr.hxx" -#include "xlfd_smpl.hxx" -#include "xlfd_extd.hxx" #include "salcvt.hxx" #include "vcl/printergfx.hxx" @@ -112,391 +108,6 @@ struct _XRegion }; using namespace rtl; -// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= - -// ---------------------------------------------------------------------------- -// -// manage X11 fonts and self rastered fonts -// -// ---------------------------------------------------------------------------- - -#ifndef _USE_PRINT_EXTENSION_ - -class FontLookup -{ - public: - - struct hash; - struct equal; - typedef ::std::hash_set< FontLookup, - FontLookup::hash, - FontLookup::equal > fl_hashset; - - private: - - rtl::OString maName; - FontWeight mnWeight; - FontItalic mnItalic; - sal_Bool mbDisplay; - - public: - - FontLookup ( ::std::list< psp::fontID >::iterator& it, - const psp::PrintFontManager& rMgr ); - FontLookup (const Xlfd& rFont); - FontLookup (const FontLookup &rRef) : - maName (rRef.maName), - mnWeight (rRef.mnWeight), - mnItalic (rRef.mnItalic), - mbDisplay(rRef.mbDisplay) - {} - ~FontLookup () - {} - - static void BuildSet (fl_hashset& rSet); - static bool InSet (const fl_hashset& rSet, const Xlfd& rXfld); - bool InSet (const fl_hashset& rSet) const; - - bool operator== (const FontLookup &rRef) const - { - return (abs(mnWeight - rRef.mnWeight) < 2) - && (mnItalic == rRef.mnItalic) - && (maName == rRef.maName) - && (mbDisplay== rRef.mbDisplay); - } - FontLookup& operator= (const FontLookup &rRef) - { - mnWeight = rRef.mnWeight; - mnItalic = rRef.mnItalic; - maName = rRef.maName; - mbDisplay= rRef.mbDisplay; - - return *this; - } - size_t Hash() const - { - return maName.hashCode (); - } - - struct equal - { - bool operator()(const FontLookup &r1, const FontLookup &r2) const - { - return r1 == r2; - } - }; - struct hash - { - size_t operator()(const FontLookup &rArg) const - { - return rArg.Hash(); - } - }; -}; - -FontLookup::FontLookup ( ::std::list< psp::fontID >::iterator& it, - const psp::PrintFontManager& rMgr ) -{ - psp::FastPrintFontInfo aInfo; - if (rMgr.getFontFastInfo (*it, aInfo)) - { - mnItalic = PspGraphics::ToFontItalic (aInfo.m_eItalic); - mnWeight = PspGraphics::ToFontWeight (aInfo.m_eWeight); - mbDisplay= aInfo.m_eType == psp::fonttype::Builtin - || aInfo.m_eType == psp::fonttype::Unknown ? False : True; - maName = rtl::OUStringToOString - ( aInfo.m_aFamilyName, - RTL_TEXTENCODING_ISO_8859_1).toAsciiLowerCase(); - - sal_Int32 n_length = maName.getLength(); - const sal_Char* p_from = maName.getStr(); - sal_Char* p_to = (sal_Char*)alloca (n_length + 1); - - sal_Int32 i, j; - for (i = 0, j = 0; i < n_length; i++) - { - if ( p_from[i] != ' ' ) - p_to[j++] = p_from[i]; - } - maName = rtl::OString (p_to, j); - if (mnItalic == ITALIC_OBLIQUE) - mnItalic = ITALIC_NORMAL; - } - else - { - mnItalic = ITALIC_DONTKNOW; - mnWeight = WEIGHT_DONTKNOW; - mbDisplay= False; - } -} - -FontLookup::FontLookup (const Xlfd& rFont) -{ - AttributeProvider* pFactory = rFont.mpFactory; - Attribute* pAttr; - - pAttr = pFactory->RetrieveSlant (rFont.mnSlant); - mnItalic = (FontItalic)pAttr->GetValue(); - pAttr = pFactory->RetrieveWeight (rFont.mnWeight); - mnWeight = (FontWeight)pAttr->GetValue(); - pAttr = pFactory->RetrieveFamily (rFont.mnFamily); - maName = pAttr->GetKey(); - - if (mnItalic == ITALIC_OBLIQUE) - mnItalic = ITALIC_NORMAL; - - mbDisplay = True; -} - -void -FontLookup::BuildSet (FontLookup::fl_hashset &rSet) -{ - ::std::list< psp::fontID > aIdList; - - psp::PrintFontManager& rMgr = psp::PrintFontManager::get(); - rMgr.getFontList( aIdList, NULL, false ); - - ::std::list< psp::fontID >::iterator it; - for (it = aIdList.begin(); it != aIdList.end(); ++it) - { - FontLookup aItem (it, rMgr); - rSet.insert (aItem); - } -} - -bool -FontLookup::InSet (const FontLookup::fl_hashset& rSet) const -{ - fl_hashset::const_iterator it = rSet.find(*this); - return it == rSet.end() ? false : true; -} - -bool -FontLookup::InSet (const FontLookup::fl_hashset& rSet, const Xlfd& rXlfd) -{ - FontLookup aNeedle (rXlfd); - return aNeedle.InSet (rSet); -} - -#endif - -// ---------------------------------------------------------------------------- -// -// SalDisplay -// -// ---------------------------------------------------------------------------- - -XlfdStorage* -SalDisplay::GetXlfdList() const -{ - if ( mpFontList != NULL ) - { - return mpFontList; - } - else - { - const_cast<SalDisplay*>(this)->mpFactory = new AttributeProvider; - const_cast<SalDisplay*>(this)->mpFontList = new XlfdStorage; - const_cast<SalDisplay*>(this)->mpFallbackFactory = new VirtualXlfd; - - int i, nFontCount; - const int nMaxCount = 64 * 1024 - 1; - Display *pDisplay = GetDisplay(); - char **ppFontList = XListFonts(pDisplay, "-*", nMaxCount, &nFontCount); - - // - // create a list of simple Xlfd font information - // - - Xlfd *pXlfdList = (Xlfd*)malloc( nFontCount * sizeof(Xlfd) ); - int nXlfdCount = 0; - - for ( i = 0; i < nFontCount; i++ ) - { - if ( pXlfdList[ nXlfdCount ].FromString(ppFontList[i], mpFactory) ) - ++nXlfdCount; - } - - XFreeFontNames( ppFontList ); - - mpFactory->AddClassification(); - // add some pretty print description - mpFactory->AddAnnotation(); - // misc feature checking - mpFactory->TagFeature(); - - // sort according to font style - qsort( pXlfdList, nXlfdCount, sizeof(Xlfd), XlfdCompare ); - -#ifndef _USE_PRINT_EXTENSION_ - // create a list of fonts already managed by the fontmanager - FontLookup::fl_hashset aSet; - FontLookup::BuildSet (aSet); -#endif - - // - // create a font list with merged encoding information - // - - BitmapXlfdStorage aBitmapList; - ScalableXlfd *pScalableFont = NULL; - - int nFrom = 0; - for ( i = 0; i < nXlfdCount; i++ ) - { - // exclude openlook glyph and cursor - Attribute *pAttr = mpFactory->RetrieveFamily(pXlfdList[i].mnFamily); - if ( pAttr->HasFeature( XLFD_FEATURE_OL_GLYPH - | XLFD_FEATURE_OL_CURSOR) ) - continue; - // exclude fonts with unknown encoding - if ( pXlfdList[i].GetEncoding() == RTL_TEXTENCODING_DONTKNOW ) - continue; - // exclude "interface system" and "interface user" - if (pAttr->HasFeature( XLFD_FEATURE_APPLICATION_FONT ) ) - continue; - // exclude fonts already managed by fontmanager, anyway keep - // gui fonts: they are candidates for GetInterfaceFont () - if (pXlfdList[i].Fonttype() == eTypeScalable) - ((VirtualXlfd*)mpFallbackFactory)->FilterInterfaceFont (pXlfdList + i); -#ifndef _USE_PRINT_EXTENSION_ - if (FontLookup::InSet (aSet, pXlfdList[i])) - continue; -#endif - Bool bSameOutline = pXlfdList[i].SameFontoutline(pXlfdList + nFrom); - XlfdFonttype eType = pXlfdList[i].Fonttype(); - - // flush the old merged font list if the name doesn't match any more - if ( !bSameOutline ) - { - mpFontList->Add( pScalableFont ); - mpFontList->Add( &aBitmapList ); - pScalableFont = NULL; - aBitmapList.Reset(); - } - - // merge the font or generate a new one - switch( eType ) - { - case eTypeScalable: - if ( pScalableFont == NULL ) - pScalableFont = new ScalableXlfd; - pScalableFont->AddEncoding(pXlfdList + i); - break; - - case eTypeBitmap: - aBitmapList.AddBitmapFont( pXlfdList + i ); - break; - - case eTypeScalableBitmap: - // ignore scaled X11 bitmap fonts because they look too ugly - default: - break; - } - - nFrom = i; - } - - // flush the merged list into the global list - mpFontList->Add( pScalableFont ); - mpFontList->Add( &aBitmapList ); - if (mpFallbackFactory->NumEncodings() > 0) - mpFontList->Add( mpFallbackFactory ); - // cleanup the list of simple font information - if ( pXlfdList != NULL ) - free( pXlfdList ); - - return mpFontList; - } -} - -// --------------------------------------------------------------------------- - -ExtendedFontStruct* -SalDisplay::GetFont( const ExtendedXlfd *pRequestedFont, - const Size& rPixelSize, sal_Bool bVertical ) const -{ - // TODO: either get rid of X11 fonts or get rid of the non-hashmapped cache - if( !m_pFontCache ) - { - m_pFontCache = new SalFontCache( 64, 64, 16 ); // ??? - } - else - { - ExtendedFontStruct *pItem; - for ( pItem = m_pFontCache->First(); - pItem != NULL; - pItem = m_pFontCache->Next() ) - { - if ( pItem->Match(pRequestedFont, rPixelSize, bVertical) ) - { - if( m_pFontCache->GetCurPos() ) - { - m_pFontCache->Remove( pItem ); - m_pFontCache->Insert( pItem, 0UL ); - } - return pItem; - } - } - } - - // before we expand the cache, we look for very old and unused items - if( m_pFontCache->Count() >= 64 ) - { - ExtendedFontStruct *pItem; - for ( pItem = m_pFontCache->Last(); - pItem != NULL; - pItem = m_pFontCache->Prev() ) - { - if( 1 == pItem->GetRefCount() ) - { - m_pFontCache->Remove( pItem ); - pItem->ReleaseRef(); - if( m_pFontCache->Count() < 64 ) - break; - } - } - } - - ExtendedFontStruct *pItem = new ExtendedFontStruct( GetDisplay(), - rPixelSize, bVertical, - const_cast<ExtendedXlfd*>(pRequestedFont) ); - m_pFontCache->Insert( pItem, 0UL ); - pItem->AddRef(); - - return pItem; -} - -// --------------------------------------------------------------------------- - -void -SalDisplay::DestroyFontCache() -{ - if( m_pFontCache ) - { - ExtendedFontStruct *pItem = m_pFontCache->First(); - while( pItem ) - { - delete pItem; - pItem = m_pFontCache->Next(); - } - delete m_pFontCache; - } - if( mpFontList ) - { - mpFontList->Dispose(); - delete mpFontList; - } - if ( mpFactory ) - { - delete mpFactory; - } - - m_pFontCache = (SalFontCache*)NULL; - mpFontList = (XlfdStorage*)NULL; - mpFactory = (AttributeProvider*)NULL; -} - // =========================================================================== // PspKernInfo allows on-demand-querying of psprint provided kerning info (#i29881#) @@ -538,7 +149,7 @@ void PspKernInfo::Initialize() const // ---------------------------------------------------------------------------- GC -X11SalGraphics::SelectFont() +X11SalGraphics::GetFontGC() { Display *pDisplay = GetXDisplay(); @@ -549,18 +160,10 @@ X11SalGraphics::SelectFont() values.fill_rule = EvenOddRule; // Pict import/ Gradient values.graphics_exposures = False; values.foreground = nTextPixel_; -#ifdef _USE_PRINT_EXTENSION_ - values.background = xColormap_->GetWhitePixel(); - pFontGC_ = XCreateGC( pDisplay, hDrawable_, - GCSubwindowMode | GCFillRule - | GCGraphicsExposures | GCBackground | GCForeground, - &values ); -#else pFontGC_ = XCreateGC( pDisplay, hDrawable_, GCSubwindowMode | GCFillRule | GCGraphicsExposures | GCForeground, &values ); -#endif } if( !bFontGC_ ) { @@ -594,8 +197,6 @@ bool X11SalGraphics::setFont( const ImplFontSelectData *pEntry, int nFallbackLev // release all no longer needed font resources for( int i = nFallbackLevel; i < MAX_FALLBACK; ++i ) { - mXFont[i] = NULL; // ->ReleaseRef() - if( mpServerFont[i] != NULL ) { // old server side font is no longer referenced @@ -614,18 +215,6 @@ bool X11SalGraphics::setFont( const ImplFontSelectData *pEntry, int nFallbackLev if( !pEntry->mpFontData ) return false; - // handle the request for a native X11-font - if( ImplX11FontData::CheckFontData( *pEntry->mpFontData ) ) - { - const ImplX11FontData* pRequestedFont = static_cast<const ImplX11FontData*>( pEntry->mpFontData ); - const ExtendedXlfd& rX11Font = pRequestedFont->GetExtendedXlfd(); - - Size aReqSize( pEntry->mnWidth, pEntry->mnHeight ); - mXFont[ nFallbackLevel ] = GetDisplay()->GetFont( &rX11Font, aReqSize, bFontVertical_ ); - bFontGC_ = FALSE; - return true; - } - // handle the request for a non-native X11-font => use the GlyphCache ServerFont* pServerFont = GlyphCache::GetInstance().CacheFont( *pEntry ); if( pServerFont != NULL ) @@ -674,83 +263,6 @@ void ImplServerFontEntry::HandleFontOptions( void ) //-------------------------------------------------------------------------- -inline sal_Unicode SwapBytes( const sal_Unicode nIn ) -{ - return ((nIn >> 8) & 0x00ff) | ((nIn & 0x00ff) << 8); -} - -// draw string in a specific multibyte encoding -static void -ConvertTextItem16( XTextItem16* pTextItem, rtl_TextEncoding nEncoding ) -{ - if ( (pTextItem == NULL) || (pTextItem->nchars <= 0) ) - return; - - SalConverterCache* pCvt = SalConverterCache::GetInstance(); - // convert the string into the font encoding - sal_Size nSize; - sal_Size nBufferSize = pTextItem->nchars * 2; - sal_Char *pBuffer = (sal_Char*)alloca( nBufferSize ); - - nSize = pCvt->ConvertStringUTF16( (sal_Unicode*)pTextItem->chars, pTextItem->nchars, - pBuffer, nBufferSize, nEncoding); - - sal_Char *pTextChars = (sal_Char*)pTextItem->chars; - unsigned int n = 0, m = 0; - - if ( nEncoding == RTL_TEXTENCODING_GB_2312 - || nEncoding == RTL_TEXTENCODING_GBT_12345 - || nEncoding == RTL_TEXTENCODING_GBK - || nEncoding == RTL_TEXTENCODING_BIG5 ) - { - // GB and Big5 needs special treatment since chars can be single or - // double byte: encoding is - // [ 0x00 - 0x7f ] | [ 0x81 - 0xfe ] [ 0x40 - 0x7e 0x80 - 0xfe ] - while ( n < nSize ) - { - if ( (unsigned char)pBuffer[ n ] < 0x80 ) - { - pTextChars[ m++ ] = 0x0; - pTextChars[ m++ ] = pBuffer[ n++ ]; - } - else - { - pTextChars[ m++ ] = pBuffer[ n++ ]; - pTextChars[ m++ ] = pBuffer[ n++ ]; - } - } - pTextItem->nchars = m / 2; - } - else - if ( pCvt->IsSingleByteEncoding(nEncoding) ) - { - // Single Byte encoding has to be padded - while ( n < nSize ) - { - pTextChars[ m++ ] = 0x0; - pTextChars[ m++ ] = pBuffer[ n++ ]; - } - pTextItem->nchars = nSize; - } - else - { - while ( n < nSize ) - { - pTextChars[ m++ ] = pBuffer[ n++ ]; - } - pTextItem->nchars = nSize / 2; - } - - // XXX FIXME - if ( (nEncoding == RTL_TEXTENCODING_GB_2312) - || (nEncoding == RTL_TEXTENCODING_EUC_KR) ) - { - for (unsigned int n_char = 0; n_char < m; n_char++ ) - pTextChars[ n_char ] &= 0x7F; - } -} - -//-------------------------------------------------------------------------- namespace { class CairoWrapper @@ -1289,7 +801,7 @@ bool X11SalGraphics::DrawServerAAForcedString( const ServerFontLayout& rLayout ) } // prepare context - GC nGC = SelectFont(); + GC nGC = GetFontGC(); XGCValues aGCVal; XGetGCValues( pDisplay, nGC, GCForeground, &aGCVal ); @@ -1376,7 +888,7 @@ void X11SalGraphics::DrawServerSimpleFontString( const ServerFontLayout& rSalLay X11GlyphPeer& rGlyphPeer = X11GlyphCache::GetInstance().GetPeer(); Display* pDisplay = GetXDisplay(); - GC nGC = SelectFont(); + GC nGC = GetFontGC(); XGCValues aGCVal; aGCVal.fill_style = FillStippled; @@ -1439,61 +951,6 @@ void X11SalGraphics::DrawServerFontLayout( const ServerFontLayout& rLayout ) //-------------------------------------------------------------------------- -void X11SalGraphics::DrawStringUCS2MB( ExtendedFontStruct& rFont, - const Point& rPoint, const sal_Unicode* pStr, int nLength ) -{ - Display* pDisplay = GetXDisplay(); - GC nGC = SelectFont(); - - if( rFont.GetAsciiEncoding() == RTL_TEXTENCODING_UNICODE ) - { - // plain Unicode, can handle all chars and can be handled straight forward - XFontStruct* pFontStruct = rFont.GetFontStruct( RTL_TEXTENCODING_UNICODE ); - if( !pFontStruct ) - return; - - XSetFont( pDisplay, nGC, pFontStruct->fid ); - - #ifdef OSL_LITENDIAN - sal_Unicode *pBuffer = (sal_Unicode*)alloca( nLength * sizeof(sal_Unicode) ); - for ( int i = 0; i < nLength; i++ ) - pBuffer[ i ] = SwapBytes(pStr[ i ]) ; - #else - sal_Unicode *pBuffer = const_cast<sal_Unicode*>(pStr); - #endif - - XDrawString16( pDisplay, hDrawable_, nGC, rPoint.X(), rPoint.Y(), (XChar2b*)pBuffer, nLength ); - } - else - { - XTextItem16 *pTextItem = (XTextItem16*)alloca( nLength * sizeof(XTextItem16) ); - XChar2b *pMBChar = (XChar2b*)pStr; - int nItem = 0; - - DBG_ASSERT( nLength<=1, "#i49902# DrawStringUCS2MB with nLength>1 => problems with XOrg6.8.[0123]"); - - for( int nChar = 0; nChar < nLength; ++nChar ) - { - rtl_TextEncoding nEnc; - XFontStruct* pFontStruct = rFont.GetFontStruct( pStr[nChar], &nEnc ); - if( !pFontStruct ) - continue; - - pTextItem[ nItem ].chars = pMBChar + nChar; - pTextItem[ nItem ].delta = 0; - pTextItem[ nItem ].font = pFontStruct->fid; - pTextItem[ nItem ].nchars = 1; - - ConvertTextItem16( &pTextItem[ nItem ], nEnc ); - ++nItem; - } - - XDrawText16( pDisplay, hDrawable_, nGC, rPoint.X(), rPoint.Y(), pTextItem, nItem ); - } -} - -//-------------------------------------------------------------------------- - const ImplFontCharMap* X11SalGraphics::GetImplFontCharMap() const { if( !mpServerFont[0] ) @@ -1575,15 +1032,6 @@ void RegisterFontSubstitutors( ImplDevFontList* ); void X11SalGraphics::GetDevFontList( ImplDevFontList *pList ) { - // allow disabling of native X11 fonts - static const char* pEnableX11FontStr = getenv( "SAL_ENABLE_NATIVE_XFONTS" ); - if( pEnableX11FontStr && (pEnableX11FontStr[0] != '0') ) - { - // announce X11 fonts - XlfdStorage* pX11FontList = GetDisplay()->GetXlfdList(); - pX11FontList->AnnounceFonts( pList ); - } - // prepare the GlyphCache using psprint's font infos X11GlyphCache& rGC = X11GlyphCache::GetInstance(); @@ -1766,12 +1214,6 @@ X11SalGraphics::GetFontMetric( ImplFontMetricData *pMetric, int nFallbackLevel ) long rDummyFactor; mpServerFont[nFallbackLevel]->FetchFontMetric( *pMetric, rDummyFactor ); } - else if( mXFont[nFallbackLevel] != NULL ) - { - mXFont[nFallbackLevel]->ToImplFontMetricData( pMetric ); - if ( bFontVertical_ ) - pMetric->mnOrientation = 0; - } } // --------------------------------------------------------------------------- @@ -1859,10 +1301,6 @@ SalLayout* X11SalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe #endif pLayout = new ServerFontLayout( *mpServerFont[ nFallbackLevel ] ); } - else if( mXFont[ nFallbackLevel ] ) - pLayout = new X11FontLayout( *mXFont[ nFallbackLevel ] ); - else - pLayout = NULL; return pLayout; } @@ -1926,7 +1364,6 @@ BOOL X11SalGraphics::CreateFontSubset( const void* X11SalGraphics::GetEmbedFontData( const ImplFontData* pFont, const sal_Ucs* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen ) { -#ifndef _USE_PRINT_EXTENSION_ // in this context the pFont->GetFontId() is a valid PSP // font since they are the only ones left after the PDF // export has filtered its list of subsettable fonts (for @@ -1934,25 +1371,19 @@ const void* X11SalGraphics::GetEmbedFontData( const ImplFontData* pFont, const s // be to have the GlyphCache search for the ImplFontData pFont psp::fontID aFont = pFont->GetFontId(); return PspGraphics::DoGetEmbedFontData( aFont, pUnicodes, pWidths, rInfo, pDataLen ); -#else - return NULL; -#endif } //-------------------------------------------------------------------------- void X11SalGraphics::FreeEmbedFontData( const void* pData, long nLen ) { -#ifndef _USE_PRINT_EXTENSION_ PspGraphics::DoFreeEmbedFontData( pData, nLen ); -#endif } //-------------------------------------------------------------------------- const Ucs2SIntMap* X11SalGraphics::GetFontEncodingVector( const ImplFontData* pFont, const Ucs2OStrMap** pNonEncoded ) { -#ifndef _USE_PRINT_EXTENSION_ // in this context the pFont->GetFontId() is a valid PSP // font since they are the only ones left after the PDF // export has filtered its list of subsettable fonts (for @@ -1960,9 +1391,6 @@ const Ucs2SIntMap* X11SalGraphics::GetFontEncodingVector( const ImplFontData* pF // be to have the GlyphCache search for the ImplFontData pFont psp::fontID aFont = pFont->GetFontId(); return PspGraphics::DoGetFontEncodingVector( aFont, pNonEncoded ); -#else - return NULL; -#endif } //-------------------------------------------------------------------------- diff --git a/vcl/unx/source/gdi/xfont.cxx b/vcl/unx/source/gdi/xfont.cxx deleted file mode 100644 index f6d19909cd4a..000000000000 --- a/vcl/unx/source/gdi/xfont.cxx +++ /dev/null @@ -1,780 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_vcl.hxx" - -#include <salunx.h> -#include "xfont.hxx" -#include "xlfd_extd.hxx" -#include "salcvt.hxx" -#include <tools/string.hxx> -#include <vcl/outfont.hxx> -#include <saldisp.hxx> -#include <salgdi.h> - -// for GetMirroredChar -#include <vcl/svapp.hxx> - -#if OSL_DEBUG_LEVEL > 1 -#include <cstdio> -#endif - -#include <algorithm> - -#define VCLASS_ROTATE 0 -#define VCLASS_ROTATE_REVERSE 1 -#define VCLASS_TRANSFORM1 2 -#define VCLASS_TRANSFORM2 3 -#define VCLASS_CJK 4 -#define VCLASS_DONTKNOW 5 -#define VCLASS_FONT_NUM 2 // Other than rotate and rotate_reverse, - // don't have spacial font - -// Select the max size of a font, which is token for real -// This routine is (and should be) called only once, the result should be -// stored in some static variable - -static int GetMaxFontHeight() -{ - static int nMaxFontHeight = 0; - if( nMaxFontHeight <= 0 ) - { - const char *pFontHeight = getenv ("SAL_MAXFONTHEIGHT"); - if( pFontHeight ) - nMaxFontHeight = atoi( pFontHeight ); - static const int DEFAULT_MAXFONTHEIGHT = 250; - if (nMaxFontHeight <= 20) - nMaxFontHeight = DEFAULT_MAXFONTHEIGHT; - } - - return nMaxFontHeight; -} - - -ExtendedFontStruct::ExtendedFontStruct( Display* pDisplay, const Size& rPixelSize, - sal_Bool bVertical, ExtendedXlfd* pXlfd ) : - mpDisplay( pDisplay ), - maPixelSize( rPixelSize ), - mfXScale(1.0), mfYScale(1.0), - mbVertical( bVertical ), - mnCachedEncoding( RTL_TEXTENCODING_DONTKNOW ), - mpXlfd( pXlfd ), - mpRangeCodes(NULL), - mnRangeCount(-1) -{ - if( !maPixelSize.Width() ) - maPixelSize.Width() = maPixelSize.Height(); - mnAsciiEncoding = GetAsciiEncoding (NULL); - mnDefaultWidth = GetDefaultWidth(); - - mpXFontStruct = (XFontStruct**)calloc( mpXlfd->NumEncodings(), - sizeof(XFontStruct*) ); -} - -ExtendedFontStruct::~ExtendedFontStruct() -{ - delete[] mpRangeCodes; - - for ( int nIdx = 0; nIdx < mpXlfd->NumEncodings(); nIdx++ ) - if ( mpXFontStruct[nIdx] != NULL ) - XFreeFont( mpDisplay, mpXFontStruct[nIdx] ); - - free(mpXFontStruct); -} - -rtl_TextEncoding -ExtendedFontStruct::GetAsciiEncoding( int *pAsciiRange ) const -{ - return mpXlfd->GetAsciiEncoding( pAsciiRange ); -} - -FontPitch -ExtendedFontStruct::GetSpacing( rtl_TextEncoding nEncoding ) -{ - return mpXlfd->GetPitch( nEncoding ); -} - -static XFontStruct* -LoadXFont (Display* pDisplay, const char* pFontName) -{ - XFontStruct* pFont = XLoadQueryFont (pDisplay, pFontName); - if ((pFont != NULL) && (pFont->fid == 0)) - pFont->fid = XLoadFont(pDisplay, pFontName); - -#ifdef HDU_DEBUG - fprintf( stderr, "XLoadFont \"%s\" => %d\n", pFontName, (pFont!= NULL) ); -#endif - return pFont; -} - -int -ExtendedFontStruct::LoadEncoding( rtl_TextEncoding nEncoding ) -{ - int nIdx = mpXlfd->GetEncodingIdx( nEncoding ); - if ( (nIdx < 0) || (mpXFontStruct[ nIdx ] != NULL) ) - return nIdx; - - // limit font height that gets requested from the XServer - // see BugId #44528# FontWork (-> #45038#) and as well Bug #47127# - int nReqPixelHeight = maPixelSize.Height(); - if( nReqPixelHeight > GetMaxFontHeight() ) - nReqPixelHeight = GetMaxFontHeight(); - else if( nReqPixelHeight < 2 ) - nReqPixelHeight = 2; - - // get the X11 font from a matching XLFD - ByteString aFontName; - mpXlfd->ToString( aFontName, nReqPixelHeight, nEncoding ); - mpXFontStruct[ nIdx ] = LoadXFont( mpDisplay, aFontName.GetBuffer() ); - if (mpXFontStruct[nIdx] == NULL) - mpXFontStruct[nIdx] = LoadXFont( mpDisplay, "fixed" ); - - // calculate correction factors to improve matching - // the selected font size to the used bitmap font - int nRealPixelSize = mpXlfd->GetPixelSize(); - if( !nRealPixelSize ) // check for scalable mpXlfd - nRealPixelSize = nReqPixelHeight; - if( nRealPixelSize && (nRealPixelSize != maPixelSize.Width()) ) - mfXScale = (float)maPixelSize.Width() / nRealPixelSize; - if( nRealPixelSize && (nRealPixelSize != maPixelSize.Height()) ) - mfYScale = (float)maPixelSize.Height() / nRealPixelSize; - - return nIdx; -} - -XFontStruct* -ExtendedFontStruct::GetFontStruct( rtl_TextEncoding nEncoding ) -{ - int nIdx = LoadEncoding( nEncoding ); - return nIdx < 0 ? NULL : mpXFontStruct[nIdx] ; -} - -bool -ExtendedFontStruct::GetFontBoundingBox( XCharStruct *pCharStruct, - int *pAscent, int *pDescent ) -{ - pCharStruct->lbearing = 0; - pCharStruct->rbearing = 0; - pCharStruct->width = 0; - pCharStruct->ascent = 0; - pCharStruct->descent = 0; - - *pAscent = 0; - *pDescent = 0; - - int nIdx; - - // check if there is at least one encoding already loaded - bool bEmpty = true; - for ( nIdx = 0; nIdx < mpXlfd->NumEncodings(); nIdx++ ) - bEmpty &= (mpXFontStruct[nIdx] == NULL); - if ( bEmpty ) - LoadEncoding( mpXlfd->GetAsciiEncoding() ); - - // get the max bounding box from all font structs - for ( nIdx = 0; nIdx < mpXlfd->NumEncodings(); nIdx++ ) - if ( mpXFontStruct[ nIdx ] != NULL ) - { - *pAscent = std::max( mpXFontStruct[nIdx]->ascent, *pAscent ); - *pDescent = std::max( mpXFontStruct[nIdx]->descent, *pDescent ); - - XCharStruct* pMaxBounds = &(mpXFontStruct[nIdx]->max_bounds); - - pCharStruct->lbearing = std::max( pMaxBounds->lbearing, - pCharStruct->lbearing ); - pCharStruct->rbearing = std::max( pMaxBounds->rbearing, - pCharStruct->rbearing ); - pCharStruct->width = std::max( pMaxBounds->width, - pCharStruct->width ); - pCharStruct->ascent = std::max( pMaxBounds->ascent, - pCharStruct->ascent ); - pCharStruct->descent = std::max( pMaxBounds->descent, - pCharStruct->descent ); - } - - // apply correction factors to better match selected size to available size - if( mfYScale != 1.0 ) - { - *pAscent = int(*pAscent * mfYScale); - *pDescent = int(*pDescent * mfYScale); - pCharStruct->ascent = (short int)(pCharStruct->ascent * mfYScale); - pCharStruct->descent = (short int)(pCharStruct->descent * mfYScale); - } - if( mfXScale != 1.0 ) - { - pCharStruct->lbearing = (short int)(pCharStruct->lbearing * mfXScale); - pCharStruct->rbearing = (short int)(pCharStruct->rbearing * mfXScale); - pCharStruct->width = (short int)(pCharStruct->width * mfXScale); - } - - return (pCharStruct->width > 0); -} - -bool -ExtendedFontStruct::ToImplFontMetricData(ImplFontMetricData *pFontMetric) -{ - pFontMetric->mnOrientation = 0; - pFontMetric->mnSlant = 0; - pFontMetric->mbDevice = true; - pFontMetric->mbScalableFont = mpXlfd->IsScalable(); - pFontMetric->mbKernableFont = false; - pFontMetric->mbSymbolFlag= mpXlfd->IsSymbolFont(); - pFontMetric->meFamily = mpXlfd->GetFamilyType(); - pFontMetric->meWeight = mpXlfd->GetWeight(); - pFontMetric->mePitch = mpXlfd->GetPitch(); - pFontMetric->meItalic = mpXlfd->GetSlant(); - - int nAscent, nDescent; - XCharStruct aBoundingBox; - if ( GetFontBoundingBox(&aBoundingBox, &nAscent, &nDescent) ) - { - pFontMetric->mnWidth = aBoundingBox.width; - pFontMetric->mnAscent = aBoundingBox.ascent; - pFontMetric->mnDescent = aBoundingBox.descent; - pFontMetric->mnIntLeading = std::max(0, aBoundingBox.ascent - nAscent - + aBoundingBox.descent - nDescent ); - pFontMetric->mnExtLeading = 0; // TODO!!! - return true; - } - else - { - return false; - } -} - -bool -ExtendedFontStruct::Match( const ExtendedXlfd *pXlfd, - const Size& rPixelSize, sal_Bool bVertical ) const -{ - if( mpXlfd != pXlfd ) - return false; - - if( bVertical != mbVertical ) - return FALSE; - - if( rPixelSize.Height() != maPixelSize.Height() ) - return FALSE; - - long nReqWidth = rPixelSize.Width(); - if( !nReqWidth ) - nReqWidth = rPixelSize.Height(); - if( nReqWidth != maPixelSize.Width() ) - return FALSE; - - return true; -} - -// Get an appropriate x-font that contains a glyph for the given unicode -// code point. -// This routine is designed to be called for each character in a text. -// It first checks the given encoding to optimize for the fact that two -// adjacent characters in a text most probably have the same encoding -// In the first call initialize pEncodingInOut to dontknow, this causes -// EncodingHasChar() to fail and thus bootstraps the encoding, otherwise -// make sure that the initial value of pFontInOut matches the encoding and -// that the encoding is valid for the font. -XFontStruct* -ExtendedFontStruct::GetFontStruct( sal_Unicode nChar, rtl_TextEncoding *pEncoding ) -{ - SalConverterCache *pCvt = SalConverterCache::GetInstance(); - - if ( pCvt->EncodingHasChar(mnAsciiEncoding, nChar) ) - { - *pEncoding = mnAsciiEncoding; - return GetFontStruct (mnAsciiEncoding); - } - else - if ( pCvt->EncodingHasChar(mnCachedEncoding, nChar) ) - { - *pEncoding = mnCachedEncoding; - return GetFontStruct (mnCachedEncoding); - } - else - { - for ( int nIdx = 0; nIdx < mpXlfd->NumEncodings(); nIdx++ ) - { - rtl_TextEncoding nEnc = mpXlfd->GetEncoding(nIdx); - if ( (nEnc != mnCachedEncoding) && (nEnc != mnAsciiEncoding) - && pCvt->EncodingHasChar(nEnc, nChar)) - { - mnCachedEncoding = nEnc; - *pEncoding = mnCachedEncoding; - return GetFontStruct (mnCachedEncoding); - } - } - } - - *pEncoding = RTL_TEXTENCODING_DONTKNOW; - return NULL; -} - -// --------------------------------------------------------------------------- -// utility functions to handle xfontstruct information, this is all to -// calculate charwidth information -// --------------------------------------------------------------------------- - -static bool -CharExists( const XCharStruct* pChar ) -{ - if ( pChar == NULL ) - return false; - - return pChar->width - || pChar->ascent || pChar->descent - || pChar->lbearing || pChar->rbearing; -} - -// this relies on non-null per_char information in the fontstruct -static XCharStruct* -GetCharinfo( const XFontStruct *pXFontStruct, sal_MultiByte nChar ) -{ - unsigned int nRow = nChar >> 8; - unsigned int nCol = nChar & 0xFF; - - unsigned int nMinRow = pXFontStruct->min_byte1; - unsigned int nMaxRow = pXFontStruct->max_byte1; - unsigned int nMinCol = pXFontStruct->min_char_or_byte2; - unsigned int nMaxCol = pXFontStruct->max_char_or_byte2; - - if ( nRow >= nMinRow && nRow <= nMaxRow - && nCol >= nMinCol && nCol <= nMaxCol ) - { - return &pXFontStruct->per_char[ - (nRow-nMinRow) * (nMaxCol-nMinCol+1) + (nCol-nMinCol) ]; - } - - return NULL; -} - -static sal_Size -QueryCharWidth16( Display* pDisplay, XLIB_Font nFontID, sal_MultiByte nChar, - sal_Size nDefaultWidth ) -{ - int nDirection, nFontAscent, nFontDescent; - XCharStruct aBoundingBox; - - XQueryTextExtents16( pDisplay, nFontID, (XChar2b*)&nChar, 1, - &nDirection, &nFontAscent, &nFontDescent, &aBoundingBox ); - - return CharExists( &aBoundingBox ) ? aBoundingBox.width : nDefaultWidth; -} - -#if 0 -// currently not used -static sal_Size -QueryCharWidth8( XFontStruct* pXFontStruct, sal_Char nChar, - sal_Size nDefaultWidth ) -{ - int nDirection, nFontAscent, nFontDescent; - XCharStruct aBoundingBox; - - XTextExtents( pXFontStruct, &nChar, 1, - &nDirection, &nFontAscent, &nFontDescent, &aBoundingBox ); - - return CharExists( &aBoundingBox ) ? aBoundingBox.width : nDefaultWidth; -} -#endif - -sal_Size -ExtendedFontStruct::GetDefaultWidth() -{ - return (maPixelSize.Width() + 1) / 2; -} - -// Handle single byte fonts which do not require conversion, this exploits -// the fact that unicode equals latin1 or ansi1252 in the range [0..0xff] and -// is compatible with iso8859-X at least in the range to 0x7f -sal_Size -ExtendedFontStruct::GetCharWidth8( sal_Unicode nFrom, sal_Unicode nTo, - sal_Int32* pWidthArray, rtl_TextEncoding nEncoding ) -{ - if ( !(nFrom <= nTo) ) - return 0; - - XFontStruct* pXFontStruct = GetFontStruct( nEncoding ); - if ( pXFontStruct == NULL ) - return 0; - - // query the font metrics - if ( (pXFontStruct->max_bounds.width == pXFontStruct->min_bounds.width) - || (pXFontStruct->per_char == NULL) ) - { - // fixed width font - for ( int nIdx = nFrom; nIdx <= nTo; nIdx++, pWidthArray++ ) - *pWidthArray = pXFontStruct->max_bounds.width; - } - else - { - // variable width font - int nMinChar = pXFontStruct->min_char_or_byte2; - int nMaxChar = pXFontStruct->max_char_or_byte2; - - int nIdx = nFrom; - - for ( ; nIdx < std::min((int)nTo, nMinChar); nIdx++, pWidthArray++ ) - *pWidthArray = mnDefaultWidth; - for ( ; nIdx <= std::min((int)nTo, nMaxChar); nIdx++, pWidthArray++ ) - { - XCharStruct* pChar = &(pXFontStruct->per_char[nIdx - nMinChar]); - *pWidthArray = CharExists(pChar) ? pChar->width : mnDefaultWidth; - } - for ( ; nIdx <= nTo; nIdx++, pWidthArray++ ) - *pWidthArray = mnDefaultWidth; - } - - // return amount of handled chars - return nTo - nFrom + 1; -} - -// Handle utf16 encoded fonts, which do not require conversion -sal_Size -ExtendedFontStruct::GetCharWidthUTF16( sal_Unicode nFrom, sal_Unicode nTo, - sal_Int32* pWidthArray ) -{ - if ( !(nFrom <= nTo) ) - return 0; - - XFontStruct* pXFontStruct = GetFontStruct( RTL_TEXTENCODING_UNICODE ); - FontPitch nSpacing = mpXlfd->GetPitch( RTL_TEXTENCODING_UNICODE ); - - if ( pXFontStruct == NULL ) - return 0; - - // query the font metrics - if ( nSpacing == PITCH_VARIABLE - && pXFontStruct->per_char == NULL) - { - // get per_char information from the server - for ( sal_Int32 nIdx = nFrom; nIdx <= nTo; nIdx++, pWidthArray++ ) - *pWidthArray = QueryCharWidth16( mpDisplay, pXFontStruct->fid, - nIdx, mnDefaultWidth ); - } - else - if ( (pXFontStruct->max_bounds.width == pXFontStruct->min_bounds.width) - || (pXFontStruct->per_char == NULL) ) - { - // really a fixed width font - for ( sal_Int32 nIdx = nFrom; nIdx <= nTo; nIdx++, pWidthArray++ ) - *pWidthArray = pXFontStruct->max_bounds.width; - } - else - { - // get per_char information from the xfontstruct - for ( sal_Int32 nIdx = nFrom; nIdx <= nTo; nIdx++, pWidthArray++ ) - { - XCharStruct* pChar = GetCharinfo( pXFontStruct, nIdx ); - *pWidthArray = CharExists(pChar) ? pChar->width : mnDefaultWidth; - } - } - - // return amount of handled chars - return nTo - nFrom + 1; -} - -// handle non unicode fonts that are converted into encoding matching the -// font in fontstruct, 8 and 16 bit fonts are handled the same way -sal_Size -ExtendedFontStruct::GetCharWidth16( sal_Unicode nFrom, sal_Unicode nTo, - sal_Int32* pWidthArray, ExtendedFontStruct *pFallback ) -{ - if ( nFrom > nTo ) - return 0; - - sal_Char pBuffer[64]; - - SalConverterCache *pCvt = SalConverterCache::GetInstance(); - for ( sal_Int32 nIdx = nFrom ; nIdx <= nTo ; nIdx++, pWidthArray++ ) - { - FontPitch nSpacing; - sal_Size nSize; - sal_Unicode nUniIdx = (sal_Unicode)nIdx; - - // get a matching fontstruct - rtl_TextEncoding nEnc; - XFontStruct *pFont; - - if ( (pFont = GetFontStruct(nUniIdx, &nEnc)) != NULL ) - { - nSpacing = GetSpacing( nEnc ); - } - else - if ( (pFallback != NULL) - && ((pFont = pFallback->GetFontStruct(nUniIdx, &nEnc)) != NULL) ) - { - nSpacing = pFallback->GetSpacing( nEnc ); - } - else - if ( (pFallback != NULL) - && ((pFont = pFallback->GetFontStruct(nUniIdx = '?', &nEnc)) != NULL) ) - { - nSpacing = pFallback->GetSpacing( nEnc ); - } - else - { - // TODO What should the default value be? - nSpacing = PITCH_FIXED; - } - - if ( pFont ) - { - nSize = pCvt->ConvertStringUTF16(&nUniIdx, 1, pBuffer, sizeof(pBuffer), nEnc); - // XXX FIXME - if ((nEnc == RTL_TEXTENCODING_GB_2312) || (nEnc == RTL_TEXTENCODING_EUC_KR)) - { - for (unsigned int n_char = 0; n_char < nSize; n_char++ ) - pBuffer[ n_char ] &= 0x7F; - } - } - - // query font metrics - if ( pFont && (nSize == 1 || nSize == 2) ) - { - sal_MultiByte nChar = (nSize == 1) ? (unsigned char)pBuffer[0] : - ((sal_MultiByte)pBuffer[0] << 8) + (sal_MultiByte)pBuffer[1]; - - if ( nSpacing == PITCH_VARIABLE - && pFont->per_char == NULL) - { - // get per_char information from the x-server - *pWidthArray = QueryCharWidth16( mpDisplay, pFont->fid, - nChar, mnDefaultWidth ); - } - else - if ( (pFont->max_bounds.width == pFont->min_bounds.width) - || (pFont->per_char == NULL) ) - { - // fixed width font - *pWidthArray = pFont->max_bounds.width; - } - else - { - // get per_char information from the xfontstruct - XCharStruct* pChar = GetCharinfo( pFont, nChar ); - *pWidthArray = CharExists(pChar) ? pChar->width : mnDefaultWidth; - } - } - else - { - // conversion error - *pWidthArray = mnDefaultWidth; - } - } - - // return amount of handled chars - return nTo - nFrom + 1; -} - -sal_Size -ExtendedFontStruct::GetCharWidth( sal_Unicode cChar, sal_Int32 *pPhysicalWidth, - sal_Int32 *pLogicalWidth ) -{ - sal_Size nConverted = 0; - - // dispatch querying of metrics to most promising encoding candidate - int nAsciiRange; - rtl_TextEncoding nEncoding = mpXlfd->GetAsciiEncoding(&nAsciiRange); - if ( nEncoding == RTL_TEXTENCODING_UNICODE ) - { - // if we have a unicode encoded system font than we get the charwidth - // straight forward - nConverted = GetCharWidthUTF16( cChar, cChar, pPhysicalWidth ); - } - else - { - if ( cChar < nAsciiRange ) - { - // optimize the most frequent case, requesting only the latin1 - // chars which are mappable to a single encoding - nConverted = GetCharWidth8( cChar, cChar, pPhysicalWidth, nEncoding ); - } - - // if further requests are pending, then the according unicode - // codepoint has to be dispatched to one of the system fonts and - // converted to this fonts encoding - nConverted += GetCharWidth16( cChar + nConverted, cChar, - pPhysicalWidth + nConverted, NULL ); - } - - // convert physical width to logical width, apply correction factor if needed - *pLogicalWidth = *pPhysicalWidth; - if( mfXScale != 1.0 ) - *pLogicalWidth = sal_Int32(*pLogicalWidth * mfXScale); - - return nConverted; -} - -bool ExtendedFontStruct::HasUnicodeChar( sal_Unicode cChar ) const -{ - // #i18818# return false if there are no known encodings - if( !mnRangeCount ) - return false; - - // init unicode range cache if needed - if( mnRangeCount < 0 ) - { - mnRangeCount = mpXlfd->GetFontCodeRanges( NULL ); - if( !mnRangeCount ) - return false; - mpRangeCodes = new sal_uInt32[ 2*mnRangeCount ]; - mpXlfd->GetFontCodeRanges( mpRangeCodes ); - // TODO: make sure everything is sorted - } - - // binary search in unicode ranges - int nLower = 0; - int nMid = mnRangeCount; - int nUpper = 2 * mnRangeCount - 1; - while( nLower < nUpper ) - { - if( cChar >= mpRangeCodes[ nMid ] ) - nLower = nMid; - else - nUpper = nMid - 1; - nMid = (nLower + nUpper + 1) / 2; - } - if( (nMid == 0) && (cChar < mpRangeCodes[0]) ) - return false; - return (nMid & 1) ? false: true; -} - -int ExtendedFontStruct::GetFontCodeRanges( sal_uInt32* pCodePairs ) const -{ - // make sure unicode range cache is initialized - HasUnicodeChar(0); - - // transfer range pairs if requested - if( pCodePairs ) - { - for( int i = 0; i < 2*mnRangeCount; ++i ) - pCodePairs[i] = mpRangeCodes[i]; - } - - return mnRangeCount; -} - -// ======================================================================= - -X11FontLayout::X11FontLayout( ExtendedFontStruct& rFont ) -: mrFont( rFont ) -{} - -// ----------------------------------------------------------------------- - -bool X11FontLayout::LayoutText( ImplLayoutArgs& rArgs ) -{ - Point aNewPos( 0, 0 ); - bool bRightToLeft; - int nCharPos; - - for( nCharPos = -1; rArgs.GetNextPos( &nCharPos, &bRightToLeft ); ) - { - sal_UCS4 cChar = rArgs.mpStr[ nCharPos ]; - if( bRightToLeft ) - cChar = GetMirroredChar( cChar ); - int nGlyphIndex = cChar | GF_ISCHAR; - - // check if the font supports the char - if( !mrFont.HasUnicodeChar( cChar ) ) - { - // try to replace the failing char using the same font - const char* pApproxUTF8 = GetAutofallback( cChar ); - cChar = 0; - if( pApproxUTF8 ) - { - String aApproxStr( pApproxUTF8, RTL_TEXTENCODING_UTF8 ); - if( aApproxStr.Len() == 1 ) - { - // TODO: support Autofallback for len>1 - sal_Unicode cApprox = aApproxStr.GetChar( 0 ); - if( mrFont.HasUnicodeChar( cApprox ) ) - nGlyphIndex = (cChar = cApprox) | GF_ISCHAR; - } - } - // request fallback glyph if necessary - if( !cChar ) - { - rArgs.NeedFallback( nCharPos, bRightToLeft ); - if( rArgs.mnFlags & SAL_LAYOUT_FOR_FALLBACK ) - nGlyphIndex = 0; // drop NotDef fallback glyphs - } - } - - sal_Int32 nPhysGlyphWidth, nLogGlyphWidth; - mrFont.GetCharWidth( cChar, &nPhysGlyphWidth, &nLogGlyphWidth ); - int nGlyphFlags = (nPhysGlyphWidth > 0) ? 0 : GlyphItem::IS_IN_CLUSTER; - if( bRightToLeft ) - nGlyphFlags |= GlyphItem::IS_RTL_GLYPH; - GlyphItem aGI( nCharPos, nGlyphIndex, aNewPos, nGlyphFlags, nPhysGlyphWidth ); - aGI.mnNewWidth = nLogGlyphWidth; - AppendGlyph( aGI ); - - aNewPos.X() += nLogGlyphWidth; - } - - return (nCharPos >= 0); -} - -// ----------------------------------------------------------------------- - -void X11FontLayout::AdjustLayout( ImplLayoutArgs& rArgs ) -{ - GenericSalLayout::AdjustLayout( rArgs ); - SetOrientation( 0 ); // X11 fonts are to be rotated in upper layers -} - -// ----------------------------------------------------------------------- - -void X11FontLayout::DrawText( SalGraphics& rSalGraphics ) const -{ - static const int MAXGLYPHS = 160; - int nMaxGlyphs = GetOrientation() ? 1 : MAXGLYPHS; - - // workaround for #i49902# similar to #b6228733 with XDrawText items - // => output each item separately for non-unicode font encodings! - // this is done here instead of in DrawStringUCS2MB() because - // it needs the item positions and they are easily available here - if( mrFont.GetAsciiEncoding() != RTL_TEXTENCODING_UNICODE ) - nMaxGlyphs = 1; - - Point aPos; - sal_GlyphId aGlyphAry[ MAXGLYPHS ]; - sal_Unicode pStr[ MAXGLYPHS ]; - for( int nStart=0;;) - { - int nGlyphCount = GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart ); - if( !nGlyphCount ) - break; - - for( int i = 0; i < nGlyphCount; ++i ) - pStr[ i ] = aGlyphAry[ i ] & GF_IDXMASK; - - static_cast<X11SalGraphics&>(rSalGraphics).DrawStringUCS2MB( mrFont, aPos, pStr, nGlyphCount ); - } -} - -// ======================================================================= diff --git a/vcl/unx/source/gdi/xlfd_attr.cxx b/vcl/unx/source/gdi/xlfd_attr.cxx deleted file mode 100644 index ca49a8548afb..000000000000 --- a/vcl/unx/source/gdi/xlfd_attr.cxx +++ /dev/null @@ -1,686 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_vcl.hxx" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sal/alloca.h> -#include "xlfd_attr.hxx" -#include <rtl/tencinfo.h> -#include <vcl/vclenum.hxx> - -// --------------------------------------------------------------------------- -// -// -// Attribute is a container for simple name value pairs -// eg. ( "times", FAMILY_ROMAN ) or ( "demi bold", WEIGHT_SEMIBOLD ) -// enriched with an annotation which is a pretty-printed version of the -// string, i.e. "itc avant garde" would get an annotation of "Itc Avant Garde" -// -// -// --------------------------------------------------------------------------- - -// release the stored string -void -Attribute::Release() -{ - if ( mpAnnotation != NULL ) - delete mpAnnotation; - if ( mpKeyName != NULL ) - delete mpKeyName; - if ( mpName != NULL ) - free( (void*)mpName ); -} - -// get a private copy of the given argument -void -Attribute::SetName( const char *p, int nLen ) -{ - mpName = (char*)malloc( nLen + 1 ); - mnLength = nLen; - memcpy( (void*)mpName, p, mnLength ); - ((char*)mpName)[ mnLength ] = '\0'; -} - -// Compare whether two strings a equal for the first nLen bytes -// i.e. arial == arialnarrow -int -Attribute::Compare( const char *p, int nLen ) -{ - return strncmp( mpName, p, nLen ); -} - -// Get a all lowercase name with all blanks removed -const rtl::OString& -Attribute::GetKey () -{ - static rtl::OString aEmptyStr; - - if (mpKeyName != NULL) - return *mpKeyName; - if (mnLength == 0) - return aEmptyStr; - - sal_Char* pBuffer = (sal_Char*)alloca (mnLength); - - sal_Int32 i, j; - for (i = 0, j = 0; i < mnLength; i++) - { - if ( mpName[i] != ' ' ) - pBuffer[j++] = mpName[i]; - } - mpKeyName = new rtl::OString(pBuffer, j); - - return *mpKeyName; -} - -void -Attribute::InitKey () -{ - mpKeyName = NULL; -} - -// Compare two strings, they have to be equal for nLen bytes, after nLen -// bytes both strings have to be terminated either by '\0' or by '-' -// this is for comparing a string being a substring in a Xlfd with a -// zeroterminated string -Bool -Attribute::ExactMatch( const char *p, int nLen ) -{ - Bool bMatch; - if ( nLen > 0 ) - bMatch = Compare( p, nLen ) == 0; - else - bMatch = True; - if ( bMatch ) - { - char c1 = p[ nLen ]; - char c2 = mpName[ nLen ]; - bMatch = (c1 == '-' || c1 == '\0') && (c2 == '-' || c2 == '\0'); - } - - return bMatch; -} - -void -Attribute::TagFeature( unsigned short nFeature ) -{ - if ( (nFeature & XLFD_FEATURE_NARROW) - && (strstr(mpName, "narrow") != NULL) ) - { - mnFeature |= XLFD_FEATURE_NARROW; - } - - if ( (nFeature & XLFD_FEATURE_OL_CURSOR) - && (strcmp(mpName, "open look cursor") == 0) ) - { - mnFeature |= XLFD_FEATURE_OL_CURSOR; - } - - if ( (nFeature & XLFD_FEATURE_OL_GLYPH) - && (strcmp(mpName, "open look glyph") == 0) ) - { - mnFeature |= XLFD_FEATURE_OL_GLYPH; - } - - if ( (nFeature & XLFD_FEATURE_APPLICATION_FONT) - && ( (strcmp(mpName, "interface user") == 0) - || (strcmp(mpName, "interface system") == 0))) - { - mnFeature |= XLFD_FEATURE_APPLICATION_FONT; - } - - if (nFeature & XLFD_FEATURE_INTERFACE_FONT) - { - // european - if (strcmp(mpName, "arial") == 0) - mnFeature |= (XLFD_FEATURE_INTERFACE_FONT | XLFD_FEATURE_HQ | XLFD_FEATURE_MQ); - else - if (strcmp(mpName, "helvetica") == 0) - mnFeature |= (XLFD_FEATURE_INTERFACE_FONT | XLFD_FEATURE_HQ); - else - if ( (strcmp(mpName, "lucidux sans") == 0) - || (strcmp(mpName, "luxi sans") == 0)) - mnFeature |= (XLFD_FEATURE_INTERFACE_FONT | XLFD_FEATURE_MQ | XLFD_FEATURE_LQ); - else - if (strcmp(mpName, "charter") == 0) - mnFeature |= (XLFD_FEATURE_INTERFACE_FONT | XLFD_FEATURE_MQ); - else - // japanese - if ( (strcmp(mpName, "hg mincho l") == 0) /* Solaris: jisx0208 jisx0201 */ - || (strcmp(mpName, "heiseimin") == 0) /* Solaris: jisx0212 */ - || (strcmp(mpName, "minchol") == 0) /* TurboLinux */ - || (strcmp(mpName, "mincho") == 0)) /* Redhat 6.2 JP */ - { - mnFeature |= XLFD_FEATURE_INTERFACE_FONT; - } - else - // chinese - if ( (strcmp(mpName, "kai") == 0) /* Solaris */ - || (strcmp(mpName, "ar pl mingti2l big5") == 0)) /* TurboLinux */ - { - mnFeature |= XLFD_FEATURE_INTERFACE_FONT; - } - else - // korean - if ( (strcmp(mpName, "myeongjo") == 0)) /* Solaris */ - { - mnFeature |= XLFD_FEATURE_INTERFACE_FONT; - } - } - - if ( nFeature & XLFD_FEATURE_REDUNDANTSTYLE ) - { - switch ( mpName[0] ) - { - case '\0': - mnFeature |= XLFD_FEATURE_REDUNDANTSTYLE; - break; - - case 'b': - if ( (strcmp(mpName, "bold") == 0) - || (strcmp(mpName, "bold italic") == 0) - || (strcmp(mpName, "bold sans") == 0) ) - mnFeature |= XLFD_FEATURE_REDUNDANTSTYLE; - break; - - case 'd': - if ( (strcmp(mpName, "demi") == 0) - || (strcmp(mpName, "demi italic") == 0) ) - mnFeature |= XLFD_FEATURE_REDUNDANTSTYLE; - break; - - case 'i': - if ( strcmp(mpName, "italic") == 0 ) - mnFeature |= XLFD_FEATURE_REDUNDANTSTYLE; - break; - - case 's': - if ( (strcmp(mpName, "sans") == 0) - || (strcmp(mpName, "serif") == 0) ) - mnFeature |= XLFD_FEATURE_REDUNDANTSTYLE; - break; - } - } -} - -// given Attribute classifications, strings have to be in alphabetical -// order, since they are treated by binary search algorithm - -#define InitializeAttributeWith( p, a ) p, sizeof(p) - 1, a, 0, NULL, NULL -#define MembersOf( p ) (sizeof(p) / sizeof(p[0]) ) - -const Attribute pFamilyAttribute[] = { - { InitializeAttributeWith( "arial", FAMILY_SWISS ) }, - { InitializeAttributeWith( "arioso", FAMILY_SCRIPT ) }, - { InitializeAttributeWith( "avant garde", FAMILY_SWISS ) }, - { InitializeAttributeWith( "avantgarde", FAMILY_SWISS ) }, - { InitializeAttributeWith( "bembo", FAMILY_ROMAN ) }, - { InitializeAttributeWith( "bookman", FAMILY_ROMAN ) }, - { InitializeAttributeWith( "conga", FAMILY_ROMAN ) }, - { InitializeAttributeWith( "courier", FAMILY_MODERN ) }, - { InitializeAttributeWith( "curl", FAMILY_SCRIPT ) }, - { InitializeAttributeWith( "fixed", FAMILY_MODERN ) }, - { InitializeAttributeWith( "gill", FAMILY_SWISS ) }, - { InitializeAttributeWith( "helmet", FAMILY_MODERN ) }, - { InitializeAttributeWith( "helvetica", FAMILY_SWISS ) }, - { InitializeAttributeWith( "international", FAMILY_MODERN ) }, - { InitializeAttributeWith( "lucida", FAMILY_SWISS ) }, - { InitializeAttributeWith( "new century schoolbook", FAMILY_ROMAN ) }, - { InitializeAttributeWith( "palatino", FAMILY_ROMAN ) }, - { InitializeAttributeWith( "roman", FAMILY_ROMAN ) }, - { InitializeAttributeWith( "sans serif", FAMILY_SWISS ) }, - { InitializeAttributeWith( "sansserif", FAMILY_SWISS ) }, - { InitializeAttributeWith( "serf", FAMILY_ROMAN ) }, - { InitializeAttributeWith( "serif", FAMILY_ROMAN ) }, - { InitializeAttributeWith( "times", FAMILY_ROMAN ) }, - { InitializeAttributeWith( "utopia", FAMILY_ROMAN ) }, - { InitializeAttributeWith( "zapf chancery", FAMILY_SCRIPT ) }, - { InitializeAttributeWith( "zapfchancery", FAMILY_SCRIPT ) } -}; - -const Attribute pWeightAttribute[] = { - { InitializeAttributeWith( "black", WEIGHT_BLACK ) }, - { InitializeAttributeWith( "bold", WEIGHT_BOLD ) }, - { InitializeAttributeWith( "book", WEIGHT_LIGHT ) }, - { InitializeAttributeWith( "demi", WEIGHT_SEMIBOLD ) }, - { InitializeAttributeWith( "demi bold", WEIGHT_SEMIBOLD ) }, - { InitializeAttributeWith( "demibold", WEIGHT_SEMIBOLD ) }, - { InitializeAttributeWith( "light", WEIGHT_LIGHT ) }, - { InitializeAttributeWith( "medium", WEIGHT_MEDIUM ) }, - { InitializeAttributeWith( "normal", WEIGHT_NORMAL ) }, - { InitializeAttributeWith( "regular", WEIGHT_NORMAL ) }, - { InitializeAttributeWith( "roman", WEIGHT_NORMAL ) }, - { InitializeAttributeWith( "semicondensed", WEIGHT_LIGHT ) }, - { InitializeAttributeWith( "ultrabold", WEIGHT_ULTRABOLD ) } -}; - -const Attribute pSlantAttribute[] = { - { InitializeAttributeWith( "i", ITALIC_NORMAL ) }, - { InitializeAttributeWith( "o", ITALIC_OBLIQUE ) }, - { InitializeAttributeWith( "r", ITALIC_NONE ) } -}; - -const Attribute pSetwidthAttribute[] = { - { InitializeAttributeWith( "bold", WIDTH_SEMI_EXPANDED ) }, - { InitializeAttributeWith( "condensed", WIDTH_CONDENSED ) }, - { InitializeAttributeWith( "double wide", WIDTH_ULTRA_EXPANDED ) }, - { InitializeAttributeWith( "expanded", WIDTH_EXPANDED ) }, - { InitializeAttributeWith( "extracondensed", WIDTH_EXTRA_CONDENSED ) }, - { InitializeAttributeWith( "extraexpanded", WIDTH_EXTRA_EXPANDED ) }, - { InitializeAttributeWith( "medium", WIDTH_NORMAL ) }, - { InitializeAttributeWith( "narrow", WIDTH_CONDENSED ) }, - { InitializeAttributeWith( "normal", WIDTH_NORMAL ) }, - { InitializeAttributeWith( "semicondensed", WIDTH_SEMI_CONDENSED ) }, - { InitializeAttributeWith( "semiexpanded", WIDTH_SEMI_EXPANDED ) }, - { InitializeAttributeWith( "ultracondensed", WIDTH_ULTRA_CONDENSED ) }, - { InitializeAttributeWith( "ultraexpanded", WIDTH_ULTRA_EXPANDED ) }, - { InitializeAttributeWith( "wide", WIDTH_EXPANDED ) } -}; - -const Attribute pEnhancedCharsetAttribute[] = { - { InitializeAttributeWith( "iso8859-1", RTL_TEXTENCODING_MS_1252 ) }, - { InitializeAttributeWith( "iso8859_1", RTL_TEXTENCODING_MS_1252 ) } -}; - -// ------------------------------------------------------------------------- -// -// String handling utility functions -// -// ------------------------------------------------------------------------- - - -void -AppendAttribute( Attribute *pAttribute, ByteString &rString ) -{ - if ( pAttribute == NULL ) - return ; - - int nLength = pAttribute->GetLength(); - char *pBuffer = (char*)alloca( nLength + 1); - - pBuffer[ 0 ] = '-'; - memcpy( pBuffer + 1, pAttribute->GetName(), nLength ); - rString.Append( pBuffer, nLength + 1); -} - -// -// Prettify the font name: make each leading character of a fontname -// uppercase. For example -// times new roman -> Times New Roman -// - -static void -ToUpper( char *pCharacter ) -{ - // replace [a,z] with [A,Z] - if ( (*pCharacter >= 97) && (*pCharacter <= 122) ) - *pCharacter -= 32; -} - -static String* -Capitalize( const char *pStr, int nLength ) -{ - char *pCopy = (char*)alloca( nLength + 1 ); - char *pPtr = pCopy; - memcpy( pPtr, pStr, nLength + 1 ); - - // loop over string data and uppercase first char and all chars - // following a space (other white space would be unexpected here) - char nPreviousChar = ' '; - while ( *pPtr ) - { - if ( nPreviousChar == ' ' ) - ToUpper( pPtr ); - nPreviousChar = *pPtr++; - } - - return new String( pCopy, RTL_TEXTENCODING_ISO_8859_1 ); -} - -String* -AnnotateString( const Attribute& rAttribute ) -{ - return Capitalize(rAttribute.GetName(), rAttribute.GetLength()); -} - -String* -AnnotateSlant( const Attribute& rAttribute ) -{ - const char* pStr = rAttribute.GetName(); - int nLen = rAttribute.GetLength(); - - static const struct { - const char *pFrom; const char *pTo; - } pTranslation[] = { - { "r", "Roman" }, - { "o", "Oblique" }, - { "i", "Italic" }, - { "ri", "Reverse Italic" }, - { "ro", "Reverse Oblique" }, - { "ot", "Other" } - }; - - for ( unsigned int i = 0; i < MembersOf(pTranslation); i++ ) - if ( strcmp(pStr, pTranslation[i].pFrom) == 0 ) - { - return new String( pTranslation[i].pTo, - RTL_TEXTENCODING_ISO_8859_1 ); - } - - return Capitalize(pStr, nLen); -} - -String* -AnnotateNone( const Attribute& ) -{ - return new String(); -} - -// --------------------------------------------------------------------------- -// -// -// manage global lists of Attributes -// since XListFonts does never list more than 64K fonts this storage does -// handle array size and indices with unsigned short values for low -// memory consumption -// -// -// --------------------------------------------------------------------------- - -AttributeStorage::AttributeStorage( unsigned short nDefaultValue ) : - mpList( NULL ), - mnSize( 0 ), - mnCount( 0 ), - mnLastmatch( 0 ), - mnDefaultValue( nDefaultValue ) -{ -} - -AttributeStorage::~AttributeStorage() -{ - if ( mpList != NULL ) - { - for ( int i = 0; i < mnCount; i++ ) - mpList[i].Release(); - free( mpList ); - } -} - -#if OSL_DEBUG_LEVEL > 1 -void -AttributeStorage::Dump() -{ - fprintf(stderr, "AttributeStorage: size=%i, used=%i\n", mnSize, mnCount); - for ( int i = 0; i < mnCount; i++ ) - { - ByteString aAnnotation = ByteString( - mpList[i].GetAnnotation(), - RTL_TEXTENCODING_ISO_8859_1 ); - fprintf(stderr, "\t%4i: <%s><len=%i><val=%i><%s>\n", i, mpList[i].GetName(), - mpList[i].GetLength(), mpList[i].GetValue(), - aAnnotation.GetBuffer() ); - } - fprintf(stderr, "\n"); -} -#endif - -Attribute* -AttributeStorage::Retrieve( unsigned short nIndex ) const -{ - return nIndex < mnCount ? &mpList[ nIndex ] : (Attribute*)NULL ; -} - -// pClassification contains a list of name-value pairs. If names in -// the AttributeStorage match those in the pClassification then -// the according value is copied. Matching means match for the length -// of the string in pClassification (i.e. arial matches arialnarrow) -// the strings in pClassification must be in alphabetical order, all -// strings Lowercase -void -AttributeStorage::AddClassification( Attribute *pClassification, - unsigned short nNum ) -{ - for ( int i = 0; i < mnCount; i++ ) - { - unsigned int nLower = 0; - unsigned int nUpper = nNum; - unsigned int nCurrent; - int nComparison = 1; - Attribute *pHaystack = 0, *pNeedle; - - pNeedle = &mpList[ i ]; - - // binary search - while ( nLower < nUpper ) - { - nCurrent = (nLower + nUpper) / 2; - pHaystack = &pClassification[ nCurrent ]; - nComparison = pNeedle->Compare( pHaystack->GetName(), - pHaystack->GetLength() ); - if (nComparison < 0) - nUpper = nCurrent; - else - if (nComparison > 0) - nLower = nCurrent + 1; - else - break; - } - - // if there's a match store the according classification in the - // Attribute storage, otherwise do nothing since defaults are - // already provided in AttributeStorage::Insert() - if ( nComparison == 0 ) - pNeedle->SetValue( pHaystack->GetValue() ); - } -} - -void -AttributeStorage::AddClassification( AttributeClassifierT Classify ) -{ - for ( int i = 0; i < mnCount; i++ ) - { - Attribute& rCurrent = mpList[i] ; - int nValue = Classify( rCurrent.GetName() ); - rCurrent.SetValue( nValue ); - } -} - -void -AttributeStorage::AddAnnotation( AttributeAnnotatorT Annotate ) -{ - for ( int i = 0; i < mnCount; i++ ) - { - String* pAnnotation = Annotate( mpList[i] ); - mpList[i].SetAnnotation( pAnnotation ); - } -} - -void -AttributeStorage::TagFeature( unsigned short nFeature ) -{ - for ( int i = 0; i < mnCount; i++ ) - mpList[i].TagFeature( nFeature ); -} - -// Enlarge the list of Attributes -void -AttributeStorage::Enlarge() -{ - if ( mnSize == 0 ) - { - mnSize = 8; - mpList = (Attribute*) malloc( mnSize * sizeof(Attribute) ); - } - else - { - mnSize = mnSize < 32768 ? (mnSize * 2) : 65535; - mpList = (Attribute*) realloc( mpList, mnSize * sizeof(Attribute) ); - } -} - -// nLength is the length as it would be reported by strlen(3) -// for an null-terminated string. if a string is part of a Xlfd -// the field separator '-' is taken as '\0' -// the AttributeStorage itself is NOT sorted to make sure that the -// leased keys are still valid -unsigned short -AttributeStorage::Insert( const char *pString, int nLength ) -{ - // check whether the last match is still equal to the current - // string since XListFonts lists fonts in sets of similar fontnames - if ( mnLastmatch < mnCount ) - { - if ( mpList[mnLastmatch].ExactMatch(pString, nLength) ) - return mnLastmatch; - } - - // otherwise search in list - for ( int i = 0; i < mnCount; i++ ) - { - if ( mpList[i].ExactMatch(pString, nLength) ) - return mnLastmatch = i; - } - - // if still not found we have to Insert the new string - if ( mnSize == mnCount ) - Enlarge(); - mpList[mnCount].SetName( pString, nLength ); - mpList[mnCount].SetValue( mnDefaultValue ); - mpList[mnCount].SetAnnotation( NULL ); - mpList[mnCount].SetFeature( XLFD_FEATURE_NONE ); - mpList[mnCount].InitKey( ); - mnLastmatch = mnCount; - mnCount = mnCount < 65535 ? mnCount + 1 : mnCount; - - return mnLastmatch; -} - - -// --------------------------------------------------------------------------- -// -// -// Attribute provider is a frame for a set of AttributeStorages. -// -// -// --------------------------------------------------------------------------- - -AttributeProvider::AttributeProvider () -{ - mpField[eXLFDFoundry ] = new AttributeStorage(0); - mpField[eXLFDFamilyName ] = new AttributeStorage(FAMILY_DONTKNOW); - mpField[eXLFDWeightName ] = new AttributeStorage(WEIGHT_NORMAL); - mpField[eXLFDSlant ] = new AttributeStorage(ITALIC_NONE); - mpField[eXLFDSetwidthName] = new AttributeStorage(WIDTH_NORMAL); - mpField[eXLFDAddstyleName] = new AttributeStorage(RTL_TEXTENCODING_DONTKNOW); - mpField[eXLFDCharset ] = new AttributeStorage(RTL_TEXTENCODING_DONTKNOW); -} - -AttributeProvider::~AttributeProvider() -{ - for ( int i = 0; i < eXLFDMaxEntry; i++ ) - delete mpField[ i ]; -} - -#if OSL_DEBUG_LEVEL > 1 -void -AttributeProvider::Dump() -{ - for ( int i = 0; i < eXLFDMaxEntry; i++ ) - mpField[ i ]->Dump(); -} -#endif - -extern "C" rtl_TextEncoding -GetTextEncodingFromAddStylename( const sal_Char *pAddStylename ) -{ - int nBufferLength = strlen( pAddStylename ) + 1; - sal_Char *pBuffer = (sal_Char*)alloca( nBufferLength ); - for ( int i = 0; i < nBufferLength; i++ ) - pBuffer[i] = pAddStylename[i] == '_' ? '-' : pAddStylename[i] ; - - return rtl_getTextEncodingFromUnixCharset( pBuffer ); -} - - -// classification information is needed before sorting because of course the -// classification is the sort criteria -void -AttributeProvider::AddClassification() -{ - /* mpField[ eXLFDFoundry ] doesn't need classification */ - mpField[ eXLFDFamilyName ]->AddClassification( - (Attribute*)pFamilyAttribute, - MembersOf(pFamilyAttribute) ); - mpField[ eXLFDWeightName ]->AddClassification( - (Attribute*)pWeightAttribute, - MembersOf(pWeightAttribute) ); - mpField[ eXLFDSlant ]->AddClassification( - (Attribute*)pSlantAttribute, - MembersOf(pSlantAttribute) ); - mpField[ eXLFDSetwidthName ]->AddClassification( - (Attribute*)pSetwidthAttribute, - MembersOf(pSetwidthAttribute) ); - mpField[ eXLFDAddstyleName ]->AddClassification( - GetTextEncodingFromAddStylename ); - mpField[ eXLFDCharset ]->AddClassification( - rtl_getTextEncodingFromUnixCharset ); -} - -// add some pretty print description -void -AttributeProvider::AddAnnotation() -{ - mpField[ eXLFDFoundry ]->AddAnnotation( AnnotateNone ); - mpField[ eXLFDFamilyName ]->AddAnnotation( AnnotateString ); - mpField[ eXLFDWeightName ]->AddAnnotation( AnnotateString ); - mpField[ eXLFDSlant ]->AddAnnotation( AnnotateSlant ); - mpField[ eXLFDSetwidthName ]->AddAnnotation( AnnotateString ); - mpField[ eXLFDAddstyleName ]->AddAnnotation( AnnotateNone ); - mpField[ eXLFDCharset ]->AddAnnotation( AnnotateNone ); -} - -// this is the misc or any section: dirty hacks for dirty xlfd usage -void -AttributeProvider::TagFeature() -{ - mpField[ eXLFDFamilyName ]->TagFeature( - XLFD_FEATURE_OL_GLYPH - | XLFD_FEATURE_OL_CURSOR - | XLFD_FEATURE_NARROW - | XLFD_FEATURE_INTERFACE_FONT - | XLFD_FEATURE_APPLICATION_FONT); - - mpField[ eXLFDSetwidthName ]->TagFeature( - XLFD_FEATURE_NARROW ); - - mpField[ eXLFDAddstyleName ]->TagFeature( - XLFD_FEATURE_REDUNDANTSTYLE ); -} - diff --git a/vcl/unx/source/gdi/xlfd_attr.hxx b/vcl/unx/source/gdi/xlfd_attr.hxx deleted file mode 100644 index b721310da506..000000000000 --- a/vcl/unx/source/gdi/xlfd_attr.hxx +++ /dev/null @@ -1,228 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef XLFD_ATTRIBUTE_HXX -#define XLFD_ATTRIBUTE_HXX - -#include <salunx.h> -#include <tools/string.hxx> - - -struct Attribute { - - const char* mpName; - unsigned short mnLength; - unsigned short mnValue; - unsigned short mnFeature; - String* mpAnnotation; - rtl::OString* mpKeyName; - - const char* GetName() const - { return mpName; } - unsigned short GetValue() const - { return mnValue; } - unsigned short GetLength() const - { return mnLength; } - Bool HasFeature( unsigned short nFeature ) const - { return ((mnFeature & nFeature) != 0); } - const String &GetAnnotation() const - { return *mpAnnotation; } - const rtl::OString& - GetKey(); - void InitKey(); - - void SetName( const char *p, int nLen ); - void SetValue( unsigned short nIn ) - { mnValue = nIn; } - void SetAnnotation( String *pString ) - { mpAnnotation = pString; } - void SetFeature( unsigned short nFeature ) - { mnFeature = nFeature; } - void TagFeature( unsigned short nFeature ); - - int Compare( const char *p, int nLen ); - Bool ExactMatch( const char *p, int nLen ); - void Release(); -}; - - -void -AppendAttribute( Attribute *pAttribute, ByteString &rString ); - - -typedef String*(*AttributeAnnotatorT)(const Attribute &rAttribute); -extern "C" { -typedef rtl_TextEncoding(*AttributeClassifierT)(const char* pStr); -} - -#define XLFD_FEATURE_NONE 0x0000 -#define XLFD_FEATURE_NARROW 0x0001 -#define XLFD_FEATURE_OL_GLYPH 0x0002 -#define XLFD_FEATURE_OL_CURSOR 0x0004 -#define XLFD_FEATURE_REDUNDANTSTYLE 0x0008 -#define XLFD_FEATURE_APPLICATION_FONT 0x0010 - -#define XLFD_FEATURE_INTERFACE_FONT 0x0020 -#define XLFD_FEATURE_LQ 0x0040 -#define XLFD_FEATURE_MQ 0x0080 -#define XLFD_FEATURE_HQ 0x0100 - -// --------------------------------------------------------------------------- -// -// -// manage global lists of Attributes -// since XListFonts does never list more than 64K fonts this storage does -// handle array size and indices with unsigned short values for low -// memory consumption -// -// -// --------------------------------------------------------------------------- - -class AttributeStorage { - - private: - - Attribute* mpList; - unsigned short mnSize; - unsigned short mnCount; - unsigned short mnLastmatch; - unsigned short mnDefaultValue; - - void Enlarge(); - AttributeStorage(); - - public: - - AttributeStorage( unsigned short nDefaultValue ); - ~AttributeStorage(); - unsigned short Insert( const char *pString, int nLength ); - Attribute* Retrieve( unsigned short nIndex ) const ; - void AddClassification( Attribute *pClassification, - unsigned short nNum ); - void AddClassification( AttributeClassifierT Classify ); - void TagFeature( unsigned short nFeature ); - void AddAnnotation( AttributeAnnotatorT Annotate ); - #if OSL_DEBUG_LEVEL > 1 - void Dump(); - #endif -}; - - -// --------------------------------------------------------------------------- -// -// -// Attribute provider is a frame for a set of AttributeStorages. For XLFD -// interpretation and efficient storage, AttributeStorages for foundry, -// family_name, weight_name, slant, setwidth_name, add_style_name and combined -// charset_registry and charset_encoding are used. pixel_size, point_size, -// resolution_x and resolution_y are stored as numbers. please note that this -// does not allow storage of matrix-enhanced fonts. spacing is stored as -// a char, since only the 'm', 'c' and 'p' types are defined. -// -// -// --------------------------------------------------------------------------- - -enum eXLFDAttributeT { - eXLFDFoundry = 0, - eXLFDFamilyName, - eXLFDWeightName, - eXLFDSlant, - eXLFDSetwidthName, - eXLFDAddstyleName, - eXLFDCharset, - eXLFDMaxEntry -}; - -class AttributeProvider { - - private: - - AttributeStorage* mpField[ eXLFDMaxEntry ]; - - AttributeStorage* GetField( eXLFDAttributeT eXLFDField ) - { return mpField[ eXLFDField]; } - public: - - AttributeProvider (); - ~AttributeProvider (); - - void AddClassification(); - void AddAnnotation(); - void TagFeature(); - #if OSL_DEBUG_LEVEL > 1 - void Dump(); - #endif - - // these are just shortcuts or proxies for the most common used - // AttributeStorage functionality - AttributeStorage* GetFoundry() - { return GetField(eXLFDFoundry); } - AttributeStorage* GetFamily() - { return GetField(eXLFDFamilyName); } - AttributeStorage* GetWeight() - { return GetField(eXLFDWeightName); } - AttributeStorage* GetSlant() - { return GetField(eXLFDSlant); } - AttributeStorage* GetSetwidth() - { return GetField(eXLFDSetwidthName); } - AttributeStorage* GetAddstyle() - { return GetField(eXLFDAddstyleName); } - AttributeStorage* GetCharset() - { return GetField(eXLFDCharset); } - - Attribute* RetrieveFoundry( unsigned short nIndex ) - { return GetFoundry()->Retrieve(nIndex); } - Attribute* RetrieveFamily( unsigned short nIndex ) - { return GetFamily()->Retrieve(nIndex); } - Attribute* RetrieveWeight( unsigned short nIndex ) - { return GetWeight()->Retrieve(nIndex); } - Attribute* RetrieveSlant( unsigned short nIndex ) - { return GetSlant()->Retrieve(nIndex); } - Attribute* RetrieveSetwidth( unsigned short nIndex ) - { return GetSetwidth()->Retrieve(nIndex); } - Attribute* RetrieveAddstyle( unsigned short nIndex ) - { return GetAddstyle()->Retrieve(nIndex); } - Attribute* RetrieveCharset( unsigned short nIndex ) - { return GetCharset()->Retrieve(nIndex); } - - unsigned short InsertFoundry( const char *pString, int nLength ) - { return GetFoundry()->Insert(pString, nLength); } - unsigned short InsertFamily( const char *pString, int nLength ) - { return GetFamily()->Insert(pString, nLength); } - unsigned short InsertWeight( const char *pString, int nLength ) - { return GetWeight()->Insert(pString, nLength); } - unsigned short InsertSlant( const char *pString, int nLength ) - { return GetSlant()->Insert(pString, nLength); } - unsigned short InsertSetwidth( const char *pString, int nLength ) - { return GetSetwidth()->Insert(pString, nLength);} - unsigned short InsertAddstyle( const char *pString, int nLength ) - { return GetAddstyle()->Insert(pString, nLength);} - unsigned short InsertCharset( const char *pString, int nLength ) - { return GetCharset()->Insert(pString, nLength); } -}; - -#endif /* XLFD_ATTRIBUTE_HXX */ - diff --git a/vcl/unx/source/gdi/xlfd_extd.cxx b/vcl/unx/source/gdi/xlfd_extd.cxx deleted file mode 100644 index 73731eddf115..000000000000 --- a/vcl/unx/source/gdi/xlfd_extd.cxx +++ /dev/null @@ -1,1001 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_vcl.hxx" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "xlfd_attr.hxx" -#include "xlfd_smpl.hxx" -#include "xlfd_extd.hxx" -#include <vcl/outfont.hxx> -#include <rtl/alloc.h> - -#ifndef _RTL_TENCINFO_H_ -#include <rtl/tencinfo.h> -#endif - -#include <set> - -// -------------------------------------------------------------------------- - -ImplX11FontData::ImplX11FontData( const ExtendedXlfd& rXlfd, int nHeight ) -: ImplFontData( rXlfd, X11IFD_MAGIC ), - mrXlfd( rXlfd ) -{ - mnHeight = nHeight; - mnWidth = 0; -} - -ImplFontEntry* ImplX11FontData::CreateFontInstance( ImplFontSelectData& rFSD ) const -{ - ImplFontEntry* pEntry = new ImplFontEntry( rFSD ); - return pEntry; -} - -sal_IntPtr ImplX11FontData::GetFontId() const -{ - return reinterpret_cast<sal_IntPtr>(&mrXlfd); -} - -// -------------------------------------------------------------------------- -// -// classes for Xlfd handling that contain more than a single encoding. -// Members that may vary through different encodings are stored in -// a mpEncodingInfo member. There are three different classes: -// true scalable fonts (truetype and type1) scalable bitmap fonts -// (the ugly ones) and bitmap fonts. The ExtendedXlfd stores all the members -// that are specific to a font outline -// ( e.g. adobe-times-roman-medium-r-normal- X -p- X ) -// and specifies the interface. -// -// -------------------------------------------------------------------------- - -ExtendedXlfd::EncodingInfo& -ExtendedXlfd::EncodingInfo::operator= ( const Xlfd *pXlfd ) -{ - mcSpacing = pXlfd->mcSpacing; - mnResolutionX = pXlfd->mnResolutionX; - mnResolutionY = pXlfd->mnResolutionY; - mnAddstyle = pXlfd->mnAddstyle; - mnCharset = pXlfd->mnCharset; - mnEncoding = pXlfd->GetEncoding(); - - return *this; -} - -// ------ base class -------------------------------------------------------- - -ExtendedXlfd::ExtendedXlfd( bool bScalable ) -: mbScalable( bScalable ), - mnEncodings( 0 ), - mnEncCapacity( 0 ), - mpEncodingInfo( NULL ) -{ - mbOrientation = false; - mbDevice = false; - mbSubsettable = false; - mbEmbeddable = false; - - mnQuality = -1; -} - -ExtendedXlfd::~ExtendedXlfd() -{ - if ( mnEncodings != 0 ) - rtl_freeMemory( mpEncodingInfo ); -} - -inline void* -Realloc( void *pPtr, sal_Size nSize ) -{ - return rtl_reallocateMemory( pPtr, nSize ); -} - -int -ExtendedXlfd::GetEncodingIdx( rtl_TextEncoding nEncoding ) const -{ - for ( int i = 0; i < mnEncodings; i++ ) - if ( nEncoding == mpEncodingInfo[i].mnEncoding ) - return i; - return -1; -} - -bool -ExtendedXlfd::HasEncoding( rtl_TextEncoding nEncoding ) const -{ - return !(GetEncodingIdx( nEncoding ) < 0) ; -} - -rtl_TextEncoding -ExtendedXlfd::GetEncoding( int i ) const -{ - if ( i < mnEncodings && i >= 0 ) - return mpEncodingInfo[i].mnEncoding; - - return RTL_TEXTENCODING_DONTKNOW; -} - -rtl_TextEncoding -ExtendedXlfd::GetEncoding() const -{ - return mnEncodings == 1 ? mpEncodingInfo[0].mnEncoding : RTL_TEXTENCODING_DONTKNOW; -} - -// query the most unicode / Ascii compatible font: either one of the fonts -// is utf16 encoded or there's a single byte font which is unicode -// compatible for the first 256 chars (latin1) or for at least 128 -// chars (most latin-X encodings, cyrillic encodings) -rtl_TextEncoding -ExtendedXlfd::GetAsciiEncoding( int *pAsciiRange ) const -{ - rtl_TextEncoding nBestEncoding = RTL_TEXTENCODING_DONTKNOW; - int nLargestRange = 0x0000; - - for ( int i = 0; i < mnEncodings && nLargestRange < 0xffff; i++ ) - { - rtl_TextEncoding nCurEncoding = mpEncodingInfo[i].mnEncoding; - switch ( nCurEncoding ) - { - case RTL_TEXTENCODING_UNICODE: - nLargestRange = 0xffff; - nBestEncoding = nCurEncoding; - break; - - case RTL_TEXTENCODING_ISO_8859_1: - case RTL_TEXTENCODING_MS_1252: - nLargestRange = 0x00ff; - nBestEncoding = nCurEncoding; - break; - - case RTL_TEXTENCODING_ISO_8859_2: - case RTL_TEXTENCODING_ISO_8859_4: - case RTL_TEXTENCODING_ISO_8859_5: - case RTL_TEXTENCODING_ISO_8859_6: - case RTL_TEXTENCODING_ISO_8859_7: - case RTL_TEXTENCODING_ISO_8859_8: - case RTL_TEXTENCODING_ISO_8859_9: - case RTL_TEXTENCODING_ISO_8859_13: - case RTL_TEXTENCODING_ISO_8859_15: - case RTL_TEXTENCODING_MS_1251: - case RTL_TEXTENCODING_KOI8_R: - case RTL_TEXTENCODING_JIS_X_0201: - if ( nLargestRange < 0x0080 ) - { - nLargestRange = 0x0080; - nBestEncoding = nCurEncoding; - } - break; - - default: - if ( nLargestRange == 0x0000 ) - { - nBestEncoding = nCurEncoding; - } - break; - } - } - - if ( pAsciiRange != NULL ) - *pAsciiRange = nLargestRange; - - return nBestEncoding; -} - -bool -ExtendedXlfd::AddEncoding( const Xlfd *pXlfd ) -{ - rtl_TextEncoding nEncoding = pXlfd->GetEncoding(); - if ( HasEncoding(nEncoding) ) - return false; - - if ( mnEncodings == 0 ) - { - // bootstrap - mnFoundry = pXlfd->mnFoundry; - mnFamily = pXlfd->mnFamily; - mnWeight = pXlfd->mnWeight; - mnSlant = pXlfd->mnSlant; - mnSetwidth = pXlfd->mnSetwidth; - mpFactory = pXlfd->mpFactory; - - Attribute *pFamilyAttr = mpFactory->RetrieveFamily( mnFamily ); - Attribute *pWeightAttr = mpFactory->RetrieveWeight( mnWeight ); - Attribute *pWidthAttr = mpFactory->RetrieveSetwidth( mnSetwidth ); - Attribute *pSlantAttr = mpFactory->RetrieveSlant( mnSlant ); - - meFamily = GetFamilyType(); - meWeight = GetWeight(); - meItalic = GetSlant(); - meWidthType = GetWidthType(); - mbSymbolFlag= (GetEncoding() == RTL_TEXTENCODING_SYMBOL); - mePitch = GetPitch(); - - maName = pFamilyAttr->GetAnnotation(); - - // the helvetica narrow hack - if ( ! pFamilyAttr->HasFeature(XLFD_FEATURE_NARROW) - && pWidthAttr->HasFeature(XLFD_FEATURE_NARROW) ) - { - static const String aNarrow( RTL_CONSTASCII_USTRINGPARAM(" Narrow") ); - maName += aNarrow; - } - - // stylename = weight + slant + width - // XXX Fix me: there may be a space missing between them - if ( meWeight != WEIGHT_NORMAL ) - maStyleName += pWeightAttr->GetAnnotation(); - if ( meItalic != ITALIC_NONE ) - maStyleName += pSlantAttr->GetAnnotation(); - if ( (meWidthType != WIDTH_NORMAL) - && (! pWidthAttr->HasFeature(XLFD_FEATURE_NARROW)) ) - maStyleName += pWidthAttr->GetAnnotation(); - } - - if( mnEncodings <= mnEncCapacity ) - { - mnEncCapacity += mnEncodings + 4; - mpEncodingInfo = (EncodingInfo*)Realloc( mpEncodingInfo, mnEncCapacity * sizeof(EncodingInfo) ); - } - - mpEncodingInfo[ mnEncodings ] = pXlfd; - mnEncodings += 1; - return true; -} - -void -ExtendedXlfd::ToString( ByteString &rString, - unsigned short /*nPixelSize*/, rtl_TextEncoding /*nEncoding*/ ) const -{ - AppendAttribute( mpFactory->RetrieveFoundry(mnFoundry), rString ); - AppendAttribute( mpFactory->RetrieveFamily(mnFamily), rString ); - AppendAttribute( mpFactory->RetrieveWeight(mnWeight), rString ); - AppendAttribute( mpFactory->RetrieveSlant(mnSlant), rString ); - AppendAttribute( mpFactory->RetrieveSetwidth(mnSetwidth), rString ); -} - -void -ExtendedXlfd::ToString( ByteString &rString, - unsigned short /*nPixelSize*/, char* /*pMatricsString*/, rtl_TextEncoding /*nEncoding*/ ) const -{ - AppendAttribute( mpFactory->RetrieveFoundry(mnFoundry), rString ); - AppendAttribute( mpFactory->RetrieveFamily(mnFamily), rString ); - AppendAttribute( mpFactory->RetrieveWeight(mnWeight), rString ); - AppendAttribute( mpFactory->RetrieveSlant(mnSlant), rString ); - AppendAttribute( mpFactory->RetrieveSetwidth(mnSetwidth), rString ); -} - -static FontPitch GetPitchFromX11Pitch( const char cSpacing ) -{ - switch ( cSpacing ) - { - case 'c': // fall through - case 'm': return PITCH_FIXED; - case 'p': return PITCH_VARIABLE; - default: return PITCH_DONTKNOW; - } -} - -// you must not call any of the ExtendedXlfd::GetXXX() functions if the -// ExtendedXlfd is really empty (i.e. mnEncodings is zero) - -FontPitch ExtendedXlfd::GetPitch() const -{ - if( mnEncodings > 1 ) - return PITCH_VARIABLE; - if( mnEncodings == 1 ) - return GetPitchFromX11Pitch( mpEncodingInfo[0].mcSpacing ); - return PITCH_DONTKNOW; -} - -FontPitch ExtendedXlfd::GetPitch( rtl_TextEncoding nEncoding ) const -{ - for ( int nIdx = 0; nIdx < mnEncodings; nIdx++ ) - if ( mpEncodingInfo[nIdx].mnEncoding == nEncoding ) - return GetPitchFromX11Pitch( mpEncodingInfo[nIdx].mcSpacing ); - return PITCH_DONTKNOW; -} - -FontFamily ExtendedXlfd::GetFamilyType() const -{ - Attribute *pFamilyAttr= mpFactory->RetrieveFamily(mnFamily); - return (FontFamily)pFamilyAttr->GetValue(); -} - -FontWeight ExtendedXlfd::GetWeight() const -{ - Attribute *pWeightAttr = mpFactory->RetrieveWeight(mnWeight); - return (FontWeight)pWeightAttr->GetValue(); -} - -FontItalic ExtendedXlfd::GetSlant() const -{ - Attribute *pSlantAttr = mpFactory->RetrieveSlant(mnSlant); - return (FontItalic)pSlantAttr->GetValue(); -} - -FontWidth ExtendedXlfd::GetWidthType() const -{ - Attribute *pWidthAttr = mpFactory->RetrieveSetwidth(mnSetwidth); - return (FontWidth)pWidthAttr->GetValue(); -} - -class CodeRange -{ -public: - CodeRange( int nMin, int nEnd ) : mnMin( nMin ), mnEnd( nEnd ) {} - - sal_uInt32 GetMin() const { return mnMin; } - sal_uInt32 GetEnd() const { return mnEnd; } - - bool operator<( const CodeRange& r ) const - { return (mnMin<r.mnMin) || ((mnMin==r.mnMin) && (mnEnd<r.mnEnd)); } - -private: - sal_uInt32 mnMin, mnEnd; -}; - - -int ExtendedXlfd::GetFontCodeRanges( sal_uInt32* pCodePairs ) const -{ - bool bHasUnicode = false; - bool bHasUnknownEncoding = false; - - // approximate unicode ranges from encodings - typedef std::set<CodeRange> RangeSet; - RangeSet aRangeSet; - - for( unsigned short i = 0; i < mnEncodings; ++i ) - { - // TODO: move encoding -> unicode range mapping to RTL - // NOTE: for now only some are VERY roughly approximated - const rtl_TextEncoding eEncoding = mpEncodingInfo[i].mnEncoding; - switch( mpEncodingInfo[i].mnEncoding ) - { - case RTL_TEXTENCODING_SYMBOL: // postscript symbol encoding - aRangeSet.insert( CodeRange( 0x0020, 0x0100 ) ); // symbol aliasing - aRangeSet.insert( CodeRange( 0xF020, 0xF100 ) ); - break; - - case RTL_TEXTENCODING_ISO_8859_15: - aRangeSet.insert( CodeRange( 0x20AC, 0x20AD ) ); // Euro currency symbol - // fall through - case RTL_TEXTENCODING_APPLE_ROMAN: - case RTL_TEXTENCODING_ISO_8859_1: - case RTL_TEXTENCODING_MS_1252: - case RTL_TEXTENCODING_IBM_437: - case RTL_TEXTENCODING_IBM_852: - aRangeSet.insert( CodeRange( 0x0020, 0x0080 ) ); - aRangeSet.insert( CodeRange( 0x00A0, 0x0100 ) ); - break; - - // Traditional, Simplified, Japanese - case RTL_TEXTENCODING_APPLE_CHINSIMP: - case RTL_TEXTENCODING_APPLE_CHINTRAD: - case RTL_TEXTENCODING_APPLE_JAPANESE: - case RTL_TEXTENCODING_SHIFT_JIS: - case RTL_TEXTENCODING_GB_2312: - case RTL_TEXTENCODING_GBT_12345: - case RTL_TEXTENCODING_GBK: - case RTL_TEXTENCODING_BIG5: - case RTL_TEXTENCODING_EUC_JP: - case RTL_TEXTENCODING_EUC_CN: - case RTL_TEXTENCODING_EUC_TW: - case RTL_TEXTENCODING_ISO_2022_JP: - case RTL_TEXTENCODING_ISO_2022_CN: - case RTL_TEXTENCODING_GB_18030: - case RTL_TEXTENCODING_BIG5_HKSCS: - case RTL_TEXTENCODING_JIS_X_0201: - case RTL_TEXTENCODING_JIS_X_0208: - case RTL_TEXTENCODING_JIS_X_0212: - case RTL_TEXTENCODING_MS_932: - case RTL_TEXTENCODING_MS_936: - case RTL_TEXTENCODING_MS_950: - aRangeSet.insert( CodeRange( 0x3000, 0xA000 ) ); - aRangeSet.insert( CodeRange( 0xF900, 0xFB00 ) ); - break; - - // Korean - case RTL_TEXTENCODING_APPLE_KOREAN: - case RTL_TEXTENCODING_MS_949: - case RTL_TEXTENCODING_MS_1361: - case RTL_TEXTENCODING_EUC_KR: - case RTL_TEXTENCODING_ISO_2022_KR: - aRangeSet.insert( CodeRange( 0x1100, 0x1200 ) ); - aRangeSet.insert( CodeRange( 0x3130, 0x3190 ) ); - aRangeSet.insert( CodeRange( 0xAC00, 0xD7A4 ) ); - break; - - // unknown encoding - case RTL_TEXTENCODING_DONTKNOW: - bHasUnknownEncoding = true; - break; - - // Unicode - case RTL_TEXTENCODING_UNICODE: - case RTL_TEXTENCODING_UTF7: - case RTL_TEXTENCODING_UTF8: - bHasUnicode = true; - break; - - // misc 8bit encodings - default: - if( !rtl_isOctetTextEncoding( eEncoding ) ) - bHasUnknownEncoding = true; - else - { - // use the unicode converter to get the coverage of an 8bit encoding - rtl_TextToUnicodeConverter aConverter = rtl_createTextToUnicodeConverter( eEncoding ); - rtl_UnicodeToTextContext aCvtContext = rtl_createTextToUnicodeContext( aConverter ); - if( !aConverter || !aCvtContext ) - bHasUnknownEncoding = true; - else - { - sal_Char cCharsInp[ 0x100 ]; - for( int j = 0x20; j < 0x080; ++j ) - cCharsInp[ j-0x20 ] = j; - for( int j = 0xA0; j < 0x100; ++j ) - cCharsInp[ j-0x40 ] = j; - - sal_Unicode cCharsOut[ 0x100 ]; - sal_uInt32 nCvtInfo; - sal_Size nSrcCvtBytes; - int nOutLen = rtl_convertTextToUnicode( - aConverter, aCvtContext, - cCharsInp, 0xC0, - cCharsOut, sizeof(cCharsOut)/sizeof(*cCharsOut), - RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE - | RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE, - &nCvtInfo, &nSrcCvtBytes ); - - for( int j = 0; j < nOutLen; ++j ) - aRangeSet.insert( CodeRange( cCharsOut[j], cCharsOut[j]+1 ) ); - - rtl_destroyTextToUnicodeConverter( aCvtContext ); - rtl_destroyTextToUnicodeConverter( aConverter ); - } - } - break; - } - } - - // unicode encoded fonts usually do not cover the entire unicode range - // => only use them to determine coverage when no other encodings are available - if( aRangeSet.empty() && (bHasUnicode || bHasUnknownEncoding) ) - { - if( pCodePairs ) - { - pCodePairs[0] = 0x0020; - pCodePairs[1] = 0xD800; - pCodePairs[2] = 0xE000; - pCodePairs[3] = 0xFFFE; - } - return 2; - } - - if( aRangeSet.empty() ) - return 0; - - // sort and merge the code pairs - sal_uInt32* pDst = pCodePairs; - RangeSet::const_iterator it = aRangeSet.begin(); - for( sal_uInt32 nEnd = 0; it != aRangeSet.end(); ++it ) - { - // check overlap with to previous range - const CodeRange& rSrc = *it; - if( nEnd < rSrc.GetMin() ) - { - nEnd = rSrc.GetEnd(); - if( pCodePairs ) - { - pDst[0] = rSrc.GetMin(); - pDst[1] = rSrc.GetEnd(); - } - pDst += 2; - } - else - { - // merge overlapping ranges - if( nEnd < rSrc.GetEnd() ) - { - nEnd = rSrc.GetEnd(); - if( pCodePairs ) - pDst[-1] = nEnd; - } - } - } - - int nRangeCount = (pDst - pCodePairs) / 2; - return nRangeCount; -} - -// ------ class to handle scalable bitmap fonts ------------------------------ - -ScalableBitmapXlfd::ScalableBitmapXlfd() -: ExtendedXlfd( true ) -{} - -ScalableBitmapXlfd::~ScalableBitmapXlfd() -{} - -void -ScalableBitmapXlfd::ToString( ByteString &rString, - unsigned short nPixelSize, rtl_TextEncoding nEncoding ) const -{ - int nIdx = GetEncodingIdx( nEncoding ); - if ( nIdx < 0 ) - return; - - ExtendedXlfd::ToString( rString, nPixelSize, nEncoding ); - EncodingInfo& rInfo = mpEncodingInfo[ nIdx ]; - - AppendAttribute( mpFactory->RetrieveAddstyle(rInfo.mnAddstyle), rString ); - - rString += '-'; - rString += ByteString::CreateFromInt32( nPixelSize ); - rString += "-0-"; - rString += ByteString::CreateFromInt32( rInfo.mnResolutionX ); - rString += '-'; - rString += ByteString::CreateFromInt32( rInfo.mnResolutionY ); - rString += '-'; - rString += static_cast< char >(rInfo.mcSpacing); - rString += "-0"; - - AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); -} - -void -ScalableBitmapXlfd::ToString( ByteString &rString, - unsigned short nPixelSize, char *pMatricsString, rtl_TextEncoding nEncoding ) const -{ - int nIdx = GetEncodingIdx( nEncoding ); - if ( nIdx < 0 ) - return; - - ExtendedXlfd::ToString( rString, nPixelSize, nEncoding ); - EncodingInfo& rInfo = mpEncodingInfo[ nIdx ]; - - AppendAttribute( mpFactory->RetrieveAddstyle(rInfo.mnAddstyle), rString ); - - rString += "-*-"; - char pTmp[256]; - snprintf( pTmp, sizeof(pTmp), pMatricsString, nPixelSize, nPixelSize ); - rString += pTmp; - rString += "-*-*-"; - rString += static_cast< char >(rInfo.mcSpacing); - rString += "-*"; - - AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); -} - -ImplFontData* ScalableBitmapXlfd::GetImplFontData() const -{ - ImplX11FontData* pFontData = new ImplX11FontData( *this, 0 ); - pFontData->mnQuality= 0; - return pFontData; -} - -// ------ class to handle true bitmap fonts ---------------------------------- - -void -BitmapXlfd::ToString( ByteString &rString, - unsigned short nPixelSize, char *pMatricsString, rtl_TextEncoding nEncoding ) const -{ - int nIdx = GetEncodingIdx( nEncoding ); - if ( nIdx < 0 ) - return; - - ExtendedXlfd::ToString( rString, nPixelSize, nEncoding ); - EncodingInfo& rInfo = mpEncodingInfo[ nIdx ]; - - AppendAttribute( mpFactory->RetrieveAddstyle(rInfo.mnAddstyle), rString ); - - rString += "-*-"; - char pTmp[256]; - snprintf( pTmp, sizeof(pTmp), pMatricsString, nPixelSize, nPixelSize ); - rString += pTmp; - rString += "-*-*-"; - rString += static_cast< char >(rInfo.mcSpacing); - rString += "-*"; - - AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); -} - -BitmapXlfd::BitmapXlfd( ) -: ExtendedXlfd( false ) -{} - -BitmapXlfd::~BitmapXlfd( ) -{} - -bool -BitmapXlfd::AddEncoding( const Xlfd *pXlfd ) -{ - if ( mnEncodings == 0 ) - { - mnPixelSize = pXlfd->mnPixelSize; - mnPointSize = pXlfd->mnPointSize; - mnAverageWidth = pXlfd->mnAverageWidth; - } - - return ExtendedXlfd::AddEncoding( pXlfd ); -} - -void -BitmapXlfd::ToString( ByteString &rString, - unsigned short nPixelSize, rtl_TextEncoding nEncoding ) const -{ - int nIdx = GetEncodingIdx( nEncoding ); - if ( nIdx < 0 ) - return; - - ExtendedXlfd::ToString( rString, nPixelSize, nEncoding ); - EncodingInfo& rInfo = mpEncodingInfo[ nIdx ]; - AppendAttribute( mpFactory->RetrieveAddstyle(rInfo.mnAddstyle), rString ); - rString += '-'; - rString += ByteString::CreateFromInt32( mnPixelSize ); - rString += "-*-*-*-"; - rString += static_cast< char >(rInfo.mcSpacing); - rString += "-*"; - - AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); -} - -ImplFontData* BitmapXlfd::GetImplFontData() const -{ - ImplX11FontData* pFontData = new ImplX11FontData( *this, mnPixelSize ); - pFontData->mnQuality= 100; - return pFontData; -} - -// ------ class to handle true scalable fonts -------------------------------- - -ScalableXlfd::ScalableXlfd() -: ExtendedXlfd( true ) -{} - -ScalableXlfd::~ScalableXlfd() -{} - -void -ScalableXlfd::ToString( ByteString &rString, - unsigned short nPixelSize, rtl_TextEncoding nEncoding ) const -{ - int nIdx = GetEncodingIdx( nEncoding ); - if ( nIdx < 0 ) - return; - - ExtendedXlfd::ToString( rString, nPixelSize, nEncoding); - - EncodingInfo& rInfo = mpEncodingInfo[ nIdx ]; - AppendAttribute( mpFactory->RetrieveAddstyle(rInfo.mnAddstyle), rString ); - - rString += '-'; - rString += ByteString::CreateFromInt32( nPixelSize ); - rString += "-0-0-0-"; - rString += static_cast< char >(rInfo.mcSpacing); - rString += "-0"; - - AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); -} - -void -ScalableXlfd::ToString( ByteString &rString, - unsigned short nPixelSize, char* pMatricsString, rtl_TextEncoding nEncoding ) const -{ - int nIdx = GetEncodingIdx( nEncoding ); - if ( nIdx < 0 ) - return; - - ExtendedXlfd::ToString( rString, nPixelSize, nEncoding); - - EncodingInfo& rInfo = mpEncodingInfo[ nIdx ]; - AppendAttribute( mpFactory->RetrieveAddstyle(rInfo.mnAddstyle), rString ); - - rString += "-*-"; - char pTmp[256]; - snprintf( pTmp, sizeof(pTmp), pMatricsString, nPixelSize, nPixelSize ); - rString += pTmp; - rString += "-*-*-"; - rString += static_cast< char >(rInfo.mcSpacing); - rString += "-*"; - - AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); -} - -ImplFontData* ScalableXlfd::GetImplFontData() const -{ - ImplX11FontData* pFontData = new ImplX11FontData( *this, 0 ); - pFontData->mnQuality= 200; - return pFontData; -} - -/* ------- virtual fonts for user interface ------------------------------- */ - -VirtualXlfd::ExtEncodingInfo& -VirtualXlfd::ExtEncodingInfo::operator= ( const Xlfd *pXlfd ) -{ - mnFoundry = pXlfd->mnFoundry; - mnFamily = pXlfd->mnFamily; - mnWeight = pXlfd->mnWeight; - mnSlant = pXlfd->mnSlant; - mnSetwidth = pXlfd->mnSetwidth; - - return *this; -} - -VirtualXlfd::VirtualXlfd() -: ExtendedXlfd( true ), - mnExtCapacity(0), - mpExtEncodingInfo(NULL) -{ - mnFoundry = 0; - mnFamily = 0; - mnWeight = 0; - mnSlant = 0; - mnSetwidth = 0; -} - -VirtualXlfd::~VirtualXlfd() -{ - if ( mpExtEncodingInfo != NULL ) - rtl_freeMemory( mpExtEncodingInfo ); -} - -int -VirtualXlfd::GetFontQuality (unsigned short nFamily) -{ - Attribute *pFamily = mpFactory->RetrieveFamily(nFamily); - int nQuality = 0; - - if (pFamily->HasFeature(XLFD_FEATURE_HQ)) - nQuality += 16; - if (pFamily->HasFeature(XLFD_FEATURE_MQ)) - nQuality += 8; - if (pFamily->HasFeature(XLFD_FEATURE_LQ)) - nQuality += 4; - return nQuality; -} - -bool -VirtualXlfd::AddEncoding( const Xlfd *pXlfd ) -{ - // add new font - bool bRC = ExtendedXlfd::AddEncoding( pXlfd ); - - int nIdx; - if( bRC ) - { - // new encoding => append the new pXlfd - nIdx = mnEncodings - 1; - if( nIdx >= mnExtCapacity ) - { - mnExtCapacity = mnEncCapacity; - mpExtEncodingInfo = (ExtEncodingInfo*)Realloc( mpExtEncodingInfo, - mnExtCapacity * sizeof(ExtEncodingInfo) ); - } - } - else - { - // existing encoding => check if the new pXlfd is better - rtl_TextEncoding nEncoding = pXlfd->GetEncoding(); - nIdx = GetEncodingIdx( nEncoding ); - - int nOldQuality = GetFontQuality( mpExtEncodingInfo[nIdx].mnFamily ); - int nNewQuality = GetFontQuality( pXlfd->mnFamily ); - if( nOldQuality >= nNewQuality ) - return false; - } - - mpExtEncodingInfo[ nIdx ] = pXlfd; - return true; -} - -void -VirtualXlfd::FilterInterfaceFont (const Xlfd *pXlfd) -{ - Attribute *pAttr; - AttributeProvider *pFactory = pXlfd->mpFactory; - - if (! pXlfd->Fonttype() == TYPE_SCALABLE) - return; - pAttr = pFactory->RetrieveFamily(pXlfd->mnFamily); - if (! pAttr->HasFeature(XLFD_FEATURE_INTERFACE_FONT)) - return; - pAttr = pFactory->RetrieveSlant(pXlfd->mnSlant); - if (! (FontItalic)pAttr->GetValue() == ITALIC_NONE) - return; - pAttr = pFactory->RetrieveSetwidth(pXlfd->mnSetwidth); - if (pAttr->HasFeature(XLFD_FEATURE_NARROW)) - return; - pAttr = pFactory->RetrieveWeight(pXlfd->mnWeight); - FontWeight eWeight = (FontWeight)pAttr->GetValue(); - if ((eWeight != WEIGHT_NORMAL) && (eWeight != WEIGHT_MEDIUM)) - return; - - AddEncoding (pXlfd); -} - -void -VirtualXlfd::ToString( ByteString &rString, unsigned short nPixelSize, - rtl_TextEncoding nEncoding ) const -{ - int nIdx = GetEncodingIdx( nEncoding ); - if ( nIdx < 0 ) - return; - - ExtEncodingInfo &rExtInfo = mpExtEncodingInfo[ nIdx ]; - - AppendAttribute( mpFactory->RetrieveFoundry(rExtInfo.mnFoundry), rString ); - AppendAttribute( mpFactory->RetrieveFamily(rExtInfo.mnFamily), rString ); - AppendAttribute( mpFactory->RetrieveWeight(rExtInfo.mnWeight), rString ); - AppendAttribute( mpFactory->RetrieveSlant(rExtInfo.mnSlant), rString ); - AppendAttribute( mpFactory->RetrieveSetwidth(rExtInfo.mnSetwidth), rString ); - - EncodingInfo& rInfo = mpEncodingInfo[ nIdx ]; - AppendAttribute( mpFactory->RetrieveAddstyle(rInfo.mnAddstyle), rString ); - - rString += '-'; - rString += ByteString::CreateFromInt32( nPixelSize ); - rString += "-0-0-0-"; - rString += static_cast< char >(rInfo.mcSpacing); - rString += "-0"; - - AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); -} - -void -VirtualXlfd::ToString( ByteString &rString, unsigned short nPixelSize, - char* pMatricsString, rtl_TextEncoding nEncoding ) const -{ - int nIdx = GetEncodingIdx( nEncoding ); - if ( nIdx < 0 ) - return; - - ExtEncodingInfo &rExtInfo = mpExtEncodingInfo[ nIdx ]; - - AppendAttribute( mpFactory->RetrieveFoundry(rExtInfo.mnFoundry), rString ); - AppendAttribute( mpFactory->RetrieveFamily(rExtInfo.mnFamily), rString ); - AppendAttribute( mpFactory->RetrieveWeight(rExtInfo.mnWeight), rString ); - AppendAttribute( mpFactory->RetrieveSlant(rExtInfo.mnSlant), rString ); - AppendAttribute( mpFactory->RetrieveSetwidth(rExtInfo.mnSetwidth), rString ); - - EncodingInfo& rInfo = mpEncodingInfo[ nIdx ]; - AppendAttribute( mpFactory->RetrieveAddstyle(rInfo.mnAddstyle), rString ); - - rString += "-*-"; - char pTmp[256]; - snprintf( pTmp, sizeof(pTmp), pMatricsString, nPixelSize, nPixelSize ); - rString += pTmp; - rString += "-*-*-"; - rString += static_cast< char >(rInfo.mcSpacing); - rString += "-*"; - - AppendAttribute( mpFactory->RetrieveCharset(rInfo.mnCharset), rString ); -} - -ImplFontData* VirtualXlfd::GetImplFontData() const -{ - ImplX11FontData* pFontData = new ImplX11FontData( *this, 0 ); - - // family name - static const String aFontName( RTL_CONSTASCII_USTRINGPARAM("Interface User") ); - pFontData->maName = aFontName; - // pFontData->maStyleName = aStyleName; - pFontData->meFamily = FAMILY_SWISS; - pFontData->meWeight = WEIGHT_NORMAL; - pFontData->meItalic = ITALIC_NONE; - pFontData->meWidthType = WIDTH_NORMAL; - pFontData->mePitch = PITCH_VARIABLE; - - pFontData->mbSymbolFlag = false; - pFontData->mbOrientation= false; - pFontData->mbDevice = true; - pFontData->mnQuality = 100; - - return pFontData; -} - -// ------ font list ------------------------------------------------------- - -XlfdStorage::XlfdStorage() -{ - maXlfdList.reserve( 256 ); -} - -void -XlfdStorage::Dispose() -{ - XlfdList::const_iterator it = maXlfdList.begin(); - for(; it != maXlfdList.end(); ++it ) - delete *it; - maXlfdList.clear(); -} - -void -XlfdStorage::Reset() -{ - maXlfdList.clear(); -} - -void -XlfdStorage::Add( const ExtendedXlfd* pXlfd ) -{ - if ( pXlfd != NULL ) - maXlfdList.push_back( pXlfd ); -} - -void -XlfdStorage::Add( const XlfdStorage* pXlfd ) -{ - if ( !pXlfd || pXlfd->maXlfdList.empty() ) - return; - - maXlfdList.reserve( maXlfdList.size() + pXlfd->maXlfdList.size() ); - XlfdList::const_iterator it = pXlfd->maXlfdList.begin(); - for(; it != pXlfd->maXlfdList.end(); ++it ) - maXlfdList.push_back( *it ); -} - -void XlfdStorage::AnnounceFonts( ImplDevFontList* pList ) const -{ - XlfdList::const_iterator it = maXlfdList.begin(); - for(; it != maXlfdList.end(); ++it ) - { - const ExtendedXlfd* pXlfd = *it; - ImplFontData* pFontData = pXlfd->GetImplFontData(); - pList->Add( pFontData ); - } -} - -// ------ bitmap font list -------------------------------------------------- - -void -BitmapXlfdStorage::AddBitmapFont( const Xlfd *pXlfd ) -{ - if ( pXlfd == NULL ) - return; - - int nPixelSize = pXlfd->mnPixelSize; - XlfdList::const_iterator it = maXlfdList.begin(); - for(; it != maXlfdList.end(); ++it ) - { - BitmapXlfd* pBitmapXlfd = (BitmapXlfd*)*it; - if( nPixelSize == pBitmapXlfd->GetPixelSize() ) - { - // we need to add an encoding to an existing bitmap font - pBitmapXlfd->AddEncoding( pXlfd ); - return; - } - } - - // we have a new bitmap font - BitmapXlfd* pBitmapXlfd = new BitmapXlfd; - pBitmapXlfd->AddEncoding( pXlfd ); - Add( pBitmapXlfd ); -} diff --git a/vcl/unx/source/gdi/xlfd_extd.hxx b/vcl/unx/source/gdi/xlfd_extd.hxx deleted file mode 100644 index 523f87fac477..000000000000 --- a/vcl/unx/source/gdi/xlfd_extd.hxx +++ /dev/null @@ -1,272 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef XLFD_EXTENDED_HXX -#define XLFD_EXTENDED_HXX - -#include <salunx.h> -#ifndef _VCL_VCLENUM_HXX -#include <vcl/enum.hxx> -#endif -#ifndef _VCL_OUTFONT_HXX -#include <vcl/outfont.hxx> -#endif - -#include <vector> - -class Xlfd; -class AttributeProvider; -class ImplDevFontList; -class ByteString; - -// -------------------------------------------------------------------------- -// -// classes for Xlfd handling that contain more than a single encoding. -// Members that may vary through different encodings are stored in -// a mpEncodingInfo member. There are three different classes: -// true scalable fonts (truetype and type1) scalable bitmap fonts -// (the ugly ones) and bitmap fonts. The ExtendedXlfd stores all the members -// that are specific to a font outline -// ( e.g. adobe-times-roman-medium-r-normal- * -p- * ) -// and specifies the interface. -// -// -------------------------------------------------------------------------- - -// base class - -class ExtendedXlfd : public ImplDevFontAttributes -{ - public: - ExtendedXlfd( bool bScalable ); - virtual ~ExtendedXlfd(); - virtual bool AddEncoding( const Xlfd* ); - bool HasEncoding( rtl_TextEncoding ) const; - int GetEncodingIdx( rtl_TextEncoding nEncoding ) const; - unsigned short NumEncodings() const - { return mnEncodings; } - virtual int GetPixelSize() const - { return 0; } - virtual void ToString( ByteString &rString, - unsigned short nPixelSize, - rtl_TextEncoding nEncoding ) const ; - virtual void ToString( ByteString &rString, - unsigned short nPixelSize, - char* pMatricsString, - rtl_TextEncoding nEncoding ) const; - - virtual ImplFontData* GetImplFontData() const = 0; - bool IsScalable() const { return mbScalable; } - virtual FontFamily GetFamilyType() const; - virtual FontWeight GetWeight() const; - virtual FontItalic GetSlant() const; - virtual FontWidth GetWidthType() const; - virtual FontPitch GetPitch() const; - virtual FontPitch GetPitch( rtl_TextEncoding ) const; - rtl_TextEncoding GetAsciiEncoding( int *pAsciiRange = NULL ) const; - rtl_TextEncoding GetEncoding() const; - rtl_TextEncoding GetEncoding( int i ) const; - - int GetFontCodeRanges( sal_uInt32* pCodePairs ) const; - - protected: - AttributeProvider* mpFactory; - - public: - unsigned short mnFoundry; - unsigned short mnFamily; - unsigned short mnWeight; - unsigned short mnSlant; - unsigned short mnSetwidth; - bool mbScalable; - - protected: - unsigned short mnEncodings; - unsigned short mnEncCapacity; - struct EncodingInfo { - unsigned char mcSpacing; - unsigned short mnResolutionX; - unsigned short mnResolutionY; - unsigned short mnAddstyle; - unsigned short mnCharset; - rtl_TextEncoding mnEncoding; - - EncodingInfo& operator= ( const Xlfd *pXlfd ); - } *mpEncodingInfo; -}; - -// class to handle scalable bitmap fonts - -class ScalableBitmapXlfd : public ExtendedXlfd { - - public: - ScalableBitmapXlfd(); - virtual ~ScalableBitmapXlfd(); - virtual void ToString( ByteString &rString, - unsigned short nPixelSize, - rtl_TextEncoding nEncoding ) const; - virtual void ToString( ByteString &rString, - unsigned short nPixelSize, - char* pMatricsString, - rtl_TextEncoding nEncoding ) const; - - virtual ImplFontData* GetImplFontData() const ; -}; - -// class to handle true bitmap fonts - -class ScalableXlfd; - -class BitmapXlfd : public ExtendedXlfd { - - public: - BitmapXlfd(); - ~BitmapXlfd(); - bool AddEncoding( const Xlfd* ); - virtual int GetPixelSize() const - { return mnPixelSize; } - virtual void ToString( ByteString &rString, - unsigned short nPixelSize, - rtl_TextEncoding nEncoding ) const; - virtual void ToString( ByteString &rString, - unsigned short nPixelSize, - char* pMatricsString, - rtl_TextEncoding nEncoding ) const; - virtual ImplFontData* GetImplFontData() const ; - protected: - - unsigned short mnPixelSize; - unsigned short mnPointSize; - unsigned short mnAverageWidth; -}; - -// class to handle true scalable fonts - -class ScalableXlfd : public ExtendedXlfd { - - friend class BitmapXlfd; - - public: - ScalableXlfd(); - virtual ~ScalableXlfd(); - virtual void ToString( ByteString &rString, - unsigned short nPixelSize, - rtl_TextEncoding nEncoding ) const; - - virtual void ToString( ByteString &rString, - unsigned short nPixelSize, - char* pMatricsString, - rtl_TextEncoding nEncoding ) const; - virtual ImplFontData* GetImplFontData() const ; -}; - -// class to maintain a list of fonts ( bitmap and scalable ) - -class XlfdStorage { - - public: - XlfdStorage(); - - void Dispose(); - void Reset(); - - void Add( const ExtendedXlfd *pXlfd ); - void Add( const XlfdStorage *pXlfd ); - void AnnounceFonts( ImplDevFontList* ) const; - - protected: - - typedef ::std::vector<const ExtendedXlfd*> XlfdList; - XlfdList maXlfdList; -}; - -// list of fonts specific for bitmap fonts - -class BitmapXlfdStorage : public XlfdStorage { - - public: - - void AddBitmapFont( const Xlfd *pXlfd ); -}; - - -/* Virtual font for User Interface */ - -class VirtualXlfd : public ExtendedXlfd -{ - private: - - int GetFontQuality (unsigned short nFamily); - - public: - VirtualXlfd(); - virtual ~VirtualXlfd(); - virtual bool AddEncoding( const Xlfd* ); - void FilterInterfaceFont (const Xlfd *pXlfd); - virtual void ToString( ByteString &rString, - unsigned short nPixelSize, - rtl_TextEncoding nEncoding ) const ; - virtual void ToString( ByteString &rString, - unsigned short nPixelSize, - char* pMatricsString, - rtl_TextEncoding nEncoding ) const; - - virtual ImplFontData* GetImplFontData() const ; - protected: - - unsigned short mnExtCapacity; - struct ExtEncodingInfo { - unsigned short mnFoundry; - unsigned short mnFamily; - unsigned short mnWeight; - unsigned short mnSlant; - unsigned short mnSetwidth; - - ExtEncodingInfo& operator= ( const Xlfd *pXlfd ); - } *mpExtEncodingInfo; - - friend class ExtEncodingInfo; -}; - - -// class to describe a X11 physically available font face - -class ImplX11FontData : public ImplFontData -{ -private: - enum { X11IFD_MAGIC = 0x111FDA1C }; - const ExtendedXlfd& mrXlfd; - -public: - ImplX11FontData( const ExtendedXlfd&, int nHeight ); - const ExtendedXlfd& GetExtendedXlfd() const { return mrXlfd; } - virtual ImplFontData* Clone() const { return new ImplX11FontData( *this ); } - virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const; - virtual sal_IntPtr GetFontId() const; - - static bool CheckFontData( const ImplFontData& r ) { return r.CheckMagic( X11IFD_MAGIC ); } -}; - -#endif /* XLFD_EXTENDED_HXX */ diff --git a/vcl/unx/source/gdi/xlfd_smpl.cxx b/vcl/unx/source/gdi/xlfd_smpl.cxx deleted file mode 100644 index 6cf18d98de1e..000000000000 --- a/vcl/unx/source/gdi/xlfd_smpl.cxx +++ /dev/null @@ -1,268 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_vcl.hxx" -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include "xlfd_attr.hxx" -#include "xlfd_smpl.hxx" - -// -------------------------------------------------------------------------- -// -// -// broken down structure equivalent to a Xlfd string -// -// -// -------------------------------------------------------------------------- - -Xlfd::Xlfd() -{ -} - -// XlfdCompare abi has to be qsort(3) compatible, the sorting result must -// guarantee that fonts with SameFontoutline() are successive -// XlfdCompare relies on vFrom->mpFactory eq vTo->mpFactory. Since comparing -// Xlfd's is done by comparing attributes there is no way around this. -extern "C" int -XlfdCompare( const void *vFrom, const void *vTo ) -{ - const Xlfd *pFrom = (Xlfd*)vFrom; - const Xlfd *pTo = (Xlfd*)vTo; - - // Compare outline description - if ( pFrom->mnFoundry != pTo->mnFoundry ) - return (int)pFrom->mnFoundry - (int)pTo->mnFoundry; - if ( pFrom->mnFamily != pTo->mnFamily ) - return (int)pFrom->mnFamily - (int)pTo->mnFamily; - if ( pFrom->mnWeight != pTo->mnWeight ) - return (int)pFrom->mnWeight - (int)pTo->mnWeight; - if ( pFrom->mnSlant != pTo->mnSlant ) - return (int)pFrom->mnSlant - (int)pTo->mnSlant; - if ( pFrom->mnSetwidth != pTo->mnSetwidth ) - return (int)pFrom->mnSetwidth - (int)pTo->mnSetwidth; - - // Addstyle name is futile tricky. it may contain encoding information - // (like "ansi_1251") which Compares equal, or it may contain style - // information (like "serif") which Compares unequal, anyway if the font - // is "interface user" or "interface system" then compare equal anyway to - // build fontsets as large as possible - if ( pFrom->mnAddstyle == pTo->mnAddstyle ) - return 0; - - AttributeProvider *pFactory = pFrom->mpFactory; - Attribute *pFamily = pFactory->RetrieveFamily( pFrom->mnFamily ); - if ( pFamily->HasFeature(XLFD_FEATURE_APPLICATION_FONT) ) - return 0; - - Attribute *pFromAddStyle = pFactory->RetrieveAddstyle( pFrom->mnAddstyle ); - Attribute *pToAddStyle = pFactory->RetrieveAddstyle( pTo->mnAddstyle ); - - // if both addstyles denote encodings or if one denotes an - // encoding and the other denotes a style which really - // duplicates weight and slant information - - int nFromCompare = (pFromAddStyle->GetValue() != RTL_TEXTENCODING_DONTKNOW) - || (pFromAddStyle->HasFeature(XLFD_FEATURE_REDUNDANTSTYLE)) ? - -1 : pFrom->mnAddstyle; - int nToCompare = (pToAddStyle->GetValue() != RTL_TEXTENCODING_DONTKNOW) - || (pToAddStyle->HasFeature(XLFD_FEATURE_REDUNDANTSTYLE)) ? - -1 : pTo->mnAddstyle; - - return nFromCompare - nToCompare; -} - -// check whether two fonts are identical as appearance is concerned -// this does not Compare the actual scaling of two fonts -Bool -Xlfd::SameFontoutline( const Xlfd* pComparedTo ) const -{ - void* pThis = (void*)this; - return XlfdCompare( (void*)pThis, (void*)pComparedTo ) == 0 ; -} - -unsigned short -Xlfd::GetEncoding() const -{ - Attribute *pAddstyle = mpFactory->RetrieveAddstyle( mnAddstyle ); - if ( pAddstyle->GetValue() != RTL_TEXTENCODING_DONTKNOW ) - return pAddstyle->GetValue(); - - Attribute *pEncoding = mpFactory->RetrieveCharset( mnCharset ); - return pEncoding->GetValue(); -} - -XlfdFonttype -Xlfd::Fonttype() const -{ - if ( (mnAverageWidth == 0) && (mnPixelSize == 0) && (mnPointSize == 0) ) - { - return (mnResolutionX == 0) - && (mnResolutionY == 0) ? eTypeScalable : eTypeScalableBitmap; - } - - return eTypeBitmap; -} - -void -Advance( const char** pFrom, const char** pTo ) -{ - const char *pTmp = *pTo; - - for( ; (*pTmp != '\0') && (*pTmp++ != '-'); ) - {} - *pFrom = *pTo; - *pTo = pTmp; -} - -Bool -Xlfd::IsConformant (const char* pXlfd) const -{ - // X FontNameRegistry prefix "-" - if (*pXlfd++ != '-') - return False; - - // All Xlfd FontName fields are defined - int nNumFields = 1; - while (*pXlfd != '\0') - { - if (*pXlfd++ == '-') - nNumFields++; - } - // enough entries ? - if (nNumFields != 14) - return False; - // and the last one is not empty as well ? - if (*(pXlfd - 1) == '-') - return False; - - return True; -} - -// this is the real workhorse function. Since this is called for every font -// in the fontpath it has to be as fast a possible -Bool -Xlfd::FromString( const char* pXlfdstring, AttributeProvider *pFactory ) -{ - if (!IsConformant(pXlfdstring)) - return False; - - const char* pFrom = pXlfdstring + 1; - const char* pTo = pFrom; - mpFactory = pFactory; - - Advance( &pFrom, &pTo ); //-foundry-* - mnFoundry = mpFactory->InsertFoundry( pFrom, pTo - pFrom - 1 ); - - Advance( &pFrom, &pTo ); // -*-family-* - mnFamily = mpFactory->InsertFamily( pFrom, pTo - pFrom - 1 ); - - Advance( &pFrom, &pTo ); // -*-*-weight-* - mnWeight = mpFactory->InsertWeight( pFrom, pTo - pFrom - 1 ); - - Advance( &pFrom, &pTo ); //-*-*-*-slant-* - mnSlant = mpFactory->InsertSlant( pFrom, pTo - pFrom - 1 ); - - Advance( &pFrom, &pTo ); //-*-*-*-*-setwidth-* - mnSetwidth = mpFactory->InsertSetwidth( pFrom, pTo - pFrom - 1 ); - - Advance( &pFrom, &pTo ); //-*-*-*-*-*-Addstyle-* - mnAddstyle = mpFactory->InsertAddstyle( pFrom, pTo - pFrom - 1 ); - - Advance( &pFrom, &pTo ); //-*-*-*-*-*-*-height-* - mnPixelSize = atoi( pFrom ); - - Advance( &pFrom, &pTo ); //-*-*-*-*-*-*-*-pt height-* - mnPointSize = atoi( pFrom ); - - Advance( &pFrom, &pTo ); //-*-*-*-*-*-*-*-*-x resolution-* - mnResolutionX = atoi( pFrom ); - - Advance( &pFrom, &pTo ); //-*-*-*-*-*-*-*-*-*-y resolution-* - mnResolutionY = atoi( pFrom ); - - Advance( &pFrom, &pTo ); //-*-*-*-*-*-*-*-*-*-*-spacing-* - mcSpacing = pFrom == pTo ? '\0' : *pFrom; - - Advance( &pFrom, &pTo ); //-*-*-*-*-*-*-*-*-*-*-*-average-* - mnAverageWidth = atoi( pFrom ); - - Advance( &pFrom, &pTo ); //-*-*-*-*-*-*-*-*-*-*-*-*-registry-encoding - const char* pTmp = pFrom; - Advance( &pTmp, &pTo ); - mnCharset = mpFactory->InsertCharset( pFrom, pTo - pFrom ); - - // sanity check whether we have really found a valid XLFD, if not - // throw away the whole font, since we have no idea what parts of - // the XLFD contains the error. - if ( !(pTo > pFrom) ) - return False; - - // a non-empty family name is essential, since otherwise the font - // would match the "default font" #52299# - Attribute* pFamily = mpFactory->RetrieveFamily( mnFamily ); - const char* pFamilyName = pFamily->GetName(); - if ( pFamilyName[0] == '\0' ) - return False; - - // well done - return True; -} - -#if OSL_DEBUG_LEVEL > 1 -// pure debug for now: this is only to inspect/pretty print a Xlfd struct -const char* -Xlfd::ToString( ByteString &rString ) const -{ - AppendAttribute( mpFactory->RetrieveFoundry(mnFoundry), rString ); - AppendAttribute( mpFactory->RetrieveFamily(mnFamily), rString ); - AppendAttribute( mpFactory->RetrieveWeight(mnWeight), rString ); - AppendAttribute( mpFactory->RetrieveSlant(mnSlant), rString ); - AppendAttribute( mpFactory->RetrieveSetwidth(mnSetwidth), rString ); - AppendAttribute( mpFactory->RetrieveAddstyle(mnAddstyle), rString ); - - rString.Append("-"); rString.Append( ByteString::CreateFromInt32( mnPixelSize ) ); - rString.Append("-"); rString.Append( ByteString::CreateFromInt32( mnPointSize ) ); - rString.Append("-"); rString.Append( ByteString::CreateFromInt32( mnResolutionX ) ); - rString.Append("-"); rString.Append( ByteString::CreateFromInt32( mnResolutionY ) ); - rString.Append("-"); rString.Append( (char)mcSpacing ); - rString.Append("-"); rString.Append( ByteString::CreateFromInt32( mnAverageWidth ) ); - - AppendAttribute( mpFactory->RetrieveCharset(mnCharset), rString ); - - return rString.GetBuffer() ; -} - -void -Xlfd::Dump() const -{ - ByteString aString; - fprintf(stderr, "Xlfd: %s\n", ToString(aString) ); -} -#endif - diff --git a/vcl/unx/source/gdi/xlfd_smpl.hxx b/vcl/unx/source/gdi/xlfd_smpl.hxx deleted file mode 100644 index f62ac381e6b9..000000000000 --- a/vcl/unx/source/gdi/xlfd_smpl.hxx +++ /dev/null @@ -1,92 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef XLFD_SIMPLE_HXX -#define XLFD_SIMPLE_HXX - -#include <salunx.h> -#include <vcl/vclenum.hxx> -#include <tools/string.hxx> - -class AttributeProvider; - -// -------------------------------------------------------------------------- -// -// -// broken down structure equivalent to a Xlfd string -// -// -// -------------------------------------------------------------------------- - -enum XlfdFonttype { - eTypeUnknown = TYPE_DONTKNOW, - eTypeBitmap = TYPE_RASTER, - eTypeScalableBitmap = TYPE_VECTOR, - eTypeScalable = TYPE_SCALABLE -}; - -class Xlfd { - - public: - - unsigned short mnFoundry; - unsigned short mnFamily; - unsigned short mnWeight; - unsigned short mnSlant; - unsigned short mnSetwidth; - unsigned short mnAddstyle; - unsigned short mnPixelSize; - unsigned short mnPointSize; - unsigned short mnResolutionX; - unsigned short mnResolutionY; - unsigned char mcSpacing; - unsigned short mnAverageWidth; - unsigned short mnCharset; - - // all foundry, family, weight ... information referres - // to this factory - AttributeProvider *mpFactory; - - Bool IsConformant( const char* pXlfdstring ) const; - - public: - Xlfd(); - Bool FromString( const char* pXlfdstring, - AttributeProvider *pFactory ); - Bool SameFontoutline( const Xlfd *pComparedTo ) const ; - XlfdFonttype Fonttype() const ; - unsigned short GetEncoding() const ; - #if OSL_DEBUG_LEVEL > 1 - const char* ToString( ByteString &rString ) const ; - void Dump() const; - #endif -}; - -extern "C" int -XlfdCompare( const void *vFrom, const void *vTo ); - -#endif /* XLFD_SIMPLE_HXX */ - diff --git a/vcl/unx/source/window/salframe.cxx b/vcl/unx/source/window/salframe.cxx index 9934277302e1..11c20aa40f5a 100644 --- a/vcl/unx/source/window/salframe.cxx +++ b/vcl/unx/source/window/salframe.cxx @@ -3588,9 +3588,7 @@ long X11SalFrame::HandleFocusEvent( XFocusChangeEvent *pEvent ) if( FocusIn == pEvent->type ) { -#ifndef _USE_PRINT_EXTENSION_ vcl_sal::PrinterUpdate::update(); -#endif mbInputFocus = True; ImplSVData* pSVData = ImplGetSVData(); diff --git a/vcl/unx/source/window/salobj.cxx b/vcl/unx/source/window/salobj.cxx index 647b95ae032c..2ff6d05c35c6 100644 --- a/vcl/unx/source/window/salobj.cxx +++ b/vcl/unx/source/window/salobj.cxx @@ -559,3 +559,10 @@ long X11SalObject::Dispatch( XEvent* pEvent ) } return 0; } + +// ----------------------------------------------------------------------- + +void X11SalObject::InterceptChildWindowKeyDown( sal_Bool /*bIntercept*/ ) +{ +} + diff --git a/vcl/util/makefile.mk b/vcl/util/makefile.mk index d21e9dcb3eed..8d1de2ed30f0 100644 --- a/vcl/util/makefile.mk +++ b/vcl/util/makefile.mk @@ -125,7 +125,6 @@ HXXDEPNLST= $(INC)$/vcl$/accel.hxx \ $(INC)$/vcl$/virdev.hxx \ $(INC)$/vcl$/wall.hxx \ $(INC)$/vcl$/waitobj.hxx \ - $(INC)$/vcl$/wintypes.hxx \ $(INC)$/vcl$/window.hxx \ $(INC)$/vcl$/wrkwin.hxx diff --git a/vcl/util/target.pmk b/vcl/util/target.pmk index 3144acc4bc05..8ec15475bc90 100644 --- a/vcl/util/target.pmk +++ b/vcl/util/target.pmk @@ -37,8 +37,3 @@ ONLYDLL .SETDIR=$(PRJ)$/util: $(SLOFILES) dmake debug=t prjpch=t linkinc=t compinc=t ..$/$(OUTPATH)$/bin$/sv$(DLLPOSTFIX).dll @echo "READY" -.IF "$(USE_XPRINT)"!="TRUE" -.ELSE -CFLAGS+=-D_USE_PRINT_EXTENSION_=1 -.ENDIF - diff --git a/vcl/win/inc/saldata.hxx b/vcl/win/inc/saldata.hxx index ec67272ed07f..48180bbe185b 100644..100755 --- a/vcl/win/inc/saldata.hxx +++ b/vcl/win/inc/saldata.hxx @@ -33,6 +33,8 @@ #include <vcl/salwtype.hxx> #include <wincomp.hxx> +#include "osl/module.h" + #include <set> // for hMenu validation #include <map> @@ -46,6 +48,8 @@ class Font; struct HDCCache; struct TempFontItem; +typedef HRESULT (WINAPI *DwmIsCompositionEnabled_ptr)(WIN_BOOL*); + // -------------------- // - Standard-Defines - // -------------------- @@ -131,12 +135,15 @@ public: SalIcon* mpFirstIcon; // icon cache, points to first icon, NULL if none TempFontItem* mpTempFontItem; BOOL mbThemeChanged; // true if visual theme was changed: throw away theme handles + BOOL mbThemeMenuSupport; // for GdiPlus GdiplusStartup/GdiplusShutdown ULONG_PTR gdiplusToken; std::set< HMENU > mhMenuSet; // keeps track of menu handles created by VCL, used by IsKnownMenuHandle() std::map< UINT,USHORT > maVKMap; // map some dynamic VK_* entries + oslModule maDwmLib; + DwmIsCompositionEnabled_ptr mpDwmIsCompositionEnabled; }; inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = (void*)pData; } @@ -154,7 +161,6 @@ struct SalShlData UINT mnWheelScrollChars; // WheelScrollChars UINT mnWheelMsgId; // Wheel-Message-Id fuer W95 WORD mnVersion; // System-Version (311 == 3.11) - WIN_BOOL mbWNT; // kein W16/W95/W98 sondern ein NT WIN_BOOL mbW40; // Is System-Version >= 4.0 WIN_BOOL mbWXP; // Windows XP WIN_BOOL mbWPrinter; // true: use unicode printer functions @@ -213,6 +219,7 @@ void ImplSalYieldMutexAcquire(); void ImplSalYieldMutexRelease(); ULONG ImplSalReleaseYieldMutex(); void ImplSalAcquireYieldMutex( ULONG nCount ); +sal_Bool ImplInterceptChildWindowKeyDown( MSG& rMsg ); // \\WIN\SOURCE\WINDOW\SALFRAME.CXX LRESULT CALLBACK SalFrameWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); diff --git a/vcl/win/inc/salobj.h b/vcl/win/inc/salobj.h index 11ae96931321..ae7ea5271800 100644 --- a/vcl/win/inc/salobj.h +++ b/vcl/win/inc/salobj.h @@ -46,6 +46,7 @@ public: RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data RECT* mpNextClipRect; // Naechstes ClipRegion-Rect BOOL mbFirstClipRect; // Flag for first cliprect to insert + sal_Bool mbInterceptChildWindowKeyDown; // Intercept the KeyDown event sent to system child window WinSalObject* mpNextObject; // pointer to next object @@ -64,6 +65,7 @@ public: virtual void SetBackground(); virtual void SetBackground( SalColor nSalColor ); virtual const SystemEnvData* GetSystemData() const; + virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept ); }; #endif // _SV_SALOBJ_H diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx index bb8a198a96e6..5f94029ad817 100644 --- a/vcl/win/source/app/saldata.cxx +++ b/vcl/win/source/app/saldata.cxx @@ -119,42 +119,28 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 ) LONG ImplSetWindowLong( HWND hWnd, int nIndex, DWORD dwNewLong ) { - if ( aSalShlData.mbWNT ) - return SetWindowLongW( hWnd, nIndex, dwNewLong ); - else - return SetWindowLongA( hWnd, nIndex, dwNewLong ); + return SetWindowLongW( hWnd, nIndex, dwNewLong ); } // ----------------------------------------------------------------------- LONG ImplGetWindowLong( HWND hWnd, int nIndex ) { - if ( aSalShlData.mbWNT ) - return GetWindowLongW( hWnd, nIndex ); - else - return GetWindowLongA( hWnd, nIndex ); + return GetWindowLongW( hWnd, nIndex ); } // ----------------------------------------------------------------------- WIN_BOOL ImplPostMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { - if ( aSalShlData.mbWNT ) - return PostMessageW( hWnd, nMsg, wParam, lParam ); - else - return PostMessageA( hWnd, nMsg, wParam, lParam ); + return PostMessageW( hWnd, nMsg, wParam, lParam ); } // ----------------------------------------------------------------------- WIN_BOOL ImplSendMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { - WIN_BOOL bRet; - if ( aSalShlData.mbWNT ) - bRet = SendMessageW( hWnd, nMsg, wParam, lParam ); - else - bRet = SendMessageA( hWnd, nMsg, wParam, lParam ); - + WIN_BOOL bRet = SendMessageW( hWnd, nMsg, wParam, lParam ); return bRet; } @@ -162,29 +148,20 @@ WIN_BOOL ImplSendMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) WIN_BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax ) { - if ( aSalShlData.mbWNT ) - return GetMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax ); - else - return GetMessageA( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax ); + return GetMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax ); } // ----------------------------------------------------------------------- WIN_BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg ) { - if ( aSalShlData.mbWNT ) - return PeekMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg ); - else - return PeekMessageA( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg ); + return PeekMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg ); } // ----------------------------------------------------------------------- LONG ImplDispatchMessage( CONST MSG *lpMsg ) { - if ( aSalShlData.mbWNT ) - return DispatchMessageW( lpMsg ); - else - return DispatchMessageA( lpMsg ); + return DispatchMessageW( lpMsg ); } diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index 419723ee6442..2a2a1827a515 100644..100755 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -47,7 +47,7 @@ #include <salobj.h> #include <vcl/salsys.hxx> #include <saltimer.h> -#include <vcl/salatype.hxx> +#include <vcl/apptypes.hxx> #include <salbmp.h> #include <vcl/salimestatus.hxx> #include <vcl/timer.hxx> @@ -434,9 +434,12 @@ SalData::SalData() mpFirstIcon = 0; // icon cache, points to first icon, NULL if none mpTempFontItem = 0; mbThemeChanged = FALSE; // true if visual theme was changed: throw away theme handles + mbThemeMenuSupport = FALSE; // init with NULL gdiplusToken = 0; + maDwmLib = 0; + mpDwmIsCompositionEnabled = 0; initKeyCodeMap(); @@ -503,7 +506,6 @@ SalInstance* CreateSalInstance() SalData* pSalData = GetSalData(); // determine the windows version - aSalShlData.mbWNT = 0; aSalShlData.mbWXP = 0; aSalShlData.mbWPrinter = 0; WORD nVer = (WORD)GetVersion(); @@ -516,7 +518,6 @@ SalInstance* CreateSalInstance() { if ( aSalShlData.maVersionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT ) { - aSalShlData.mbWNT = 1; // Windows XP ? if ( aSalShlData.maVersionInfo.dwMajorVersion > 5 || ( aSalShlData.maVersionInfo.dwMajorVersion == 5 && aSalShlData.maVersionInfo.dwMinorVersion >= 1 ) ) @@ -531,8 +532,6 @@ SalInstance* CreateSalInstance() // register frame class if ( !pSalData->mhPrevInst ) { - if ( aSalShlData.mbWNT ) - { WNDCLASSEXW aWndClassEx; aWndClassEx.cbSize = sizeof( aWndClassEx ); aWndClassEx.style = CS_OWNDC; @@ -568,53 +567,11 @@ SalInstance* CreateSalInstance() aWndClassEx.lpszClassName = SAL_COM_CLASSNAMEW; if ( !RegisterClassExW( &aWndClassEx ) ) return NULL; - } - else - { - WNDCLASSEXA aWndClassEx; - aWndClassEx.cbSize = sizeof( aWndClassEx ); - aWndClassEx.style = CS_OWNDC; - aWndClassEx.lpfnWndProc = SalFrameWndProcA; - aWndClassEx.cbClsExtra = 0; - aWndClassEx.cbWndExtra = SAL_FRAME_WNDEXTRA; - aWndClassEx.hInstance = pSalData->mhInst; - aWndClassEx.hCursor = 0; - aWndClassEx.hbrBackground = 0; - aWndClassEx.lpszMenuName = 0; - aWndClassEx.lpszClassName = SAL_FRAME_CLASSNAMEA; - ImplLoadSalIcon( SAL_RESID_ICON_DEFAULT, aWndClassEx.hIcon, aWndClassEx.hIconSm ); - if ( !RegisterClassExA( &aWndClassEx ) ) - return NULL; - - aWndClassEx.hIcon = 0; - aWndClassEx.hIconSm = 0; - aWndClassEx.style |= CS_SAVEBITS; - aWndClassEx.lpszClassName = SAL_SUBFRAME_CLASSNAMEA; - if ( !RegisterClassExA( &aWndClassEx ) ) - return NULL; - - aWndClassEx.style = 0; - aWndClassEx.lpfnWndProc = SalComWndProcA; - aWndClassEx.cbWndExtra = 0; - aWndClassEx.lpszClassName = SAL_COM_CLASSNAMEA; - if ( !RegisterClassExA( &aWndClassEx ) ) - return NULL; - } } - HWND hComWnd; - if ( aSalShlData.mbWNT ) - { - hComWnd = CreateWindowExW( WS_EX_TOOLWINDOW, SAL_COM_CLASSNAMEW, + HWND hComWnd = CreateWindowExW( WS_EX_TOOLWINDOW, SAL_COM_CLASSNAMEW, L"", WS_POPUP, 0, 0, 0, 0, 0, 0, pSalData->mhInst, NULL ); - } - else - { - hComWnd = CreateWindowExA( WS_EX_TOOLWINDOW, SAL_COM_CLASSNAMEA, - "", WS_POPUP, 0, 0, 0, 0, 0, 0, - pSalData->mhInst, NULL ); - } if ( !hComWnd ) return NULL; @@ -719,8 +676,12 @@ void ImplSalYield( BOOL bWait, BOOL bHandleAllCurrentEvents ) { if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) ) { - TranslateMessage( &aMsg ); - ImplSalDispatchMessage( &aMsg ); + if ( !ImplInterceptChildWindowKeyDown( aMsg ) ) + { + TranslateMessage( &aMsg ); + ImplSalDispatchMessage( &aMsg ); + } + bOneEvent = bWasMsg = true; } else @@ -731,8 +692,11 @@ void ImplSalYield( BOOL bWait, BOOL bHandleAllCurrentEvents ) { if ( ImplGetMessage( &aMsg, 0, 0, 0 ) ) { - TranslateMessage( &aMsg ); - ImplSalDispatchMessage( &aMsg ); + if ( !ImplInterceptChildWindowKeyDown( aMsg ) ) + { + TranslateMessage( &aMsg ); + ImplSalDispatchMessage( &aMsg ); + } } } } diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx index c8e0210196e6..91662fb8aded 100644..100755 --- a/vcl/win/source/gdi/salgdi3.cxx +++ b/vcl/win/source/gdi/salgdi3.cxx @@ -1366,10 +1366,6 @@ int CALLBACK SalEnumQueryFontProcExA( const ENUMLOGFONTEXA*, bool ImplIsFontAvailable( HDC hDC, const UniString& rName ) { - bool bAvailable = false; - - if ( aSalShlData.mbWNT ) - { // Test, if Font available LOGFONTW aLogFont; memset( &aLogFont, 0, sizeof( aLogFont ) ); @@ -1381,27 +1377,9 @@ bool ImplIsFontAvailable( HDC hDC, const UniString& rName ) memcpy( aLogFont.lfFaceName, rName.GetBuffer(), nNameLen*sizeof( wchar_t ) ); aLogFont.lfFaceName[nNameLen] = 0; - EnumFontFamiliesExW( hDC, &aLogFont, (FONTENUMPROCW)SalEnumQueryFontProcExW, - (LPARAM)(void*)&bAvailable, 0 ); - } - else - { - ByteString aTemp = ImplSalGetWinAnsiString( rName ); - - // Test, if Font available - LOGFONTA aLogFont; - memset( &aLogFont, 0, sizeof( aLogFont ) ); - aLogFont.lfCharSet = DEFAULT_CHARSET; - - UINT nNameLen = aTemp.Len(); - if ( nNameLen > sizeof( aLogFont.lfFaceName )-1 ) - nNameLen = sizeof( aLogFont.lfFaceName )-1; - memcpy( aLogFont.lfFaceName, aTemp.GetBuffer(), nNameLen ); - aLogFont.lfFaceName[nNameLen] = 0; - - EnumFontFamiliesExA( hDC, &aLogFont, (FONTENUMPROCA)SalEnumQueryFontProcExA, + bool bAvailable = false; + EnumFontFamiliesExW( hDC, &aLogFont, (FONTENUMPROCW)SalEnumQueryFontProcExW, (LPARAM)(void*)&bAvailable, 0 ); - } return bAvailable; } @@ -1564,7 +1542,7 @@ HFONT WinSalGraphics::ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFont // only required for virtual devices, see below for details hdcScreen = GetDC(0); - if( aSalShlData.mbWNT ) + if( true/*aSalShlData.mbWNT*/ ) { LOGFONTW aLogFont; ImplGetLogFontFromFontSelect( mhDC, i_pFont, aLogFont, true ); @@ -1624,63 +1602,6 @@ HFONT WinSalGraphics::ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFont hNewFont = hNewFont2; } } - else - { - if( !mpLogFont ) - // mpLogFont is needed for getting the kerning pairs - // TODO: get them from somewhere else - mpLogFont = new LOGFONTA; - LOGFONTA& aLogFont = *mpLogFont; - ImplGetLogFontFromFontSelect( mhDC, i_pFont, aLogFont, true ); - - // on the display we prefer Courier New when Courier is a - // bitmap only font and we need to stretch or rotate it - if( mbScreen - && (i_pFont->mnWidth != 0 - || i_pFont->mnOrientation != 0 - || i_pFont->mpFontData == NULL - || (i_pFont->mpFontData->GetHeight() != i_pFont->mnHeight)) - && !bImplSalCourierScalable - && bImplSalCourierNew - && (stricmp( aLogFont.lfFaceName, "Courier" ) == 0) ) - strncpy( aLogFont.lfFaceName, "Courier New", 11 ); - - // limit font requests to MAXFONTHEIGHT to work around driver problems - // TODO: share MAXFONTHEIGHT font instance - if( -aLogFont.lfHeight <= MAXFONTHEIGHT ) - o_rFontScale = 1.0; - else - { - o_rFontScale = -aLogFont.lfHeight / (float)MAXFONTHEIGHT; - aLogFont.lfHeight = -MAXFONTHEIGHT; - aLogFont.lfWidth = static_cast<LONG>( aLogFont.lfWidth / o_rFontScale ); - } - - hNewFont = ::CreateFontIndirectA( &aLogFont ); - if( hdcScreen ) - { - // select font into screen hdc first to get an antialiased font - // see knowledge base article 305290: - // "PRB: Fonts Not Drawn Antialiased on Device Context for DirectDraw Surface" - ::SelectFont( hdcScreen, ::SelectFont( hdcScreen , hNewFont ) ); - } - o_rOldFont = ::SelectFont( mhDC, hNewFont ); - - TEXTMETRICA aTextMetricA; - // when the font doesn't work try a replacement - if ( !::GetTextMetricsA( mhDC, &aTextMetricA ) ) - { - // the selected font doesn't work => try a replacement - // TODO: use its font fallback instead - LOGFONTA aTempLogFont = aLogFont; - strncpy( aTempLogFont.lfFaceName, "Courier New", 11 ); - aTempLogFont.lfPitchAndFamily = FIXED_PITCH; - HFONT hNewFont2 = CreateFontIndirectA( &aTempLogFont ); - ::SelectFont( mhDC, hNewFont2 ); - ::DeleteFont( hNewFont ); - hNewFont = hNewFont2; - } - } if( hdcScreen ) ::ReleaseDC( NULL, hdcScreen ); @@ -1767,18 +1688,9 @@ void WinSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLe // temporarily change the HDC to the font in the fallback level HFONT hOldFont = SelectFont( mhDC, mhFonts[nFallbackLevel] ); - if ( aSalShlData.mbWNT ) - { wchar_t aFaceName[LF_FACESIZE+60]; if( ::GetTextFaceW( mhDC, sizeof(aFaceName)/sizeof(wchar_t), aFaceName ) ) pMetric->maName = reinterpret_cast<const sal_Unicode*>(aFaceName); - } - else - { - char aFaceName[LF_FACESIZE+60]; - if( ::GetTextFaceA( mhDC, sizeof(aFaceName), aFaceName ) ) - pMetric->maName = ImplSalGetUniString( aFaceName ); - } // get the font metric TEXTMETRICA aWinMetric; @@ -1842,11 +1754,6 @@ void WinSalGraphics::GetFontMetric( ImplFontMetricData* pMetric, int nFallbackLe pMetric->mnAscent += nHalfTmpExtLeading; pMetric->mnDescent += nOtherHalfTmpExtLeading; - - // #109280# HACK korean only: increase descent for wavelines and impr - if( !aSalShlData.mbWNT ) - if( mpWinFontData[nFallbackLevel]->SupportsKorean() ) - pMetric->mnDescent += pMetric->mnExtLeading; } pMetric->mnMinKashida = GetMinKashidaWidth(); @@ -2000,45 +1907,21 @@ ULONG WinSalGraphics::GetKernPairs( ULONG nPairs, ImplKernPairData* pKernPairs ) } mnFontKernPairCount = 0; - if ( aSalShlData.mbWNT ) + KERNINGPAIR* pPairs = NULL; + int nCount = ::GetKerningPairsW( mhDC, 0, NULL ); + if( nCount ) { - KERNINGPAIR* pPairs = NULL; - int nCount = ::GetKerningPairsW( mhDC, 0, NULL ); - if( nCount ) - { -#ifdef GCP_KERN_HACK - pPairs = new KERNINGPAIR[ nCount+1 ]; - mpFontKernPairs = pPairs; - mnFontKernPairCount = nCount; - ::GetKerningPairsW( mhDC, nCount, pPairs ); -#else // GCP_KERN_HACK - pPairs = pKernPairs; - nCount = (nCount < nPairs) : nCount : nPairs; - ::GetKerningPairsW( mhDC, nCount, pPairs ); - return nCount; -#endif // GCP_KERN_HACK - } - } - else - { - if ( !mnFontCharSetCount ) - ImplGetAllFontCharSets( this ); - - if ( mnFontCharSetCount <= 1 ) - ImplAddKerningPairs( this ); - else - { - // Query All Kerning Pairs from all possible CharSets - for ( BYTE i = 0; i < mnFontCharSetCount; i++ ) - { - mpLogFont->lfCharSet = mpFontCharSets[i]; - HFONT hNewFont = CreateFontIndirectA( mpLogFont ); - HFONT hOldFont = SelectFont( mhDC, hNewFont ); - ImplAddKerningPairs( this ); - SelectFont( mhDC, hOldFont ); - DeleteFont( hNewFont ); - } - } + #ifdef GCP_KERN_HACK + pPairs = new KERNINGPAIR[ nCount+1 ]; + mpFontKernPairs = pPairs; + mnFontKernPairCount = nCount; + ::GetKerningPairsW( mhDC, nCount, pPairs ); + #else // GCP_KERN_HACK + pPairs = pKernPairs; + nCount = (nCount < nPairs) : nCount : nPairs; + ::GetKerningPairsW( mhDC, nCount, pPairs ); + return nCount; + #endif // GCP_KERN_HACK } mbFontKernInit = FALSE; @@ -2270,19 +2153,7 @@ void ImplReleaseTempFonts( SalData& rSalData ) } else { - if( aSalShlData.mbWNT ) - ::RemoveFontResourceW( reinterpret_cast<LPCWSTR>(p->maFontFilePath.getStr()) ); - else - { - // poor man's string conversion because converter is gone - int nLen = p->maFontFilePath.getLength(); - char* pNameA = new char[ nLen + 1 ]; - for( int i = 0; i < nLen; ++i ) - pNameA[i] = (char)(p->maFontFilePath.getStr())[i]; - pNameA[ nLen ] = 0; - ::RemoveFontResourceA( pNameA ); - delete[] pNameA; - } + ::RemoveFontResourceW( reinterpret_cast<LPCWSTR>(p->maFontFilePath.getStr()) ); } rSalData.mpTempFontItem = p->mpNextItem; @@ -2424,14 +2295,6 @@ bool WinSalGraphics::AddTempDevFont( ImplDevFontList* pFontList, return false; UINT nPreferedCharSet = DEFAULT_CHARSET; - if ( !aSalShlData.mbWNT ) - { - // for W98 guess charset preference from active codepage - CHARSETINFO aCharSetInfo; - DWORD nCP = GetACP(); - if ( TranslateCharsetInfo( (DWORD*)nCP, &aCharSetInfo, TCI_SRCCODEPAGE ) ) - nPreferedCharSet = aCharSetInfo.ciCharset; - } // create matching FontData struct aDFA.mbSymbolFlag = false; // TODO: how to know it without accessing the font? @@ -2536,24 +2399,12 @@ void WinSalGraphics::GetDevFontList( ImplDevFontList* pFontList ) if ( TranslateCharsetInfo( (DWORD*)nCP, &aCharSetInfo, TCI_SRCCODEPAGE ) ) aInfo.mnPreferedCharSet = aCharSetInfo.ciCharset; - if ( aSalShlData.mbWNT ) - { - LOGFONTW aLogFont; - memset( &aLogFont, 0, sizeof( aLogFont ) ); - aLogFont.lfCharSet = DEFAULT_CHARSET; - aInfo.mpLogFontW = &aLogFont; - EnumFontFamiliesExW( mhDC, &aLogFont, + LOGFONTW aLogFont; + memset( &aLogFont, 0, sizeof( aLogFont ) ); + aLogFont.lfCharSet = DEFAULT_CHARSET; + aInfo.mpLogFontW = &aLogFont; + EnumFontFamiliesExW( mhDC, &aLogFont, (FONTENUMPROCW)SalEnumFontsProcExW, (LPARAM)(void*)&aInfo, 0 ); - } - else - { - LOGFONTA aLogFont; - memset( &aLogFont, 0, sizeof( aLogFont ) ); - aLogFont.lfCharSet = DEFAULT_CHARSET; - aInfo.mpLogFontA = &aLogFont; - EnumFontFamiliesExA( mhDC, &aLogFont, - (FONTENUMPROCA)SalEnumFontsProcExA, (LPARAM)(void*)&aInfo, 0 ); - } // Feststellen, was es fuer Courier-Schriften auf dem Bildschirm gibt, // um in SetFont() evt. Courier auf Courier New zu mappen @@ -2592,12 +2443,7 @@ BOOL WinSalGraphics::GetGlyphBoundRect( long nIndex, Rectangle& rRect ) GLYPHMETRICS aGM; aGM.gmptGlyphOrigin.x = aGM.gmptGlyphOrigin.y = 0; aGM.gmBlackBoxX = aGM.gmBlackBoxY = 0; - DWORD nSize = GDI_ERROR; - if ( aSalShlData.mbWNT ) - nSize = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags, &aGM, 0, NULL, &aMat ); - else if( (nGGOFlags & GGO_GLYPH_INDEX) || (nIndex <= 255) ) - nSize = ::GetGlyphOutlineA( hDC, nIndex, nGGOFlags, &aGM, 0, NULL, &aMat ); - + DWORD nSize = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags, &aGM, 0, NULL, &aMat ); if( nSize == GDI_ERROR ) return false; @@ -2617,7 +2463,6 @@ BOOL WinSalGraphics::GetGlyphOutline( long nIndex, { rB2DPolyPoly.clear(); - BOOL bRet = FALSE; HDC hDC = mhDC; // use unity matrix @@ -2631,171 +2476,160 @@ BOOL WinSalGraphics::GetGlyphOutline( long nIndex, nIndex &= GF_IDXMASK; GLYPHMETRICS aGlyphMetrics; - DWORD nSize1 = GDI_ERROR; - if ( aSalShlData.mbWNT ) - nSize1 = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags, &aGlyphMetrics, 0, NULL, &aMat ); - else if( (nGGOFlags & GGO_GLYPH_INDEX) || (nIndex <= 255) ) - nSize1 = ::GetGlyphOutlineA( hDC, nIndex, nGGOFlags, &aGlyphMetrics, 0, NULL, &aMat ); - + const DWORD nSize1 = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags, &aGlyphMetrics, 0, NULL, &aMat ); if( !nSize1 ) // blank glyphs are ok - bRet = TRUE; - else if( nSize1 != GDI_ERROR ) - { - BYTE* pData = new BYTE[ nSize1 ]; - DWORD nSize2; - if ( aSalShlData.mbWNT ) - nSize2 = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags, - &aGlyphMetrics, nSize1, pData, &aMat ); - else - nSize2 = ::GetGlyphOutlineA( hDC, nIndex, nGGOFlags, - &aGlyphMetrics, nSize1, pData, &aMat ); + return TRUE; + else if( nSize1 == GDI_ERROR ) + return FALSE; - if( nSize1 == nSize2 ) - { - bRet = TRUE; + BYTE* pData = new BYTE[ nSize1 ]; + const DWORD nSize2 = ::GetGlyphOutlineW( hDC, nIndex, nGGOFlags, + &aGlyphMetrics, nSize1, pData, &aMat ); + + if( nSize1 != nSize2 ) + return FALSE; + + // TODO: avoid tools polygon by creating B2DPolygon directly + int nPtSize = 512; + Point* pPoints = new Point[ nPtSize ]; + BYTE* pFlags = new BYTE[ nPtSize ]; + + TTPOLYGONHEADER* pHeader = (TTPOLYGONHEADER*)pData; + while( (BYTE*)pHeader < pData+nSize2 ) + { + // only outline data is interesting + if( pHeader->dwType != TT_POLYGON_TYPE ) + break; - int nPtSize = 512; - Point* pPoints = new Point[ nPtSize ]; - BYTE* pFlags = new BYTE[ nPtSize ]; + // get start point; next start points are end points + // of previous segment + USHORT nPnt = 0; - TTPOLYGONHEADER* pHeader = (TTPOLYGONHEADER*)pData; - while( (BYTE*)pHeader < pData+nSize2 ) + long nX = IntTimes256FromFixed( pHeader->pfxStart.x ); + long nY = IntTimes256FromFixed( pHeader->pfxStart.y ); + pPoints[ nPnt ] = Point( nX, nY ); + pFlags[ nPnt++ ] = POLY_NORMAL; + + bool bHasOfflinePoints = false; + TTPOLYCURVE* pCurve = (TTPOLYCURVE*)( pHeader + 1 ); + pHeader = (TTPOLYGONHEADER*)( (BYTE*)pHeader + pHeader->cb ); + while( (BYTE*)pCurve < (BYTE*)pHeader ) + { + int nNeededSize = nPnt + 16 + 3 * pCurve->cpfx; + if( nPtSize < nNeededSize ) { - // only outline data is interesting - if( pHeader->dwType != TT_POLYGON_TYPE ) - break; - - // get start point; next start points are end points - // of previous segment - USHORT nPnt = 0; - - long nX = IntTimes256FromFixed( pHeader->pfxStart.x ); - long nY = IntTimes256FromFixed( pHeader->pfxStart.y ); - pPoints[ nPnt ] = Point( nX, nY ); - pFlags[ nPnt++ ] = POLY_NORMAL; - - bool bHasOfflinePoints = false; - TTPOLYCURVE* pCurve = (TTPOLYCURVE*)( pHeader + 1 ); - pHeader = (TTPOLYGONHEADER*)( (BYTE*)pHeader + pHeader->cb ); - while( (BYTE*)pCurve < (BYTE*)pHeader ) + Point* pOldPoints = pPoints; + BYTE* pOldFlags = pFlags; + nPtSize = 2 * nNeededSize; + pPoints = new Point[ nPtSize ]; + pFlags = new BYTE[ nPtSize ]; + for( USHORT i = 0; i < nPnt; ++i ) { - int nNeededSize = nPnt + 16 + 3 * pCurve->cpfx; - if( nPtSize < nNeededSize ) - { - Point* pOldPoints = pPoints; - BYTE* pOldFlags = pFlags; - nPtSize = 2 * nNeededSize; - pPoints = new Point[ nPtSize ]; - pFlags = new BYTE[ nPtSize ]; - for( USHORT i = 0; i < nPnt; ++i ) - { - pPoints[ i ] = pOldPoints[ i ]; - pFlags[ i ] = pOldFlags[ i ]; - } - delete[] pOldPoints; - delete[] pOldFlags; - } + pPoints[ i ] = pOldPoints[ i ]; + pFlags[ i ] = pOldFlags[ i ]; + } + delete[] pOldPoints; + delete[] pOldFlags; + } - int i = 0; - if( TT_PRIM_LINE == pCurve->wType ) + int i = 0; + if( TT_PRIM_LINE == pCurve->wType ) + { + while( i < pCurve->cpfx ) + { + nX = IntTimes256FromFixed( pCurve->apfx[ i ].x ); + nY = IntTimes256FromFixed( pCurve->apfx[ i ].y ); + ++i; + pPoints[ nPnt ] = Point( nX, nY ); + pFlags[ nPnt ] = POLY_NORMAL; + ++nPnt; + } + } + else if( TT_PRIM_QSPLINE == pCurve->wType ) + { + bHasOfflinePoints = true; + while( i < pCurve->cpfx ) + { + // get control point of quadratic bezier spline + nX = IntTimes256FromFixed( pCurve->apfx[ i ].x ); + nY = IntTimes256FromFixed( pCurve->apfx[ i ].y ); + ++i; + Point aControlP( nX, nY ); + + // calculate first cubic control point + // P0 = 1/3 * (PBeg + 2 * PQControl) + nX = pPoints[ nPnt-1 ].X() + 2 * aControlP.X(); + nY = pPoints[ nPnt-1 ].Y() + 2 * aControlP.Y(); + pPoints[ nPnt+0 ] = Point( (2*nX+3)/6, (2*nY+3)/6 ); + pFlags[ nPnt+0 ] = POLY_CONTROL; + + // calculate endpoint of segment + nX = IntTimes256FromFixed( pCurve->apfx[ i ].x ); + nY = IntTimes256FromFixed( pCurve->apfx[ i ].y ); + + if ( i+1 >= pCurve->cpfx ) { - while( i < pCurve->cpfx ) - { - nX = IntTimes256FromFixed( pCurve->apfx[ i ].x ); - nY = IntTimes256FromFixed( pCurve->apfx[ i ].y ); - ++i; - pPoints[ nPnt ] = Point( nX, nY ); - pFlags[ nPnt ] = POLY_NORMAL; - ++nPnt; - } + // endpoint is either last point in segment => advance + ++i; } - else if( TT_PRIM_QSPLINE == pCurve->wType ) + else { - bHasOfflinePoints = true; - while( i < pCurve->cpfx ) - { - // get control point of quadratic bezier spline - nX = IntTimes256FromFixed( pCurve->apfx[ i ].x ); - nY = IntTimes256FromFixed( pCurve->apfx[ i ].y ); - ++i; - Point aControlP( nX, nY ); - - // calculate first cubic control point - // P0 = 1/3 * (PBeg + 2 * PQControl) - nX = pPoints[ nPnt-1 ].X() + 2 * aControlP.X(); - nY = pPoints[ nPnt-1 ].Y() + 2 * aControlP.Y(); - pPoints[ nPnt+0 ] = Point( (2*nX+3)/6, (2*nY+3)/6 ); - pFlags[ nPnt+0 ] = POLY_CONTROL; - - // calculate endpoint of segment - nX = IntTimes256FromFixed( pCurve->apfx[ i ].x ); - nY = IntTimes256FromFixed( pCurve->apfx[ i ].y ); - - if ( i+1 >= pCurve->cpfx ) - { - // endpoint is either last point in segment => advance - ++i; - } - else - { - // or endpoint is the middle of two control points - nX += IntTimes256FromFixed( pCurve->apfx[ i-1 ].x ); - nY += IntTimes256FromFixed( pCurve->apfx[ i-1 ].y ); - nX = (nX + 1) / 2; - nY = (nY + 1) / 2; - // no need to advance, because the current point - // is the control point in next bezier spline - } - - pPoints[ nPnt+2 ] = Point( nX, nY ); - pFlags[ nPnt+2 ] = POLY_NORMAL; - - // calculate second cubic control point - // P1 = 1/3 * (PEnd + 2 * PQControl) - nX = pPoints[ nPnt+2 ].X() + 2 * aControlP.X(); - nY = pPoints[ nPnt+2 ].Y() + 2 * aControlP.Y(); - pPoints[ nPnt+1 ] = Point( (2*nX+3)/6, (2*nY+3)/6 ); - pFlags[ nPnt+1 ] = POLY_CONTROL; - - nPnt += 3; - } + // or endpoint is the middle of two control points + nX += IntTimes256FromFixed( pCurve->apfx[ i-1 ].x ); + nY += IntTimes256FromFixed( pCurve->apfx[ i-1 ].y ); + nX = (nX + 1) / 2; + nY = (nY + 1) / 2; + // no need to advance, because the current point + // is the control point in next bezier spline } - // next curve segment - pCurve = (TTPOLYCURVE*)&pCurve->apfx[ i ]; - } + pPoints[ nPnt+2 ] = Point( nX, nY ); + pFlags[ nPnt+2 ] = POLY_NORMAL; - // end point is start point for closed contour - // disabled, because Polygon class closes the contour itself - // pPoints[nPnt++] = pPoints[0]; - // #i35928# - // Added again, but add only when not yet closed - if(pPoints[nPnt - 1] != pPoints[0]) - { - if( bHasOfflinePoints ) - pFlags[nPnt] = pFlags[0]; + // calculate second cubic control point + // P1 = 1/3 * (PEnd + 2 * PQControl) + nX = pPoints[ nPnt+2 ].X() + 2 * aControlP.X(); + nY = pPoints[ nPnt+2 ].Y() + 2 * aControlP.Y(); + pPoints[ nPnt+1 ] = Point( (2*nX+3)/6, (2*nY+3)/6 ); + pFlags[ nPnt+1 ] = POLY_CONTROL; - pPoints[nPnt++] = pPoints[0]; + nPnt += 3; } + } - // convert y-coordinates W32 -> VCL - for( int i = 0; i < nPnt; ++i ) - pPoints[i].Y() = -pPoints[i].Y(); + // next curve segment + pCurve = (TTPOLYCURVE*)&pCurve->apfx[ i ]; + } - // insert into polypolygon - Polygon aPoly( nPnt, pPoints, (bHasOfflinePoints ? pFlags : NULL) ); - // convert to B2DPolyPolygon - // TODO: get rid of the intermediate PolyPolygon - rB2DPolyPoly.append( aPoly.getB2DPolygon() ); - } + // end point is start point for closed contour + // disabled, because Polygon class closes the contour itself + // pPoints[nPnt++] = pPoints[0]; + // #i35928# + // Added again, but add only when not yet closed + if(pPoints[nPnt - 1] != pPoints[0]) + { + if( bHasOfflinePoints ) + pFlags[nPnt] = pFlags[0]; - delete[] pPoints; - delete[] pFlags; + pPoints[nPnt++] = pPoints[0]; } - delete[] pData; + // convert y-coordinates W32 -> VCL + for( int i = 0; i < nPnt; ++i ) + pPoints[i].Y() = -pPoints[i].Y(); + + // insert into polypolygon + Polygon aPoly( nPnt, pPoints, (bHasOfflinePoints ? pFlags : NULL) ); + // convert to B2DPolyPolygon + // TODO: get rid of the intermediate PolyPolygon + rB2DPolyPoly.append( aPoly.getB2DPolygon() ); } + delete[] pPoints; + delete[] pFlags; + + delete[] pData; + // rescaling needed for the PolyPolygon conversion if( rB2DPolyPoly.count() ) { @@ -2803,7 +2637,7 @@ BOOL WinSalGraphics::GetGlyphOutline( long nIndex, rB2DPolyPoly.transform(basegfx::tools::createScaleB2DHomMatrix(fFactor, fFactor)); } - return bRet; + return TRUE; } // ----------------------------------------------------------------------- diff --git a/vcl/win/source/gdi/salnativewidgets-luna.cxx b/vcl/win/source/gdi/salnativewidgets-luna.cxx index 8197fb37cd6d..97e3e1b48c79 100755 --- a/vcl/win/source/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/source/gdi/salnativewidgets-luna.cxx @@ -188,6 +188,8 @@ void SalData::deInitNWF( void ) iter++; } aThemeMap.clear(); + if( maDwmLib ) + osl_unloadModule( maDwmLib ); } static HTHEME getThemeHandle( HWND hWnd, LPCWSTR name ) @@ -286,6 +288,22 @@ BOOL WinSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nP case CTRL_MENUBAR: if( nPart == PART_ENTIRE_CONTROL ) hTheme = getThemeHandle( mhWnd, L"Rebar"); + else if( GetSalData()->mbThemeMenuSupport ) + { + if( nPart == PART_MENU_ITEM ) + hTheme = getThemeHandle( mhWnd, L"Menu" ); + } + break; + case CTRL_MENU_POPUP: + if( GetSalData()->mbThemeMenuSupport ) + { + if( nPart == PART_ENTIRE_CONTROL || + nPart == PART_MENU_ITEM || + nPart == PART_MENU_ITEM_CHECK_MARK || + nPart == PART_MENU_ITEM_RADIO_MARK || + nPart == PART_MENU_SEPARATOR ) + hTheme = getThemeHandle( mhWnd, L"Menu" ); + } break; case CTRL_PROGRESS: if( nPart == PART_ENTIRE_CONTROL ) @@ -867,15 +885,23 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, if( nType == CTRL_MENUBAR ) { - if( nPart != PART_ENTIRE_CONTROL ) - return FALSE; - - if( aValue.getType() == CTRL_MENUBAR ) + if( nPart == PART_ENTIRE_CONTROL ) { - const MenubarValue *pValue = static_cast<const MenubarValue*>(&aValue); - rc.bottom += pValue->maTopDockingAreaHeight; // extend potential gradient to cover docking area as well + if( aValue.getType() == CTRL_MENUBAR ) + { + const MenubarValue *pValue = static_cast<const MenubarValue*>(&aValue); + rc.bottom += pValue->maTopDockingAreaHeight; // extend potential gradient to cover docking area as well + } + return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption); + } + else if( nPart == PART_MENU_ITEM ) + { + if( (nState & CTRL_STATE_ENABLED) ) + iState = (nState & CTRL_STATE_SELECTED) ? MBI_HOT : MBI_NORMAL; + else + iState = (nState & CTRL_STATE_SELECTED) ? MBI_DISABLEDHOT : MBI_DISABLED; + return ImplDrawTheme( hTheme, hDC, MENU_BARITEM, iState, rc, aCaption ); } - return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption); } if( nType == CTRL_PROGRESS ) @@ -954,6 +980,69 @@ BOOL ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption ); } + if( GetSalData()->mbThemeMenuSupport ) + { + if( nType == CTRL_MENU_POPUP ) + { + if( nPart == PART_ENTIRE_CONTROL ) + { + RECT aGutterRC = rc; + aGutterRC.left += aValue.getNumericVal(); + aGutterRC.right = aGutterRC.left+3; + return + ImplDrawTheme( hTheme, hDC, MENU_POPUPBACKGROUND, 0, rc, aCaption ) && + ImplDrawTheme( hTheme, hDC, MENU_POPUPGUTTER, 0, aGutterRC, aCaption ) + ; + } + else if( nPart == PART_MENU_ITEM ) + { + if( (nState & CTRL_STATE_ENABLED) ) + iState = (nState & CTRL_STATE_SELECTED) ? MPI_HOT : MPI_NORMAL; + else + iState = (nState & CTRL_STATE_SELECTED) ? MPI_DISABLEDHOT : MPI_DISABLED; + return ImplDrawTheme( hTheme, hDC, MENU_POPUPITEM, iState, rc, aCaption ); + } + else if( nPart == PART_MENU_ITEM_CHECK_MARK || nPart == PART_MENU_ITEM_RADIO_MARK ) + { + if( (nState & CTRL_STATE_PRESSED) ) + { + RECT aBGRect = rc; + if( aValue.getType() == CTRL_MENU_POPUP ) + { + const MenupopupValue& rMVal( static_cast<const MenupopupValue&>(aValue) ); + aBGRect.left = rMVal.maItemRect.Left(); + aBGRect.top = rMVal.maItemRect.Top(); + aBGRect.bottom = rMVal.maItemRect.Bottom()+1; // see below in drawNativeControl + aBGRect.right = rMVal.getNumericVal(); + + // FIXME: magic + aBGRect.left += 1; aBGRect.top += 1; aBGRect.bottom +=1; + } + iState = (nState & CTRL_STATE_ENABLED) ? MCB_NORMAL : MCB_DISABLED; + ImplDrawTheme( hTheme, hDC, MENU_POPUPCHECKBACKGROUND, iState, aBGRect, aCaption ); + if( nPart == PART_MENU_ITEM_CHECK_MARK ) + iState = (nState & CTRL_STATE_ENABLED) ? MC_CHECKMARKNORMAL : MC_CHECKMARKDISABLED; + else + iState = (nState & CTRL_STATE_ENABLED) ? MC_BULLETNORMAL : MC_BULLETDISABLED; + return ImplDrawTheme( hTheme, hDC, MENU_POPUPCHECK, iState, rc, aCaption ); + } + else + return true; // unchecked: do nothing + } + else if( nPart == PART_MENU_SEPARATOR ) + { + rc.left += aValue.getNumericVal(); // adjust for gutter position + Rectangle aRect( ImplGetThemeRect( hTheme, hDC, + MENU_POPUPSEPARATOR, 0, Rectangle( rc.left, rc.top, rc.right, rc.bottom ) ) ); + // center the separator inside the passed rectangle + long nDY = ((rc.bottom - rc.top + 1) - aRect.GetHeight()) / 2; + rc.top += nDY; + rc.bottom = rc.top+aRect.GetHeight()-1; + return ImplDrawTheme( hTheme, hDC, MENU_POPUPSEPARATOR, 0, rc, aCaption ); + } + } + } + return false; } @@ -1027,6 +1116,11 @@ BOOL WinSalGraphics::drawNativeControl( ControlType nType, case CTRL_MENUBAR: if( nPart == PART_ENTIRE_CONTROL ) hTheme = getThemeHandle( mhWnd, L"Rebar"); + else if( GetSalData()->mbThemeMenuSupport ) + { + if( nPart == PART_MENU_ITEM ) + hTheme = getThemeHandle( mhWnd, L"Menu" ); + } break; case CTRL_PROGRESS: if( nPart == PART_ENTIRE_CONTROL ) @@ -1040,6 +1134,16 @@ BOOL WinSalGraphics::drawNativeControl( ControlType nType, if( nPart == PART_TRACK_HORZ_AREA || nPart == PART_TRACK_VERT_AREA ) hTheme = getThemeHandle( mhWnd, L"Trackbar" ); break; + case CTRL_MENU_POPUP: + if( GetSalData()->mbThemeMenuSupport ) + { + if( nPart == PART_ENTIRE_CONTROL || nPart == PART_MENU_ITEM || + nPart == PART_MENU_ITEM_CHECK_MARK || nPart == PART_MENU_ITEM_RADIO_MARK || + nPart == PART_MENU_SEPARATOR + ) + hTheme = getThemeHandle( mhWnd, L"Menu" ); + } + break; default: hTheme = NULL; break; @@ -1196,7 +1300,7 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType, HTHEME hTheme = getThemeHandle( mhWnd, L"Edit"); if( hTheme ) { - // get borderr size + // get border size Rectangle aBoxRect( rControlRegion ); Rectangle aRect( ImplGetThemeRect( hTheme, hDC, EP_BACKGROUNDWITHBORDER, EBWBS_HOT, aBoxRect ) ); @@ -1225,6 +1329,29 @@ BOOL WinSalGraphics::getNativeControlRegion( ControlType nType, } } + if( GetSalData()->mbThemeMenuSupport ) + { + if( nType == CTRL_MENU_POPUP ) + { + if( nPart == PART_MENU_ITEM_CHECK_MARK || + nPart == PART_MENU_ITEM_RADIO_MARK ) + { + HTHEME hTheme = getThemeHandle( mhWnd, L"Menu"); + Rectangle aBoxRect( rControlRegion ); + Rectangle aRect( ImplGetThemeRect( hTheme, hDC, + MENU_POPUPCHECK, + MC_CHECKMARKNORMAL, + aBoxRect ) ); + if( aBoxRect.GetWidth() && aBoxRect.GetHeight() ) + { + rNativeContentRegion = aRect; + rNativeBoundingRegion = rNativeContentRegion; + bRet = TRUE; + } + } + } + } + if( nType == CTRL_SLIDER && ( (nPart == PART_THUMB_HORZ) || (nPart == PART_THUMB_VERT) ) ) { HTHEME hTheme = getThemeHandle( mhWnd, L"Trackbar"); diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx index 9d8d41723f64..702ff639ed84 100644 --- a/vcl/win/source/gdi/salprn.cxx +++ b/vcl/win/source/gdi/salprn.cxx @@ -1798,8 +1798,11 @@ WIN_BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ ) MSG aMsg; if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) ) { - TranslateMessage( &aMsg ); - ImplDispatchMessage( &aMsg ); + if ( !ImplInterceptChildWindowKeyDown( aMsg ) ) + { + TranslateMessage( &aMsg ); + ImplDispatchMessage( &aMsg ); + } i++; if ( i > 15 ) bWhile = FALSE; @@ -2060,8 +2063,12 @@ BOOL WinSalPrinter::StartJob( const XubString* pFileName, MSG aMsg; if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) ) { - TranslateMessage( &aMsg ); - ImplDispatchMessage( &aMsg ); + if ( !ImplInterceptChildWindowKeyDown( aMsg ) ) + { + TranslateMessage( &aMsg ); + ImplDispatchMessage( &aMsg ); + } + i++; if ( i > 15 ) bWhile = FALSE; diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index 82fa9bb4b5e1..a4c588f059d4 100644..100755 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -244,24 +244,11 @@ HFONT WinLayout::DisableFontScaling() const if( mfFontScale == 1.0 ) return 0; - HFONT hHugeFont = 0; - if( aSalShlData.mbWNT ) - { - LOGFONTW aLogFont; - ::GetObjectW( mhFont, sizeof(LOGFONTW), &aLogFont); - aLogFont.lfHeight = (LONG)(mfFontScale * aLogFont.lfHeight); - aLogFont.lfWidth = (LONG)(mfFontScale * aLogFont.lfWidth); - hHugeFont = ::CreateFontIndirectW( &aLogFont); - } - else - { - LOGFONTA aLogFont; - ::GetObjectA( mhFont, sizeof(LOGFONTA), &aLogFont); - aLogFont.lfHeight = (LONG)(mfFontScale * aLogFont.lfHeight); - aLogFont.lfWidth = (LONG)(mfFontScale * aLogFont.lfWidth); - hHugeFont = ::CreateFontIndirectA( &aLogFont); - } - + LOGFONTW aLogFont; + ::GetObjectW( mhFont, sizeof(LOGFONTW), &aLogFont); + aLogFont.lfHeight = (LONG)(mfFontScale * aLogFont.lfHeight); + aLogFont.lfWidth = (LONG)(mfFontScale * aLogFont.lfWidth); + HFONT hHugeFont = ::CreateFontIndirectW( &aLogFont); if( !hHugeFont ) return 0; @@ -671,57 +658,31 @@ void SimpleWinLayout::DrawText( SalGraphics& rGraphics ) const Point aPos = GetDrawPosition( Point( mnBaseAdv, 0 ) ); - // #108267#, limit the number of glyphs to avoid paint errors - UINT limitedGlyphCount = Min( 8192, mnGlyphCount ); - if( mnDrawOptions || aSalShlData.mbWNT ) - { - // #108267#, break up into glyph portions of a limited size required by Win32 API - const unsigned int maxGlyphCount = 8192; - UINT numGlyphPortions = mnGlyphCount / maxGlyphCount; - UINT remainingGlyphs = mnGlyphCount % maxGlyphCount; - - if( numGlyphPortions ) - { - // #108267#,#109387# break up string into smaller chunks - // the output positions will be updated by windows (SetTextAlign) - unsigned int i,n; - POINT oldPos; - UINT oldTa = ::GetTextAlign( aHDC ); - ::SetTextAlign( aHDC, (oldTa & ~TA_NOUPDATECP) | TA_UPDATECP ); - ::MoveToEx( aHDC, aPos.X(), aPos.Y(), &oldPos ); - for( i=n=0; n<numGlyphPortions; n++, i+=maxGlyphCount ) - ::ExtTextOutW( aHDC, 0, 0, mnDrawOptions, NULL, - mpOutGlyphs+i, maxGlyphCount, mpGlyphAdvances+i ); + // #108267#, break up into glyph portions of a limited size required by Win32 API + const unsigned int maxGlyphCount = 8192; + UINT numGlyphPortions = mnGlyphCount / maxGlyphCount; + UINT remainingGlyphs = mnGlyphCount % maxGlyphCount; + + if( numGlyphPortions ) + { + // #108267#,#109387# break up string into smaller chunks + // the output positions will be updated by windows (SetTextAlign) + POINT oldPos; + UINT oldTa = ::GetTextAlign( aHDC ); + ::SetTextAlign( aHDC, (oldTa & ~TA_NOUPDATECP) | TA_UPDATECP ); + ::MoveToEx( aHDC, aPos.X(), aPos.Y(), &oldPos ); + unsigned int i = 0; + for( unsigned int n = 0; n < numGlyphPortions; ++n, i+=maxGlyphCount ) ::ExtTextOutW( aHDC, 0, 0, mnDrawOptions, NULL, - mpOutGlyphs+i, remainingGlyphs, mpGlyphAdvances+i ); - ::MoveToEx( aHDC, oldPos.x, oldPos.y, (LPPOINT) NULL); - ::SetTextAlign( aHDC, oldTa ); - } - else - ::ExtTextOutW( aHDC, aPos.X(), aPos.Y(), mnDrawOptions, NULL, - mpOutGlyphs, mnGlyphCount, mpGlyphAdvances ); + mpOutGlyphs+i, maxGlyphCount, mpGlyphAdvances+i ); + ::ExtTextOutW( aHDC, 0, 0, mnDrawOptions, NULL, + mpOutGlyphs+i, remainingGlyphs, mpGlyphAdvances+i ); + ::MoveToEx( aHDC, oldPos.x, oldPos.y, (LPPOINT) NULL); + ::SetTextAlign( aHDC, oldTa ); } else - { - // #108267#, On Win9x, we get paint errors when drawing huge strings, even when - // split into pieces (see above), seems to be a problem in the internal text clipping - // so we just cut off the string - if( !mpGlyphOrigAdvs ) - ::ExtTextOutW( aHDC, aPos.X(), aPos.Y(), 0, NULL, - mpOutGlyphs, limitedGlyphCount, NULL ); - else - { - // workaround for problem in #106259# - long nXPos = mnBaseAdv; - for( unsigned int i = 0; i < limitedGlyphCount; ++i ) - { - ::ExtTextOutW( aHDC, aPos.X(), aPos.Y(), 0, NULL, - mpOutGlyphs+i, 1, NULL ); - nXPos += mpGlyphAdvances[ i ]; - aPos = GetDrawPosition( Point( nXPos, 0 ) ); - } - } - } + ::ExtTextOutW( aHDC, aPos.X(), aPos.Y(), mnDrawOptions, NULL, + mpOutGlyphs, mnGlyphCount, mpGlyphAdvances ); if( hOrigFont ) DeleteFont( SelectFont( aHDC, hOrigFont ) ); diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index f0ca1d68ef41..89a191c99ef6 100755 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -508,7 +508,7 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, } // create frame - if ( aSalShlData.mbWNT ) + if( true/*aSalShlData.mbWNT*/ ) { LPCWSTR pClassName; if ( bSubFrame ) @@ -536,17 +536,6 @@ SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, lpfnSetLayeredWindowAttributes( hWnd, 0, 230, 0x00000002 /*LWA_ALPHA*/ ); #endif } - else - { - LPCSTR pClassName; - if ( bSubFrame ) - pClassName = SAL_SUBFRAME_CLASSNAMEA; - else - pClassName = SAL_FRAME_CLASSNAMEA; - hWnd = CreateWindowExA( nExSysStyle, pClassName, "", nSysStyle, - CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, - hWndParent, 0, pInst->mhInst, (void*)pFrame ); - } if ( !hWnd ) { delete pFrame; @@ -617,21 +606,10 @@ HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, BOOL bAsChild ) nExSysStyle = 0; } - HWND hWnd = NULL; - if ( aSalShlData.mbWNT ) - { - LPCWSTR pClassName = SAL_SUBFRAME_CLASSNAMEW; - hWnd = CreateWindowExW( nExSysStyle, pClassName, L"", nSysStyle, + LPCWSTR pClassName = SAL_SUBFRAME_CLASSNAMEW; + HWND hWnd = CreateWindowExW( nExSysStyle, pClassName, L"", nSysStyle, CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, hWndParent, 0, hInstance, (void*)GetWindowPtr( oldhWnd ) ); - } - else - { - LPCSTR pClassName = SAL_SUBFRAME_CLASSNAMEA; - hWnd = CreateWindowExA( nExSysStyle, pClassName, "", nSysStyle, - CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, - hWndParent, 0, hInstance, (void*)GetWindowPtr( oldhWnd ) ); - } return hWnd; } @@ -2531,7 +2509,7 @@ static void ImplGetKeyNameText( LONG lParam, sal_Unicode* pBuf, int nKeyLen = 0; if ( lParam ) { - if ( aSalShlData.mbWNT ) + if ( true/*aSalShlData.mbWNT*/ ) { nKeyLen = GetKeyNameTextW( lParam, aKeyBuf, nMaxKeyLen ); // #i12401# the current unicows.dll has a bug in CharUpperBuffW, which corrupts the stack @@ -2553,32 +2531,6 @@ static void ImplGetKeyNameText( LONG lParam, sal_Unicode* pBuf, } } } - else // !mbWnt - { - sal_Char aAnsiKeyBuf[ nMaxKeyLen ]; - int nAnsiKeyLen = GetKeyNameTextA( lParam, aAnsiKeyBuf, nMaxKeyLen ); - DBG_ASSERT( nAnsiKeyLen <= nMaxKeyLen, "Invalid key name length!" ); - if( nAnsiKeyLen > nMaxKeyLen ) - nAnsiKeyLen = 0; - else if( nAnsiKeyLen > 0 ) - { - // Capitalize just the first letter of key names - // TODO: check MCBS key names - CharLowerBuffA( aAnsiKeyBuf, nAnsiKeyLen ); - - bool bUpper = true; - for( sal_Char *pA=aAnsiKeyBuf, *pE=pA+nAnsiKeyLen; pA < pE; ++pA ) - { - if( bUpper ) - CharUpperBuffA( pA, 1 ); - bUpper = (*pA=='+') || (*pA=='-') || (*pA==' ') || (*pA=='.'); - } - - // Convert to Unicode and copy the data in the Unicode Buffer - nKeyLen = MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, - aAnsiKeyBuf, nAnsiKeyLen, aKeyBuf, nMaxKeyLen ); - } - } } if ( (nKeyLen > 0) || pReplace ) @@ -2883,6 +2835,29 @@ static long ImplA2I( const BYTE* pStr ) } // ----------------------------------------------------------------------- +static HRESULT WINAPI backwardCompatibleDwmIsCompositionEnabled( WIN_BOOL* pOut ) +{ + *pOut = FALSE; + return S_OK; +} + +static WIN_BOOL ImplDwmIsCompositionEnabled() +{ + SalData* pSalData = GetSalData(); + if( ! pSalData->mpDwmIsCompositionEnabled ) + { + rtl::OUString aLibraryName( RTL_CONSTASCII_USTRINGPARAM( "Dwmapi.dll" ) ); + pSalData->maDwmLib = osl_loadModule( aLibraryName.pData, SAL_LOADMODULE_DEFAULT ); + if( pSalData->maDwmLib ) + pSalData->mpDwmIsCompositionEnabled = (DwmIsCompositionEnabled_ptr)osl_getAsciiFunctionSymbol( pSalData->maDwmLib, "DwmIsCompositionEnabled" ); + if( ! pSalData->mpDwmIsCompositionEnabled ) // something failed + pSalData->mpDwmIsCompositionEnabled = backwardCompatibleDwmIsCompositionEnabled; + } + WIN_BOOL aResult = FALSE; + HRESULT nError = pSalData->mpDwmIsCompositionEnabled( &aResult ); + return nError == S_OK && aResult; +} + void WinSalFrame::UpdateSettings( AllSettings& rSettings ) { @@ -2915,30 +2890,26 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) } StyleSettings aStyleSettings = rSettings.GetStyleSettings(); - BOOL bCompBorder = (aStyleSettings.GetOptions() & (STYLE_OPTION_MACSTYLE | STYLE_OPTION_UNIXSTYLE)) == 0; // TODO: once those options vanish: just set bCompBorder to TRUE // to have the system colors read aStyleSettings.SetScrollBarSize( GetSystemMetrics( SM_CXVSCROLL ) ); aStyleSettings.SetSpinSize( GetSystemMetrics( SM_CXVSCROLL ) ); aStyleSettings.SetCursorBlinkTime( GetCaretBlinkTime() ); - if ( bCompBorder ) - { - aStyleSettings.SetFloatTitleHeight( GetSystemMetrics( SM_CYSMCAPTION ) ); - aStyleSettings.SetTitleHeight( GetSystemMetrics( SM_CYCAPTION ) ); - aStyleSettings.SetActiveBorderColor( ImplWinColorToSal( GetSysColor( COLOR_ACTIVEBORDER ) ) ); - aStyleSettings.SetDeactiveBorderColor( ImplWinColorToSal( GetSysColor( COLOR_INACTIVEBORDER ) ) ); - if ( aSalShlData.mnVersion >= 410 ) - { - aStyleSettings.SetActiveColor2( ImplWinColorToSal( GetSysColor( COLOR_GRADIENTACTIVECAPTION ) ) ); - aStyleSettings.SetDeactiveColor( ImplWinColorToSal( GetSysColor( COLOR_GRADIENTINACTIVECAPTION ) ) ); - } - aStyleSettings.SetFaceColor( ImplWinColorToSal( GetSysColor( COLOR_3DFACE ) ) ); - aStyleSettings.SetInactiveTabColor( aStyleSettings.GetFaceColor() ); - aStyleSettings.SetLightColor( ImplWinColorToSal( GetSysColor( COLOR_3DHILIGHT ) ) ); - aStyleSettings.SetLightBorderColor( ImplWinColorToSal( GetSysColor( COLOR_3DLIGHT ) ) ); - aStyleSettings.SetShadowColor( ImplWinColorToSal( GetSysColor( COLOR_3DSHADOW ) ) ); - aStyleSettings.SetDarkShadowColor( ImplWinColorToSal( GetSysColor( COLOR_3DDKSHADOW ) ) ); - } + aStyleSettings.SetFloatTitleHeight( GetSystemMetrics( SM_CYSMCAPTION ) ); + aStyleSettings.SetTitleHeight( GetSystemMetrics( SM_CYCAPTION ) ); + aStyleSettings.SetActiveBorderColor( ImplWinColorToSal( GetSysColor( COLOR_ACTIVEBORDER ) ) ); + aStyleSettings.SetDeactiveBorderColor( ImplWinColorToSal( GetSysColor( COLOR_INACTIVEBORDER ) ) ); + if ( aSalShlData.mnVersion >= 410 ) + { + aStyleSettings.SetActiveColor2( ImplWinColorToSal( GetSysColor( COLOR_GRADIENTACTIVECAPTION ) ) ); + aStyleSettings.SetDeactiveColor( ImplWinColorToSal( GetSysColor( COLOR_GRADIENTINACTIVECAPTION ) ) ); + } + aStyleSettings.SetFaceColor( ImplWinColorToSal( GetSysColor( COLOR_3DFACE ) ) ); + aStyleSettings.SetInactiveTabColor( aStyleSettings.GetFaceColor() ); + aStyleSettings.SetLightColor( ImplWinColorToSal( GetSysColor( COLOR_3DHILIGHT ) ) ); + aStyleSettings.SetLightBorderColor( ImplWinColorToSal( GetSysColor( COLOR_3DLIGHT ) ) ); + aStyleSettings.SetShadowColor( ImplWinColorToSal( GetSysColor( COLOR_3DSHADOW ) ) ); + aStyleSettings.SetDarkShadowColor( ImplWinColorToSal( GetSysColor( COLOR_3DDKSHADOW ) ) ); aStyleSettings.SetWorkspaceColor( ImplWinColorToSal( GetSysColor( COLOR_APPWORKSPACE ) ) ); aStyleSettings.SetHelpColor( ImplWinColorToSal( GetSysColor( COLOR_INFOBK ) ) ); aStyleSettings.SetHelpTextColor( ImplWinColorToSal( GetSysColor( COLOR_INFOTEXT ) ) ); @@ -2960,37 +2931,52 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) aStyleSettings.SetHighlightTextColor( ImplWinColorToSal( GetSysColor( COLOR_HIGHLIGHTTEXT ) ) ); aStyleSettings.SetMenuHighlightColor( aStyleSettings.GetHighlightColor() ); aStyleSettings.SetMenuHighlightTextColor( aStyleSettings.GetHighlightTextColor() ); - if ( bCompBorder ) - { - aStyleSettings.SetMenuColor( ImplWinColorToSal( GetSysColor( COLOR_MENU ) ) ); - aStyleSettings.SetMenuBarColor( aStyleSettings.GetMenuColor() ); - aStyleSettings.SetMenuBorderColor( aStyleSettings.GetLightBorderColor() ); // overriden below for flat menus - aStyleSettings.SetUseFlatBorders( FALSE ); - aStyleSettings.SetUseFlatMenues( FALSE ); - aStyleSettings.SetMenuTextColor( ImplWinColorToSal( GetSysColor( COLOR_MENUTEXT ) ) ); - aStyleSettings.SetMenuBarTextColor( ImplWinColorToSal( GetSysColor( COLOR_MENUTEXT ) ) ); - aStyleSettings.SetActiveColor( ImplWinColorToSal( GetSysColor( COLOR_ACTIVECAPTION ) ) ); - aStyleSettings.SetActiveTextColor( ImplWinColorToSal( GetSysColor( COLOR_CAPTIONTEXT ) ) ); - aStyleSettings.SetDeactiveColor( ImplWinColorToSal( GetSysColor( COLOR_INACTIVECAPTION ) ) ); - aStyleSettings.SetDeactiveTextColor( ImplWinColorToSal( GetSysColor( COLOR_INACTIVECAPTIONTEXT ) ) ); - if ( aSalShlData.mbWXP ) + + ImplSVData* pSVData = ImplGetSVData(); + pSVData->maNWFData.mnMenuFormatExtraBorder = 0; + pSVData->maNWFData.maMenuBarHighlightTextColor = Color( COL_TRANSPARENT ); + GetSalData()->mbThemeMenuSupport = FALSE; + aStyleSettings.SetMenuColor( ImplWinColorToSal( GetSysColor( COLOR_MENU ) ) ); + aStyleSettings.SetMenuBarColor( aStyleSettings.GetMenuColor() ); + aStyleSettings.SetMenuBorderColor( aStyleSettings.GetLightBorderColor() ); // overriden below for flat menus + aStyleSettings.SetUseFlatBorders( FALSE ); + aStyleSettings.SetUseFlatMenues( FALSE ); + aStyleSettings.SetMenuTextColor( ImplWinColorToSal( GetSysColor( COLOR_MENUTEXT ) ) ); + aStyleSettings.SetMenuBarTextColor( ImplWinColorToSal( GetSysColor( COLOR_MENUTEXT ) ) ); + aStyleSettings.SetActiveColor( ImplWinColorToSal( GetSysColor( COLOR_ACTIVECAPTION ) ) ); + aStyleSettings.SetActiveTextColor( ImplWinColorToSal( GetSysColor( COLOR_CAPTIONTEXT ) ) ); + aStyleSettings.SetDeactiveColor( ImplWinColorToSal( GetSysColor( COLOR_INACTIVECAPTION ) ) ); + aStyleSettings.SetDeactiveTextColor( ImplWinColorToSal( GetSysColor( COLOR_INACTIVECAPTIONTEXT ) ) ); + if ( aSalShlData.mbWXP ) + { + // only xp supports a different menu bar color + long bFlatMenues = 0; + SystemParametersInfo( SPI_GETFLATMENU, 0, &bFlatMenues, 0); + if( bFlatMenues ) { - // only xp supports a different menu bar color - long bFlatMenues = 0; - SystemParametersInfo( SPI_GETFLATMENU, 0, &bFlatMenues, 0); - if( bFlatMenues ) - { - aStyleSettings.SetUseFlatMenues( TRUE ); - aStyleSettings.SetMenuBarColor( ImplWinColorToSal( GetSysColor( COLOR_MENUBAR ) ) ); - aStyleSettings.SetMenuHighlightColor( ImplWinColorToSal( GetSysColor( COLOR_MENUHILIGHT ) ) ); - aStyleSettings.SetMenuBorderColor( ImplWinColorToSal( GetSysColor( COLOR_3DSHADOW ) ) ); - - // flat borders for our controls etc. as well in this mode (ie, no 3d borders) - // this is not active in the classic style appearance - aStyleSettings.SetUseFlatBorders( TRUE ); - } + aStyleSettings.SetUseFlatMenues( TRUE ); + aStyleSettings.SetMenuBarColor( ImplWinColorToSal( GetSysColor( COLOR_MENUBAR ) ) ); + aStyleSettings.SetMenuHighlightColor( ImplWinColorToSal( GetSysColor( COLOR_MENUHILIGHT ) ) ); + aStyleSettings.SetMenuBorderColor( ImplWinColorToSal( GetSysColor( COLOR_3DSHADOW ) ) ); + + // flat borders for our controls etc. as well in this mode (ie, no 3d borders) + // this is not active in the classic style appearance + aStyleSettings.SetUseFlatBorders( TRUE ); } } + // check if vista or newer runs + // in Aero theme (and similar ?) the menu text color does not change + // for selected items; also on WinXP and earlier menus are not themed + if( aSalShlData.maVersionInfo.dwMajorVersion >= 6 && + ImplDwmIsCompositionEnabled() + ) + { + // in aero menuitem highlight text is drawn in the same color as normal + aStyleSettings.SetMenuHighlightTextColor( aStyleSettings.GetMenuTextColor() ); + pSVData->maNWFData.mnMenuFormatExtraBorder = 2; + pSVData->maNWFData.maMenuBarHighlightTextColor = aStyleSettings.GetMenuTextColor(); + GetSalData()->mbThemeMenuSupport = TRUE; + } // Bei hellgrau geben wir die Farbe vor, damit es besser aussieht if ( aStyleSettings.GetFaceColor() == COL_LIGHTGRAY ) aStyleSettings.SetCheckedColor( Color( 0xCC, 0xCC, 0xCC ) ); @@ -3027,7 +3013,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) Font aAppFont = aStyleSettings.GetAppFont(); Font aIconFont = aStyleSettings.GetIconFont(); HDC hDC = GetDC( 0 ); - if ( aSalShlData.mbWNT ) + if( true/*aSalShlData.mbWNT*/ ) { NONCLIENTMETRICSW aNonClientMetrics; aNonClientMetrics.cbSize = sizeof( aNonClientMetrics ); @@ -3044,23 +3030,6 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) ImplSalUpdateStyleFontW( hDC, aLogFont, aIconFont ); } } - else - { - NONCLIENTMETRICSA aNonClientMetrics; - aNonClientMetrics.cbSize = sizeof( aNonClientMetrics ); - if ( SystemParametersInfoA( SPI_GETNONCLIENTMETRICS, sizeof( aNonClientMetrics ), &aNonClientMetrics, 0 ) ) - { - ImplSalUpdateStyleFontA( hDC, aNonClientMetrics.lfMenuFont, aMenuFont ); - ImplSalUpdateStyleFontA( hDC, aNonClientMetrics.lfCaptionFont, aTitleFont ); - ImplSalUpdateStyleFontA( hDC, aNonClientMetrics.lfSmCaptionFont, aFloatTitleFont ); - ImplSalUpdateStyleFontA( hDC, aNonClientMetrics.lfStatusFont, aHelpFont ); - ImplSalUpdateStyleFontA( hDC, aNonClientMetrics.lfMessageFont, aAppFont ); - - LOGFONTA aLogFont; - if ( SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0, &aLogFont, 0 ) ) - ImplSalUpdateStyleFontA( hDC, aLogFont, aIconFont ); - } - } // get screen font resolution to calculate toolbox item size long nDPIY = GetDeviceCaps( hDC, LOGPIXELSY ); @@ -3649,27 +3618,7 @@ static void ImplUpdateInputLang( WinSalFrame* pFrame ) // If we are on Windows NT we use Unicode FrameProcs and so we // get Unicode charcodes directly from Windows // no need to set up a code page - if ( aSalShlData.mbWNT ) - return; - - if ( !nLang ) - { - pFrame->mnInputLang = 0; - pFrame->mnInputCodePage = GetACP(); - } - else if ( bLanguageChange ) - { - sal_Char aBuf[10]; - if ( GetLocaleInfoA( MAKELCID( nLang, SORT_DEFAULT ), LOCALE_IDEFAULTANSICODEPAGE, - aBuf, sizeof(aBuf) ) > 0 ) - { - pFrame->mnInputCodePage = ImplStrToNum( aBuf ); - if ( !pFrame->mnInputCodePage ) - pFrame->mnInputCodePage = GetACP(); - } - else - pFrame->mnInputCodePage = GetACP(); - } + return; } @@ -3679,29 +3628,7 @@ static sal_Unicode ImplGetCharCode( WinSalFrame* pFrame, WPARAM nCharCode ) // If we are on Windows NT we use Unicode FrameProcs and so we // get Unicode charcodes directly from Windows - if ( aSalShlData.mbWNT ) - return (sal_Unicode)nCharCode; - - sal_Char aCharBuf[2]; - int nCharLen; - WCHAR c; - if ( nCharCode > 0xFF ) - { - aCharBuf[0] = (sal_Char)(nCharCode>>8); - aCharBuf[1] = (sal_Char)nCharCode; - nCharLen = 2; - } - else - { - aCharBuf[0] = (sal_Char)nCharCode; - nCharLen = 1; - } - if ( ::MultiByteToWideChar( pFrame->mnInputCodePage, - MB_PRECOMPOSED, - aCharBuf, nCharLen, &c, 1 ) ) - return (sal_Unicode)c; - else - return (sal_Unicode)nCharCode; + return (sal_Unicode)nCharCode; } // ----------------------------------------------------------------------- @@ -4507,16 +4434,8 @@ static void ImplHandleSettingsChangeMsg( HWND hWnd, UINT nMsg, { if ( lParam ) { - if ( aSalShlData.mbWNT ) - { if ( ImplSalWICompareAscii( (const wchar_t*)lParam, "devices" ) == 0 ) nSalEvent = SALEVENT_PRINTERCHANGED; - } - else - { - if ( stricmp( (const char*)lParam, "devices" ) == 0 ) - nSalEvent = SALEVENT_PRINTERCHANGED; - } } } diff --git a/vcl/win/source/window/salobj.cxx b/vcl/win/source/window/salobj.cxx index 2f657968284f..bf0f29bb72d3 100644 --- a/vcl/win/source/window/salobj.cxx +++ b/vcl/win/source/window/salobj.cxx @@ -39,6 +39,7 @@ #include <salframe.h> #include <salobj.h> #include <tools/debug.hxx> +#include <vcl/svapp.hxx> // ======================================================================= @@ -103,6 +104,46 @@ WinSalFrame* ImplFindSalObjectFrame( HWND hWnd ) // ----------------------------------------------------------------------- +sal_Bool ImplInterceptChildWindowKeyDown( MSG& rMsg ) +{ + sal_Bool bResult = sal_False; + if ( rMsg.message == WM_KEYDOWN ) + { + wchar_t pClassName[10]; + sal_Int32 nLen = GetClassNameW( rMsg.hwnd, pClassName, 10 ); + if ( !( nLen == 9 && wcsncmp( pClassName, SAL_OBJECT_CLASSNAMEW, nLen ) == 0 ) ) + { + // look for the first SalObject in the parent hierarchy + HWND hWin = rMsg.hwnd; + HWND hLastOLEWindow = hWin; + WinSalObject* pSalObj = NULL; + do + { + hLastOLEWindow = hWin; + hWin = ::GetParent( hWin ); + if ( hWin ) + { + nLen = GetClassNameW( hWin, pClassName, 10 ); + if ( nLen == 9 && wcsncmp( pClassName, SAL_OBJECT_CLASSNAMEW, nLen ) == 0 ) + pSalObj = GetSalObjWindowPtr( hWin ); + } + } while( hWin && !pSalObj ); + + if ( pSalObj && pSalObj->mbInterceptChildWindowKeyDown && pSalObj->maSysData.hWnd ) + { + bResult = ( 1 == ImplSendMessage( pSalObj->maSysData.hWnd, rMsg.message, rMsg.wParam, rMsg.lParam ) ); + } + } + } + + return bResult; +} + +// ----------------------------------------------------------------------- + + +// ----------------------------------------------------------------------- + LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam ) { // Used for Unicode and none Unicode @@ -493,20 +534,10 @@ SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent ) // Hook installieren, wenn es das erste SalObject ist if ( !pSalData->mpFirstObject ) { - if ( aSalShlData.mbWNT ) - { - pSalData->mhSalObjMsgHook = SetWindowsHookExW( WH_CALLWNDPROC, - SalSysMsgProc, - pSalData->mhInst, - pSalData->mnAppThreadId ); - } - else - { - pSalData->mhSalObjMsgHook = SetWindowsHookExA( WH_CALLWNDPROC, + pSalData->mhSalObjMsgHook = SetWindowsHookExW( WH_CALLWNDPROC, SalSysMsgProc, pSalData->mhInst, pSalData->mnAppThreadId ); - } } if ( !pSalData->mbObjClassInit ) @@ -623,6 +654,7 @@ WinSalObject::WinSalObject() mhLastFocusWnd = 0; maSysData.nSize = sizeof( SystemEnvData ); mpStdClipRgnData = NULL; + mbInterceptChildWindowKeyDown = sal_False; // Insert object in objectlist mpNextObject = pSalData->mpFirstObject; @@ -836,3 +868,11 @@ const SystemEnvData* WinSalObject::GetSystemData() const { return &maSysData; } + +// ----------------------------------------------------------------------- + +void WinSalObject::InterceptChildWindowKeyDown( sal_Bool bIntercept ) +{ + mbInterceptChildWindowKeyDown = bIntercept; +} + |