diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-08 15:01:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-08 22:17:05 +0200 |
commit | e11386053d3c404fbeab8b66402d68f813f7dd58 (patch) | |
tree | 1309275bb4cc8a1bb74372d94a4439fb99762094 /sw | |
parent | 41a55bde344f924edd36dbbeead45c426ee07e4d (diff) |
convert some OSL_ENSURE -> assert
where we are just provide checking for a following static_cast.
I'd rather have an explicit assert failure than a random crash
Change-Id: Iab6c6b056341018deaa74b78b075e564f72c58d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121814
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/doctxm.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/docnode/ndsect.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/edit/edglbldc.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/edit/edtox.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/layout/fly.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/trvlfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/objectpositioning/environmentofanchoredobject.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/txtnode/fmtatr2.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/unocore/unorefmk.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/view/vprint.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/docvw/PostItMgr.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/srcview.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/utlui/viewlayoutctrl.cxx | 2 |
17 files changed, 27 insertions, 32 deletions
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index a8916a113a05..ad9271d9ad28 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -453,7 +453,7 @@ SwTOXBase* SwDoc::GetCurTOX( const SwPosition& rPos ) SectionType eT = pSectNd->GetSection().GetType(); if( SectionType::ToxContent == eT ) { - OSL_ENSURE( dynamic_cast< const SwTOXBaseSection *>( &pSectNd->GetSection()) != nullptr, + assert( dynamic_cast< const SwTOXBaseSection *>( &pSectNd->GetSection()) && "no TOXBaseSection!" ); SwTOXBaseSection& rTOXSect = static_cast<SwTOXBaseSection&>( pSectNd->GetSection()); @@ -466,7 +466,7 @@ SwTOXBase* SwDoc::GetCurTOX( const SwPosition& rPos ) const SwAttrSet& SwDoc::GetTOXBaseAttrSet(const SwTOXBase& rTOXBase) { - OSL_ENSURE( dynamic_cast<const SwTOXBaseSection*>( &rTOXBase) != nullptr, "no TOXBaseSection!" ); + assert( dynamic_cast<const SwTOXBaseSection*>( &rTOXBase) && "no TOXBaseSection!" ); const SwTOXBaseSection& rTOXSect = static_cast<const SwTOXBaseSection&>(rTOXBase); SwSectionFormat const * pFormat = rTOXSect.GetFormat(); OSL_ENSURE( pFormat, "invalid TOXBaseSection!" ); @@ -524,7 +524,7 @@ bool SwDoc::DeleteTOX( const SwTOXBase& rTOXBase, bool bDelNodes ) { // We only delete the TOX, not the Nodes bool bRet = false; - OSL_ENSURE( dynamic_cast<const SwTOXBaseSection*>( &rTOXBase) != nullptr, "no TOXBaseSection!" ); + assert( dynamic_cast<const SwTOXBaseSection*>( &rTOXBase) && "no TOXBaseSection!" ); const SwTOXBaseSection& rTOXSect = static_cast<const SwTOXBaseSection&>(rTOXBase); SwSectionFormat const * pFormat = rTOXSect.GetFormat(); @@ -703,8 +703,7 @@ OUString SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType, bool SwDoc::SetTOXBaseName(const SwTOXBase& rTOXBase, const OUString& rName) { - OSL_ENSURE( dynamic_cast<const SwTOXBaseSection*>( &rTOXBase) != nullptr, - "no TOXBaseSection!" ); + assert( dynamic_cast<const SwTOXBaseSection*>( &rTOXBase) && "no TOXBaseSection!" ); SwTOXBaseSection* pTOX = const_cast<SwTOXBaseSection*>(static_cast<const SwTOXBaseSection*>(&rTOXBase)); if (GetUniqueTOXBaseName(*rTOXBase.GetTOXType(), rName) == rName) diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index d5c9db008116..5c28a2c82365 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -1233,7 +1233,7 @@ SwSectionNode* SwSectionNode::MakeCopy( SwDoc& rDoc, const SwNodeIndex& rIdx ) c std::unique_ptr<SwTOXBase> pTOXBase; if (SectionType::ToxContent == GetSection().GetType()) { - OSL_ENSURE( dynamic_cast< const SwTOXBaseSection* >( &GetSection() ) != nullptr , "no TOXBaseSection!" ); + assert( dynamic_cast< const SwTOXBaseSection* >( &GetSection() ) && "no TOXBaseSection!" ); SwTOXBaseSection const& rTBS( dynamic_cast<SwTOXBaseSection const&>(GetSection())); pTOXBase.reset( new SwTOXBase(rTBS, &rDoc) ); diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx index 7c30b156db0c..ece88ce9d74a 100644 --- a/sw/source/core/edit/edglbldc.cxx +++ b/sw/source/core/edit/edglbldc.cxx @@ -73,7 +73,7 @@ void SwEditShell::GetGlobalDocContent( SwGlblDocContents& rArr ) const case SectionType::ToxHeader: break; // ignore case SectionType::ToxContent: - OSL_ENSURE( dynamic_cast<const SwTOXBaseSection*>( pSect) != nullptr, "no TOXBaseSection!" ); + assert( dynamic_cast<const SwTOXBaseSection*>( pSect) && "no TOXBaseSection!" ); pNew.reset(new SwGlblDocContent( static_cast<const SwTOXBaseSection*>(pSect) )); break; diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx index ebd201fd7efb..c10f36671cd4 100644 --- a/sw/source/core/edit/edtox.cxx +++ b/sw/source/core/edit/edtox.cxx @@ -91,14 +91,14 @@ void SwEditShell::GetCurTOXMarks(SwTOXMarks& rMarks) const bool SwEditShell::IsTOXBaseReadonly(const SwTOXBase& rTOXBase) { - OSL_ENSURE( dynamic_cast<const SwTOXBaseSection*>( &rTOXBase) != nullptr, "no TOXBaseSection!" ); + assert( dynamic_cast<const SwTOXBaseSection*>( &rTOXBase) && "no TOXBaseSection!" ); const SwTOXBaseSection& rTOXSect = static_cast<const SwTOXBaseSection&>(rTOXBase); return rTOXSect.IsProtect(); } void SwEditShell::SetTOXBaseReadonly(const SwTOXBase& rTOXBase, bool bReadonly) { - OSL_ENSURE( dynamic_cast<const SwTOXBaseSection*>( &rTOXBase) != nullptr, "no TOXBaseSection!" ); + assert( dynamic_cast<const SwTOXBaseSection*>( &rTOXBase) && "no TOXBaseSection!" ); const SwTOXBaseSection& rTOXSect = static_cast<const SwTOXBaseSection&>(rTOXBase); const_cast<SwTOXBase&>(rTOXBase).SetProtected(bReadonly); OSL_ENSURE( rTOXSect.SwSection::GetType() == SectionType::ToxContent, "not a TOXContentSection" ); @@ -237,7 +237,7 @@ const SwTOXBase* SwEditShell::GetTOX( sal_uInt16 nPos ) const pSect->GetFormat()->GetSectionNode() && nCnt++ == nPos ) { - OSL_ENSURE( dynamic_cast<const SwTOXBaseSection*>( pSect) != nullptr, "no TOXBaseSection!" ); + assert( dynamic_cast<const SwTOXBaseSection*>( pSect) && "no TOXBaseSection!" ); return static_cast<const SwTOXBaseSection*>(pSect); } } diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 4f82c8e3b8af..ffe664b42898 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -2456,7 +2456,7 @@ void SwLayoutFrame::NotifyLowerObjs( const bool _bUnlockPosOfObjs ) } else { - OSL_ENSURE( dynamic_cast<const SwAnchoredDrawObject*>( pObj) != nullptr, + assert( dynamic_cast<const SwAnchoredDrawObject*>( pObj) && "<SwLayoutFrame::NotifyFlys() - anchored object of unexpected type" ); // #i26945# - use <pAnchorFrame> to check, if // fly frame is lower of layout frame resp. if fly frame is diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 377713b98178..d8eee05dc383 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -2595,7 +2595,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor) const sal_uInt32 nPos = pObj->GetOrdNum(); for ( size_t k = 0; bSub && k < aSortObjs.size(); ++k ) { - OSL_ENSURE( dynamic_cast< const SwFlyFrame *>( aSortObjs[k] ) != nullptr, + assert( dynamic_cast< const SwFlyFrame *>( aSortObjs[k] ) && "<SwRootFrame::CalcFrameRects(..)> - object in <aSortObjs> of unexpected type" ); const SwFlyFrame* pTmp = static_cast<SwFlyFrame*>(aSortObjs[k]); do diff --git a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx index 012b575e6850..b78cadaf1549 100644 --- a/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/ascharanchoredobjectposition.cxx @@ -61,7 +61,7 @@ SwAsCharAnchoredObjectPosition::~SwAsCharAnchoredObjectPosition() /** method to cast <SwAnchoredObjectPosition::GetAnchorFrame()> to needed type */ const SwTextFrame& SwAsCharAnchoredObjectPosition::GetAnchorTextFrame() const { - OSL_ENSURE( dynamic_cast<const SwTextFrame*>( &GetAnchorFrame() ) != nullptr, + assert( dynamic_cast<const SwTextFrame*>( &GetAnchorFrame() ) && "SwAsCharAnchoredObjectPosition::GetAnchorTextFrame() - wrong anchor frame type" ); return static_cast<const SwTextFrame&>(GetAnchorFrame()); @@ -264,7 +264,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() rAnchorFrame.SwitchHorizontalToVertical( aAnchorPos ); // #i44347# - keep last object rectangle at anchored object - OSL_ENSURE( dynamic_cast<const SwAnchoredDrawObject*>( &GetAnchoredObj() ) != nullptr, + assert( dynamic_cast<const SwAnchoredDrawObject*>( &GetAnchoredObj() ) && "<SwAsCharAnchoredObjectPosition::CalcPosition()> - wrong type of anchored object." ); SwAnchoredDrawObject& rAnchoredDrawObj = static_cast<SwAnchoredDrawObject&>( GetAnchoredObj() ); @@ -291,7 +291,7 @@ void SwAsCharAnchoredObjectPosition::CalcPosition() aRelAttr = Point( 0, nRelPos ); // OD 2004-03-23 #i26791# - OSL_ENSURE( dynamic_cast<const SwFlyInContentFrame*>( &GetAnchoredObj()) != nullptr, + assert( dynamic_cast<const SwFlyInContentFrame*>( &GetAnchoredObj()) && "<SwAsCharAnchoredObjectPosition::CalcPosition()> - wrong anchored object." ); const SwFlyInContentFrame& rFlyInContentFrame = static_cast<const SwFlyInContentFrame&>(GetAnchoredObj()); diff --git a/sw/source/core/objectpositioning/environmentofanchoredobject.cxx b/sw/source/core/objectpositioning/environmentofanchoredobject.cxx index 8d197f464f02..79cb7b14eef3 100644 --- a/sw/source/core/objectpositioning/environmentofanchoredobject.cxx +++ b/sw/source/core/objectpositioning/environmentofanchoredobject.cxx @@ -56,7 +56,7 @@ const SwLayoutFrame& SwEnvironmentOfAnchoredObject::GetHoriEnvironmentLayoutFram } } - OSL_ENSURE( dynamic_cast< const SwLayoutFrame *>( pHoriEnvironmentLayFrame ) != nullptr, + assert( dynamic_cast< const SwLayoutFrame *>( pHoriEnvironmentLayFrame ) && "SwEnvironmentOfAnchoredObject::GetHoriEnvironmentLayoutFrame(..) - found frame isn't a layout frame" ); return static_cast<const SwLayoutFrame&>(*pHoriEnvironmentLayFrame); @@ -90,7 +90,7 @@ const SwLayoutFrame& SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFram } } - OSL_ENSURE( dynamic_cast< const SwLayoutFrame *>( pVertEnvironmentLayFrame ) != nullptr, + assert( dynamic_cast< const SwLayoutFrame *>( pVertEnvironmentLayFrame ) && "SwEnvironmentOfAnchoredObject::GetVertEnvironmentLayoutFrame(..) - found frame isn't a layout frame" ); return static_cast<const SwLayoutFrame&>(*pVertEnvironmentLayFrame); diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index 08c768a88706..d6d17459fc2b 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -81,7 +81,7 @@ SwTwips SwToContentAnchoredObjectPosition::ToCharTopOfLine() const SwTextFrame& SwToContentAnchoredObjectPosition::GetAnchorTextFrame() const { - OSL_ENSURE( dynamic_cast<const SwTextFrame*>( &GetAnchorFrame()) != nullptr , + assert( dynamic_cast<const SwTextFrame*>( &GetAnchorFrame()) && "SwToContentAnchoredObjectPosition::GetAnchorTextFrame() - wrong anchor frame type" ); return static_cast<SwTextFrame&>(GetAnchorFrame()); diff --git a/sw/source/core/txtnode/fmtatr2.cxx b/sw/source/core/txtnode/fmtatr2.cxx index 3ba9385f8ac4..67a55e28c9b5 100644 --- a/sw/source/core/txtnode/fmtatr2.cxx +++ b/sw/source/core/txtnode/fmtatr2.cxx @@ -737,8 +737,7 @@ void MetaField::GetPrefixAndSuffix( try { const uno::Reference<rdf::XMetadatable> xMetaField( MakeUnoObject() ); - OSL_ENSURE(dynamic_cast<SwXMetaField*>(xMetaField.get()), - "GetPrefixAndSuffix: no SwXMetaField?"); + assert(dynamic_cast<SwXMetaField*>(xMetaField.get()) && "GetPrefixAndSuffix: no SwXMetaField?"); if (xMetaField.is()) { SwTextNode * const pTextNode( GetTextNode() ); diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index b865687367e9..daa016423bb6 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3915,8 +3915,7 @@ namespace { SwFormatColl* SwTextNode::ChgFormatColl( SwFormatColl *pNewColl ) { OSL_ENSURE( pNewColl,"ChgFormatColl: Collectionpointer has value 0." ); - OSL_ENSURE( dynamic_cast<const SwTextFormatColl *>(pNewColl) != nullptr, - "ChgFormatColl: is not a Text Collection pointer." ); + assert( dynamic_cast<const SwTextFormatColl *>(pNewColl) && "ChgFormatColl: is not a Text Collection pointer." ); SwTextFormatColl *pOldColl = GetTextColl(); if( pNewColl != pOldColl ) diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 3156ef10ed35..625a991a074a 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -1246,8 +1246,7 @@ SwXMetaField::SwXMetaField(SwDoc *const pDoc, ::sw::Meta *const pMeta, std::unique_ptr<TextRangeList_t const> pPortions) : SwXMetaField_Base(pDoc, pMeta, xParentText, std::move(pPortions)) { - OSL_ENSURE(dynamic_cast< ::sw::MetaField* >(pMeta), - "SwXMetaField created for wrong hint!"); + assert(dynamic_cast< ::sw::MetaField* >(pMeta) && "SwXMetaField created for wrong hint!"); } SwXMetaField::SwXMetaField(SwDoc *const pDoc) diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index 768ad00c8cd8..931928803722 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -304,7 +304,7 @@ void SwViewShell::CalcPagesForPrint( sal_uInt16 nMax ) void SwViewShell::FillPrtDoc( SwDoc& rPrtDoc, const SfxPrinter* pPrt) { - OSL_ENSURE( dynamic_cast<const SwFEShell*>( this) != nullptr,"SwViewShell::Prt for FEShell only"); + assert( dynamic_cast<const SwFEShell*>( this) && "SwViewShell::Prt for FEShell only"); SwFEShell* pFESh = static_cast<SwFEShell*>(this); rPrtDoc.getIDocumentFieldsAccess().LockExpFields(); diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index c581f56b50e7..54ffca724071 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -689,8 +689,7 @@ void SwDocShell::Execute(SfxRequest& rReq) } } - OSL_ENSURE(dynamic_cast<SwWebDocShell*>(this), - "SourceView only in WebDocShell"); + assert(dynamic_cast<SwWebDocShell*>(this) && "SourceView only in WebDocShell"); // the SourceView is not the 1 for SwWebDocShell sal_uInt16 nSlot = SID_VIEWSHELL1; @@ -1156,7 +1155,7 @@ void SwDocShell::Execute(SfxRequest& rReq) case SID_ATTR_YEAR2000: if ( pArgs && SfxItemState::SET == pArgs->GetItemState( nWhich , false, &pItem )) { - OSL_ENSURE(dynamic_cast< const SfxUInt16Item *>( pItem ) != nullptr, "wrong Item"); + assert(dynamic_cast< const SfxUInt16Item *>( pItem ) && "wrong Item"); sal_uInt16 nYear2K = static_cast<const SfxUInt16Item*>(pItem)->GetValue(); // iterate over Views and put the State to FormShells diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index a60b70b6cbef..1e6a2c801cbc 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -292,7 +292,7 @@ SwSidebarItem* SwPostItMgr::InsertItem(SfxBroadcaster* pItem, bool bCheckExisten mvPostItFields.push_back(std::make_unique<SwAnnotationItem>(*pSwFormatField, bFocus)); pAnnotationItem = mvPostItFields.back().get(); } - OSL_ENSURE(dynamic_cast< const SwFormatField *>( pItem ) != nullptr,"Mgr::InsertItem: seems like new stuff was added"); + assert(dynamic_cast< const SwFormatField *>( pItem ) && "Mgr::InsertItem: seems like new stuff was added"); StartListening(*pItem); return pAnnotationItem; } diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index e7b2059a1ec0..e453f7f43ce5 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -201,7 +201,7 @@ SwSrcView::SwSrcView(SfxViewFrame* pViewFrame, SfxViewShell*) : SwSrcView::~SwSrcView() { SwDocShell* pDocShell = GetDocShell(); - OSL_ENSURE(dynamic_cast<SwWebDocShell*>( pDocShell), "Why no WebDocShell?" ); + assert(dynamic_cast<SwWebDocShell*>( pDocShell) && "Why no WebDocShell?" ); const TextSelection& rSel = aEditWin->GetTextView()->GetSelection(); static_cast<SwWebDocShell*>(pDocShell)->SetSourcePara( static_cast< sal_uInt16 >( rSel.GetStart().GetPara() ) ); @@ -833,7 +833,7 @@ void SwSrcView::Load(SwDocShell* pDocShell) pDocShell->SetModified();// The flag will be reset in between times. // Disable AutoLoad pDocShell->SetAutoLoad(INetURLObject(), 0, false); - OSL_ENSURE(dynamic_cast<SwWebDocShell*>( pDocShell), "Why no WebDocShell?" ); + assert(dynamic_cast<SwWebDocShell*>( pDocShell) && "Why no WebDocShell?" ); sal_uInt16 nLine = static_cast<SwWebDocShell*>(pDocShell)->GetSourcePara(); aEditWin->SetStartLine(nLine); aEditWin->GetTextEngine()->ResetUndo(); diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx index 22346de6b03b..b2f6ef4bea1c 100644 --- a/sw/source/uibase/utlui/viewlayoutctrl.cxx +++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx @@ -65,7 +65,7 @@ void SwViewLayoutControl::StateChangedAtStatusBarControl( sal_uInt16 /*nSID*/, S GetStatusBar().SetItemText( GetId(), OUString() ); else { - OSL_ENSURE( dynamic_cast< const SvxViewLayoutItem *>( pState ) != nullptr, "invalid item type" ); + assert( dynamic_cast< const SvxViewLayoutItem *>( pState ) && "invalid item type" ); const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem*>( pState )->GetValue(); const bool bBookMode = static_cast<const SvxViewLayoutItem*>( pState )->IsBookMode(); |