diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-23 12:23:13 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-04-23 12:23:13 +0000 |
commit | 726701315f0f5a0a411975c745ef0764f73eef3e (patch) | |
tree | 6f3cb368b75e8c7432f2f534d123b38dfa04af9b /sfx2 | |
parent | b9392a36645d8632b97ad79240f483b3a1683b61 (diff) |
CWS-TOOLING: integrate CWS cmcfixes57
2009-04-16 14:44:54 +0200 cmc r270885 : #i101062# add in uui fix and stray ^M fixes
2009-04-16 10:57:50 +0200 cmc r270872 : #i101127# remove && || warnings
2009-04-15 17:04:23 +0200 cmc r270857 : #i101112# remove trivial new gcc warnings
2009-04-15 17:01:01 +0200 cmc r270856 : #i101111# remove trivial new warnings
2009-04-15 16:56:53 +0200 cmc r270854 : #i101110# make methods consts
2009-04-15 16:52:37 +0200 cmc r270853 : #i100225# fix visibility of component_getImplementationEnvironment and friends
2009-04-15 16:49:16 +0200 cmc r270852 : #i101109# ? : promotion rules
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/workwin.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/bastyp/fltfnc.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/doctempl.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/doctemplates.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/docvor.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objembed.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/view/topfrm.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 4 |
12 files changed, 28 insertions, 22 deletions
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index 50d82498c91c..d2338a9c7226 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -1803,7 +1803,7 @@ void SfxWorkWindow::UpdateStatusBar_Impl() // keine Statusleiste, wenn keine Id gew"unscht oder bei FullScreenView // oder wenn ausgeschaltet if ( aStatBar.nId && IsDockingAllowed() && bInternalDockingAllowed && bShowStatusBar && - ( aStatBar.bOn && !bIsFullScreen || aStatBar.bTemp ) ) + ( (aStatBar.bOn && !bIsFullScreen) || aStatBar.bTemp ) ) { // Id hat sich ge"andert, also passenden Statusbarmanager erzeugen, // dieser "ubernimmt die aktuelle Statusleiste; @@ -2734,7 +2734,7 @@ void SfxWorkWindow::MakeChildsVisible_Impl( BOOL bVis ) for ( USHORT n=0; n<aSortedList.Count(); ++n ) { SfxChild_Impl* pCli = (*pChilds)[aSortedList[n]]; - if ( pCli->eAlign == SFX_ALIGN_NOALIGNMENT || IsDockingAllowed() && bInternalDockingAllowed ) + if ( (pCli->eAlign == SFX_ALIGN_NOALIGNMENT) || (IsDockingAllowed() && bInternalDockingAllowed) ) pCli->nVisible |= CHILD_ACTIVE; } } @@ -2800,7 +2800,7 @@ void SfxWorkWindow::ArrangeAutoHideWindows( SfxSplitWindow *pActSplitWin ) BOOL bDummyWindow = !pSplitWin->IsFadeIn(); Window *pDummy = pSplitWin->GetSplitWindow(); Window *pWin = bDummyWindow ? pDummy : pSplitWin; - if ( pSplitWin->IsPinned() && !bDummyWindow || !pWin->IsVisible() && pActSplitWin != pSplitWin ) + if ( (pSplitWin->IsPinned() && !bDummyWindow) || (!pWin->IsVisible() && pActSplitWin != pSplitWin) ) continue; // Breite und Position des Dummy-Fensters als Ausgangspunkt diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index 12f7576c55ae..358c226d6c4a 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -626,7 +626,7 @@ sal_uInt32 SfxFilterMatcher::DetectFilter( SfxMedium& rMedium, const SfxFilter** */ *ppFilter = pFilter; - if ( bHidden || bAPI && nErr == ERRCODE_SFX_CONSULTUSER ) + if ( bHidden || (bAPI && nErr == ERRCODE_SFX_CONSULTUSER) ) nErr = pFilter ? ERRCODE_NONE : ERRCODE_ABORT; return nErr; } diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index cda2d9472928..f1b117f6a1c9 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -1916,8 +1916,8 @@ SfxObjectShellRef DocTempl_EntryData_Impl::CreateObjectShell() pMed->UseInteractionHandler(TRUE); if( pSfxApp->GetFilterMatcher().GuessFilter( *pMed, &pFilter, SFX_FILTER_TEMPLATE, 0 ) || - pFilter && !pFilter->IsOwnFormat() || - pFilter && !pFilter->UsesStorage() ) + (pFilter && !pFilter->IsOwnFormat()) || + (pFilter && !pFilter->UsesStorage()) ) { SfxErrorContext aEc( ERRCTX_SFX_LOADTEMPLATE, aTargetURL ); @@ -1966,6 +1966,7 @@ BOOL DocTempl_EntryData_Impl::DeleteObjectShell() bRet = sal_False; if ( mbIsOwner ) + { if( mbDidConvert ) { bRet=mxObjShell->PreDoSaveAs_Impl( @@ -1991,6 +1992,7 @@ BOOL DocTempl_EntryData_Impl::DeleteObjectShell() } } } + } } if( bRet ) diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index 4fb14464e770..7940e0e3e79a 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -1807,7 +1807,7 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName, aValue >>= aTemplateToRemoveTargetURL; if ( !aGroupTargetURL.getLength() || !maTemplateDirs.getLength() - || aTemplateToRemoveTargetURL.getLength() && !::utl::UCBContentHelper::IsSubPath( maTemplateDirs[ maTemplateDirs.getLength() - 1 ], aTemplateToRemoveTargetURL ) ) + || (aTemplateToRemoveTargetURL.getLength() && !::utl::UCBContentHelper::IsSubPath( maTemplateDirs[ maTemplateDirs.getLength() - 1 ], aTemplateToRemoveTargetURL )) ) return sal_False; // it is not allowed to remove the template } diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx index 33575d401cc6..e70824869070 100644 --- a/sfx2/source/doc/docvor.cxx +++ b/sfx2/source/doc/docvor.cxx @@ -1735,7 +1735,7 @@ BOOL SfxOrganizeDlg_Impl::DontDelete_Impl( SvLBoxEntry* pEntry ) if(SfxOrganizeListBox_Impl::VIEW_FILES == pFocusBox->GetViewType()) nDepth++; - if( nDepth > 2 && !pEntry->GetUserData() || + if( (nDepth > 2 && !pEntry->GetUserData()) || //Delete ueber GetContent verboten nDepth==2 || //Vorlage / Konfigurtionsrubrik nicht loeshcen (nDepth==1 && SfxOrganizeListBox_Impl::VIEW_FILES == diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 7965e5921b0d..66cbedfc7a6b 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1351,10 +1351,12 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >& { sal_Bool bUseSystemDialog = sal_True; if ( aDlgIter->second >>= bUseSystemDialog ) + { if ( bUseSystemDialog ) nDialog = SFX2_IMPL_DIALOG_SYSTEM; else nDialog = SFX2_IMPL_DIALOG_OOO; + } } // The Dispatch supports parameter FolderName that overwrites SuggestedSaveAsDir diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 3697a5721799..866c7b029cb5 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -1254,7 +1254,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( ) ::rtl::OUString aTemplURL( xDocProps->getTemplateURL() ); String aFoundName; - if ( aTemplName.getLength() || aTemplURL.getLength() && !IsReadOnly() ) + if ( aTemplName.getLength() || (aTemplURL.getLength() && !IsReadOnly()) ) { // try to locate template, first using filename // this must be done because writer global document uses this "great" idea to manage the templates of all parts diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx index a5090dcf7ac4..235451b8c3dd 100644 --- a/sfx2/source/doc/objembed.cxx +++ b/sfx2/source/doc/objembed.cxx @@ -277,10 +277,12 @@ void SfxObjectShell::DoDraw_Impl( OutputDevice* pDev, GDIMetaFile * pMtf = pDev->GetConnectMetaFile(); if( pMtf ) + { if( pMtf->IsRecord() && pDev->GetOutDevType() != OUTDEV_PRINTER ) pMtf->Stop(); else pMtf = NULL; + } // #ifndef UNX if( pDev->IsClipRegion() && pDev->GetOutDevType() != OUTDEV_PRINTER ) // #endif diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 2867334625bc..a9d992a9afda 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1373,15 +1373,15 @@ void SfxObjectShell::ImplSign( sal_Bool bScriptingContent ) bool bNoSig = false; if ( IsModified() || !GetMedium() || !GetMedium()->GetName().Len() - || !aODFVersion.equals( ODFVER_012_TEXT ) && !bHasSign ) + || (!aODFVersion.equals( ODFVER_012_TEXT ) && !bHasSign) ) { // the document might need saving ( new, modified or in ODF1.1 format without signature ) if ( nVersion == SvtSaveOptions::ODFVER_012 ) { - if ( bHasSign && QueryBox( NULL, SfxResId( MSG_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN ) ).Execute() == RET_YES - || !bHasSign && QueryBox( NULL, SfxResId( RID_XMLSEC_QUERY_SAVEBEFORESIGN ) ).Execute() == RET_YES ) + if ( (bHasSign && QueryBox( NULL, SfxResId( MSG_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN ) ).Execute() == RET_YES) + || (!bHasSign && QueryBox( NULL, SfxResId( RID_XMLSEC_QUERY_SAVEBEFORESIGN ) ).Execute() == RET_YES) ) { USHORT nId = SID_SAVEDOC; if ( !GetMedium() || !GetMedium()->GetName().Len() ) diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 5501b153e99c..7fce5942f8af 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2410,7 +2410,7 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC , } else if ( SFX_EVENT_LOADFINISHED == pNamedHint->GetEventId() ) { - impl_getPrintHelper();
+ impl_getPrintHelper(); ListenForStorage_Impl( m_pData->m_pObjectShell->GetStorage() ); } else if ( SFX_EVENT_SAVEASDOCDONE == pNamedHint->GetEventId() ) @@ -2424,10 +2424,10 @@ void SfxBaseModel::Notify( SfxBroadcaster& rBC , addTitle_Impl( aArgs, aTitle ); attachResource( m_pData->m_pObjectShell->GetMedium()->GetName(), aArgs ); } - else if ( SFX_EVENT_DOCCREATED == pNamedHint->GetEventId() )
- {
- impl_getPrintHelper();
- }
+ else if ( SFX_EVENT_DOCCREATED == pNamedHint->GetEventId() ) + { + impl_getPrintHelper(); + } postEvent_Impl( pNamedHint->GetEventId() ); } @@ -3609,7 +3609,7 @@ css::uno::Reference< css::frame::XUntitledNumbers > SfxBaseModel::impl_getUntitl aResult += String( SfxResId(STR_REPAIREDDOCUMENT) ); } - if ( m_pData->m_pObjectShell->IsReadOnlyUI() || m_pData->m_pObjectShell->GetMedium() && m_pData->m_pObjectShell->GetMedium()->IsReadOnly() ) + if ( m_pData->m_pObjectShell->IsReadOnlyUI() || (m_pData->m_pObjectShell->GetMedium() && m_pData->m_pObjectShell->GetMedium()->IsReadOnly()) ) aResult += ::rtl::OUString( String( SfxResId(STR_READONLY) ) ); else if ( m_pData->m_pObjectShell->IsDocShared() ) aResult += ::rtl::OUString( String( SfxResId(STR_SHARED) ) ); diff --git a/sfx2/source/view/topfrm.cxx b/sfx2/source/view/topfrm.cxx index 8ba7ea1e39e4..205fdf788ba1 100644 --- a/sfx2/source/view/topfrm.cxx +++ b/sfx2/source/view/topfrm.cxx @@ -963,7 +963,7 @@ sal_Bool SfxTopFrame::InsertDocument( SfxObjectShell* pDoc ) if ( !pImp->bHidden ) { - if ( pDoc->IsHelpDocument() || pPluginItem && pPluginItem->GetValue() == 2 ) + if ( pDoc->IsHelpDocument() || (pPluginItem && pPluginItem->GetValue() == 2) ) pFrame->GetDispatcher()->HideUI( TRUE ); else pFrame->GetDispatcher()->HideUI( FALSE ); @@ -978,7 +978,7 @@ sal_Bool SfxTopFrame::InsertDocument( SfxObjectShell* pDoc ) pFrame->GetDispatcher()->Update_Impl(); pFrame->Show(); GetWindow().Show(); - if ( !IsInPlace() || pPluginItem && pPluginItem->GetValue() == 3 ) + if ( !IsInPlace() || (pPluginItem && pPluginItem->GetValue() == 3) ) pFrame->MakeActive_Impl( GetFrameInterface()->isActive() ); pDoc->OwnerLock( sal_False ); diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 937360e15906..0769a782de86 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -451,9 +451,9 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) // the logic below is following, if the document seems not to need to be reloaded and the physical name is different // to the logical one, then on file system it can be checked that the copy is still newer than the original and no document reload is required - if ( ( !bNeedsReload && ( aMedObj.GetProtocol() == INET_PROT_FILE && + if ( ( !bNeedsReload && ( (aMedObj.GetProtocol() == INET_PROT_FILE && aMedObj.getFSysPath(INetURLObject::FSYS_DETECT) != aPhysObj.getFSysPath(INetURLObject::FSYS_DETECT) && - SfxContentHelper::IsYounger( aPhysObj.GetMainURL( INetURLObject::NO_DECODE ), aMedObj.GetMainURL( INetURLObject::NO_DECODE ) ) + SfxContentHelper::IsYounger( aPhysObj.GetMainURL( INetURLObject::NO_DECODE ), aMedObj.GetMainURL( INetURLObject::NO_DECODE ) )) || pMed->IsRemote() ) ) || pVersionItem ) { |