summaryrefslogtreecommitdiff
path: root/sw/source/ui/vba
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/vba')
-rw-r--r--sw/source/ui/vba/vbafield.cxx6
-rw-r--r--sw/source/ui/vba/vbafind.cxx2
-rw-r--r--sw/source/ui/vba/vbarange.cxx8
-rw-r--r--sw/source/ui/vba/vbaselection.cxx8
-rw-r--r--sw/source/ui/vba/vbastyle.cxx6
-rw-r--r--sw/source/ui/vba/vbastyles.cxx2
-rw-r--r--sw/source/ui/vba/vbasystem.cxx6
-rw-r--r--sw/source/ui/vba/vbatemplate.cxx4
8 files changed, 21 insertions, 21 deletions
diff --git a/sw/source/ui/vba/vbafield.cxx b/sw/source/ui/vba/vbafield.cxx
index d83f5705b926..489f57fe4019 100644
--- a/sw/source/ui/vba/vbafield.cxx
+++ b/sw/source/ui/vba/vbafield.cxx
@@ -376,7 +376,7 @@ SwVbaFields::Add( const css::uno::Reference< ::ooo::vba::word::XRange >& Range,
Text >>= sText;
String sFieldName;
- if( ( nType == word::WdFieldType::wdFieldEmpty ) && ( sText.getLength() > 0 ) )
+ if( ( nType == word::WdFieldType::wdFieldEmpty ) && !sText.isEmpty() )
{
_ReadFieldParams aReadParam(sText);
sFieldName = aReadParam.GetFieldName();
@@ -408,7 +408,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_FileName( const rtl
{
uno::Reference< text::XTextField > xTextField( mxMSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.FileName")) ), uno::UNO_QUERY_THROW );
sal_Int16 nFileFormat = text::FilenameDisplayFormat::NAME_AND_EXT;
- if( _text.getLength() > 0 )
+ if( !_text.isEmpty() )
{
long nRet;
_ReadFieldParams aReadParam( _text );
@@ -517,7 +517,7 @@ uno::Reference< text::XTextField > SwVbaFields::Create_Field_DocProperty( const
{
sFieldService = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.text.textfield.docinfo.Custom" ) );
}
- else if( sFieldService.getLength() == 0 )
+ else if( sFieldService.isEmpty() )
{
throw uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Not implemented") ), uno::Reference< uno::XInterface >() );
}
diff --git a/sw/source/ui/vba/vbafind.cxx b/sw/source/ui/vba/vbafind.cxx
index c995527e20a6..52a0d8c22e3e 100644
--- a/sw/source/ui/vba/vbafind.cxx
+++ b/sw/source/ui/vba/vbafind.cxx
@@ -84,7 +84,7 @@ void SwVbaFind::SetReplace( sal_Int32 type )
uno::Reference< text::XTextRange > SwVbaFind::FindOneElement() throw ( uno::RuntimeException )
{
uno::Reference< text::XTextRange > xFoundOne;
- if( mxTVC->getString().getLength() > 0 )
+ if( !mxTVC->getString().isEmpty() )
{
if( getForward() )
{
diff --git a/sw/source/ui/vba/vbarange.cxx b/sw/source/ui/vba/vbarange.cxx
index 0f514004f375..5b97fa87ab27 100644
--- a/sw/source/ui/vba/vbarange.cxx
+++ b/sw/source/ui/vba/vbarange.cxx
@@ -164,7 +164,7 @@ SwVbaRange::setText( const rtl::OUString& rText ) throw ( uno::RuntimeException
}
// insert the bookmark if the bookmark is deleted during setting text string
- if( sName.getLength() )
+ if( !sName.isEmpty() )
{
uno::Reference< text::XBookmarksSupplier > xBookmarksSupplier( mxTextDocument, uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xNameAccess( xBookmarksSupplier->getBookmarks(), uno::UNO_QUERY_THROW );
@@ -267,15 +267,15 @@ SwVbaRange::setParagraphFormat( const uno::Reference< word::XParagraphFormat >&
void SwVbaRange::GetStyleInfo(rtl::OUString& aStyleName, rtl::OUString& aStyleType ) throw ( uno::RuntimeException )
{
uno::Reference< beans::XPropertySet > xProp( mxTextCursor, uno::UNO_QUERY_THROW );
- if( ( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharStyleName") ) ) >>= aStyleName ) && aStyleName.getLength() )
+ if( ( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharStyleName") ) ) >>= aStyleName ) && !aStyleName.isEmpty() )
{
aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CharacterStyles") );
}
- else if( ( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName") ) ) >>= aStyleName ) && aStyleName.getLength() )
+ else if( ( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName") ) ) >>= aStyleName ) && !aStyleName.isEmpty() )
{
aStyleType = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParagraphStyles") );
}
- if( aStyleType.getLength() == 0 )
+ if( aStyleType.isEmpty() )
{
DebugHelper::exception( SbERR_INTERNAL_ERROR, rtl::OUString() );
}
diff --git a/sw/source/ui/vba/vbaselection.cxx b/sw/source/ui/vba/vbaselection.cxx
index 51530eaca059..4ddee39c9260 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -924,7 +924,7 @@ uno::Any SAL_CALL SwVbaSelection::Rows( const uno::Any& index ) throw (uno::Runt
uno::Reference< text::XTextTable > xTextTable = GetXTextTable();
SwVbaTableHelper aTableHelper( xTextTable );
nStartRow = aTableHelper.getTabRowIndex( sTLName );
- if( sBRName.getLength() > 0 )
+ if( !sBRName.isEmpty() )
{
nEndRow = aTableHelper.getTabRowIndex( sBRName );
}
@@ -950,7 +950,7 @@ uno::Any SAL_CALL SwVbaSelection::Columns( const uno::Any& index ) throw (uno::R
uno::Reference< text::XTextTable > xTextTable = GetXTextTable();
SwVbaTableHelper aTableHelper( xTextTable );
nStartColumn = aTableHelper.getTabColIndex( sTLName );
- if( sBRName.getLength() > 0 )
+ if( !sBRName.isEmpty() )
{
nEndColumn = aTableHelper.getTabColIndex( sBRName );
}
@@ -1009,7 +1009,7 @@ void SwVbaSelection::GetSelectedCellRange( rtl::OUString& sTLName, rtl::OUString
sBRName = sRange.GetToken(1, ':');
}
}
- if( !sTLName.getLength() )
+ if( sTLName.isEmpty() )
{
uno::Reference< table::XCell > xCell;
xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Cell") ) ) >>= xCell;
@@ -1036,7 +1036,7 @@ uno::Any SAL_CALL SwVbaSelection::Cells( const uno::Any& index ) throw (uno::Run
SwVbaTableHelper aTableHelper( xTextTable );
nLeft = aTableHelper.getTabColIndex( sTLName );
nTop = aTableHelper.getTabRowIndex( sTLName );
- if( sBRName.getLength() > 0 )
+ if( !sBRName.isEmpty() )
{
nRight = aTableHelper.getTabColIndex( sBRName );
nBottom = aTableHelper.getTabRowIndex( sBRName );
diff --git a/sw/source/ui/vba/vbastyle.cxx b/sw/source/ui/vba/vbastyle.cxx
index e2ff34edb7d2..4c966e3637ce 100644
--- a/sw/source/ui/vba/vbastyle.cxx
+++ b/sw/source/ui/vba/vbastyle.cxx
@@ -118,7 +118,7 @@ void SwVbaStyle::setStyle( const uno::Reference< beans::XPropertySet >& xParaPro
rStyle >>= sStyle;
}
- if( sStyle.getLength() )
+ if( !sStyle.isEmpty() )
{
xParaProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParaStyleName") ), uno::makeAny( sStyle ) );
return;
@@ -196,7 +196,7 @@ uno::Any SAL_CALL SwVbaStyle::getBaseStyle() throw (uno::RuntimeException)
// ParentStyle
rtl::OUString sBaseStyle;
mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ParentStyle") ) ) >>= sBaseStyle;
- if( sBaseStyle.getLength() > 0 )
+ if( !sBaseStyle.isEmpty() )
{
uno::Reference< XCollection > xCol( new SwVbaStyles( this, mxContext, mxModel ) );
return xCol->Item( uno::makeAny( sBaseStyle ), uno::Any() );
@@ -227,7 +227,7 @@ uno::Any SAL_CALL SwVbaStyle::getNextParagraphStyle() throw (uno::RuntimeExcepti
//FollowStyle
rtl::OUString sFollowStyle;
mxStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FollowStyle") ) ) >>= sFollowStyle;
- if( sFollowStyle.getLength() > 0 )
+ if( !sFollowStyle.isEmpty() )
{
uno::Reference< XCollection > xCol( new SwVbaStyles( this, mxContext, mxModel ) );
return xCol->Item( uno::makeAny( sFollowStyle ), uno::Any() );
diff --git a/sw/source/ui/vba/vbastyles.cxx b/sw/source/ui/vba/vbastyles.cxx
index cd4f353d29d4..09ead7502f39 100644
--- a/sw/source/ui/vba/vbastyles.cxx
+++ b/sw/source/ui/vba/vbastyles.cxx
@@ -312,7 +312,7 @@ SwVbaStyles::Item( const uno::Any& Index1, const uno::Any& Index2 ) throw (uno::
if( nIndex == pTable->wdBuiltinStyle )
{
rtl::OUString aStyleName = rtl::OUString::createFromAscii( pTable->pOOoStyleName );
- if( aStyleName.getLength() > 0 )
+ if( !aStyleName.isEmpty() )
{
rtl::OUString aStyleType;
switch( pTable->wdStyleType )
diff --git a/sw/source/ui/vba/vbasystem.cxx b/sw/source/ui/vba/vbasystem.cxx
index d8be0e21276b..368dae6e0ce3 100644
--- a/sw/source/ui/vba/vbasystem.cxx
+++ b/sw/source/ui/vba/vbasystem.cxx
@@ -87,7 +87,7 @@ uno::Any PrivateProfileStringListener::getValueEvent()
{
// get the private profile string
rtl::OUString sValue;
- if(maFileName.getLength())
+ if(!maFileName.isEmpty())
{
// get key/value from a file
Config aCfg( maFileName );
@@ -133,7 +133,7 @@ void PrivateProfileStringListener::setValueEvent( const css::uno::Any& value )
// set the private profile string
rtl::OUString aValue;
value >>= aValue;
- if(maFileName.getLength())
+ if(!maFileName.isEmpty())
{
// set value into a file
Config aCfg( maFileName );
@@ -251,7 +251,7 @@ SwVbaSystem::PrivateProfileString( const rtl::OUString& rFilename, const rtl::OU
// FIXME: need to detect whether it is a relative file path
// we need to detect if this is a URL, if not then assume its a file path
rtl::OUString sFileUrl;
- if( rFilename.getLength() )
+ if( !rFilename.isEmpty() )
{
INetURLObject aObj;
aObj.SetURL( rFilename );
diff --git a/sw/source/ui/vba/vbatemplate.cxx b/sw/source/ui/vba/vbatemplate.cxx
index 9774a971f114..d09d65e85954 100644
--- a/sw/source/ui/vba/vbatemplate.cxx
+++ b/sw/source/ui/vba/vbatemplate.cxx
@@ -71,7 +71,7 @@ rtl::OUString
SwVbaTemplate::getName() throw ( css::uno::RuntimeException )
{
rtl::OUString sName;
- if( msFullUrl.getLength() )
+ if( !msFullUrl.isEmpty() )
{
INetURLObject aURL( msFullUrl );
::osl::File::getSystemPathFromFileURL( aURL.GetLastName(), sName );
@@ -83,7 +83,7 @@ rtl::OUString
SwVbaTemplate::getPath() throw ( css::uno::RuntimeException )
{
rtl::OUString sPath;
- if( msFullUrl.getLength() )
+ if( !msFullUrl.isEmpty() )
{
INetURLObject aURL( msFullUrl );
rtl::OUString sURL( aURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );