[Libreoffice-commits] .: reportdesign/source

Lubos Lunak llunak at kemper.freedesktop.org
Wed Jan 4 04:16:42 PST 2012


 reportdesign/source/core/api/ReportDefinition.cxx           |    6 +-
 reportdesign/source/core/api/ReportEngineJFree.cxx          |    8 +-
 reportdesign/source/core/api/Shape.cxx                      |   16 ++---
 reportdesign/source/core/sdr/PropertyForward.cxx            |    2 
 reportdesign/source/core/sdr/ReportDrawPage.cxx             |    2 
 reportdesign/source/core/sdr/RptObject.cxx                  |    6 --
 reportdesign/source/filter/xml/dbloader2.cxx                |    2 
 reportdesign/source/filter/xml/xmlAutoStyle.cxx             |    2 
 reportdesign/source/filter/xml/xmlCell.cxx                  |    8 +-
 reportdesign/source/filter/xml/xmlColumn.cxx                |    2 
 reportdesign/source/filter/xml/xmlControlProperty.cxx       |    2 
 reportdesign/source/filter/xml/xmlExport.cxx                |   32 +++++-----
 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx |    8 +-
 reportdesign/source/filter/xml/xmlFixedContent.cxx          |    4 -
 reportdesign/source/filter/xml/xmlFunction.cxx              |    2 
 reportdesign/source/filter/xml/xmlHelper.cxx                |    4 -
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx |    2 
 reportdesign/source/filter/xml/xmlMasterFields.cxx          |    4 -
 reportdesign/source/filter/xml/xmlStyleImport.cxx           |    6 +-
 reportdesign/source/filter/xml/xmlTable.cxx                 |    2 
 reportdesign/source/filter/xml/xmlfilter.cxx                |    2 
 reportdesign/source/ui/dlg/AddField.cxx                     |    8 +-
 reportdesign/source/ui/dlg/Condition.cxx                    |    2 
 reportdesign/source/ui/dlg/Formula.cxx                      |    4 -
 reportdesign/source/ui/dlg/GroupsSorting.cxx                |    4 -
 reportdesign/source/ui/inspection/DataProviderHandler.cxx   |    2 
 reportdesign/source/ui/inspection/GeometryHandler.cxx       |   36 ++++++------
 reportdesign/source/ui/misc/RptUndo.cxx                     |    2 
 reportdesign/source/ui/misc/UITools.cxx                     |    4 -
 reportdesign/source/ui/report/DesignView.cxx                |    2 
 reportdesign/source/ui/report/FormattedFieldBeautifier.cxx  |    4 -
 reportdesign/source/ui/report/ReportController.cxx          |   26 ++++----
 reportdesign/source/ui/report/SectionWindow.cxx             |    2 
 reportdesign/source/ui/report/propbrw.cxx                   |    4 -
 34 files changed, 110 insertions(+), 112 deletions(-)

New commits:
commit e224197bda4fc17b0a2333a2af69c11577ec3ef4
Author: Olivier Hallot <olivier.hallot at documentfoundation.org>
Date:   Tue Jan 3 21:17:13 2012 -0200

    Fix for fdo43460 Part XXVIII getLength() to isEmpty()

diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 536efe3..6ce9cf2 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -771,7 +771,7 @@ void OReportDefinition::init()
         {
             ::rtl::OUString sMediaType;
             xStorProps->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType"))) >>= sMediaType;
-            if ( !sMediaType.getLength() )
+            if ( sMediaType.isEmpty() )
                 xStorProps->setPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")),uno::makeAny(MIMETYPE_OASIS_OPENDOCUMENT_REPORT));
         }
         m_pImpl->m_pObjectContainer.reset( new comphelper::EmbeddedObjectContainer(m_pImpl->m_xStorage , static_cast<cppu::OWeakObject*>(this) ) );
@@ -1479,7 +1479,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
         static const ::rtl::OUString sPropName(RTL_CONSTASCII_USTRINGPARAM("MediaType"));
         ::rtl::OUString sOldMediaType;
         xProp->getPropertyValue(sPropName) >>= sOldMediaType;
-        if ( !xProp->getPropertyValue(sPropName).hasValue() || !sOldMediaType.getLength() || MIMETYPE_OASIS_OPENDOCUMENT_REPORT != sOldMediaType )
+        if ( !xProp->getPropertyValue(sPropName).hasValue() || sOldMediaType.isEmpty() || MIMETYPE_OASIS_OPENDOCUMENT_REPORT != sOldMediaType )
             xProp->setPropertyValue( sPropName, uno::makeAny(MIMETYPE_OASIS_OPENDOCUMENT_REPORT) );
     }
 
