[Libreoffice-commits] .: 4 commits - basic/source desktop/source editeng/source xmloff/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Jan 18 04:11:59 PST 2011
basic/source/app/dialogs.cxx | 6 +++---
basic/source/app/dialogs.hxx | 2 +-
desktop/source/deployment/registry/package/dp_package.cxx | 3 ++-
editeng/source/outliner/outliner.cxx | 2 --
xmloff/source/text/txtfldi.cxx | 12 ++++--------
5 files changed, 10 insertions(+), 15 deletions(-)
New commits:
commit 0a8149b7e317b9f6d666f4fbcb649f9301da3581
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 18 12:11:52 2011 +0000
don't pushback and process a corrupt extension
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index f31cf3f..9cbbf83 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -1618,7 +1618,8 @@ BackendImpl::PackageImpl::getPackagesFromDb(
Reference<deployment::XPackage> xExtension =
bindBundleItem(i->first, i->second, true, m_identifier, xCmdEnv);
OSL_ASSERT(xExtension.is());
- retVector.push_back(xExtension);
+ if (xExtension.is())
+ retVector.push_back(xExtension);
}
return retVector;
commit 543d896b1341e3ee71d414bbfffc294a1f1318e3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 18 11:21:06 2011 +0000
drop this redundant comment
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 5896d34..6188d68 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2198,8 +2198,6 @@ sal_Bool DrawPortionInfo::IsRTL() const
ubidi_setPara(pBidi, reinterpret_cast<const UChar *>(mrText.GetBuffer()), mrText.Len(), nDefaultDir, NULL, &nError); // UChar != sal_Unicode in MinGW
nError = U_ZERO_ERROR;
-// sal_Int32 nCount(ubidi_countRuns(pBidi, &nError));
-
int32_t nStart(0);
int32_t nEnd;
UBiDiLevel nCurrDir;
commit 5ad8604d671b29c92bdef3021ea7e259f39b97cb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 18 10:59:00 2011 +0000
Use the foolproof checked macro for this
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 9413362..fe88352 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2800,23 +2800,19 @@ void XMLMacroFieldImportContext::PrepareField(
sal_Int32 nLength = aValues.getLength();
for( sal_Int32 i = 0; i < nLength; i++ )
{
- if ( aValues[i].Name.equalsAsciiL( "ScriptType",
- sizeof("ScriptType")-1 ) )
+ if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ScriptType")) )
{
// ignore ScriptType
}
- else if ( aValues[i].Name.equalsAsciiL( "Library",
- sizeof("Library")-1 ) )
+ else if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Library")) )
{
aValues[i].Value >>= sLibraryName;
}
- else if ( aValues[i].Name.equalsAsciiL( "MacroName",
- sizeof("MacroName")-1 ) )
+ else if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MacroName")) )
{
aValues[i].Value >>= sMacroName;
}
- if ( aValues[i].Name.equalsAsciiL( "Script",
- sizeof("Script")-1 ) )
+ if ( aValues[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Script")) )
{
aValues[i].Value >>= sScriptURL;
}
commit 89e4950480114e1799984d140b7c5d018687e0ff
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Jan 18 10:55:43 2011 +0000
cppcheck: pass by reference
diff --git a/basic/source/app/dialogs.cxx b/basic/source/app/dialogs.cxx
index cf5cfe2..cf459af 100644
--- a/basic/source/app/dialogs.cxx
+++ b/basic/source/app/dialogs.cxx
@@ -817,12 +817,12 @@ void GenericOptions::LoadData()
LINK( this, GenericOptions, LoadGroup ).Call( NULL );
}
-void GenericOptions::ShowSelectPath( const String aType )
+void GenericOptions::ShowSelectPath( const String &rType )
{
Point aNPos = aPbNewValue.GetPosPixel();
Point aDPos = aPbDelValue.GetPosPixel();
long nDelta = aDPos.Y() - aNPos.Y();
- if ( aType.EqualsIgnoreCaseAscii( "PATH" ) && !bShowSelectPath )
+ if ( rType.EqualsIgnoreCaseAscii( "PATH" ) && !bShowSelectPath )
{ // Show Path button
nMoveButtons += nDelta;
aMoveTimer.Start();
@@ -830,7 +830,7 @@ void GenericOptions::ShowSelectPath( const String aType )
aPbSelectPath.Show( TRUE );
aPbSelectPath.Enable( TRUE );
}
- else if ( !aType.EqualsIgnoreCaseAscii( "PATH" ) && bShowSelectPath )
+ else if ( !rType.EqualsIgnoreCaseAscii( "PATH" ) && bShowSelectPath )
{ // Hide Path button
nMoveButtons -= nDelta;
aMoveTimer.Start();
diff --git a/basic/source/app/dialogs.hxx b/basic/source/app/dialogs.hxx
index abae90c..48d2d8c 100644
--- a/basic/source/app/dialogs.hxx
+++ b/basic/source/app/dialogs.hxx
@@ -273,7 +273,7 @@ class GenericOptions : public TabPage
StringList* GetAllGroups();
void LoadData();
- void ShowSelectPath( const String aType );
+ void ShowSelectPath( const String& rType );
DECL_LINK( LoadGroup, ComboBox* );
DECL_LINK( DelGroup, Button* );
More information about the Libreoffice-commits
mailing list