diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-08 15:38:59 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-08-11 06:05:32 +0000 |
commit | 3716b144265dda695d7dd447dbe692a3f84c588e (patch) | |
tree | 6b8d8751e306841102f6808fbb5403dac193c35c | |
parent | b796b24793827583550279d40bfe565c66ad284d (diff) |
loplugin:constantparam
Change-Id: Ia06b9b189033b9409d7a59a211866f66a0614886
Reviewed-on: https://gerrit.libreoffice.org/28016
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
29 files changed, 127 insertions, 202 deletions
diff --git a/accessibility/inc/extended/AccessibleGridControlTable.hxx b/accessibility/inc/extended/AccessibleGridControlTable.hxx index e784544764ad..df255599c8f6 100644 --- a/accessibility/inc/extended/AccessibleGridControlTable.hxx +++ b/accessibility/inc/extended/AccessibleGridControlTable.hxx @@ -40,8 +40,7 @@ class AccessibleGridControlTable : public AccessibleGridControlTableBase, public: AccessibleGridControlTable( const css::uno::Reference< css::accessibility::XAccessible >& rxParent, - ::svt::table::IAccessibleTable& rTable, - ::svt::table::AccessibleTableControlObjType _eType); + ::svt::table::IAccessibleTable& rTable); protected: virtual ~AccessibleGridControlTable(); diff --git a/accessibility/source/extended/AccessibleGridControl.cxx b/accessibility/source/extended/AccessibleGridControl.cxx index f11a35eac415..9f7acaa7f86b 100644 --- a/accessibility/source/extended/AccessibleGridControl.cxx +++ b/accessibility/source/extended/AccessibleGridControl.cxx @@ -155,7 +155,7 @@ AccessibleGridControl::getAccessibleChild( sal_Int32 nChildIndex ) { if(!m_xImpl->m_xTable.is()) { - AccessibleGridControlTable* pTable = new AccessibleGridControlTable(m_xImpl->m_aCreator, m_aTable, svt::table::TCTYPE_TABLE); + AccessibleGridControlTable* pTable = new AccessibleGridControlTable(m_xImpl->m_aCreator, m_aTable); m_xImpl->m_xTable = pTable; m_xImpl->m_pTable = pTable; } @@ -306,7 +306,7 @@ AccessibleGridControlTable* AccessibleGridControl::createAccessibleTable() { css::uno::Reference< css::accessibility::XAccessible > xCreator(m_xImpl->m_aCreator); OSL_ENSURE( xCreator.is(), "extended/AccessibleGridControl::createAccessibleTable: my creator died - how this?" ); - return new AccessibleGridControlTable( xCreator, m_aTable, TCTYPE_TABLE ); + return new AccessibleGridControlTable( xCreator, m_aTable ); } void AccessibleGridControl::commitCellEvent(sal_Int16 _nEventId,const Any& _rNewValue,const Any& _rOldValue) diff --git a/accessibility/source/extended/AccessibleGridControlTable.cxx b/accessibility/source/extended/AccessibleGridControlTable.cxx index bdf7ea23cfc0..5ac584f2e4b1 100644 --- a/accessibility/source/extended/AccessibleGridControlTable.cxx +++ b/accessibility/source/extended/AccessibleGridControlTable.cxx @@ -37,9 +37,8 @@ namespace accessibility { AccessibleGridControlTable::AccessibleGridControlTable( const Reference< XAccessible >& rxParent, - IAccessibleTable& rTable, - AccessibleTableControlObjType _eType) : - AccessibleGridControlTableBase( rxParent, rTable, _eType ) + IAccessibleTable& rTable) : + AccessibleGridControlTableBase( rxParent, rTable, TCTYPE_TABLE ) ,m_pCellVector( ) ,m_pAccessCellVector( ) { diff --git a/compilerplugins/clang/constantparam.py b/compilerplugins/clang/constantparam.py index 300f3b8d80bc..21aca1ee1c16 100755 --- a/compilerplugins/clang/constantparam.py +++ b/compilerplugins/clang/constantparam.py @@ -57,7 +57,7 @@ def natural_sort_key(s, _nsre=re.compile('([0-9]+)')): tmp1list.sort(key=lambda v: natural_sort_key(v[2])) # print out the results -with open("loplugin.constantparams.report", "wt") as f: +with open("loplugin.constantparam.report", "wt") as f: for v in tmp1list: f.write(v[2] + "\n") f.write(" " + v[0] + "\n") diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index 7fcc94334679..9c8e72b3f477 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -146,7 +146,7 @@ FmSearchDialog::FmSearchDialog(vcl::Window* pParent, const OUString& sInitialTex } m_pSearchEngine = new FmSearchEngine( - ::comphelper::getProcessComponentContext(), fmscInitial.xCursor, fmscInitial.strUsedFields, fmscInitial.arrFields, SM_ALLOWSCHEDULE ); + ::comphelper::getProcessComponentContext(), fmscInitial.xCursor, fmscInitial.strUsedFields, fmscInitial.arrFields ); initCommon( fmscInitial.xCursor ); if ( !fmscInitial.sFieldDisplayNames.isEmpty() ) @@ -346,7 +346,6 @@ IMPL_LINK_NOARG_TYPED(FmSearchDialog, OnClickedSearchAgain, Button*, void) } else { // the button has the function 'cancel' - DBG_ASSERT(m_pSearchEngine->GetSearchMode() != SM_BRUTE, "FmSearchDialog, OnClickedSearchAgain : falscher Modus !"); // the CancelButton is usually only disabled, when working in a thread or with reschedule m_pSearchEngine->CancelSearch(); // the ProgressHandler is called when it's really finished, here it's only a demand @@ -587,26 +586,23 @@ void FmSearchDialog::EnableSearchUI(bool bEnable) OUString sButtonText( bEnable ? m_sSearch : m_sCancel ); m_pbSearchAgain->SetText( sButtonText ); - if (m_pSearchEngine->GetSearchMode() != SM_BRUTE) - { - m_prbSearchForText->Enable (bEnable); - m_prbSearchForNull->Enable (bEnable); - m_prbSearchForNotNull->Enable (bEnable); - m_plbForm->Enable (bEnable); - m_prbAllFields->Enable (bEnable); - m_prbSingleField->Enable (bEnable); - m_plbField->Enable (bEnable && m_prbSingleField->IsChecked()); - m_pcbBackwards->Enable (bEnable); - m_pcbStartOver->Enable (bEnable); - m_pbClose->Enable (bEnable); - EnableSearchForDependees (bEnable); - - if ( !bEnable ) - { // this means we're preparing for starting a search - // In this case, EnableSearchForDependees disabled the search button - // But as we're about to use it for cancelling the search, we really need to enable it, again - m_pbSearchAgain->Enable(); - } + m_prbSearchForText->Enable (bEnable); + m_prbSearchForNull->Enable (bEnable); + m_prbSearchForNotNull->Enable (bEnable); + m_plbForm->Enable (bEnable); + m_prbAllFields->Enable (bEnable); + m_prbSingleField->Enable (bEnable); + m_plbField->Enable (bEnable && m_prbSingleField->IsChecked()); + m_pcbBackwards->Enable (bEnable); + m_pcbStartOver->Enable (bEnable); + m_pbClose->Enable (bEnable); + EnableSearchForDependees (bEnable); + + if ( !bEnable ) + { // this means we're preparing for starting a search + // In this case, EnableSearchForDependees disabled the search button + // But as we're about to use it for cancelling the search, we really need to enable it, again + m_pbSearchAgain->Enable(); } if (!bEnable) diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 88900c50f759..d613c6c25e0c 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -2927,10 +2927,9 @@ DffRecordManager::DffRecordManager( SvStream& rIn ) : Consume( rIn ); } -void DffRecordManager::Consume( SvStream& rIn, bool bAppend, sal_uInt32 nStOfs ) +void DffRecordManager::Consume( SvStream& rIn, sal_uInt32 nStOfs ) { - if ( !bAppend ) - Clear(); + Clear(); sal_uInt32 nOldPos = rIn.Tell(); if ( !nStOfs ) { diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 3b1d15b3407c..f5493623bdfc 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -1334,7 +1334,7 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const O rStCtrl.Seek( 0 ); DffRecordManager aPptRecManager; // contains all first level container and atoms - aPptRecManager.Consume( rStCtrl, false, nStreamLen ); + aPptRecManager.Consume( rStCtrl, nStreamLen ); DffRecordHeader* pHd; for ( pHd = aPptRecManager.Last(); pHd; pHd = aPptRecManager.Prev() ) { @@ -3257,7 +3257,7 @@ PPTExtParaProv::PPTExtParaProv( SdrPowerPointImport& rMan, SvStream& rSt, const break; case PPT_PST_ExtendedPresRuleContainer : - aExtendedPresRules.Consume( rSt, false, aHd.GetRecEndFilePos() ); + aExtendedPresRules.Consume( rSt, aHd.GetRecEndFilePos() ); break; #ifdef DBG_UTIL default : diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx index 206bdcbc1103..9cbf2e18ac33 100644 --- a/include/filter/msfilter/msdffimp.hxx +++ b/include/filter/msfilter/msdffimp.hxx @@ -368,7 +368,6 @@ public: void Clear(); void Consume( SvStream& rIn, - bool bAppend = false, sal_uInt32 nStOfs = 0 ); bool SeekToContent( SvStream& rIn, diff --git a/include/svx/fmsrcimp.hxx b/include/svx/fmsrcimp.hxx index b71e7336b973..682138cf0f27 100644 --- a/include/svx/fmsrcimp.hxx +++ b/include/svx/fmsrcimp.hxx @@ -159,8 +159,6 @@ namespace svxform { }; } -enum FMSEARCH_MODE { SM_BRUTE, SM_ALLOWSCHEDULE, SM_USETHREAD }; - typedef std::vector< css::uno::Reference< css::uno::XInterface> > InterfaceArray; class SAL_WARN_UNUSED SVX_DLLPUBLIC FmSearchEngine @@ -215,7 +213,6 @@ class SAL_WARN_UNUSED SVX_DLLPUBLIC FmSearchEngine bool m_bCancelAsynchRequest : 1; // should be cancelled? ::osl::Mutex m_aCancelAsynchAccess; // access to_bCancelAsynchRequest (technically only // relevant for m_eMode == SM_USETHREAD) - FMSEARCH_MODE m_eMode; // current mode // parameters for the search bool m_bFormatter : 1; // use field formatting @@ -281,8 +278,6 @@ public: sal_uInt16 GetPosition() const { return m_nPosition; } // position will be ignored in case of m_bWildCard==sal_True - FMSEARCH_MODE GetSearchMode() const { return m_eMode; } - public: /** two constructs, both analogical to FmSearchDialog, therefore look this up for explanations .... xCursor has to implement css::data::DatabaseCursor service each time. @@ -296,8 +291,7 @@ public: const css::uno::Reference< css::uno::XComponentContext >& _rxContext, const css::uno::Reference< css::sdbc::XResultSet >& xCursor, const OUString& strVisibleFields, - const InterfaceArray& arrFields, - FMSEARCH_MODE eMode); + const InterfaceArray& arrFields); virtual ~FmSearchEngine(); diff --git a/include/svx/sdr/attribute/sdrtextattribute.hxx b/include/svx/sdr/attribute/sdrtextattribute.hxx index 01aa02aef141..efcb9524bf98 100644 --- a/include/svx/sdr/attribute/sdrtextattribute.hxx +++ b/include/svx/sdr/attribute/sdrtextattribute.hxx @@ -76,7 +76,6 @@ namespace drawinglayer bool bInEditMode, bool bFixedCellHeight, bool bWrongSpell, - bool bToBeChained, bool bChainable); SdrTextAttribute(); diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index ade835e6bef7..3d1c7533ee99 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -259,7 +259,7 @@ public: // If, however, you use objects inheriting from SdrObject you are free // to chose a pool of your liking. explicit SdrModel(); - explicit SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable); + explicit SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers); explicit SdrModel(const OUString& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable); virtual ~SdrModel(); void ClearModel(bool bCalledFromDestructor); diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx index 4c57793bdd90..a79522a03586 100644 --- a/include/vcl/tabctrl.hxx +++ b/include/vcl/tabctrl.hxx @@ -199,7 +199,7 @@ class NotebookBar; class VCL_DLLPUBLIC NotebookbarTabControl : public TabControl { public: - NotebookbarTabControl( vcl::Window* pParent, WinBits nStyle = WB_STDTABCONTROL ); + NotebookbarTabControl( vcl::Window* pParent ); void SetContext( vcl::EnumContext::Context eContext ); void SetIconClickHdl( Link<NotebookBar*, void> aHdl ); diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 326441a3637d..79a2971891f2 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -223,7 +223,7 @@ class ScGridWindow : public vcl::Window, public DropTargetHelper, public DragSou bool IsAutoFilterActive( SCCOL nCol, SCROW nRow, SCTAB nTab ); void ExecFilter( sal_uLong nSel, SCCOL nCol, SCROW nRow, - const OUString& aValue, bool bCheckForDates ); + const OUString& aValue ); void FilterSelect( sal_uLong nSel ); void ExecDataSelect( SCCOL nCol, SCROW nRow, const OUString& rStr ); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index b56aeb07312a..d84877585b45 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1235,7 +1235,7 @@ void ScGridWindow::FilterSelect( sal_uLong nSel ) ExecDataSelect(nCol, nRow, aString); break; case SC_FILTERBOX_FILTER: - ExecFilter(nSel, nCol, nRow, aString, false/*bHasDates*/); + ExecFilter(nSel, nCol, nRow, aString); break; case SC_FILTERBOX_SCENARIO: pViewData->GetView()->UseScenario(aString); @@ -1268,7 +1268,7 @@ void ScGridWindow::ExecDataSelect( SCCOL nCol, SCROW nRow, const OUString& rStr void ScGridWindow::ExecFilter( sal_uLong nSel, SCCOL nCol, SCROW nRow, - const OUString& aValue, bool bCheckForDates ) + const OUString& aValue ) { SCTAB nTab = pViewData->GetTabNo(); ScDocument* pDoc = pViewData->GetDocument(); @@ -1341,7 +1341,7 @@ void ScGridWindow::ExecFilter( sal_uLong nSel, ScQueryEntry::Item& rItem = rNewEntry.GetQueryItem(); rNewEntry.bDoQuery = true; rNewEntry.nField = nCol; - rItem.meType = bCheckForDates ? ScQueryEntry::ByDate : ScQueryEntry::ByString; + rItem.meType = ScQueryEntry::ByString; if ( nSel == SC_AUTOFILTER_TOP10 ) { diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index d6b3ce6b3bcb..7f46fa296119 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -425,14 +425,12 @@ bool SlideSorterController::Command ( { GetScrollBarManager().Scroll( ScrollBarManager::Orientation_Vertical, - ScrollBarManager::Unit_Slide, -pData->GetNotchDelta()); } else { GetScrollBarManager().Scroll( ScrollBarManager::Orientation_Horizontal, - ScrollBarManager::Unit_Slide, -pData->GetNotchDelta()); } mrSlideSorter.GetView().UpdatePageUnderMouse(rEvent.GetMousePosPixel()); diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx index b56a319dadec..b3cf776755f1 100644 --- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx @@ -540,7 +540,6 @@ IMPL_LINK_NOARG_TYPED(ScrollBarManager, AutoScrollTimeoutHandler, Timer *, void) void ScrollBarManager::Scroll( const Orientation eOrientation, - const Unit eUnit, const sal_Int32 nDistance) { bool bIsVertical (false); @@ -556,60 +555,49 @@ void ScrollBarManager::Scroll( Point aNewTopLeft ( mpHorizontalScrollBar ? mpHorizontalScrollBar->GetThumbPos() : 0, mpVerticalScrollBar ? mpVerticalScrollBar->GetThumbPos() : 0); - switch (eUnit) - { - case Unit_Pixel: - if (bIsVertical) - aNewTopLeft.Y() += nDistance; - else - aNewTopLeft.X() += nDistance; - break; - - case Unit_Slide: + + view::Layouter& rLayouter (mrSlideSorter.GetView().GetLayouter()); + + // Calculate estimate of new location. + if (bIsVertical) + aNewTopLeft.Y() += nDistance * rLayouter.GetPageObjectSize().Height(); + else + aNewTopLeft.X() += nDistance * rLayouter.GetPageObjectSize().Width(); + + // Adapt location to show whole slides. + if (bIsVertical) + if (nDistance > 0) { - view::Layouter& rLayouter (mrSlideSorter.GetView().GetLayouter()); - - // Calculate estimate of new location. - if (bIsVertical) - aNewTopLeft.Y() += nDistance * rLayouter.GetPageObjectSize().Height(); - else - aNewTopLeft.X() += nDistance * rLayouter.GetPageObjectSize().Width(); - - // Adapt location to show whole slides. - if (bIsVertical) - if (nDistance > 0) - { - const sal_Int32 nIndex (rLayouter.GetIndexAtPoint( - Point(aNewTopLeft.X(), aNewTopLeft.Y()+mpVerticalScrollBar->GetVisibleSize()), - true)); - aNewTopLeft.Y() = rLayouter.GetPageObjectBox(nIndex,true).Bottom() - - mpVerticalScrollBar->GetVisibleSize(); - } - else - { - const sal_Int32 nIndex (rLayouter.GetIndexAtPoint( - Point(aNewTopLeft.X(), aNewTopLeft.Y()), - true)); - aNewTopLeft.Y() = rLayouter.GetPageObjectBox(nIndex,true).Top(); - } - else - if (nDistance > 0) - { - const sal_Int32 nIndex (rLayouter.GetIndexAtPoint( - Point(aNewTopLeft.X()+mpVerticalScrollBar->GetVisibleSize(), aNewTopLeft.Y()), - true)); - aNewTopLeft.X() = rLayouter.GetPageObjectBox(nIndex,true).Right() - - mpVerticalScrollBar->GetVisibleSize(); - } - else - { - const sal_Int32 nIndex (rLayouter.GetIndexAtPoint( - Point(aNewTopLeft.X(), aNewTopLeft.Y()), - true)); - aNewTopLeft.X() = rLayouter.GetPageObjectBox(nIndex,true).Left(); - } + const sal_Int32 nIndex (rLayouter.GetIndexAtPoint( + Point(aNewTopLeft.X(), aNewTopLeft.Y()+mpVerticalScrollBar->GetVisibleSize()), + true)); + aNewTopLeft.Y() = rLayouter.GetPageObjectBox(nIndex,true).Bottom() + - mpVerticalScrollBar->GetVisibleSize(); } - } + else + { + const sal_Int32 nIndex (rLayouter.GetIndexAtPoint( + Point(aNewTopLeft.X(), aNewTopLeft.Y()), + true)); + aNewTopLeft.Y() = rLayouter.GetPageObjectBox(nIndex,true).Top(); + } + else + if (nDistance > 0) + { + const sal_Int32 nIndex (rLayouter.GetIndexAtPoint( + Point(aNewTopLeft.X()+mpVerticalScrollBar->GetVisibleSize(), aNewTopLeft.Y()), + true)); + aNewTopLeft.X() = rLayouter.GetPageObjectBox(nIndex,true).Right() + - mpVerticalScrollBar->GetVisibleSize(); + } + else + { + const sal_Int32 nIndex (rLayouter.GetIndexAtPoint( + Point(aNewTopLeft.X(), aNewTopLeft.Y()), + true)); + aNewTopLeft.X() = rLayouter.GetPageObjectBox(nIndex,true).Left(); + } + mrSlideSorter.GetController().GetVisibleAreaManager().DeactivateCurrentSlideTracking(); SetTopLeft(aNewTopLeft); } diff --git a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx index 8b40acd9bf4f..44aab4d5af37 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsScrollBarManager.hxx @@ -148,18 +148,15 @@ public: void clearAutoScrollFunctor(); enum Orientation { Orientation_Horizontal, Orientation_Vertical }; - enum Unit { Unit_Pixel, Unit_Slide }; /** Scroll the slide sorter by setting the thumbs of the scroll bars and by moving the content of the content window. @param eOrientation Defines whether to scroll horizontally or vertically. - @param eUnit - Defines whether the distance is a pixel value or the number of - slides to scroll. + @param nDistance + distance in slides. */ void Scroll( const Orientation eOrientation, - const Unit eUnit, const sal_Int32 nDistance); private: diff --git a/shell/source/unix/sysshell/recently_used_file_handler.cxx b/shell/source/unix/sysshell/recently_used_file_handler.cxx index eda1f1a5c2de..d6be7b63f33b 100644 --- a/shell/source/unix/sysshell/recently_used_file_handler.cxx +++ b/shell/source/unix/sysshell/recently_used_file_handler.cxx @@ -72,11 +72,10 @@ namespace /* private */ { recently_used_item( const string_t& uri, const string_t& mime_type, - const string_container_t& groups, - bool is_private = false) : + const string_container_t& groups) : uri_(uri), mime_type_(mime_type), - is_private_(is_private), + is_private_(false), groups_(groups) { timestamp_ = time(nullptr); diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 28e849c0f490..a23474cb7447 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -61,10 +61,9 @@ uno::Reference< accessibility::XAccessible > const & ValueSetItem::GetAccessible } -ValueSetAcc::ValueSetAcc( ValueSet* pParent, bool bIsTransientChildrenDisabled ) : +ValueSetAcc::ValueSetAcc( ValueSet* pParent ) : ValueSetAccComponentBase (m_aMutex), mpParent( pParent ), - mbIsTransientChildrenDisabled( bIsTransientChildrenDisabled ), mbIsFocused(false) { } @@ -183,7 +182,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getAccessible ValueSetItem* pItem = getItem (sal::static_int_cast< sal_uInt16 >(i)); if( pItem ) - xRet = pItem->GetAccessible( mbIsTransientChildrenDisabled ); + xRet = pItem->GetAccessible( false/*bIsTransientChildrenDisabled*/ ); else throw lang::IndexOutOfBoundsException(); @@ -236,11 +235,7 @@ sal_Int16 SAL_CALL ValueSetAcc::getAccessibleRole() throw (uno::RuntimeException, std::exception) { ThrowIfDisposed(); - // #i73746# As the Java Access Bridge (v 2.0.1) uses "managesDescendants" - // always if the role is LIST, we need a different role in this case - return (mbIsTransientChildrenDisabled - ? accessibility::AccessibleRole::PANEL - : accessibility::AccessibleRole::LIST ); + return accessibility::AccessibleRole::LIST; } @@ -322,8 +317,7 @@ uno::Reference< accessibility::XAccessibleStateSet > SAL_CALL ValueSetAcc::getAc pStateSet->AddState (accessibility::AccessibleStateType::SENSITIVE); pStateSet->AddState (accessibility::AccessibleStateType::SHOWING); pStateSet->AddState (accessibility::AccessibleStateType::VISIBLE); - if ( !mbIsTransientChildrenDisabled ) - pStateSet->AddState (accessibility::AccessibleStateType::MANAGES_DESCENDANTS); + pStateSet->AddState (accessibility::AccessibleStateType::MANAGES_DESCENDANTS); pStateSet->AddState (accessibility::AccessibleStateType::FOCUSABLE); if (mbIsFocused) pStateSet->AddState (accessibility::AccessibleStateType::FOCUSED); @@ -421,7 +415,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getAccessible if( VALUESET_ITEM_NONEITEM != nItemPos ) { ValueSetItem *const pItem = mpParent->mItemList[nItemPos]; - xRet = pItem->GetAccessible( mbIsTransientChildrenDisabled ); + xRet = pItem->GetAccessible( false/*bIsTransientChildrenDisabled*/ ); } } @@ -595,7 +589,7 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getSelectedAc ValueSetItem* pItem = getItem(i); if( pItem && mpParent->IsItemSelected( pItem->mnId ) && ( nSelectedChildIndex == static_cast< sal_Int32 >( nSel++ ) ) ) - xRet = pItem->GetAccessible( mbIsTransientChildrenDisabled ); + xRet = pItem->GetAccessible( false/*bIsTransientChildrenDisabled*/ ); } return xRet; diff --git a/svtools/source/control/valueimp.hxx b/svtools/source/control/valueimp.hxx index 53b13a05b38e..6622daacd6e1 100644 --- a/svtools/source/control/valueimp.hxx +++ b/svtools/source/control/valueimp.hxx @@ -83,7 +83,7 @@ class ValueSetAcc : { public: - ValueSetAcc( ValueSet* pParent, bool bIsTransientChildrenDisabled ); + ValueSetAcc( ValueSet* pParent ); virtual ~ValueSetAcc(); void FireAccessibleEvent( short nEventId, const css::uno::Any& rOldValue, const css::uno::Any& rNewValue ); @@ -149,7 +149,6 @@ private: ::std::vector< css::uno::Reference< css::accessibility::XAccessibleEventListener > > mxEventListeners; VclPtr<ValueSet> mpParent; - bool mbIsTransientChildrenDisabled; /// The current FOCUSED state. bool mbIsFocused; diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index aff6c90d73cd..37896850d325 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -366,7 +366,7 @@ void ValueSet::ImplFormatItem(vcl::RenderContext& rRenderContext, ValueSetItem* Reference<XAccessible> ValueSet::CreateAccessible() { - return new ValueSetAcc( this, false/*bIsTransientChildrenDisabled*/ ); + return new ValueSetAcc( this ); } void ValueSet::Format(vcl::RenderContext& rRenderContext) diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx index f7eaa03f86d6..b9f2e84a5827 100644 --- a/svx/source/form/fmmodel.cxx +++ b/svx/source/form/fmmodel.cxx @@ -53,7 +53,7 @@ struct FmFormModelImplData }; FmFormModel::FmFormModel(SfxItemPool* pPool, SfxObjectShell* pPers) - : SdrModel(pPool, pPers, false) + : SdrModel(pPool, pPers) , m_pImpl(nullptr) , m_pObjShell(nullptr) , m_bOpenInDesignMode(false) diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx index a50fe19edd6e..90e03708506a 100644 --- a/svx/source/form/fmsrcimp.cxx +++ b/svx/source/form/fmsrcimp.cxx @@ -384,16 +384,13 @@ FmSearchEngine::SEARCH_RESULT FmSearchEngine::SearchSpecial(bool _bSearchForNull bool bMovedAround(false); do { - if (m_eMode == SM_ALLOWSCHEDULE) - { - Application::Reschedule(); - Application::Reschedule(); - // do 2 reschedules because of #70226# : some things done within this loop's body may cause an user event - // to be posted (deep within vcl), and these user events will be handled before any keyinput or paintings - // or anything like that. So within each loop we create one user event and handle one user event (and no - // paintings and these), so the office seems to be frozen while searching. - // FS - 70226 - 02.12.99 - } + Application::Reschedule(); + Application::Reschedule(); + // do 2 reschedules because of #70226# : some things done within this loop's body may cause an user event + // to be posted (deep within vcl), and these user events will be handled before any keyinput or paintings + // or anything like that. So within each loop we create one user event and handle one user event (and no + // paintings and these), so the office seems to be frozen while searching. + // FS - 70226 - 02.12.99 // der aktuell zu vergleichende Inhalt iterFieldLoop->xContents->getString(); // needed for wasNull @@ -451,16 +448,13 @@ FmSearchEngine::SEARCH_RESULT FmSearchEngine::SearchWildcard(const OUString& str bool bMovedAround(false); do { - if (m_eMode == SM_ALLOWSCHEDULE) - { - Application::Reschedule(); - Application::Reschedule(); - // do 2 reschedules because of #70226# : some things done within this loop's body may cause an user event - // to be posted (deep within vcl), and these user events will be handled before any keyinput or paintings - // or anything like that. So within each loop we create one user event and handle one user event (and no - // paintings and these), so the office seems to be frozen while searching. - // FS - 70226 - 02.12.99 - } + Application::Reschedule(); + Application::Reschedule(); + // do 2 reschedules because of #70226# : some things done within this loop's body may cause an user event + // to be posted (deep within vcl), and these user events will be handled before any keyinput or paintings + // or anything like that. So within each loop we create one user event and handle one user event (and no + // paintings and these), so the office seems to be frozen while searching. + // FS - 70226 - 02.12.99 // der aktuell zu vergleichende Inhalt OUString sCurrentCheck; @@ -553,16 +547,13 @@ FmSearchEngine::SEARCH_RESULT FmSearchEngine::SearchRegularApprox(const OUString bool bMovedAround(false); do { - if (m_eMode == SM_ALLOWSCHEDULE) - { - Application::Reschedule(); - Application::Reschedule(); - // do 2 reschedules because of #70226# : some things done within this loop's body may cause an user event - // to be posted (deep within vcl), and these user events will be handled before any keyinput or paintings - // or anything like that. So within each loop we create one user event and handle one user event (and no - // paintings and these), so the office seems to be frozen while searching. - // FS - 70226 - 02.12.99 - } + Application::Reschedule(); + Application::Reschedule(); + // do 2 reschedules because of #70226# : some things done within this loop's body may cause an user event + // to be posted (deep within vcl), and these user events will be handled before any keyinput or paintings + // or anything like that. So within each loop we create one user event and handle one user event (and no + // paintings and these), so the office seems to be frozen while searching. + // FS - 70226 - 02.12.99 // der aktuell zu vergleichende Inhalt OUString sCurrentCheck; @@ -640,7 +631,7 @@ FmSearchEngine::SEARCH_RESULT FmSearchEngine::SearchRegularApprox(const OUString FmSearchEngine::FmSearchEngine(const Reference< XComponentContext >& _rxContext, const Reference< XResultSet > & xCursor, const OUString& sVisibleFields, - const InterfaceArray& arrFields, FMSEARCH_MODE eMode) + const InterfaceArray& arrFields) :m_xSearchCursor(xCursor) ,m_aCharacterClassficator( _rxContext, SvtSysLocale().GetLanguageTag() ) ,m_aStringCompare( _rxContext ) @@ -651,7 +642,6 @@ FmSearchEngine::FmSearchEngine(const Reference< XComponentContext >& _rxContext, ,m_srResult(SR_FOUND) ,m_bSearchingCurrently(false) ,m_bCancelAsynchRequest(false) - ,m_eMode(eMode) ,m_bFormatter(true) // das muss konsistent sein mit m_xSearchCursor, der i.A. == m_xOriginalIterator ist ,m_bForward(false) ,m_bWildcard(false) @@ -1086,21 +1076,8 @@ void FmSearchEngine::ImplStartNextSearch() m_bCancelAsynchRequest = false; m_bSearchingCurrently = true; - if (m_eMode == SM_USETHREAD) - { - FmSearchThread* pSearcher = new FmSearchThread(this); - // der loescht sich nach Beendigung selber ... - pSearcher->setTerminationHandler(LINK(this, FmSearchEngine, OnSearchTerminated)); - - pSearcher->createSuspended(); - pSearcher->setPriority(osl_Thread_PriorityLowest); - pSearcher->resume(); - } - else - { - SearchNextImpl(); - LINK(this, FmSearchEngine, OnSearchTerminated).Call(nullptr); - } + SearchNextImpl(); + LINK(this, FmSearchEngine, OnSearchTerminated).Call(nullptr); } diff --git a/svx/source/sdr/attribute/sdrtextattribute.cxx b/svx/source/sdr/attribute/sdrtextattribute.cxx index 983854c57492..4ff9225970ac 100644 --- a/svx/source/sdr/attribute/sdrtextattribute.cxx +++ b/svx/source/sdr/attribute/sdrtextattribute.cxx @@ -67,7 +67,6 @@ namespace drawinglayer bool mbFixedCellHeight : 1; bool mbWrongSpell : 1; - bool mbToBeChained : 1; bool mbChainable : 1; @@ -91,7 +90,6 @@ namespace drawinglayer bool bInEditMode, bool bFixedCellHeight, bool bWrongSpell, - bool bToBeChained, bool bChainable) : mpSdrText(pSdrText), mxOutlinerParaObject(new OutlinerParaObject(rOutlinerParaObject)), @@ -112,7 +110,6 @@ namespace drawinglayer mbInEditMode(bInEditMode), mbFixedCellHeight(bFixedCellHeight), mbWrongSpell(bWrongSpell), - mbToBeChained(bToBeChained), mbChainable(bChainable) { if(pSdrText) @@ -150,7 +147,6 @@ namespace drawinglayer mbInEditMode(false), mbFixedCellHeight(false), mbWrongSpell(false), - mbToBeChained(false), mbChainable(false) { } @@ -177,7 +173,6 @@ namespace drawinglayer bool isInEditMode() const { return mbInEditMode; } bool isFixedCellHeight() const { return mbFixedCellHeight; } bool isWrongSpell() const { return mbWrongSpell; } - bool isToBeChained() const { return mbToBeChained; } bool isChainable() const { return mbChainable; } const SdrFormTextAttribute& getSdrFormTextAttribute() const { return maSdrFormTextAttribute; } sal_Int32 getTextLeftDistance() const { return maTextLeftDistance; } @@ -237,8 +232,7 @@ namespace drawinglayer && isScroll() == rCandidate.isScroll() && isInEditMode() == rCandidate.isInEditMode() && isFixedCellHeight() == rCandidate.isFixedCellHeight() - && isWrongSpell() == rCandidate.isWrongSpell() - && isToBeChained() == rCandidate.isToBeChained() ); + && isWrongSpell() == rCandidate.isWrongSpell() ); } }; @@ -267,7 +261,6 @@ namespace drawinglayer bool bInEditMode, bool bFixedCellHeight, bool bWrongSpell, - bool bIsToBeChained, bool bChainable) : mpSdrTextAttribute( ImpSdrTextAttribute( @@ -275,7 +268,7 @@ namespace drawinglayer aTextUpperDistance, aTextRightDistance, aTextLowerDistance, aSdrTextHorzAdjust, aSdrTextVertAdjust, bContour, bFitToSize, bAutoFit, bHideContour, bBlink, bScroll, bInEditMode, bFixedCellHeight, bWrongSpell, - bIsToBeChained, bChainable)) + bChainable)) { } diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index 9b7787bdeaad..f514bf7c1978 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -579,7 +579,6 @@ namespace drawinglayer bInEditMode, static_cast<const SdrTextFixedCellHeightItem&>(rSet.Get(SDRATTR_TEXT_USEFIXEDCELLHEIGHT)).GetValue(), bWrongSpell, - false/*bToBeChained*/, bChainable); } diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index b2b1475a10ac..27952e494806 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -228,11 +228,11 @@ SdrModel::SdrModel(): ImpCtor(nullptr, nullptr, false); } -SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable): +SdrModel::SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers): maMaPag(), maPages() { - ImpCtor(pPool,pPers,bUseExtColorTable); + ImpCtor(pPool,pPers,false/*bUseExtColorTable*/); } SdrModel::SdrModel(const OUString& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable): diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 7b2c3f38e954..af2a0d0317ca 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -2205,8 +2205,8 @@ VCL_BUILDER_FACTORY(NotebookbarTabControl); sal_uInt16 NotebookbarTabControl::m_nHeaderHeight = 0; -NotebookbarTabControl::NotebookbarTabControl(vcl::Window* pParent, WinBits nStyle) - : TabControl(pParent, nStyle) +NotebookbarTabControl::NotebookbarTabControl(vcl::Window* pParent) + : TabControl(pParent, WB_STDTABCONTROL) , bLastContextWasSupported(true) , eLastContext(vcl::EnumContext::Context::Context_Any) { diff --git a/vcl/unx/generic/gdi/salbmp.cxx b/vcl/unx/generic/gdi/salbmp.cxx index 95665fd3b03f..bcba7e6ee4ce 100644 --- a/vcl/unx/generic/gdi/salbmp.cxx +++ b/vcl/unx/generic/gdi/salbmp.cxx @@ -1067,10 +1067,9 @@ struct ImplBmpObj { X11SalBitmap* mpBmp; sal_uLong mnMemSize; - sal_uLong mnFlags; - ImplBmpObj( X11SalBitmap* pBmp, sal_uLong nMemSize, sal_uLong nFlags ) : - mpBmp( pBmp ), mnMemSize( nMemSize ), mnFlags( nFlags ) {} + ImplBmpObj( X11SalBitmap* pBmp, sal_uLong nMemSize ) : + mpBmp( pBmp ), mnMemSize( nMemSize ) {} }; ImplSalBitmapCache::ImplSalBitmapCache() : @@ -1104,10 +1103,9 @@ void ImplSalBitmapCache::ImplAdd( X11SalBitmap* pBmp, sal_uLong nMemSize ) { mnTotalSize -= pObj->mnMemSize; pObj->mnMemSize = nMemSize; - pObj->mnFlags = 0; } else - maBmpList.push_back( new ImplBmpObj( pBmp, nMemSize, 0 ) ); + maBmpList.push_back( new ImplBmpObj( pBmp, nMemSize ) ); } void ImplSalBitmapCache::ImplRemove( X11SalBitmap* pBmp ) diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index c526c6de3b17..168d83aba0a6 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -75,12 +75,11 @@ class XInputStreamHelper : public cppu::WeakImplHelper<io::XInputStream> const sal_uInt8* m_pBuffer; const sal_Int32 m_nLength; sal_Int32 m_nPosition; - bool m_bBmp; const sal_uInt8* m_pBMPHeader; //default BMP-header sal_Int32 m_nHeaderLength; public: - XInputStreamHelper(const sal_uInt8* buf, size_t len, bool bBmp); + XInputStreamHelper(const sal_uInt8* buf, size_t len); virtual ~XInputStreamHelper(); virtual ::sal_Int32 SAL_CALL readBytes( uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nBytesToRead ) throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException, std::exception) override; @@ -90,16 +89,15 @@ public: virtual void SAL_CALL closeInput( ) throw (io::NotConnectedException, io::IOException, uno::RuntimeException, std::exception) override; }; -XInputStreamHelper::XInputStreamHelper(const sal_uInt8* buf, size_t len, bool bBmp) : +XInputStreamHelper::XInputStreamHelper(const sal_uInt8* buf, size_t len) : m_pBuffer( buf ), m_nLength( len ), - m_nPosition( 0 ), - m_bBmp( bBmp ) + m_nPosition( 0 ) { static const sal_uInt8 aHeader[] = {0x42, 0x4d, 0xe6, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00 }; m_pBMPHeader = aHeader; - m_nHeaderLength = m_bBmp ? sizeof( aHeader ) / sizeof(sal_uInt8) : 0; + m_nHeaderLength = 0; } @@ -1365,7 +1363,7 @@ void GraphicImport::data(const sal_uInt8* buf, size_t len, writerfilter::Referen beans::PropertyValues aMediaProperties( 1 ); aMediaProperties[0].Name = getPropertyName(PROP_INPUT_STREAM); - uno::Reference< io::XInputStream > xIStream = new XInputStreamHelper( buf, len, false/*bIsBitmap*/ ); + uno::Reference< io::XInputStream > xIStream = new XInputStreamHelper( buf, len ); aMediaProperties[0].Value <<= xIStream; uno::Reference<beans::XPropertySet> xPropertySet; |