@@ -1827,7 +1827,7 @@ void SAL_CALL OReportDefinition::load( const uno::Sequence< beans::PropertyValue
     uno::Any aStorageSource;
     if ( xStream.is() )
         aStorageSource <<= aStorageSource;
-    else if ( sURL.getLength() )
+    else if ( !sURL.isEmpty() )
         aStorageSource <<= sURL;
     else
         throw lang::IllegalArgumentException(
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx
index 87d9982..c0c8840 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -257,7 +257,7 @@ void SAL_CALL OReportEngineJFree::setStatusIndicator( const uno::Reference< task
             // create job factory and initialize
             const ::rtl::OUString sReportEngineServiceName = ::dbtools::getDefaultReportEngineServiceName(xFactory);
             uno::Reference<task::XJob> xJob(m_xContext->getServiceManager()->createInstanceWithContext(sReportEngineServiceName,m_xContext),uno::UNO_QUERY_THROW);
-            if ( m_xReport->getCommand().getLength() )
+            if ( !m_xReport->getCommand().isEmpty() )
             {
                 xJob->execute(aConvertedProperties);
                 if ( xStorageProp.is() )
@@ -267,10 +267,10 @@ void SAL_CALL OReportEngineJFree::setStatusIndicator( const uno::Reference< task
             }
 
             uno::Reference<embed::XTransactedObject> xTransact(xOut,uno::UNO_QUERY);
-            if ( sOutputName.getLength() && xTransact.is() )
+            if ( !sOutputName.isEmpty() && xTransact.is() )
                 xTransact->commit();
 
-            if ( !sOutputName.getLength() )
+            if ( sOutputName.isEmpty() )
                 throw lang::IllegalArgumentException();
         }
         catch(const uno::Exception& e)
@@ -297,7 +297,7 @@ uno::Reference< frame::XModel > SAL_CALL OReportEngineJFree::createDocumentAlive
 {
     uno::Reference< frame::XModel > xModel;
     ::rtl::OUString sOutputName = getNewOutputName(); // starts implicite the report generator
-    if ( sOutputName.getLength() )
+    if ( !sOutputName.isEmpty() )
     {
         ::osl::MutexGuard aGuard(m_aMutex);
         ::connectivity::checkDisposed(ReportEngineBase::rBHelper.bDisposed);
diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx
index 04742bb..2f81f3e 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -234,40 +234,40 @@ uno::Any SAL_CALL OShape::getPropertyValue( const ::rtl::OUString& PropertyName
 void SAL_CALL OShape::addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& xListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
 {
     getInfoHelper();
-    if( m_pAggHelper->classifyProperty(aPropertyName) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY || !aPropertyName.getLength() )
+    if( m_pAggHelper->classifyProperty(aPropertyName) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY || aPropertyName.isEmpty() )
         m_aProps.aComponent.m_xProperty->addPropertyChangeListener( aPropertyName, xListener);
     // can be in both
-    if( m_pAggHelper->classifyProperty(aPropertyName) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY || !aPropertyName.getLength() )
+    if( m_pAggHelper->classifyProperty(aPropertyName) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY || aPropertyName.isEmpty() )
         ShapePropertySet::addPropertyChangeListener( aPropertyName, xListener );
 }
 // -----------------------------------------------------------------------------
 void SAL_CALL OShape::removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const uno::Reference< beans::XPropertyChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
 {
     getInfoHelper();
-    if( m_pAggHelper->classifyProperty(aPropertyName) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY || !aPropertyName.getLength() )
+    if( m_pAggHelper->classifyProperty(aPropertyName) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY || aPropertyName.isEmpty() )
         m_aProps.aComponent.m_xProperty->removePropertyChangeListener( aPropertyName, aListener );
     // can be in both
-    if( m_pAggHelper->classifyProperty(aPropertyName) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY || !aPropertyName.getLength() )
+    if( m_pAggHelper->classifyProperty(aPropertyName) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY || aPropertyName.isEmpty() )
         ShapePropertySet::removePropertyChangeListener( aPropertyName, aListener );
 }
 // -----------------------------------------------------------------------------
 void SAL_CALL OShape::addVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
 {
     getInfoHelper();
-    if( m_pAggHelper->classifyProperty(PropertyName) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY || !PropertyName.getLength() )
+    if( m_pAggHelper->classifyProperty(PropertyName) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY || PropertyName.isEmpty() )
         m_aProps.aComponent.m_xProperty->addVetoableChangeListener( PropertyName, aListener );
     // can be in both
-    if( m_pAggHelper->classifyProperty(PropertyName) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY || !PropertyName.getLength() )
+    if( m_pAggHelper->classifyProperty(PropertyName) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY || PropertyName.isEmpty() )
         ShapePropertySet::addVetoableChangeListener( PropertyName, aListener );
 }
 // -----------------------------------------------------------------------------
 void SAL_CALL OShape::removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const uno::Reference< beans::XVetoableChangeListener >& aListener ) throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
 {
     getInfoHelper();
-    if( m_pAggHelper->classifyProperty(PropertyName) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY || !PropertyName.getLength() )
+    if( m_pAggHelper->classifyProperty(PropertyName) == OPropertyArrayAggregationHelper::AGGREGATE_PROPERTY || PropertyName.isEmpty() )
         m_aProps.aComponent.m_xProperty->removeVetoableChangeListener( PropertyName, aListener );
     // can be in both
-    if( m_pAggHelper->classifyProperty(PropertyName) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY || !PropertyName.getLength() )
+    if( m_pAggHelper->classifyProperty(PropertyName) == OPropertyArrayAggregationHelper::DELEGATOR_PROPERTY || PropertyName.isEmpty() )
         ShapePropertySet::removeVetoableChangeListener( PropertyName, aListener );
 }
 // -----------------------------------------------------------------------------
diff --git a/reportdesign/source/core/sdr/PropertyForward.cxx b/reportdesign/source/core/sdr/PropertyForward.cxx
index b645d3b..23b9543 100644
--- a/reportdesign/source/core/sdr/PropertyForward.cxx
+++ b/reportdesign/source/core/sdr/PropertyForward.cxx
@@ -140,7 +140,7 @@ void SAL_CALL OPropertyMediator::propertyChange( const PropertyChangeEvent& evt
                             if ( aFind != m_aNameMap.end() )
                                 sPropName = aFind->first;
                         }
-                        if ( sPropName.getLength() && xPropInfo->hasPropertyByName(sPropName) )
+                        if ( !sPropName.isEmpty() && xPropInfo->hasPropertyByName(sPropName) )
                             xProp->setPropertyValue(sPropName,aFind->second.second->operator()(sPropName,evt.NewValue));
                         else if (   evt.PropertyName == PROPERTY_CHARFONTNAME
                                 ||  evt.PropertyName == PROPERTY_CHARFONTSTYLENAME
diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index 86db8db..bcfd5b5 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -78,7 +78,7 @@ uno::Reference< drawing::XShape >  OReportDrawPage::_CreateShape( SdrObject *pOb
     {
         bool bChangeOrientation = false;
         ::rtl::OUString sServiceName = pBaseObj->getServiceName();
-        OSL_ENSURE(sServiceName.getLength(),"No Service Name given!");
+        OSL_ENSURE(!sServiceName.isEmpty(),"No Service Name given!");
 
         if ( pObj->ISA(OUnoObject) )
         {
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index ee502b2..06119a6 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -629,7 +629,7 @@ OUnoObject::OUnoObject(const ::rtl::OUString& _sComponentName
           ,m_nObjectType(_nObjectType)
 {
     DBG_CTOR( rpt_OUnoObject, NULL);
-    if ( rModelName.getLength() )
+    if ( !rModelName.isEmpty() )
         impl_initializeModel_nothrow();
 }
 //----------------------------------------------------------------------------
@@ -643,11 +643,9 @@ OUnoObject::OUnoObject(const uno::Reference< report::XReportComponent>& _xCompon
     DBG_CTOR( rpt_OUnoObject, NULL);
     impl_setUnoShape( uno::Reference< uno::XInterface >( _xComponent, uno::UNO_QUERY ) );
 
-    if ( rModelName.getLength() )
+    if ( !rModelName.isEmpty() )
         impl_initializeModel_nothrow();
 
-    if ( rModelName.getLength() )
-        impl_initializeModel_nothrow();
 }
 //----------------------------------------------------------------------------
 OUnoObject::~OUnoObject()
diff --git a/reportdesign/source/filter/xml/dbloader2.cxx b/reportdesign/source/filter/xml/dbloader2.cxx
index 9e05065..f70d71a 100644
--- a/reportdesign/source/filter/xml/dbloader2.cxx
+++ b/reportdesign/source/filter/xml/dbloader2.cxx
@@ -59,7 +59,7 @@ ORptTypeDetection::ORptTypeDetection(Reference< XComponentContext > const & xCon
     ::comphelper::SequenceAsHashMap aTemp(Descriptor);
     ::rtl::OUString sTemp = aTemp.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")),::rtl::OUString());
 
-    if ( sTemp.getLength() )
+    if ( !sTemp.isEmpty() )
     {
         INetURLObject aURL(sTemp);
         if ( aURL.GetExtension().equalsIgnoreAsciiCaseAscii("orp") )
diff --git a/reportdesign/source/filter/xml/xmlAutoStyle.cxx b/reportdesign/source/filter/xml/xmlAutoStyle.cxx
index 3aead25..e5f52bc 100644
--- a/reportdesign/source/filter/xml/xmlAutoStyle.cxx
+++ b/reportdesign/source/filter/xml/xmlAutoStyle.cxx
@@ -61,7 +61,7 @@ void OXMLAutoStylePoolP::exportStyleAttributes(
                     rtl::OUString sAttrValue;
                     if ( i->maValue >>= sAttrValue )
                     {
-                        if ( sAttrValue.getLength() )
+                        if ( !sAttrValue.isEmpty() )
                         {
                             rORptExport.AddAttribute(
                                 aPropMapper->GetEntryNameSpace(i->mnIndex),
diff --git a/reportdesign/source/filter/xml/xmlCell.cxx b/reportdesign/source/filter/xml/xmlCell.cxx
index 68d4962..c4071eb 100644
--- a/reportdesign/source/filter/xml/xmlCell.cxx
+++ b/reportdesign/source/filter/xml/xmlCell.cxx
@@ -207,7 +207,7 @@ void OXMLCell::EndElement()
                 m_pContainer->addCell(xShape.get());
         }
     }
-    if ( m_pCell != this && m_sText.getLength() )
+    if ( m_pCell != this && !m_sText.isEmpty() )
     {
         ORptFilter& rImport = GetOwnImport();
         Reference<XMultiServiceFactory> xFactor(rImport.GetModel(),uno::UNO_QUERY);
@@ -222,7 +222,7 @@ void OXMLCell::EndElement()
         m_pContainer->addCell(m_xComponent);
     }
     // check if we have a FixedLine
-    else if ( m_sStyleName.getLength() && !m_xComponent.is() && m_pCell == this )
+    else if ( !m_sStyleName.isEmpty() && !m_xComponent.is() && m_pCell == this )
     {
         ORptFilter& rImport = GetOwnImport();
         Reference<XMultiServiceFactory> xFactor(rImport.GetModel(),uno::UNO_QUERY);
@@ -265,10 +265,10 @@ void OXMLCell::setComponent(const uno::Reference< report::XReportComponent >& _x
 // -----------------------------------------------------------------------------
 void OXMLCell::Characters( const ::rtl::OUString& rChars )
 {
-    if ( rChars.getLength() )
+    if ( !rChars.isEmpty() )
     {
         static const ::rtl::OUString s_Quote(RTL_CONSTASCII_USTRINGPARAM("\""));
-        if ( m_sText.getLength() )
+        if ( !m_sText.isEmpty() )
         {
             static const ::rtl::OUString s_sStringConcat(RTL_CONSTASCII_USTRINGPARAM(" & "));
             m_sText += s_sStringConcat;
diff --git a/reportdesign/source/filter/xml/xmlColumn.cxx b/reportdesign/source/filter/xml/xmlColumn.cxx
index 927c8e5..5c5f76e 100644
--- a/reportdesign/source/filter/xml/xmlColumn.cxx
+++ b/reportdesign/source/filter/xml/xmlColumn.cxx
@@ -134,7 +134,7 @@ SvXMLImportContext* OXMLRowColumn::CreateChildContext(
 // -----------------------------------------------------------------------------
 void OXMLRowColumn::fillStyle(const ::rtl::OUString& _sStyleName)
 {
-    if ( _sStyleName.getLength() )
+    if ( !_sStyleName.isEmpty() )
     {
         const SvXMLStylesContext* pAutoStyles = GetOwnImport().GetAutoStyles();
         if ( pAutoStyles )
diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx
index 37374a0..dd4d195 100644
--- a/reportdesign/source/filter/xml/xmlControlProperty.cxx
+++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx
@@ -156,7 +156,7 @@ SvXMLImportContext* OXMLControlProperty::CreateChildContext(
 // -----------------------------------------------------------------------------
 void OXMLControlProperty::EndElement()
 {
-    if ( m_aSetting.Name.getLength() && m_xControl.is() )
+    if ( !m_aSetting.Name.isEmpty() && m_xControl.is() )
     {
         if ( m_bIsList && !m_aSequence.getLength() )
             m_aSetting.Value <<= m_aSequence;
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 47e67da..035bd22 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -364,7 +364,7 @@ void ORptExport::exportFunction(const uno::Reference< XFunction>& _xFunction)
 {
     exportFormula(XML_FORMULA,_xFunction->getFormula());
     beans::Optional< ::rtl::OUString> aInitial = _xFunction->getInitialFormula();
-    if ( aInitial.IsPresent && aInitial.Value.getLength() )
+    if ( aInitial.IsPresent && !aInitial.Value.isEmpty() )
         exportFormula(XML_INITIAL_FORMULA ,aInitial.Value );
     AddAttribute( XML_NAMESPACE_REPORT, XML_NAME , _xFunction->getName() );
     if ( _xFunction->getPreEvaluated() )
@@ -391,7 +391,7 @@ void ORptExport::exportMasterDetailFields(const Reference<XReportComponent>& _xR
         for(;pIter != pEnd;++pIter,++pDetailFieldsIter)
         {
             AddAttribute( XML_NAMESPACE_REPORT, XML_MASTER , *pIter );
-            if ( pDetailFieldsIter->getLength() )
+            if ( !pDetailFieldsIter->isEmpty() )
                 AddAttribute( XML_NAMESPACE_REPORT, XML_DETAIL , *pDetailFieldsIter );
             SvXMLElementExport aPair(*this,XML_NAMESPACE_REPORT, XML_MASTER_DETAIL_FIELD, sal_True, sal_True);
         }
@@ -494,7 +494,7 @@ void ORptExport::exportReportElement(const Reference<XReportControlModel>& _xRep
     }
 
     ::rtl::OUString sExpr = _xReportElement->getConditionalPrintExpression();
-    if ( sExpr.getLength() )
+    if ( !sExpr.isEmpty() )
     {
         exportFormula(XML_FORMULA,sExpr);
         SvXMLElementExport aPrintExpr(*this,XML_NAMESPACE_REPORT, XML_CONDITIONAL_PRINT_EXPRESSION, sal_True, sal_True);
@@ -757,7 +757,7 @@ void ORptExport::exportSection(const Reference<XSection>& _xSection,bool bHeader
     SvXMLElementExport aComponents(*this,XML_NAMESPACE_TABLE, XML_TABLE, sal_True, sal_True);
 
     ::rtl::OUString sExpr = _xSection->getConditionalPrintExpression();
-    if ( sExpr.getLength() )
+    if ( !sExpr.isEmpty() )
     {
         exportFormula(XML_FORMULA,sExpr);
         SvXMLElementExport aPrintExpr(*this,XML_NAMESPACE_REPORT, XML_CONDITIONAL_PRINT_EXPRESSION, sal_True, sal_False);
@@ -915,7 +915,7 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection)
                             {
                                 eToken = XML_IMAGE;
                                 ::rtl::OUString sTargetLocation = xImage->getImageURL();
-                                if ( sTargetLocation.getLength() )
+                                if ( !sTargetLocation.isEmpty() )
                                 {
                                     sTargetLocation = GetRelativeReference(sTargetLocation);
                                     AddAttribute(XML_NAMESPACE_FORM, XML_IMAGE_DATA,sTargetLocation);
@@ -1097,7 +1097,7 @@ sal_Bool ORptExport::exportGroup(const Reference<XReportDefinition>& _xReportDef
                         AddAttribute(XML_NAMESPACE_REPORT, XML_RESET_PAGE_NUMBER, XML_TRUE );
 
                     ::rtl::OUString sExpression = xGroup->getExpression();
-                    if ( sExpression.getLength() )
+                    if ( !sExpression.isEmpty() )
                     {
                         static ::rtl::OUString s_sQuote(RTL_CONSTASCII_USTRINGPARAM("\"\""));
                         sal_Int32 nIndex = sExpression.indexOf('"');
@@ -1165,7 +1165,7 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference<XFormatted
         try
         {
             const awt::FontDescriptor aFont = xFormat->getFontDescriptor();
-            OSL_ENSURE(aFont.Name.getLength(),"No Font Name !");
+            OSL_ENSURE(!aFont.Name.isEmpty(),"No Font Name !");
             GetFontAutoStylePool()->Add(aFont.Name,aFont.StyleName,aFont.Family,aFont.Pitch,aFont.CharSet );
         }
         catch(beans::UnknownPropertyException&)
@@ -1286,11 +1286,11 @@ void ORptExport::exportReportAttributes(const Reference<XReportDefinition>& _xRe
             AddAttribute(XML_NAMESPACE_REPORT, XML_COMMAND_TYPE,sValue.makeStringAndClear());
 
         ::rtl::OUString sComamnd = _xReport->getCommand();
-        if ( sComamnd.getLength() )
+        if ( !sComamnd.isEmpty() )
             AddAttribute(XML_NAMESPACE_REPORT, XML_COMMAND, sComamnd);
 
         ::rtl::OUString sFilter( _xReport->getFilter() );
-        if ( sFilter.getLength() )
+        if ( !sFilter.isEmpty() )
             AddAttribute( XML_NAMESPACE_REPORT, XML_FILTER, sFilter );
 
         AddAttribute(XML_NAMESPACE_OFFICE, XML_MIMETYPE,_xReport->getMimeType());
@@ -1300,10 +1300,10 @@ void ORptExport::exportReportAttributes(const Reference<XReportDefinition>& _xRe
             AddAttribute( XML_NAMESPACE_REPORT, XML_ESCAPE_PROCESSING, ::xmloff::token::GetXMLToken( XML_FALSE ) );
 
         ::rtl::OUString sName = _xReport->getCaption();
-        if ( sName.getLength() )
+        if ( !sName.isEmpty() )
             AddAttribute(XML_NAMESPACE_OFFICE, XML_CAPTION,sName);
         sName = _xReport->getName();
-        if ( sName.getLength() )
+        if ( !sName.isEmpty() )
             AddAttribute(XML_NAMESPACE_DRAW, XML_NAME,sName);
     }
 }
@@ -1449,7 +1449,7 @@ void ORptExport::exportParagraph(const Reference< XReportControlModel >& _xRepor
             {
                 ::rtl::OUString sToken = sFieldData.getToken( 0, '&', nIndex );
                 sToken = sToken.trim();
-                if ( sToken.getLength() )
+                if ( !sToken.isEmpty() )
                 {
                     if ( sToken == s_sPageNumber )
                     {
@@ -1589,9 +1589,9 @@ void ORptExport::exportGroupsExpressionAsFunction(const Reference< XGroups>& _xG
                     default:
                         ;
                 }
-                if ( !sFunctionName.getLength() )
+                if ( sFunctionName.isEmpty() )
                     sFunctionName = sFunction + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_")) + sExpression;
-                if ( sFunction.getLength() )
+                if ( !sFunction.isEmpty() )
                 {
                     sal_Unicode pReplaceChars[] = { '(',')',';',',','+','-','[',']','/','*'};
                     for(sal_uInt32 j= 0; j < SAL_N_ELEMENTS(pReplaceChars);++j)
@@ -1603,10 +1603,10 @@ void ORptExport::exportGroupsExpressionAsFunction(const Reference< XGroups>& _xG
                     sFunction += sExpression;
                     sFunction += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]"));
 
-                    if ( sPrefix.getLength() )
+                    if ( !sPrefix.isEmpty() )
                         sFunction += sPrefix;
                     sFunction += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(")"));
-                    if ( sPostfix.getLength() )
+                    if ( !sPostfix.isEmpty() )
                         sFunction += sPostfix;
                     xFunction->setFormula(sFunction);
                     exportFunction(xFunction);
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 66a2532..f434fc0 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -174,11 +174,11 @@ void SAL_CALL ExportDocumentHandler::startElement(const ::rtl::OUString & _sName
             pList->AddAttribute(lcl_createAttribute(XML_NP_RPT,XML_COMMAND_TYPE),sValue.makeStringAndClear());
         }
         const ::rtl::OUString sComamnd = m_xDatabaseDataProvider->getCommand();
-        if ( sComamnd.getLength() )
+        if ( !sComamnd.isEmpty() )
             pList->AddAttribute(lcl_createAttribute(XML_NP_RPT,XML_COMMAND),sComamnd);
 
         const ::rtl::OUString sFilter( m_xDatabaseDataProvider->getFilter() );
-        if ( sFilter.getLength() )
+        if ( !sFilter.isEmpty() )
             pList->AddAttribute(lcl_createAttribute(XML_NP_RPT,XML_FILTER),sFilter);
 
         const sal_Bool bEscapeProcessing( m_xDatabaseDataProvider->getEscapeProcessing() );
@@ -339,7 +339,7 @@ void SAL_CALL ExportDocumentHandler::initialize( const uno::Sequence< uno::Any >
     // set ourself as delegator
     m_xProxy->setDelegator( *this );
     const ::rtl::OUString sCommand = m_xDatabaseDataProvider->getCommand();
-    if ( sCommand.getLength() )
+    if ( !sCommand.isEmpty() )
         m_aColumns = ::dbtools::getFieldNamesByCommandDescriptor(m_xDatabaseDataProvider->getActiveConnection()
                     ,m_xDatabaseDataProvider->getCommandType()
                     ,sCommand);
@@ -351,7 +351,7 @@ void SAL_CALL ExportDocumentHandler::initialize( const uno::Sequence< uno::Any >
         uno::Sequence< ::rtl::OUString > aColumnNames = xDataProvider->getColumnDescriptions();
         for(sal_Int32 i = 0 ; i < aColumnNames.getLength();++i)
         {
-            if ( aColumnNames[i].getLength() )
+            if ( !aColumnNames[i].isEmpty() )
             {
                 sal_Int32 nCount = m_aColumns.getLength();
                 m_aColumns.realloc(nCount+1);
diff --git a/reportdesign/source/filter/xml/xmlFixedContent.cxx b/reportdesign/source/filter/xml/xmlFixedContent.cxx
index 99c8969..292f9e9 100644
--- a/reportdesign/source/filter/xml/xmlFixedContent.cxx
+++ b/reportdesign/source/filter/xml/xmlFixedContent.cxx
@@ -223,10 +223,10 @@ void OXMLFixedContent::EndElement()
 void OXMLFixedContent::Characters( const ::rtl::OUString& rChars )
 {
     m_sLabel += rChars;
-    if ( rChars.getLength() )
+    if ( !rChars.isEmpty() )
     {
         static const ::rtl::OUString s_Quote(RTL_CONSTASCII_USTRINGPARAM("\""));
-        if ( m_sPageText.getLength() )
+        if ( !m_sPageText.isEmpty() )
         {
             static const ::rtl::OUString s_sStringConcat(RTL_CONSTASCII_USTRINGPARAM(" & "));
             m_sPageText += s_sStringConcat;
diff --git a/reportdesign/source/filter/xml/xmlFunction.cxx b/reportdesign/source/filter/xml/xmlFunction.cxx
index 800cf06..d9d727b 100644
--- a/reportdesign/source/filter/xml/xmlFunction.cxx
+++ b/reportdesign/source/filter/xml/xmlFunction.cxx
@@ -88,7 +88,7 @@ OXMLFunction::OXMLFunction( ORptFilter& _rImport
                     m_xFunction->setPreEvaluated(sValue == s_sTRUE);
                     break;
                 case XML_TOK_INITIAL_FORMULA:
-                    if ( sValue.getLength() )
+                    if ( !sValue.isEmpty() )
                         m_xFunction->setInitialFormula(beans::Optional< ::rtl::OUString>(sal_True,ORptFilter::convertFormula(sValue)));
                     break;
                 case XML_TOK_DEEP_TRAVERSING:
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index 0bddd7d..ea9bf59 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -267,7 +267,7 @@ const SvXMLEnumMapEntry* OXMLHelper::GetCommandTypeOptions()
 #define PROPERTY_ID_FONTTYPE         16
 void OXMLHelper::copyStyleElements(const bool _bOld,const ::rtl::OUString& _sStyleName,const SvXMLStylesContext* _pAutoStyles,const uno::Reference<beans::XPropertySet>& _xProp)
 {
-    if ( !_xProp.is() || !_sStyleName.getLength() || !_pAutoStyles )
+    if ( !_xProp.is() || _sStyleName.isEmpty() || !_pAutoStyles )
         return;
     XMLPropStyleContext* pAutoStyle = PTR_CAST(XMLPropStyleContext,_pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_CELL,_sStyleName));
     if ( pAutoStyle )
@@ -318,7 +318,7 @@ void OXMLHelper::copyStyleElements(const bool _bOld,const ::rtl::OUString& _sSty
             xProp->getPropertyValue(PROPERTY_CHARWORDMODE) >>=  aFont.WordLineMode;
             xProp->getPropertyValue(PROPERTY_FONTTYPE) >>=          aFont.Type;
             uno::Reference<report::XReportControlFormat> xReportControlModel(_xProp,uno::UNO_QUERY);
-            if ( xReportControlModel.is() && aFont.Name.getLength() )
+            if ( xReportControlModel.is() && !aFont.Name.isEmpty() )
             {
                 try
                 {
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 8c57e8b..0e87b7a 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -227,7 +227,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
                         break;
                 }
             }
-            if ( !sDetailField.getLength() )
+            if ( sDetailField.isEmpty() )
                 sDetailField = sMasterField;
             m_aMasterFields.push_back(sMasterField);
             m_aDetailFields.push_back(sDetailField);
diff --git a/reportdesign/source/filter/xml/xmlMasterFields.cxx b/reportdesign/source/filter/xml/xmlMasterFields.cxx
index b5d8825..735a350 100644
--- a/reportdesign/source/filter/xml/xmlMasterFields.cxx
+++ b/reportdesign/source/filter/xml/xmlMasterFields.cxx
@@ -77,9 +77,9 @@ OXMLMasterFields::OXMLMasterFields( ORptFilter& rImport,
                 break;
         }
     }
-    if ( !sDetailField.getLength() )
+    if ( sDetailField.isEmpty() )
         sDetailField = sMasterField;
-    if ( sMasterField.getLength() )
+    if ( !sMasterField.isEmpty() )
         m_pReport->addMasterDetailPair(::std::pair< ::rtl::OUString,::rtl::OUString >(sMasterField,sDetailField));
 }
 // -----------------------------------------------------------------------------
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 1d3f2f7..3d21f34 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -117,7 +117,7 @@ void OControlStyleContext::FillPropertySet(const Reference< XPropertySet > & rPr
     {
         if ( GetFamily() == XML_STYLE_FAMILY_TABLE_CELL )
         {
-            if ((m_nNumberFormat == -1) && m_sDataStyleName.getLength())
+            if ((m_nNumberFormat == -1) && !m_sDataStyleName.isEmpty())
             {
                 SvXMLNumFormatContext* pStyle = const_cast< SvXMLNumFormatContext*>(dynamic_cast<const SvXMLNumFormatContext*>(pStyles->FindStyleChildContext(
                     XML_STYLE_FAMILY_DATA_STYLE, m_sDataStyleName, sal_False)));
@@ -370,7 +370,7 @@ Reference < XNameContainer >
                 OSL_FAIL("OReportStylesContext::CreateStyleStyleChildContext: Unknown style family. PLease check.");
                 break;
         }
-        if( !xStyles.is() && sName.getLength() && GetOwnImport().GetModel().is() )
+        if( !xStyles.is() && !sName.isEmpty() && GetOwnImport().GetModel().is() )
         {
             Reference< XStyleFamiliesSupplier > xFamiliesSupp(
                                             GetOwnImport().GetModel(), UNO_QUERY );
@@ -407,7 +407,7 @@ Reference < XNameContainer >
 ::rtl::OUString OReportStylesContext::GetServiceName( sal_uInt16 nFamily ) const
 {
     rtl::OUString sServiceName = SvXMLStylesContext::GetServiceName(nFamily);
-    if (!sServiceName.getLength())
+    if (sServiceName.isEmpty())
     {
         switch( nFamily )
         {
diff --git a/reportdesign/source/filter/xml/xmlTable.cxx b/reportdesign/source/filter/xml/xmlTable.cxx
index 0d0ae9f..7f2d851 100644
--- a/reportdesign/source/filter/xml/xmlTable.cxx
+++ b/reportdesign/source/filter/xml/xmlTable.cxx
@@ -180,7 +180,7 @@ void OXMLTable::EndElement()
     {
         if ( m_xSection.is() )
         {
-            if ( m_sStyleName.getLength() )
+            if ( !m_sStyleName.isEmpty() )
             {
                 const SvXMLStylesContext* pAutoStyles = GetImport().GetAutoStyles();
                 if ( pAutoStyles )
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index e08ef57..c9197ea 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -502,7 +502,7 @@ sal_Bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
         }
     }
 
-    if ( sFileName.getLength() != 0 )
+    if ( !sFileName.isEmpty() )
     {
         uno::Reference<XComponent> xCom(GetModel(),UNO_QUERY);
 
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index aab0530..e1b9092 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -303,7 +303,7 @@ namespace
             ::rtl::OUString sLabel;
             if ( xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_LABEL) )
                 xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
-            if ( sLabel.getLength() )
+            if ( !sLabel.isEmpty() )
                 _rListBox.InsertEntry( sLabel,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
             else
                 _rListBox.InsertEntry( *pEntries,NULL,sal_False,LIST_APPEND,new ColumnInfo(*pEntries,sLabel) );
@@ -350,7 +350,7 @@ void OAddFieldWindow::Update()
 
             // add the columns to the list
             uno::Reference< sdbc::XConnection> xCon = getConnection();
-            if ( xCon.is() && m_aCommandName.getLength() )
+            if ( xCon.is() && !m_aCommandName.isEmpty() )
                 m_xColumns = dbtools::getFieldsByCommandDescriptor( xCon, GetCommandType(), GetCommand(), m_xHoldAlive );
             if ( m_xColumns.is() )
             {
@@ -369,7 +369,7 @@ void OAddFieldWindow::Update()
             aTitle.AppendAscii(" ");
             aTitle += m_aCommandName.getStr();
             SetText( aTitle );
-            if ( m_aCommandName.getLength() )
+            if ( !m_aCommandName.isEmpty() )
             {
                 for (sal_uInt16 i = 0; i < nItemCount; ++i)
                 {
@@ -470,7 +470,7 @@ void OAddFieldWindow::_elementInserted( const container::ContainerEvent& _rEvent
             ::rtl::OUString sLabel;
             if ( xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_LABEL) )
                 xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
-            if ( sLabel.getLength() )
+            if ( !sLabel.isEmpty() )
                 m_pListBox->InsertEntry( sLabel,NULL,sal_False,LIST_APPEND,new ColumnInfo(sName,sLabel) );
             else
                 m_pListBox->InsertEntry( sName,NULL,sal_False,LIST_APPEND,new ColumnInfo(sName,sLabel) );
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index f700d23..544dc03 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -589,7 +589,7 @@ void Condition::impl_setCondition( const ::rtl::OUString& _rConditionFormula )
     // LHS and RHS, matched below
     ::rtl::OUString sLHS, sRHS;
 
-    if ( _rConditionFormula.getLength() )
+    if ( !_rConditionFormula.isEmpty() )
     {
         // the unprefixed expression which forms the condition
         ReportFormula aFormula( _rConditionFormula );
diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index 3b4f7ee..2c30b6e 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -71,7 +71,7 @@ FormulaDialog::FormulaDialog(Window* pParent
     ,m_nStart(0)
     ,m_nEnd(1)
 {
-    if ( _sFormula.getLength() > 0 )
+    if ( !_sFormula.isEmpty() )
     {
         if ( _sFormula.getStr()[0] != '=' )
             m_sFormula += String(_sFormula);
@@ -235,7 +235,7 @@ IMPL_LINK( FormulaDialog, OnClickHdl, OAddFieldWindow* ,_pAddFieldDlg)
         ::svx::ODataAccessDescriptor aDescriptor(aValue);
         ::rtl::OUString sName;
         aDescriptor[ ::svx::daColumnName ] >>= sName;
-        if ( sName.getLength() )
+        if ( !sName.isEmpty() )
         {
             sName = ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("[")) + sName + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("]"));
             m_pEdit->SetText(sName);
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 2c6f10f..80d41f9 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -84,7 +84,7 @@ using namespace ::comphelper;
             if ( xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_LABEL) )
                 xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
             o_aColumnList.push_back( ColumnInfo(*pEntries,sLabel) );
-            if ( sLabel.getLength() )
+            if ( !sLabel.isEmpty() )
                 _rListBox.InsertEntry( sLabel );
             else
                 _rListBox.InsertEntry( *pEntries );
@@ -535,7 +535,7 @@ String OFieldExpressionControl::GetCellText( long nRow, sal_uInt16 /*nColId*/ )
             {
                 if ( aIter->sColumnName == sExpression )
                 {
-                    if ( aIter->sLabel.getLength() )
+                    if ( !aIter->sLabel.isEmpty() )
                         sExpression = aIter->sLabel;
                     break;
                 }
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index 77fbcdb..0080558 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -456,7 +456,7 @@ void SAL_CALL DataProviderHandler::actuatingPropertyChanged(const ::rtl::OUStrin
         if ( NewValue != OldValue )
         {
             uno::Reference< report::XReportDefinition> xReport = m_xReportComponent->getSection()->getReportDefinition();
-            bool bDoEnableMasterDetailFields = xReport.is() && xReport->getCommand().getLength() && m_xDataProvider->getCommand().getLength();
+            bool bDoEnableMasterDetailFields = xReport.is() && !xReport->getCommand().isEmpty() && !m_xDataProvider->getCommand().isEmpty();
             InspectorUI->enablePropertyUIElements( PROPERTY_DETAILFIELDS, inspection::PropertyLineElement::PrimaryButton, bDoEnableMasterDetailFields );
             InspectorUI->enablePropertyUIElements( PROPERTY_MASTERFIELDS, inspection::PropertyLineElement::PrimaryButton, bDoEnableMasterDetailFields );
 
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 45a698c..34f6b8b 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -215,7 +215,7 @@ bool GeometryHandler::impl_isDataField(const ::rtl::OUString& _sName) const
     ::rtl::OUString sName;
     _rControlValue >>= sName;
 
-    if ( !sName.getLength() )
+    if ( sName.isEmpty() )
         return sName;
 
     ReportFormula aParser( sName );
@@ -390,7 +390,7 @@ uno::Any SAL_CALL GeometryHandler::getPropertyValue(const ::rtl::OUString & Prop
                     case FUNCTION:
                         if ( isDefaultFunction(sDataField,sDataField) )
                             aPropertyValue <<= sDataField;
-                        else if ( !sDataField.getLength() )
+                        else if ( sDataField.isEmpty() )
                             aPropertyValue = uno::Any();
                         break;
                     case COUNTER:
@@ -426,7 +426,7 @@ uno::Any SAL_CALL GeometryHandler::getPropertyValue(const ::rtl::OUString & Prop
                             aPropertyValue <<= (PROPERTY_ID_FORMULALIST == nId ? m_sDefaultFunction : m_sScope);
                         break;
                     case USER_DEF_FUNCTION:
-                        if ( sDataField.getLength() && PROPERTY_ID_FORMULALIST == nId )
+                        if ( !sDataField.isEmpty() && PROPERTY_ID_FORMULALIST == nId )
                             aPropertyValue = aDataField;
                         break;
                     case COUNTER:
@@ -487,7 +487,7 @@ void SAL_CALL GeometryHandler::setPropertyValue(const ::rtl::OUString & Property
                 m_sScope = m_sDefaultFunction = ::rtl::OUString();
                 m_xFunction.clear();
                 const sal_uInt32 nOldDataFieldType = m_nDataFieldType;
-                if ( sDataField.getLength() )
+                if ( !sDataField.isEmpty() )
                 {
                     if ( isDefaultFunction(sDataField,sDataField,uno::Reference< report::XFunctionsSupplier>(),true) )
                         m_nDataFieldType = FUNCTION;
@@ -526,7 +526,7 @@ void SAL_CALL GeometryHandler::setPropertyValue(const ::rtl::OUString & Property
             {
                 bHandled = true;
                 ::rtl::OUString sFunction;
-                if ( !(Value >>= sFunction) || !sFunction.getLength() )
+                if ( !(Value >>= sFunction) || sFunction.isEmpty() )
                 {
                     if ( m_nDataFieldType == FUNCTION )
                     {
@@ -1484,15 +1484,15 @@ void SAL_CALL GeometryHandler::actuatingPropertyChanged(const ::rtl::OUString &
                         _rxInspectorUI->enablePropertyUI(PROPERTY_DATAFIELD,sal_True);
                         _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,sal_False);
                         _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,sal_False);
-                        OSL_ENSURE(m_sDefaultFunction.getLength() == 0,"Why is the m_sDefaultFunction set?");
-                        OSL_ENSURE(m_sScope.getLength() == 0,"Why is the m_sScope set?");
+                        OSL_ENSURE(m_sDefaultFunction.isEmpty(),"Why is the m_sDefaultFunction set?");
+                        OSL_ENSURE(m_sScope.isEmpty(),"Why is the m_sScope set?");
                         break;
                     case FUNCTION:
                         _rxInspectorUI->rebuildPropertyUI(PROPERTY_DATAFIELD);
                         _rxInspectorUI->rebuildPropertyUI(PROPERTY_FORMULALIST);
                         _rxInspectorUI->enablePropertyUI(PROPERTY_DATAFIELD,sal_True);
-                        _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,m_sDefaultFunction.getLength() != 0);
-                        _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,m_sScope.getLength() != 0);
+                        _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,!m_sDefaultFunction.isEmpty());
+                        _rxInspectorUI->enablePropertyUI(PROPERTY_SCOPE,!m_sScope.isEmpty());
                         break;
                     case USER_DEF_FUNCTION:
                         _rxInspectorUI->enablePropertyUI(PROPERTY_DATAFIELD,sal_False);
@@ -1515,7 +1515,7 @@ void SAL_CALL GeometryHandler::actuatingPropertyChanged(const ::rtl::OUString &
                 {
                     ::rtl::OUString sValue;
                     m_xReportComponent->getPropertyValue( PROPERTY_DATAFIELD ) >>= sValue;
-                    bEnable = sValue.getLength() != 0;
+                    bEnable = !sValue.isEmpty();
                 }
                 _rxInspectorUI->enablePropertyUI(PROPERTY_FORMULALIST,bEnable);
                 if ( bEnable )
@@ -1684,7 +1684,7 @@ void GeometryHandler::impl_fillFormulaList_nothrow(::std::vector< ::rtl::OUStrin
     const SfxFilter* pFilter = SfxFilter::GetDefaultFilter( aMimeHelper.GetDocServiceNameFromMediaType(_sMimetype) );
     if ( pFilter )
         sRet = pFilter->GetUIName();
-    if ( !sRet.getLength() )
+    if ( sRet.isEmpty() )
         sRet = _sMimetype;
     return sRet;
 }
@@ -1702,7 +1702,7 @@ void GeometryHandler::impl_fillMimeTypes_nothrow(::std::vector< ::rtl::OUString
             for(;pIter != pEnd; ++pIter)
             {
                 const ::rtl::OUString sDocName( impl_ConvertMimeTypeToUI_nothrow(*pIter) );
-                if ( sDocName.getLength() )
+                if ( !sDocName.isEmpty() )
                     _out_rList.push_back(sDocName);
             }
         }
@@ -1752,7 +1752,7 @@ uno::Reference< report::XFunctionsSupplier> GeometryHandler::fillScope_throw(::r
     const uno::Reference< report::XReportComponent> xSourceReportComponent(m_xReportComponent,uno::UNO_QUERY_THROW);
     const uno::Reference< report::XSection> xSection(xSourceReportComponent->getParent(),uno::UNO_QUERY_THROW);
     const uno::Reference< report::XReportDefinition> xReportDefinition = xSection->getReportDefinition();
-    if ( !m_sScope.getLength() )
+    if ( m_sScope.isEmpty() )
     {
         const uno::Reference< report::XGroup> xGroup(xSection->getGroup(),uno::UNO_QUERY);
         if ( xGroup.is() )
@@ -1777,7 +1777,7 @@ uno::Reference< report::XFunctionsSupplier> GeometryHandler::fillScope_throw(::r
                 xReturn = xGroup2.get();
             }
         }
-        if ( !m_sScope.getLength() )
+        if ( m_sScope.isEmpty() )
         {
             xReturn = xReportDefinition.get();
             _rsNamePostFix = m_sScope = xReportDefinition->getName();
@@ -2070,7 +2070,7 @@ void GeometryHandler::impl_initFieldList_nothrow( uno::Sequence< ::rtl::OUString
         OSL_VERIFY( xFormSet->getPropertyValue( PROPERTY_COMMAND ) >>= sObjectName );
         // when there is no command we don't need to ask for columns
         uno::Reference<sdbc::XConnection> xCon(m_xContext->getValueByName( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ActiveConnection"))) ,uno::UNO_QUERY);
-        if ( sObjectName.getLength() && xCon.is() )
+        if ( !sObjectName.isEmpty() && xCon.is() )
         {
             sal_Int32 nObjectType = sdb::CommandType::COMMAND;
             OSL_VERIFY( xFormSet->getPropertyValue( PROPERTY_COMMANDTYPE ) >>= nObjectType );
@@ -2162,7 +2162,7 @@ void GeometryHandler::impl_setCounterFunction_throw()
     sFunctionName += sNamePostFix;
     const ::rtl::OUString sQuotedFunctionName = lcl_getQuotedFunctionName(sFunctionName);
     ::rtl::OUString sScope;
-    if ( !(sFunctionName.getLength() && m_aFunctionNames.find(sQuotedFunctionName) != m_aFunctionNames.end() && impl_isCounterFunction_throw(sQuotedFunctionName,sScope)) )
+    if ( !(!sFunctionName.isEmpty() && m_aFunctionNames.find(sQuotedFunctionName) != m_aFunctionNames.end() && impl_isCounterFunction_throw(sQuotedFunctionName,sScope)) )
         impl_createFunction(sFunctionName,::rtl::OUString(),m_aCounterFunction);
 
     OBlocker aBlocker(m_bIn);
@@ -2173,7 +2173,7 @@ sal_uInt32 GeometryHandler::impl_getDataFieldType_throw(const ::rtl::OUString& _
 {
     sal_uInt32 nDataFieldType = UNDEF_DATA;
     ::rtl::OUString sDataField;
-    if ( _sDataField.getLength() )
+    if ( !_sDataField.isEmpty() )
         sDataField = _sDataField;
     else
     {
@@ -2182,7 +2182,7 @@ sal_uInt32 GeometryHandler::impl_getDataFieldType_throw(const ::rtl::OUString& _
         aDataField >>= sDataField;
     }
 
-    if ( sDataField.getLength() )
+    if ( !sDataField.isEmpty() )
     {
         if ( impl_isDataField(sDataField) )
             nDataFieldType = DATA_OR_FORMULA;
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx
index c481463..ee5e01a 100644
--- a/reportdesign/source/ui/misc/RptUndo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -289,7 +289,7 @@ OGroupSectionUndo::OGroupSectionUndo(OReportModel& _rMod,sal_uInt16 _nSlot
 //----------------------------------------------------------------------------
 String OGroupSectionUndo::GetComment() const
 {
-    if ( !m_sName.getLength() )
+    if ( m_sName.isEmpty() )
     {
         try
         {
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 0949606..75a4ad4 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -169,14 +169,14 @@ using namespace formula;
 void adjustSectionName(const uno::Reference< report::XGroup >& _xGroup,sal_Int32 _nPos)
 {
     OSL_ENSURE(_xGroup.is(),"Group is NULL -> GPF");
-    if ( _xGroup->getHeaderOn() && !_xGroup->getHeader()->getName().getLength() )
+    if ( _xGroup->getHeaderOn() && _xGroup->getHeader()->getName().isEmpty() )
     {
         ::rtl::OUString sName = String(ModuleRes(RID_STR_GROUPHEADER));
         sName += ::rtl::OUString::valueOf(_nPos);
         _xGroup->getHeader()->setName(sName);
     }
 
-    if ( _xGroup->getFooterOn() && !_xGroup->getFooter()->getName().getLength()  )
+    if ( _xGroup->getFooterOn() && _xGroup->getFooter()->getName().isEmpty() )
     {
         ::rtl::OUString sName = String(ModuleRes(RID_STR_GROUPFOOTER));
         sName += ::rtl::OUString::valueOf(_nPos);
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx
index 275a7ec..e757083 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -223,7 +223,7 @@ long ODesignView::PreNotify( NotifyEvent& rNEvt )
                     const KeyCode& rCode = pKeyEvent->GetKeyCode();
                     util::URL aUrl;
                     aUrl.Complete = m_pAccel->findCommand(svt::AcceleratorExecute::st_VCLKey2AWTKey(rCode));
-                    if ( !aUrl.Complete.getLength() || !m_rController.isCommandEnabled( aUrl.Complete ) )
+                    if ( aUrl.Complete.isEmpty() || !m_rController.isCommandEnabled( aUrl.Complete ) )
                         nRet = 0L;
                 }
             }
diff --git a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
index fcdeb26..52f1a9e 100644
--- a/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
+++ b/reportdesign/source/ui/report/FormattedFieldBeautifier.cxx
@@ -95,7 +95,7 @@ namespace rptui
             {
                 sDataField = xControlModel->getDataField();
 
-                if ( sDataField.getLength() )
+                if ( !sDataField.isEmpty() )
                 {
                     ReportFormula aFormula( sDataField );
                     bool bSet = true;
@@ -103,7 +103,7 @@ namespace rptui
                     {
                         const ::rtl::OUString sColumnName = aFormula.getFieldName();
                         ::rtl::OUString sLabel = m_rReportController.getColumnLabel_throw(sColumnName);
-                        if ( sLabel.getLength() )
+                        if ( !sLabel.isEmpty() )
                         {
                             ::rtl::OUStringBuffer aBuffer;
                             aBuffer.appendAscii( "=" );
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index c99d12f..24a44f2 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -788,7 +788,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
             break;
         case SID_FM_ADD_FIELD:
             aReturn.bEnabled = isConnected() && isEditable() && m_xReportDefinition.is()
-                && m_xReportDefinition->getCommand().getLength();
+                && !m_xReportDefinition->getCommand().isEmpty();
             aReturn.bChecked = getDesignView() && getDesignView()->isAddFieldVisible();
             break;
         case SID_SHOW_PROPERTYBROWSER:
@@ -1372,7 +1372,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
                 URL aUrl = getURLForId(_nId);
                 sal_Int32 nIndex = 1;
                 ::rtl::OUString sType = aUrl.Complete.getToken(0,'.',nIndex);
-                if ( nIndex == -1 || !sType.getLength() )
+                if ( nIndex == -1 || sType.isEmpty() )
                 {
                     switch(_nId)
                     {
@@ -1678,7 +1678,7 @@ void OReportController::impl_initialize( )
     const ::comphelper::NamedValueCollection& rArguments( getInitParams() );
 
     rArguments.get_ensureType( (::rtl::OUString)PROPERTY_REPORTNAME, m_sName );
-    if ( !m_sName.getLength() )
+    if ( m_sName.isEmpty() )
         rArguments.get_ensureType( "DocumentTitle", m_sName );
 
     try
@@ -1707,7 +1707,7 @@ void OReportController::impl_initialize( )
             ::rtl::OUString sHierarchicalDocumentName;
             sHierarchicalDocumentName = aDescriptor.getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HierarchicalDocumentName")),sHierarchicalDocumentName);
 
-            if ( !sHierarchicalDocumentName.getLength() && getConnection().is() )
+            if ( sHierarchicalDocumentName.isEmpty() && getConnection().is() )
             {
                 uno::Reference<sdbcx::XTablesSupplier> xTablesSup(getConnection(),uno::UNO_QUERY_THROW);
                 uno::Reference<container::XNameAccess> xTables = xTablesSup->getTables();
@@ -2869,7 +2869,7 @@ uno::Reference<frame::XModel> OReportController::executeReport()
     if ( m_xReportDefinition.is() )
     {
         sal_uInt16 nErrorId = RID_ERR_NO_COMMAND;
-        bool bEnabled = m_xReportDefinition->getCommand().getLength() != 0;
+        bool bEnabled = !m_xReportDefinition->getCommand().isEmpty();
         if ( bEnabled )
         {
             bEnabled = false;
@@ -2955,7 +2955,7 @@ uno::Reference<frame::XModel> OReportController::executeReport()
                     aThirdMessage.Context = aWrapped.Context;
                 }
 
-                if ( aThirdMessage.Message.getLength() )
+                if ( !aThirdMessage.Message.isEmpty() )
                     aSecondMessage.NextException <<= aThirdMessage;
                 aFirstMessage.NextException <<= aSecondMessage;
 
@@ -3157,7 +3157,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
         pNewControl = SdrObjFactory::MakeNewObject( ReportInventor, _nObjectId, pSectionWindow->getReportSection().getPage(),m_aReportModel.get() );
         xShapeProp.set(pNewControl->getUnoShape(),uno::UNO_QUERY);
         ::rtl::OUString sCustomShapeType = getDesignView()->GetInsertObjString();
-        if ( !sCustomShapeType.getLength() )
+        if ( sCustomShapeType.isEmpty() )
             sCustomShapeType = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("diamond"));
         pSectionWindow->getReportSection().createDefault(sCustomShapeType,pNewControl);
         pNewControl->SetLogicRect(Rectangle(3000,500,6000,3500)); // switch height and width
@@ -3211,7 +3211,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
             xUnoProp->setPropertyValue(PROPERTY_BORDER,xShapeProp->getPropertyValue(PROPERTY_CONTROLBORDER));
 
 
-        if ( xInfo->hasPropertyByName(PROPERTY_DATAFIELD) && _sFunction.getLength() )
+        if ( xInfo->hasPropertyByName(PROPERTY_DATAFIELD) && !_sFunction.isEmpty() )
         {
             ReportFormula aFunctionFormula( ReportFormula::Expression, _sFunction );
             xUnoProp->setPropertyValue( PROPERTY_DATAFIELD, uno::makeAny( aFunctionFormula.getCompleteFormula() ) );
@@ -3222,7 +3222,7 @@ void OReportController::createControl(const Sequence< PropertyValue >& _aArgs,co
             xUnoProp->setPropertyValue( PROPERTY_FORMATKEY, uno::makeAny( nFormatKey ) );
 
         ::rtl::OUString sUrl = aMap.getUnpackedValueOrDefault(PROPERTY_IMAGEURL,::rtl::OUString());
-        if ( sUrl.getLength() && xInfo->hasPropertyByName(PROPERTY_IMAGEURL) )
+        if ( !sUrl.isEmpty() && xInfo->hasPropertyByName(PROPERTY_IMAGEURL) )
             xUnoProp->setPropertyValue( PROPERTY_IMAGEURL, uno::makeAny( sUrl ) );
 
         pObj->CreateMediator(sal_True);
@@ -3383,9 +3383,9 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
 
                 uno::Reference< container::XNameAccess > xColumns;
                 uno::Reference< sdbc::XConnection > xConnection( getConnection() );
-                if ( sCommand.getLength() && nCommandType != -1 && sColumnName.getLength() && xConnection.is() )
+                if ( !sCommand.isEmpty() && nCommandType != -1 && !sColumnName.isEmpty() && xConnection.is() )
                 {
-                    if ( !xReportDefinition->getCommand().getLength() )
+                    if ( xReportDefinition->getCommand().isEmpty() )
                     {
                         xReportDefinition->setCommand(sCommand);
                         xReportDefinition->setCommandType(nCommandType);
@@ -3540,7 +3540,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
                     {
                         uno::Reference< report::XReportComponent> xShapePropLabel(pObjs[0]->getUnoShape(),uno::UNO_QUERY_THROW);
                         uno::Reference< report::XReportComponent> xShapePropTextField(pObjs[1]->getUnoShape(),uno::UNO_QUERY_THROW);
-                        if ( sLabel.getLength() )
+                        if ( !sLabel.isEmpty() )
                             xShapePropTextField->setName(sLabel);
                         awt::Point aPosLabel = xShapePropLabel->getPosition();
                         awt::Point aPosTextField = xShapePropTextField->getPosition();
@@ -4337,7 +4337,7 @@ embed::VisualRepresentation SAL_CALL OReportController::getPreferredVisualRepres
 // -----------------------------------------------------------------------------
 uno::Reference< container::XNameAccess > OReportController::getColumns() const
 {
-    if ( !m_xColumns.is() && m_xReportDefinition.is() && m_xReportDefinition->getCommand().getLength() )
+    if ( !m_xColumns.is() && m_xReportDefinition.is() && !m_xReportDefinition->getCommand().isEmpty() )
     {
         m_xColumns = dbtools::getFieldsByCommandDescriptor(getConnection(),m_xReportDefinition->getCommandType(),m_xReportDefinition->getCommand(),m_xHoldAlive);
     }
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index 7acda71..37a7e6f 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -193,7 +193,7 @@ bool OSectionWindow::setGroupSectionTitle(const uno::Reference< report::XGroup>&
     {
         ::rtl::OUString sExpression = _xGroup->getExpression();
         ::rtl::OUString sLabel = getViewsWindow()->getView()->getReportView()->getController().getColumnLabel_throw(sExpression);
-        if ( sLabel.getLength() )
+        if ( !sLabel.isEmpty() )
         {
             sExpression = sLabel;
         }
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index 0416b77..8a8509c 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -262,7 +262,7 @@ void PropBrw::implDetachController()
             OSL_VERIFY( m_xBrowserController->getViewData() >>= sCurrentPage );
         }
 
-        if ( !sCurrentPage.getLength() )
+        if ( sCurrentPage.isEmpty() )
             sCurrentPage = m_sLastActivePage;
     }
     catch( const Exception& )
@@ -509,7 +509,7 @@ void PropBrw::Update( OSectionView* pNewView )
             m_bInitialStateChange = sal_False;
             // and additionally, we want to show the page which was active during
             // our previous incarnation
-            if ( m_sLastActivePage.getLength() && m_xBrowserController.is() )
+            if ( !m_sLastActivePage.isEmpty() && m_xBrowserController.is() )
             {
                 try
                 {


More information about the Libreoffice-commits mailing list