You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by da...@apache.org on 2023/01/20 18:31:50 UTC

[openoffice] branch trunk updated: Allow us to build against the C++14 standard, while not breaking compatibility with C++98.

This is an automated email from the ASF dual-hosted git repository.

damjan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new a72d41dcd0 Allow us to build against the C++14 standard, while not breaking compatibility with C++98.
a72d41dcd0 is described below

commit a72d41dcd002e8c9b3d75696f0625302690e2d65
Author: Damjan Jovanovic <da...@apache.org>
AuthorDate: Fri Jan 20 05:27:59 2023 +0200

    Allow us to build against the C++14 standard, while
    not breaking compatibility with C++98.
    
    Clang 13 and 15 on FreeBSD can successfully compile OpenOffice
    when "-std=c++14" is set in gbuild and dmake, and Clang 15 can
    still compile it with these changes and "-std=gnu++98".
    
    Most of the changes involved fixing bad code, eg. NULL being
    implicitly converted to sal_False, NULL being converted to typed
    pointers using reinterpet_cast instead of static_cast, and integer
    conversions to shorter integers.
    
    Note that this does not change the currently targeted C++
    standard on Linux and FreeBSD, which remains gnu++98.
    
    Patch by: me
---
 .../source/cairo/cairo_spritecanvashelper.cxx      |  3 +-
 main/canvas/source/vcl/spritecanvashelper.cxx      |  7 ++-
 main/dbaccess/source/core/api/RowSet.cxx           | 64 +++++++++++-----------
 main/dbaccess/source/core/api/TableDeco.cxx        |  2 +-
 main/dbaccess/source/ui/browser/sbagrid.cxx        |  2 +-
 .../source/ui/tabledesign/TableController.cxx      |  3 +-
 main/forms/source/component/ComboBox.cxx           |  2 +-
 main/forms/source/component/ListBox.cxx            |  6 +-
 main/forms/source/inc/property.hxx                 |  4 +-
 .../source/core/api/ReportDefinition.cxx           |  3 +-
 .../source/ui/report/ReportController.cxx          |  2 +-
 main/sc/source/ui/app/scdll.cxx                    |  2 +-
 main/sc/source/ui/pagedlg/scuitphfedit.cxx         |  2 +-
 main/sd/source/ui/app/sddll2.cxx                   |  2 +-
 .../source/engine/activities/activitybase.hxx      |  2 +-
 .../source/engine/rehearsetimingsactivity.cxx      |  3 +-
 .../slideshow/source/engine/shapes/appletshape.cxx |  6 +-
 main/slideshow/source/engine/shapes/drawshape.cxx  |  4 +-
 main/slideshow/source/engine/shapes/mediashape.cxx |  3 +-
 main/slideshow/source/engine/unoviewcontainer.cxx  |  3 +-
 main/sw/source/ui/app/swmodule.cxx                 |  4 +-
 main/vcl/unx/gtk/a11y/atkutil.cxx                  |  4 +-
 main/vcl/unx/gtk/a11y/atkwindow.cxx                |  4 +-
 23 files changed, 73 insertions(+), 64 deletions(-)

diff --git a/main/canvas/source/cairo/cairo_spritecanvashelper.cxx b/main/canvas/source/cairo/cairo_spritecanvashelper.cxx
index 63b7f775fb..573263b445 100644
--- a/main/canvas/source/cairo/cairo_spritecanvashelper.cxx
+++ b/main/canvas/source/cairo/cairo_spritecanvashelper.cxx
@@ -390,11 +390,12 @@ namespace cairocanvas
         ::basegfx::computeSetDifference( aUncoveredAreas,
                                          rUpdateArea.maTotalBounds,
                                          ::basegfx::B2DRange( rDestRect ) );
+        SurfaceSharedPtr pBufferSurface = mpOwningSpriteCanvas->getBufferSurface();
         ::std::for_each( aUncoveredAreas.begin(),
                          aUncoveredAreas.end(),
                          ::boost::bind( &repaintBackground,
                                         boost::cref(pCompositingCairo),
-                                        boost::cref(mpOwningSpriteCanvas->getBufferSurface()),
+                                        boost::cref(pBufferSurface),
                                         _1 ) );
 
         cairo_rectangle( pWindowCairo.get(), 0, 0, rSize.getX(), rSize.getY() );
diff --git a/main/canvas/source/vcl/spritecanvashelper.cxx b/main/canvas/source/vcl/spritecanvashelper.cxx
index a444e5bea7..3b1b75d158 100644
--- a/main/canvas/source/vcl/spritecanvashelper.cxx
+++ b/main/canvas/source/vcl/spritecanvashelper.cxx
@@ -463,10 +463,11 @@ namespace vclcanvas
             // clip here, since we're only repainting _parts_ of the
             // sprite
             rOutDev.Push( PUSH_CLIPREGION );
+            const Sprite::Reference& rSprite = aFirst->second.getSprite();
             ::std::for_each( aUnscrollableAreas.begin(),
                              aUnscrollableAreas.end(),
                              ::boost::bind( &opaqueUpdateSpriteArea,
-                                            ::boost::cref(aFirst->second.getSprite()),
+                                            ::boost::cref(rSprite),
                                             ::boost::ref(rOutDev),
                                             _1 ) );
             rOutDev.Pop();
@@ -584,12 +585,12 @@ namespace vclcanvas
         
         // repaint all affected sprites on top of background into
         // VDev.
