Kaydet (Commit) eda11cbf authored tarafından Julien Nabet's avatar Julien Nabet

Some cppcheck cleaning

Change-Id: I0b9d3b5f8283e2fddc96b220a755ba6bcdd11606
üst 116fdcfa
...@@ -123,14 +123,11 @@ void Desktop::RegisterServices(Reference< XComponentContext > const & context) ...@@ -123,14 +123,11 @@ void Desktop::RegisterServices(Reference< XComponentContext > const & context)
{ {
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::registerServices" ); RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::registerServices" );
// read command line parameters
sal_Bool bHeadlessMode = sal_False;
// interpret command line arguments // interpret command line arguments
CommandLineArgs& rCmdLine = GetCommandLineArgs(); CommandLineArgs& rCmdLine = GetCommandLineArgs();
// Headless mode for FAT Office // Headless mode for FAT Office
bHeadlessMode = rCmdLine.IsHeadless(); sal_Bool bHeadlessMode = rCmdLine.IsHeadless();
if ( bHeadlessMode ) if ( bHeadlessMode )
Application::EnableHeadlessMode(false); Application::EnableHeadlessMode(false);
......
...@@ -40,7 +40,7 @@ namespace dp_gui { ...@@ -40,7 +40,7 @@ namespace dp_gui {
struct UpdateData struct UpdateData
{ {
UpdateData( ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > const & aExt): 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 //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. //for the shared update. However, both list entries will contain the same UpdateData.
......
...@@ -1048,7 +1048,6 @@ sal_Bool SfxDocumentTemplates::SetName( const OUString& rName, sal_uInt16 nRegio ...@@ -1048,7 +1048,6 @@ sal_Bool SfxDocumentTemplates::SetName( const OUString& rName, sal_uInt16 nRegio
return sal_False; return sal_False;
RegionData_Impl *pRegion = pImp->GetRegion( nRegion ); RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
DocTempl_EntryData_Impl *pEntry = NULL;
if ( !pRegion ) if ( !pRegion )
return sal_False; return sal_False;
...@@ -1072,7 +1071,7 @@ sal_Bool SfxDocumentTemplates::SetName( const OUString& rName, sal_uInt16 nRegio ...@@ -1072,7 +1071,7 @@ sal_Bool SfxDocumentTemplates::SetName( const OUString& rName, sal_uInt16 nRegio
} }
else else
{ {
pEntry = pRegion->GetEntry( nIdx ); DocTempl_EntryData_Impl *pEntry = pRegion->GetEntry( nIdx );
if ( !pEntry ) if ( !pEntry )
return sal_False; return sal_False;
......
...@@ -221,14 +221,13 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet) ...@@ -221,14 +221,13 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet)
// Separator Color // Separator Color
SfxObjectShell* pDocSh = SfxObjectShell::Current(); SfxObjectShell* pDocSh = SfxObjectShell::Current();
const SfxPoolItem* pColorItem = NULL;
XColorListRef pColorList; XColorListRef pColorList;
OSL_ENSURE( pDocSh, "DocShell not found!" ); OSL_ENSURE( pDocSh, "DocShell not found!" );
if ( pDocSh ) if ( pDocSh )
{ {
pColorItem = pDocSh->GetItem( SID_COLOR_TABLE ); const SfxPoolItem* pColorItem = pDocSh->GetItem( SID_COLOR_TABLE );
if ( pColorItem != NULL ) if ( pColorItem != NULL )
pColorList = ( (SvxColorListItem*)pColorItem )->GetColorList(); pColorList = ( (SvxColorListItem*)pColorItem )->GetColorList();
} }
......
...@@ -526,11 +526,10 @@ void GraphiteLayout::clear() ...@@ -526,11 +526,10 @@ void GraphiteLayout::clear()
// This method shouldn't be called on windows, since it needs the dc reset // This method shouldn't be called on windows, since it needs the dc reset
bool GraphiteLayout::LayoutText(ImplLayoutArgs & rArgs) bool GraphiteLayout::LayoutText(ImplLayoutArgs & rArgs)
{ {
gr_segment * pSegment = NULL;
bool success = true; bool success = true;
if (rArgs.mnMinCharPos < rArgs.mnEndCharPos) if (rArgs.mnMinCharPos < rArgs.mnEndCharPos)
{ {
pSegment = CreateSegment(rArgs); gr_segment * pSegment = CreateSegment(rArgs);
if (!pSegment) if (!pSegment)
return false; return false;
success = LayoutGlyphs(rArgs, pSegment); success = LayoutGlyphs(rArgs, pSegment);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment