summaryrefslogtreecommitdiff
path: root/sw/source/core/ole
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2011-01-17 15:06:54 +0100
committerCarsten Driesner <cd@openoffice.org>2011-01-17 15:06:54 +0100
commit7f33ed417b2e29e5470724ea76967f64699a2662 (patch)
treeabfa1432c5ffffe4c7502d4ddcaee918c584c69c /sw/source/core/ole
parent80731dbfcb48a2ffec30a4b2abe1ba8ada8f0169 (diff)
removetooltypes01: #i112600# Remove tools types from sw
Diffstat (limited to 'sw/source/core/ole')
-rw-r--r--sw/source/core/ole/ndole.cxx72
1 files changed, 36 insertions, 36 deletions
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 1cd0fdd02830..4ade385982f7 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -91,7 +91,7 @@ public:
virtual void Commit();
void Load();
- void SetInUnload( BOOL bFlag ) { bInUnload = bFlag; }
+ void SetInUnload( sal_Bool bFlag ) { bInUnload = bFlag; }
using SvPtrarr::Count;
void InsertObj( SwOLEObj& rObj );
@@ -99,7 +99,7 @@ public:
void RemovePtr( SwOLEObj* pObj )
{
- USHORT nPos = SvPtrarr::GetPos( pObj );
+ sal_uInt16 nPos = SvPtrarr::GetPos( pObj );
if( USHRT_MAX != nPos )
SvPtrarr::Remove( nPos );
}
@@ -187,7 +187,7 @@ SwEmbedObjectLink::SwEmbedObjectLink(SwOLENode* pNode):
::sfx2::SvBaseLink( ::sfx2::LINKUPDATE_ONCALL, SOT_FORMATSTR_ID_SVXB ),
pOleNode(pNode)
{
- SetSynchron( FALSE );
+ SetSynchron( sal_False );
}
// -----------------------------------------------------------------------------
@@ -252,7 +252,7 @@ SwOLENode::SwOLENode( const SwNodeIndex &rWhere,
SwNoTxtNode( rWhere, ND_OLENODE, pGrfColl, pAutoAttr ),
aOLEObj( xObj ),
pGraphic(0),
- bOLESizeInvalid( FALSE ),
+ bOLESizeInvalid( sal_False ),
mpObjectLink( NULL )
{
aOLEObj.SetNode( this );
@@ -266,7 +266,7 @@ SwOLENode::SwOLENode( const SwNodeIndex &rWhere,
SwNoTxtNode( rWhere, ND_OLENODE, pGrfColl, pAutoAttr ),
aOLEObj( rString, nAspect ),
pGraphic(0),
- bOLESizeInvalid( FALSE ),
+ bOLESizeInvalid( sal_False ),
mpObjectLink( NULL )
{
aOLEObj.SetNode( this );
@@ -293,13 +293,13 @@ Graphic* SwOLENode::GetHCGraphic()
SwCntntNode *SwOLENode::SplitCntntNode( const SwPosition & )
{
// OLE-Objecte vervielfaeltigen ??
- ASSERT( FALSE, "OleNode: can't split." );
+ ASSERT( sal_False, "OleNode: can't split." );
return this;
}
// Laden eines in den Undo-Bereich verschobenen OLE-Objekts
-BOOL SwOLENode::RestorePersistentData()
+sal_Bool SwOLENode::RestorePersistentData()
{
DBG_ASSERT( aOLEObj.GetOleRef().is(), "No object to restore!" );
if ( aOLEObj.xOLERef.is() )
@@ -335,11 +335,11 @@ BOOL SwOLENode::RestorePersistentData()
}
}
- return TRUE;
+ return sal_True;
}
// OLE object is transported into UNDO area
-BOOL SwOLENode::SavePersistentData()
+sal_Bool SwOLENode::SavePersistentData()
{
if( aOLEObj.xOLERef.is() )
{
@@ -379,7 +379,7 @@ BOOL SwOLENode::SavePersistentData()
DisconnectFileLink_Impl();
- return TRUE;
+ return sal_True;
}
@@ -469,32 +469,32 @@ SwCntntNode* SwOLENode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
pOLENd->SetContour( HasContour(), HasAutomaticContour() );
pOLENd->SetAspect( GetAspect() ); // the replacement image must be already copied
- pOLENd->SetOLESizeInvalid( TRUE );
+ pOLENd->SetOLESizeInvalid( sal_True );
pDoc->SetOLEPrtNotifyPending();
return pOLENd;
}
-BOOL SwOLENode::IsInGlobalDocSection() const
+sal_Bool SwOLENode::IsInGlobalDocSection() const
{
// suche den "Body Anchor"
- ULONG nEndExtraIdx = GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndExtraIdx = GetNodes().GetEndOfExtras().GetIndex();
const SwNode* pAnchorNd = this;
do {
SwFrmFmt* pFlyFmt = pAnchorNd->GetFlyFmt();
if( !pFlyFmt )
- return FALSE;
+ return sal_False;
const SwFmtAnchor& rAnchor = pFlyFmt->GetAnchor();
if( !rAnchor.GetCntntAnchor() )
- return FALSE;
+ return sal_False;
pAnchorNd = &rAnchor.GetCntntAnchor()->nNode.GetNode();
} while( pAnchorNd->GetIndex() < nEndExtraIdx );
const SwSectionNode* pSectNd = pAnchorNd->FindSectionNode();
if( !pSectNd )
- return FALSE;
+ return sal_False;
while( pSectNd )
{
@@ -509,9 +509,9 @@ BOOL SwOLENode::IsInGlobalDocSection() const
pSectNd->GetIndex() > nEndExtraIdx;
}
-BOOL SwOLENode::IsOLEObjectDeleted() const
+sal_Bool SwOLENode::IsOLEObjectDeleted() const
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aOLEObj.xOLERef.is() )
{
SfxObjectShell* p = GetDoc()->GetPersist();
@@ -662,7 +662,7 @@ SwOLEObj::SwOLEObj( const svt::EmbeddedObjectRef& xObj ) :
pListener( 0 ),
xOLERef( xObj )
{
- xOLERef.Lock( TRUE );
+ xOLERef.Lock( sal_True );
if ( xObj.is() )
{
pListener = new SwOLEListener_Impl( this );
@@ -677,7 +677,7 @@ SwOLEObj::SwOLEObj( const String &rString, sal_Int64 nAspect ) :
pListener( 0 ),
aName( rString )
{
- xOLERef.Lock( TRUE );
+ xOLERef.Lock( sal_True );
xOLERef.SetViewAspect( nAspect );
}
@@ -717,7 +717,7 @@ SwOLEObj::~SwOLEObj()
// unlock object so that object can be closed in RemoveEmbeddedObject
// successful closing of the object will automatically clear the reference then
- xOLERef.Lock(FALSE);
+ xOLERef.Lock(sal_False);
// Always remove object from conteiner it is connected to
try
@@ -776,7 +776,7 @@ void SwOLEObj::SetNode( SwOLENode* pNode )
}
}
-BOOL SwOLEObj::IsOleRef() const
+sal_Bool SwOLEObj::IsOleRef() const
{
return xOLERef.is();
}
@@ -839,9 +839,9 @@ svt::EmbeddedObjectRef& SwOLEObj::GetObject()
return xOLERef;
}
-BOOL SwOLEObj::UnloadObject()
+sal_Bool SwOLEObj::UnloadObject()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
//Nicht notwendig im Doc DTor (MM)
//ASSERT( pOLERef && pOLERef->Is() && 1 < (*pOLERef)->GetRefCount(),
// "Falscher RefCount fuers Unload" );
@@ -854,14 +854,14 @@ BOOL SwOLEObj::UnloadObject()
return bRet;
}
-BOOL SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > xObj, const SwDoc* pDoc, sal_Int64 nAspect )
+sal_Bool SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > xObj, const SwDoc* pDoc, sal_Int64 nAspect )
{
if ( !pDoc )
- return FALSE;
+ return sal_False;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
sal_Int32 nState = xObj.is() ? xObj->getCurrentState() : embed::EmbedStates::LOADED;
- BOOL bIsActive = ( nState != embed::EmbedStates::LOADED && nState != embed::EmbedStates::RUNNING );
+ sal_Bool bIsActive = ( nState != embed::EmbedStates::LOADED && nState != embed::EmbedStates::RUNNING );
sal_Int64 nMiscStatus = xObj->getStatus( nAspect );
if( nState != embed::EmbedStates::LOADED && !pDoc->IsInDtor() && !bIsActive &&
@@ -891,11 +891,11 @@ BOOL SwOLEObj::UnloadObject( uno::Reference< embed::XEmbeddedObject > xObj, cons
}
catch ( uno::Exception& )
{
- bRet = FALSE;
+ bRet = sal_False;
}
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
}
@@ -965,8 +965,8 @@ void SwOLELRUCache::Load()
if( nVal < nLRU_InitSize )
{
// size of cache has been changed
- USHORT nCount = SvPtrarr::Count();
- USHORT nPos = nCount;
+ sal_uInt16 nCount = SvPtrarr::Count();
+ sal_uInt16 nPos = nCount;
// try to remove the last entries until new maximum size is reached
while( nCount > nVal )
@@ -980,14 +980,14 @@ void SwOLELRUCache::Load()
}
}
- nLRU_InitSize = (USHORT)nVal;
+ nLRU_InitSize = (sal_uInt16)nVal;
}
}
void SwOLELRUCache::InsertObj( SwOLEObj& rObj )
{
SwOLEObj* pObj = &rObj;
- USHORT nPos = SvPtrarr::GetPos( pObj );
+ sal_uInt16 nPos = SvPtrarr::GetPos( pObj );
if( nPos )
{
// object is currently not the first in cache
@@ -997,7 +997,7 @@ void SwOLELRUCache::InsertObj( SwOLEObj& rObj )
SvPtrarr::Insert( pObj, 0 );
// try to remove objects if necessary (of course not the freshly inserted one at nPos=0)
- USHORT nCount = SvPtrarr::Count();
+ sal_uInt16 nCount = SvPtrarr::Count();
nPos = nCount-1;
while( nPos && nCount > nLRU_InitSize )
{
@@ -1010,7 +1010,7 @@ void SwOLELRUCache::InsertObj( SwOLEObj& rObj )
void SwOLELRUCache::RemoveObj( SwOLEObj& rObj )
{
- USHORT nPos = SvPtrarr::GetPos( &rObj );
+ sal_uInt16 nPos = SvPtrarr::GetPos( &rObj );
if ( nPos != 0xFFFF )
SvPtrarr::Remove( nPos );
if( !Count() )