+        ::basegfx::B2DPoint aPoint = ::vcl::unotools::b2DPointFromPoint(aOutputPosition);
         ::std::for_each( rSortedUpdateSprites.begin(),
                          rSortedUpdateSprites.end(),
                          ::boost::bind( &spriteRedrawStub2,
                                         ::boost::ref( maVDev.get() ),
-                                        ::boost::cref(
-                                            ::vcl::unotools::b2DPointFromPoint(aOutputPosition)),
+                                        ::boost::cref( aPoint ),
                                         _1 ) );
 
         // flush to screen
diff --git a/main/dbaccess/source/core/api/RowSet.cxx b/main/dbaccess/source/core/api/RowSet.cxx
index 65a87bdead..cd87ab9308 100644
--- a/main/dbaccess/source/core/api/RowSet.cxx
+++ b/main/dbaccess/source/core/api/RowSet.cxx
@@ -179,45 +179,45 @@ ORowSet::ORowSet( const Reference< ::com::sun::star::lang::XMultiServiceFactory
     m_aPrematureParamValues.get().resize( 0 );
 
 	// sdb.RowSet Properties
-	registerMayBeVoidProperty(PROPERTY_ACTIVE_CONNECTION,PROPERTY_ID_ACTIVE_CONNECTION,	PropertyAttribute::MAYBEVOID|PropertyAttribute::TRANSIENT|PropertyAttribute::BOUND,	&m_aActiveConnection,	::getCppuType(reinterpret_cast< Reference< XConnection >* >(NULL)));
-	registerProperty(PROPERTY_DATASOURCENAME,		PROPERTY_ID_DATASOURCENAME,			PropertyAttribute::BOUND,		&m_aDataSourceName,		::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
-	registerProperty(PROPERTY_COMMAND,				PROPERTY_ID_COMMAND,				PropertyAttribute::BOUND,		&m_aCommand,			::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
-	registerProperty(PROPERTY_COMMAND_TYPE,			PROPERTY_ID_COMMAND_TYPE,			PropertyAttribute::BOUND,		&m_nCommandType,		::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
-	registerProperty(PROPERTY_ACTIVECOMMAND,		PROPERTY_ID_ACTIVECOMMAND,			nRBT,							&m_aActiveCommand,		::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+	registerMayBeVoidProperty(PROPERTY_ACTIVE_CONNECTION,PROPERTY_ID_ACTIVE_CONNECTION,	PropertyAttribute::MAYBEVOID|PropertyAttribute::TRANSIENT|PropertyAttribute::BOUND,	&m_aActiveConnection,	::getCppuType(static_cast< Reference< XConnection >* >(NULL)));
+	registerProperty(PROPERTY_DATASOURCENAME,		PROPERTY_ID_DATASOURCENAME,			PropertyAttribute::BOUND,		&m_aDataSourceName,		::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
+	registerProperty(PROPERTY_COMMAND,				PROPERTY_ID_COMMAND,				PropertyAttribute::BOUND,		&m_aCommand,			::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
+	registerProperty(PROPERTY_COMMAND_TYPE,			PROPERTY_ID_COMMAND_TYPE,			PropertyAttribute::BOUND,		&m_nCommandType,		::getCppuType(static_cast< sal_Int32*>(NULL)));
+	registerProperty(PROPERTY_ACTIVECOMMAND,		PROPERTY_ID_ACTIVECOMMAND,			nRBT,							&m_aActiveCommand,		::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
 	registerProperty(PROPERTY_IGNORERESULT,			PROPERTY_ID_IGNORERESULT,			PropertyAttribute::BOUND,		&m_bIgnoreResult,		::getBooleanCppuType());
-	registerProperty(PROPERTY_FILTER,				PROPERTY_ID_FILTER,					PropertyAttribute::BOUND,		&m_aFilter,				::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
-	registerProperty(PROPERTY_HAVING_CLAUSE,		PROPERTY_ID_HAVING_CLAUSE,			PropertyAttribute::BOUND,		&m_aHavingClause,		::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
-	registerProperty(PROPERTY_GROUP_BY,				PROPERTY_ID_GROUP_BY,				PropertyAttribute::BOUND,		&m_aGroupBy,			::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+	registerProperty(PROPERTY_FILTER,				PROPERTY_ID_FILTER,					PropertyAttribute::BOUND,		&m_aFilter,				::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
+	registerProperty(PROPERTY_HAVING_CLAUSE,		PROPERTY_ID_HAVING_CLAUSE,			PropertyAttribute::BOUND,		&m_aHavingClause,		::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
+	registerProperty(PROPERTY_GROUP_BY,				PROPERTY_ID_GROUP_BY,				PropertyAttribute::BOUND,		&m_aGroupBy,			::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
 	registerProperty(PROPERTY_APPLYFILTER,			PROPERTY_ID_APPLYFILTER,			PropertyAttribute::BOUND,		&m_bApplyFilter,		::getBooleanCppuType());
-	registerProperty(PROPERTY_ORDER,				PROPERTY_ID_ORDER,					PropertyAttribute::BOUND,		&m_aOrder,				::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
-	registerProperty(PROPERTY_PRIVILEGES,			PROPERTY_ID_PRIVILEGES,				nRT,							&m_nPrivileges,			::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
+	registerProperty(PROPERTY_ORDER,				PROPERTY_ID_ORDER,					PropertyAttribute::BOUND,		&m_aOrder,				::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
+	registerProperty(PROPERTY_PRIVILEGES,			PROPERTY_ID_PRIVILEGES,				nRT,							&m_nPrivileges,			::getCppuType(static_cast< sal_Int32*>(NULL)));
 	registerProperty(PROPERTY_ISMODIFIED,			PROPERTY_ID_ISMODIFIED,				nBT,							&m_bModified,			::getBooleanCppuType());
 	registerProperty(PROPERTY_ISNEW,				PROPERTY_ID_ISNEW,					nRBT,							&m_bNew,				::getBooleanCppuType());
-    registerProperty(PROPERTY_SINGLESELECTQUERYCOMPOSER,PROPERTY_ID_SINGLESELECTQUERYCOMPOSER,	nRT,	                &m_xComposer,	::getCppuType(reinterpret_cast< Reference< XSingleSelectQueryComposer >* >(NULL)));
+    registerProperty(PROPERTY_SINGLESELECTQUERYCOMPOSER,PROPERTY_ID_SINGLESELECTQUERYCOMPOSER,	nRT,	                &m_xComposer,	::getCppuType(static_cast< Reference< XSingleSelectQueryComposer >* >(NULL)));
 
 	// sdbcx.ResultSet Properties
 	registerProperty(PROPERTY_ISBOOKMARKABLE,		PROPERTY_ID_ISBOOKMARKABLE,			nRT,							&m_bIsBookmarable,		::getBooleanCppuType());
 	registerProperty(PROPERTY_CANUPDATEINSERTEDROWS,PROPERTY_ID_CANUPDATEINSERTEDROWS,	nRT,							&m_bCanUpdateInsertedRows,		::getBooleanCppuType());
 	// sdbc.ResultSet Properties
-	registerProperty(PROPERTY_RESULTSETCONCURRENCY,	PROPERTY_ID_RESULTSETCONCURRENCY,	PropertyAttribute::TRANSIENT,	&m_nResultSetConcurrency,::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
-	registerProperty(PROPERTY_RESULTSETTYPE,		PROPERTY_ID_RESULTSETTYPE,			PropertyAttribute::TRANSIENT,	&m_nResultSetType,		::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
-	registerProperty(PROPERTY_FETCHDIRECTION,		PROPERTY_ID_FETCHDIRECTION,			PropertyAttribute::TRANSIENT,	&m_nFetchDirection,		::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
-	registerProperty(PROPERTY_FETCHSIZE,			PROPERTY_ID_FETCHSIZE,				PropertyAttribute::TRANSIENT,	&m_nFetchSize,			::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
+	registerProperty(PROPERTY_RESULTSETCONCURRENCY,	PROPERTY_ID_RESULTSETCONCURRENCY,	PropertyAttribute::TRANSIENT,	&m_nResultSetConcurrency,::getCppuType(static_cast< sal_Int32*>(NULL)));
+	registerProperty(PROPERTY_RESULTSETTYPE,		PROPERTY_ID_RESULTSETTYPE,			PropertyAttribute::TRANSIENT,	&m_nResultSetType,		::getCppuType(static_cast< sal_Int32*>(NULL)));
+	registerProperty(PROPERTY_FETCHDIRECTION,		PROPERTY_ID_FETCHDIRECTION,			PropertyAttribute::TRANSIENT,	&m_nFetchDirection,		::getCppuType(static_cast< sal_Int32*>(NULL)));
+	registerProperty(PROPERTY_FETCHSIZE,			PROPERTY_ID_FETCHSIZE,				PropertyAttribute::TRANSIENT,	&m_nFetchSize,			::getCppuType(static_cast< sal_Int32*>(NULL)));
 
 	// sdbc.RowSet Properties
-	registerProperty(PROPERTY_URL,					PROPERTY_ID_URL,					0,								&m_aURL,				::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
-	registerProperty(PROPERTY_TRANSACTIONISOLATION,	PROPERTY_ID_TRANSACTIONISOLATION,	PropertyAttribute::TRANSIENT,	&m_nTransactionIsolation,::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
-	registerMayBeVoidProperty(PROPERTY_TYPEMAP,		PROPERTY_ID_TYPEMAP,				PropertyAttribute::MAYBEVOID|PropertyAttribute::TRANSIENT,	&m_aTypeMap,			::getCppuType(reinterpret_cast< Reference< XNameAccess >* >(NULL)));
+	registerProperty(PROPERTY_URL,					PROPERTY_ID_URL,					0,								&m_aURL,				::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
+	registerProperty(PROPERTY_TRANSACTIONISOLATION,	PROPERTY_ID_TRANSACTIONISOLATION,	PropertyAttribute::TRANSIENT,	&m_nTransactionIsolation,::getCppuType(static_cast< sal_Int32*>(NULL)));
+	registerMayBeVoidProperty(PROPERTY_TYPEMAP,		PROPERTY_ID_TYPEMAP,				PropertyAttribute::MAYBEVOID|PropertyAttribute::TRANSIENT,	&m_aTypeMap,			::getCppuType(static_cast< Reference< XNameAccess >* >(NULL)));
 	registerProperty(PROPERTY_ESCAPE_PROCESSING,PROPERTY_ID_ESCAPE_PROCESSING,	PropertyAttribute::BOUND,       &m_bUseEscapeProcessing,::getBooleanCppuType()	);
-	registerProperty(PROPERTY_QUERYTIMEOUT,			PROPERTY_ID_QUERYTIMEOUT,			PropertyAttribute::TRANSIENT,	&m_nQueryTimeOut,		::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
-	registerProperty(PROPERTY_MAXFIELDSIZE,			PROPERTY_ID_MAXFIELDSIZE,			PropertyAttribute::TRANSIENT,	&m_nMaxFieldSize,		::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
-	registerProperty(PROPERTY_MAXROWS,				PROPERTY_ID_MAXROWS,				0,								&m_nMaxRows,			::getCppuType(reinterpret_cast< sal_Int32*>(NULL)) );
-	registerProperty(PROPERTY_USER,					PROPERTY_ID_USER,					PropertyAttribute::TRANSIENT,	&m_aUser,				::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
-	registerProperty(PROPERTY_PASSWORD,				PROPERTY_ID_PASSWORD,				PropertyAttribute::TRANSIENT,	&m_aPassword,			::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+	registerProperty(PROPERTY_QUERYTIMEOUT,			PROPERTY_ID_QUERYTIMEOUT,			PropertyAttribute::TRANSIENT,	&m_nQueryTimeOut,		::getCppuType(static_cast< sal_Int32*>(NULL)));
+	registerProperty(PROPERTY_MAXFIELDSIZE,			PROPERTY_ID_MAXFIELDSIZE,			PropertyAttribute::TRANSIENT,	&m_nMaxFieldSize,		::getCppuType(static_cast< sal_Int32*>(NULL)));
+	registerProperty(PROPERTY_MAXROWS,				PROPERTY_ID_MAXROWS,				0,								&m_nMaxRows,			::getCppuType(static_cast< sal_Int32*>(NULL)) );
+	registerProperty(PROPERTY_USER,					PROPERTY_ID_USER,					PropertyAttribute::TRANSIENT,	&m_aUser,				::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
+	registerProperty(PROPERTY_PASSWORD,				PROPERTY_ID_PASSWORD,				PropertyAttribute::TRANSIENT,	&m_aPassword,			::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
 
-	registerProperty(PROPERTY_UPDATE_CATALOGNAME,	PROPERTY_ID_UPDATE_CATALOGNAME,		PropertyAttribute::BOUND,		&m_aUpdateCatalogName,	::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
-	registerProperty(PROPERTY_UPDATE_SCHEMANAME,	PROPERTY_ID_UPDATE_SCHEMANAME,		PropertyAttribute::BOUND,		&m_aUpdateSchemaName,	::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
-	registerProperty(PROPERTY_UPDATE_TABLENAME,		PROPERTY_ID_UPDATE_TABLENAME,		PropertyAttribute::BOUND,		&m_aUpdateTableName,	::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+	registerProperty(PROPERTY_UPDATE_CATALOGNAME,	PROPERTY_ID_UPDATE_CATALOGNAME,		PropertyAttribute::BOUND,		&m_aUpdateCatalogName,	::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
+	registerProperty(PROPERTY_UPDATE_SCHEMANAME,	PROPERTY_ID_UPDATE_SCHEMANAME,		PropertyAttribute::BOUND,		&m_aUpdateSchemaName,	::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
+	registerProperty(PROPERTY_UPDATE_TABLENAME,		PROPERTY_ID_UPDATE_TABLENAME,		PropertyAttribute::BOUND,		&m_aUpdateTableName,	::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
 }
 
 ORowSet::~ORowSet()
@@ -2879,12 +2879,12 @@ ORowSetClone::ORowSetClone( const ::comphelper::ComponentContext& _rContext, ORo
 	sal_Int32 nRT	= PropertyAttribute::READONLY	| PropertyAttribute::TRANSIENT;
 
 	// sdb.RowSet Properties
-	//	registerProperty(PROPERTY_CURSORNAME,		PROPERTY_ID_CURSORNAME,			PropertyAttribute::READONLY,		&m_aDataSourceName,		::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
-    registerMayBeVoidProperty(PROPERTY_ACTIVE_CONNECTION,PROPERTY_ID_ACTIVE_CONNECTION,	PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY,	&rParent.m_aActiveConnection,	::getCppuType(reinterpret_cast< Reference< XConnection >* >(NULL)));
-	registerProperty(PROPERTY_RESULTSETCONCURRENCY,	PROPERTY_ID_RESULTSETCONCURRENCY,	PropertyAttribute::READONLY,	&m_nResultSetConcurrency,::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
-	registerProperty(PROPERTY_RESULTSETTYPE,		PROPERTY_ID_RESULTSETTYPE,			PropertyAttribute::READONLY,	&m_nResultSetType,		::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
-	registerProperty(PROPERTY_FETCHDIRECTION,		PROPERTY_ID_FETCHDIRECTION,			PropertyAttribute::TRANSIENT,	&m_nFetchDirection,		::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
-	registerProperty(PROPERTY_FETCHSIZE,			PROPERTY_ID_FETCHSIZE,				PropertyAttribute::TRANSIENT,	&m_nFetchSize,			::getCppuType(reinterpret_cast< sal_Int32*>(NULL)));
+	//	registerProperty(PROPERTY_CURSORNAME,		PROPERTY_ID_CURSORNAME,			PropertyAttribute::READONLY,		&m_aDataSourceName,		::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
+    registerMayBeVoidProperty(PROPERTY_ACTIVE_CONNECTION,PROPERTY_ID_ACTIVE_CONNECTION,	PropertyAttribute::MAYBEVOID|PropertyAttribute::READONLY,	&rParent.m_aActiveConnection,	::getCppuType(static_cast< Reference< XConnection >* >(NULL)));
+	registerProperty(PROPERTY_RESULTSETCONCURRENCY,	PROPERTY_ID_RESULTSETCONCURRENCY,	PropertyAttribute::READONLY,	&m_nResultSetConcurrency,::getCppuType(static_cast< sal_Int32*>(NULL)));
+	registerProperty(PROPERTY_RESULTSETTYPE,		PROPERTY_ID_RESULTSETTYPE,			PropertyAttribute::READONLY,	&m_nResultSetType,		::getCppuType(static_cast< sal_Int32*>(NULL)));
+	registerProperty(PROPERTY_FETCHDIRECTION,		PROPERTY_ID_FETCHDIRECTION,			PropertyAttribute::TRANSIENT,	&m_nFetchDirection,		::getCppuType(static_cast< sal_Int32*>(NULL)));
+	registerProperty(PROPERTY_FETCHSIZE,			PROPERTY_ID_FETCHSIZE,				PropertyAttribute::TRANSIENT,	&m_nFetchSize,			::getCppuType(static_cast< sal_Int32*>(NULL)));
 	registerProperty(PROPERTY_ISBOOKMARKABLE,		PROPERTY_ID_ISBOOKMARKABLE,			nRT,							&m_bIsBookmarable,		::getBooleanCppuType());
 }
 
diff --git a/main/dbaccess/source/core/api/TableDeco.cxx b/main/dbaccess/source/core/api/TableDeco.cxx
index 31440560a4..98574978dc 100644
--- a/main/dbaccess/source/core/api/TableDeco.cxx
+++ b/main/dbaccess/source/core/api/TableDeco.cxx
@@ -215,7 +215,7 @@ sal_Bool SAL_CALL ODBTableDecorator::convertFastPropertyValue(
 			{
 				Any aValue;
 				getFastPropertyValue(aValue,nHandle);
-				bRet = ::comphelper::tryPropertyValue(rConvertedValue,rOldValue,rValue,aValue,::getCppuType(reinterpret_cast< ::rtl::OUString*>(NULL)));
+				bRet = ::comphelper::tryPropertyValue(rConvertedValue,rOldValue,rValue,aValue,::getCppuType(static_cast< ::rtl::OUString*>(NULL)));
 			}
 			break; // we assume that it works
 	}
diff --git a/main/dbaccess/source/ui/browser/sbagrid.cxx b/main/dbaccess/source/ui/browser/sbagrid.cxx
index f1c79d6b14..af14345cd7 100644
--- a/main/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/main/dbaccess/source/ui/browser/sbagrid.cxx
@@ -729,7 +729,7 @@ Sequence< Type > SAL_CALL SbaXGridPeer::getTypes() throw (RuntimeException)
 	Sequence< Type > aTypes = FmXGridPeer::getTypes();
 	sal_Int32 nOldLen = aTypes.getLength();
 	aTypes.realloc(nOldLen + 1);
-	aTypes.getArray()[nOldLen] = ::getCppuType( reinterpret_cast< Reference< ::com::sun::star::frame::XDispatch >* >(NULL) );
+	aTypes.getArray()[nOldLen] = ::getCppuType( static_cast< Reference< ::com::sun::star::frame::XDispatch >* >(NULL) );
 
 	return aTypes;
 }
diff --git a/main/dbaccess/source/ui/tabledesign/TableController.cxx b/main/dbaccess/source/ui/tabledesign/TableController.cxx
index a4c54e069e..8b600bb9ed 100644
--- a/main/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/main/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -1440,7 +1440,8 @@ void OTableController::assignTable()
 				setEditable( xMeta.is() && !xMeta->isReadOnly() && (isAlterAllowed() || isDropAllowed() || isAddAllowed()) );
 				if(!isEditable())
 				{
-                    ::std::for_each(m_vRowList.begin(),m_vRowList.end(),boost::bind( &OTableRow::SetReadOnly, _1, boost::cref( sal_True )));
+                    static const sal_Bool aTrue = sal_True;
+                    ::std::for_each(m_vRowList.begin(),m_vRowList.end(),boost::bind( &OTableRow::SetReadOnly, _1, boost::cref( aTrue )));
 				}
 				m_bNew = sal_False;
 				// be notified when the table is in disposing
diff --git a/main/forms/source/component/ComboBox.cxx b/main/forms/source/component/ComboBox.cxx
index 9d2ee718b1..9d1098e37d 100644
--- a/main/forms/source/component/ComboBox.cxx
+++ b/main/forms/source/component/ComboBox.cxx
@@ -224,7 +224,7 @@ void OComboBoxModel::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, const
 	switch (_nHandle)
 	{
 		case PROPERTY_ID_LISTSOURCETYPE :
-			DBG_ASSERT(_rValue.getValueType().equals(::getCppuType(reinterpret_cast<ListSourceType*>(NULL))),
+			DBG_ASSERT(_rValue.getValueType().equals(::getCppuType(static_cast<ListSourceType*>(NULL))),
 				"OComboBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
 			_rValue >>= m_eListSourceType;
 			break;
diff --git a/main/forms/source/component/ListBox.cxx b/main/forms/source/component/ListBox.cxx
index 88992c5750..cd478d7b06 100644
--- a/main/forms/source/component/ListBox.cxx
+++ b/main/forms/source/component/ListBox.cxx
@@ -301,7 +301,7 @@ namespace frm
             break;
 
         case PROPERTY_ID_LISTSOURCETYPE :
-            DBG_ASSERT(_rValue.getValueType().equals(::getCppuType(reinterpret_cast<ListSourceType*>(NULL))),
+            DBG_ASSERT(_rValue.getValueType().equals(::getCppuType(static_cast<ListSourceType*>(NULL))),
                 "OComboBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
             _rValue >>= m_eListSourceType;
             break;
@@ -340,7 +340,7 @@ namespace frm
             throw PropertyVetoException();
 
         case PROPERTY_ID_DEFAULT_SELECT_SEQ :
-            DBG_ASSERT(_rValue.getValueType().equals(::getCppuType(reinterpret_cast< Sequence<sal_Int16>*>(NULL))),
+            DBG_ASSERT(_rValue.getValueType().equals(::getCppuType(static_cast< Sequence<sal_Int16>*>(NULL))),
                 "OListBoxModel::setFastPropertyValue_NoBroadcast : invalid type !" );
             _rValue >>= m_aDefaultSelectSeq;
 
@@ -375,7 +375,7 @@ namespace frm
         switch (_nHandle)
         {
         case PROPERTY_ID_BOUNDCOLUMN :
-            bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_aBoundColumn, ::getCppuType(reinterpret_cast<sal_Int16*>(NULL)));
+            bModified = tryPropertyValue(_rConvertedValue, _rOldValue, _rValue, m_aBoundColumn, ::getCppuType(static_cast<sal_Int16*>(NULL)));
             break;
 
         case PROPERTY_ID_LISTSOURCETYPE:
diff --git a/main/forms/source/inc/property.hxx b/main/forms/source/inc/property.hxx
index 1971965684..05a7aa3be2 100644
--- a/main/forms/source/inc/property.hxx
+++ b/main/forms/source/inc/property.hxx
@@ -106,7 +106,7 @@ public:
 
 //------------------------------------------------------------------------------
 #define DECL_PROP_IMPL(varname, type) \
-    *pProperties++ = com::sun::star::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, ::getCppuType(reinterpret_cast< type* >(NULL)),
+    *pProperties++ = com::sun::star::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, ::getCppuType(static_cast< type* >(NULL)),
 
 //------------------------------------------------------------------------------
 #define DECL_BOOL_PROP_IMPL(varname) \
@@ -114,7 +114,7 @@ public:
 
 //------------------------------------------------------------------------------
 #define DECL_IFACE_PROP_IMPL(varname, type) \
-    *pProperties++ = com::sun::star::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, ::getCppuType(reinterpret_cast< com::sun::star::uno::Reference< type >* >(NULL)),
+    *pProperties++ = com::sun::star::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, ::getCppuType(static_cast< com::sun::star::uno::Reference< type >* >(NULL)),
 
 //------------------------------------------------------------------------------
 #define BEGIN_DESCRIBE_PROPERTIES( count, baseclass )	\
diff --git a/main/reportdesign/source/core/api/ReportDefinition.cxx b/main/reportdesign/source/core/api/ReportDefinition.cxx
index 665c021c44..5b794eefcf 100644
--- a/main/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/main/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1671,8 +1671,9 @@ void SAL_CALL OReportDefinition::switchToStorage( const uno::Reference< embed::X
         m_pImpl->m_pObjectContainer->SwitchPersistence(m_pImpl->m_xStorage);
 	}
 	// notify our container listeners
+	OWeakObject *oWeakThis = static_cast<OWeakObject*>( this );
 	m_pImpl->m_aStorageChangeListeners.forEach<document::XStorageChangeListener>(
-			::boost::bind(&document::XStorageChangeListener::notifyStorageChange,_1,boost::cref(static_cast<OWeakObject*>(this)),boost::cref(_xStorage)));
+			::boost::bind(&document::XStorageChangeListener::notifyStorageChange,_1,boost::cref( oWeakThis ),boost::cref(_xStorage)));
 }
 // -----------------------------------------------------------------------------
 uno::Reference< embed::XStorage > SAL_CALL OReportDefinition::getDocumentStorage(  ) throw (io::IOException, uno::Exception, uno::RuntimeException)
diff --git a/main/reportdesign/source/ui/report/ReportController.cxx b/main/reportdesign/source/ui/report/ReportController.cxx
index c50b2abf09..140ad8dd9d 100644
--- a/main/reportdesign/source/ui/report/ReportController.cxx
+++ b/main/reportdesign/source/ui/report/ReportController.cxx
@@ -320,7 +320,7 @@ OReportController::OReportController(Reference< XComponentContext > const & xCon
 
 	m_sMode =  ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("normal"));
     DBG_CTOR( rpt_OReportController,NULL);
-    registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZoomValue")),PROPERTY_ID_ZOOMVALUE,beans::PropertyAttribute::BOUND| beans::PropertyAttribute::TRANSIENT,&m_nZoomValue,::getCppuType(reinterpret_cast< sal_Int16*>(NULL)));
+    registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ZoomValue")),PROPERTY_ID_ZOOMVALUE,beans::PropertyAttribute::BOUND| beans::PropertyAttribute::TRANSIENT,&m_nZoomValue,::getCppuType(static_cast< sal_Int16*>(NULL)));
 
 }
 // -----------------------------------------------------------------------------
diff --git a/main/sc/source/ui/app/scdll.cxx b/main/sc/source/ui/app/scdll.cxx
index df5d4519f8..2383dcd8bb 100644
--- a/main/sc/source/ui/app/scdll.cxx
+++ b/main/sc/source/ui/app/scdll.cxx
@@ -263,7 +263,7 @@ void ScDLL::Init()
 
     // common SFX controller
     ::sfx2::TaskPaneWrapper::RegisterChildWindow( sal_False, pMod );
-    ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(NULL, pMod);
+    ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(sal_False, pMod);
     
 	// Svx-StatusBar-Controller
 	SvxInsertStatusBarControl		::RegisterControl(SID_ATTR_INSERT,		pMod);
diff --git a/main/sc/source/ui/pagedlg/scuitphfedit.cxx b/main/sc/source/ui/pagedlg/scuitphfedit.cxx
index 020f9552c0..673082bfe1 100644
--- a/main/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/main/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -187,7 +187,7 @@ ScHFEditPage::ScHFEditPage( Window* 			pParent,
 	{
 		(void)pEdit;
 	    aBtnText.GrabFocus();
-	    return NULL;	
+	    return 0;
 	}
 
 // -----------------------------------------------------------------------
diff --git a/main/sd/source/ui/app/sddll2.cxx b/main/sd/source/ui/app/sddll2.cxx
index 0fe768bf30..59f4c7b3ba 100644
--- a/main/sd/source/ui/app/sddll2.cxx
+++ b/main/sd/source/ui/app/sddll2.cxx
@@ -135,7 +135,7 @@ void SdDLL::RegisterControllers()
 	::avmedia::MediaPlayer::RegisterChildWindow(0, pMod);
 	::sd::LeftPaneImpressChildWindow::RegisterChildWindow(0, pMod);
 	::sd::LeftPaneDrawChildWindow::RegisterChildWindow(0, pMod);
-	::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(NULL, pMod);
+	::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(sal_False, pMod);
 
 	SvxFillToolBoxControl::RegisterControl(0, pMod);
 	SvxLineStyleToolBoxControl::RegisterControl(0, pMod);
diff --git a/main/slideshow/source/engine/activities/activitybase.hxx b/main/slideshow/source/engine/activities/activitybase.hxx
index 1479d990d6..f17ac9252d 100644
--- a/main/slideshow/source/engine/activities/activitybase.hxx
+++ b/main/slideshow/source/engine/activities/activitybase.hxx
@@ -115,7 +115,7 @@ protected:
     ShapeAttributeLayerSharedPtr getShapeAttributeLayer() const
         { return mpAttributeLayer; }
     
-    bool isRepeatCountValid() const { return maRepeats; }
+    bool isRepeatCountValid() const { return (bool) maRepeats; }
     double getRepeatCount() const { return *maRepeats; }
     bool isAutoReverse() const { return mbAutoReverse; }
 
diff --git a/main/slideshow/source/engine/rehearsetimingsactivity.cxx b/main/slideshow/source/engine/rehearsetimingsactivity.cxx
index 5efddd0948..2df1220854 100644
--- a/main/slideshow/source/engine/rehearsetimingsactivity.cxx
+++ b/main/slideshow/source/engine/rehearsetimingsactivity.cxx
@@ -408,9 +408,10 @@ void RehearseTimingsActivity::viewsChanged()
         maSpriteRectangle = calcSpriteRectangle( maViews.front().first );
     
         // reposition sprites
+        ::basegfx::B2DPoint aSpriteRectangleMinimum = maSpriteRectangle.getMinimum();
         for_each_sprite( boost::bind( &cppcanvas::Sprite::move,
                                       _1,
-                                      boost::cref(maSpriteRectangle.getMinimum())) );
+                                      boost::cref( aSpriteRectangleMinimum ) ) );
 
         // sprites changed, need screen update  
         mrScreenUpdater.notifyUpdate();
diff --git a/main/slideshow/source/engine/shapes/appletshape.cxx b/main/slideshow/source/engine/shapes/appletshape.cxx
index 34c7c59a3e..8434fcf68e 100644
--- a/main/slideshow/source/engine/shapes/appletshape.cxx
+++ b/main/slideshow/source/engine/shapes/appletshape.cxx
@@ -154,12 +154,13 @@ namespace slideshow
         void AppletShape::implViewsChanged()
         {
             // resize all ViewShapes
+            ::basegfx::B2DRectangle aBounds = AppletShape::getBounds();
             ::std::for_each( maViewAppletShapes.begin(),
                              maViewAppletShapes.end(),
                              ::boost::bind( 
                                  &ViewAppletShape::resize, 
                                  _1,
-                                 ::boost::cref( AppletShape::getBounds())) );
+                                 ::boost::cref( aBounds ) ) );
         }
 
 		// ---------------------------------------------------------------------
@@ -258,11 +259,12 @@ namespace slideshow
         
         bool AppletShape::implStartIntrinsicAnimation()
         {
+            ::basegfx::B2DRectangle aBounds = getBounds();
             ::std::for_each( maViewAppletShapes.begin(),
                              maViewAppletShapes.end(),
                              ::boost::bind( &ViewAppletShape::startApplet,
                                             _1,
-                                            ::boost::cref( getBounds() )));
+                                            ::boost::cref( aBounds )));
             mbIsPlaying = true;
             
             return true;
diff --git a/main/slideshow/source/engine/shapes/drawshape.cxx b/main/slideshow/source/engine/shapes/drawshape.cxx
index 2290cbf0d9..838eb8def1 100644
--- a/main/slideshow/source/engine/shapes/drawshape.cxx
+++ b/main/slideshow/source/engine/shapes/drawshape.cxx
@@ -210,6 +210,7 @@ namespace slideshow
             }
 
             // redraw all view shapes, by calling their update() method
+            ViewShape::RenderArgs aViewRenderArgs = getViewRenderArgs();
             if( ::std::count_if( maViewShapes.begin(),
                                  maViewShapes.end(),
                                  ::boost::bind<bool>(
@@ -220,8 +221,7 @@ namespace slideshow
                                      										// the extra mem_fn. WTF.
                                      _1,
                                      ::boost::cref( mpCurrMtf ),
-                                     ::boost::cref(
-                                         getViewRenderArgs() ), 
+                                     ::boost::cref( aViewRenderArgs ),
                                      nUpdateFlags,
                                      isVisible() ) ) 
                 != static_cast<ViewShapeVector::difference_type>(maViewShapes.size()) )
diff --git a/main/slideshow/source/engine/shapes/mediashape.cxx b/main/slideshow/source/engine/shapes/mediashape.cxx
index be82407dad..1fcdc50a03 100644
--- a/main/slideshow/source/engine/shapes/mediashape.cxx
+++ b/main/slideshow/source/engine/shapes/mediashape.cxx
@@ -131,12 +131,13 @@ namespace slideshow
         void MediaShape::implViewsChanged()
         {
             // resize all ViewShapes
+            ::basegfx::B2DRange aBounds = getBounds();
             ::std::for_each( maViewMediaShapes.begin(),
                              maViewMediaShapes.end(),
                              ::boost::bind( 
                                  &ViewMediaShape::resize, 
                                  _1,
-                                 ::boost::cref( getBounds())) );
+                                 ::boost::cref( aBounds ) ) );
         }
 
 		// ---------------------------------------------------------------------
diff --git a/main/slideshow/source/engine/unoviewcontainer.cxx b/main/slideshow/source/engine/unoviewcontainer.cxx
index d2e75d30b6..8551db103c 100644
--- a/main/slideshow/source/engine/unoviewcontainer.cxx
+++ b/main/slideshow/source/engine/unoviewcontainer.cxx
@@ -51,11 +51,12 @@ namespace slideshow
             const UnoViewVector::iterator aEnd( maViews.end() );
 
             // already added?
+            uno::Reference<presentation::XSlideShowView> rUnoView = rView->getUnoView();
             if( ::std::find_if( maViews.begin(), 
                                 aEnd, 
                                 ::boost::bind(
                                     ::std::equal_to< uno::Reference< presentation::XSlideShowView > >(),
-                                    ::boost::cref( rView->getUnoView() ),
+                                    ::boost::cref( rUnoView ),
                                     ::boost::bind(
                                         &UnoView::getUnoView,
                                         _1 ) ) ) != aEnd )
diff --git a/main/sw/source/ui/app/swmodule.cxx b/main/sw/source/ui/app/swmodule.cxx
index c1d8440d4b..370b8e7d05 100644
--- a/main/sw/source/ui/app/swmodule.cxx
+++ b/main/sw/source/ui/app/swmodule.cxx
@@ -465,8 +465,8 @@ void SwDLL::RegisterControls()
 	::avmedia::MediaPlayer::RegisterChildWindow(0, pMod);
 
     SvxSmartTagsControl::RegisterControl(SID_OPEN_SMARTTAGMENU, pMod);
-    ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(NULL, pMod);
-    ::sfx2::TaskPaneWrapper::RegisterChildWindow(NULL, pMod);
+    ::sfx2::sidebar::SidebarChildWindow::RegisterChildWindow(sal_False, pMod);
+    ::sfx2::TaskPaneWrapper::RegisterChildWindow(sal_False, pMod);
 }
 
 
diff --git a/main/vcl/unx/gtk/a11y/atkutil.cxx b/main/vcl/unx/gtk/a11y/atkutil.cxx
index abd5ce475d..3dee46c52e 100644
--- a/main/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/main/vcl/unx/gtk/a11y/atkutil.cxx
@@ -778,13 +778,13 @@ ooo_atk_util_get_type (void)
 
         static const GTypeInfo typeInfo =
         {
-            type_query.class_size,
+            (guint16) type_query.class_size,
             (GBaseInitFunc) NULL,
             (GBaseFinalizeFunc) NULL,
             (GClassInitFunc) ooo_atk_util_class_init,
             (GClassFinalizeFunc) NULL,
             NULL,
-            type_query.instance_size,
+            (guint16) type_query.instance_size,
             0,
             (GInstanceInitFunc) NULL,
             NULL
diff --git a/main/vcl/unx/gtk/a11y/atkwindow.cxx b/main/vcl/unx/gtk/a11y/atkwindow.cxx
index f759e8e1e6..c98e79f4e6 100644
--- a/main/vcl/unx/gtk/a11y/atkwindow.cxx
+++ b/main/vcl/unx/gtk/a11y/atkwindow.cxx
@@ -291,13 +291,13 @@ ooo_window_wrapper_get_type (void)
         
         static const GTypeInfo typeInfo =
         {
-            type_query.class_size,
+            (guint16) type_query.class_size,
             (GBaseInitFunc) NULL,
             (GBaseFinalizeFunc) NULL,
             (GClassInitFunc) ooo_window_wrapper_class_init,
             (GClassFinalizeFunc) NULL,
             NULL,
-            type_query.instance_size,
+            (guint16) type_query.instance_size,
             0,
             (GInstanceInitFunc) NULL,
             NULL