diff options
author | Jacek Wolszczak <shutdownrunner@gmail.com> | 2011-05-21 15:04:26 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-05-27 06:03:37 +0200 |
commit | 8b569e74d6b671c13a57c5ad72ed360d194b2dda (patch) | |
tree | 3c29b626bd0638fd13cfdfec0be976116de61f91 /sc/source/ui/app | |
parent | 45df4e385910e1006d4bad4f674167c495b75673 (diff) |
Replace DBG_* with OSL_* in sc/source/ui
Diffstat (limited to 'sc/source/ui/app')
-rw-r--r-- | sc/source/ui/app/drwtrans.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/app/inputwin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 22 | ||||
-rw-r--r-- | sc/source/ui/app/seltrans.cxx | 12 | ||||
-rw-r--r-- | sc/source/ui/app/transobj.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/app/uiitems.cxx | 24 |
7 files changed, 42 insertions, 42 deletions
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index dbfe52654470..367c10fe5b09 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -158,7 +158,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) { uno::Reference<awt::XControlModel> xControlModel = pUnoCtrl->GetUnoControlModel(); - DBG_ASSERT( xControlModel.is(), "uno control without model" ); + OSL_ENSURE( xControlModel.is(), "uno control without model" ); if ( xControlModel.is() ) { uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY ); @@ -434,7 +434,7 @@ sal_Bool ScDrawTransferObj::GetData( const ::com::sun::star::datatransfer::DataF // SdrExchangeView aView( pModel ); SdrView aView( pModel ); SdrPageView* pPv = aView.ShowSdrPage(aView.GetModel()->GetPage(0)); - DBG_ASSERT( pPv, "pPv not there..." ); + OSL_ENSURE( pPv, "pPv not there..." ); aView.MarkAllObj( pPv ); if ( nFormat == SOT_FORMAT_GDIMETAFILE ) bOK = SetGDIMetaFile( aView.GetAllMarkedMetaFile( sal_True ), rFlavor ); @@ -504,7 +504,7 @@ sal_Bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUse const SvxFontHeightItem& rDefaultFontHeight = (const SvxFontHeightItem&)rItemPool.GetDefaultItem(EE_CHAR_FONTHEIGHT); // SW should have no MasterPages - DBG_ASSERT(0L == pModel->GetMasterPageCount(), "SW with MasterPages (!)"); + OSL_ENSURE(0L == pModel->GetMasterPageCount(), "SW with MasterPages (!)"); for(sal_uInt16 a(0); a < pModel->GetPageCount(); a++) { @@ -665,7 +665,7 @@ void lcl_InitMarks( SdrMarkView& rDest, const SdrMarkView& rSource, SCTAB nTab ) { rDest.ShowSdrPage(rDest.GetModel()->GetPage(nTab)); SdrPageView* pDestPV = rDest.GetSdrPageView(); - DBG_ASSERT(pDestPV,"PageView ?"); + OSL_ENSURE(pDestPV,"PageView ?"); const SdrMarkList& rMarkList = rSource.GetMarkedObjectList(); sal_uLong nCount = rMarkList.GetMarkCount(); diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 99ab6fa00c72..d90588608070 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1335,7 +1335,7 @@ void ScInputHandler::PasteManualTip() ESelection aSel = pActiveView->GetSelection(); aSel.Adjust(); - DBG_ASSERT( !aSel.nStartPara && !aSel.nEndPara, "Zuviele Absaetze in Formel" ); + OSL_ENSURE( !aSel.nStartPara && !aSel.nEndPara, "Zuviele Absaetze in Formel" ); if ( !aSel.nStartPos ) // Selektion ab Anfang? { if ( aSel.nEndPos == pEngine->GetTextLen(0) ) @@ -1418,7 +1418,7 @@ void ScInputHandler::SkipClosingPar() pTableView->SetSelection( aSel ); } - DBG_ASSERT(nAutoPar, "SkipClosingPar: count is wrong"); + OSL_ENSURE(nAutoPar, "SkipClosingPar: count is wrong"); --nAutoPar; } @@ -2002,7 +2002,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn void lcl_SetTopSelection( EditView* pEditView, ESelection& rSel ) { - DBG_ASSERT( rSel.nStartPara==0 && rSel.nEndPara==0, "SetTopSelection: Para != 0" ); + OSL_ENSURE( rSel.nStartPara==0 && rSel.nEndPara==0, "SetTopSelection: Para != 0" ); EditEngine* pEngine = pEditView->GetEditEngine(); sal_uInt16 nCount = pEngine->GetParagraphCount(); @@ -2851,7 +2851,7 @@ void ScInputHandler::SetReference( const ScRange& rRef, ScDocument* pDoc ) { // Referenz auf anderes Dokument - DBG_ASSERT(rRef.aStart.Tab()==rRef.aEnd.Tab(), "nStartTab!=nEndTab"); + OSL_ENSURE(rRef.aStart.Tab()==rRef.aEnd.Tab(), "nStartTab!=nEndTab"); String aTmp; rRef.Format( aTmp, SCA_VALID|SCA_TAB_3D, pDoc, aAddrDetails ); // immer 3d @@ -3728,7 +3728,7 @@ void ScInputHandler::InputReplaceSelection( const String& rStr ) if (!pRefViewSh) pRefViewSh = pActiveViewSh; - DBG_ASSERT(nFormSelEnd>=nFormSelStart,"Selektion kaputt..."); + OSL_ENSURE(nFormSelEnd>=nFormSelStart,"Selektion kaputt..."); xub_StrLen nOldLen = nFormSelEnd-nFormSelStart; xub_StrLen nNewLen = rStr.Len(); diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 4238a92349b7..af08922d4828 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -159,7 +159,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : if ( pViewFrm ) pViewSh = PTR_CAST( ScTabViewShell, pViewFrm->GetViewShell() ); } - DBG_ASSERT( pViewSh, "no view shell for input window" ); + OSL_ENSURE( pViewSh, "no view shell for input window" ); // Positionsfenster, 3 Buttons, Eingabefenster InsertWindow ( 1, &aWndPos, 0, 0 ); diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 19942efed862..503f584a92c7 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -189,7 +189,7 @@ ScModule::ScModule( SfxObjectFactory* pFact ) : ScModule::~ScModule() { - DBG_ASSERT( !pSelTransfer, "Selection Transfer object not deleted" ); + OSL_ENSURE( !pSelTransfer, "Selection Transfer object not deleted" ); // InputHandler braucht nicht mehr geloescht zu werden (gibt keinen an der App mehr) @@ -481,7 +481,7 @@ void ScModule::Execute( SfxRequest& rReq ) if (pReqArgs) { const SfxUInt16Item& rItem = (const SfxUInt16Item&)pReqArgs->Get(SID_PSZ_FUNCTION); - DBG_ASSERT(rItem.ISA(SfxUInt16Item),"falscher Parameter"); + OSL_ENSURE(rItem.ISA(SfxUInt16Item),"falscher Parameter"); ScAppOptions aNewOpts( GetAppOptions() ); aNewOpts.SetStatusFunc( rItem.GetValue() ); @@ -692,7 +692,7 @@ void ScModule::SetDragJump( ScDocument* pLocalDoc, const String& rTarget, const void ScModule::SetClipObject( ScTransferObj* pCellObj, ScDrawTransferObj* pDrawObj ) { - DBG_ASSERT( !pCellObj || !pDrawObj, "SetClipObject: not allowed to set both objects" ); + OSL_ENSURE( !pCellObj || !pDrawObj, "SetClipObject: not allowed to set both objects" ); aClipData.pCellClipboard = pCellObj; aClipData.pDrawClipboard = pDrawObj; @@ -957,11 +957,11 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) if (!pAppCfg) GetAppOptions(); - DBG_ASSERT( pAppCfg, "AppOptions not initialised :-(" ); + OSL_ENSURE( pAppCfg, "AppOptions not initialised :-(" ); if (!pInputCfg) GetInputOptions(); - DBG_ASSERT( pInputCfg, "InputOptions not initialised :-(" ); + OSL_ENSURE( pInputCfg, "InputOptions not initialised :-(" ); //-------------------------------------------------------------- @@ -1352,7 +1352,7 @@ ScInputHandler* ScModule::GetInputHdl( ScTabViewShell* pViewSh, sal_Bool bUseRef pHdl = pViewSh->GetInputHandler(); // Viewshell hat jetzt immer einen // wenn keine ViewShell uebergeben oder aktiv, kann NULL herauskommen - DBG_ASSERT( pHdl || !pViewSh, "GetInputHdl: kein InputHandler gefunden" ); + OSL_ENSURE( pHdl || !pViewSh, "GetInputHdl: kein InputHandler gefunden" ); return pHdl; } @@ -1711,7 +1711,7 @@ void ScModule::SetReference( const ScRange& rRef, ScDocument* pDoc, if( nCurRefDlgId ) { SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId ); - DBG_ASSERT( pChildWnd, "NoChildWin" ); + OSL_ENSURE( pChildWnd, "NoChildWin" ); if ( pChildWnd ) { if ( nCurRefDlgId == SID_OPENDLG_CONSOLIDATE && pMarkData ) @@ -1751,7 +1751,7 @@ void ScModule::AddRefEntry() // "Mehrfachselektion" if ( nCurRefDlgId ) { SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId ); - DBG_ASSERT( pChildWnd, "NoChildWin" ); + OSL_ENSURE( pChildWnd, "NoChildWin" ); if ( pChildWnd ) { IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow()); @@ -1778,7 +1778,7 @@ void ScModule::EndReference() if ( nCurRefDlgId ) { SfxChildWindow* pChildWnd = lcl_GetChildWinFromAnyView( nCurRefDlgId ); - DBG_ASSERT( pChildWnd, "NoChildWin" ); + OSL_ENSURE( pChildWnd, "NoChildWin" ); if ( pChildWnd ) { IAnyRefDialog* pRefDlg = dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow()); @@ -1994,7 +1994,7 @@ SfxTabPage* ScModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const Sfx { SfxTabPage* pRet = NULL; ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - DBG_ASSERT(pFact, "ScAbstractFactory create fail!"); + OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); switch(nId) { case SID_SC_TP_LAYOUT: @@ -2066,7 +2066,7 @@ SfxTabPage* ScModule::CreateTabPage( sal_uInt16 nId, Window* pParent, const Sfx } } - DBG_ASSERT( pRet, "ScModule::CreateTabPage(): no valid ID for TabPage!" ); + OSL_ENSURE( pRet, "ScModule::CreateTabPage(): no valid ID for TabPage!" ); return pRet; } diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx index 7e9cbd9621a2..5eb294243165 100644 --- a/sc/source/ui/app/seltrans.cxx +++ b/sc/source/ui/app/seltrans.cxx @@ -64,7 +64,7 @@ sal_Bool lcl_IsURLButton( SdrObject* pObject ) if (pUnoCtrl && FmFormInventor == pUnoCtrl->GetObjInventor()) { uno::Reference<awt::XControlModel> xControlModel = pUnoCtrl->GetUnoControlModel(); - DBG_ASSERT( xControlModel.is(), "uno control without model" ); + OSL_ENSURE( xControlModel.is(), "uno control without model" ); if ( xControlModel.is() ) { uno::Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY ); @@ -173,7 +173,7 @@ ScSelectionTransferObj::~ScSelectionTransferObj() pScMod->SetSelectionTransfer( NULL ); } - DBG_ASSERT( !pView, "ScSelectionTransferObj dtor: ForgetView not called" ); + OSL_ENSURE( !pView, "ScSelectionTransferObj dtor: ForgetView not called" ); } sal_Bool ScSelectionTransferObj::StillValid() @@ -273,7 +273,7 @@ void ScSelectionTransferObj::AddSupportedFormats() void ScSelectionTransferObj::CreateCellData() { - DBG_ASSERT( !pCellData, "CreateCellData twice" ); + OSL_ENSURE( !pCellData, "CreateCellData twice" ); if ( pView ) { ScViewData* pViewData = pView->GetViewData(); @@ -328,7 +328,7 @@ void ScSelectionTransferObj::CreateCellData() delete pClipDoc; } } - DBG_ASSERT( pCellData, "can't create CellData" ); + OSL_ENSURE( pCellData, "can't create CellData" ); } //! make static member of ScDrawView @@ -336,7 +336,7 @@ extern void lcl_CheckOle( const SdrMarkList& rMarkList, sal_Bool& rAnyOle, sal_B void ScSelectionTransferObj::CreateDrawData() { - DBG_ASSERT( !pDrawData, "CreateDrawData twice" ); + OSL_ENSURE( !pDrawData, "CreateDrawData twice" ); if ( pView ) { // similar to ScDrawView::BeginDrag @@ -380,7 +380,7 @@ void ScSelectionTransferObj::CreateDrawData() pDrawData->acquire(); // keep ref count up - released in ForgetView } } - DBG_ASSERT( pDrawData, "can't create DrawData" ); + OSL_ENSURE( pDrawData, "can't create DrawData" ); } ScTransferObj* ScSelectionTransferObj::GetCellData() diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index 0c8794acdd11..739bafe455a3 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -137,7 +137,7 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc bUsedForLink( false ), bUseInApi( false ) { - DBG_ASSERT(pDoc->IsClipboard(), "wrong document"); + OSL_ENSURE(pDoc->IsClipboard(), "wrong document"); // // get aBlock from clipboard doc @@ -168,7 +168,7 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc nTab2 = i; bFirst = false; } - DBG_ASSERT(!bFirst, "no sheet selected"); + OSL_ENSURE(!bFirst, "no sheet selected"); // only limit to used cells if whole sheet was marked // (so empty cell areas can be copied) @@ -760,7 +760,7 @@ void ScTransferObj::StripRefs( ScDocument* pDoc, if (!pDestDoc) { pDestDoc = pDoc; - DBG_ASSERT(nSubX==0&&nSubY==0, "can't move within the document"); + OSL_ENSURE(nSubX==0&&nSubY==0, "can't move within the document"); } // In a clipboard doc the data don't have to be on the first sheet diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx index d01efc5ee730..78e4e6710ca7 100644 --- a/sc/source/ui/app/uiitems.cxx +++ b/sc/source/ui/app/uiitems.cxx @@ -95,7 +95,7 @@ String ScInputStatusItem::GetValueText() const int ScInputStatusItem::operator==( const SfxPoolItem& rItem ) const { - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); + OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); return ( (aStartPos == ((ScInputStatusItem&)rItem).aStartPos) && (aEndPos == ((ScInputStatusItem&)rItem).aEndPos) @@ -205,7 +205,7 @@ String ScSortItem::GetValueText() const int ScSortItem::operator==( const SfxPoolItem& rItem ) const { - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); + OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); const ScSortItem& rOther = (const ScSortItem&)rItem; @@ -299,7 +299,7 @@ String ScQueryItem::GetValueText() const int ScQueryItem::operator==( const SfxPoolItem& rItem ) const { - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); + OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); const ScQueryItem& rQueryItem = (const ScQueryItem&)rItem; @@ -363,7 +363,7 @@ String ScSubTotalItem::GetValueText() const int ScSubTotalItem::operator==( const SfxPoolItem& rItem ) const { - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); + OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); const ScSubTotalItem& rSTItem = (const ScSubTotalItem&)rItem; @@ -424,7 +424,7 @@ String ScUserListItem::GetValueText() const int ScUserListItem::operator==( const SfxPoolItem& rItem ) const { - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); + OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); const ScUserListItem& r = (const ScUserListItem&)rItem; sal_Bool bEqual = false; @@ -490,7 +490,7 @@ String ScConsolidateItem::GetValueText() const int ScConsolidateItem::operator==( const SfxPoolItem& rItem ) const { - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); + OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); const ScConsolidateItem& rCItem = (const ScConsolidateItem&)rItem; @@ -529,7 +529,7 @@ ScPivotItem::ScPivotItem( const ScPivotItem& rItem ) : aDestRange ( rItem.aDestRange ), bNewSheet ( rItem.bNewSheet ) { - DBG_ASSERT(rItem.pSaveData, "pSaveData"); + OSL_ENSURE(rItem.pSaveData, "pSaveData"); pSaveData = new ScDPSaveData(*rItem.pSaveData); } @@ -551,10 +551,10 @@ String ScPivotItem::GetValueText() const int ScPivotItem::operator==( const SfxPoolItem& rItem ) const { - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); + OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); const ScPivotItem& rPItem = (const ScPivotItem&)rItem; - DBG_ASSERT( pSaveData && rPItem.pSaveData, "pSaveData" ); + OSL_ENSURE( pSaveData && rPItem.pSaveData, "pSaveData" ); return ( *pSaveData == *rPItem.pSaveData && aDestRange == rPItem.aDestRange && bNewSheet == rPItem.bNewSheet ); @@ -604,7 +604,7 @@ String ScSolveItem::GetValueText() const int ScSolveItem::operator==( const SfxPoolItem& rItem ) const { - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); + OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); const ScSolveItem& rPItem = (const ScSolveItem&)rItem; @@ -654,7 +654,7 @@ String ScTabOpItem::GetValueText() const int ScTabOpItem::operator==( const SfxPoolItem& rItem ) const { - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); + OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); const ScTabOpItem& rPItem = (const ScTabOpItem&)rItem; @@ -707,7 +707,7 @@ String ScCondFrmtItem::GetValueText() const int ScCondFrmtItem::operator==( const SfxPoolItem& rItem ) const { - DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); + OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" ); const ScCondFrmtItem& rPItem = (const ScCondFrmtItem&)rItem; |