summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/viewfun5.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-03-10 16:55:21 -0500
committerKohei Yoshida <kyoshida@novell.com>2011-03-10 20:21:13 -0500
commit12343c15568dcc2c9209d8ca41fda2263122448f (patch)
tree3212a89c6cd8ea2e0aee7103aa9669bbb8a6f307 /sc/source/ui/view/viewfun5.cxx
parent99745dbcbb25b61437914c9782475d0b67a4b0bd (diff)
parentce6308e4fad2281241bf4ca78280eba29f744d43 (diff)
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Diffstat (limited to 'sc/source/ui/view/viewfun5.cxx')
-rw-r--r--sc/source/ui/view/viewfun5.cxx72
1 files changed, 36 insertions, 36 deletions
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 371688918df1..00d0d380eda6 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -86,12 +86,12 @@ using namespace com::sun::star;
//------------------------------------------------------------------
-BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
+sal_Bool ScViewFunc::PasteDataFormat( sal_uLong nFormatId,
const uno::Reference<datatransfer::XTransferable>& rxTransferable,
- SCCOL nPosX, SCROW nPosY, Point* pLogicPos, BOOL bLink, BOOL bAllowDialogs )
+ SCCOL nPosX, SCROW nPosY, Point* pLogicPos, sal_Bool bLink, sal_Bool bAllowDialogs )
{
ScDocument* pDoc = GetViewData()->GetDocument();
- pDoc->SetPastingDrawFromOtherDoc( TRUE );
+ pDoc->SetPastingDrawFromOtherDoc( sal_True );
Point aPos; // inserting position (1/100 mm)
if (pLogicPos)
@@ -99,7 +99,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
else
{
// inserting position isn't needed for text formats
- BOOL bIsTextFormat = ( ScImportExport::IsFormatSupported( nFormatId ) ||
+ sal_Bool bIsTextFormat = ( ScImportExport::IsFormatSupported( nFormatId ) ||
nFormatId == FORMAT_RTF );
if ( !bIsTextFormat )
{
@@ -111,13 +111,13 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
nXT += pDoc->GetColWidth(i,nTab);
if (pDoc->IsNegativePage(nTab))
nXT = -nXT;
- ULONG nYT = pDoc->GetRowHeight( 0, nPosY-1, nTab);
+ sal_uLong nYT = pDoc->GetRowHeight( 0, nPosY-1, nTab);
aPos = Point( (long)(nXT * HMM_PER_TWIPS), (long)(nYT * HMM_PER_TWIPS) );
}
}
TransferableDataHelper aDataHelper( rxTransferable );
- BOOL bRet = FALSE;
+ sal_Bool bRet = false;
//
// handle individual formats
@@ -173,10 +173,10 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
SetCursor( nPosX, nPosY );
Unmark();
PasteFromClip( IDF_ALL, pClipDoc,
- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
+ PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE,
bAllowDialogs );
delete pClipDoc;
- bRet = TRUE;
+ bRet = sal_True;
}
xDocShRef->DoClose();
@@ -191,7 +191,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
{
// try to get the replacement image from the clipboard
Graphic aGraphic;
- ULONG nGrFormat = 0;
+ sal_uLong nGrFormat = 0;
// insert replacement image ( if there is one ) into the object helper
if ( nGrFormat )
@@ -203,7 +203,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
else
PasteObject( aPos, xObj, &aObjDesc.maSize );
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -252,7 +252,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
{
// try to get the replacement image from the clipboard
Graphic aGraphic;
- ULONG nGrFormat = 0;
+ sal_uLong nGrFormat = 0;
// (wg. Selection Manager bei Trustet Solaris)
#ifndef SOLARIS
@@ -276,7 +276,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
// let object stay in loaded state after insertion
SdrOle2Obj::Unload( xObj, embed::Aspects::MSOLE_CONTENT );
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -296,7 +296,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
{
// use EditView's PasteSpecial / Drop
PasteRTF( nPosX, nPosY, rxTransferable );
- bRet = TRUE;
+ bRet = sal_True;
}
else
{
@@ -352,10 +352,10 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
// Content was partially pasted, which can be undone by
// the user though.
if (aObj.IsOverflow())
- bRet = FALSE;
+ bRet = false;
}
else
- bRet = TRUE;
+ bRet = sal_True;
// Yes, no failure, don't raise a "couldn't paste"
// dialog if user cancelled.
delete pDlg;
@@ -382,7 +382,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
ScDocShell* pDocSh = GetViewData()->GetDocShell();
SCTAB nTab = GetViewData()->GetTabNo();
- ClickCursor(nPosX, nPosY, FALSE); // set cursor position
+ ClickCursor(nPosX, nPosY, false); // set cursor position
// Creation of database area "Import1" isn't here, but in the DocShell
// slot execute, so it can be added to the undo action
@@ -398,7 +398,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
}
SfxStringItem aTarget(FN_PARAM_1, sTarget);
- BOOL bAreaIsNew = !pDBData;
+ sal_Bool bAreaIsNew = !pDBData;
SfxBoolItem aAreaNew(FN_PARAM_2, bAreaIsNew);
::svx::ODataAccessDescriptor aDesc;
@@ -416,7 +416,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
rDisp.Execute(SID_SBA_IMPORT, SFX_CALLMODE_ASYNCHRON,
&aDataDesc, &aTarget, &aAreaNew, pCursorItem.get(), (void*)0 );
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if (nFormatId == SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE)
@@ -459,8 +459,8 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
pScDrawView->InsertObjectSafe(pObj, *pScDrawView->GetSdrPageView());
- GetViewData()->GetViewShell()->SetDrawShell( TRUE );
- bRet = TRUE;
+ GetViewData()->GetViewShell()->SetDrawShell( sal_True );
+ bRet = sal_True;
}
}
}
@@ -507,9 +507,9 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
SvxDrawingLayerImport( pModel, xInputStream );
// set everything to right layer:
- ULONG nObjCount = 0;
- USHORT nPages = pModel->GetPageCount();
- for (USHORT i=0; i<nPages; i++)
+ sal_uLong nObjCount = 0;
+ sal_uInt16 nPages = pModel->GetPageCount();
+ for (sal_uInt16 i=0; i<nPages; i++)
{
SdrPage* pPage = pModel->GetPage(i);
SdrObjListIter aIter( *pPage, IM_DEEPWITHGROUPS );
@@ -529,7 +529,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
PasteDraw( aPos, pModel, (nObjCount > 1) ); // grouped if more than 1 object
delete pModel;
aDragShellRef->DoClose();
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if ( (nFormatId == SOT_FORMATSTR_ID_BIFF_5) || (nFormatId == SOT_FORMATSTR_ID_BIFF_8) )
@@ -579,17 +579,17 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
if ( pLogicPos )
{
// position specified (Drag&Drop) - change selection
- MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, FALSE, FALSE );
+ MoveCursorAbs( nPosX, nPosY, SC_FOLLOW_NONE, false, false );
Unmark();
}
pInsDoc->SetClipArea( aSource );
PasteFromClip( IDF_ALL, pInsDoc,
- PASTE_NOFUNC, FALSE, FALSE, FALSE, INS_NONE, IDF_NONE,
+ PASTE_NOFUNC, false, false, false, INS_NONE, IDF_NONE,
bAllowDialogs );
delete pInsDoc;
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -604,8 +604,8 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
FileList aFileList;
if ( aDataHelper.GetFileList( nFormatId, aFileList ) )
{
- ULONG nCount = aFileList.Count();
- for( ULONG i = 0; i < nCount ; i++ )
+ sal_uLong nCount = aFileList.Count();
+ for( sal_uLong i = 0; i < nCount ; i++ )
{
String aFile = aFileList.GetFile( i );
@@ -614,7 +614,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
aPos.X() += 400;
aPos.Y() += 400;
}
- bRet = TRUE;
+ bRet = sal_True;
}
}
else if ( nFormatId == SOT_FORMATSTR_ID_SOLK ||
@@ -625,7 +625,7 @@ BOOL ScViewFunc::PasteDataFormat( ULONG nFormatId,
bRet = PasteBookmark( nFormatId, rxTransferable, nPosX, nPosY );
}
- pDoc->SetPastingDrawFromOtherDoc( FALSE );
+ pDoc->SetPastingDrawFromOtherDoc( false );
return bRet;
}
@@ -640,7 +640,7 @@ ByteString lcl_GetSubString( sal_Char* pData, long nStart, long nDataSize )
return ByteString( pData + nStart );
}
-BOOL ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rxTransferable )
+sal_Bool ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rxTransferable )
{
TransferableDataHelper aDataHelper( rxTransferable );
@@ -651,13 +651,13 @@ BOOL ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rx
if ( !aDataHelper.GetSequence( SOT_FORMATSTR_ID_LINK, aSequence ) )
{
OSL_FAIL("DDE Data not found.");
- return FALSE;
+ return false;
}
// check size (only if string is available in transferable)
- USHORT nCols = 1;
- USHORT nRows = 1;
+ sal_uInt16 nCols = 1;
+ sal_uInt16 nRows = 1;
if ( aDataHelper.HasFormat( SOT_FORMAT_STRING ) )
{
String aDataStr;
@@ -730,7 +730,7 @@ BOOL ScViewFunc::PasteDDE( const uno::Reference<datatransfer::XTransferable>& rx
EnterMatrix( aFormula );
CursorPosChanged();
- return TRUE;
+ return sal_True;
}