[Libreoffice-commits] .: 3 commits - basctl/uiconfig
René Engelhard
rene at kemper.freedesktop.org
Fri Nov 26 08:51:22 PST 2010
basctl/uiconfig/basicide/menubar/menubar.xml | 1 +
1 file changed, 1 insertion(+)
New commits:
commit 8c8e5b2dea7b298f88e4fb901785093db57867e3
Merge: ee808ae... d707ff8...
Author: Rene Engelhard <rene at debian.org>
Date: Fri Nov 26 17:50:29 2010 +0100
Merge branch 'libreoffice-3-3'
commit d707ff8a7e63b1821b65b0ff8681021a47419658
Author: Thorsten Behrens <tbehrens at novell.com>
Date: Thu Nov 25 22:30:39 2010 +0100
Put show credits entry into all app ui configs
diff --git a/basctl/uiconfig/basicide/menubar/menubar.xml b/basctl/uiconfig/basicide/menubar/menubar.xml
index 1c24216..4b3ff19 100644
--- a/basctl/uiconfig/basicide/menubar/menubar.xml
+++ b/basctl/uiconfig/basicide/menubar/menubar.xml
@@ -83,6 +83,7 @@
<menu:menuseparator/>
<menu:menuitem menu:id=".uno:ShowLicense"/>
<menu:menuseparator/>
+ <menu:menuitem menu:id=".uno:ShowCredits"/>
<menu:menuitem menu:id=".uno:About"/>
</menu:menupopup>
</menu:menu>
commit 9b4ade0c0b740726ff5ede70021b0e68700327c5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 25 16:46:43 2010 +0000
Resolves: rhbz#656191 Catch bad alloc and convert to ZipIOException
(cherry picked from commit 047a986e3af855cdb4c27274da5a10fb5da37fb6)
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index 2d2f602..47d47a2 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -638,29 +638,38 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry )
aGrabber >> nExtraLen;
rEntry.nOffset = static_cast < sal_Int32 > (aGrabber.getPosition()) + nPathLen + nExtraLen;
- // read always in UTF8, some tools seem not to set UTF8 bit
- uno::Sequence < sal_Int8 > aNameBuffer( nPathLen );
- sal_Int32 nRead = aGrabber.readBytes( aNameBuffer, nPathLen );
- if ( nRead < aNameBuffer.getLength() )
- aNameBuffer.realloc( nRead );
+ sal_Bool bBroken = sal_False;
- ::rtl::OUString sLOCPath = rtl::OUString::intern( (sal_Char *) aNameBuffer.getArray(),
- aNameBuffer.getLength(),
- RTL_TEXTENCODING_UTF8 );
+ try
+ {
+ // read always in UTF8, some tools seem not to set UTF8 bit
+ uno::Sequence < sal_Int8 > aNameBuffer( nPathLen );
+ sal_Int32 nRead = aGrabber.readBytes( aNameBuffer, nPathLen );
+ if ( nRead < aNameBuffer.getLength() )
+ aNameBuffer.realloc( nRead );
+
+ ::rtl::OUString sLOCPath = rtl::OUString::intern( (sal_Char *) aNameBuffer.getArray(),
+ aNameBuffer.getLength(),
+ RTL_TEXTENCODING_UTF8 );
+
+ if ( rEntry.nPathLen == -1 ) // the file was created
+ {
+ rEntry.nPathLen = nPathLen;
+ rEntry.sPath = sLOCPath;
+ }
- if ( rEntry.nPathLen == -1 ) // the file was created
+ // the method can be reset for internal use so it is not checked
+ bBroken = rEntry.nVersion != nVersion
+ || rEntry.nFlag != nFlag
+ || rEntry.nTime != nTime
+ || rEntry.nPathLen != nPathLen
+ || !rEntry.sPath.equals( sLOCPath );
+ }
+ catch(::std::bad_alloc &)
{
- rEntry.nPathLen = nPathLen;
- rEntry.sPath = sLOCPath;
+ bBroken = sal_True;
}
- // the method can be reset for internal use so it is not checked
- sal_Bool bBroken = rEntry.nVersion != nVersion
- || rEntry.nFlag != nFlag
- || rEntry.nTime != nTime
- || rEntry.nPathLen != nPathLen
- || !rEntry.sPath.equals( sLOCPath );
-
if ( bBroken && !bRecoveryMode )
throw ZipIOException( OUString( RTL_CONSTASCII_USTRINGPARAM( "The stream seems to be broken!" ) ),
Reference< XInterface >() );
More information about the Libreoffice-commits
mailing list