summaryrefslogtreecommitdiff
path: root/package/source/zippackage/ZipPackageFolder.cxx
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@documentfoundation.org>2012-01-01 19:03:17 -0200
committerLuboš Luňák <l.lunak@suse.cz>2012-01-02 19:17:17 +0100
commit829db12d7e3e93b4a44f79b39a0a9f0630439109 (patch)
tree8afe2c55ddb2846fc1e7a35c0212ca2304c6f3d5 /package/source/zippackage/ZipPackageFolder.cxx
parent6af59644d6508049409a03d1c4a598ea2bef521e (diff)
Fix for fdo43460 Part XXVI getLength() to isEmpty()
Please find attached a partial fix for Easy Hack FDO43460 Part XXVI Module package
Diffstat (limited to 'package/source/zippackage/ZipPackageFolder.cxx')
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index daee0f4fd0e1..48c51b42d364 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -129,7 +129,7 @@ sal_Bool ZipPackageFolder::LookForUnexpectedODF12Streams( const ::rtl::OUString&
{
// the stream is not in META-INF and ist notregistered in manifest.xml,
// check whether it is an internal part of the package format
- if ( aPath.getLength()
+ if ( !aPath.isEmpty()
|| !rShortName.equals( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "mimetype" ) ) ) )
{
// if it is not "mimetype" from the root it is not a part of the package
@@ -326,7 +326,7 @@ bool ZipPackageFolder::saveChild( const ::rtl::OUString &rShortName, const Conte
{
::rtl::OUString sTempName = rPath + rShortName + ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "/" ) );
- if ( rInfo.pFolder->GetMediaType().getLength() )
+ if ( !rInfo.pFolder->GetMediaType().isEmpty() )
{
aPropSet[PKG_MNFST_MEDIATYPE].Name = sMediaTypeProperty;
aPropSet[PKG_MNFST_MEDIATYPE].Value <<= rInfo.pFolder->GetMediaType();
@@ -688,7 +688,7 @@ void ZipPackageFolder::saveContents( ::rtl::OUString &rPath, std::vector < uno::
{
bool bWritingFailed = false;
- if ( maContents.begin() == maContents.end() && rPath.getLength() && m_nFormat != embed::StorageFormats::OFOPXML )
+ if ( maContents.begin() == maContents.end() && !rPath.isEmpty() && m_nFormat != embed::StorageFormats::OFOPXML )
{
// it is an empty subfolder, use workaround to store it
ZipEntry* pTempEntry = new ZipEntry();
@@ -714,7 +714,7 @@ void ZipPackageFolder::saveContents( ::rtl::OUString &rPath, std::vector < uno::
bool bMimeTypeStreamStored = false;
::rtl::OUString aMimeTypeStreamName( RTL_CONSTASCII_USTRINGPARAM( "mimetype" ) );
- if ( m_nFormat == embed::StorageFormats::ZIP && !rPath.getLength() )
+ if ( m_nFormat == embed::StorageFormats::ZIP && rPath.isEmpty() )
{
// let the "mimtype" stream in root folder be stored as the first stream if it is zip format
ContentHash::iterator aIter = maContents.find ( aMimeTypeStreamName );