diff options
Diffstat (limited to 'sc/source/ui/docshell/docsh4.cxx')
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 294 |
1 files changed, 147 insertions, 147 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index bba756b397cb..fe147466bd80 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -138,7 +138,7 @@ using namespace ::com::sun::star; Get(ATTR_PAGE_SHARED)).GetValue() #define IS_AVAILABLE(WhichId,ppItem) \ - (pReqArgs->GetItemState((WhichId), TRUE, ppItem ) == SFX_ITEM_SET) + (pReqArgs->GetItemState((WhichId), sal_True, ppItem ) == SFX_ITEM_SET) #define SC_PREVIEW_SIZE_X 10000 #define SC_PREVIEW_SIZE_Y 12400 @@ -154,9 +154,9 @@ void ScDocShell::Execute( SfxRequest& rReq ) const SfxItemSet* pReqArgs = rReq.GetArgs(); SfxBindings* pBindings = GetViewBindings(); - BOOL bUndo (aDocument.IsUndoEnabled()); + sal_Bool bUndo (aDocument.IsUndoEnabled()); - USHORT nSlot = rReq.GetSlot(); + sal_uInt16 nSlot = rReq.GetSlot(); switch ( nSlot ) { case SID_SC_SETTEXT: @@ -211,18 +211,18 @@ void ScDocShell::Execute( SfxRequest& rReq ) const SfxPoolItem* pItem; String sSbaData, sTarget; - if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET ) sSbaData = ((const SfxStringItem*)pItem)->GetValue(); - if ( pReqArgs->GetItemState( FN_PARAM_1, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( FN_PARAM_1, sal_True, &pItem ) == SFX_ITEM_SET ) sTarget = ((const SfxStringItem*)pItem)->GetValue(); - BOOL bIsNewArea = TRUE; // Default TRUE (keine Nachfrage) - if ( pReqArgs->GetItemState( FN_PARAM_2, TRUE, &pItem ) == SFX_ITEM_SET ) + sal_Bool bIsNewArea = sal_True; // Default sal_True (keine Nachfrage) + if ( pReqArgs->GetItemState( FN_PARAM_2, sal_True, &pItem ) == SFX_ITEM_SET ) bIsNewArea = ((const SfxBoolItem*)pItem)->GetValue(); ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > xResultSet; - if ( pReqArgs->GetItemState( FN_PARAM_3, FALSE, &pItem ) == SFX_ITEM_SET && pItem ) + if ( pReqArgs->GetItemState( FN_PARAM_3, sal_False, &pItem ) == SFX_ITEM_SET && pItem ) xResultSet.set(((const SfxUsrAnyItem*)pItem)->GetValue(),::com::sun::star::uno::UNO_QUERY); String sDBName = sSbaData.GetToken(0,cSbaSep); // Datenbankname @@ -230,7 +230,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) String sTabFlag = sSbaData.GetToken(2,cSbaSep); String sDBSql = sSbaData.GetToken(3,cSbaSep); // SQL im Klartext - BYTE nType = ScDbTable; // "0" oder "1" + sal_uInt8 nType = ScDbTable; // "0" oder "1" if ( sTabFlag.EqualsAscii("0") ) // "0" = Query, "1" = Table (Default) nType = ScDbQuery; @@ -248,17 +248,17 @@ void ScDocShell::Execute( SfxRequest& rReq ) } // bei Bedarf neuen Datenbankbereich anlegen - BOOL bMakeArea = FALSE; + sal_Bool bMakeArea = sal_False; if (bIsNewArea) { ScDBCollection* pDBColl = aDocument.GetDBCollection(); - USHORT nDummy; + sal_uInt16 nDummy; if ( !pDBColl || !pDBColl->SearchName( sTarget, nDummy ) ) { ScAddress aPos; if ( aPos.Parse( sTarget, &aDocument, aDocument.GetAddressConvention() ) & SCA_VALID ) { - bMakeArea = TRUE; + bMakeArea = sal_True; if (bUndo) { String aStrImport = ScGlobal::GetRscString( STR_UNDO_IMPORTDATA ); @@ -273,7 +273,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) } // nachfragen, bevor alter DB-Bereich ueberschrieben wird - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; if (!bIsNewArea) { String aTemplate = ScGlobal::GetRscString( STR_IMPORT_REPLACE ); @@ -288,7 +288,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (bDo) { ScDBDocFunc(*this).UpdateImport( sTarget, sDBName, - sDBTable, sDBSql, TRUE, nType, xResultSet, + sDBTable, sDBSql, sal_True, nType, xResultSet, pSelectionList ); rReq.Done(); @@ -312,19 +312,19 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (pReqArgs) { ScDocument* pDoc = GetDocument(); -// BOOL bUndo (pDoc->IsUndoEnabled()); +// sal_Bool bUndo (pDoc->IsUndoEnabled()); const SfxPoolItem* pItem; String aChartName, aRangeName; ScRange aSingleRange; ScRangeListRef aRangeListRef; - BOOL bMultiRange = FALSE; + sal_Bool bMultiRange = sal_False; - BOOL bColHeaders = TRUE; - BOOL bRowHeaders = TRUE; - BOOL bColInit = FALSE; - BOOL bRowInit = FALSE; - BOOL bAddRange = (nSlot == SID_CHART_ADDSOURCE); + sal_Bool bColHeaders = sal_True; + sal_Bool bRowHeaders = sal_True; + sal_Bool bColInit = sal_False; + sal_Bool bRowInit = sal_False; + sal_Bool bAddRange = (nSlot == SID_CHART_ADDSOURCE); if( IS_AVAILABLE( SID_CHART_NAME, &pItem ) ) aChartName = ((const SfxStringItem*)pItem)->GetValue(); @@ -335,25 +335,25 @@ void ScDocShell::Execute( SfxRequest& rReq ) if( IS_AVAILABLE( FN_PARAM_1, &pItem ) ) { bColHeaders = ((const SfxBoolItem*)pItem)->GetValue(); - bColInit = TRUE; + bColInit = sal_True; } if( IS_AVAILABLE( FN_PARAM_2, &pItem ) ) { bRowHeaders = ((const SfxBoolItem*)pItem)->GetValue(); - bRowInit = TRUE; + bRowInit = sal_True; } ScAddress::Details aDetails(pDoc->GetAddressConvention(), 0, 0); - BOOL bValid = ( aSingleRange.ParseAny( aRangeName, pDoc, aDetails ) & SCA_VALID ) != 0; + sal_Bool bValid = ( aSingleRange.ParseAny( aRangeName, pDoc, aDetails ) & SCA_VALID ) != 0; if (!bValid) { aRangeListRef = new ScRangeList; aRangeListRef->Parse( aRangeName, pDoc ); if ( aRangeListRef->Count() ) { - bMultiRange = TRUE; + bMultiRange = sal_True; aSingleRange = *aRangeListRef->GetObject(0); // fuer Header - bValid = TRUE; + bValid = sal_True; } else aRangeListRef.Clear(); @@ -375,7 +375,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) aDocument.LimitChartArea( nTab, nCol1,nRow1, nCol2,nRow2 ); // Dialog fuer Spalten/Zeilenkoepfe - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; if ( !bAddRange && ( !bColInit || !bRowInit ) ) { // Spalten/Zeilenkoepfe testen wie in chartarr @@ -383,13 +383,13 @@ void ScDocShell::Execute( SfxRequest& rReq ) { for (SCCOL i=nCol1; i<=nCol2 && bColHeaders; i++) if (aDocument.HasValueData( i, nRow1, nTab )) - bColHeaders = FALSE; + bColHeaders = sal_False; } if (!bRowInit) { for (SCROW i=nRow1; i<=nRow2 && bRowHeaders; i++) if (aDocument.HasValueData( nCol1, i, nTab )) - bRowHeaders = FALSE; + bRowHeaders = sal_False; } //CHINA001 ScColRowLabelDlg aDlg( pParent, bRowHeaders, bColHeaders ); @@ -407,7 +407,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) rReq.AppendItem(SfxBoolItem(FN_PARAM_2, bRowHeaders)); } else - bOk = FALSE; + bOk = sal_False; delete pDlg; //CHINA001 } @@ -452,9 +452,9 @@ void ScDocShell::Execute( SfxRequest& rReq ) case FID_AUTO_CALC: { - BOOL bNewVal; + sal_Bool bNewVal; const SfxPoolItem* pItem; - if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, TRUE, &pItem ) ) + if ( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( nSlot, sal_True, &pItem ) ) bNewVal = ((const SfxBoolItem*)pItem)->GetValue(); else bNewVal = !aDocument.GetAutoCalc(); // Toggle fuer Menue @@ -483,7 +483,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScLkUpdMode nSet=pDoc->GetLinkMode(); - USHORT nDlgRet=RET_NO; + sal_uInt16 nDlgRet=RET_NO; if(nSet==LM_UNKNOWN) { ScAppOptions aAppOptions=SC_MOD()->GetAppOptions(); @@ -526,7 +526,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) // wird nach dem Laden aufgerufen, wenn DB-Bereiche mit // weggelassenen Daten enthalten sind - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDBCollection* pDBColl = aDocument.GetDBCollection(); if ((nCanUpdate != com::sun::star::document::UpdateDocMode::NO_UPDATE) && @@ -541,7 +541,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScGlobal::GetRscString(STR_REIMPORT_AFTER_LOAD) ); if (aBox.Execute() == RET_YES) { - for (USHORT i=0; i<pDBColl->GetCount(); i++) + for (sal_uInt16 i=0; i<pDBColl->GetCount(); i++) { ScDBData* pDBData = (*pDBColl)[i]; if ( pDBData->IsStripData() && @@ -555,7 +555,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScImportParam aImportParam; pDBData->GetImportParam( aImportParam ); - BOOL bContinue = pViewSh->ImportData( aImportParam ); + sal_Bool bContinue = pViewSh->ImportData( aImportParam ); pDBData->SetImportParam( aImportParam ); // markieren (Groesse kann sich geaendert haben) @@ -576,7 +576,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) } } } - bDone = TRUE; + bDone = sal_True; } } } @@ -618,18 +618,18 @@ void ScDocShell::Execute( SfxRequest& rReq ) { // get argument (recorded macro) SFX_REQUEST_ARG( rReq, pItem, SfxBoolItem, FID_CHG_RECORD, sal_False ); - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; // xmlsec05/06: // getting real parent window when called from Security-Options TP Window* pParent = NULL; const SfxPoolItem* pParentItem; - if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) ) + if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, sal_False, &pParentItem ) ) pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); // desired state ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack(); - BOOL bActivateTracking = (pChangeTrack == 0); // toggle + sal_Bool bActivateTracking = (pChangeTrack == 0); // toggle if ( pItem ) bActivateTracking = pItem->GetValue(); // from argument @@ -659,7 +659,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { pDoc->StartChangeTracking(); ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges(TRUE); + aChangeViewSet.SetShowChanges(sal_True); pDoc->SetChangeViewSettings(aChangeViewSet); } @@ -669,7 +669,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) // Slots invalidieren if (pBindings) - pBindings->InvalidateAll(FALSE); + pBindings->InvalidateAll(sal_False); if ( !pItem ) rReq.AppendItem( SfxBoolItem( FID_CHG_RECORD, bActivateTracking ) ); rReq.Done(); @@ -684,7 +684,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { Window* pParent = NULL; const SfxPoolItem* pParentItem; - if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, FALSE, &pParentItem ) ) + if( pReqArgs && SFX_ITEM_SET == pReqArgs->GetItemState( SID_ATTR_XWINDOW, sal_False, &pParentItem ) ) pParent = ( ( const XWindowItem* ) pParentItem )->GetWindowPtr(); if ( ExecuteChangeProtectionDialog( pParent ) ) { @@ -699,7 +699,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) case SID_DOCUMENT_MERGE: case SID_DOCUMENT_COMPARE: { - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack(); if ( pChangeTrack && !pImpl->bIgnoreLostRedliningWarning ) { @@ -709,12 +709,12 @@ void ScDocShell::Execute( SfxRequest& rReq ) WinBits(WB_YES_NO | WB_DEF_NO), ScGlobal::GetRscString( STR_END_REDLINING ) ); if( aBox.Execute() == RET_YES ) - bDo = ExecuteChangeProtectionDialog( NULL, TRUE ); + bDo = ExecuteChangeProtectionDialog( NULL, sal_True ); else - bDo = FALSE; + bDo = sal_False; } else // merge might reject some actions - bDo = ExecuteChangeProtectionDialog( NULL, TRUE ); + bDo = ExecuteChangeProtectionDialog( NULL, sal_True ); } if ( !bDo ) { @@ -725,25 +725,25 @@ void ScDocShell::Execute( SfxRequest& rReq ) const SfxPoolItem* pItem; SfxMedium* pMed = NULL; if ( pReqArgs && - pReqArgs->GetItemState( SID_FILE_NAME, TRUE, &pItem ) == SFX_ITEM_SET && + pReqArgs->GetItemState( SID_FILE_NAME, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA(SfxStringItem) ) { String aFileName = ((const SfxStringItem*)pItem)->GetValue(); String aFilterName; - if ( pReqArgs->GetItemState( SID_FILTER_NAME, TRUE, &pItem ) == SFX_ITEM_SET && + if ( pReqArgs->GetItemState( SID_FILTER_NAME, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA(SfxStringItem) ) { aFilterName = ((const SfxStringItem*)pItem)->GetValue(); } String aOptions; - if ( pReqArgs->GetItemState( SID_FILE_FILTEROPTIONS, TRUE, &pItem ) == SFX_ITEM_SET && + if ( pReqArgs->GetItemState( SID_FILE_FILTEROPTIONS, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA(SfxStringItem) ) { aOptions = ((const SfxStringItem*)pItem)->GetValue(); } short nVersion = 0; - if ( pReqArgs->GetItemState( SID_VERSION, TRUE, &pItem ) == SFX_ITEM_SET && + if ( pReqArgs->GetItemState( SID_VERSION, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA(SfxInt16Item) ) { nVersion = ((const SfxInt16Item*)pItem)->GetValue(); @@ -751,7 +751,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) // kein Filter angegeben -> Detection if ( !aFilterName.Len() ) - ScDocumentLoader::GetFilterName( aFileName, aFilterName, aOptions, TRUE, FALSE ); + ScDocumentLoader::GetFilterName( aFileName, aFilterName, aOptions, sal_True, sal_False ); // filter name from dialog contains application prefix, // GetFilter needs name without the prefix. @@ -763,7 +763,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) pSet->Put( SfxStringItem( SID_FILE_FILTEROPTIONS, aOptions ) ); if ( nVersion != 0 ) pSet->Put( SfxInt16Item( SID_VERSION, nVersion ) ); - pMed = new SfxMedium( aFileName, STREAM_STD_READ, FALSE, pFilter, pSet ); + pMed = new SfxMedium( aFileName, STREAM_STD_READ, sal_False, pFilter, pSet ); } else { @@ -785,14 +785,14 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScDocShell* pOtherDocSh = new ScDocShell; SfxObjectShellRef aDocShTablesRef = pOtherDocSh; pOtherDocSh->DoLoad( pMed ); - ULONG nErr = pOtherDocSh->GetErrorCode(); + sal_uLong nErr = pOtherDocSh->GetErrorCode(); if (nErr) ErrorHandler::HandleError( nErr ); // auch Warnings if ( !pOtherDocSh->GetError() ) // nur Errors { - BOOL bHadTrack = ( aDocument.GetChangeTrack() != NULL ); - ULONG nStart = 0; + sal_Bool bHadTrack = ( aDocument.GetChangeTrack() != NULL ); + sal_uLong nStart = 0; if ( nSlot == SID_DOCUMENT_MERGE && pChangeTrack ) { nStart = pChangeTrack->GetActionMax() + 1; @@ -810,7 +810,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) SfxViewFrame* pViewFrm = SfxViewFrame::Current(); if ( pViewFrm ) { - pViewFrm->ShowChildWindow( ScAcceptChgDlgWrapper::GetChildWindowId(), TRUE ); //@51669 + pViewFrm->ShowChildWindow( ScAcceptChgDlgWrapper::GetChildWindowId(), sal_True ); //@51669 } if ( pBindings ) { @@ -827,19 +827,19 @@ void ScDocShell::Execute( SfxRequest& rReq ) if ( !pOldSet || !pOldSet->ShowChanges() ) { ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges(TRUE); + aChangeViewSet.SetShowChanges(sal_True); aDocument.SetChangeViewSettings(aChangeViewSet); } } else if ( nSlot == SID_DOCUMENT_MERGE && IsDocShared() && pChangeTrack ) { - ULONG nEnd = pChangeTrack->GetActionMax(); + sal_uLong nEnd = pChangeTrack->GetActionMax(); if ( nEnd >= nStart ) { // only show changes from merged document ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges( TRUE ); - aChangeViewSet.SetShowAccepted( TRUE ); + aChangeViewSet.SetShowChanges( sal_True ); + aChangeViewSet.SetShowAccepted( sal_True ); aChangeViewSet.SetHasActionRange( true ); aChangeViewSet.SetTheActionRange( nStart, nEnd ); aDocument.SetChangeViewSettings( aChangeViewSet ); @@ -859,7 +859,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (pReqArgs) { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET ) { if ( pItem->ISA(SfxStringItem) ) { @@ -887,7 +887,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) case SID_EDIT_SCENARIO: { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET ) { if ( pItem->ISA(SfxStringItem) ) { @@ -899,7 +899,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; aDocument.GetScenarioData( nTab, aComment, aColor, nFlags ); // Determine if the Sheet that the Scenario was created on @@ -911,15 +911,15 @@ void ScDocShell::Execute( SfxRequest& rReq ) nActualTab--; } while(aDocument.IsScenario(nActualTab)); - BOOL bSheetProtected = aDocument.IsTabProtected(nActualTab); + sal_Bool bSheetProtected = aDocument.IsTabProtected(nActualTab); //! anderen Titel am Dialog setzen //CHINA001 ScNewScenarioDlg* pNewDlg = -//CHINA001 new ScNewScenarioDlg( GetActiveDialogParent(), aName, TRUE, bSheetProtected); +//CHINA001 new ScNewScenarioDlg( GetActiveDialogParent(), aName, sal_True, bSheetProtected); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "ScAbstractFactory create fail!");//CHINA001 - AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( GetActiveDialogParent(), aName, RID_SCDLG_NEWSCENARIO, TRUE,bSheetProtected); + AbstractScNewScenarioDlg* pNewDlg = pFact->CreateScNewScenarioDlg( GetActiveDialogParent(), aName, RID_SCDLG_NEWSCENARIO, sal_True,bSheetProtected); DBG_ASSERT(pNewDlg, "Dialog create fail!");//CHINA001 pNewDlg->SetScenarioData( aName, aComment, aColor, nFlags ); if ( pNewDlg->Execute() == RET_OK ) @@ -939,11 +939,11 @@ void ScDocShell::Execute( SfxRequest& rReq ) case SID_ATTR_YEAR2000 : { const SfxPoolItem* pItem; - if ( pReqArgs->GetItemState( nSlot, TRUE, &pItem ) == SFX_ITEM_SET ) + if ( pReqArgs->GetItemState( nSlot, sal_True, &pItem ) == SFX_ITEM_SET ) { if ( pItem->ISA(SfxUInt16Item) ) { - UINT16 nY2k = ((SfxUInt16Item*)pItem)->GetValue(); + sal_uInt16 nY2k = ((SfxUInt16Item*)pItem)->GetValue(); // immer an den DocOptions setzen, damit das auch fuer SO50 // gespeichert wird (und alle Abfragen bisher auch darauf laufen). // SetDocOptions propagiert das an den NumberFormatter @@ -1170,15 +1170,15 @@ void UpdateAcceptChangesDialog() //------------------------------------------------------------------ -BOOL ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQueryIfProtected ) +sal_Bool ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, sal_Bool bJustQueryIfProtected ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack(); if ( pChangeTrack ) { - BOOL bProtected = pChangeTrack->IsProtected(); + sal_Bool bProtected = pChangeTrack->IsProtected(); if ( bJustQueryIfProtected && !bProtected ) - return TRUE; + return sal_True; String aTitle( ScResId( bProtected ? SCSTR_CHG_UNPROTECT : SCSTR_CHG_PROTECT ) ); String aText( ScResId( SCSTR_PASSWORD ) ); @@ -1203,7 +1203,7 @@ BOOL ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQuer if ( SvPasswordHelper::CompareHashPassword(pChangeTrack->GetProtection(), aPassword) ) { if ( bJustQueryIfProtected ) - bDone = TRUE; + bDone = sal_True; else pChangeTrack->SetProtection( com::sun::star::uno::Sequence< sal_Int8 > (0) ); @@ -1224,21 +1224,21 @@ BOOL ScDocShell::ExecuteChangeProtectionDialog( Window* _pParent, BOOL bJustQuer if ( bProtected != pChangeTrack->IsProtected() ) { UpdateAcceptChangesDialog(); - bDone = TRUE; + bDone = sal_True; } } } else if ( bJustQueryIfProtected ) - bDone = TRUE; + bDone = sal_True; return bDone; } //------------------------------------------------------------------ -void ScDocShell::DoRecalc( BOOL bApi ) +void ScDocShell::DoRecalc( sal_Bool bApi ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScTabViewShell* pSh = GetBestViewShell(); if ( pSh ) { @@ -1246,7 +1246,7 @@ void ScDocShell::DoRecalc( BOOL bApi ) if ( pHdl && pHdl->IsInputMode() && pHdl->IsFormulaMode() && !bApi ) { pHdl->FormulaPreview(); // Teilergebnis als QuickHelp - bDone = TRUE; + bDone = sal_True; } else { @@ -1259,7 +1259,7 @@ void ScDocShell::DoRecalc( BOOL bApi ) WaitObject aWaitObj( GetActiveDialogParent() ); aDocument.CalcFormulaTree(); if ( pSh ) - pSh->UpdateCharts(TRUE); + pSh->UpdateCharts(sal_True); aDocument.BroadcastUno( SfxSimpleHint( SFX_HINT_DATACHANGED ) ); @@ -1275,7 +1275,7 @@ void ScDocShell::DoRecalc( BOOL bApi ) } } -void ScDocShell::DoHardRecalc( BOOL /* bApi */ ) +void ScDocShell::DoHardRecalc( sal_Bool /* bApi */ ) { WaitObject aWaitObj( GetActiveDialogParent() ); ScTabViewShell* pSh = GetBestViewShell(); @@ -1287,7 +1287,7 @@ void ScDocShell::DoHardRecalc( BOOL /* bApi */ ) aDocument.CalcAll(); GetDocFunc().DetectiveRefresh(); // erzeugt eigenes Undo if ( pSh ) - pSh->UpdateCharts(TRUE); + pSh->UpdateCharts(sal_True); // set notification flags for "calculate" event (used in SFX_HINT_DATACHANGED broadcast) // (might check for the presence of any formulas on each sheet) @@ -1306,7 +1306,7 @@ void ScDocShell::DoHardRecalc( BOOL /* bApi */ ) // (somewhat consistent with charts) for (nTab=0; nTab<nTabCount; nTab++) if (aDocument.IsStreamValid(nTab)) - aDocument.SetStreamValid(nTab, FALSE); + aDocument.SetStreamValid(nTab, sal_False); PostPaintGridAll(); } @@ -1340,7 +1340,7 @@ void ScDocShell::DoAutoStyle( const ScRange& rRange, const String& rStyle ) void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) { - USHORT nId = rHint.GetHint(); + sal_uInt16 nId = rHint.GetHint(); const SfxStyleSheetBase* pStyle = rHint.GetStyleSheet(); if (!pStyle) return; @@ -1353,7 +1353,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) String aNewName = pStyle->GetName(); String aOldName = aNewName; - BOOL bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert? + sal_Bool bExtended = rHint.ISA(SfxStyleSheetHintExtended); // Name geaendert? if (bExtended) aOldName = ((SfxStyleSheetHintExtended&)rHint).GetOldName(); @@ -1391,7 +1391,7 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) { String aNewName = pStyle->GetName(); String aOldName = aNewName; - BOOL bExtended = rHint.ISA(SfxStyleSheetHintExtended); + sal_Bool bExtended = rHint.ISA(SfxStyleSheetHintExtended); if (bExtended) aOldName = ((SfxStyleSheetHintExtended&)rHint).GetOldName(); if ( aNewName != aOldName ) @@ -1409,9 +1409,9 @@ void ScDocShell::NotifyStyle( const SfxStyleSheetHint& rHint ) // wie in printfun.cxx #define ZOOM_MIN 10 -void ScDocShell::SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages ) +void ScDocShell::SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages ) { - BOOL bUndo(aDocument.IsUndoEnabled()); + sal_Bool bUndo(aDocument.IsUndoEnabled()); String aStyleName = aDocument.GetPageStyle( nTab ); ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet = pStylePool->Find( aStyleName, SFX_STYLE_FAMILY_PAGE ); @@ -1423,8 +1423,8 @@ void ScDocShell::SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages ) SfxItemSet& rSet = pStyleSheet->GetItemSet(); if (bUndo) { - USHORT nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue(); - USHORT nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue(); + sal_uInt16 nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue(); + sal_uInt16 nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue(); GetUndoManager()->AddUndoAction( new ScUndoPrintZoom( this, nTab, nOldScale, nOldPages, nScale, nPages ) ); } @@ -1442,9 +1442,9 @@ void ScDocShell::SetPrintZoom( SCTAB nTab, USHORT nScale, USHORT nPages ) } } -BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange ) +sal_Bool ScDocShell::AdjustPrintZoom( const ScRange& rRange ) { - BOOL bChange = FALSE; + sal_Bool bChange = sal_False; SCTAB nTab = rRange.aStart.Tab(); String aStyleName = aDocument.GetPageStyle( nTab ); @@ -1454,15 +1454,15 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange ) if ( pStyleSheet ) { SfxItemSet& rSet = pStyleSheet->GetItemSet(); - BOOL bHeaders = ((const SfxBoolItem&)rSet.Get(ATTR_PAGE_HEADERS)).GetValue(); - USHORT nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue(); - USHORT nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue(); + sal_Bool bHeaders = ((const SfxBoolItem&)rSet.Get(ATTR_PAGE_HEADERS)).GetValue(); + sal_uInt16 nOldScale = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALE)).GetValue(); + sal_uInt16 nOldPages = ((const SfxUInt16Item&)rSet.Get(ATTR_PAGE_SCALETOPAGES)).GetValue(); const ScRange* pRepeatCol = aDocument.GetRepeatColRange( nTab ); const ScRange* pRepeatRow = aDocument.GetRepeatRowRange( nTab ); // benoetigte Skalierung fuer Selektion ausrechnen - USHORT nNewScale = nOldScale; + sal_uInt16 nNewScale = nOldScale; long nBlkTwipsX = 0; if (bHeaders) @@ -1512,7 +1512,7 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange ) if ( nNeeded < ZOOM_MIN ) nNeeded = ZOOM_MIN; // Begrenzung if ( nNeeded < (long) nNewScale ) - nNewScale = (USHORT) nNeeded; + nNewScale = (sal_uInt16) nNeeded; bChange = ( nNewScale != nOldScale || nOldPages != 0 ); if ( bChange ) @@ -1521,11 +1521,11 @@ BOOL ScDocShell::AdjustPrintZoom( const ScRange& rRange ) return bChange; } -void ScDocShell::PageStyleModified( const String& rStyleName, BOOL bApi ) +void ScDocShell::PageStyleModified( const String& rStyleName, sal_Bool bApi ) { ScDocShellModificator aModificator( *this ); - BOOL bWarn = FALSE; + sal_Bool bWarn = sal_False; SCTAB nTabCount = aDocument.GetTableCount(); SCTAB nUseTab = MAXTAB+1; @@ -1539,7 +1539,7 @@ void ScDocShell::PageStyleModified( const String& rStyleName, BOOL bApi ) { ScPrintFunc aPrintFunc( this, GetPrinter(), nUseTab ); //! ohne CountPages auskommen if (!aPrintFunc.UpdatePages()) // setzt Umbrueche auf allen Tabs - bWarn = TRUE; + bWarn = sal_True; if (bWarn && !bApi) { @@ -1577,7 +1577,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, } else if ( pReqArgs == NULL ) { - BOOL bUndo(aDocument.IsUndoEnabled()); + sal_Bool bUndo(aDocument.IsUndoEnabled()); String aOldName = aDocument.GetPageStyle( nCurTab ); ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); SfxStyleSheetBase* pStyleSheet @@ -1637,7 +1637,7 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, aOldData, aNewData ) ); } - PageStyleModified( aNewName, FALSE ); + PageStyleModified( aNewName, sal_False ); rReq.Done(); } delete pDlg; @@ -1673,9 +1673,9 @@ void ScDocShell::ExecutePageStyle( SfxViewShell& rCaller, SvxPageUsage( ((const SvxPageItem&) rStyleSet.Get( ATTR_PAGE )). GetPageUsage() ); - BOOL bShareHeader = IS_SHARE_HEADER(rStyleSet); - BOOL bShareFooter = IS_SHARE_FOOTER(rStyleSet); - USHORT nResId = 0; + sal_Bool bShareHeader = IS_SHARE_HEADER(rStyleSet); + sal_Bool bShareFooter = IS_SHARE_FOOTER(rStyleSet); + sal_uInt16 nResId = 0; switch ( eUsage ) { @@ -1794,7 +1794,7 @@ void ScDocShell::GetStatePageStyle( SfxViewShell& /* rCaller */, SCTAB nCurTab ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch (nWhich) @@ -1839,7 +1839,7 @@ void lcl_GetPrintData( ScDocShell* pDocShell /*in*/, // get settings from print options sub-dialog const SfxItemSet& rOptionSet = pPrinter->GetOptions(); const SfxPoolItem* pItem; - rbHasOptions = ( rOptionSet.GetItemState( SID_SCPRINTOPTIONS, FALSE, &pItem ) == SFX_ITEM_SET ); + rbHasOptions = ( rOptionSet.GetItemState( SID_SCPRINTOPTIONS, sal_False, &pItem ) == SFX_ITEM_SET ); if ( rbHasOptions ) { rOptions = ((const ScTpPrintItem*)pItem)->GetPrintOptions(); @@ -1977,7 +1977,7 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData pMarkData, bHasOptions, aOptions, bAllTabs, nTotalPages, aPageArr, aPageRanges, &pMarkedRange ); - BOOL bFound = FALSE; // erste Seite gefunden + sal_Bool bFound = sal_False; // erste Seite gefunden long nTabStart = 0; SCTAB nTabCount = aDocument.GetTableCount(); for ( SCTAB nTab=0; nTab<nTabCount && !bFound; nTab++ ) @@ -1985,17 +1985,17 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData if ( bAllTabs || !pMarkData || pMarkData->GetTableSelect( nTab ) ) { long nNext = nTabStart + aPageArr[nTab]; - BOOL bSelected = FALSE; + sal_Bool bSelected = sal_False; for (long nP=nTabStart+1; nP<=nNext; nP++) // 1-basiert if (aPageRanges.IsSelected( nP )) // eine Seite von dieser Tabelle selektiert? - bSelected = TRUE; + bSelected = sal_True; if (bSelected) { ScPrintFunc aPrintFunc( this, pPrinter, nTab ); aPrintFunc.ApplyPrintSettings(); // dann Settings fuer diese Tabelle - bFound = TRUE; + bFound = sal_True; } nTabStart = nNext; } @@ -2004,9 +2004,9 @@ void ScDocShell::PreparePrint( PrintDialog* pPrintDialog, ScMarkData* pMarkData delete pMarkedRange; } -BOOL lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange ) +sal_Bool lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange ) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer(); if (pDrawLayer) { @@ -2029,10 +2029,10 @@ BOOL lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange ) { Rectangle aObjRect = pObject->GetLogicRect(); if ( aObjRect.IsOver( aMMRect ) ) - bFound = TRUE; + bFound = sal_True; } else - bFound = TRUE; + bFound = sal_True; } pObject = aIter.Next(); @@ -2044,7 +2044,7 @@ BOOL lcl_HasTransparent( ScDocument* pDoc, SCTAB nTab, const ScRange* pRange ) } void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog, - ScMarkData* pMarkData, Window* pDialogParent, BOOL bForceSelected, BOOL bIsAPI ) + ScMarkData* pMarkData, Window* pDialogParent, sal_Bool bForceSelected, sal_Bool bIsAPI ) { SfxPrinter* pPrinter = GetPrinter(); if ( !pPrinter ) @@ -2064,14 +2064,14 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog, pMarkData, bHasOptions, aOptions, bAllTabs, nTotalPages, aPageArr, aPageRanges, &pMarkedRange ); - USHORT nCollateCopies = 1; + sal_uInt16 nCollateCopies = 1; if ( pPrintDialog && pPrintDialog->IsCollateEnabled() && pPrintDialog->IsCollateChecked() ) nCollateCopies = pPrintDialog->GetCopyCount(); // test if printed range contains transparent objects - BOOL bHasTransp = FALSE; - BOOL bAnyPrintRanges = aDocument.HasPrintRange(); + sal_Bool bHasTransp = sal_False; + sal_Bool bAnyPrintRanges = aDocument.HasPrintRange(); ScStyleSheetPool* pStylePool = aDocument.GetStyleSheetPool(); SCTAB nTabCount = aDocument.GetTableCount(); for ( SCTAB nTab=0; nTab<nTabCount && !bHasTransp; nTab++ ) @@ -2091,8 +2091,8 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog, bHasTransp = bHasTransp || lcl_HasTransparent( &aDocument, nTab, pMarkedRange ); else if ( aDocument.GetPrintRangeCount(nTab) ) { - USHORT nRangeCount = aDocument.GetPrintRangeCount(nTab); - for (USHORT i=0; i<nRangeCount; i++) + sal_uInt16 nRangeCount = aDocument.GetPrintRangeCount(nTab); + for (sal_uInt16 i=0; i<nRangeCount; i++) bHasTransp = bHasTransp || lcl_HasTransparent( &aDocument, nTab, aDocument.GetPrintRange( nTab, i ) ); } @@ -2103,11 +2103,11 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog, } } - BOOL bContinue = pPrinter->InitJob( pDialogParent, !bIsAPI && bHasTransp ); + sal_Bool bContinue = pPrinter->InitJob( pDialogParent, !bIsAPI && bHasTransp ); if ( bContinue ) { - for ( USHORT n=0; n<nCollateCopies; n++ ) + for ( sal_uInt16 n=0; n<nCollateCopies; n++ ) { long nTabStart = 0; long nDisplayStart = 0; @@ -2128,12 +2128,12 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog, { pDrawView = new FmFormView( pModel, pPrinter ); pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab)); - pDrawView->SetPrintPreview( TRUE ); + pDrawView->SetPrintPreview( sal_True ); } ScPrintFunc aPrintFunc( this, pPrinter, nTab, nAttrPage, nTotalPages, pMarkedRange, &aOptions ); aPrintFunc.SetDrawView( pDrawView ); - nPrinted += aPrintFunc.DoPrint( aPageRanges, nTabStart, nDisplayStart, TRUE, &rProgress, NULL ); + nPrinted += aPrintFunc.DoPrint( aPageRanges, nTabStart, nDisplayStart, sal_True, &rProgress, NULL ); nTabStart += aPageArr[nTab]; if ( aDocument.NeedPageResetAfterTab(nTab) ) @@ -2198,13 +2198,13 @@ void ScDocShell::Print( SfxProgress& rProgress, PrintDialog* pPrintDialog, void ScDocShell::GetState( SfxItemSet &rSet ) { SfxWhichIter aIter(rSet); - USHORT nWhich = aIter.FirstWhich(); + sal_uInt16 nWhich = aIter.FirstWhich(); while ( nWhich ) { switch (nWhich) { case FID_AUTO_CALC: - if ( (BOOL) aDocument.GetHardRecalcState() ) + if ( (sal_Bool) aDocument.GetHardRecalcState() ) rSet.DisableItem( nWhich ); else rSet.Put( SfxBoolItem( nWhich, aDocument.GetAutoCalc() ) ); @@ -2292,15 +2292,15 @@ void ScDocShell::GetSbxState( SfxItemSet &rSet ) pVisibleSh->GetState( rSet ); } -void __EXPORT ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, USHORT nAspect ) +void __EXPORT ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uInt16 nAspect ) { -// bIsOle = TRUE; // jetzt ueber den CreateMode +// bIsOle = sal_True; // jetzt ueber den CreateMode SCTAB nVisTab = aDocument.GetVisibleTab(); if (!aDocument.HasTable(nVisTab)) return; - ULONG nOldLayoutMode = pDev->GetLayoutMode(); + sal_uLong nOldLayoutMode = pDev->GetLayoutMode(); pDev->SetLayoutMode( TEXT_LAYOUT_DEFAULT ); // even if it's the same, to get the metafile action if ( nAspect == ASPECT_THUMBNAIL ) @@ -2310,7 +2310,7 @@ void __EXPORT ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup * aTmpData.SetTabNo(nVisTab); aDocument.SnapVisArea( aBoundRect ); aTmpData.SetScreen( aBoundRect ); - ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, TRUE ); + ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, sal_True ); } else { @@ -2319,13 +2319,13 @@ void __EXPORT ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup * aTmpData.SetTabNo(nVisTab); aDocument.SnapVisArea( aBoundRect ); aTmpData.SetScreen( aBoundRect ); - ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, TRUE ); + ScPrintFunc::DrawToDev( &aDocument, pDev, 1.0, aBoundRect, &aTmpData, sal_True ); } pDev->SetLayoutMode( nOldLayoutMode ); } -Rectangle __EXPORT ScDocShell::GetVisArea( USHORT nAspect ) const +Rectangle __EXPORT ScDocShell::GetVisArea( sal_uInt16 nAspect ) const { SfxObjectCreateMode eShellMode = GetCreateMode(); if ( eShellMode == SFX_CREATE_MODE_ORGANIZER ) @@ -2339,7 +2339,7 @@ Rectangle __EXPORT ScDocShell::GetVisArea( USHORT nAspect ) const { // Rectangle aArea( 0,0, 3175,3175 ); // 120x120 Pixel in 1:1 Rectangle aArea( 0,0, SC_PREVIEW_SIZE_X,SC_PREVIEW_SIZE_Y ); - BOOL bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() ); + sal_Bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() ); if ( bNegativePage ) ScDrawLayer::MirrorRectRTL( aArea ); aDocument.SnapVisArea( aArea ); @@ -2377,8 +2377,8 @@ Rectangle __EXPORT ScDocShell::GetVisArea( USHORT nAspect ) const void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet, SCTAB nCurTab, - BOOL& rbHeader, - BOOL& rbFooter ) + sal_Bool& rbHeader, + sal_Bool& rbFooter ) { if ( !pStyleSet ) { @@ -2392,7 +2392,7 @@ void ScDocShell::GetPageOnFromPageStyleSet( const SfxItemSet* pStyleSet, if ( pStyleSheet ) pStyleSet = &pStyleSheet->GetItemSet(); else - rbHeader = rbFooter = FALSE; + rbHeader = rbFooter = sal_False; } DBG_ASSERT( pStyleSet, "PageStyle-Set not found! :-(" ); @@ -2430,7 +2430,7 @@ long __EXPORT ScDocShell::DdeGetData( const String& rItem, return 0; // ungueltiger Bereich if( aDdeTextFmt.GetChar(0) == 'F' ) - aObj.SetFormulas( TRUE ); + aObj.SetFormulas( sal_True ); if( aDdeTextFmt.EqualsAscii( "SYLK" ) || aDdeTextFmt.EqualsAscii( "FSYLK" ) ) { @@ -2477,7 +2477,7 @@ long __EXPORT ScDocShell::DdeSetData( const String& rItem, } ScImportExport aObj( &aDocument, rItem ); if( aDdeTextFmt.GetChar(0) == 'F' ) - aObj.SetFormulas( TRUE ); + aObj.SetFormulas( sal_True ); if( aDdeTextFmt.EqualsAscii( "SYLK" ) || aDdeTextFmt.EqualsAscii( "FSYLK" ) ) { @@ -2508,7 +2508,7 @@ long __EXPORT ScDocShell::DdeSetData( const String& rItem, ScRangeName* pRange = aDocument.GetRangeName(); if( pRange ) { - USHORT nPos; + sal_uInt16 nPos; if( pRange->SearchName( aPos, nPos ) ) { ScRangeData* pData = (*pRange)[ nPos ]; @@ -2556,7 +2556,7 @@ SCTAB ScDocShell::GetCurTab() return pViewData ? pViewData->GetTabNo() : static_cast<SCTAB>(0); } -ScTabViewShell* ScDocShell::GetBestViewShell( BOOL bOnlyVisible ) +ScTabViewShell* ScDocShell::GetBestViewShell( sal_Bool bOnlyVisible ) { ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); // falsches Doc? @@ -2588,11 +2588,11 @@ SfxBindings* ScDocShell::GetViewBindings() //------------------------------------------------------------------ -ScDocShell* ScDocShell::GetShellByNum( USHORT nDocNo ) // static +ScDocShell* ScDocShell::GetShellByNum( sal_uInt16 nDocNo ) // static { ScDocShell* pFound = NULL; SfxObjectShell* pShell = SfxObjectShell::GetFirst(); - USHORT nShellCnt = 0; + sal_uInt16 nShellCnt = 0; while ( pShell && !pFound ) { @@ -2618,7 +2618,7 @@ IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) if ( ERRCODE_NONE == _pFileDlg->GetError() ) { - USHORT nSlot = pImpl->pRequest->GetSlot(); + sal_uInt16 nSlot = pImpl->pRequest->GetSlot(); SfxMedium* pMed = pImpl->pDocInserter->CreateMedium(); // #i87094# If a .odt was selected pMed is NULL. if (pMed) @@ -2636,7 +2636,7 @@ IMPL_LINK( ScDocShell, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg ) const SfxPoolItem* pItem = NULL; SfxItemSet* pSet = pMed->GetItemSet(); if ( pSet && - pSet->GetItemState( SID_VERSION, TRUE, &pItem ) == SFX_ITEM_SET && + pSet->GetItemState( SID_VERSION, sal_True, &pItem ) == SFX_ITEM_SET && pItem->ISA( SfxInt16Item ) ) { pImpl->pRequest->AppendItem( *pItem ); @@ -2662,7 +2662,7 @@ void ScDocShell::EnableSharedSettings( bool bEnable ) aDocument.StartChangeTracking(); // hide accept or reject changes dialog - USHORT nId = ScAcceptChgDlgWrapper::GetChildWindowId(); + sal_uInt16 nId = ScAcceptChgDlgWrapper::GetChildWindowId(); SfxViewFrame* pViewFrame = SfxViewFrame::Current(); if ( pViewFrame && pViewFrame->HasChildWindow( nId ) ) { @@ -2680,7 +2680,7 @@ void ScDocShell::EnableSharedSettings( bool bEnable ) } ScChangeViewSettings aChangeViewSet; - aChangeViewSet.SetShowChanges( FALSE ); + aChangeViewSet.SetShowChanges( sal_False ); aDocument.SetChangeViewSettings( aChangeViewSet ); } |