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 /sfx2/source/appl/lnkbase2.cxx | |
parent | 5b3e910e926c7dd1e8dcfe8e0a5c6cb5bd17480a (diff) | |
parent | cd0d6a5a6775f197fdb7e78b54c8133074a7a236 (diff) |
rebase to DEV300_m100
Diffstat (limited to 'sfx2/source/appl/lnkbase2.cxx')
-rw-r--r-- | sfx2/source/appl/lnkbase2.cxx | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index 6a51783a8a04..95c24e4a77ab 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -49,7 +49,7 @@ namespace sfx2 TYPEINIT0( SvBaseLink ) -static DdeTopic* FindTopic( const String &, USHORT* = 0 ); +static DdeTopic* FindTopic( const String &, sal_uInt16* = 0 ); class ImplDdeItem; @@ -78,10 +78,10 @@ struct ImplBaseLinkData struct tClientType { // gilt fuer alle Links - ULONG nCntntType; // Update Format + sal_uIntPtr nCntntType; // Update Format // nicht Ole-Links - BOOL bIntrnlLnk; // ist es ein interner Link - USHORT nUpdateMode;// UpdateMode + sal_Bool bIntrnlLnk; // ist es ein interner Link + sal_uInt16 nUpdateMode;// UpdateMode }; struct tDDEType @@ -96,7 +96,7 @@ struct ImplBaseLinkData ImplBaseLinkData() { ClientType.nCntntType = 0; - ClientType.bIntrnlLnk = FALSE; + ClientType.bIntrnlLnk = sal_False; ClientType.nUpdateMode = 0; DDEType.pItem = NULL; } @@ -108,26 +108,26 @@ class ImplDdeItem : public DdeGetPutItem SvBaseLink* pLink; DdeData aData; Sequence< sal_Int8 > aSeq; // Datacontainer for DdeData !!! - BOOL bIsValidData : 1; - BOOL bIsInDTOR : 1; + sal_Bool bIsValidData : 1; + sal_Bool bIsInDTOR : 1; public: ImplDdeItem( SvBaseLink& rLink, const String& rStr ) - : DdeGetPutItem( rStr ), pLink( &rLink ), bIsValidData( FALSE ), - bIsInDTOR( FALSE ) + : DdeGetPutItem( rStr ), pLink( &rLink ), bIsValidData( sal_False ), + bIsInDTOR( sal_False ) {} virtual ~ImplDdeItem(); - virtual DdeData* Get( ULONG ); - virtual BOOL Put( const DdeData* ); - virtual void AdviseLoop( BOOL ); + virtual DdeData* Get( sal_uIntPtr ); + virtual sal_Bool Put( const DdeData* ); + virtual void AdviseLoop( sal_Bool ); void Notify() { - bIsValidData = FALSE; + bIsValidData = sal_False; DdeGetPutItem::NotifyClient(); } - BOOL IsInDTOR() const { return bIsInDTOR; } + sal_Bool IsInDTOR() const { return bIsInDTOR; } }; @@ -142,8 +142,8 @@ SvBaseLink::SvBaseLink() pImpl = new BaseLink_Impl(); nObjType = OBJECT_CLIENT_SO; pImplData = new ImplBaseLinkData; - bVisible = bSynchron = bUseCache = TRUE; - bWasLastEditOK = FALSE; + bVisible = bSynchron = bUseCache = sal_True; + bWasLastEditOK = sal_False; } /************************************************************************ @@ -152,18 +152,18 @@ SvBaseLink::SvBaseLink() |* Beschreibung *************************************************************************/ -SvBaseLink::SvBaseLink( USHORT nUpdateMode, ULONG nContentType ) +SvBaseLink::SvBaseLink( sal_uInt16 nUpdateMode, sal_uIntPtr nContentType ) { pImpl = new BaseLink_Impl(); nObjType = OBJECT_CLIENT_SO; pImplData = new ImplBaseLinkData; - bVisible = bSynchron = bUseCache = TRUE; - bWasLastEditOK = FALSE; + bVisible = bSynchron = bUseCache = sal_True; + bWasLastEditOK = sal_False; // falls es ein Ole-Link wird, pImplData->ClientType.nUpdateMode = nUpdateMode; pImplData->ClientType.nCntntType = nContentType; - pImplData->ClientType.bIntrnlLnk = FALSE; + pImplData->ClientType.bIntrnlLnk = sal_False; } /************************************************************************ @@ -172,10 +172,10 @@ SvBaseLink::SvBaseLink( USHORT nUpdateMode, ULONG nContentType ) |* Beschreibung *************************************************************************/ -SvBaseLink::SvBaseLink( const String& rLinkName, USHORT nObjectType, SvLinkSource* pObj ) +SvBaseLink::SvBaseLink( const String& rLinkName, sal_uInt16 nObjectType, SvLinkSource* pObj ) { - bVisible = bSynchron = bUseCache = TRUE; - bWasLastEditOK = FALSE; + bVisible = bSynchron = bUseCache = sal_True; + bWasLastEditOK = sal_False; aLinkName = rLinkName; pImplData = new ImplBaseLinkData; nObjType = nObjectType; @@ -188,7 +188,7 @@ SvBaseLink::SvBaseLink( const String& rLinkName, USHORT nObjectType, SvLinkSourc if( OBJECT_DDE_EXTERN == nObjType ) { - USHORT nItemStt = 0; + sal_uInt16 nItemStt = 0; DdeTopic* pTopic = FindTopic( aLinkName, &nItemStt ); if( pTopic ) { @@ -248,7 +248,7 @@ IMPL_LINK( SvBaseLink, EndEditHdl, String*, _pNewName ) |* Beschreibung *************************************************************************/ -void SvBaseLink::SetObjType( USHORT nObjTypeP ) +void SvBaseLink::SetObjType( sal_uInt16 nObjTypeP ) { DBG_ASSERT( nObjType != OBJECT_CLIENT_DDE, "type already set" ); DBG_ASSERT( !xObj.Is(), "object exist" ); @@ -333,7 +333,7 @@ String SvBaseLink::GetLinkSourceName() const |* Beschreibung *************************************************************************/ -void SvBaseLink::SetUpdateMode( USHORT nMode ) +void SvBaseLink::SetUpdateMode( sal_uInt16 nMode ) { if( ( OBJECT_CLIENT_SO & nObjType ) && pImplData->ClientType.nUpdateMode != nMode ) @@ -358,7 +358,7 @@ void SvBaseLink::clearStreamToLoadFrom() } // <-- -BOOL SvBaseLink::Update() +sal_Bool SvBaseLink::Update() { if( OBJECT_CLIENT_SO & nObjType ) { @@ -383,13 +383,13 @@ BOOL SvBaseLink::Update() if( OBJECT_CLIENT_DDE == nObjType && LINKUPDATE_ONCALL == GetUpdateMode() && xObj.Is() ) xObj->RemoveAllDataAdvise( this ); - return TRUE; + return sal_True; } if( xObj.Is() ) { // sollten wir asynschron sein? if( xObj->IsPending() ) - return TRUE; + return sal_True; // dann brauchen wir das Object auch nicht mehr AddNextRef(); @@ -398,19 +398,19 @@ BOOL SvBaseLink::Update() } } } - return FALSE; + return sal_False; } -USHORT SvBaseLink::GetUpdateMode() const +sal_uInt16 SvBaseLink::GetUpdateMode() const { return ( OBJECT_CLIENT_SO & nObjType ) ? pImplData->ClientType.nUpdateMode - : sal::static_int_cast< USHORT >( LINKUPDATE_ONCALL ); + : sal::static_int_cast< sal_uInt16 >( LINKUPDATE_ONCALL ); } -void SvBaseLink::_GetRealObject( BOOL bConnect) +void SvBaseLink::_GetRealObject( sal_Bool bConnect) { if( !pImpl->m_pLinkMgr ) return; @@ -427,12 +427,12 @@ void SvBaseLink::_GetRealObject( BOOL bConnect) nObjType = OBJECT_INTERN; xObj = pImpl->m_pLinkMgr->CreateObj( this ); - pImplData->ClientType.bIntrnlLnk = TRUE; + pImplData->ClientType.bIntrnlLnk = sal_True; nObjType = OBJECT_CLIENT_DDE; // damit wir wissen was es mal war !! } else { - pImplData->ClientType.bIntrnlLnk = FALSE; + pImplData->ClientType.bIntrnlLnk = sal_False; xObj = pImpl->m_pLinkMgr->CreateObj( this ); } } @@ -443,7 +443,7 @@ void SvBaseLink::_GetRealObject( BOOL bConnect) Disconnect(); } -ULONG SvBaseLink::GetContentType() const +sal_uIntPtr SvBaseLink::GetContentType() const { if( OBJECT_CLIENT_SO & nObjType ) return pImplData->ClientType.nCntntType; @@ -452,14 +452,14 @@ ULONG SvBaseLink::GetContentType() const } -BOOL SvBaseLink::SetContentType( ULONG nType ) +sal_Bool SvBaseLink::SetContentType( sal_uIntPtr nType ) { if( OBJECT_CLIENT_SO & nObjType ) { pImplData->ClientType.nCntntType = nType; - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } LinkManager* SvBaseLink::GetLinkManager() @@ -530,7 +530,7 @@ void SvBaseLink::Edit( Window* pParent, const Link& rEndEditHdl ) if ( !bAsync ) { ExecuteEdit( String() ); - bWasLastEditOK = FALSE; + bWasLastEditOK = sal_False; if ( pImpl->m_aEndEditLink.IsSet() ) pImpl->m_aEndEditLink.Call( this ); } @@ -549,7 +549,7 @@ bool SvBaseLink::ExecuteEdit( const String& _rNewName ) { sError = SfxResId( STR_DDE_ERROR ); - USHORT nFndPos = sError.Search( '%' ); + sal_uInt16 nFndPos = sError.Search( '%' ); if( STRING_NOTFOUND != nFndPos ) { sError.Erase( nFndPos, 1 ).Insert( sApp, nFndPos ); @@ -592,14 +592,14 @@ FileDialogHelper* SvBaseLink::GetFileDialog( sal_uInt32 nFlags, const String& rF ImplDdeItem::~ImplDdeItem() { - bIsInDTOR = TRUE; + bIsInDTOR = sal_True; // damit im Disconnect nicht jemand auf die Idee kommt, den Pointer zu // loeschen!! SvBaseLinkRef aRef( pLink ); aRef->Disconnect(); } -DdeData* ImplDdeItem::Get( ULONG nFormat ) +DdeData* ImplDdeItem::Get( sal_uIntPtr nFormat ) { if( pLink->GetObj() ) { @@ -615,25 +615,25 @@ DdeData* ImplDdeItem::Get( ULONG nFormat ) { aData = DdeData( (const char *)aSeq.getConstArray(), aSeq.getLength(), nFormat ); - bIsValidData = TRUE; + bIsValidData = sal_True; return &aData; } } } aSeq.realloc( 0 ); - bIsValidData = FALSE; + bIsValidData = sal_False; return 0; } -BOOL ImplDdeItem::Put( const DdeData* ) +sal_Bool ImplDdeItem::Put( const DdeData* ) { DBG_ERROR( "ImplDdeItem::Put not implemented" ); - return FALSE; + return sal_False; } -void ImplDdeItem::AdviseLoop( BOOL bOpen ) +void ImplDdeItem::AdviseLoop( sal_Bool bOpen ) { // Verbindung wird geschlossen, also Link abmelden if( pLink->GetObj() ) @@ -658,13 +658,13 @@ void ImplDdeItem::AdviseLoop( BOOL bOpen ) } -static DdeTopic* FindTopic( const String & rLinkName, USHORT* pItemStt ) +static DdeTopic* FindTopic( const String & rLinkName, sal_uInt16* pItemStt ) { if( 0 == rLinkName.Len() ) return 0; String sNm( rLinkName ); - USHORT nTokenPos = 0; + sal_uInt16 nTokenPos = 0; String sService( sNm.GetToken( 0, cTokenSeperator, nTokenPos ) ); DdeServices& rSvc = DdeService::GetServices(); |