summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2016-11-05 21:44:06 +0100
committerJulien Nabet <serval2412@yahoo.fr>2016-11-05 21:28:43 +0000
commit3dc91d3fae79053031cdc9426e1dc13f840a91ba (patch)
treea69d4a7070307e5c32fbc4618e3749d824d7d874 /sfx2
parenta5f8c5f9338e140c8ec3198228917a8a1a54dc35 (diff)
Replace some legacy OSL (sfx2/viewfrm)
Change-Id: I3391c3760e3df371bb0d60ace71144f57afaca8d Reviewed-on: https://gerrit.libreoffice.org/30599 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewfrm.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 5ce84bed4e76..d6bd18598e2b 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -159,7 +159,8 @@ static bool AskPasswordToModify_Impl( const uno::Reference< task::XInteractionHa
// TODO/LATER: In future the info should replace the direct hash completely
bool bResult = ( !nPasswordHash && !aInfo.getLength() );
- OSL_ENSURE( pFilter && ( pFilter->GetFilterFlags() & SfxFilterFlags::PASSWORDTOMODIFY ), "PasswordToModify feature is active for a filter that does not support it!" );
+ SAL_WARN_IF( !(pFilter && ( pFilter->GetFilterFlags() & SfxFilterFlags::PASSWORDTOMODIFY )), "sfx.view",
+ "PasswordToModify feature is active for a filter that does not support it!");
if ( pFilter && xHandler.is() )
{
@@ -526,7 +527,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
while ( pView )
{
Reference< XFrame > xFrame( pView->GetFrame().GetFrameInterface() );
- OSL_ENSURE( xFrame.is(), "SfxViewFrame::ExecReload_Impl: no XFrame?!" );
+ SAL_WARN_IF( !xFrame.is(), "sfx.view", "SfxViewFrame::ExecReload_Impl: no XFrame?!");
aViewFrames.push_back( ViewDescriptor( xFrame, pView->GetCurViewId() ) );
pView = GetNext( *pView, xOldObj );
@@ -1826,7 +1827,7 @@ void SfxViewFrame::SaveCurrentViewData_Impl( const sal_uInt16 i_nNewViewId )
OSL_FAIL( "SfxViewFrame::SaveCurrentViewData_Impl: views without API names? Shouldn't happen anymore?" );
return;
}
- OSL_ENSURE( sNewViewName != sCurrentViewName, "SfxViewFrame::SaveCurrentViewData_Impl: suspicious: new and old view name are identical!" );
+ SAL_WARN_IF(sNewViewName == sCurrentViewName, "sfx.view", "SfxViewFrame::SaveCurrentViewData_Impl: suspicious: new and old view name are identical!");
// save the view data only when we're moving from a non-print-preview to the print-preview view
if ( sNewViewName != "PrintPreview" )
@@ -2282,7 +2283,7 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEra
nLine++;
}
- SAL_WARN_IF( nStartPos == -1, "sfx", "CutLines: Start row not found!" );
+ SAL_WARN_IF(nStartPos == -1, "sfx.view", "CutLines: Start row not found!");
if ( nStartPos != -1 )
{
@@ -2408,7 +2409,7 @@ void SfxViewFrame::AddDispatchMacroToBasic_Impl( const OUString& sMacro )
if(!xLibCont.is())
{
- SAL_WARN( "sfx.view", "couldn't get access to the basic lib container. Adding of macro isn't possible." );
+ SAL_WARN("sfx.view", "couldn't get access to the basic lib container. Adding of macro isn't possible.");
return;
}
@@ -2932,7 +2933,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
{
if ( !KnowsChildWindow( nSID ) )
{
- OSL_ENSURE( false, "SID_SIDEBAR state requested, but no task pane child window exists for this ID!" );
+ SAL_WARN("sfx.view", "SID_SIDEBAR state requested, but no task pane child window exists for this ID!");
rState.DisableItem( nSID );
}
else