diff options
author | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2011-02-14 16:17:22 +0100 |
---|---|---|
committer | Philipp Lohmann [pl] <Philipp.Lohmann@Oracle.COM> | 2011-02-14 16:17:22 +0100 |
commit | 1fb042333fe6287756ff1fac11d18cd7c150730d (patch) | |
tree | 595de5d187177832ce656d7832af9dce9dce2d99 /svx/source/unodraw | |
parent | 5b3e910e926c7dd1e8dcfe8e0a5c6cb5bd17480a (diff) | |
parent | cd0d6a5a6775f197fdb7e78b54c8133074a7a236 (diff) |
rebase to DEV300_m100
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r-- | svx/source/unodraw/UnoGraphicExporter.cxx | 42 | ||||
-rw-r--r-- | svx/source/unodraw/UnoNameItemTable.cxx | 8 | ||||
-rw-r--r-- | svx/source/unodraw/UnoNameItemTable.hxx | 6 | ||||
-rw-r--r-- | svx/source/unodraw/XPropertyTable.cxx | 8 | ||||
-rw-r--r-- | svx/source/unodraw/gluepts.cxx | 36 | ||||
-rw-r--r-- | svx/source/unodraw/makefile.mk | 83 | ||||
-rw-r--r-- | svx/source/unodraw/unoctabl.cxx | 10 | ||||
-rw-r--r-- | svx/source/unodraw/unomod.cxx | 10 | ||||
-rw-r--r-- | svx/source/unodraw/unomtabl.cxx | 10 | ||||
-rw-r--r-- | svx/source/unodraw/unopage.cxx | 18 | ||||
-rw-r--r-- | svx/source/unodraw/unopool.cxx | 22 | ||||
-rw-r--r-- | svx/source/unodraw/unoprov.cxx | 40 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap2.cxx | 10 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap3.cxx | 2 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap4.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 39 | ||||
-rw-r--r-- | svx/source/unodraw/unoshtxt.cxx | 76 | ||||
-rw-r--r-- | svx/source/unodraw/unottabl.cxx | 2 |
18 files changed, 174 insertions, 252 deletions
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 440f6c313e20..eb9a7cb8128f 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -179,7 +179,7 @@ namespace svx virtual sal_Bool SAL_CALL supportsMimeType( const ::rtl::OUString& MimeTypeName ) throw (RuntimeException); virtual Sequence< OUString > SAL_CALL getSupportedMimeTypeNames( ) throw (RuntimeException); - VirtualDevice* CreatePageVDev( SdrPage* pPage, ULONG nWidthPixel, ULONG nHeightPixel ) const; + VirtualDevice* CreatePageVDev( SdrPage* pPage, sal_uIntPtr nWidthPixel, sal_uIntPtr nHeightPixel ) const; DECL_LINK( CalcFieldValueHdl, EditFieldInfo* ); @@ -221,7 +221,7 @@ namespace svx /** creates a bitmap that is optionaly transparent from a metafile */ - BitmapEx GetBitmapFromMetaFile( const GDIMetaFile& rMtf, BOOL bTransparent, const Size* pSize ) + BitmapEx GetBitmapFromMetaFile( const GDIMetaFile& rMtf, sal_Bool bTransparent, const Size* pSize ) { Graphic aGraphic( rMtf ); BitmapEx aBmpEx; @@ -349,7 +349,7 @@ IMPL_LINK(GraphicExporter, CalcFieldValueHdl, EditFieldInfo*, pInfo) if( pField && pField->ISA( SvxPageField ) ) { String aPageNumValue; - BOOL bUpper = FALSE; + sal_Bool bUpper = sal_False; switch(mpDoc->GetPageNumType()) { @@ -360,7 +360,7 @@ IMPL_LINK(GraphicExporter, CalcFieldValueHdl, EditFieldInfo*, pInfo) aPageNumValue += (sal_Unicode)(char)((mnPageNumber - 1) % 26 + 'a'); break; case SVX_ROMAN_UPPER: - bUpper = TRUE; + bUpper = sal_True; case SVX_ROMAN_LOWER: aPageNumValue += SvxNumberFormat::CreateRomanString(mnPageNumber, bUpper); break; @@ -391,7 +391,7 @@ IMPL_LINK(GraphicExporter, CalcFieldValueHdl, EditFieldInfo*, pInfo) @return the returned VirtualDevice is owned by the caller */ -VirtualDevice* GraphicExporter::CreatePageVDev( SdrPage* pPage, ULONG nWidthPixel, ULONG nHeightPixel ) const +VirtualDevice* GraphicExporter::CreatePageVDev( SdrPage* pPage, sal_uIntPtr nWidthPixel, sal_uIntPtr nHeightPixel ) const { VirtualDevice* pVDev = new VirtualDevice(); MapMode aMM( MAP_100TH_MM ); @@ -422,17 +422,17 @@ VirtualDevice* GraphicExporter::CreatePageVDev( SdrPage* pPage, ULONG nWidthPixe pVDev->SetMapMode( aMM ); #ifdef DBG_UTIL - BOOL bAbort = ! + sal_Bool bAbort = ! #endif pVDev->SetOutputSize(aPageSize); DBG_ASSERT(!bAbort, "virt. Device nicht korrekt erzeugt"); SdrView* pView = new SdrView(mpDoc, pVDev); - pView->SetPageVisible( FALSE ); - pView->SetBordVisible( FALSE ); - pView->SetGridVisible( FALSE ); - pView->SetHlplVisible( FALSE ); - pView->SetGlueVisible( FALSE ); + pView->SetPageVisible( sal_False ); + pView->SetBordVisible( sal_False ); + pView->SetGridVisible( sal_False ); + pView->SetHlplVisible( sal_False ); + pView->SetGlueVisible( sal_False ); pView->ShowSdrPage(pPage); Region aRegion (Rectangle( aPoint, aPageSize ) ); @@ -719,7 +719,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, aVDev.SetMapMode( aMap ); if( rSettings.mbUseHighContrast ) aVDev.SetDrawMode( aVDev.GetDrawMode() | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ); - aVDev.EnableOutput( FALSE ); + aVDev.EnableOutput( sal_False ); aMtf.Record( &aVDev ); Size aNewSize; @@ -735,14 +735,14 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, pView = new SdrView( mpDoc, &aVDev ); } - pView->SetBordVisible( FALSE ); - pView->SetPageVisible( FALSE ); + pView->SetBordVisible( sal_False ); + pView->SetPageVisible( sal_False ); pView->ShowSdrPage( pPage ); if ( pView && pPage ) { - pView->SetBordVisible( FALSE ); - pView->SetPageVisible( FALSE ); + pView->SetBordVisible( sal_False ); + pView->SetPageVisible( sal_False ); pView->ShowSdrPage( pPage ); const Point aNewOrg( pPage->GetLftBorder(), pPage->GetUppBorder() ); @@ -788,7 +788,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, if( rSettings.mbTranslucent ) { Size aOutSize; - aGraphic = GetBitmapFromMetaFile( aGraphic.GetGDIMetaFile(), TRUE, CalcSize( rSettings.mnWidth, rSettings.mnHeight, aNewSize, aOutSize ) ); + aGraphic = GetBitmapFromMetaFile( aGraphic.GetGDIMetaFile(), sal_True, CalcSize( rSettings.mnWidth, rSettings.mnHeight, aNewSize, aOutSize ) ); } } } @@ -887,11 +887,11 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, pMtf->AddAction( new MetaCommentAction( "XTEXT_SCROLLRECT", 0, - reinterpret_cast<BYTE const*>(&aScrollRectangle), + reinterpret_cast<sal_uInt8 const*>(&aScrollRectangle), sizeof( Rectangle ) ) ); pMtf->AddAction( new MetaCommentAction( "XTEXT_PAINTRECT", 0, - reinterpret_cast<BYTE const*>(&aPaintRectangle), + reinterpret_cast<sal_uInt8 const*>(&aPaintRectangle), sizeof( Rectangle ) ) ); aGraphic = Graphic( *pMtf ); @@ -924,7 +924,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, } } - aOut.EnableOutput( FALSE ); + aOut.EnableOutput( sal_False ); aOut.SetMapMode( aMap ); if( rSettings.mbUseHighContrast ) aOut.SetDrawMode( aVDev.GetDrawMode() | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ); @@ -1022,7 +1022,7 @@ sal_Bool SAL_CALL GraphicExporter::filter( const Sequence< PropertyValue >& aDes // create the output stuff Graphic aGraphic; - USHORT nStatus = GetGraphic( aSettings, aGraphic, bVectorType ) ? GRFILTER_OK : GRFILTER_FILTERERROR; + sal_uInt16 nStatus = GetGraphic( aSettings, aGraphic, bVectorType ) ? GRFILTER_OK : GRFILTER_FILTERERROR; if( nStatus == GRFILTER_OK ) { diff --git a/svx/source/unodraw/UnoNameItemTable.cxx b/svx/source/unodraw/UnoNameItemTable.cxx index 0ce5b6ca223a..69ee2502c27d 100644 --- a/svx/source/unodraw/UnoNameItemTable.cxx +++ b/svx/source/unodraw/UnoNameItemTable.cxx @@ -46,7 +46,7 @@ using namespace ::rtl; using namespace ::cppu; using namespace ::vos; -SvxUnoNameItemTable::SvxUnoNameItemTable( SdrModel* pModel, USHORT nWhich, BYTE nMemberId ) throw() +SvxUnoNameItemTable::SvxUnoNameItemTable( SdrModel* pModel, sal_uInt16 nWhich, sal_uInt8 nMemberId ) throw() : mpModel( pModel ), mpModelPool( pModel ? &pModel->GetItemPool() : NULL ), mnWhich( nWhich ), mnMemberId( nMemberId ) @@ -93,11 +93,11 @@ sal_Bool SAL_CALL SvxUnoNameItemTable::supportsService( const OUString& Service uno::Sequence< OUString > aSNL( getSupportedServiceNames() ); const OUString * pArray = aSNL.getConstArray(); - for( INT32 i = 0; i < aSNL.getLength(); i++ ) + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) if( pArray[i] == ServiceName ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } void SAL_CALL SvxUnoNameItemTable::ImplInsertByName( const OUString& aName, const uno::Any& aElement ) diff --git a/svx/source/unodraw/UnoNameItemTable.hxx b/svx/source/unodraw/UnoNameItemTable.hxx index 2f864f6f72d2..995b58fb0cc0 100644 --- a/svx/source/unodraw/UnoNameItemTable.hxx +++ b/svx/source/unodraw/UnoNameItemTable.hxx @@ -50,15 +50,15 @@ class SvxUnoNameItemTable : public cppu::WeakImplHelper2< com::sun::star::contai private: SdrModel* mpModel; SfxItemPool* mpModelPool; - USHORT mnWhich; - BYTE mnMemberId; + sal_uInt16 mnWhich; + sal_uInt8 mnMemberId; ItemPoolVector maItemSetVector; void SAL_CALL ImplInsertByName( const rtl::OUString& aName, const com::sun::star::uno::Any& aElement ); public: - SvxUnoNameItemTable( SdrModel* pModel, USHORT nWhich, BYTE nMemberId ) throw(); + SvxUnoNameItemTable( SdrModel* pModel, sal_uInt16 nWhich, sal_uInt8 nMemberId ) throw(); virtual ~SvxUnoNameItemTable() throw(); virtual NameOrIndex* createItem() const throw() = 0; diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx index 617d1737a482..4a54b30c6caa 100644 --- a/svx/source/unodraw/XPropertyTable.cxx +++ b/svx/source/unodraw/XPropertyTable.cxx @@ -457,7 +457,7 @@ uno::Any SvxUnoXDashTable::getAny( const XPropertyEntry* pEntry ) const throw() drawing::LineDash aLineDash; - aLineDash.Style = (::com::sun::star::drawing::DashStyle)((UINT16)rXD.GetDashStyle()); + aLineDash.Style = (::com::sun::star::drawing::DashStyle)((sal_uInt16)rXD.GetDashStyle()); aLineDash.Dots = rXD.GetDots(); aLineDash.DotLen = rXD.GetDotLen(); aLineDash.Dashes = rXD.GetDashes(); @@ -477,7 +477,7 @@ XPropertyEntry* SvxUnoXDashTable::getEntry( const OUString& rName, const uno::An XDash aXDash; - aXDash.SetDashStyle((XDashStyle)((UINT16)(aLineDash.Style))); + aXDash.SetDashStyle((XDashStyle)((sal_uInt16)(aLineDash.Style))); aXDash.SetDots(aLineDash.Dots); aXDash.SetDotLen(aLineDash.DotLen); aXDash.SetDashes(aLineDash.Dashes); @@ -616,8 +616,8 @@ uno::Any SvxUnoXGradientTable::getAny( const XPropertyEntry* pEntry ) const thro awt::Gradient aGradient; aGradient.Style = (awt::GradientStyle) aXGradient.GetGradientStyle(); - aGradient.StartColor = (INT32)aXGradient.GetStartColor().GetColor(); - aGradient.EndColor = (INT32)aXGradient.GetEndColor().GetColor(); + aGradient.StartColor = (sal_Int32)aXGradient.GetStartColor().GetColor(); + aGradient.EndColor = (sal_Int32)aXGradient.GetEndColor().GetColor(); aGradient.Angle = (short)aXGradient.GetAngle(); aGradient.Border = aXGradient.GetBorder(); aGradient.XOffset = aXGradient.GetXOffset(); diff --git a/svx/source/unodraw/gluepts.cxx b/svx/source/unodraw/gluepts.cxx index eb5cd8ec5231..ab09bbfb475b 100644 --- a/svx/source/unodraw/gluepts.cxx +++ b/svx/source/unodraw/gluepts.cxx @@ -44,7 +44,7 @@ using namespace ::com::sun::star; using namespace ::rtl; using namespace ::cppu; -const USHORT NON_USER_DEFINED_GLUE_POINTS = 4; +const sal_uInt16 NON_USER_DEFINED_GLUE_POINTS = 4; class SvxUnoGluePointAccess : public WeakImplHelper2< container::XIndexContainer, container::XIdentifierContainer > { @@ -237,7 +237,7 @@ sal_Int32 SAL_CALL SvxUnoGluePointAccess::insert( const uno::Any& aElement ) thr { SdrGluePoint aSdrGlue; convert( aUnoGlue, aSdrGlue ); - USHORT nId = pList->Insert( aSdrGlue ); + sal_uInt16 nId = pList->Insert( aSdrGlue ); // only repaint, no objectchange mpObject->ActionChanged(); @@ -257,11 +257,11 @@ void SAL_CALL SvxUnoGluePointAccess::removeByIdentifier( sal_Int32 Identifier ) { if( mpObject.is() && ( Identifier >= NON_USER_DEFINED_GLUE_POINTS )) { - const USHORT nId = (USHORT)(Identifier - NON_USER_DEFINED_GLUE_POINTS) + 1; + const sal_uInt16 nId = (sal_uInt16)(Identifier - NON_USER_DEFINED_GLUE_POINTS) + 1; SdrGluePointList* pList = const_cast<SdrGluePointList*>(mpObject->GetGluePointList()); - const USHORT nCount = pList ? pList->GetCount() : 0; - USHORT i; + const sal_uInt16 nCount = pList ? pList->GetCount() : 0; + sal_uInt16 i; for( i = 0; i < nCount; i++ ) { @@ -290,11 +290,11 @@ void SAL_CALL SvxUnoGluePointAccess::replaceByIdentifer( sal_Int32 Identifier, c if( (Identifier < NON_USER_DEFINED_GLUE_POINTS) || !(aElement >>= aGluePoint)) throw lang::IllegalArgumentException(); - const USHORT nId = (USHORT)( Identifier - NON_USER_DEFINED_GLUE_POINTS ) + 1; + const sal_uInt16 nId = (sal_uInt16)( Identifier - NON_USER_DEFINED_GLUE_POINTS ) + 1; SdrGluePointList* pList = const_cast< SdrGluePointList* >( mpObject->GetGluePointList() ); - const USHORT nCount = pList ? pList->GetCount() : 0; - USHORT i; + const sal_uInt16 nCount = pList ? pList->GetCount() : 0; + sal_uInt16 i; for( i = 0; i < nCount; i++ ) { if( (*pList)[i].GetId() == nId ) @@ -324,18 +324,18 @@ uno::Any SAL_CALL SvxUnoGluePointAccess::getByIdentifier( sal_Int32 Identifier ) if( Identifier < NON_USER_DEFINED_GLUE_POINTS ) // default glue point? { - SdrGluePoint aTempPoint = mpObject->GetVertexGluePoint( (USHORT)Identifier ); + SdrGluePoint aTempPoint = mpObject->GetVertexGluePoint( (sal_uInt16)Identifier ); aGluePoint.IsUserDefined = sal_False; convert( aTempPoint, aGluePoint ); return uno::makeAny( aGluePoint ); } else { - const USHORT nId = (USHORT)( Identifier - NON_USER_DEFINED_GLUE_POINTS ) + 1; + const sal_uInt16 nId = (sal_uInt16)( Identifier - NON_USER_DEFINED_GLUE_POINTS ) + 1; const SdrGluePointList* pList = mpObject->GetGluePointList(); - const USHORT nCount = pList ? pList->GetCount() : 0; - for( USHORT i = 0; i < nCount; i++ ) + const sal_uInt16 nCount = pList ? pList->GetCount() : 0; + for( sal_uInt16 i = 0; i < nCount; i++ ) { const SdrGluePoint& rTempPoint = (*pList)[i]; if( rTempPoint.GetId() == nId ) @@ -361,9 +361,9 @@ uno::Sequence< sal_Int32 > SAL_CALL SvxUnoGluePointAccess::getIdentifiers() thro if( mpObject.is() ) { const SdrGluePointList* pList = mpObject->GetGluePointList(); - const USHORT nCount = pList ? pList->GetCount() : 0; + const sal_uInt16 nCount = pList ? pList->GetCount() : 0; - USHORT i; + sal_uInt16 i; uno::Sequence< sal_Int32 > aIdSequence( nCount + NON_USER_DEFINED_GLUE_POINTS ); sal_Int32 *pIdentifier = aIdSequence.getArray(); @@ -428,7 +428,7 @@ void SAL_CALL SvxUnoGluePointAccess::removeByIndex( sal_Int32 Index ) Index -= 4; if( Index >= 0 && Index < pList->GetCount() ) { - pList->Delete( (USHORT)Index ); + pList->Delete( (sal_uInt16)Index ); // only repaint, no objectchange mpObject->ActionChanged(); @@ -457,7 +457,7 @@ void SAL_CALL SvxUnoGluePointAccess::replaceByIndex( sal_Int32 Index, const uno: SdrGluePointList* pList = const_cast< SdrGluePointList* >( mpObject->GetGluePointList() ); if( pList && Index < pList->GetCount() ) { - SdrGluePoint& rGlue = (*pList)[(USHORT)Index]; + SdrGluePoint& rGlue = (*pList)[(sal_uInt16)Index]; convert( aUnoGlue, rGlue ); // only repaint, no objectchange @@ -500,7 +500,7 @@ uno::Any SAL_CALL SvxUnoGluePointAccess::getByIndex( sal_Int32 Index ) if( Index < 4 ) // default glue point? { - SdrGluePoint aTempPoint = mpObject->GetVertexGluePoint( (USHORT)Index ); + SdrGluePoint aTempPoint = mpObject->GetVertexGluePoint( (sal_uInt16)Index ); aGluePoint.IsUserDefined = sal_False; convert( aTempPoint, aGluePoint ); uno::Any aAny; @@ -513,7 +513,7 @@ uno::Any SAL_CALL SvxUnoGluePointAccess::getByIndex( sal_Int32 Index ) const SdrGluePointList* pList = mpObject->GetGluePointList(); if( pList && Index < pList->GetCount() ) { - const SdrGluePoint& rTempPoint = (*pList)[(USHORT)Index]; + const SdrGluePoint& rTempPoint = (*pList)[(sal_uInt16)Index]; aGluePoint.IsUserDefined = sal_True; convert( rTempPoint, aGluePoint ); uno::Any aAny; diff --git a/svx/source/unodraw/makefile.mk b/svx/source/unodraw/makefile.mk deleted file mode 100644 index 6815f28f4c79..000000000000 --- a/svx/source/unodraw/makefile.mk +++ /dev/null @@ -1,83 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=svx -TARGET=unodraw -LIBTARGET=NO -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- - -LIB1TARGET= $(SLB)$/$(TARGET)-core.lib -LIB1OBJFILES= \ - $(SLO)$/UnoGraphicExporter.obj \ - $(SLO)$/XPropertyTable.obj \ - $(SLO)$/UnoNameItemTable.obj \ - $(SLO)$/unoshape.obj \ - $(SLO)$/unoshap2.obj \ - $(SLO)$/unoshap3.obj \ - $(SLO)$/unoshap4.obj \ - $(SLO)$/unopage.obj \ - $(SLO)$/unoshtxt.obj \ - $(SLO)$/unoprov.obj \ - $(SLO)$/unomod.obj \ - $(SLO)$/unomlstr.obj \ - $(SLO)$/unogtabl.obj \ - $(SLO)$/unohtabl.obj \ - $(SLO)$/unobtabl.obj \ - $(SLO)$/unottabl.obj \ - $(SLO)$/unomtabl.obj \ - $(SLO)$/unodtabl.obj \ - $(SLO)$/gluepts.obj \ - $(SLO)$/tableshape.obj \ - $(SLO)$/shapepropertynotifier.obj - -LIB2TARGET= $(SLB)$/$(TARGET).lib -LIB2OBJFILES= \ - $(SLO)$/UnoNamespaceMap.obj \ - $(SLO)$/unopool.obj \ - $(SLO)$/unoctabl.obj \ - $(SLO)$/unoshcol.obj \ - $(SLO)$/recoveryui.obj - -SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES) - -SRS1NAME=unodraw -SRC1FILES = \ - unodraw.src - -# --- Tagets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/svx/source/unodraw/unoctabl.cxx b/svx/source/unodraw/unoctabl.cxx index 48357f873ce3..6b54a1458307 100644 --- a/svx/source/unodraw/unoctabl.cxx +++ b/svx/source/unodraw/unoctabl.cxx @@ -100,11 +100,11 @@ sal_Bool SAL_CALL SvxUnoColorTable::supportsService( const OUString& ServiceNam uno::Sequence< OUString > aSNL( getSupportedServiceNames() ); const OUString * pArray = aSNL.getConstArray(); - for( INT32 i = 0; i < aSNL.getLength(); i++ ) + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) if( pArray[i] == ServiceName ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } OUString SAL_CALL SvxUnoColorTable::getImplementationName() throw( uno::RuntimeException ) @@ -132,7 +132,7 @@ void SAL_CALL SvxUnoColorTable::insertByName( const OUString& aName, const uno:: if( hasByName( aName ) ) throw container::ElementExistException(); - INT32 nColor = 0; + sal_Int32 nColor = 0; if( !(aElement >>= nColor) ) throw lang::IllegalArgumentException(); @@ -157,7 +157,7 @@ void SAL_CALL SvxUnoColorTable::removeByName( const OUString& Name ) void SAL_CALL SvxUnoColorTable::replaceByName( const OUString& aName, const uno::Any& aElement ) throw( lang::IllegalArgumentException, container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException ) { - INT32 nColor = 0; + sal_Int32 nColor = 0; if( !(aElement >>= nColor) ) throw lang::IllegalArgumentException(); diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx index 195411b1e944..016128488ab4 100644 --- a/svx/source/unodraw/unomod.cxx +++ b/svx/source/unodraw/unomod.cxx @@ -192,11 +192,11 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawMSFactory::createInstance( if( ServiceSpecifier.compareTo( aDrawingPrefix, aDrawingPrefix.getLength() ) == 0 ) { - UINT32 nType = aSdrShapeIdentifierMap.getId( ServiceSpecifier ); + sal_uInt32 nType = aSdrShapeIdentifierMap.getId( ServiceSpecifier ); if( nType != UHASHMAP_NOTFOUND ) { - UINT16 nT = (UINT16)(nType & ~E3D_INVENTOR_FLAG); - UINT32 nI = (nType & E3D_INVENTOR_FLAG)?E3dInventor:SdrInventor; + sal_uInt16 nT = (sal_uInt16)(nType & ~E3D_INVENTOR_FLAG); + sal_uInt32 nI = (nType & E3D_INVENTOR_FLAG)?E3dInventor:SdrInventor; return uno::Reference< uno::XInterface >( (drawing::XShape*) SvxDrawPage::CreateShapeByTypeAndInventor( nT, nI ) ); } @@ -225,7 +225,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoDrawMSFactory::getAvailableServiceNames { UHashMapEntry* pMap = pSdrShapeIdentifierMap; - UINT32 nCount = 0; + sal_uInt32 nCount = 0; while (pMap->aIdentifier.getLength()) { pMap++; @@ -236,7 +236,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoDrawMSFactory::getAvailableServiceNames OUString* pStrings = aSeq.getArray(); pMap = pSdrShapeIdentifierMap; - UINT32 nIdx = 0; + sal_uInt32 nIdx = 0; while(pMap->aIdentifier.getLength()) { pStrings[nIdx] = pMap->aIdentifier; diff --git a/svx/source/unodraw/unomtabl.cxx b/svx/source/unodraw/unomtabl.cxx index 01375649553b..a46b535a9baf 100644 --- a/svx/source/unodraw/unomtabl.cxx +++ b/svx/source/unodraw/unomtabl.cxx @@ -145,11 +145,11 @@ sal_Bool SAL_CALL SvxUnoMarkerTable::supportsService( const OUString& ServiceNa uno::Sequence< OUString > aSNL( getSupportedServiceNames() ); const OUString * pArray = aSNL.getConstArray(); - for( INT32 i = 0; i < aSNL.getLength(); i++ ) + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) if( pArray[i] == ServiceName ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } OUString SAL_CALL SvxUnoMarkerTable::getImplementationName() throw( uno::RuntimeException ) @@ -307,7 +307,7 @@ void SAL_CALL SvxUnoMarkerTable::replaceByName( const OUString& aApiName, const throw container::NoSuchElementException(); } -static sal_Bool getByNameFromPool( const String& rSearchName, SfxItemPool* pPool, USHORT nWhich, uno::Any& rAny ) +static sal_Bool getByNameFromPool( const String& rSearchName, SfxItemPool* pPool, sal_uInt16 nWhich, uno::Any& rAny ) { NameOrIndex *pItem; const sal_uInt32 nSurrogateCount = pPool ? pPool->GetItemCount2( nWhich ) : 0; @@ -355,7 +355,7 @@ uno::Any SAL_CALL SvxUnoMarkerTable::getByName( const OUString& aApiName ) return aAny; } -static void createNamesForPool( SfxItemPool* pPool, USHORT nWhich, std::set< OUString, comphelper::UStringLess >& rNameSet ) +static void createNamesForPool( SfxItemPool* pPool, sal_uInt16 nWhich, std::set< OUString, comphelper::UStringLess >& rNameSet ) { const sal_uInt32 nSuroCount = pPool->GetItemCount2( nWhich ); sal_uInt32 nSurrogate; diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx index a905aa0fd2f4..3602158722a9 100644 --- a/svx/source/unodraw/unopage.cxx +++ b/svx/source/unodraw/unopage.cxx @@ -58,6 +58,7 @@ #include <svx/extrud3d.hxx> #include <svx/lathe3d.hxx> #include <vcl/svapp.hxx> +#include <tools/diagnose_ex.h> using ::rtl::OUString; using namespace ::vos; @@ -306,7 +307,7 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape { OGuard aGuard( Application::GetSolarMutex() ); - if( (mpModel == 0) || (mpPage == 0) ) + if ( ( mpModel == NULL ) || ( mpPage == NULL ) ) throw lang::DisposedException(); SvxShape* pShape = SvxShape::getImplementation( xShape ); @@ -319,6 +320,7 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape if(!pObj) { pObj = CreateSdrObject( xShape ); + ENSURE_OR_RETURN_VOID( pObj != NULL, "SvxDrawPage::add: no SdrObject was created!" ); } else if ( !pObj->IsInserted() ) { @@ -326,14 +328,10 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape mpPage->InsertObject( pObj ); } - if(pObj == NULL) - return; - - if(pShape) - pShape->Create( pObj, this ); + pShape->Create( pObj, this ); + OSL_ENSURE( pShape->GetSdrObject() == pObj, "SvxDrawPage::add: shape does not know about its newly created SdrObject!" ); - if( mpModel ) - mpModel->SetChanged(); + mpModel->SetChanged(); } //---------------------------------------------------------------------- @@ -625,7 +623,7 @@ SdrObject *SvxDrawPage::_CreateSdrObject( const Reference< drawing::XShape > & x aNewPolygon.setClosed(true); pObj->SetExtrudePolygon(basegfx::B2DPolyPolygon(aNewPolygon)); - // #107245# pObj->SetExtrudeCharacterMode(TRUE); + // #107245# pObj->SetExtrudeCharacterMode(sal_True); pObj->SetMergedItem(Svx3DCharacterModeItem(sal_True)); } else if(pNewObj->ISA(E3dLatheObj)) @@ -638,7 +636,7 @@ SdrObject *SvxDrawPage::_CreateSdrObject( const Reference< drawing::XShape > & x aNewPolygon.setClosed(true); pObj->SetPolyPoly2D(basegfx::B2DPolyPolygon(aNewPolygon)); - // #107245# pObj->SetLatheCharacterMode(TRUE); + // #107245# pObj->SetLatheCharacterMode(sal_True); pObj->SetMergedItem(Svx3DCharacterModeItem(sal_True)); } } diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx index 17c32389e311..fd682129b184 100644 --- a/svx/source/unodraw/unopool.cxx +++ b/svx/source/unodraw/unopool.cxx @@ -124,22 +124,22 @@ void SvxUnoDrawPool::getAny( SfxItemPool* pPool, const comphelper::PropertyMapEn } default: { - const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((USHORT)pEntry->mnHandle) : SFX_MAPUNIT_100TH_MM; + const SfxMapUnit eMapUnit = pPool ? pPool->GetMetric((sal_uInt16)pEntry->mnHandle) : SFX_MAPUNIT_100TH_MM; - BYTE nMemberId = pEntry->mnMemberId & (~SFX_METRIC_ITEM); + sal_uInt8 nMemberId = pEntry->mnMemberId & (~SFX_METRIC_ITEM); if( eMapUnit == SFX_MAPUNIT_100TH_MM ) nMemberId &= (~CONVERT_TWIPS); // DVO, OD 10.10.2003 #i18732# // Assure, that ID is a Which-ID (it could be a Slot-ID.) // Thus, convert handle to Which-ID. - pPool->GetDefaultItem( pPool->GetWhich( (USHORT)pEntry->mnHandle ) ).QueryValue( rValue, nMemberId ); + pPool->GetDefaultItem( pPool->GetWhich( (sal_uInt16)pEntry->mnHandle ) ).QueryValue( rValue, nMemberId ); } } // check for needed metric translation - const SfxMapUnit eMapUnit = pPool->GetMetric((USHORT)pEntry->mnHandle); + const SfxMapUnit eMapUnit = pPool->GetMetric((sal_uInt16)pEntry->mnHandle); if(pEntry->mnMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM) { SvxUnoConvertToMM( eMapUnit, rValue ); @@ -159,7 +159,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEn { uno::Any aValue( rValue ); - const SfxMapUnit eMapUnit = pPool->GetMetric((USHORT)pEntry->mnHandle); + const SfxMapUnit eMapUnit = pPool->GetMetric((sal_uInt16)pEntry->mnHandle); if(pEntry->mnMemberId & SFX_METRIC_ITEM && eMapUnit != SFX_MAPUNIT_100TH_MM) { SvxUnoConvertFromMM( eMapUnit, aValue ); @@ -193,7 +193,7 @@ void SvxUnoDrawPool::putAny( SfxItemPool* pPool, const comphelper::PropertyMapEn default: { ::std::auto_ptr<SfxPoolItem> pNewItem( pPool->GetDefaultItem( nWhich ).Clone() ); - BYTE nMemberId = pEntry->mnMemberId & (~SFX_METRIC_ITEM); + sal_uInt8 nMemberId = pEntry->mnMemberId & (~SFX_METRIC_ITEM); if( !pPool || (pPool->GetMetric(nWhich) == SFX_MAPUNIT_100TH_MM) ) nMemberId &= (~CONVERT_TWIPS); @@ -308,7 +308,7 @@ void SvxUnoDrawPool::_setPropertyToDefault( const comphelper::PropertyMapEntry* // OD 10.10.2003 #i18732# // Assure, that ID is a Which-ID (it could be a Slot-ID.) // Thus, convert handle to Which-ID. - const sal_uInt16 nWhich = pPool->GetWhich( (USHORT)pEntry->mnHandle ); + const sal_uInt16 nWhich = pPool->GetWhich( (sal_uInt16)pEntry->mnHandle ); if ( pPool && pPool != mpDefaultsPool ) { // OD 13.10.2003 #i18732# - use method <ResetPoolDefaultItem(..)> @@ -326,7 +326,7 @@ uno::Any SvxUnoDrawPool::_getPropertyDefault( const comphelper::PropertyMapEntry // using probably incompatible item pool <mpDefaultsPool> uno::Any aAny; SfxItemPool* pPool = getModelPool( sal_True ); - const sal_uInt16 nWhich = pPool->GetWhich( (USHORT)pEntry->mnHandle ); + const sal_uInt16 nWhich = pPool->GetWhich( (sal_uInt16)pEntry->mnHandle ); const SfxPoolItem *pItem = pPool->GetPoolDefaultItem ( nWhich ); pItem->QueryValue( aAny, pEntry->mnMemberId ); @@ -409,11 +409,11 @@ sal_Bool SAL_CALL SvxUnoDrawPool::supportsService( const OUString& ServiceName uno::Sequence< OUString > aSNL( getSupportedServiceNames() ); const OUString * pArray = aSNL.getConstArray(); - for( INT32 i = 0; i < aSNL.getLength(); i++ ) + for( sal_Int32 i = 0; i < aSNL.getLength(); i++ ) if( pArray[i] == ServiceName ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } OUString SAL_CALL SvxUnoDrawPool::getImplementationName() throw( uno::RuntimeException ) diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 6132139e0164..a4abc4e23d88 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -894,7 +894,7 @@ UHashMap::UHashMap( UHashMapEntry* pMap ) // --------------------------------------------------------------------- -UINT32 UHashMap::getId( const OUString& rCompareString ) +sal_uInt32 UHashMap::getId( const OUString& rCompareString ) { size_t nHash = rCompareString.hashCode() & (HASHARRAYSIZE-1); @@ -938,7 +938,7 @@ Svx_CompareMap(const void* pSmaller, const void* pBigger ) SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider() { - for(UINT16 i=0;i<SVXMAP_END; i++) + for(sal_uInt16 i=0;i<SVXMAP_END; i++) { aSetArr[i] = 0; aMapArr[i] = 0; @@ -947,23 +947,23 @@ SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider() SvxUnoPropertyMapProvider::~SvxUnoPropertyMapProvider() { - for(UINT16 i=0;i<SVXMAP_END; i++) + for(sal_uInt16 i=0;i<SVXMAP_END; i++) delete aSetArr[i]; } // --------------------------------------------------------------------- -/*void SvxUnoPropertyMapProvider::Sort(USHORT nId) +/*void SvxUnoPropertyMapProvider::Sort(sal_uInt16 nId) { SfxItemPropertyMapEntry* pTemp = aMapArr[nId]; - UINT16 i = 0; + sal_uInt16 i = 0; while(pTemp[i].pName) { i++; } qsort(aMapArr[nId], i, sizeof(SfxItemPropertyMapEntry), Svx_CompareMap); }*/ // --------------------------------------------------------------------- -const SfxItemPropertyMapEntry* SvxUnoPropertyMapProvider::GetMap(UINT16 nPropertyId) +const SfxItemPropertyMapEntry* SvxUnoPropertyMapProvider::GetMap(sal_uInt16 nPropertyId) { DBG_ASSERT(nPropertyId < SVXMAP_END, "Id ?" ); if(!aMapArr[nPropertyId]) { @@ -1002,7 +1002,7 @@ const SfxItemPropertyMapEntry* SvxUnoPropertyMapProvider::GetMap(UINT16 nPropert } return aMapArr[nPropertyId]; } -const SvxItemPropertySet* SvxUnoPropertyMapProvider::GetPropertySet(UINT16 nPropertyId, SfxItemPool& rPool) +const SvxItemPropertySet* SvxUnoPropertyMapProvider::GetPropertySet(sal_uInt16 nPropertyId, SfxItemPool& rPool) { if( !aSetArr[nPropertyId] ) aSetArr[nPropertyId] = new SvxItemPropertySet( GetMap( nPropertyId ), rPool ); @@ -1159,10 +1159,10 @@ bool SvxUnoGetResourceRanges( const short nWhich, int& nApiResIds, int& nIntResI break; default: - return FALSE; + return sal_False; } - return TRUE; + return sal_True; } /*sal_Int16 SvxUnoGetWhichIdForNamedProperty( const ::rtl::OUString & rPropName ) @@ -1211,29 +1211,29 @@ bool SvxUnoConvertResourceString( int nSourceResIds, int nDestResIds, int nCount int i; for( i = 0; i < nCount; i++ ) { - USHORT nResId = (USHORT)(nSourceResIds + i); + sal_uInt16 nResId = (sal_uInt16)(nSourceResIds + i); const ResId aRes( SVX_RES(nResId)); const String aCompare( aRes ); if( aShortString == aCompare ) { - USHORT nNewResId = (USHORT)(nDestResIds + i); + sal_uInt16 nNewResId = (sal_uInt16)(nDestResIds + i); ResId aNewRes( SVX_RES( nNewResId )); rString.Replace( 0, aShortString.Len(), String( aNewRes ) ); - return TRUE; + return sal_True; } else if( rString == aCompare ) { - USHORT nNewResId = (USHORT)(nDestResIds + i); + sal_uInt16 nNewResId = (sal_uInt16)(nDestResIds + i); ResId aNewRes( SVX_RES( nNewResId )); rString = String( aNewRes ); - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } -static USHORT __READONLY_DATA SvxUnoColorNameDefResId[] = +static sal_uInt16 __READONLY_DATA SvxUnoColorNameDefResId[] = { RID_SVXSTR_BLUEGREY_DEF, RID_SVXSTR_BLACK_DEF, @@ -1264,7 +1264,7 @@ static USHORT __READONLY_DATA SvxUnoColorNameDefResId[] = RID_SVXSTR_COLOR_CHART_DEF }; -static USHORT __READONLY_DATA SvxUnoColorNameResId[] = +static sal_uInt16 __READONLY_DATA SvxUnoColorNameResId[] = { RID_SVXSTR_BLUEGREY, RID_SVXSTR_BLACK, @@ -1295,7 +1295,7 @@ static USHORT __READONLY_DATA SvxUnoColorNameResId[] = RID_SVXSTR_COLOR_CHART }; -bool SvxUnoConvertResourceString( USHORT* pSourceResIds, USHORT* pDestResIds, int nCount, String& rString ) throw() +bool SvxUnoConvertResourceString( sal_uInt16* pSourceResIds, sal_uInt16* pDestResIds, int nCount, String& rString ) throw() { int i = 0; @@ -1323,7 +1323,7 @@ void SvxUnogetApiNameForItem( const sal_Int16 nWhich, const String& rInternalNam if( nWhich == XATTR_LINECOLOR ) { - if( SvxUnoConvertResourceString( (USHORT*)SvxUnoColorNameResId, (USHORT*)SvxUnoColorNameDefResId, sizeof( SvxUnoColorNameResId ) / sizeof( USHORT ), aNew ) ) + if( SvxUnoConvertResourceString( (sal_uInt16*)SvxUnoColorNameResId, (sal_uInt16*)SvxUnoColorNameDefResId, sizeof( SvxUnoColorNameResId ) / sizeof( sal_uInt16 ), aNew ) ) { rApiName = aNew; return; @@ -1360,7 +1360,7 @@ void SvxUnogetInternalNameForItem( const sal_Int16 nWhich, const rtl::OUString& if( nWhich == XATTR_LINECOLOR ) { - if( SvxUnoConvertResourceString( (USHORT*)SvxUnoColorNameDefResId, (USHORT*)SvxUnoColorNameResId, sizeof( SvxUnoColorNameResId ) / sizeof( USHORT ), aNew ) ) + if( SvxUnoConvertResourceString( (sal_uInt16*)SvxUnoColorNameDefResId, (sal_uInt16*)SvxUnoColorNameResId, sizeof( SvxUnoColorNameResId ) / sizeof( sal_uInt16 ), aNew ) ) { rInternalName = aNew; return; diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 057e5f8b7e6c..17709c6197ce 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -1717,7 +1717,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const ::rtl::OUString& rName, const // normal link String aFilterName; const SfxFilter* pSfxFilter = NULL; - SfxMedium aSfxMedium( aURL, STREAM_READ | STREAM_SHARE_DENYNONE, FALSE ); + SfxMedium aSfxMedium( aURL, STREAM_READ | STREAM_SHARE_DENYNONE, sal_False ); SFX_APP()->GetFilterMatcher().GuessFilter( aSfxMedium, &pSfxFilter, SFX_FILTER_IMPORT, SFX_FILTER_NOTINSTALLED | SFX_FILTER_EXECUTABLE ); @@ -1997,8 +1997,8 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() throw(uno::RuntimeException) Point aRef1( ( aBoundRect.Left() + aBoundRect.Right() ) >> 1, aBoundRect.Top() ); Point aRef2( aRef1.X(), aRef1.Y() + 1000 ); - USHORT i; - USHORT nPntAnz=aPol.GetSize(); + sal_uInt16 i; + sal_uInt16 nPntAnz=aPol.GetSize(); for (i=0; i<nPntAnz; i++) { MirrorPoint(aPol[i],aRef1,aRef2); @@ -2019,8 +2019,8 @@ awt::Point SAL_CALL SvxCustomShape::getPosition() throw(uno::RuntimeException) Point aRef1( aBoundRect.Left(), ( aBoundRect.Top() + aBoundRect.Bottom() ) >> 1 ); Point aRef2( aRef1.X() + 1000, aRef1.Y() ); - USHORT i; - USHORT nPntAnz=aPol.GetSize(); + sal_uInt16 i; + sal_uInt16 nPntAnz=aPol.GetSize(); for (i=0; i<nPntAnz; i++) { MirrorPoint(aPol[i],aRef1,aRef2); diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx index fd8f9dd1d2d9..be20ca4421e3 100644 --- a/svx/source/unodraw/unoshap3.cxx +++ b/svx/source/unodraw/unoshap3.cxx @@ -394,7 +394,7 @@ bool Svx3DSceneObject::setPropertyValueImpl( const ::rtl::OUString& rName, const double fCamFocal = (double)((const SfxUInt32Item&)rSceneSet.Get(SDRATTR_3DSCENE_FOCAL_LENGTH)).GetValue(); - aCam.SetAutoAdjustProjection(FALSE); + aCam.SetAutoAdjustProjection(sal_False); aCam.SetViewWindow(- fW / 2, - fH / 2, fW, fH); basegfx::B3DPoint aLookAt; basegfx::B3DPoint aCamPos(0.0, 0.0, fCamPosZ); diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 79d5b7c5dec9..9f906dc59a39 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -285,13 +285,13 @@ bool SvxOle2Shape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sfx Graphic* pGraphic = pObj->GetGraphic(); if( pGraphic ) { - BOOL bIsWMF = FALSE; + sal_Bool bIsWMF = sal_False; if ( pGraphic->IsLink() ) { GfxLink aLnk = pGraphic->GetLink(); if ( aLnk.GetType() == GFX_LINK_TYPE_NATIVE_WMF ) { - bIsWMF = TRUE; + bIsWMF = sal_True; uno::Sequence<sal_Int8> aSeq((sal_Int8*)aLnk.GetData(), (sal_Int32) aLnk.GetDataSize()); rValue <<= aSeq; } diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 0f1482adaf5d..73872e2e4b0a 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -147,7 +147,7 @@ struct SvxShapeImpl * SdrObject so a multiple call to SvxShape::Create() with same SdrObject * is prohibited. */ - SdrObject* mpCreatedObj; + ::tools::WeakReference< SdrObject > mpCreatedObj; // for xComponent ::cppu::OInterfaceContainerHelper maDisposeListeners; @@ -160,7 +160,7 @@ struct SvxShapeImpl ,mpMaster( NULL ) ,mbHasSdrObjectOwnership( false ) ,mbDisposing( false ) - ,mpCreatedObj( NULL ) + ,mpCreatedObj() ,maDisposeListeners( _rMutex ) ,maPropertyNotifier( _rAntiImpl, _rMutex ) { @@ -468,11 +468,12 @@ void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* /*pNewPage*/ ) if ( !pNewObj ) return; - OSL_ENSURE( ( mpImpl->mpCreatedObj == NULL ) || ( mpImpl->mpCreatedObj == pNewObj ), + SdrObject* pCreatedObj = mpImpl->mpCreatedObj.get(); + OSL_ENSURE( ( pCreatedObj == NULL ) || ( pCreatedObj == pNewObj ), "SvxShape::Create: the same shape used for two different objects?! Strange ..." ); // --> CL, OD 2005-07-19 #i52126# - correct condition - if ( mpImpl->mpCreatedObj != pNewObj ) + if ( pCreatedObj != pNewObj ) // <-- { DBG_ASSERT( pNewObj->GetModel(), "no model for SdrObject?" ); @@ -1537,7 +1538,7 @@ void SAL_CALL SvxShape::removeVetoableChangeListener( const OUString& , const Re sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rName ) { - SfxItemSet aSet( mpModel->GetItemPool(), (USHORT)nWID, (USHORT)nWID ); + SfxItemSet aSet( mpModel->GetItemPool(), (sal_uInt16)nWID, (sal_uInt16)nWID ); if( SetFillAttribute( nWID, rName, aSet, mpModel ) ) { @@ -1722,12 +1723,12 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN const SfxItemPool* pPool = rSet.GetPool(); const String aSearchName( aName ); - const sal_uInt32 nCount = pPool->GetItemCount2((USHORT)nWID); + const sal_uInt32 nCount = pPool->GetItemCount2((sal_uInt16)nWID); const NameOrIndex* pItem; for( sal_uInt32 nSurrogate = 0; nSurrogate < nCount; nSurrogate++ ) { - pItem = (NameOrIndex*)pPool->GetItem2((USHORT)nWID, nSurrogate); + pItem = (NameOrIndex*)pPool->GetItem2((sal_uInt16)nWID, nSurrogate); if( pItem && ( pItem->GetName() == aSearchName ) ) { rSet.Put( *pItem ); @@ -1756,13 +1757,13 @@ sal_Bool SAL_CALL SvxShape::SetFillAttribute( sal_Int32 nWID, const OUString& rN const SfxItemPool& rPool = pModel->GetItemPool(); const String aSearchName( rName ); - const sal_uInt32 nCount = rPool.GetItemCount((USHORT)nWhich); + const sal_uInt32 nCount = rPool.GetItemCount((sal_uInt16)nWhich); const NameOrIndex* pItem = 0; bool bFound = false; for( sal_uInt32 nSurrogate = 0; ! bFound && nSurrogate < nCount; nSurrogate++ ) { - pItem = (NameOrIndex*)rPool.GetItem((USHORT)nWhich, nSurrogate); + pItem = (NameOrIndex*)rPool.GetItem((sal_uInt16)nWhich, nSurrogate); if( pItem && ( pItem->GetName() == aSearchName ) ) { bFound = true; @@ -2395,7 +2396,7 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope case XATTR_FILLHATCH: case XATTR_LINEDASH: { - NameOrIndex* pItem = (NameOrIndex*)rSet.GetItem((USHORT)pMap->nWID); + NameOrIndex* pItem = (NameOrIndex*)rSet.GetItem((sal_uInt16)pMap->nWID); if( ( pItem == NULL ) || ( pItem->GetName().Len() == 0) ) eState = beans::PropertyState_DEFAULT_VALUE; } @@ -2410,7 +2411,7 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope case XATTR_LINESTART: case XATTR_FILLFLOATTRANSPARENCE: { - NameOrIndex* pItem = (NameOrIndex*)rSet.GetItem((USHORT)pMap->nWID); + NameOrIndex* pItem = (NameOrIndex*)rSet.GetItem((sal_uInt16)pMap->nWID); if( ( pItem == NULL ) ) eState = beans::PropertyState_DEFAULT_VALUE; } @@ -2494,7 +2495,7 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper #ifdef DBG_UTIL SdrObject* pCheck = #endif - pObjList->SetObjectOrdNum( mpObj->GetOrdNum(), (ULONG)nNewOrdNum ); + pObjList->SetObjectOrdNum( mpObj->GetOrdNum(), (sal_uIntPtr)nNewOrdNum ); DBG_ASSERT( pCheck == mpObj.get(), "GetOrdNum() failed!" ); } return true; @@ -2673,7 +2674,7 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper OUString aLayerName; if( rValue >>= aLayerName ) { - const SdrLayer* pLayer=mpModel->GetLayerAdmin().GetLayer(aLayerName, TRUE); + const SdrLayer* pLayer=mpModel->GetLayerAdmin().GetLayer(aLayerName, sal_True); if( pLayer != NULL ) { mpObj->SetLayer( pLayer->GetID() ); @@ -2711,7 +2712,7 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper { Point aRef1(mpObj->GetSnapRect().Center()); double nTan=tan(nShear*nPi180); - mpObj->Shear(aRef1,nShear,nTan,FALSE); + mpObj->Shear(aRef1,nShear,nTan,sal_False); return true; } } @@ -3206,13 +3207,13 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper Graphic* pGraphic = pObj->GetGraphic(); if( pGraphic ) { - BOOL bIsWMF = FALSE; + sal_Bool bIsWMF = sal_False; if ( pGraphic->IsLink() ) { GfxLink aLnk = pGraphic->GetLink(); if ( aLnk.GetType() == GFX_LINK_TYPE_NATIVE_WMF ) { - bIsWMF = TRUE; + bIsWMF = sal_True; uno::Sequence<sal_Int8> aSeq((sal_Int8*)aLnk.GetData(), (sal_Int32) aLnk.GetDataSize()); rValue <<= aSeq; } @@ -3423,7 +3424,7 @@ void SvxShape::setAllPropertiesToDefault() throw (uno::RuntimeException) } // #i68523# special handling for Svx3DCharacterModeItem, this is not saved - // but needs to be TRUE in svx, pool default (false) in sch. Since sch + // but needs to be sal_True in svx, pool default (false) in sch. Since sch // does not load lathe or extrude objects, it is possible to set the items // here. // For other solution possibilities, see task description. @@ -3533,7 +3534,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() if( mpObj.is() && mpObj->GetObjInventor() == SdrInventor) { - const UINT16 nIdent = mpObj->GetObjIdentifier(); + const sal_uInt16 nIdent = mpObj->GetObjIdentifier(); switch(nIdent) { @@ -4125,7 +4126,7 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames() else if( mpObj.is() && mpObj->GetObjInventor() == FmFormInventor) { #if OSL_DEBUG_LEVEL > 0 - const UINT16 nIdent = mpObj->GetObjIdentifier(); + const sal_uInt16 nIdent = mpObj->GetObjIdentifier(); OSL_ENSURE( nIdent == OBJ_UNO, "SvxShape::_getSupportedServiceNames: FmFormInventor, but no UNO object?" ); #endif static uno::Sequence< OUString > *pSeq = 0; diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 04770faf694b..2d82868512c5 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -105,14 +105,14 @@ private: SvxDrawOutlinerViewForwarder* mpViewForwarder; // if non-NULL, use GetViewModeTextForwarder text forwarder css::uno::Reference< css::linguistic2::XLinguServiceManager > m_xLinguServiceManager; Point maTextOffset; - BOOL mbDataValid; - BOOL mbDestroyed; - BOOL mbIsLocked; - BOOL mbNeedsUpdate; - BOOL mbOldUndoMode; - BOOL mbForwarderIsEditMode; // have to reflect that, since ENDEDIT can happen more often - BOOL mbShapeIsEditMode; // #104157# only true, if HINT_BEGEDIT was received - BOOL mbNotificationsDisabled; // prevent EditEngine/Outliner notifications (e.g. when setting up forwarder) + sal_Bool mbDataValid; + sal_Bool mbDestroyed; + sal_Bool mbIsLocked; + sal_Bool mbNeedsUpdate; + sal_Bool mbOldUndoMode; + sal_Bool mbForwarderIsEditMode; // have to reflect that, since ENDEDIT can happen more often + sal_Bool mbShapeIsEditMode; // #104157# only true, if HINT_BEGEDIT was received + sal_Bool mbNotificationsDisabled; // prevent EditEngine/Outliner notifications (e.g. when setting up forwarder) XInterface* mpOwner; SvxUnoTextRangeBaseList maTextRanges; @@ -122,7 +122,6 @@ private: SvxDrawOutlinerViewForwarder* CreateViewForwarder(); void SetupOutliner(); - void UpdateOutliner(); sal_Bool HasView() const { return mpView ? sal_True : sal_False; } sal_Bool IsEditMode() const @@ -157,7 +156,7 @@ public: void lock(); void unlock(); - BOOL IsValid() const; + sal_Bool IsValid() const; Rectangle GetVisArea(); Point LogicToPixel( const Point&, const MapMode& rMapMode ); @@ -168,6 +167,8 @@ public: virtual void ObjectInDestruction(const SdrObject& rObject); void ChangeModel( SdrModel* pNewModel ); + + void UpdateOutliner(); }; //------------------------------------------------------------------------ @@ -182,14 +183,14 @@ SvxTextEditSourceImpl::SvxTextEditSourceImpl( SdrObject* pObject, SdrText* pText mpOutliner ( NULL ), mpTextForwarder ( NULL ), mpViewForwarder ( NULL ), - mbDataValid ( FALSE ), - mbDestroyed ( FALSE ), - mbIsLocked ( FALSE ), - mbNeedsUpdate ( FALSE ), - mbOldUndoMode ( FALSE ), - mbForwarderIsEditMode ( FALSE ), - mbShapeIsEditMode ( FALSE ), - mbNotificationsDisabled ( FALSE ), + mbDataValid ( sal_False ), + mbDestroyed ( sal_False ), + mbIsLocked ( sal_False ), + mbNeedsUpdate ( sal_False ), + mbOldUndoMode ( sal_False ), + mbForwarderIsEditMode ( sal_False ), + mbShapeIsEditMode ( sal_False ), + mbNotificationsDisabled ( sal_False ), mpOwner( pOwner ) { DBG_ASSERT( mpObject, "invalid pObject!" ); @@ -220,14 +221,14 @@ SvxTextEditSourceImpl::SvxTextEditSourceImpl( SdrObject& rObject, SdrText* pText mpOutliner ( NULL ), mpTextForwarder ( NULL ), mpViewForwarder ( NULL ), - mbDataValid ( FALSE ), - mbDestroyed ( FALSE ), - mbIsLocked ( FALSE ), - mbNeedsUpdate ( FALSE ), - mbOldUndoMode ( FALSE ), - mbForwarderIsEditMode ( FALSE ), - mbShapeIsEditMode ( TRUE ), - mbNotificationsDisabled ( FALSE ), + mbDataValid ( sal_False ), + mbDestroyed ( sal_False ), + mbIsLocked ( sal_False ), + mbNeedsUpdate ( sal_False ), + mbOldUndoMode ( sal_False ), + mbForwarderIsEditMode ( sal_False ), + mbShapeIsEditMode ( sal_True ), + mbNotificationsDisabled ( sal_False ), mpOwner(0) { if( !mpText ) @@ -368,7 +369,7 @@ void SvxTextEditSourceImpl::Notify( SfxBroadcaster&, const SfxHint& rHint ) { case HINT_OBJCHG: { - mbDataValid = FALSE; // Text muss neu geholt werden + mbDataValid = sal_False; // Text muss neu geholt werden if( HasView() ) { @@ -400,7 +401,7 @@ void SvxTextEditSourceImpl::Notify( SfxBroadcaster&, const SfxHint& rHint ) mpView->GetTextEditOutliner()->SetNotifyHdl( LINK(this, SvxTextEditSourceImpl, NotifyHdl) ); // #104157# Only now we're really in edit mode - mbShapeIsEditMode = TRUE; + mbShapeIsEditMode = sal_True; Broadcast( *pSdrHint ); } @@ -412,7 +413,7 @@ void SvxTextEditSourceImpl::Notify( SfxBroadcaster&, const SfxHint& rHint ) Broadcast( *pSdrHint ); // #104157# We're no longer in edit mode - mbShapeIsEditMode = FALSE; + mbShapeIsEditMode = sal_False; // remove as listener - outliner might outlive ourselves if( mpView && mpView->GetTextEditOutliner() ) @@ -564,7 +565,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder() if( mpOutliner == NULL ) { SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, mpObject ); - USHORT nOutlMode = OUTLINERMODE_TEXTOBJECT; + sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT; if( pTextObj && pTextObj->IsTextFrame() && pTextObj->GetTextKind() == OBJ_OUTLINETEXT ) nOutlMode = OUTLINERMODE_OUTLINEOBJECT; @@ -637,7 +638,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder() // #91254# put text to object and set EmptyPresObj to FALSE if( mpText && bOwnParaObj && pOutlinerParaObject && mpObject->IsEmptyPresObj() && pTextObj->IsRealyEdited() ) { - mpObject->SetEmptyPresObj( FALSE ); + mpObject->SetEmptyPresObj( sal_False ); static_cast< SdrTextObj* >( mpObject)->NbcSetOutlinerParaObjectForText( pOutlinerParaObject, mpText ); // #i103982# Here, due to mpObject->NbcSetOutlinerParaObjectForText, we LOSE ownership of the @@ -678,7 +679,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder() } } - mbDataValid = TRUE; + mbDataValid = sal_True; if( bOwnParaObj ) delete pOutlinerParaObject; @@ -911,9 +912,9 @@ void SvxTextEditSourceImpl::unlock() } } -BOOL SvxTextEditSourceImpl::IsValid() const +sal_Bool SvxTextEditSourceImpl::IsValid() const { - return mpView && mpWindow ? TRUE : FALSE; + return mpView && mpWindow ? sal_True : sal_False; } Rectangle SvxTextEditSourceImpl::GetVisArea() @@ -1108,7 +1109,7 @@ void SvxTextEditSource::unlock() mpImpl->unlock(); } -BOOL SvxTextEditSource::IsValid() const +sal_Bool SvxTextEditSource::IsValid() const { return mpImpl->IsValid(); } @@ -1147,3 +1148,8 @@ void SvxTextEditSource::ChangeModel( SdrModel* pNewModel ) { mpImpl->ChangeModel( pNewModel ); } + +void SvxTextEditSource::UpdateOutliner() +{ + mpImpl->UpdateOutliner(); +} diff --git a/svx/source/unodraw/unottabl.cxx b/svx/source/unodraw/unottabl.cxx index 46a84bf52fad..0f277467bd1f 100644 --- a/svx/source/unodraw/unottabl.cxx +++ b/svx/source/unodraw/unottabl.cxx @@ -84,7 +84,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTransGradientTable::getSupportedService NameOrIndex* SvxUnoTransGradientTable::createItem() const throw() { XFillFloatTransparenceItem* pNewItem = new XFillFloatTransparenceItem(); - pNewItem->SetEnabled( TRUE ); + pNewItem->SetEnabled( sal_True ); return pNewItem; } |