diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-11 08:42:15 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-11 09:48:17 +0200 |
commit | e5da350e4dd9b175c2f50cb392b23a805dac9a27 (patch) | |
tree | 1abf5f6a2342a09895ade05a92a3550897c14e38 /sfx2 | |
parent | c85cda1eb461d1b27b49ad746e2b2299908b9e75 (diff) |
loplugin: defaultparams
Change-Id: Ibff26c023655d36f0fa71ead399a6116c2988607
Diffstat (limited to 'sfx2')
51 files changed, 156 insertions, 159 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index a22f36d8c6b2..98958e9faab0 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -490,7 +490,7 @@ IMPL_LINK_TYPED( SfxApplication, GlobalBasicErrorHdl_Impl, StarBASIC*, pStarBasi #ifndef DISABLE_DYNLOADING // load basctl module osl::Module aMod; - aMod.loadRelative(&thisModule, SVLIBRARY("basctl"), 0); + aMod.loadRelative(&thisModule, SVLIBRARY("basctl")); // get symbol basicide_handle_basic_error pSymbol = reinterpret_cast<basicide_handle_basic_error>(aMod.getFunctionSymbol("basicide_handle_basic_error")); @@ -588,7 +588,7 @@ void SfxApplication::MacroOrganizer( sal_Int16 nTabId ) #ifndef DISABLE_DYNLOADING // load basctl module osl::Module aMod; - aMod.loadRelative(&thisModule, SVLIBRARY("basctl"), 0); + aMod.loadRelative(&thisModule, SVLIBRARY("basctl")); // get symbol basicide_macro_organizer pSymbol = reinterpret_cast<basicide_macro_organizer>(aMod.getFunctionSymbol("basicide_macro_organizer")); diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx index d6315d286d45..89e11a37bc81 100644 --- a/sfx2/source/appl/appinit.cxx +++ b/sfx2/source/appl/appinit.cxx @@ -181,7 +181,7 @@ OUString GetSpecialCharsForEdit(vcl::Window* pParent, const vcl::Font& rFont) #ifndef DISABLE_DYNLOADING osl::Module aMod; - aMod.loadRelative(&thisModule, SVLIBRARY("cui"), 0); + aMod.loadRelative(&thisModule, SVLIBRARY("cui")); // get symbol OUString aSymbol( "GetSpecialCharsForEdit" ); diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 4ce10f4a209c..2a11004328d2 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -200,7 +200,7 @@ sal_uInt32 CheckPasswd_Impl if( ( !pFile->GetFilter() || pFile->IsStorage() ) ) { - uno::Reference< embed::XStorage > xStorage = pFile->GetStorage( true ); + uno::Reference< embed::XStorage > xStorage = pFile->GetStorage(); if( xStorage.is() ) { uno::Reference< beans::XPropertySet > xStorageProps( xStorage, uno::UNO_QUERY ); diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 611d403f1457..0f92cfb68208 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -293,7 +293,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) if ( !pFrame || !pFrame->GetWindow().IsReallyVisible() ) continue; - if (pObjSh->PrepareClose(true)) + if (pObjSh->PrepareClose()) pObjSh->SetModified( false ); else return; @@ -853,7 +853,7 @@ OUString ChooseMacro( const Reference< XModel >& rxLimitToDocument, bool bChoose osl::Module aMod; // load basctl module - aMod.loadRelative(&thisModule, SVLIBRARY("basctl"), 0); + aMod.loadRelative(&thisModule, SVLIBRARY("basctl")); // get symbol basicide_choose_macro pSymbol = reinterpret_cast<basicide_choose_macro>(aMod.getFunctionSymbol("basicide_choose_macro")); diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx index 71458ed51e28..7d6304c556bc 100644 --- a/sfx2/source/appl/macroloader.cxx +++ b/sfx2/source/appl/macroloader.cxx @@ -272,7 +272,7 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, com::sun::star::uno::An if ( bSetDocMacroMode ) { // mark document: it executes an own macro, so it's in a modal mode - pDoc->SetMacroMode_Impl( true ); + pDoc->SetMacroMode_Impl(); } if ( bSetGlobalThisComponent ) diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index daf697cd2be4..145121d14842 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1227,7 +1227,7 @@ void BookmarksBox_Impl::DoAction( sal_uInt16 nAction ) RemoveEntry( nPos ); OUString aImageURL = IMAGE_URL; aImageURL += INetURLObject( *pURL ).GetHost(); - nPos = InsertEntry( aDlg->GetTitle(), SvFileInformationManager::GetImage( INetURLObject(aImageURL), false ) ); + nPos = InsertEntry( aDlg->GetTitle(), SvFileInformationManager::GetImage( INetURLObject(aImageURL) ) ); SetEntryData( nPos, new OUString( *pURL ) ); SelectEntryPos( nPos ); delete pURL; @@ -1370,7 +1370,7 @@ void BookmarksTabPage_Impl::AddBookmarks( const OUString& rTitle, const OUString { OUString aImageURL = IMAGE_URL; aImageURL += INetURLObject( rURL ).GetHost(); - sal_uInt16 nPos = m_pBookmarksBox->InsertEntry( rTitle, SvFileInformationManager::GetImage( INetURLObject(aImageURL), false ) ); + sal_uInt16 nPos = m_pBookmarksBox->InsertEntry( rTitle, SvFileInformationManager::GetImage( INetURLObject(aImageURL) ) ); m_pBookmarksBox->SetEntryData( nPos, new OUString( rURL ) ); } diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx index 5029b7d089dd..2f378d79c5a3 100644 --- a/sfx2/source/appl/sfxpicklist.cxx +++ b/sfx2/source/appl/sfxpicklist.cxx @@ -184,7 +184,7 @@ void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh ) return; // ignore hidden documents - if ( !SfxViewFrame::GetFirst( pDocSh, true ) ) + if ( !SfxViewFrame::GetFirst( pDocSh ) ) return; OUString aTitle = pDocSh->GetTitle(SFX_TITLE_PICKLIST); diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index 93bf4df98def..d1f2b7657b41 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -299,13 +299,13 @@ throw (css::uno::RuntimeException, std::exception) { m_pWrkWin->MakeVisible_Impl( true ); m_pWrkWin->ShowChildren_Impl(); - m_pWrkWin->ArrangeChildren_Impl( true ); + m_pWrkWin->ArrangeChildren_Impl(); } else if ( eLayoutEvent == css::frame::LayoutManagerEvents::INVISIBLE ) { m_pWrkWin->MakeVisible_Impl( false ); m_pWrkWin->HideChildren_Impl(); - m_pWrkWin->ArrangeChildren_Impl( true ); + m_pWrkWin->ArrangeChildren_Impl(); } else if ( eLayoutEvent == css::frame::LayoutManagerEvents::LOCK ) { diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx index d00e5f77a452..96aaef36d722 100644 --- a/sfx2/source/bastyp/fltfnc.cxx +++ b/sfx2/source/bastyp/fltfnc.cxx @@ -426,7 +426,7 @@ sal_uInt32 SfxFilterMatcher::GuessFilterIgnoringContent( sal_uInt32 SfxFilterMatcher::GuessFilter( SfxMedium& rMedium, const SfxFilter**ppFilter, SfxFilterFlags nMust, SfxFilterFlags nDont ) const { - return GuessFilterControlDefaultUI( rMedium, ppFilter, nMust, nDont, true ); + return GuessFilterControlDefaultUI( rMedium, ppFilter, nMust, nDont ); } diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx index a45f2654777b..98b3d4a17530 100644 --- a/sfx2/source/bastyp/helper.cxx +++ b/sfx2/source/bastyp/helper.cxx @@ -71,7 +71,7 @@ std::vector<OUString> SfxContentHelper::GetResultSet( const OUString& rURL ) try { - xDynResultSet = aCnt.createDynamicCursor( aProps, ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS ); + xDynResultSet = aCnt.createDynamicCursor( aProps ); if ( xDynResultSet.is() ) xResultSet = xDynResultSet->getStaticResultSet(); } @@ -143,7 +143,7 @@ std::vector< OUString > SfxContentHelper::GetHelpTreeViewContents( const OUStrin try { uno::Reference< ucb::XDynamicResultSet > xDynResultSet; - xDynResultSet = aCnt.createDynamicCursor( aProps, ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS ); + xDynResultSet = aCnt.createDynamicCursor( aProps ); if ( xDynResultSet.is() ) xResultSet = xDynResultSet->getStaticResultSet(); } diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index e9685688042d..616b110d0933 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -502,7 +502,7 @@ IMPL_LINK_NOARG_TYPED( SfxDispatcher, EventHdl_Impl, Idle *, void ) Update_Impl(); SfxBindings* pBindings = GetBindings(); if ( pBindings ) - pBindings->StartUpdate_Impl(false); + pBindings->StartUpdate_Impl(); } /** With this method it can be tested whether the <SfxShell> rShell is on the @@ -754,7 +754,7 @@ void SfxDispatcher::DoDeactivate_Impl(bool bMDI, SfxViewFrame* pNew) SfxBindings *pBind = GetBindings(); while ( pBind ) { - pBind->HidePopupCtrls_Impl( true ); + pBind->HidePopupCtrls_Impl(); pBind = pBind->GetSubBindings_Impl(); } diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx index 1fc4e524f59f..607a56191063 100644 --- a/sfx2/source/control/shell.cxx +++ b/sfx2/source/control/shell.cxx @@ -259,7 +259,7 @@ void SfxShell::Invalidate_Impl( SfxBindings& rBindings, sal_uInt16 nId ) { if ( nId == 0 ) { - rBindings.InvalidateShell( *this, false ); + rBindings.InvalidateShell( *this ); } else { diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index b961ac119db1..709ba9a16333 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -674,7 +674,7 @@ IMPL_LINK_NOARG(SfxSingleTabDialog, OKHdl_Impl) EndDialog( RET_OK ); } else - EndDialog( RET_CANCEL ); + EndDialog(); return 0; } diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 51e62f4c0bcb..3334c9e9b97d 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -181,7 +181,7 @@ OUString ConvertDateTime_Impl( const OUString& rName, const OUString pDelim ( ", " ); OUString aStr( rWrapper.getDate( aD ) ); aStr += pDelim; - aStr += rWrapper.getTime( aT, true, false ); + aStr += rWrapper.getTime( aT, true ); OUString aAuthor = comphelper::string::stripStart(rName, ' '); if (!aAuthor.isEmpty()) { @@ -716,10 +716,10 @@ void SfxDocumentDescPage::Reset(const SfxItemSet *rSet) SFX_ITEMSET_ARG( rSet, pROItem, SfxBoolItem, SID_DOC_READONLY, false ); if ( pROItem && pROItem->GetValue() ) { - m_pTitleEd->SetReadOnly( true ); - m_pThemaEd->SetReadOnly( true ); - m_pKeywordsEd->SetReadOnly( true ); - m_pCommentEd->SetReadOnly( true ); + m_pTitleEd->SetReadOnly(); + m_pThemaEd->SetReadOnly(); + m_pKeywordsEd->SetReadOnly(); + m_pCommentEd->SetReadOnly(); } } @@ -879,7 +879,7 @@ IMPL_STATIC_LINK_NOARG(SfxDocumentPage, ChangePassHdl) OUString aDocName; sfx2::RequestPassword(pFilter, aDocName, pMedSet); - pShell->SetModified(true); + pShell->SetModified(); } while (false); return 0; diff --git a/sfx2/source/dialog/newstyle.cxx b/sfx2/source/dialog/newstyle.cxx index 464d12a6a5b3..57396e79b00f 100644 --- a/sfx2/source/dialog/newstyle.cxx +++ b/sfx2/source/dialog/newstyle.cxx @@ -32,7 +32,7 @@ IMPL_LINK( SfxNewStyleDlg, OKHdl, Control *, pControl ) { (void)pControl; //unused const OUString aName( m_pColBox->GetText() ); - SfxStyleSheetBase* pStyle = rPool.Find( aName, rPool.GetSearchFamily(), SFXSTYLEBIT_ALL ); + SfxStyleSheetBase* pStyle = rPool.Find( aName, rPool.GetSearchFamily() ); if ( pStyle ) { if ( !pStyle->IsUserDefined() ) diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index 0953401cce1a..28a245325c58 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -66,11 +66,11 @@ SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( vcl::Window* pParent if( bOutputForPrinter ) { - m_pPrinterOutputRB->Check( true ); + m_pPrinterOutputRB->Check(); } else { - m_pPrintFileOutputRB->Check( true ); + m_pPrintFileOutputRB->Check(); m_pPDFCB->Disable(); } @@ -198,27 +198,27 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu m_pReduceTransparencyCB->Check( pCurrentOptions->IsReduceTransparency() ); if( pCurrentOptions->GetReducedTransparencyMode() == PRINTER_TRANSPARENCY_AUTO ) - m_pReduceTransparencyAutoRB->Check( true ); + m_pReduceTransparencyAutoRB->Check(); else - m_pReduceTransparencyNoneRB->Check( true ); + m_pReduceTransparencyNoneRB->Check( ); m_pReduceGradientsCB->Check( pCurrentOptions->IsReduceGradients() ); if( pCurrentOptions->GetReducedGradientMode() == PRINTER_GRADIENT_STRIPES ) - m_pReduceGradientsStripesRB->Check( true ); + m_pReduceGradientsStripesRB->Check(); else - m_pReduceGradientsColorRB->Check( true ); + m_pReduceGradientsColorRB->Check(); m_pReduceGradientsStepCountNF->SetValue( pCurrentOptions->GetReducedGradientStepCount() ); m_pReduceBitmapsCB->Check( pCurrentOptions->IsReduceBitmaps() ); if( pCurrentOptions->GetReducedBitmapMode() == PRINTER_BITMAP_OPTIMAL ) - m_pReduceBitmapsOptimalRB->Check( true ); + m_pReduceBitmapsOptimalRB->Check(); else if( pCurrentOptions->GetReducedBitmapMode() == PRINTER_BITMAP_NORMAL ) - m_pReduceBitmapsNormalRB->Check( true ); + m_pReduceBitmapsNormalRB->Check(); else - m_pReduceBitmapsResolutionRB->Check( true ); + m_pReduceBitmapsResolutionRB->Check(); const sal_uInt16 nDPI = pCurrentOptions->GetReducedBitmapResolution(); diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index 2af8ef50e1ff..60ff95989b9b 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -361,7 +361,7 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl) } if (bAlreadyDone) - m_pRecordChangesCB->Check( true ); // restore original state + m_pRecordChangesCB->Check(); // restore original state else { // remember required values to change protection and change recording in diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 69ac91b41892..751c23a2bac3 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -112,7 +112,7 @@ public: SetAlign( pOwner->GetAlign() ); Actualize(); ShowAutoHideButton( pOwner->IsAutoHideButtonVisible() ); - ShowFadeInHideButton( true ); + ShowFadeInHideButton(); } virtual ~SfxEmptySplitWin_Impl() @@ -211,7 +211,7 @@ SfxSplitWindow::SfxSplitWindow( vcl::Window* pParent, SfxChildAlignment eAl, if ( bWithButtons ) { ShowAutoHideButton( false ); // no autohide button (pin) anymore - ShowFadeOutButton( true ); + ShowFadeOutButton(); } // Set SV-Alignment @@ -587,7 +587,7 @@ void SfxSplitWindow::MoveWindow( SfxDockingWindow* pDockWin, const Size& rSize, sal_uInt16 nL, nP; GetWindowPos( pDockWin, nL, nP ); - if ( nLine > nL && GetItemCount( GetItemId( nL, 0 ) ) == 1 ) + if ( nLine > nL && GetItemCount( GetItemId( nL ) ) == 1 ) { // If the last window is removed from its line, then everything slips // one line to the front! @@ -700,13 +700,13 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock, DeactivateUpdateMode* pDeactivateUpdateMode = new DeactivateUpdateMode( *this ); - if ( bNewLine || nLine == GetItemCount( 0 ) ) + if ( bNewLine || nLine == GetItemCount() ) { // An existing row should not be inserted, instead a new one // will be created sal_uInt16 nId = 1; - for ( sal_uInt16 n=0; n<GetItemCount(0); n++ ) + for ( sal_uInt16 n=0; n<GetItemCount(); n++ ) { if ( GetItemId(n) >= nId ) nId = GetItemId(n)+1; @@ -730,7 +730,7 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock, // SplitWindows are once created in SFX and when inserting the first // DockingWindows is made visible. - if ( GetItemCount( 0 ) == 1 && GetItemCount( 1 ) == 1 ) + if ( GetItemCount() == 1 && GetItemCount( 1 ) == 1 ) { // The Rearranging in WorkWindow and a Show() on the SplitWindow is // caused by SfxDockingwindow (->SfxWorkWindow::ConfigChild_Impl) @@ -813,7 +813,7 @@ void SfxSplitWindow::RemoveWindow( SfxDockingWindow* pDockWin, bool bHide ) // SplitWindows are once created in SFX and is made invisible after // removing the last DockingWindows. - if ( GetItemCount( nSet ) == 1 && GetItemCount( 0 ) == 1 ) + if ( GetItemCount( nSet ) == 1 && GetItemCount() == 1 ) { // The Rearranging in WorkWindow is caused by SfxDockingwindow Hide(); @@ -912,7 +912,7 @@ sal_uInt16 SfxSplitWindow::GetLineCount() const Returns the number of rows = number of sub-itemsets in the root set. */ { - return GetItemCount( 0 ); + return GetItemCount(); } @@ -950,7 +950,7 @@ sal_uInt16 SfxSplitWindow::GetWindowCount() const Returns the total number of windows */ { - return GetItemCount( 0 ); + return GetItemCount(); } @@ -967,7 +967,7 @@ IMPL_LINK_TYPED( SfxSplitWindow, TimerHdl, Timer*, pTimer, void) if ( pTimer ) pTimer->Stop(); - if ( CursorIsOverRect( false ) || !pTimer ) + if ( CursorIsOverRect() || !pTimer ) { // If the cursor is within the window, display the SplitWindow and set // up the timer for close @@ -1100,7 +1100,7 @@ void SfxSplitWindow::SetPinned_Impl( bool bOn ) return; bPinned = bOn; - if ( GetItemCount( 0 ) == 0 ) + if ( GetItemCount() == 0 ) return; if ( !bOn ) @@ -1130,7 +1130,7 @@ void SfxSplitWindow::SetPinned_Impl( bool bOn ) { pEmptyWin->nState &= ~1; SetOutputSizePixel( GetFloatingWindow()->GetOutputSizePixel() ); - SetFloatingMode( false ); + SetFloatingMode(); if ( pEmptyWin->bFadeIn ) { @@ -1154,7 +1154,7 @@ void SfxSplitWindow::SetFadeIn_Impl( bool bOn ) if ( bOn == pEmptyWin->bFadeIn ) return; - if ( GetItemCount( 0 ) == 0 ) + if ( GetItemCount() == 0 ) return; pEmptyWin->bFadeIn = bOn; diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index 57e72cb78015..a74292f92d22 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -104,7 +104,7 @@ void SearchDialog::LoadConfig() } } else - m_pWrapAroundBox->Check( true ); + m_pWrapAroundBox->Check(); } void SearchDialog::SaveConfig() diff --git a/sfx2/source/dialog/styledlg.cxx b/sfx2/source/dialog/styledlg.cxx index 1735f1b28371..6c3f55009bbf 100644 --- a/sfx2/source/dialog/styledlg.cxx +++ b/sfx2/source/dialog/styledlg.cxx @@ -147,7 +147,7 @@ IMPL_LINK( SfxStyleDialog, CancelHdl, Button *, pButton ) if ( pPage ) pPage->Reset( GetInputSetImpl() ); - EndDialog( RET_CANCEL ); + EndDialog(); return 0; } diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index cc9d5cbe00d1..004349b5099c 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -992,7 +992,7 @@ namespace sfx2 break; case MID_LOCK_TASK_PANEL: - m_rDockingWindow.SetFloatingMode( false ); + m_rDockingWindow.SetFloatingMode(); break; case MID_LAYOUT_DRAWERS: @@ -1212,7 +1212,7 @@ namespace sfx2 SfxResId( STR_SFX_UNDOCK ).toString() ); - pMenu->RemoveDisabledEntries( false, false ); + pMenu->RemoveDisabledEntries( false ); return pMenu; } diff --git a/sfx2/source/dialog/templateinfodlg.cxx b/sfx2/source/dialog/templateinfodlg.cxx index df195c8efdb2..7b7a553855e1 100644 --- a/sfx2/source/dialog/templateinfodlg.cxx +++ b/sfx2/source/dialog/templateinfodlg.cxx @@ -101,7 +101,7 @@ void SfxTemplateInfoDlg::loadDocument(const OUString &rURL) if ( xDisp.is() ) { - mpPreviewView->EnableInput( false, true ); + mpPreviewView->EnableInput( false ); bool b = true; uno::Sequence <beans::PropertyValue> aArgs( 4 ); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 608a573a6a6c..ffc5674bc61d 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -949,7 +949,7 @@ SfxStyleSheetBase *SfxCommonTemplateDialog_Impl::GetSelectedStyle() const return NULL; const OUString aTemplName( GetSelectedEntry() ); const SfxStyleFamilyItem* pItem = GetFamilyItem_Impl(); - return pStyleSheetPool->Find( aTemplName, pItem->GetFamily(), SFXSTYLEBIT_ALL ); + return pStyleSheetPool->Find( aTemplName, pItem->GetFamily() ); } /** @@ -972,7 +972,7 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const OUString &rStr) if ( !pItem ) return; const SfxStyleFamily eFam = pItem->GetFamily(); - SfxStyleSheetBase* pStyle = pStyleSheetPool->Find( rStr, eFam, SFXSTYLEBIT_ALL ); + SfxStyleSheetBase* pStyle = pStyleSheetPool->Find( rStr, eFam ); if( pStyle ) { bool bReadWrite = !(pStyle->GetMask() & SFXSTYLEBIT_READONLY); @@ -1176,7 +1176,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags) pItem = GetFamilyItem_Impl(); if((nFlags & UPDATE_FAMILY) == UPDATE_FAMILY) // Update view type list (Hierarchical, All, etc. { - CheckItem(nActFamily, true); // check Button in Toolbox + CheckItem(nActFamily); // check Button in Toolbox aFilterLb->SetUpdateMode(false); aFilterLb->Clear(); //insert hierarchical at the beginning @@ -1303,12 +1303,12 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem) if(pItem && !bWaterDisabled) { CheckItem(SID_STYLE_WATERCAN, pItem->GetValue()); - EnableItem( SID_STYLE_WATERCAN, true ); + EnableItem( SID_STYLE_WATERCAN ); } else { if(!bWaterDisabled) - EnableItem(SID_STYLE_WATERCAN, true); + EnableItem(SID_STYLE_WATERCAN); else EnableItem(SID_STYLE_WATERCAN, false); } @@ -1411,7 +1411,7 @@ void SfxCommonTemplateDialog_Impl::Update_Impl() else if( bDocChanged ) { // other DocShell -> all new - CheckItem( nActFamily, true ); + CheckItem( nActFamily ); nActFilter = static_cast< sal_uInt16 >( LoadFactoryStyleFilter( pDocShell ) ); if ( SFXSTYLEBIT_ALL == nActFilter ) nActFilter = pDocShell->GetAutoStyleFilterIndex(); @@ -1427,7 +1427,7 @@ void SfxCommonTemplateDialog_Impl::Update_Impl() else { // other filters for automatic - CheckItem( nActFamily, true ); + CheckItem( nActFamily ); const SfxStyleFamilyItem *pStyleItem = GetFamilyItem_Impl(); if ( pStyleItem && 0 == pStyleItem->GetFilterList()[ nActFilter ]->nFlags && nAppFilter != pItem->GetValue()) @@ -1508,9 +1508,7 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint const SfxStyleFamilyItem *pItem = GetFamilyItem_Impl(); if( !pItem ) break; const SfxStyleFamily eFam = pItem->GetFamily(); - SfxStyleSheetBase *pStyle = - pStyleSheetPool->Find( - aStr, eFam, SFXSTYLEBIT_ALL ); + SfxStyleSheetBase *pStyle = pStyleSheetPool->Find( aStr, eFam ); if( pStyle ) { bool bReadWrite = !(pStyle->GetMask() & SFXSTYLEBIT_READONLY); @@ -1958,7 +1956,7 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *) // check the style is used or not const OUString aTemplName(pTreeBox ? pTreeBox->GetEntryText(pEntry) : aFmtLb->GetEntryText(pEntry)); - SfxStyleSheetBase* pStyle = pStyleSheetPool->Find( aTemplName, pItem->GetFamily(), SFXSTYLEBIT_ALL ); + SfxStyleSheetBase* pStyle = pStyleSheetPool->Find( aTemplName, pItem->GetFamily() ); if ( pStyle->IsUsed() ) // pStyle is in use in the document? { @@ -2066,7 +2064,7 @@ void SfxCommonTemplateDialog_Impl::EnableDelete() OSL_ENSURE(pStyle, "Style not found"); if(pStyle && pStyle->IsUserDefined()) { - EnableDel(true); + EnableDel(); } else { @@ -2202,7 +2200,7 @@ PopupMenu* SfxCommonTemplateDialog_Impl::CreateContextMenu() { if ( bBindingUpdate ) { - pBindings->Invalidate( SID_STYLE_NEW, true, false ); + pBindings->Invalidate( SID_STYLE_NEW, true ); pBindings->Update( SID_STYLE_NEW ); bBindingUpdate = false; } @@ -2303,15 +2301,15 @@ void SfxTemplateDialog_Impl::ClearFamilyList() void SfxCommonTemplateDialog_Impl::InvalidateBindings() { - pBindings->Invalidate(SID_STYLE_NEW_BY_EXAMPLE, true, false); + pBindings->Invalidate(SID_STYLE_NEW_BY_EXAMPLE, true); pBindings->Update( SID_STYLE_NEW_BY_EXAMPLE ); - pBindings->Invalidate(SID_STYLE_UPDATE_BY_EXAMPLE, true, false); + pBindings->Invalidate(SID_STYLE_UPDATE_BY_EXAMPLE, true); pBindings->Update( SID_STYLE_UPDATE_BY_EXAMPLE ); - pBindings->Invalidate( SID_STYLE_WATERCAN, true, false); + pBindings->Invalidate( SID_STYLE_WATERCAN, true); pBindings->Update( SID_STYLE_WATERCAN ); - pBindings->Invalidate( SID_STYLE_NEW, true, false ); + pBindings->Invalidate( SID_STYLE_NEW, true); pBindings->Update( SID_STYLE_NEW ); - pBindings->Invalidate( SID_STYLE_DRAGHIERARCHIE, true, false ); + pBindings->Invalidate( SID_STYLE_DRAGHIERARCHIE, true); pBindings->Update( SID_STYLE_DRAGHIERARCHIE ); } diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index 3de3cfdfa232..0ea9352e5458 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -410,7 +410,7 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton ) if ( nRet == RET_OK ) { SfxStringItem aComment( SID_DOCINFO_COMMENTS, aInfo.aComment ); - pObjShell->SetModified( true ); + pObjShell->SetModified(); const SfxPoolItem* aItems[2]; aItems[0] = &aComment; aItems[1] = NULL; @@ -424,7 +424,7 @@ IMPL_LINK( SfxVersionDialog, ButtonHdl_Impl, Button*, pButton ) if (pButton == m_pDeleteButton && pEntry) { pObjShell->GetMedium()->RemoveVersion_Impl( static_cast<SfxVersionInfo*>(pEntry->GetUserData())->aName ); - pObjShell->SetModified( true ); + pObjShell->SetModified(); m_pVersionBox->SetUpdateMode( false ); m_pVersionBox->Clear(); Init_Impl(); @@ -492,7 +492,7 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl(vcl::Window *pParent, SfxVe { m_pOKButton->Hide(); m_pCancelButton->Hide(); - m_pEdit->SetReadOnly(true); + m_pEdit->SetReadOnly(); SetText(SfxResId(STR_VIEWVERSIONCOMMENT)); m_pCloseButton->GrabFocus(); } diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 75254c4275c6..27e31f02e0fd 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -1730,8 +1730,7 @@ SfxDocumentMetaData::getDocumentStatistics() throw (css::uno::RuntimeException, stat.Name = OUString::createFromAscii(s_stdStats[i]); sal_Int32 val; css::uno::Any any; - if (!::sax::Converter::convertNumber(val, text, 0, - std::numeric_limits<sal_Int32>::max()) || (val < 0)) { + if (!::sax::Converter::convertNumber(val, text, 0) || (val < 0)) { val = 0; SAL_WARN("sfx.doc", "Invalid number: " << text); } diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 14092090c966..845ed0e702f0 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -531,7 +531,7 @@ void SfxMedium::CloseInStream_Impl() if ( pImp->m_pInStream && !GetContent().is() ) { - CreateTempFile( true ); + CreateTempFile(); return; } @@ -1636,7 +1636,7 @@ bool SfxMedium::TransactedTransferForFS_Impl( const INetURLObject& aSource, { if ( pImp->pTempFile ) { - pImp->pTempFile->EnableKillingFile( true ); + pImp->pTempFile->EnableKillingFile(); delete pImp->pTempFile; pImp->pTempFile = NULL; } @@ -1782,7 +1782,7 @@ void SfxMedium::Transfer_Impl() // remove temporary file if ( pImp->pTempFile ) { - pImp->pTempFile->EnableKillingFile( true ); + pImp->pTempFile->EnableKillingFile(); delete pImp->pTempFile; pImp->pTempFile = NULL; } @@ -2773,7 +2773,7 @@ void SfxMedium::CompleteReOpen() { if ( pImp->pTempFile ) { - pImp->pTempFile->EnableKillingFile( true ); + pImp->pTempFile->EnableKillingFile(); delete pImp->pTempFile; } pImp->pTempFile = pTmpFile; @@ -2782,7 +2782,7 @@ void SfxMedium::CompleteReOpen() } else if (pTmpFile) { - pTmpFile->EnableKillingFile( true ); + pTmpFile->EnableKillingFile(); delete pTmpFile; } @@ -3240,7 +3240,7 @@ void SfxMedium::CreateTempFile( bool bReplace ) } pImp->pTempFile = new ::utl::TempFile(); - pImp->pTempFile->EnableKillingFile( true ); + pImp->pTempFile->EnableKillingFile(); pImp->m_aName = pImp->pTempFile->GetFileName(); OUString aTmpURL = pImp->pTempFile->GetURL(); if ( pImp->m_aName.isEmpty() || aTmpURL.isEmpty() ) @@ -3339,7 +3339,7 @@ void SfxMedium::CreateTempFileNoCopy() delete pImp->pTempFile; pImp->pTempFile = new ::utl::TempFile(); - pImp->pTempFile->EnableKillingFile( true ); + pImp->pTempFile->EnableKillingFile(); pImp->m_aName = pImp->pTempFile->GetFileName(); if ( pImp->m_aName.isEmpty() ) { @@ -3593,7 +3593,7 @@ OUString SfxMedium::SwitchDocumentToTempFile() GetMedium_Impl(); LockOrigFileOnDemand( false, false ); - CreateTempFile( true ); + CreateTempFile(); GetMedium_Impl(); if ( pImp->xStream.is() ) @@ -3649,7 +3649,7 @@ bool SfxMedium::SwitchDocumentToFile( const OUString& aURL ) // open the temporary file based document GetMedium_Impl(); LockOrigFileOnDemand( false, false ); - CreateTempFile( true ); + CreateTempFile(); GetMedium_Impl(); if ( pImp->xStream.is() ) diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 306202fd1529..f6145406f7a9 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1326,7 +1326,7 @@ OUString ModelData_Impl::GetRecommendedName( const OUString& aSuggestedName, con if ( !aExtension.isEmpty() ) aObj.SetExtension( aExtension ); - aRecommendedName = aObj.GetName( INetURLObject::DECODE_WITH_CHARSET, RTL_TEXTENCODING_UTF8 ); + aRecommendedName = aObj.GetName( INetURLObject::DECODE_WITH_CHARSET ); } } } diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index cb8b103cdfc9..29561b0ef791 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -407,7 +407,7 @@ SfxNewFileDialog_Impl::SfxNewFileDialog_Impl( // update the template configuration if necessary { WaitObject aWaitCursor( pAntiImplP->GetParent() ); - aTemplates.Update( true /* be smart */ ); + aTemplates.Update(); } // fill the list boxes const sal_uInt16 nCount = aTemplates.GetRegionCount(); diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 16c573e36ad3..53fd6f2548b1 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -334,7 +334,7 @@ void SfxObjectShell::LoadStyles DBG_ASSERT(pSourcePool, "Source-DocumentShell ohne StyleSheetPool"); SfxStyleSheetBasePool *pMyPool = GetStyleSheetPool(); DBG_ASSERT(pMyPool, "Dest-DocumentShell ohne StyleSheetPool"); - pSourcePool->SetSearchMask(SFX_STYLE_FAMILY_ALL, SFXSTYLEBIT_ALL); + pSourcePool->SetSearchMask(SFX_STYLE_FAMILY_ALL); std::unique_ptr<Styles_Impl[]> pFound(new Styles_Impl[pSourcePool->Count()]); sal_uInt16 nFound = 0; @@ -480,7 +480,7 @@ void SfxObjectShell::UpdateFromTemplate_Impl( ) { // user refuses, so don't ask again for this document SetQueryLoadTemplate(false); - SetModified( true ); + SetModified(); } } } @@ -563,14 +563,14 @@ bool SfxObjectShell::IsUseUserData() const void SfxObjectShell::SetQueryLoadTemplate( bool bNew ) { if ( pImp->bQueryLoadTemplate != bNew ) - SetModified( true ); + SetModified(); pImp->bQueryLoadTemplate = bNew; } void SfxObjectShell::SetUseUserData( bool bNew ) { if ( pImp->bUseUserData != bNew ) - SetModified( true ); + SetModified(); pImp->bUseUserData = bNew; } @@ -587,14 +587,14 @@ bool SfxObjectShell::IsSaveVersionOnClose() const void SfxObjectShell::SetLoadReadonly( bool bNew ) { if ( pImp->bLoadReadonly != bNew ) - SetModified( true ); + SetModified(); pImp->bLoadReadonly = bNew; } void SfxObjectShell::SetSaveVersionOnClose( bool bNew ) { if ( pImp->bSaveVersionOnClose != bNew ) - SetModified( true ); + SetModified(); pImp->bSaveVersionOnClose = bNew; } diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx index 1a04f9711ebe..cb05205e2908 100644 --- a/sfx2/source/doc/objembed.cxx +++ b/sfx2/source/doc/objembed.cxx @@ -122,9 +122,9 @@ void SfxObjectShell::SetVisArea( const Rectangle & rVisArea ) if ( GetCreateMode() == SfxObjectCreateMode::EMBEDDED ) { if ( IsEnableSetModified() ) - SetModified( true ); + SetModified(); - SfxGetpApp()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, GlobalEventConfig::GetEventName(GlobalEventId::VISAREACHANGED), this)); + SfxGetpApp()->NotifyEvent(SfxEventHint( SFX_EVENT_VISAREACHANGED, GlobalEventConfig::GetEventName(GlobalEventId::VISAREACHANGED), this)); } } } diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index ff6099de91ac..a45c99f00686 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -213,7 +213,7 @@ void SfxObjectShell::FlushDocInfo() if ( IsLoading() ) return; - SetModified(true); + SetModified(); uno::Reference<document::XDocumentProperties> xDocProps(getDocProperties()); DoFlushDocInfo(); // call template method OUString url(xDocProps->getAutoloadURL()); @@ -555,7 +555,7 @@ bool SfxObjectShell::SwitchToShared( bool bShared, bool bSave ) if ( pViewFrame ) { // TODO/LATER: currently the application guards against the reentrance problem - SetModified( true ); // the modified flag has to be set to let the document be stored with the shared flag + SetModified(); // the modified flag has to be set to let the document be stored with the shared flag const SfxPoolItem* pItem = pViewFrame->GetBindings().ExecuteSynchron( HasName() ? SID_SAVEDOC : SID_SAVEASDOC ); const SfxBoolItem* pResult = PTR_CAST( SfxBoolItem, pItem ); bResult = ( pResult && pResult->GetValue() ); @@ -1215,7 +1215,7 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags ) bSetModifiedTRUE = true; if ( !IsEnableSetModified() ) - EnableSetModified( true ); + EnableSetModified(); if( !bSetModifiedTRUE && IsEnableSetModified() ) SetModified( false ); @@ -1252,7 +1252,7 @@ void SfxObjectShell::FinishedLoading( SfxLoadedFlags nFlags ) // should do the notification, in result the notification is done when all the FinishedLoading() calls are finished if ( bSetModifiedTRUE ) - SetModified( true ); + SetModified(); else SetModified( false ); @@ -1363,7 +1363,7 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad() { // some further initializations for templates SetTemplate_Impl( aName, aTemplateName, this ); - pTmpMedium->CreateTempFile( true ); + pTmpMedium->CreateTempFile(); } // templates are never readonly @@ -1418,7 +1418,7 @@ void SfxObjectShell::CancelTransfers() { AbortImport(); if( IsLoading() ) - FinishedLoading( SfxLoadedFlags::ALL ); + FinishedLoading(); } } diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index 6020e352d19d..23ebbaf0aebe 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -835,7 +835,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) } // Cancelled by the user? - if (!PrepareClose(true)) + if (!PrepareClose()) { rReq.SetReturnValue( SfxBoolItem(0, false) ); rReq.Done(); @@ -1252,7 +1252,7 @@ void SfxObjectShell::ExecView_Impl(SfxRequest &rReq) { case SID_ACTIVATE: { - SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this, true ); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst( this ); if ( pFrame ) pFrame->GetFrame().Appear(); rReq.SetReturnValue( SfxObjectItem( 0, pFrame ) ); @@ -1403,7 +1403,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent ) } // check whether the document is signed - ImplGetSignatureState( false ); // document signature + ImplGetSignatureState(); // document signature ImplGetSignatureState( true ); // script signature bool bHasSign = ( pImp->nScriptingSignatureState != SignatureState::NOSIGNATURES || pImp->nDocumentSignatureState != SignatureState::NOSIGNATURES ); @@ -1440,7 +1440,7 @@ void SfxObjectShell::ImplSign( bool bScriptingContent ) nId = SID_SAVEASDOC; SfxRequest aSaveRequest( nId, SfxCallMode::SLOT, GetPool() ); //ToDo: Review. We needed to call SetModified, otherwise the document would not be saved. - SetModified(true); + SetModified(); ExecFile_Impl( aSaveRequest ); // Check if it is stored in OASIS format... @@ -1519,17 +1519,17 @@ void SfxObjectShell::ImplSign( bool bScriptingContent ) } if ( bAllowModifiedBack ) - EnableSetModified( true ); + EnableSetModified(); } SignatureState SfxObjectShell::GetDocumentSignatureState() { - return ImplGetSignatureState( false ); + return ImplGetSignatureState(); } void SfxObjectShell::SignDocumentContent() { - ImplSign( false ); + ImplSign(); } SignatureState SfxObjectShell::GetScriptingSignatureState() diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 8f7c300197db..2baa124f7b95 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -453,7 +453,7 @@ bool SfxObjectShell::GeneralInit_Impl( const uno::Reference< embed::XStorage >& return false; } - SetupStorage( xStorage, SOFFICE_FILEFORMAT_CURRENT, false, false ); + SetupStorage( xStorage, SOFFICE_FILEFORMAT_CURRENT, false ); } } catch ( uno::Exception& ) @@ -775,7 +775,7 @@ bool SfxObjectShell::DoLoad( SfxMedium *pMed ) {} } UpdateLinks(); - FinishedLoading( SfxLoadedFlags::ALL ); + FinishedLoading(); } else { @@ -1913,7 +1913,7 @@ bool SfxObjectShell::DoSaveObjectAs( SfxMedium& rMedium, bool bCommit ) if ( !(a>>=aMediaType) || aMediaType.isEmpty() ) { SAL_WARN( "sfx.doc", "The mediatype must be set already!" ); - SetupStorage( xNewStor, SOFFICE_FILEFORMAT_CURRENT, false, false ); + SetupStorage( xNewStor, SOFFICE_FILEFORMAT_CURRENT, false ); } pImp->bIsSaving = false; @@ -1982,7 +1982,7 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed ) EnableSetModified(false); getDocProperties()->setGenerator( ::utl::DocInfoHelper::GetGeneratorString() ); - EnableSetModified(true); + EnableSetModified(); } uno::Reference< embed::XStorage > xStorage; @@ -2886,7 +2886,7 @@ bool SfxObjectShell::PreDoSaveAs_Impl if ( bCopyTo ) DELETEZ( pNewFile ); else if( !bOk ) - SetModified( true ); + SetModified(); return bOk; } @@ -3114,7 +3114,7 @@ uno::Reference< embed::XStorage > SfxObjectShell::GetStorage() pImp->m_xDocStorage = ::comphelper::OStorageHelper::GetTemporaryStorage(); OSL_ENSURE( pImp->m_xDocStorage.is(), "The method must either return storage or throw an exception!" ); - SetupStorage( pImp->m_xDocStorage, SOFFICE_FILEFORMAT_CURRENT, false, false ); + SetupStorage( pImp->m_xDocStorage, SOFFICE_FILEFORMAT_CURRENT, false ); pImp->m_bCreateTempStor = false; SfxGetpApp()->NotifyEvent( SfxEventHint( SFX_EVENT_STORAGECHANGED, GlobalEventConfig::GetEventName(GlobalEventId::STORAGECHANGED), this ) ); } @@ -3387,7 +3387,7 @@ bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorage >& DoSaveCompleted( new SfxMedium( xStorage, GetMedium()->GetBaseURL() ) ); if ( IsEnableSetModified() ) - SetModified( true ); // ??? + SetModified(); // ??? } return bResult; @@ -3561,7 +3561,7 @@ bool SfxObjectShell::WriteThumbnail(bool bEncrypted, bool bIsTemplate, const uno } else { - std::shared_ptr<GDIMetaFile> xMetaFile = GetPreviewMetaFile(false); + std::shared_ptr<GDIMetaFile> xMetaFile = GetPreviewMetaFile(); if (xMetaFile) { bResult = GraphicHelper::getThumbnailFormatFromGDI_Impl(xMetaFile.get(), xStream); diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 4676c9e7f2be..45fd2e8271e7 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -510,7 +510,7 @@ SfxObjectShell* SfxObjectShell::GetFirst continue; if ( ( !pType || pSh->IsA(*pType) ) && - ( !bOnlyVisible || SfxViewFrame::GetFirst( pSh, true ))) + ( !bOnlyVisible || SfxViewFrame::GetFirst( pSh ))) return pSh; } @@ -543,7 +543,7 @@ SfxObjectShell* SfxObjectShell::GetNext continue; if ( ( !pType || pSh->IsA(*pType) ) && - ( !bOnlyVisible || SfxViewFrame::GetFirst( pSh, true ))) + ( !bOnlyVisible || SfxViewFrame::GetFirst( pSh ))) return pSh; } return 0; diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx index be3825a07f3c..ce0d467d0c93 100644 --- a/sfx2/source/doc/printhelper.cxx +++ b/sfx2/source/doc/printhelper.cxx @@ -462,7 +462,7 @@ void SAL_CALL SfxPrintHelper::setPrinter(const uno::Sequence< beans::PropertyVal impl_setPrinter(rPrinter,pPrinter,nChangeFlags,pViewSh); // set new printer if ( pViewSh && pPrinter ) - pViewSh->SetPrinter( pPrinter, nChangeFlags, false ); + pViewSh->SetPrinter( pPrinter, nChangeFlags ); } diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 0cd2ab3ac498..a1012553d815 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -250,7 +250,7 @@ struct IMPL_SfxBaseModel_DataContainer : public ::sfx2::IModifiableDocument virtual void storageIsModified() SAL_OVERRIDE { if ( m_pObjectShell.Is() && !m_pObjectShell->IsModified() ) - m_pObjectShell->SetModified( true ); + m_pObjectShell->SetModified(); } void impl_setDocumentProperties( @@ -1294,7 +1294,7 @@ sal_Bool SAL_CALL SfxBaseModel::enableSetModified() throw (RuntimeException, std throw RuntimeException(); bool bResult = m_pData->m_pObjectShell->IsEnableSetModified(); - m_pData->m_pObjectShell->EnableSetModified( true ); + m_pData->m_pObjectShell->EnableSetModified(); return bResult; } @@ -1910,7 +1910,7 @@ void SAL_CALL SfxBaseModel::load( const Sequence< beans::PropertyValue >& seqA SfxFilterMatcher& rMatcher = SfxGetpApp()->GetFilterMatcher(); const SfxFilter* pSetFilter = rMatcher.GetFilter4FilterName( pFilterItem->GetValue() ); pMedium->SetFilter( pSetFilter ); - m_pData->m_pObjectShell->SetModified(true); + m_pData->m_pObjectShell->SetModified(); } // TODO/LATER: may be the mode should be retrieved from outside and the preused filter should not be set @@ -1987,7 +1987,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla try { utl::TempFile aTmp; - aTmp.EnableKillingFile( true ); + aTmp.EnableKillingFile(); storeToURL( aTmp.GetURL(), Sequence < beans::PropertyValue >() ); SvStream* pStream = aTmp.GetStream( StreamMode::READ ); const sal_uInt32 nLen = pStream->Seek( STREAM_SEEK_TO_END ); @@ -2350,7 +2350,7 @@ sal_Bool SAL_CALL SfxBaseModel::getAllowMacroExecution() throw (RuntimeException SfxModelGuard aGuard( *this ); if ( m_pData->m_pObjectShell ) - return m_pData->m_pObjectShell->AdjustMacroMode( OUString(), false ); + return m_pData->m_pObjectShell->AdjustMacroMode( OUString() ); return sal_False; } @@ -3448,7 +3448,7 @@ bool SfxBaseModel::hasValidSignatures() const { SolarMutexGuard aGuard; if ( m_pData->m_pObjectShell.Is() ) - return ( m_pData->m_pObjectShell->ImplGetSignatureState( false ) == SignatureState::OK ); + return ( m_pData->m_pObjectShell->ImplGetSignatureState() == SignatureState::OK ); return false; } @@ -3792,7 +3792,7 @@ void SAL_CALL SfxBaseModel::storeToStorage( const Reference< embed::XStorage >& { // TODO/LATER: if the provided storage has some data inside the storing might fail, probably the storage must be truncated // TODO/LATER: is it possible to have a template here? - m_pData->m_pObjectShell->SetupStorage( xStorage, nVersion, false, false ); + m_pData->m_pObjectShell->SetupStorage( xStorage, nVersion, false ); // BaseURL is part of the ItemSet SfxMedium aMedium( xStorage, OUString(), &aSet ); @@ -4136,7 +4136,7 @@ Reference< frame::XController2 > SAL_CALL SfxBaseModel::createDefaultViewControl SfxModelGuard aGuard( *this ); const SfxObjectFactory& rDocumentFactory = GetObjectShell()->GetFactory(); - const OUString sDefaultViewName = rDocumentFactory.GetViewFactory( 0 ).GetAPIViewName(); + const OUString sDefaultViewName = rDocumentFactory.GetViewFactory().GetAPIViewName(); aGuard.clear(); @@ -4310,7 +4310,7 @@ Reference< frame::XController2 > SAL_CALL SfxBaseModel::createViewController( if ( nPluginMode == 1 ) { pViewFrame->ForceOuterResize_Impl( false ); - pViewFrame->GetBindings().HidePopups( true ); + pViewFrame->GetBindings().HidePopups(); SfxFrame& rFrame = pViewFrame->GetFrame(); // MBA: layoutmanager of inplace frame starts locked and invisible diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 7e8b840b0644..cfe783214192 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -1395,7 +1395,7 @@ void SfxTemplateManagerDlg::createDefaultTemplateMenu () { INetURLObject aObj(*i); OUString aTitle = SvFileInformationManager::GetDescription(aObj); - mpTemplateDefaultMenu->InsertItem(nItemId, aTitle, SvFileInformationManager::GetImage(aObj, false)); + mpTemplateDefaultMenu->InsertItem(nItemId, aTitle, SvFileInformationManager::GetImage(aObj)); mpTemplateDefaultMenu->SetItemCommand(nItemId++, *i); } diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx index 9c0e21909633..3e391537ff43 100644 --- a/sfx2/source/explorer/nochaos.cxx +++ b/sfx2/source/explorer/nochaos.cxx @@ -120,7 +120,7 @@ CntItemPool::CntItemPool() CntItemPool::~CntItemPool() { // Release static pool default items. - ReleaseDefaults( false ); + ReleaseDefaults(); } diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index 4adda62c45ec..6588f4961122 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -1064,7 +1064,7 @@ void SfxVirtualMenu::InitializeHelp() SfxMenuControl &rCtrl = pItems[nPos]; if ( nSlotId && !rCtrl.GetId() ) { - InitPopup( nPos, true ); + InitPopup( nPos ); } SfxVirtualMenu *pSubMenu = rCtrl.GetPopupMenu(); diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx index 51ad4dc932a3..f788ae16d642 100644 --- a/sfx2/source/notify/eventsupplier.cxx +++ b/sfx2/source/notify/eventsupplier.cxx @@ -77,7 +77,7 @@ void SAL_CALL SfxEvents_Impl::replaceByName( const OUString & aName, const uno:: // create Configuration at first, creation might call this method also and that would overwrite everything // we might have stored before! if ( mpObjShell && !mpObjShell->IsLoading() ) - mpObjShell->SetModified( true ); + mpObjShell->SetModified(); ::comphelper::NamedValueCollection aNormalizedDescriptor; NormalizeMacro( aEventDescriptor, aNormalizedDescriptor, mpObjShell ); diff --git a/sfx2/source/sidebar/AccessibleTitleBar.cxx b/sfx2/source/sidebar/AccessibleTitleBar.cxx index 0d2597ba9659..e0f68a4a5354 100644 --- a/sfx2/source/sidebar/AccessibleTitleBar.cxx +++ b/sfx2/source/sidebar/AccessibleTitleBar.cxx @@ -32,7 +32,7 @@ namespace sfx2 { namespace sidebar { Reference<accessibility::XAccessible> AccessibleTitleBar::Create (TitleBar& rTitleBar) { - rTitleBar.GetComponentInterface(true); + rTitleBar.GetComponentInterface(); VCLXWindow* pWindow = rTitleBar.GetWindowPeer(); if (pWindow != NULL) return new Accessible(new AccessibleTitleBar(pWindow)); diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index aac2906bead4..f99be6c82f63 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -930,7 +930,7 @@ void SidebarController::ShowPopupMenu ( { // Don't allow the currently visible deck to be disabled. pCustomizationMenu->InsertItem(nSubMenuIndex, iItem->msDisplayName, MenuItemBits::RADIOCHECK); - pCustomizationMenu->CheckItem(nSubMenuIndex, true); + pCustomizationMenu->CheckItem(nSubMenuIndex); } else { @@ -954,7 +954,7 @@ void SidebarController::ShowPopupMenu ( pMenu->InsertItem(MID_CUSTOMIZATION, SFX2_RESSTR(STRING_CUSTOMIZATION)); pMenu->SetPopupMenu(MID_CUSTOMIZATION, pCustomizationMenu); - pMenu->RemoveDisabledEntries(false, false); + pMenu->RemoveDisabledEntries(false); return pMenu; } @@ -976,7 +976,7 @@ IMPL_LINK(SidebarController, OnMenuItemSelected, Menu*, pMenu) break; case MID_LOCK_TASK_PANEL: - mpParentWindow->SetFloatingMode(false); + mpParentWindow->SetFloatingMode(); break; case MID_RESTORE_DEFAULT: diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 29a4896368ef..d04f5b42d92e 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -226,7 +226,7 @@ void TabBar::HighlightDeck (const OUString& rsDeckId) for (ItemContainer::iterator iItem(maItems.begin()); iItem != maItems.end(); ++iItem) { if (iItem->msDeckId.equals(rsDeckId)) - iItem->mpButton->Check(true); + iItem->mpButton->Check(); else iItem->mpButton->Check(false); } diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx index eb362af32e8f..caf606b2a66a 100644 --- a/sfx2/source/sidebar/TitleBar.cxx +++ b/sfx2/source/sidebar/TitleBar.cxx @@ -100,7 +100,7 @@ void TitleBar::setPosSizePixel (long nX, long nY, long nWidth, long nHeight, Pos // Place the toolbox. const sal_Int32 nToolBoxWidth (maToolBox->GetItemPosRect(0).GetWidth()); - maToolBox->setPosSizePixel(nWidth - nToolBoxWidth,0, nToolBoxWidth, nHeight, PosSizeFlags::PosSize); + maToolBox->setPosSizePixel(nWidth - nToolBoxWidth,0, nToolBoxWidth, nHeight); maToolBox->Show(); } diff --git a/sfx2/source/styles/StyleManager.cxx b/sfx2/source/styles/StyleManager.cxx index aea80be43cfb..346c0e5235ee 100644 --- a/sfx2/source/styles/StyleManager.cxx +++ b/sfx2/source/styles/StyleManager.cxx @@ -18,7 +18,7 @@ SfxStyleSheetBase* StyleManager::Search(const OUString& rStyleName, SfxStyleFami if (!pPool) return nullptr; - pPool->SetSearchMask(eFamily, SFXSTYLEBIT_ALL); + pPool->SetSearchMask(eFamily); SfxStyleSheetBase* pStyle = nullptr; pStyle = pPool->First(); diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx index 2cc886a823c5..a1be6824ed7f 100644 --- a/sfx2/source/view/frmload.cxx +++ b/sfx2/source/view/frmload.cxx @@ -585,7 +585,7 @@ sal_Int16 SfxFrameLoader_Impl::impl_determineEffectiveViewId_nothrow( const SfxO } if ( nViewId == 0 ) - nViewId = i_rDocument.GetFactory().GetViewFactory( 0 ).GetOrdinal(); + nViewId = i_rDocument.GetFactory().GetViewFactory().GetOrdinal(); return nViewId; } diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index d5513fcaec2f..e246983ccfc0 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -302,7 +302,7 @@ void SAL_CALL SfxInPlaceClient_Impl::saveObject() if ( !pDocShell ) throw uno::RuntimeException(); - pDocShell->SetModified( true ); + pDocShell->SetModified(); //TODO/LATER: invalidation might be necessary when object was modified, but is not //saved through this method diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index c5101b3297c4..926839a7e65e 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -1313,7 +1313,7 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect ) if ( !rFrame.IsMarkedHidden_Impl() ) { if ( rDoc.IsHelpDocument() || ( nPluginMode == 2 ) ) - pViewFrame->GetDispatcher()->HideUI( true ); + pViewFrame->GetDispatcher()->HideUI(); else pViewFrame->GetDispatcher()->HideUI( false ); diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 29736a9a4edf..d15134eb7bd0 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -375,7 +375,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) } } nOpenMode = SFX_STREAM_READONLY; - pSh->SetReadOnlyUI(true); + pSh->SetReadOnlyUI(); } else { @@ -482,7 +482,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) } // Readonly document can not be switched to edit mode? - rReq.Done( false ); + rReq.Done(); if ( nOpenMode == SFX_STREAM_READWRITE && !rReq.IsAPI() ) { @@ -713,7 +713,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) pMedium->CloseAndRelease(); } - xNewObj = SfxObjectShell::CreateObject( pFilter->GetServiceName(), SfxObjectCreateMode::STANDARD ); + xNewObj = SfxObjectShell::CreateObject( pFilter->GetServiceName() ); if ( xOldObj->IsModifyPasswordEntered() ) xNewObj->SetModifyPasswordEntered(); @@ -1653,7 +1653,7 @@ void SfxViewFrame::Enable( bool bEnable ) if ( !bEnable ) pImp->bWindowWasEnabled = pWindow->IsInputEnabled(); if ( !bEnable || pImp->bWindowWasEnabled ) - pWindow->EnableInput( bEnable, true ); + pWindow->EnableInput( bEnable ); } // cursor and focus @@ -1687,7 +1687,7 @@ void SfxViewFrame::Show() { xObjSh->GetMedium()->GetItemSet()->ClearItem( SID_HIDDEN ); if ( !pImp->bObjLocked ) - LockObjectShell_Impl( true ); + LockObjectShell_Impl(); // Adjust Doc-Shell title number, get unique view-no if ( 0 == pImp->nDocViewNo ) @@ -1766,7 +1766,7 @@ void SfxViewFrame::MakeActive_Impl( bool bGrabFocus ) { GetBindings().SetDispatcher( GetDispatcher() ); GetBindings().SetActiveFrame( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > () ); - GetDispatcher()->Update_Impl( false ); + GetDispatcher()->Update_Impl(); } } } @@ -2081,7 +2081,7 @@ bool SfxViewFrame::SwitchToViewShell_Impl if ( pOldSh ) { // ask whether it can be closed - if ( !pOldSh->PrepareClose( true ) ) + if ( !pOldSh->PrepareClose() ) return false; // remove sub shells from Dispatcher before switching to new ViewShell diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index 13a0aede92e6..e30cee24eca7 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -611,7 +611,7 @@ void SfxViewShell::StartPrint( const uno::Sequence < beans::PropertyValue >& rPr SfxObjectShell *pObjShell = GetObjectShell(); xNewController->setValue( OUString( "JobName" ), - makeAny( OUString( pObjShell->GetTitle(0) ) ) ); + makeAny( OUString( pObjShell->GetTitle() ) ) ); xNewController->setPrinterModified( mbPrinterSettingsModified ); } @@ -619,7 +619,7 @@ void SfxViewShell::ExecPrint( const uno::Sequence < beans::PropertyValue >& rPro { StartPrint( rProps, bIsAPI, bIsDirect ); // FIXME: job setup - SfxPrinter* pDocPrt = GetPrinter(false); + SfxPrinter* pDocPrt = GetPrinter(); JobSetup aJobSetup = pDocPrt ? pDocPrt->GetJobSetup() : GetJobSetup(); Printer::PrintJob( GetPrinterController(), aJobSetup ); } diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index f8e0d21a530c..dc6f439905e5 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -443,12 +443,12 @@ OUString impl_searchFormatTypeForApp(const css::uno::Reference< css::frame::XFra void SfxViewShell::NewIPClient_Impl( SfxInPlaceClient *pIPClient ) { - pImp->GetIPClientList_Impl(true)->push_back(pIPClient); + pImp->GetIPClientList_Impl()->push_back(pIPClient); } void SfxViewShell::IPClientGone_Impl( SfxInPlaceClient *pIPClient ) { - SfxInPlaceClientList* pClientList = pImp->GetIPClientList_Impl(true); + SfxInPlaceClientList* pClientList = pImp->GetIPClientList_Impl(); for( SfxInPlaceClientList::iterator it = pClientList->begin(); it != pClientList->end(); ++it ) { @@ -691,7 +691,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) // No type and no location => error if ( aFilterName.isEmpty() || aTypeName.isEmpty()) { - rReq.Done(false); + rReq.Done(); return; } @@ -732,7 +732,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) } catch (const io::IOException&) { - rReq.Done(false); + rReq.Done(); return; } @@ -741,7 +741,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq ) } else { - rReq.Done(false); + rReq.Done(); return; } } @@ -842,7 +842,7 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) && !Application::GetSettings().GetMiscSettings().GetDisablePrinting(); if ( bEnabled ) { - SfxPrinter *pPrinter = GetPrinter(false); + SfxPrinter *pPrinter = GetPrinter(); if ( SID_PRINTDOCDIRECT == nSID ) { @@ -928,7 +928,7 @@ void SfxViewShell::UIActivating( SfxInPlaceClient* /*pClient*/ ) if ( xParentFrame.is() ) xParentFrame->setActiveFrame( xOwnFrame ); - pFrame->GetBindings().HidePopups(true); + pFrame->GetBindings().HidePopups(); pFrame->GetDispatcher()->Update_Impl( true ); } |