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)
{
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);
......
......@@ -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.
......
......@@ -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;
......
......@@ -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();
}
......
......@@ -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);
......
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