-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Please find attached a partial fix for Easy Hack FDO43460
Part XIX
Module
formula and fpicker
- --
Olivier Hallot
Founder, Board of Directors Member - The Document Foundation
LibreOffice translation leader for Brazilian Portuguese
+55-21-8822-8812
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJO95cpAAoJEJp3R7nH3vLxkpoIAIQ+TUoFsNn0JV2VFoym+Gsb
vcBFZNFRAlX7Sg36dKbHCLcNdiW0bOR1VWGwKoHQ9Ob1YvMWgf5lU54S4Nnrcdf8
pKcszzfHsdWDX54qTt+CD21ZvvE+Zi4j/eCpILHAe72hRgHY+RQyZUZx//rjYwyM
K4jLJcSWl4fYYNafYT5qBaROeFR2wkGgwRp8rgxkJaZe7nqcbX7MUb6RABQOjTqb
j4gqLBHawG8LvJwQpjVf1xFRCeR4RmfZDSW6k5Xb51jGiv5iugYs3scgoGWmFKWh
g1XmutFAqaxkATJwPKPXDbZJDpl9yC9ZpxGfu7jakyZ9lzHL0RwYPcHyE3Nj5yc=
=aBBK
-----END PGP SIGNATURE-----
From 8b0fc9c69cf601525a241df10df74f6ebbfd4ef7 Mon Sep 17 00:00:00 2001
From: Olivier Hallot <olivier.hallot@alta.org.br>
Date: Sun, 25 Dec 2011 19:31:22 -0200
Subject: [PATCH] Fix for fdo43460 Part XIX getLength() to isEmpty()
Part XIX
Module
formula and fpicker
---
formula/source/core/api/FormulaCompiler.cxx | 4 ++--
formula/source/ui/dlg/formula.cxx | 18 +++++++++---------
formula/source/ui/dlg/funcpage.cxx | 2 +-
formula/source/ui/dlg/parawin.cxx | 2 +-
fpicker/source/office/OfficeControlAccess.cxx | 2 +-
fpicker/source/office/OfficeFilePicker.cxx | 16 ++++++++--------
fpicker/source/office/OfficeFolderPicker.cxx | 2 +-
fpicker/source/office/commonpicker.cxx | 8 ++++----
fpicker/source/office/fpsmartcontent.cxx | 2 +-
fpicker/source/office/iodlg.cxx | 2 +-
10 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/formula/source/core/api/FormulaCompiler.cxx
b/formula/source/core/api/FormulaCompiler.cxx
index b721c3b..ee6530c 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -296,9 +296,9 @@ uno::Sequence< sheet::FormulaToken > FormulaCompiler::OpCodeMap::createSequenceO
// Check for existence not needed here, only name-mapping is of
// interest.
}
- if (!aIntName.getLength())
+ if (aIntName.isEmpty())
aIntName = _rCompiler.FindAddInFunction(*pName, !isEnglish()); //
bLocalFirst=false for english
- if (!aIntName.getLength())
+ if (aIntName.isEmpty())
pToken->OpCode = getOpCodeUnknown();
else
{
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index d298795..4197ae4 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -404,19 +404,19 @@ void FormulaDlg_Impl::PreNotify( NotifyEvent& rNEvt )
if(pWin!=NULL)
{
aActivWinId = pWin->GetUniqueId();
- if(aActivWinId.getLength()==0)
+ if(aActivWinId.isEmpty())
{
Window* pParent=pWin->GetParent();
while(pParent!=NULL)
{
aActivWinId=pParent->GetUniqueId();
- if(aActivWinId.getLength()!=0) break;
+ if(!aActivWinId.isEmpty()) break;
pParent=pParent->GetParent();
}
}
- if(aActivWinId.getLength())
+ if(!aActivWinId.isEmpty())
{
FormEditData* pData = m_pHelper->getFormEditData();
@@ -861,7 +861,7 @@ void FormulaDlg_Impl::FillControls(sal_Bool &rbNext, sal_Bool &rbPrev)
aFtEditName.Show();
pParaWin->Show();
const rtl::OString aHelpId = pFuncDesc->getHelpId();
- if ( aHelpId.getLength() )
+ if ( !aHelpId.isEmpty() )
pMEdit->SetHelpId(aHelpId);
}
@@ -1284,7 +1284,7 @@ void FormulaDlg_Impl::SaveArg( sal_uInt16 nEd )
sal_uInt16 i;
for(i=0;i<=nEd;i++)
{
- if ( m_aArguments[i].getLength() == 0 )
+ if ( m_aArguments[i].isEmpty() )
m_aArguments[i] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" "));
}
if(pParaWin->GetArgument(nEd).Len()!=0)
@@ -1744,14 +1744,14 @@ rtl::OString FormulaDlg_Impl::FindFocusWin(Window *pWin)
if(pWin->HasFocus())
{
aUniqueId=pWin->GetUniqueId();
- if(aUniqueId.getLength()==0)
+ if(aUniqueId.isEmpty())
{
Window* pParent=pWin->GetParent();
while(pParent!=NULL)
{
aUniqueId=pParent->GetUniqueId();
- if(aUniqueId.getLength()!=0) break;
+ if(!aUniqueId.isEmpty()) break;
pParent=pParent->GetParent();
}
@@ -1765,7 +1765,7 @@ rtl::OString FormulaDlg_Impl::FindFocusWin(Window *pWin)
{
Window* pChild=pWin->GetChild(i);
aUniqueId=FindFocusWin(pChild);
- if(aUniqueId.getLength()>0) break;
+ if(!aUniqueId.isEmpty()) break;
}
}
return aUniqueId;
@@ -1885,7 +1885,7 @@ FormulaDlg::FormulaDlg( SfxBindings* pB, SfxChildWindow* pCW,
,_pHelper,_pFunctionMgr,_pDlg))
{
FreeResource();
- if(!GetHelpId().getLength()) //Hack which hides the HelpId for a model Dialog in
SfxModelessDialog
+ if(GetHelpId().isEmpty()) //Hack which hides the HelpId for a model Dialog in
SfxModelessDialog
SetHelpId(GetUniqueId()); //and will be changed in a UniqueId,
//at this point we reverse it.
SetText(m_pImpl->aTitle1);
diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx
index ea3bbaa..22ea529 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -188,7 +188,7 @@ IMPL_LINK( FuncPage, SelHdl, ListBox*, pLb )
if ( pDesc )
{
const rtl::OString sHelpId = pDesc->getHelpId();
- if ( sHelpId.getLength() )
+ if ( !sHelpId.isEmpty() )
aLbFunction.SetHelpId(sHelpId);
}
aSelectionLink.Call(this);
diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index 5311aa5..7eeaf21 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -277,7 +277,7 @@ void ParaWin::SetFunctionDesc(const IFunctionDescription* pFDesc)
nArgs = 0;
if ( pFuncDesc!=NULL)
{
- if ( pFuncDesc->getDescription().getLength() )
+ if ( !pFuncDesc->getDescription().isEmpty() )
{
SetEditDesc(pFuncDesc->getDescription());
}
diff --git a/fpicker/source/office/OfficeControlAccess.cxx
b/fpicker/source/office/OfficeControlAccess.cxx
index 7b2d159..8b8288d 100644
--- a/fpicker/source/office/OfficeControlAccess.cxx
+++ b/fpicker/source/office/OfficeControlAccess.cxx
@@ -515,7 +515,7 @@ namespace svt
{
::rtl::OUString aEntry;
_rValue >>= aEntry;
- if ( aEntry.getLength() )
+ if ( !aEntry.isEmpty() )
_pListbox->InsertEntry( aEntry );
}
break;
diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index 75fba5a..3df9f11 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -166,13 +166,13 @@ void SvtFilePicker::prepareExecute()
{
// set the default directory
// --**-- doesn't match the spec yet
- if ( m_aDisplayDirectory.getLength() > 0 || m_aDefaultName.getLength() > 0 )
+ if ( !m_aDisplayDirectory.isEmpty() || !m_aDefaultName.isEmpty() )
{
- if ( m_aDisplayDirectory.getLength() > 0 )
+ if ( !m_aDisplayDirectory.isEmpty() )
{
INetURLObject aPath( m_aDisplayDirectory );
- if ( m_aDefaultName.getLength() > 0 )
+ if ( !m_aDefaultName.isEmpty() )
{
aPath.insertName( m_aDefaultName );
getDialog()->SetHasFilename( true );
@@ -180,7 +180,7 @@ void SvtFilePicker::prepareExecute()
String sPath = aPath.GetMainURL( INetURLObject::NO_DECODE );
getDialog()->SetPath( aPath.GetMainURL( INetURLObject::NO_DECODE ) );
}
- else if ( m_aDefaultName.getLength() > 0 )
+ else if ( !m_aDefaultName.isEmpty() )
{
getDialog()->SetPath( m_aDefaultName );
getDialog()->SetHasFilename( true );
@@ -235,7 +235,7 @@ void SvtFilePicker::prepareExecute()
}
// set the default filter
- if ( m_aCurrentFilter.getLength() > 0 )
+ if ( !m_aCurrentFilter.isEmpty() )
getDialog()->SetCurFilter( m_aCurrentFilter );
}
@@ -435,7 +435,7 @@ void SvtFilePicker::ensureFilterList( const ::rtl::OUString& _rInitialCurrentFil
m_pFilterList = new FilterList;
// set the first filter to the current filter
- if ( ! m_aCurrentFilter.getLength() )
+ if ( m_aCurrentFilter.isEmpty() )
m_aCurrentFilter = _rInitialCurrentFilter;
}
}
@@ -490,7 +490,7 @@ SvtFileDialog* SvtFilePicker::implCreateDialog( Window* _pParent )
SvtFileDialog* dialog = new SvtFileDialog( _pParent, nBits, nExtraBits );
// Set StandardDir if present
- if ( m_aStandardDir.getLength() > 0)
+ if ( !m_aStandardDir.isEmpty())
{
String sStandardDir = String( m_aStandardDir );
dialog->SetStandardDir( sStandardDir );
@@ -1081,7 +1081,7 @@ void SAL_CALL SvtFilePicker::initialize( const Sequence< Any >& _rArguments )
namedValue.Value >>= sStandardDir;
// Set the directory for the "back to the default dir" button
- if ( sStandardDir.getLength() > 0 )
+ if ( !sStandardDir.isEmpty() )
{
m_aStandardDir = sStandardDir;
}
diff --git a/fpicker/source/office/OfficeFolderPicker.cxx
b/fpicker/source/office/OfficeFolderPicker.cxx
index a43311b..74dd316 100644
--- a/fpicker/source/office/OfficeFolderPicker.cxx
+++ b/fpicker/source/office/OfficeFolderPicker.cxx
@@ -133,7 +133,7 @@ sal_Int16 SvtFolderPicker::implExecutePicker( )
void SvtFolderPicker::prepareExecute()
{
// set the default directory
- if ( m_aDisplayDirectory.getLength() > 0 )
+ if ( !m_aDisplayDirectory.isEmpty() )
getDialog()->SetPath( m_aDisplayDirectory );
else
{
diff --git a/fpicker/source/office/commonpicker.cxx b/fpicker/source/office/commonpicker.cxx
index e6a5f22..df317e4 100644
--- a/fpicker/source/office/commonpicker.cxx
+++ b/fpicker/source/office/commonpicker.cxx
@@ -112,7 +112,7 @@ namespace svt
createPicker();
// set the title
- if ( m_aTitle.getLength() > 0 )
+ if ( !m_aTitle.isEmpty() )
getDialog()->SetText( m_aTitle );
}
@@ -218,7 +218,7 @@ namespace svt
if ( m_pDlg )
{
// synchronize the help id of the dialog with out help URL property
- if ( m_sHelpURL.getLength() )
+ if ( !m_sHelpURL.isEmpty() )
{ // somebody already set the help URL while we had no dialog yet
OControlAccess::setHelpURL( m_pDlg, m_sHelpURL, sal_False );
}
@@ -445,7 +445,7 @@ namespace svt
{
if ( *pArgument >>= aPropArg )
{
- if ( aPropArg.Name.getLength() <= 0)
+ if ( aPropArg.Name.isEmpty())
continue;
sSettingName = aPropArg.Name;
@@ -453,7 +453,7 @@ namespace svt
}
else if ( *pArgument >>= aPairArg )
{
- if ( aPairArg.Name.getLength() <= 0)
+ if ( aPairArg.Name.isEmpty())
continue;
sSettingName = aPairArg.Name;
diff --git a/fpicker/source/office/fpsmartcontent.cxx b/fpicker/source/office/fpsmartcontent.cxx
index 8fe9eaf..49692ac 100644
--- a/fpicker/source/office/fpsmartcontent.cxx
+++ b/fpicker/source/office/fpsmartcontent.cxx
@@ -158,7 +158,7 @@ namespace svt
m_eState = INVALID; // default to INVALID
m_sURL = _rURL;
- if ( m_sURL.getLength() )
+ if ( !m_sURL.isEmpty() )
{
try
{
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 9f09353..e1c4c2a 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -384,7 +384,7 @@ namespace
_rValue = ::rtl::OUString();
::rtl::OUString sEnvName = ::rtl::OUString::createFromAscii( _pAsciiEnvName );
osl_getEnvironment( sEnvName.pData, &_rValue.pData );
- return _rValue.getLength() != 0;
+ return !_rValue.isEmpty();
}
}
--
1.7.5.4
Context
- [Libreoffice] [PATCH] Fix for fdo43460 Part XIX getLength() to isEmpty() · Olivier Hallot
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.