diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-31 16:44:12 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-31 19:58:51 -0200 |
commit | 0a112c96fd8077a027dac88510915eb93903748b (patch) | |
tree | 190da82a604c8414687be76ac397ab2de43e84aa | |
parent | 4d83e7010870fb8d74b19c28f1c4cd3fa616f514 (diff) |
Fix for fdo43460 Part LVII getLength() to isEmpty()
Part LVII
Modules
vcl (part 1)
-rw-r--r-- | vcl/generic/app/gensys.cxx | 2 | ||||
-rw-r--r-- | vcl/generic/glyphs/gcach_ftyp.cxx | 2 | ||||
-rw-r--r-- | vcl/generic/print/common_gfx.cxx | 2 | ||||
-rw-r--r-- | vcl/generic/print/printerjob.cxx | 6 | ||||
-rw-r--r-- | vcl/inc/generic/gendata.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/image.h | 2 | ||||
-rw-r--r-- | vcl/source/app/settings.cxx | 8 | ||||
-rw-r--r-- | vcl/source/app/unohelp.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/configsettings.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/gfxlink.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/image.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/impgraph.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/impimage.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/impimagetree.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 58 |
17 files changed, 59 insertions, 59 deletions
diff --git a/vcl/generic/app/gensys.cxx b/vcl/generic/app/gensys.cxx index ddde4a152fa6..29b39ddd6a1c 100644 --- a/vcl/generic/app/gensys.cxx +++ b/vcl/generic/app/gensys.cxx @@ -163,7 +163,7 @@ const char* SalGenericSystem::getFrameClassName() rtl::Bootstrap aBootstrap( aIni ); aBootstrap.getFrom( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ProductKey" ) ), aProduct ); - if( aProduct.getLength() ) + if( !aProduct.isEmpty() ) aClassName.append( rtl::OUStringToOString( aProduct, osl_getThreadTextEncoding() ) ); else aClassName.append( "VCLSalFrame" ); diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx index 7d14ce8cfc8f..93935e6ae7bf 100644 --- a/vcl/generic/glyphs/gcach_ftyp.cxx +++ b/vcl/generic/glyphs/gcach_ftyp.cxx @@ -600,7 +600,7 @@ void FreetypeManager::AddFontFile( const rtl::OString& rNormalizedName, int nFaceNum, sal_IntPtr nFontId, const ImplDevFontAttributes& rDevFontAttr, const ExtraKernInfo* pExtraKernInfo ) { - if( !rNormalizedName.getLength() ) + if( rNormalizedName.isEmpty() ) return; if( maFontList.find( nFontId ) != maFontList.end() ) diff --git a/vcl/generic/print/common_gfx.cxx b/vcl/generic/print/common_gfx.cxx index 26ac567b8467..8de0134283f3 100644 --- a/vcl/generic/print/common_gfx.cxx +++ b/vcl/generic/print/common_gfx.cxx @@ -1228,7 +1228,7 @@ PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize } static sal_uInt16 nEps = 0; - if( ! aDocTitle.getLength() ) + if( aDocTitle.isEmpty() ) aDocTitle = rtl::OString::valueOf(static_cast<sal_Int32>(nEps++)); if( fLeft != fRight && fTop != fBottom ) diff --git a/vcl/generic/print/printerjob.cxx b/vcl/generic/print/printerjob.cxx index 35633cd2c9b5..503d7afe8f7a 100644 --- a/vcl/generic/print/printerjob.cxx +++ b/vcl/generic/print/printerjob.cxx @@ -277,7 +277,7 @@ PrinterJob::~PrinterJob () delete mpJobTrailer; // XXX should really call osl::remove routines - if( maSpoolDirName.getLength() ) + if( !maSpoolDirName.isEmpty() ) removeSpoolDir (maSpoolDirName); // osl::Directory::remove (maSpoolDirName); @@ -391,7 +391,7 @@ PrinterJob::StartJob ( } maJobTitle = aFilterWS; - if( aTitle.getLength() ) + if( !aTitle.isEmpty() ) { WritePS (mpJobHeader, "%%Title: ("); WritePS (mpJobHeader, aTitle); @@ -461,7 +461,7 @@ PrinterJob::EndJob () FILE* pDestFILE = NULL; /* create a destination either as file or as a pipe */ - sal_Bool bSpoolToFile = maFileName.getLength() > 0 ? sal_True : sal_False; + sal_Bool bSpoolToFile = !maFileName.isEmpty(); if (bSpoolToFile) { const rtl::OString aFileName = rtl::OUStringToOString (maFileName, diff --git a/vcl/inc/generic/gendata.hxx b/vcl/inc/generic/gendata.hxx index eb45fd9eafa9..f76b70f11a93 100644 --- a/vcl/inc/generic/gendata.hxx +++ b/vcl/inc/generic/gendata.hxx @@ -61,7 +61,7 @@ class VCL_DLLPUBLIC SalGenericData : public SalData const rtl::OUString& GetHostname() { - if (!m_aHostname.getLength()) + if (m_aHostname.isEmpty()) osl_getLocalHostname( &m_aHostname.pData ); return m_aHostname; } diff --git a/vcl/inc/image.h b/vcl/inc/image.h index 1eab7dec707f..149775053151 100644 --- a/vcl/inc/image.h +++ b/vcl/inc/image.h @@ -87,7 +87,7 @@ struct ImageAryData ImageAryData( const ImageAryData& rData ); ~ImageAryData(); - bool IsLoadable() { return maBitmapEx.IsEmpty() && maName.getLength(); } + bool IsLoadable() { return maBitmapEx.IsEmpty() && !maName.isEmpty(); } void Load(const rtl::OUString &rPrefix); ImageAryData& operator=( const ImageAryData& rData ); diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index d74ac36fc5cf..2a3a5ca00cce 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -735,7 +735,7 @@ sal_uLong StyleSettings::ImplNameToSymbolsStyle( const ::rtl::OUString &rName ) */ void StyleSettings::SetPreferredSymbolsStyleName( const ::rtl::OUString &rName ) { - if ( rName.getLength() > 0 ) + if ( !rName.isEmpty() ) { ::rtl::OUString rNameLowCase( rName.toAsciiLowerCase() ); @@ -1776,7 +1776,7 @@ void AllSettings::SetLocale( const ::com::sun::star::lang::Locale& rLocale ) mpData->maLocale = rLocale; - if ( !rLocale.Language.getLength() ) + if ( rLocale.Language.isEmpty() ) mpData->meLanguage = LANGUAGE_SYSTEM; else mpData->meLanguage = MsLangId::convertLocaleToLanguage( rLocale ); @@ -1878,7 +1878,7 @@ sal_Bool AllSettings::GetLayoutRTL() const const ::com::sun::star::lang::Locale& AllSettings::GetLocale() const { - if ( !mpData->maLocale.Language.getLength() ) + if ( mpData->maLocale.Language.isEmpty() ) mpData->maLocale = mpData->maSysLocale.GetLocale(); return mpData->maLocale; @@ -1889,7 +1889,7 @@ const ::com::sun::star::lang::Locale& AllSettings::GetLocale() const const ::com::sun::star::lang::Locale& AllSettings::GetUILocale() const { // the UILocale is never changed - if ( !mpData->maUILocale.Language.getLength() ) + if ( mpData->maUILocale.Language.isEmpty() ) mpData->maUILocale = mpData->maSysLocale.GetUILocale(); return mpData->maUILocale; diff --git a/vcl/source/app/unohelp.cxx b/vcl/source/app/unohelp.cxx index 76014ff3b3b2..ebfa511ab6a3 100644 --- a/vcl/source/app/unohelp.cxx +++ b/vcl/source/app/unohelp.cxx @@ -109,7 +109,7 @@ uno::Reference< lang::XMultiServiceFactory > vcl::unohelper::GetMultiServiceFact while ( aVCLComponentsArray[ nCompCount ].pLibName ) { OUString aComponentPathString = CreateLibraryName( aVCLComponentsArray[ nCompCount ].pLibName, aVCLComponentsArray[ nCompCount ].bHasSUPD ); - if (aComponentPathString.getLength() ) + if (!aComponentPathString.isEmpty() ) { try { diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index a70ce3c7fcf0..e69eb093d7c4 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -977,7 +977,7 @@ void Edit::ImplInsertText( const XubString& rStr, const Selection* pNewSel, sal_ // at this point now we will insert the non-empty text 'normally' some lines below... } - if ( aNewText.getLength() ) + if ( !aNewText.isEmpty() ) maText.Insert( String( aNewText ), (xub_StrLen)aSelection.Min() ); if ( !pNewSel ) diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 6eb2d005fb0f..f5bf19f9ce1b 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -629,12 +629,12 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId ) // activate page here so the conbtrols can be switched // also set the help id of the parent window to that of the tab page - if ( !GetHelpId().getLength() ) + if ( GetHelpId().isEmpty() ) { mbRestoreHelpId = sal_True; pCtrlParent->SetHelpId( pPage->GetHelpId() ); } - if ( !pCtrlParent->GetUniqueId().getLength() ) + if ( pCtrlParent->GetUniqueId().isEmpty() ) { mbRestoreUnqId = sal_True; pCtrlParent->SetUniqueId( pPage->GetUniqueId() ); @@ -1379,7 +1379,7 @@ void TabControl::RequestHelp( const HelpEvent& rHEvt ) else if ( rHEvt.GetMode() & HELPMODE_EXTENDED ) { rtl::OUString aHelpId( rtl::OStringToOUString( GetHelpId( nItemId ), RTL_TEXTENCODING_UTF8 ) ); - if ( aHelpId.getLength() ) + if ( !aHelpId.isEmpty() ) { // Wenn eine Hilfe existiert, dann ausloesen Help* pHelp = Application::GetHelp(); @@ -2030,7 +2030,7 @@ const XubString& TabControl::GetHelpText( sal_uInt16 nPageId ) const if ( pItem ) { - if ( !pItem->maHelpText.Len() && pItem->maHelpId.getLength() ) + if ( !pItem->maHelpText.Len() && !pItem->maHelpId.isEmpty() ) { Help* pHelp = Application::GetHelp(); if ( pHelp ) diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx index 92cb685dac89..c3ee3d094578 100644 --- a/vcl/source/gdi/configsettings.cxx +++ b/vcl/source/gdi/configsettings.cxx @@ -162,7 +162,7 @@ void SettingsConfigItem::getValues() if( pValue->getValueTypeClass() == TypeClass_STRING ) { const OUString* pLine = (const OUString*)pValue->getValue(); - if( pLine->getLength() ) + if( !pLine->isEmpty() ) m_aSettings[ aKeyName ][ pFrom[i] ] = *pLine; #if OSL_DEBUG_LEVEL > 2 OSL_TRACE( " \"%s\"=\"%.30s\"\n", diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx index dcfb57106451..7f7e634f4d48 100644 --- a/vcl/source/gdi/gfxlink.cxx +++ b/vcl/source/gdi/gfxlink.cxx @@ -399,7 +399,7 @@ ImpSwap::ImpSwap( sal_uInt8* pData, sal_uLong nDataSize ) : ::utl::TempFile aTempFile; maURL = aTempFile.GetURL(); - if( maURL.getLength() ) + if( !maURL.isEmpty() ) { SvStream* pOStm = ::utl::UcbStreamHelper::CreateStream( maURL, STREAM_READWRITE | STREAM_SHARE_DENYWRITE ); if( pOStm ) diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx index 7860745ca187..c9229827c069 100644 --- a/vcl/source/gdi/image.cxx +++ b/vcl/source/gdi/image.cxx @@ -706,7 +706,7 @@ sal_uInt16 ImageList::GetImagePos( const ::rtl::OUString& rImageName ) const { DBG_CHKTHIS( ImageList, NULL ); - if( mpImplData && rImageName.getLength() ) + if( mpImplData && !rImageName.isEmpty() ) { for( sal_uInt32 i = 0; i < mpImplData->maImages.size(); i++ ) { @@ -757,7 +757,7 @@ void ImageList::GetImageNames( ::std::vector< ::rtl::OUString >& rNames ) const for( sal_uInt32 i = 0; i < mpImplData->maImages.size(); i++ ) { const rtl::OUString& rName( mpImplData->maImages[ i ]->maName ); - if( rName.getLength() != 0 ) + if( !rName.isEmpty()) rNames.push_back( rName ); } } diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 38261b9b095e..6776037e292e 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1043,7 +1043,7 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) ::utl::TempFile aTempFile; const INetURLObject aTmpURL( aTempFile.GetURL() ); - if( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ).getLength() ) + if( !aTmpURL.GetMainURL( INetURLObject::NO_DECODE ).isEmpty() ) { SvStream* pOStm = NULL; try @@ -1257,7 +1257,7 @@ sal_Bool ImpGraphic::ImplSwapOut() ::utl::TempFile aTempFile; const INetURLObject aTmpURL( aTempFile.GetURL() ); - if( aTmpURL.GetMainURL( INetURLObject::NO_DECODE ).getLength() ) + if( !aTmpURL.GetMainURL( INetURLObject::NO_DECODE ).isEmpty() ) { SvStream* pOStm = NULL; try diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx index aac03b7cbe63..3517260f0e02 100644 --- a/vcl/source/gdi/impimage.cxx +++ b/vcl/source/gdi/impimage.cxx @@ -95,7 +95,7 @@ ImplImageList::ImplImageList( const ImplImageList &aSrc ) : { ImageAryData* pAryData = new ImageAryData( **aIt ); maImages.push_back( pAryData ); - if( pAryData->maName.getLength() ) + if( !pAryData->maName.isEmpty() ) maNameHash [ pAryData->maName ] = pAryData; } } @@ -111,14 +111,14 @@ void ImplImageList::AddImage( const ::rtl::OUString &aName, { ImageAryData *pImg = new ImageAryData( aName, nId, aBitmapEx ); maImages.push_back( pImg ); - if( aName.getLength() ) + if( !aName.isEmpty() ) maNameHash [ aName ] = pImg; } void ImplImageList::RemoveImage( sal_uInt16 nPos ) { ImageAryData *pImg = maImages[ nPos ]; - if( pImg->maName.getLength() ) + if( !pImg->maName.isEmpty() ) maNameHash.erase( pImg->maName ); maImages.erase( maImages.begin() + nPos ); } diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx index ef48f92a6fa4..55be54011e99 100644 --- a/vcl/source/gdi/impimagetree.cxx +++ b/vcl/source/gdi/impimagetree.cxx @@ -210,13 +210,13 @@ bool ImplImageTree::doLoadImage( css::lang::Locale const & loc = Application::GetSettings().GetUILocale(); paths.push_back(createPath(name, pos, loc.Language)); - if (loc.Country.getLength() != 0) { + if (!loc.Country.isEmpty()) { rtl::OUStringBuffer b(loc.Language); b.append(sal_Unicode('-')); b.append(loc.Country); rtl::OUString p(createPath(name, pos, b.makeStringAndClear())); paths.push_back(p); - if (loc.Variant.getLength() != 0) { + if (!loc.Variant.isEmpty()) { b.append(p); b.append(sal_Unicode('-')); b.append(loc.Variant); @@ -251,7 +251,7 @@ void ImplImageTree::shutDown() { } void ImplImageTree::setStyle(rtl::OUString const & style) { - OSL_ASSERT(style.getLength() != 0); // empty m_style means "not initialized" + OSL_ASSERT(!style.isEmpty()); // empty m_style means "not initialized" if (style != m_style) { m_style = style; resetZips(); diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 508510f08c41..79ded4b95129 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -777,7 +777,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr } while( nTokenIndex != -1 ); // insert widget into its hierarchy field - if( aDomain.getLength() ) + if( !aDomain.isEmpty() ) { boost::unordered_map< rtl::OString, sal_Int32, rtl::OStringHash >::const_iterator it = m_aFieldNameMap.find( aDomain ); if( it != m_aFieldNameMap.end() ) @@ -792,7 +792,7 @@ void PDFWriterImpl::createWidgetFieldName( sal_Int32 i_nWidgetIndex, const PDFWr } } - if( aPartialName.getLength() == 0 ) + if( aPartialName.isEmpty() ) { // how funny, an empty field name if( i_rControl.getType() == PDFWriter::RadioButton ) @@ -1098,7 +1098,7 @@ static void appendResourceMap( OStringBuffer& rBuf, const char* pPrefix, const P int ni = 0; for( PDFWriterImpl::ResourceMap::const_iterator it = rList.begin(); it != rList.end(); ++it ) { - if( it->first.getLength() && it->second > 0 ) + if( !it->first.isEmpty() && it->second > 0 ) { rBuf.append( '/' ); rBuf.append( it->first ); @@ -2873,7 +2873,7 @@ sal_Int32 PDFWriterImpl::emitStructure( PDFStructureElement& rEle ) { aLine.append( "/StructElem\n" "/S/" ); - if( rEle.m_aAlias.getLength() > 0 ) + if( !rEle.m_aAlias.isEmpty() ) aLine.append( rEle.m_aAlias ); else aLine.append( getStructureTag( rEle.m_eType ) ); @@ -2884,13 +2884,13 @@ sal_Int32 PDFWriterImpl::emitStructure( PDFStructureElement& rEle ) "/Pg " ); aLine.append( rEle.m_nFirstPageObject ); aLine.append( " 0 R\n" ); - if( rEle.m_aActualText.getLength() ) + if( !rEle.m_aActualText.isEmpty() ) { aLine.append( "/ActualText" ); appendUnicodeTextStringEncrypt( rEle.m_aActualText, rEle.m_nObject, aLine ); aLine.append( "\n" ); } - if( rEle.m_aAltText.getLength() ) + if( !rEle.m_aAltText.isEmpty() ) { aLine.append( "/Alt" ); appendUnicodeTextStringEncrypt( rEle.m_aAltText, rEle.m_nObject, aLine ); @@ -2900,18 +2900,18 @@ sal_Int32 PDFWriterImpl::emitStructure( PDFStructureElement& rEle ) if( ! rEle.m_aBBox.IsEmpty() || rEle.m_aAttributes.size() ) { OString aAttribs = emitStructureAttributes( rEle ); - if( aAttribs.getLength() ) + if( !aAttribs.isEmpty() ) { aLine.append( "/A" ); aLine.append( aAttribs ); aLine.append( "\n" ); } } - if( rEle.m_aLocale.Language.getLength() > 0 ) + if( !rEle.m_aLocale.Language.isEmpty() ) { OUStringBuffer aLocBuf( 16 ); aLocBuf.append( rEle.m_aLocale.Language.toAsciiLowerCase() ); - if( rEle.m_aLocale.Country.getLength() > 0 ) + if( !rEle.m_aLocale.Country.isEmpty() ) { aLocBuf.append( sal_Unicode('-') ); aLocBuf.append( rEle.m_aLocale.Country ); @@ -4623,7 +4623,7 @@ we check in the following sequence: if( aTargetURL.hasFinalSlash() ) m_aContext.DefaultLinkAction = PDFWriter::URIAction; - if( aFileExtension.getLength() > 0 ) + if( !aFileExtension.isEmpty() ) { if( m_aContext.ConvertOOoTargetToPDFTarget ) { @@ -4684,7 +4684,7 @@ we check in the following sequence: // This code will permit the correct opening of application on web pages, the one that // normally have fragments (but I may be wrong...) // and will force the use of URI when the protocol is not file:// - if( (aFragment.getLength() > 0 && !bTargetHasPDFExtension) || + if( (!aFragment.isEmpty() && !bTargetHasPDFExtension) || eTargetProtocol != INET_PROT_FILE ) { aLine.append( "/URI/URI" ); @@ -4709,7 +4709,7 @@ we check in the following sequence: INetURLObject::WAS_ENCODED, INetURLObject::DECODE_WITH_CHARSET ) : aURLNoMark, rLink.m_nObject, aLine, osl_getThreadTextEncoding() ); - if( aFragment.getLength() > 0 ) + if( !aFragment.isEmpty() ) { aLine.append("/D/"); appendDestinationName( aFragment , aLine ); @@ -4720,7 +4720,7 @@ we check in the following sequence: // change the fragment to accomodate the bookmark (only if the file extension is PDF and // the requested action is of the correct type) if(m_aContext.DefaultLinkAction == PDFWriter::URIActionDestination && - bTargetHasPDFExtension && aFragment.getLength() > 0 ) + bTargetHasPDFExtension && !aFragment.isEmpty() ) { OStringBuffer aLineLoc( 1024 ); appendDestinationName( aFragment , aLineLoc ); @@ -5404,7 +5404,7 @@ bool PDFWriterImpl::emitAppearances( PDFWidget& rWidget, OStringBuffer& rAnnotDi rAnnotDict.append( bUseSubDict ? ">>\n" : "\n" ); } rAnnotDict.append( ">>\n" ); - if( aStandardAppearance.getLength() ) + if( !aStandardAppearance.isEmpty() ) { rAnnotDict.append( "/AS /" ); rAnnotDict.append( aStandardAppearance ); @@ -5459,7 +5459,7 @@ bool PDFWriterImpl::emitWidgetAnnotations() { aValue.append( "/" ); // check for radio group with all buttons unpressed - if( rWidget.m_aValue.getLength() == 0 ) + if( rWidget.m_aValue.isEmpty() ) aValue.append( "Off" ); else appendName( rWidget.m_aValue, aValue ); @@ -5522,13 +5522,13 @@ bool PDFWriterImpl::emitWidgetAnnotations() } aLine.append( "]\n" ); } - if( rWidget.m_aName.getLength() ) + if( !rWidget.m_aName.isEmpty() ) { aLine.append( "/T" ); appendLiteralStringEncrypt( rWidget.m_aName, rWidget.m_nObject, aLine ); aLine.append( "\n" ); } - if( m_aContext.Version > PDFWriter::PDF_1_2 && rWidget.m_aDescription.getLength() ) + if( m_aContext.Version > PDFWriter::PDF_1_2 && !rWidget.m_aDescription.isEmpty() ) { // the alternate field name should be unicode able since it is // supposed to be used in UI @@ -5642,9 +5642,9 @@ bool PDFWriterImpl::emitWidgetAnnotations() else m_aErrors.insert( PDFWriter::Warning_FormAction_Omitted_PDFA ); } - if( rWidget.m_aDAString.getLength() ) + if( !rWidget.m_aDAString.isEmpty() ) { - if( rWidget.m_aDRDict.getLength() ) + if( !rWidget.m_aDRDict.isEmpty() ) { aLine.append( "/DR<<" ); aLine.append( rWidget.m_aDRDict ); @@ -5667,7 +5667,7 @@ bool PDFWriterImpl::emitWidgetAnnotations() // appearance charactristics for terminal fields // which are supposed to have an appearance constructed // by the viewer application - if( rWidget.m_aMKDict.getLength() ) + if( !rWidget.m_aMKDict.isEmpty() ) { aLine.append( "/MK<<" ); aLine.append( rWidget.m_aMKDict ); @@ -5952,11 +5952,11 @@ bool PDFWriterImpl::emitCatalog() aLine.append( nStructureDict ); aLine.append( " 0 R\n" ); } - if( m_aContext.DocumentLocale.Language.getLength() > 0 ) + if( !m_aContext.DocumentLocale.Language.isEmpty() ) { OUStringBuffer aLocBuf( 16 ); aLocBuf.append( m_aContext.DocumentLocale.Language.toAsciiLowerCase() ); - if( m_aContext.DocumentLocale.Country.getLength() > 0 ) + if( !m_aContext.DocumentLocale.Country.isEmpty() ) { aLocBuf.append( sal_Unicode('-') ); aLocBuf.append( m_aContext.DocumentLocale.Country ); @@ -10748,7 +10748,7 @@ void PDFWriterImpl::beginStructureElementMCSeq() OStringBuffer aLine( 128 ); sal_Int32 nMCID = m_aPages[ m_nCurrentPage ].m_aMCIDParents.size(); aLine.append( "/" ); - if( rEle.m_aAlias.getLength() > 0 ) + if( !rEle.m_aAlias.isEmpty() ) aLine.append( rEle.m_aAlias ); else aLine.append( getStructureTag( rEle.m_eType ) ); @@ -10870,7 +10870,7 @@ sal_Int32 PDFWriterImpl::beginStructureElement( PDFWriter::StructElement eType, m_nCurrentStructElement = nNewId; // handle alias names - if( rAlias.getLength() && eType != PDFWriter::NonStructElement ) + if( !rAlias.isEmpty() && eType != PDFWriter::NonStructElement ) { OStringBuffer aNameBuf( rAlias.getLength() ); appendName( rAlias, aNameBuf ); @@ -10884,7 +10884,7 @@ sal_Int32 PDFWriterImpl::beginStructureElement( PDFWriter::StructElement eType, aLine.append( m_nCurrentStructElement ); aLine.append( ": " ); aLine.append( getStructureTag( eType ) ); - if( rEle.m_aAlias.getLength() ) + if( !rEle.m_aAlias.isEmpty() ) { aLine.append( " aliased as \"" ); aLine.append( rEle.m_aAlias ); @@ -10928,7 +10928,7 @@ void PDFWriterImpl::endStructureElement() aLine.append( m_nCurrentStructElement ); aLine.append( ": " ); aLine.append( getStructureTag( m_aStructure[ m_nCurrentStructElement ].m_eType ) ); - if( m_aStructure[ m_nCurrentStructElement ].m_aAlias.getLength() ) + if( !m_aStructure[ m_nCurrentStructElement ].m_aAlias.isEmpty() ) { aLine.append( " aliased as \"" ); aLine.append( m_aStructure[ m_nCurrentStructElement ].m_aAlias ); @@ -11066,7 +11066,7 @@ bool PDFWriterImpl::setCurrentStructureElement( sal_Int32 nEle ) aLine.append( m_nCurrentStructElement ); aLine.append( ": " ); aLine.append( getStructureTag( m_aStructure[ m_nCurrentStructElement ].m_eType ) ); - if( m_aStructure[ m_nCurrentStructElement ].m_aAlias.getLength() ) + if( !m_aStructure[ m_nCurrentStructElement ].m_aAlias.isEmpty() ) { aLine.append( " aliased as \"" ); aLine.append( m_aStructure[ m_nCurrentStructElement ].m_aAlias ); @@ -11621,7 +11621,7 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK; rNewWidget.m_nFlags |= 0x00010000; - if( rBtn.URL.getLength() ) + if( !rBtn.URL.isEmpty() ) rNewWidget.m_aListEntries.push_back( rBtn.URL ); rNewWidget.m_bSubmit = rBtn.Submit; rNewWidget.m_bSubmitGet = rBtn.SubmitGet; @@ -11652,7 +11652,7 @@ sal_Int32 PDFWriterImpl::createControl( const PDFWriter::AnyWidget& rControl, sa rNewWidget.m_aValue = OUString( RTL_CONSTASCII_USTRINGPARAM( "Off" ) ); rNewWidget.m_aOnValue = rBtn.OnValue; - if( ! rRadioButton.m_aValue.getLength() && rBtn.Selected ) + if( rRadioButton.m_aValue.isEmpty() && rBtn.Selected ) { rNewWidget.m_aValue = rNewWidget.m_aOnValue; rRadioButton.m_aValue = rNewWidget.m_aOnValue; |