diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2010-01-28 19:19:29 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2010-01-28 19:19:29 +0000 |
commit | ffeddbc20aa6c3d92e00259871d3f5458697fe71 (patch) | |
tree | 8dd292c9f69aca06eecc90a3a856b47eec94a10b | |
parent | 63d143633f395ad30ad4c4583600a0caa58b2592 (diff) | |
parent | a79a4812e4cec0a2a0711279b20af5a0f6631838 (diff) |
koheidatapilot03: merge with DEV300_m63
-rw-r--r-- | accessibility/bridge/org/openoffice/java/accessibility/Tree.java | 10 | ||||
-rwxr-xr-x | accessibility/prj/build.lst | 2 | ||||
-rw-r--r-- | extensions/source/config/ldap/ldapaccess.cxx | 15 | ||||
-rw-r--r-- | extensions/source/config/ldap/wrapldapinclude.hxx | 6 | ||||
-rw-r--r-- | forms/qa/integration/forms/FormLayer.java | 22 | ||||
-rw-r--r-- | forms/qa/integration/forms/FormPropertyBags.java | 2 | ||||
-rw-r--r-- | forms/source/component/FormComponent.cxx | 9 | ||||
-rw-r--r-- | package/inc/ByteGrabber.hxx | 4 | ||||
-rw-r--r-- | package/inc/ZipFile.hxx | 2 | ||||
-rw-r--r-- | package/inc/ZipPackage.hxx | 1 | ||||
-rw-r--r-- | package/source/xstor/xstorage.cxx | 18 | ||||
-rw-r--r-- | package/source/zipapi/ByteGrabber.cxx | 21 | ||||
-rw-r--r-- | package/source/zipapi/ZipFile.cxx | 26 | ||||
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 20 | ||||
-rw-r--r-- | setup_native/scripts/fake-db.spec | 1 | ||||
-rwxr-xr-x | setup_native/source/packinfo/packinfo_office.txt | 16 | ||||
-rw-r--r-- | setup_native/source/packinfo/spellchecker_selection.txt | 1 |
17 files changed, 157 insertions, 19 deletions
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Tree.java b/accessibility/bridge/org/openoffice/java/accessibility/Tree.java index 52debca0a5f6..83f8c9a10c49 100644 --- a/accessibility/bridge/org/openoffice/java/accessibility/Tree.java +++ b/accessibility/bridge/org/openoffice/java/accessibility/Tree.java @@ -118,6 +118,16 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces } break; + case AccessibleEventId.LISTBOX_ENTRY_EXPANDED: + firePropertyChange(AccessibleContext.ACCESSIBLE_STATE_PROPERTY, + AccessibleState.COLLAPSED, AccessibleState.EXPANDED); + break; + + case AccessibleEventId.LISTBOX_ENTRY_COLLAPSED: + firePropertyChange(AccessibleContext.ACCESSIBLE_STATE_PROPERTY, + AccessibleState.EXPANDED, AccessibleState.COLLAPSED); + break; + default: super.notifyEvent(event); } diff --git a/accessibility/prj/build.lst b/accessibility/prj/build.lst index 351473e38450..cd30f3452a30 100755 --- a/accessibility/prj/build.lst +++ b/accessibility/prj/build.lst @@ -1,4 +1,4 @@ -ac accessibility : l10n tools jurt offuh unoil vcl jvmaccess cppu sal toolkit svtools NULL +ac accessibility : l10n tools jurt offuh unoil vcl javaunohelper jvmaccess cppu sal toolkit svtools NULL ac accessibility usr1 - all ac_mkout NULL ac accessibility\inc nmake - all ac_inc NULL ac accessibility\bridge\org\openoffice\java\accessibility nmake - w ac_ooja ac_inc NULL diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx index a850a441c5fe..ee7505c8a518 100644 --- a/extensions/source/config/ldap/ldapaccess.cxx +++ b/extensions/source/config/ldap/ldapaccess.cxx @@ -315,14 +315,17 @@ void LdapConnection::loadModule() if ( !s_Ldap_Module ) { #if defined(WIN) || defined(WNT) - const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM("nsldap32v50.dll")); +# define LIBLDAP "nsldap32v50.dll" #else -#ifdef WITH_OPENLDAP - const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM("libldap.so")); -#else - const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM("libldap50.so")); -#endif +# ifdef WITH_OPENLDAP +# define xstr(s) str(s) +# define str(s) #s +# define LIBLDAP "libldap-" xstr(LDAP_VENDOR_VERSION_MAJOR) "." xstr(LDAP_VENDOR_VERSION_MINOR) ".so." xstr(LDAP_VENDOR_VERSION_MAJOR) +# else +# define LIBLDAP "libldap50.so" +# endif #endif + const ::rtl::OUString sModuleName(RTL_CONSTASCII_USTRINGPARAM(LIBLDAP)); // load the dbtools library s_Ldap_Module = osl_loadModuleRelative(&thisModule, sModuleName.pData, 0); diff --git a/extensions/source/config/ldap/wrapldapinclude.hxx b/extensions/source/config/ldap/wrapldapinclude.hxx index 4c1bbdc350f8..b3b8d45e94d7 100644 --- a/extensions/source/config/ldap/wrapldapinclude.hxx +++ b/extensions/source/config/ldap/wrapldapinclude.hxx @@ -35,6 +35,12 @@ #ifdef WITH_OPENLDAP #include <ldap.h> +#ifndef LDAP_API +# define LDAP_API(rt) rt +#endif +#ifndef LDAP_CALL +# define LDAP_CALL +#endif #else #ifndef LDAP_INCLUDED #define LDAP_INCLUDED diff --git a/forms/qa/integration/forms/FormLayer.java b/forms/qa/integration/forms/FormLayer.java index d67e28bcf412..032ca5e7331a 100644 --- a/forms/qa/integration/forms/FormLayer.java +++ b/forms/qa/integration/forms/FormLayer.java @@ -310,7 +310,27 @@ public class FormLayer } /* ------------------------------------------------------------------ */ - /** retrieves a control model with a given access path + /** retrieves a control model with a given (integer) access path + */ + public XPropertySet getControlModel( int[] _accessPath ) throws com.sun.star.uno.Exception + { + XIndexAccess indexAcc = (XIndexAccess)UnoRuntime.queryInterface( XIndexAccess.class, + m_document.getFormComponentTreeRoot() ); + XPropertySet controlModel = null; + int i=0; + while ( ( indexAcc != null ) && ( i < _accessPath.length ) ) + { + controlModel = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, + indexAcc.getByIndex( _accessPath[i] ) ); + indexAcc = (XIndexAccess)UnoRuntime.queryInterface( XIndexAccess.class, + controlModel ); + ++i; + } + return controlModel; + } + + /* ------------------------------------------------------------------ */ + /** retrieves a control model with a given (string) access path */ public XPropertySet getControlModel( String[] _accessPath ) throws com.sun.star.uno.Exception { diff --git a/forms/qa/integration/forms/FormPropertyBags.java b/forms/qa/integration/forms/FormPropertyBags.java index 92aa2b8b6236..4adb04796030 100644 --- a/forms/qa/integration/forms/FormPropertyBags.java +++ b/forms/qa/integration/forms/FormPropertyBags.java @@ -180,7 +180,7 @@ public class FormPropertyBags extends complexlib.ComplexTestCase implements XPro m_document = DocumentHelper.loadDocument( m_orb, documentURL ); m_formLayer = new FormLayer( m_document ); - XPropertySet textFieldModel = m_formLayer.getControlModel( new String[] { "Standard", "TextBox" } ); + XPropertySet textFieldModel = m_formLayer.getControlModel( new int[] { 0, 0 } ); // all persistent properties should have the expected values assure( "persistent properties did not survive reload (1)!", ((String)textFieldModel.getPropertyValue( "SomeBoundText" )).equals( "ChangedBoundText" ) ); diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 23c05be9f89f..3b6a6afaf5de 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -1977,7 +1977,6 @@ void OBoundControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, co //------------------------------------------------------------------------------ void SAL_CALL OBoundControlModel::propertyChange( const PropertyChangeEvent& evt ) throw(RuntimeException) { - // RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "forms", "dev@dba.openoffice.org", "OControlModel::setFastPropertyValue_NoBroadcast" ); // if the DBColumn value changed, transfer it to the control if ( evt.PropertyName.equals( PROPERTY_VALUE ) ) { @@ -2267,6 +2266,14 @@ void OBoundControlModel::impl_connectDatabaseColumn_noNotify( bool _bFromReload m_bLoaded = sal_True; onConnectedDbColumn( xRowSet ); + // Some derived classes decide to cache the "current" (resp. "last known") control value, so operations like + // commitControlValueToDbColumn can be made a no-op when nothing actually changed. + // Normally, this cache is kept in sync with the column value, but during a reload, this synchronization is + // temporarily disable. To allow the derived classes to update their cache from the current column value, + // we call translateDbColumnToControlValue. + if ( _bFromReload && hasField() ) + translateDbColumnToControlValue(); + // initially transfer the db column value to the control, if we successfully connected to a database column if ( hasField() ) initFromField( xRowSet ); diff --git a/package/inc/ByteGrabber.hxx b/package/inc/ByteGrabber.hxx index 725b2819f371..d4869845f066 100644 --- a/package/inc/ByteGrabber.hxx +++ b/package/inc/ByteGrabber.hxx @@ -38,12 +38,16 @@ #include <com/sun/star/uno/RuntimeException.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp> +#include <osl/mutex.hxx> + namespace com { namespace sun { namespace star { namespace io { class XSeekable; class XInputStream; } } } } class ByteGrabber { protected: + ::osl::Mutex m_aMutex; + com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xStream; com::sun::star::uno::Reference < com::sun::star::io::XSeekable > xSeek; com::sun::star::uno::Sequence < sal_Int8 > aSequence; diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx index a954a1691c4b..a4129f4fbbfe 100644 --- a/package/inc/ZipFile.hxx +++ b/package/inc/ZipFile.hxx @@ -65,6 +65,8 @@ class EncryptionData; class ZipFile { protected: + ::osl::Mutex m_aMutex; + ::rtl::OUString sComment; /* zip file comment */ EntryHash aEntries; ByteGrabber aGrabber; diff --git a/package/inc/ZipPackage.hxx b/package/inc/ZipPackage.hxx index 0549c06b6bb7..72cba808de15 100644 --- a/package/inc/ZipPackage.hxx +++ b/package/inc/ZipPackage.hxx @@ -91,6 +91,7 @@ protected: ::rtl::OUString m_aURL; sal_Bool m_bHasEncryptedEntries; sal_Bool m_bHasNonEncryptedEntries; + sal_Bool m_bInconsistent; sal_Bool m_bUseManifest; sal_Bool m_bForceRecovery; diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx index 4d0af7bb7619..74c30049e9bd 100644 --- a/package/source/xstor/xstorage.cxx +++ b/package/source/xstor/xstorage.cxx @@ -4780,7 +4780,10 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, //TODO: think about interaction handler - if ( m_pData->m_bReadOnlyWrap ) + // WORKAROUND: + // The old document might have no version in the manifest.xml, so we have to allow to set the version + // even for readonly storages, so that the version from content.xml can be used. + if ( m_pData->m_bReadOnlyWrap && !aPropertyName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Version" ) ) ) ) throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); // TODO: Access denied if ( m_pData->m_nStorageType == ZIP_STORAGE ) @@ -4800,11 +4803,16 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName, aValue >>= m_pImpl->m_aVersion; m_pImpl->m_bControlVersion = sal_True; - m_pImpl->m_bBroadcastModified = sal_True; - m_pImpl->m_bIsModified = sal_True; + // this property can be set even for readonly storage + if ( !m_pData->m_bReadOnlyWrap ) + { + m_pImpl->m_bBroadcastModified = sal_True; + m_pImpl->m_bIsModified = sal_True; + } } else if ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "HasEncryptedEntries" ) || aPropertyName.equalsAscii( "HasNonEncryptedEntries" ) + || aPropertyName.equalsAscii( "IsInconsistent" ) || aPropertyName.equalsAscii( "URL" ) || aPropertyName.equalsAscii( "RepairPackage" ) ) || aPropertyName.equalsAscii( "IsRoot" ) @@ -4939,7 +4947,9 @@ uno::Any SAL_CALL OStorage::getPropertyValue( const ::rtl::OUString& aPropertyNa return uno::makeAny( sal_False ); // RepairPackage } else if ( m_pData->m_nStorageType == PACKAGE_STORAGE - && ( aPropertyName.equalsAscii( "HasEncryptedEntries" ) || aPropertyName.equalsAscii( "HasNonEncryptedEntries" ) ) ) + && ( aPropertyName.equalsAscii( "HasEncryptedEntries" ) + || aPropertyName.equalsAscii( "HasNonEncryptedEntries" ) + || aPropertyName.equalsAscii( "IsInconsistent" ) ) ) { try { m_pImpl->ReadContents(); diff --git a/package/source/zipapi/ByteGrabber.cxx b/package/source/zipapi/ByteGrabber.cxx index 7e8433d77837..84cd6465f7bf 100644 --- a/package/source/zipapi/ByteGrabber.cxx +++ b/package/source/zipapi/ByteGrabber.cxx @@ -51,8 +51,10 @@ ByteGrabber::ByteGrabber(uno::Reference < io::XInputStream > xIstream) ByteGrabber::~ByteGrabber() { } + void ByteGrabber::setInputStream (uno::Reference < io::XInputStream > xNewStream) { + ::osl::MutexGuard aGuard( m_aMutex ); xStream = xNewStream; xSeek = uno::Reference < io::XSeekable > (xNewStream, uno::UNO_QUERY); } @@ -62,6 +64,7 @@ sal_Int32 SAL_CALL ByteGrabber::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException) { + ::osl::MutexGuard aGuard( m_aMutex ); return xStream->readBytes(aData, nBytesToRead ); } @@ -69,6 +72,7 @@ sal_Int32 SAL_CALL ByteGrabber::readBytes( uno::Sequence< sal_Int8 >& aData, sal_Int64 SAL_CALL ByteGrabber::seek( sal_Int64 location ) throw(lang::IllegalArgumentException, io::IOException, uno::RuntimeException) { + ::osl::MutexGuard aGuard( m_aMutex ); if (xSeek.is() ) { sal_Int64 nLen = xSeek->getLength(); @@ -82,32 +86,40 @@ sal_Int64 SAL_CALL ByteGrabber::seek( sal_Int64 location ) else throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); } + sal_Int64 SAL_CALL ByteGrabber::getPosition( ) throw(io::IOException, uno::RuntimeException) { + ::osl::MutexGuard aGuard( m_aMutex ); if (xSeek.is() ) return xSeek->getPosition(); else throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); } + sal_Int64 SAL_CALL ByteGrabber::getLength( ) throw(io::IOException, uno::RuntimeException) { + ::osl::MutexGuard aGuard( m_aMutex ); if (xSeek.is() ) return xSeek->getLength(); else throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); } + ByteGrabber& ByteGrabber::operator >> (sal_Int8& rInt8) { + ::osl::MutexGuard aGuard( m_aMutex ); if (xStream->readBytes(aSequence,1) != 1) rInt8 = 0; else rInt8 = aSequence[0] & 0xFF; return *this; } + ByteGrabber& ByteGrabber::operator >> (sal_Int16& rInt16) { + ::osl::MutexGuard aGuard( m_aMutex ); if (xStream->readBytes ( aSequence, 2) != 2) rInt16 = 0; else @@ -119,8 +131,11 @@ ByteGrabber& ByteGrabber::operator >> (sal_Int16& rInt16) } return *this; } + ByteGrabber& ByteGrabber::operator >> (sal_Int32& rInt32) { + ::osl::MutexGuard aGuard( m_aMutex ); + if (xStream->readBytes(aSequence, 4) != 4) rInt32 = 0; else @@ -137,6 +152,8 @@ ByteGrabber& ByteGrabber::operator >> (sal_Int32& rInt32) ByteGrabber& ByteGrabber::operator >> (sal_uInt8& rInt8) { + ::osl::MutexGuard aGuard( m_aMutex ); + if (xStream->readBytes(aSequence,1) != 1) rInt8 = 0; else @@ -145,6 +162,8 @@ ByteGrabber& ByteGrabber::operator >> (sal_uInt8& rInt8) } ByteGrabber& ByteGrabber::operator >> (sal_uInt16& rInt16) { + ::osl::MutexGuard aGuard( m_aMutex ); + if (xStream->readBytes(aSequence, 2) != 2) rInt16 = 0; else @@ -158,6 +177,8 @@ ByteGrabber& ByteGrabber::operator >> (sal_uInt16& rInt16) } ByteGrabber& ByteGrabber::operator >> (sal_uInt32& ruInt32) { + ::osl::MutexGuard aGuard( m_aMutex ); + if (xStream->readBytes(aSequence, 4) != 4) ruInt32 = 0; else diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index 246cbd889015..f6dafac4cb6a 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -122,6 +122,8 @@ ZipFile::~ZipFile() void ZipFile::setInputStream ( Reference < XInputStream > xNewStream ) { + ::osl::MutexGuard aGuard( m_aMutex ); + xStream = xNewStream; xSeek = Reference < XSeekable > ( xStream, UNO_QUERY ); aGrabber.setInputStream ( xStream ); @@ -381,6 +383,8 @@ sal_Bool ZipFile::StaticHasValidPassword( const Sequence< sal_Int8 > &aReadBuffe sal_Bool ZipFile::hasValidPassword ( ZipEntry & rEntry, const ORef < EncryptionData > &rData ) { + ::osl::MutexGuard aGuard( m_aMutex ); + sal_Bool bRet = sal_False; if ( rData->aKey.getLength() ) { @@ -499,6 +503,8 @@ Reference < XInputStream > ZipFile::createUnbufferedStream( sal_Bool bIsEncrypted, ::rtl::OUString aMediaType ) { + ::osl::MutexGuard aGuard( m_aMutex ); + return new XUnbufferedStream ( aMutexHolder, rEntry, xStream, rData, nStreamMode, bIsEncrypted, aMediaType, bRecoveryMode ); } @@ -514,6 +520,8 @@ Reference< XInputStream > SAL_CALL ZipFile::getInputStream( ZipEntry& rEntry, SotMutexHolderRef aMutexHolder ) throw(IOException, ZipException, RuntimeException) { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( rEntry.nOffset <= 0 ) readLOC( rEntry ); @@ -543,6 +551,8 @@ Reference< XInputStream > SAL_CALL ZipFile::getDataStream( ZipEntry& rEntry, ZipException, RuntimeException ) { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( rEntry.nOffset <= 0 ) readLOC( rEntry ); @@ -579,6 +589,8 @@ Reference< XInputStream > SAL_CALL ZipFile::getRawData( ZipEntry& rEntry, SotMutexHolderRef aMutexHolder ) throw(IOException, ZipException, RuntimeException) { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( rEntry.nOffset <= 0 ) readLOC( rEntry ); @@ -595,6 +607,8 @@ Reference< XInputStream > SAL_CALL ZipFile::getWrappedRawStream( ZipException, RuntimeException ) { + ::osl::MutexGuard aGuard( m_aMutex ); + if ( rData.isEmpty() ) throw packages::NoEncryptionException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); @@ -607,6 +621,8 @@ Reference< XInputStream > SAL_CALL ZipFile::getWrappedRawStream( sal_Bool ZipFile::readLOC( ZipEntry &rEntry ) throw(IOException, ZipException, RuntimeException) { + ::osl::MutexGuard aGuard( m_aMutex ); + sal_Int32 nTestSig, nTime, nCRC, nSize, nCompressedSize; sal_Int16 nVersion, nFlag, nHow, nPathLen, nExtraLen; sal_Int32 nPos = -rEntry.nOffset; @@ -660,6 +676,7 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry ) sal_Int32 ZipFile::findEND( ) throw(IOException, ZipException, RuntimeException) { + // this method is called in constructor only, no need for mutex sal_Int32 nLength, nPos, nEnd; Sequence < sal_Int8 > aBuffer; try @@ -701,6 +718,7 @@ sal_Int32 ZipFile::findEND( ) sal_Int32 ZipFile::readCEN() throw(IOException, ZipException, RuntimeException) { + // this method is called in constructor only, no need for mutex sal_Int32 nCenLen, nCenPos = -1, nCenOff, nEndPos, nLocPos; sal_uInt16 nCount, nTotal; @@ -807,6 +825,8 @@ sal_Int32 ZipFile::readCEN() sal_Int32 ZipFile::recover() throw(IOException, ZipException, RuntimeException) { + ::osl::MutexGuard aGuard( m_aMutex ); + sal_Int32 nLength; Sequence < sal_Int8 > aBuffer; Sequence < sal_Int32 > aHeaderOffsets; @@ -974,6 +994,8 @@ sal_Int32 ZipFile::recover() sal_Bool ZipFile::checkSizeAndCRC( const ZipEntry& aEntry ) { + ::osl::MutexGuard aGuard( m_aMutex ); + sal_Int32 nSize = 0, nCRC = 0; if( aEntry.nMethod == STORED ) @@ -985,6 +1007,8 @@ sal_Bool ZipFile::checkSizeAndCRC( const ZipEntry& aEntry ) sal_Int32 ZipFile::getCRC( sal_Int32 nOffset, sal_Int32 nSize ) { + ::osl::MutexGuard aGuard( m_aMutex ); + Sequence < sal_Int8 > aBuffer; CRC32 aCRC; sal_Int32 nBlockSize = ::std::min( nSize, static_cast< sal_Int32 >( 32000 ) ); @@ -1002,6 +1026,8 @@ sal_Int32 ZipFile::getCRC( sal_Int32 nOffset, sal_Int32 nSize ) void ZipFile::getSizeAndCRC( sal_Int32 nOffset, sal_Int32 nCompressedSize, sal_Int32 *nSize, sal_Int32 *nCRC ) { + ::osl::MutexGuard aGuard( m_aMutex ); + Sequence < sal_Int8 > aBuffer; CRC32 aCRC; sal_Int32 nRealSize = 0; diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index b95711778e77..6ca9981d2291 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -201,6 +201,7 @@ ZipPackage::ZipPackage (const uno::Reference < XMultiServiceFactory > &xNewFacto : m_aMutexHolder( new SotMutexHolder ) , m_bHasEncryptedEntries ( sal_False ) , m_bHasNonEncryptedEntries ( sal_False ) +, m_bInconsistent ( sal_False ) , m_bUseManifest ( sal_True ) , m_bForceRecovery ( sal_False ) , m_bMediaTypeFallbackUsed ( sal_False ) @@ -426,20 +427,23 @@ void ZipPackage::parseManifest() m_xRootFolder->removeByName( sMimetype ); } + m_bInconsistent = m_pRootFolder->LookForUnexpectedODF12Streams( ::rtl::OUString() ); + sal_Bool bODF12AndOlder = ( m_pRootFolder->GetVersion().compareTo( ODFVER_012_TEXT ) >= 0 ); - if ( !m_bForceRecovery && bODF12AndOlder && m_pRootFolder->LookForUnexpectedODF12Streams( ::rtl::OUString() ) ) + if ( !m_bForceRecovery && bODF12AndOlder && m_bInconsistent ) { - // this is an ODF1.2 document that contains streams not referred in the manifest.xml + // this is an ODF1.2 document that contains streams not referred in the manifest.xml; + // in case of ODF1.2 documents without version in manifest.xml the property IsInconsistent + // should be checked later throw ZipIOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "there are streams not referred in manifest.xml\n" ) ), uno::Reference< uno::XInterface >() ); } + // in case it is a correct ODF1.2 document, the version must be set + // and the META-INF folder is reserved for package format if ( bODF12AndOlder ) - { - // it is ODF1.2 or later, let the META-INF folder be unavailable for user m_xRootFolder->removeByName( sMeta ); - } } } @@ -1633,6 +1637,7 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const if (aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HasEncryptedEntries") ) ||aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HasNonEncryptedEntries") ) + ||aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsInconsistent") ) ||aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MediaTypeFallbackUsed") ) ) throw PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); else if (aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EncryptionKey") ) ) @@ -1671,6 +1676,11 @@ Any SAL_CALL ZipPackage::getPropertyValue( const OUString& PropertyName ) aAny <<= m_bHasNonEncryptedEntries; return aAny; } + else if (PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "IsInconsistent" ) ) ) + { + aAny <<= m_bInconsistent; + return aAny; + } else if (PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "UseManifest" ) ) ) { aAny <<= m_bUseManifest; diff --git a/setup_native/scripts/fake-db.spec b/setup_native/scripts/fake-db.spec index 447e5a98babd..e6275048efe3 100644 --- a/setup_native/scripts/fake-db.spec +++ b/setup_native/scripts/fake-db.spec @@ -6,6 +6,7 @@ Group: dummy License: LGPL BuildArch: noarch AutoReqProv: no +%define _tmppath /tmp #BuildRoot: %{_tmppath}/%{name}-root Provides: libgnomevfs-2.so.0 Provides: libgconf-2.so.4 diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt index cd0885b2184f..b3e68ac17bff 100755 --- a/setup_native/source/packinfo/packinfo_office.txt +++ b/setup_native/source/packinfo/packinfo_office.txt @@ -636,6 +636,22 @@ packageversion = "%OOOPACKAGEVERSION" End Start +module = "gid_Module_Root_Extension_Dictionary_He" +script = "shellscripts_extensions.txt" +solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-he" +solarisrequires = "%SOLSUREPACKAGEPREFIX-ure, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core01, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core02, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core03, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core04, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core05, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core06, %BASISPACKAGEPREFIX%WITHOUTDOTOOOBASEVERSION-core07, %PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION" +packagename = "%UNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-he" +requires = "%UREPACKAGEPREFIX-ure,%BASISPACKAGEPREFIX%OOOBASEVERSION-core01,%BASISPACKAGEPREFIX%OOOBASEVERSION-core02,%BASISPACKAGEPREFIX%OOOBASEVERSION-core03,%BASISPACKAGEPREFIX%OOOBASEVERSION-core04,%BASISPACKAGEPREFIX%OOOBASEVERSION-core05,%BASISPACKAGEPREFIX%OOOBASEVERSION-core06,%BASISPACKAGEPREFIX%OOOBASEVERSION-core07,%UNIXPRODUCTNAME%BRANDPACKAGEVERSION" +linuxpatchrequires = "" +copyright = "1999-2009 by Sun Microsystems" +solariscopyright = "solariscopyrightfile" +vendor = "Sun Microsystems, Inc." +description = "He dictionary for %PRODUCTNAME %PRODUCTVERSION" +destpath = "/opt" +packageversion = "%PACKAGEVERSION" +End + +Start module = "gid_Module_Root_Extension_Dictionary_Hu" script = "shellscripts_extensions.txt" solarispackagename = "%PACKAGEPREFIX%WITHOUTDOTUNIXPRODUCTNAME%BRANDPACKAGEVERSION-dict-hu" diff --git a/setup_native/source/packinfo/spellchecker_selection.txt b/setup_native/source/packinfo/spellchecker_selection.txt index d7f7f7d53d9f..2abcc10db890 100644 --- a/setup_native/source/packinfo/spellchecker_selection.txt +++ b/setup_native/source/packinfo/spellchecker_selection.txt @@ -13,6 +13,7 @@ es = "en-US,es,fr,pt" et = "en-US,et" fr = "en-US,es,fr" gl = "en-US,pt,es,gl" +he = "en-US,he" hu = "de,en-US,hu" it = "de,en-US,fr,it" ja = "en-US" |