[Libreoffice-commits] core.git: desktop/source sfx2/source sw/source vcl/source
Julien Nabet
serval2412 at yahoo.fr
Wed Feb 20 13:41:07 PST 2013
desktop/source/app/appinit.cxx | 5 +----
desktop/source/deployment/gui/dp_gui_updatedata.hxx | 2 +-
sfx2/source/doc/doctempl.cxx | 3 +--
sw/source/ui/misc/pgfnote.cxx | 3 +--
vcl/source/glyphs/graphite_layout.cxx | 3 +--
5 files changed, 5 insertions(+), 11 deletions(-)
New commits:
commit eda11cbfaf974905183ea10e4ffa89b90a401d98
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Feb 20 22:38:38 2013 +0100
Some cppcheck cleaning
Change-Id: I0b9d3b5f8283e2fddc96b220a755ba6bcdd11606
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index cbb7a32..d16cdcc 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -123,14 +123,11 @@ void Desktop::RegisterServices(Reference< XComponentContext > const & context)
{
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::registerServices" );
- // read command line parameters
- sal_Bool bHeadlessMode = sal_False;
-
// interpret command line arguments
CommandLineArgs& rCmdLine = GetCommandLineArgs();
// Headless mode for FAT Office
- bHeadlessMode = rCmdLine.IsHeadless();
+ sal_Bool bHeadlessMode = rCmdLine.IsHeadless();
if ( bHeadlessMode )
Application::EnableHeadlessMode(false);
diff --git a/desktop/source/deployment/gui/dp_gui_updatedata.hxx b/desktop/source/deployment/gui/dp_gui_updatedata.hxx
index 870227e..d611947 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedata.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedata.hxx
@@ -40,7 +40,7 @@ namespace dp_gui {
struct UpdateData
{
UpdateData( ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > const & aExt):
- bIsShared(false), aInstalledPackage(aExt){};
+ bIsShared(false), aInstalledPackage(aExt), aUpdateSource(NULL), m_nID(0), m_bIgnored(false){};
//When entries added to the listbox then there can be one for the user update and one
//for the shared update. However, both list entries will contain the same UpdateData.
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 9c171ee..4d8ea07 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -1048,7 +1048,6 @@ sal_Bool SfxDocumentTemplates::SetName( const OUString& rName, sal_uInt16 nRegio
return sal_False;
RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
- DocTempl_EntryData_Impl *pEntry = NULL;
if ( !pRegion )
return sal_False;
@@ -1072,7 +1071,7 @@ sal_Bool SfxDocumentTemplates::SetName( const OUString& rName, sal_uInt16 nRegio
}
else
{
- pEntry = pRegion->GetEntry( nIdx );
+ DocTempl_EntryData_Impl *pEntry = pRegion->GetEntry( nIdx );
if ( !pEntry )
return sal_False;
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index 7cb69a4..c369b2b 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -221,14 +221,13 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
// Separator Color
SfxObjectShell* pDocSh = SfxObjectShell::Current();
- const SfxPoolItem* pColorItem = NULL;
XColorListRef pColorList;
OSL_ENSURE( pDocSh, "DocShell not found!" );
if ( pDocSh )
{
- pColorItem = pDocSh->GetItem( SID_COLOR_TABLE );
+ const SfxPoolItem* pColorItem = pDocSh->GetItem( SID_COLOR_TABLE );
if ( pColorItem != NULL )
pColorList = ( (SvxColorListItem*)pColorItem )->GetColorList();
}
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index 7b663bd..5183c71 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -526,11 +526,10 @@ void GraphiteLayout::clear()
// This method shouldn't be called on windows, since it needs the dc reset
bool GraphiteLayout::LayoutText(ImplLayoutArgs & rArgs)
{
- gr_segment * pSegment = NULL;
bool success = true;
if (rArgs.mnMinCharPos < rArgs.mnEndCharPos)
{
- pSegment = CreateSegment(rArgs);
+ gr_segment * pSegment = CreateSegment(rArgs);
if (!pSegment)
return false;
success = LayoutGlyphs(rArgs, pSegment);
More information about the Libreoffice-commits
mailing list