[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - filter/source sc/source sd/source shell/source sw/inc sw/source
Herbert Dürr
hdu at apache.org
Thu May 15 05:08:05 PDT 2014
filter/source/graphicfilter/ipbm/ipbm.cxx | 9 ++++++---
filter/source/graphicfilter/ipcd/ipcd.cxx | 3 ++-
filter/source/graphicfilter/ipcx/ipcx.cxx | 3 ++-
filter/source/graphicfilter/iras/iras.cxx | 3 ++-
filter/source/graphicfilter/itga/itga.cxx | 2 +-
sc/source/ui/view/drawview.cxx | 2 +-
sd/source/ui/view/DocumentRenderer.cxx | 2 +-
shell/source/backends/macbe/macbackend.cxx | 2 +-
sw/inc/unotbl.hxx | 7 ++++---
sw/inc/viewsh.hxx | 5 ++---
sw/source/core/inc/frame.hxx | 6 ++++--
sw/source/core/view/vprint.cxx | 9 ++-------
12 files changed, 28 insertions(+), 25 deletions(-)
New commits:
commit 9915536a74bb1a4e821537015a641f88f701e32b
Author: Herbert Dürr <hdu at apache.org>
Date: Thu May 15 11:31:37 2014 +0000
#i124422# fix default arguments in friend declarations
chapter 8.3.6.4 of the C++11 standard requests that friend declarations must not
specify default unless these declarations are also definitions. Older compilers
still tolerate such constructs that were still undecided until
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#136
but clang>=3.4 or xcode>=5.1 now report errors for such code. The errors break the
build and so they have to be fixed. Cleaner alternatives to the fixes are possible
but for now they are intended to allow the build while being minimally invasive.
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index 56d0aea..d9fdf8b 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -58,11 +58,12 @@ class SwTableCursor;
class SwTableBoxFmt;
class SwChartDataProvider;
class SwFrmFmt;
+class SwXCell;
+void lcl_setString( SwXCell&, const rtl::OUString &rTxt, sal_Bool bKeepNumberFmt = sal_True );
-/* -----------------------------22.09.00 11:10--------------------------------
+// ---------------------------------------------------------------------------
- ---------------------------------------------------------------------------*/
class SwChartEventListenerContainer : public SwEventListenerContainer
{
public:
@@ -87,7 +88,7 @@ class SwXCell : public SwXCellBaseClass,
public SwClient
{
friend void lcl_setString( SwXCell &rCell, const rtl::OUString &rTxt,
- sal_Bool bKeepNumberFmt = sal_False );
+ sal_Bool bKeepNumberFmt );
friend double lcl_getValue( SwXCell &rCell );
friend void lcl_setValue( SwXCell &rCell, double nVal );
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index e67b9a0..62ed7e8 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -110,9 +110,8 @@ class SW_DLLPUBLIC ViewShell : public Ring
// OD 12.12.2002 #103492# - for setting visible area for page preview paint
friend class SwPagePreviewLayout;
- //Umsetzen der SwVisArea, damit vor dem Drucken sauber formatiert
- //werden kann.
- friend void SetSwVisArea( ViewShell *pSh, const SwRect &, sal_Bool bPDFExport = sal_False );
+ // setting the SwVisArea is used to get a clean formatting before printing
+ friend void SetSwVisArea( ViewShell*, const SwRect& /*, sal_Bool bPDFExport = sal_False */ );
// --> PB 2007-05-30 #146850#
static BitmapEx* pReplaceBmp; // replaced display of still loaded images
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 861b8d7..7c4d2b0 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -142,6 +142,8 @@ typedef void (SwFrm:: *SwFrmMakePos)( const SwFrm*, const SwFrm*, sal_Bool );
typedef long (*SwOperator)( long, long );
typedef void (SwFrm:: *SwFrmSet)( long, long );
+SwFrm* SaveCntnt( SwLayoutFrm*, SwFrm* pStart = NULL );
+
struct SwRectFnCollection
{
SwRectGet fnGetTop;
@@ -279,8 +281,8 @@ class SwFrm: public SwClient, public SfxBroadcaster
friend class SwLooping; // LoopControlling (layouter.cxx)
//Hebt die Lower waehrend eines Spaltenumbaus auf.
- friend SwFrm *SaveCntnt( SwLayoutFrm *, SwFrm* pStart = NULL );
- friend void RestoreCntnt( SwFrm *, SwLayoutFrm *, SwFrm *pSibling, bool bGrow );
+ friend SwFrm *SaveCntnt( SwLayoutFrm*, SwFrm* pStart );
+ friend void RestoreCntnt( SwFrm *, SwLayoutFrm *, SwFrm *pSibling, bool bGrow );
#if OSL_DEBUG_LEVEL > 1
//entfernt leere SwSectionFrms aus einer Kette
diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx
index 0f63ebf..83cd7b1 100644
--- a/sw/source/core/view/vprint.cxx
+++ b/sw/source/core/view/vprint.cxx
@@ -190,14 +190,9 @@ void SwPaintQueue::Remove( ViewShell *pSh )
}
}
-/******************************************************************************
- * Methode : void SetSwVisArea( ViewShell *pSh, Point aPrtOffset, ...
- * Beschreibung:
- * Erstellt : OK 04.11.94 16:27
- * Aenderung :
- ******************************************************************************/
+// ******************************************************************************
-void SetSwVisArea( ViewShell *pSh, const SwRect &rRect, sal_Bool /*bPDFExport*/ )
+void SetSwVisArea( ViewShell *pSh, const SwRect &rRect /*, sal_Bool bPDFExport*/ )
{
ASSERT( !pSh->GetWin(), "Drucken mit Window?" );
pSh->aVisArea = rRect;
commit ea26e7c8dc51192aff7cd89ae5f12669d0f1ef4a
Author: Herbert Dürr <hdu at apache.org>
Date: Thu May 15 11:14:25 2014 +0000
#i124422# fix implicit conversions to pointer from bool/int32
implicit conversions from bool or int32 to pointer types are not a good idea
and clang>=3.4 or xcode>=5.1 now report errors for such code. The errors break
the build and so they have to be fixed.
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index d539a84..768e32b 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -1011,7 +1011,7 @@ SdrObject* ScDrawView::ApplyGraphicToObject(
return &rHitObject;
}
- return false;
+ return NULL;
}
// eof
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 8b2fcf4..cea5308 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -115,7 +115,7 @@ namespace {
bool IsHandoutHorizontal (void) const
{
- return GetBoolValue("SlidesPerPageOrder", sal_Int32(0), true);
+ return GetBoolValue("SlidesPerPageOrder", NULL, true);
}
sal_Int32 GetHandoutPageCount (void) const
diff --git a/shell/source/backends/macbe/macbackend.cxx b/shell/source/backends/macbe/macbackend.cxx
index 73b6d1d..48b8ca4 100644
--- a/shell/source/backends/macbe/macbackend.cxx
+++ b/shell/source/backends/macbe/macbackend.cxx
@@ -412,7 +412,7 @@ css::uno::Any MacOSXBackend::getPropertyValue(
CFDictionaryRef rProxyDict = SCDynamicStoreCopyProxies(NULL);
if (!rProxyDict)
- rExceptionsList = false;
+ rExceptionsList = nil;
else
rExceptionsList = (CFArrayRef) CFDictionaryGetValue(rProxyDict, kSCPropNetProxiesExceptionsList);
commit 276ee5d5d31e40fc0fa97465091811a2d3a91e50
Author: Herbert Dürr <hdu at apache.org>
Date: Thu May 15 11:08:41 2014 +0000
#i124422# fix comparisons between pointers and bools or integers
comparing pointers with bools or integers is not a good idea and
clang>=3.4 or xcode>=5.1 now report errors for such code. The
errors break the build and so they have to be fixed.
diff --git a/filter/source/graphicfilter/ipbm/ipbm.cxx b/filter/source/graphicfilter/ipbm/ipbm.cxx
index b8ca0d1..a25a54f 100644
--- a/filter/source/graphicfilter/ipbm/ipbm.cxx
+++ b/filter/source/graphicfilter/ipbm/ipbm.cxx
@@ -107,7 +107,8 @@ sal_Bool PBMReader::ReadPBM( SvStream & rPBM, Graphic & rGraphic )
{
case 0 :
maBmp = Bitmap( Size( mnWidth, mnHeight ), 1 );
- if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == sal_False )
+ mpAcc = maBmp.AcquireWriteAccess();
+ if ( !mpAcc )
return sal_False;
mpAcc->SetPaletteEntryCount( 2 );
mpAcc->SetPaletteColor( 0, BitmapColor( 0xff, 0xff, 0xff ) );
@@ -122,7 +123,8 @@ sal_Bool PBMReader::ReadPBM( SvStream & rPBM, Graphic & rGraphic )
else
maBmp = Bitmap( Size( mnWidth, mnHeight ), 8);
- if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == sal_False )
+ mpAcc = maBmp.AcquireWriteAccess();
+ if ( !mpAcc )
return sal_False;
mnCol = (sal_uInt16)mnMaxVal + 1;
if ( mnCol > 256 )
@@ -137,7 +139,8 @@ sal_Bool PBMReader::ReadPBM( SvStream & rPBM, Graphic & rGraphic )
break;
case 2 :
maBmp = Bitmap( Size( mnWidth, mnHeight ), 24 );
- if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == sal_False )
+ mpAcc = maBmp.AcquireWriteAccess();
+ if ( !mpAcc )
return sal_False;
break;
}
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index 58b6c64..ec65b26 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -155,7 +155,8 @@ sal_Bool PCDReader::ReadPCD( SvStream & rPCD, Graphic & rGraphic, FilterConfigIt
nBMPHeight = nWidth;
}
aBmp = Bitmap( Size( nBMPWidth, nBMPHeight ), 24 );
- if ( ( mpAcc = aBmp.AcquireWriteAccess() ) == sal_False )
+ mpAcc = aBmp.AcquireWriteAccess();
+ if ( !mpAcc )
return sal_False;
ReadImage( 5 ,65 );
diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx
index 6f3340e..dd25dce 100644
--- a/filter/source/graphicfilter/ipcx/ipcx.cxx
+++ b/filter/source/graphicfilter/ipcx/ipcx.cxx
@@ -114,7 +114,8 @@ sal_Bool PCXReader::ReadPCX( SvStream & rPCX, Graphic & rGraphic )
if ( nStatus )
{
aBmp = Bitmap( Size( nWidth, nHeight ), nDestBitsPerPixel );
- if ( ( pAcc = aBmp.AcquireWriteAccess() ) == sal_False )
+ pAcc = aBmp.AcquireWriteAccess();
+ if ( !pAcc )
return sal_False;
if ( nDestBitsPerPixel <= 8 )
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index 7efafda..48224e7 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -103,7 +103,8 @@ sal_Bool RASReader::ReadRAS( SvStream & rRAS, Graphic & rGraphic )
return sal_False;
maBmp = Bitmap( Size( mnWidth, mnHeight ), mnDstBitsPerPix );
- if ( ( mpAcc = maBmp.AcquireWriteAccess() ) == sal_False )
+ mpAcc = maBmp.AcquireWriteAccess();
+ if ( !mpAcc )
return sal_False;
if ( mnDstBitsPerPix <= 8 ) // paletten bildchen
diff --git a/filter/source/graphicfilter/itga/itga.cxx b/filter/source/graphicfilter/itga/itga.cxx
index 7e51d82..7243fa9 100644
--- a/filter/source/graphicfilter/itga/itga.cxx
+++ b/filter/source/graphicfilter/itga/itga.cxx
@@ -685,7 +685,7 @@ sal_Bool TGAReader::ImplReadPalette()
mpFileHeader->nColorMapEntrySize = 0x3f; // patch for the following switch routine
}
mpColorMap = new sal_uInt32[ nColors ]; // we will always index dwords
- if ( mpColorMap == sal_False )
+ if ( !mpColorMap ) // NOTE: check for new-result==NULL because exceptions are disabled in this module
return sal_False; // out of memory %&!$&/!"�$
switch( mpFileHeader->nColorMapEntrySize )
More information about the Libreoffice-commits
mailing list