diff options
56 files changed, 262 insertions, 375 deletions
diff --git a/include/svtools/PlaceEditDialog.hxx b/include/svtools/PlaceEditDialog.hxx index 2c274c4b861f..b2f65b530f0a 100644 --- a/include/svtools/PlaceEditDialog.hxx +++ b/include/svtools/PlaceEditDialog.hxx @@ -76,7 +76,7 @@ public : OUString GetUser() { return m_pEDUsername->GetText(); }; bool IsRememberChecked() { return m_pCBPassword->IsChecked(); } - void ShowPasswordControl( bool bShow = true ) { m_bShowPassword = bShow; } + void ShowPasswordControl() { m_bShowPassword = true; } private: diff --git a/include/svtools/accessibletable.hxx b/include/svtools/accessibletable.hxx index 3615c82550c7..8dd059f9bd88 100644 --- a/include/svtools/accessibletable.hxx +++ b/include/svtools/accessibletable.hxx @@ -71,12 +71,10 @@ public: /** return the description of the specified object. @param eObjType The type to ask for - @param _nPosition - The position of a tablecell (index position), header bar column/row cell @return The description of the specified object. */ - virtual OUString GetAccessibleObjectDescription(AccessibleTableControlObjType eObjType, sal_Int32 _nPosition = -1) const= 0; + virtual OUString GetAccessibleObjectDescription(AccessibleTableControlObjType eObjType) const= 0; /** Fills the StateSet with all states (except DEFUNC and SHOWING, done by the accessible object), depending on the specified object type. */ @@ -86,7 +84,7 @@ public: // Window virtual Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const = 0; virtual void GrabFocus()= 0; - virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible( bool bCreate = true )= 0; + virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible()= 0; virtual vcl::Window* GetAccessibleParentWindow() const= 0; virtual vcl::Window* GetWindowInstance()= 0; virtual sal_Int32 GetAccessibleControlCount() const = 0; @@ -94,9 +92,9 @@ public: virtual long GetRowCount() const= 0; virtual long GetColumnCount() const= 0; virtual bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint )= 0; - virtual Rectangle calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen = true ) = 0; + virtual Rectangle calcHeaderRect( bool _bIsColumnBar ) = 0; virtual Rectangle calcHeaderCellRect( bool _bColHeader, sal_Int32 _nPos ) = 0; - virtual Rectangle calcTableRect( bool _bOnScreen = true ) = 0; + virtual Rectangle calcTableRect() = 0; virtual Rectangle calcCellRect( sal_Int32 _nRowPos, sal_Int32 _nColPos ) = 0; virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex)= 0; virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)= 0; diff --git a/include/svtools/accessibletableprovider.hxx b/include/svtools/accessibletableprovider.hxx index 6e460ec11c0b..5856890d4b94 100644 --- a/include/svtools/accessibletableprovider.hxx +++ b/include/svtools/accessibletableprovider.hxx @@ -116,7 +116,7 @@ public: // Window virtual Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const = 0; virtual void GrabFocus() = 0; - virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible( bool bCreate = true ) = 0; + virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() = 0; virtual vcl::Window* GetAccessibleParentWindow() const = 0; virtual vcl::Window* GetWindowInstance() = 0; diff --git a/include/svtools/brwbox.hxx b/include/svtools/brwbox.hxx index f81fb46fe4eb..0dcc075855a5 100644 --- a/include/svtools/brwbox.hxx +++ b/include/svtools/brwbox.hxx @@ -285,7 +285,7 @@ private: private: SVT_DLLPRIVATE void ConstructImpl(BrowserMode nMode); SVT_DLLPRIVATE void ExpandRowSelection( const BrowserMouseEvent& rEvt ); - SVT_DLLPRIVATE void ToggleSelection( bool bForce = false ); + SVT_DLLPRIVATE void ToggleSelection(); SVT_DLLPRIVATE void UpdateScrollbars(); SVT_DLLPRIVATE void AutoSizeLastColumn(); @@ -460,7 +460,7 @@ public: void SetColumnTitle( sal_uInt16 nColumnId, const OUString &rTitle ); void SetColumnWidth( sal_uInt16 nColumnId, sal_uLong nWidth ); void SetColumnPos( sal_uInt16 nColumnId, sal_uInt16 nPos ); - void FreezeColumn( sal_uInt16 nColumnId, bool bFreeze = true ); + void FreezeColumn( sal_uInt16 nColumnId ); void RemoveColumn( sal_uInt16 nColumnId ); void RemoveColumns(); @@ -496,13 +496,13 @@ public: virtual void SelectRow( long nRow, bool _bSelect = true, bool bExpand = true ) override; void SelectColumnPos( sal_uInt16 nCol, bool _bSelect = true ) { SelectColumnPos( nCol, _bSelect, true); } - void SelectColumnId( sal_uInt16 nColId, bool _bSelect = true ) - { SelectColumnPos( GetColumnPos(nColId), _bSelect, true); } + void SelectColumnId( sal_uInt16 nColId ) + { SelectColumnPos( GetColumnPos(nColId), true, true); } long GetSelectRowCount() const; sal_uInt16 GetSelectColumnCount() const; virtual bool IsRowSelected( long nRow ) const override; bool IsColumnSelected( sal_uInt16 nColumnId ) const; - long FirstSelectedRow( bool bInverse = false ); + long FirstSelectedRow(); long LastSelectedRow(); long NextSelectedRow(); const MultiSelection* GetColumnSelection() const { return pColSel; } @@ -514,9 +514,8 @@ public: bool IsResizing() const { return bResizing; } // access to positions of fields, column and rows - vcl::Window& GetDataWindow() const { return *pDataWin; } - Rectangle GetRowRectPixel( long nRow, - bool bRelToBrowser = true ) const; + vcl::Window& GetDataWindow() const { return *pDataWin; } + Rectangle GetRowRectPixel( long nRow ) const; Rectangle GetFieldRectPixel( long nRow, sal_uInt16 nColId, bool bRelToBrowser = true) const; bool IsFieldVisible( long nRow, sal_uInt16 nColId, @@ -548,7 +547,7 @@ public: Note that this works only if there's a handle column, since only in this case, there *is* something for the user to click onto */ - void EnableInteractiveRowHeight( bool _bEnable = true ) { mbInteractiveRowHeight = _bEnable; } + void EnableInteractiveRowHeight() { mbInteractiveRowHeight = true; } bool IsInteractiveRowHeightEnabled( ) const { return mbInteractiveRowHeight; } /// access to selected methods, to be granted to the BrowserColumn @@ -776,7 +775,7 @@ public: virtual bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ) override; virtual Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const override; virtual void GrabFocus() override; - virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible( bool bCreate = true ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() override; virtual vcl::Window* GetAccessibleParentWindow() const override; virtual vcl::Window* GetWindowInstance() override; diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx index 265a5983ea80..bb51ec75399b 100644 --- a/include/svtools/calendar.hxx +++ b/include/svtools/calendar.hxx @@ -224,7 +224,7 @@ private: SVT_DLLPRIVATE void ImplFormat(); using Window::ImplHitTest; SVT_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rPos, Date& rDate ) const; - SVT_DLLPRIVATE void ImplDrawSpin(vcl::RenderContext& rRenderContext, bool bDrawPrev = true, bool bDrawNext = true); + SVT_DLLPRIVATE void ImplDrawSpin(vcl::RenderContext& rRenderContext, bool bDrawPrev = true); SVT_DLLPRIVATE void ImplDrawDate(vcl::RenderContext& rRenderContext, long nX, long nY, sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear, DayOfWeek eDayOfWeek, bool bBack = true, @@ -272,7 +272,7 @@ public: void SetNoSelection(); bool IsDateSelected( const Date& rDate ) const; Date GetFirstSelectedDate() const; - void EnableCallEverySelect( bool bEvery = true ) { mbAllSel = bEvery; } + void EnableCallEverySelect() { mbAllSel = true; } void SetCurDate( const Date& rNewDate ); void SetFirstDate( const Date& rNewFirstDate ); @@ -289,8 +289,7 @@ public: bool IsTravelSelect() const { return mbTravelSelect; } - Size CalcWindowSizePixel( long nCalcMonthPerLine = 1, - long nCalcLines = 1 ) const; + Size CalcWindowSizePixel( long nCalcMonthPerLine = 1 ) const; void SetSelectHdl( const Link<Calendar*,void>& rLink ) { maSelectHdl = rLink; } }; @@ -360,8 +359,8 @@ public: VclPtr<Calendar> CreateCalendar( vcl::Window* pParent ); Calendar* GetCalendar(); - void EnableToday( bool bToday = true ) { mbToday = bToday; } - void EnableNone( bool bNone = true ) { mbNone = bNone; } + void EnableToday() { mbToday = true; } + void EnableNone() { mbNone = true; } protected: virtual void StateChanged( StateChangedType nStateChange ) override; diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index f4b5dd5105c6..acb68242f449 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -175,10 +175,10 @@ public: sal_Int32 GetEntryPos( const Color& rColor ) const; Color GetEntryColor( sal_Int32 nPos ) const; - void SelectEntry( const OUString& rStr, bool bSelect = true ) - { ListBox::SelectEntry( rStr, bSelect ); } - void SelectEntry( const Color& rColor, bool bSelect = true ); - Color GetSelectEntryColor( sal_Int32 nSelIndex = 0 ) const; + void SelectEntry( const OUString& rStr ) + { ListBox::SelectEntry( rStr ); } + void SelectEntry( const Color& rColor ); + Color GetSelectEntryColor() const; bool IsEntrySelected(const OUString& rStr ) const { return ListBox::IsEntrySelected(rStr); @@ -198,16 +198,16 @@ private: ColorListBox& operator =( const ColorListBox& ) = delete; }; -inline void ColorListBox::SelectEntry( const Color& rColor, bool bSelect ) +inline void ColorListBox::SelectEntry( const Color& rColor ) { sal_Int32 nPos = GetEntryPos( rColor ); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) - ListBox::SelectEntryPos( nPos, bSelect ); + ListBox::SelectEntryPos( nPos ); } -inline Color ColorListBox::GetSelectEntryColor( sal_Int32 nSelIndex ) const +inline Color ColorListBox::GetSelectEntryColor() const { - sal_Int32 nPos = GetSelectEntryPos( nSelIndex ); + sal_Int32 nPos = GetSelectEntryPos(); Color aColor; if ( nPos != LISTBOX_ENTRY_NOTFOUND ) aColor = GetEntryColor( nPos ); @@ -328,7 +328,7 @@ public: sal_uInt16 GetEntryStyle( sal_Int32 nPos ) const; void SelectEntry( sal_uInt16 nStyle = css::table::BorderLineStyle::SOLID, bool bSelect = true ); - sal_uInt16 GetSelectEntryStyle( sal_Int32 nSelIndex = 0 ) const; + sal_uInt16 GetSelectEntryStyle() const; inline void SetUnit( FieldUnit eNewUnit ) { eUnit = eNewUnit; } @@ -384,8 +384,8 @@ private: SVT_DLLPRIVATE void ImplDestroyFontList(); protected: - void LoadMRUEntries( const OUString& aFontMRUEntriesFile, sal_Unicode cSep = ';' ); - void SaveMRUEntries( const OUString& aFontMRUEntriesFile, sal_Unicode cSep = ';' ) const; + void LoadMRUEntries( const OUString& aFontMRUEntriesFile ); + void SaveMRUEntries( const OUString& aFontMRUEntriesFile ) const; public: FontNameBox( vcl::Window* pParent, WinBits nWinStyle = WB_SORT ); diff --git a/include/svtools/embedhlp.hxx b/include/svtools/embedhlp.hxx index 29ac2dcd011c..70277a9aea35 100644 --- a/include/svtools/embedhlp.hxx +++ b/include/svtools/embedhlp.hxx @@ -92,7 +92,7 @@ public: sal_Int64 GetViewAspect() const; void SetViewAspect( sal_Int64 nAspect ); - const Graphic* GetGraphic( OUString* pMediaType = nullptr ) const; + const Graphic* GetGraphic() const; // the original size of the object ( size of the icon for iconified object ) // no conversion is done if no target mode is provided diff --git a/include/svtools/fmtfield.hxx b/include/svtools/fmtfield.hxx index 1256e5b8de61..c6ff30c82eba 100644 --- a/include/svtools/fmtfield.hxx +++ b/include/svtools/fmtfield.hxx @@ -222,7 +222,7 @@ public: InputLine format. That's also what you get in Calc when you edit a cell using F2 */ - void UseInputStringForFormatting( bool bUseInputStr = true ); + void UseInputStringForFormatting(); bool IsUsingInputStringForFormatting() const { return m_bUseInputStringForFormatting;} protected: diff --git a/include/svtools/htmlout.hxx b/include/svtools/htmlout.hxx index 50d2c8b8cf06..1547550b5bb8 100644 --- a/include/svtools/htmlout.hxx +++ b/include/svtools/htmlout.hxx @@ -66,8 +66,7 @@ struct HTMLOutFuncs SVT_DLLPUBLIC static SvStream& Out_String( SvStream&, const OUString&, rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252, OUString *pNonConvertableChars = nullptr ); - SVT_DLLPUBLIC static SvStream& Out_Hex( SvStream&, sal_uLong nHex, sal_uInt8 nLen, - rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252 ); + SVT_DLLPUBLIC static SvStream& Out_Hex( SvStream&, sal_uLong nHex, sal_uInt8 nLen ); SVT_DLLPUBLIC static SvStream& Out_Color( SvStream&, const Color&, rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252 ); SVT_DLLPUBLIC static SvStream& Out_ImageMap( SvStream&, const OUString&, const ImageMap&, const OUString&, diff --git a/include/svtools/imagemgr.hxx b/include/svtools/imagemgr.hxx index 2df64635f8dc..2b44953b1afb 100644 --- a/include/svtools/imagemgr.hxx +++ b/include/svtools/imagemgr.hxx @@ -67,9 +67,9 @@ private: public: SVT_DLLPUBLIC static Image GetImage( const INetURLObject& rURL, bool bBig = false ); - SVT_DLLPUBLIC static Image GetFileImage( const INetURLObject& rURL, bool bBig = false ); + SVT_DLLPUBLIC static Image GetFileImage( const INetURLObject& rURL ); SVT_DLLPUBLIC static Image GetImageNoDefault( const INetURLObject& rURL, bool bBig = false ); - SVT_DLLPUBLIC static Image GetFolderImage( const svtools::VolumeInfo& rInfo, bool bBig = false ); + SVT_DLLPUBLIC static Image GetFolderImage( const svtools::VolumeInfo& rInfo ); SVT_DLLPUBLIC static rtl::OUString GetDescription( const INetURLObject& rObject ); SVT_DLLPUBLIC static rtl::OUString GetFileDescription( const INetURLObject& rObject ); diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx index 98c27ed38107..b1130e562da7 100644 --- a/include/svtools/ivctrl.hxx +++ b/include/svtools/ivctrl.hxx @@ -248,7 +248,7 @@ public: void SetStyle( WinBits nWinStyle ); WinBits GetStyle() const; - void SetChoiceWithCursor ( bool bDo = true ); + void SetChoiceWithCursor(); void SetFont( const vcl::Font& rFont ); void SetPointFont( const vcl::Font& rFont ); @@ -265,8 +265,7 @@ public: SvxIconChoiceCtrlEntry* InsertEntry( const OUString& rText, const Image& rImage, sal_uLong nPos = CONTAINER_APPEND, - const Point* pPos = nullptr, - SvxIconViewFlags nFlags = SvxIconViewFlags::NONE + const Point* pPos = nullptr ); /** creates automatic mnemonics for all icon texts in the control @@ -292,9 +291,8 @@ public: // Re-calculation of cached view-data and invalidatiopn of those in the view void InvalidateEntry( SvxIconChoiceCtrlEntry* pEntry ); - // bHit == false: Entry is selectd, if the BoundRect is selected - // == true : Bitmap or Text must be selected - SvxIconChoiceCtrlEntry* GetEntry( const Point& rPosPixel, bool bHit = false ) const; + // Entry is selectd, if the BoundRect is selected + SvxIconChoiceCtrlEntry* GetEntry( const Point& rPosPixel ) const; // sal_uLong is the position of the selected element in the list SvxIconChoiceCtrlEntry* GetSelectedEntry() const; diff --git a/include/svtools/parhtml.hxx b/include/svtools/parhtml.hxx index a32cd0cc399d..5a2c19605afa 100644 --- a/include/svtools/parhtml.hxx +++ b/include/svtools/parhtml.hxx @@ -174,15 +174,15 @@ public: bool IsReadStyle() const { return bReadStyle; } // start PRE-/LISTING or XMP mode or filter tags respectively - inline void StartPRE( bool bRestart=false ); + inline void StartPRE(); void FinishPRE() { bReadPRE = false; } int FilterPRE( int nToken ); - inline void StartListing( bool bRestart=false ); + inline void StartListing(); void FinishListing() { bReadListing = false; } int FilterListing( int nToken ); - inline void StartXMP( bool bRestart=false ); + inline void StartXMP(); void FinishXMP() { bReadXMP = false; } int FilterXMP( int nToken ); @@ -243,24 +243,24 @@ public: bool SetEncodingByHTTPHeader( SvKeyValueIterator *pHTTPHeader ); }; -inline void HTMLParser::StartPRE( bool bRestart ) +inline void HTMLParser::StartPRE() { bReadPRE = true; - bPre_IgnoreNewPara = !bRestart; + bPre_IgnoreNewPara = true; nPre_LinePos = 0UL; } -inline void HTMLParser::StartListing( bool bRestart ) +inline void HTMLParser::StartListing() { bReadListing = true; - bPre_IgnoreNewPara = !bRestart; + bPre_IgnoreNewPara = true; nPre_LinePos = 0UL; } -inline void HTMLParser::StartXMP( bool bRestart ) +inline void HTMLParser::StartXMP() { bReadXMP = true; - bPre_IgnoreNewPara = !bRestart; + bPre_IgnoreNewPara = true; nPre_LinePos = 0UL; } diff --git a/include/svtools/parrtf.hxx b/include/svtools/parrtf.hxx index 8fc852d3e5a3..f98dc7bfb8c2 100644 --- a/include/svtools/parrtf.hxx +++ b/include/svtools/parrtf.hxx @@ -47,7 +47,7 @@ private: protected: sal_Unicode GetHexValue(); - void ScanText( const sal_Unicode = 0 ); + void ScanText(); void SkipGroup(); // scanne das naechste Token, diff --git a/include/svtools/svmedit2.hxx b/include/svtools/svmedit2.hxx index 3069349cd62d..b89d54a93e5f 100644 --- a/include/svtools/svmedit2.hxx +++ b/include/svtools/svmedit2.hxx @@ -30,7 +30,7 @@ public: ExtMultiLineEdit( vcl::Window* pParent, WinBits nWinStyle = WB_LEFT | WB_BORDER ); // methods of TextView - void InsertText( const OUString& rNew, bool bSelect = false ); + void InsertText( const OUString& rNew ); void SetAutoScroll( bool bAutoScroll ); // methods of TextEngine diff --git a/include/svtools/svtabbx.hxx b/include/svtools/svtabbx.hxx index 1fddbe071da4..6d4f6e500093 100644 --- a/include/svtools/svtabbx.hxx +++ b/include/svtools/svtabbx.hxx @@ -236,7 +236,7 @@ public: // Window virtual Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const override; virtual void GrabFocus() override; - virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible( bool bCreate = true ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() override; virtual vcl::Window* GetAccessibleParentWindow() const override; /** Creates and returns the accessible object of the whole BrowseBox. */ diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx index 1918dd28bff4..a84cd2ecbeb7 100644 --- a/include/svtools/tabbar.hxx +++ b/include/svtools/tabbar.hxx @@ -431,7 +431,7 @@ public: void SetMaxPageWidth( long nMaxWidth ); - void EnableEditMode( bool bEnable = true ) { mbAutoEditMode = bEnable; } + void EnableEditMode() { mbAutoEditMode = true; } bool StartEditMode( sal_uInt16 nPageId ); void EndEditMode( bool bCancel = false ); void SetEditText( const OUString& rText ) { maEditText = rText; } diff --git a/include/svtools/templatefoldercache.hxx b/include/svtools/templatefoldercache.hxx index 886a731ca49f..842f19111b99 100644 --- a/include/svtools/templatefoldercache.hxx +++ b/include/svtools/templatefoldercache.hxx @@ -75,22 +75,13 @@ namespace svt ~TemplateFolderCache( ); /** determines whether or not the template configuration needs to be updated - @param _bForceCheck - set this to <TRUE/> if you want the object to rescan the template folders in every case. The default (<FALSE/>) - means that once the information has been retrieved in a first call, every second call returns the same result - as the first one, even if in the meantime the template folders changed. @return <TRUE/> if the template configuration needs to be updated */ - bool needsUpdate( bool _bForceCheck = false ); + bool needsUpdate(); - /** stores the current state of the template folders in the cache - @param _bForceRetrieval - if set to <TRUE/>, the current state of the template folders is retrieved again, even if it is already known. - Usually, you set this to <FALSE/>: After calling <method>needsUpdate</method>, the state is know and does not - need to be read again. - */ - void storeState( bool _bForceRetrieval = false ); + /** stores the current state of the template folders in the cache */ + void storeState(); }; diff --git a/include/svtools/toolbarmenu.hxx b/include/svtools/toolbarmenu.hxx index 255ac20a2fef..86eca3e9d155 100644 --- a/include/svtools/toolbarmenu.hxx +++ b/include/svtools/toolbarmenu.hxx @@ -64,8 +64,8 @@ public: virtual void LoseFocus() override; void appendEntry( int nEntryId, const OUString& rStr, MenuItemBits nItemBits = MenuItemBits::NONE ); - void appendEntry( int nEntryId, const OUString& rStr, const Image& rImage, MenuItemBits nItemBits = MenuItemBits::NONE ); - void appendEntry( int nEntryId, Control* pControl, MenuItemBits nItemBits = MenuItemBits::NONE ); + void appendEntry( int nEntryId, const OUString& rStr, const Image& rImage ); + void appendEntry( int nEntryId, Control* pControl ); void appendSeparator(); /** creates an empty ValueSet that is initialized and can be inserted with appendEntry. */ diff --git a/include/svtools/transfer.hxx b/include/svtools/transfer.hxx index 1ade1a986d11..333fa87d986f 100644 --- a/include/svtools/transfer.hxx +++ b/include/svtools/transfer.hxx @@ -370,8 +370,7 @@ public: static TransferableDataHelper CreateFromSystemClipboard( vcl::Window * pWindow ); static TransferableDataHelper CreateFromSelection( vcl::Window * pWindow ); static bool IsEqual( const css::datatransfer::DataFlavor& rInternalFlavor, - const css::datatransfer::DataFlavor& rRequestFlavor, - bool bCompareParameters = false ); + const css::datatransfer::DataFlavor& rRequestFlavor ); }; class SVT_DLLPUBLIC DragSourceHelper @@ -517,8 +516,7 @@ public: using TransferableHelper::StartDrag; void StartDrag( vcl::Window* pWindow, sal_Int8 nDragSourceActions, const Link<sal_Int8,void>& rCallbck, - sal_Int32 nDragPointer = DND_POINTER_NONE, - sal_Int32 nDragImage = DND_IMAGE_NONE ); + sal_Int32 nDragPointer = DND_POINTER_NONE ); }; #endif diff --git a/include/svtools/treelist.hxx b/include/svtools/treelist.hxx index b7b42e3dc983..fb21e9b209ba 100644 --- a/include/svtools/treelist.hxx +++ b/include/svtools/treelist.hxx @@ -272,11 +272,11 @@ public: SvTreeListEntry* NextVisible( SvTreeListEntry* pEntry, sal_uInt16* pDepth=nullptr ) const { return pModel->NextVisible(this,pEntry,pDepth); } - SvTreeListEntry* PrevVisible( SvTreeListEntry* pEntry, sal_uInt16* pDepth=nullptr ) const - { return pModel->PrevVisible(this,pEntry,pDepth); } + SvTreeListEntry* PrevVisible( SvTreeListEntry* pEntry ) const + { return pModel->PrevVisible(this,pEntry); } - SvTreeListEntry* LastVisible( sal_uInt16* pDepth=nullptr ) const - { return pModel->LastVisible(this,pDepth); } + SvTreeListEntry* LastVisible() const + { return pModel->LastVisible(this); } SvTreeListEntry* NextVisible( SvTreeListEntry* pEntry, sal_uInt16& rDelta ) const { return pModel->NextVisible(this,pEntry,rDelta); } diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx index 8bcf3d800395..2a4a36c8664d 100644 --- a/include/svtools/treelistbox.hxx +++ b/include/svtools/treelistbox.hxx @@ -376,13 +376,13 @@ public: { return pModel ? pModel->First() : nullptr; } - SvTreeListEntry* Next( SvTreeListEntry* pEntry, sal_uInt16* pDepth = nullptr ) const + SvTreeListEntry* Next( SvTreeListEntry* pEntry ) const { - return pModel->Next(pEntry, pDepth); + return pModel->Next(pEntry); } - SvTreeListEntry* Prev( SvTreeListEntry* pEntry, sal_uInt16* pDepth = nullptr ) const + SvTreeListEntry* Prev( SvTreeListEntry* pEntry ) const { - return pModel->Prev(pEntry, pDepth); + return pModel->Prev(pEntry); } SvTreeListEntry* Last() const { @@ -440,7 +440,7 @@ public: Be aware that enabling mnemonics gets more expensive as you add to the list. */ - void EnableEntryMnemonics( bool _bEnable = true ); + void EnableEntryMnemonics(); bool IsEntryMnemonicsEnabled() const; /** Handles the given key event. @@ -678,8 +678,8 @@ public: Link<SvTreeListBox*,void> GetCheckButtonHdl() const { return aCheckButtonHdl; } virtual void CheckButtonHdl(); - void SetSublistOpenWithReturn( bool bMode = true ); // open/close sublist with return/enter - void SetSublistOpenWithLeftRight( bool bMode = true ); // open/close sublist with cursor left/right + void SetSublistOpenWithReturn(); // open/close sublist with return/enter + void SetSublistOpenWithLeftRight(); // open/close sublist with cursor left/right void EnableInplaceEditing( bool bEnable ); // Edits the Entry's first StringItem, 0 == Cursor @@ -711,7 +711,7 @@ public: void ScrollOutputArea( short nDeltaEntries ); short GetEntryHeight() const { return nEntryHeight; } - void SetEntryHeight( short nHeight, bool bAlways = false ); + void SetEntryHeight( short nHeight ); Size GetOutputSizePixel() const; short GetIndent() const { return nIndent; } void SetIndent( short nIndent ); diff --git a/include/svtools/unitconv.hxx b/include/svtools/unitconv.hxx index 33fb8dd06740..8d0e19deefd6 100644 --- a/include/svtools/unitconv.hxx +++ b/include/svtools/unitconv.hxx @@ -32,7 +32,7 @@ typedef long (*FUNC_CONVERT)(long); // Functions ------------------------------------------------------------- SVT_DLLPUBLIC void SetFieldUnit( MetricField& rCtrl, FieldUnit eUnit, bool bAll = false ); -SVT_DLLPUBLIC void SetFieldUnit( MetricBox& rCtrl, FieldUnit eUnit, bool bAll = false ); +SVT_DLLPUBLIC void SetFieldUnit( MetricBox& rCtrl, FieldUnit eUnit ); SVT_DLLPUBLIC long CalcToUnit( float nIn, SfxMapUnit eUnit ); SVT_DLLPUBLIC long CalcToPoint( long nIn, SfxMapUnit eUnit, sal_uInt16 nFactor ); diff --git a/include/svtools/valueset.hxx b/include/svtools/valueset.hxx index 93ab5891955f..3a0cd0b9459e 100644 --- a/include/svtools/valueset.hxx +++ b/include/svtools/valueset.hxx @@ -260,7 +260,7 @@ private: SVT_DLLPRIVATE void ImplDraw(vcl::RenderContext& rRenderContext); using Window::ImplScroll; SVT_DLLPRIVATE bool ImplScroll( const Point& rPos ); - SVT_DLLPRIVATE size_t ImplGetItem( const Point& rPoint, bool bMove = false ) const; + SVT_DLLPRIVATE size_t ImplGetItem( const Point& rPoint ) const; SVT_DLLPRIVATE ValueSetItem* ImplGetItem( size_t nPos ); SVT_DLLPRIVATE ValueSetItem* ImplGetFirstItem(); SVT_DLLPRIVATE sal_uInt16 ImplGetVisibleItemCount() const; @@ -307,13 +307,13 @@ public: virtual void UserDraw( const UserDrawEvent& rUDEvt ); /// Insert @rImage item. - void InsertItem(sal_uInt16 nItemId, const Image& rImage, size_t nPos = VALUESET_APPEND); + void InsertItem(sal_uInt16 nItemId, const Image& rImage); /// Insert @rImage item with @rStr as either a legend or tooltip depending on @bShowLegend. void InsertItem(sal_uInt16 nItemId, const Image& rImage, const OUString& rStr, size_t nPos = VALUESET_APPEND, bool bShowLegend = false); /// Insert an @rColor item with @rStr tooltip. void InsertItem(sal_uInt16 nItemId, const Color& rColor, - const OUString& rStr, size_t nPos = VALUESET_APPEND); + const OUString& rStr); /// Insert an User Drawn item. void InsertItem(sal_uInt16 nItemId, size_t nPos = VALUESET_APPEND); /// Insert an User Drawn item with @rStr tooltip. @@ -382,7 +382,7 @@ public: void SetExtraSpacing( sal_uInt16 nNewSpacing ); void Format(vcl::RenderContext& rRenderContext); - void SetFormat(bool bFormat = true); + void SetFormat(); void StartSelection(); void EndSelection(); @@ -390,7 +390,7 @@ public: Size CalcWindowSizePixel(const Size& rItemSize, sal_uInt16 nCalcCols = 0, sal_uInt16 nCalcLines = 0) const; - Size CalcItemSizePixel(const Size& rSize, bool bOut = true) const; + Size CalcItemSizePixel(const Size& rSize) const; long GetScrollWidth() const; void SetSelectHdl(const Link<ValueSet*,void>& rLink) diff --git a/include/svtools/wizardmachine.hxx b/include/svtools/wizardmachine.hxx index df848febc39c..4c8159dcb20d 100644 --- a/include/svtools/wizardmachine.hxx +++ b/include/svtools/wizardmachine.hxx @@ -261,7 +261,7 @@ namespace svt If this is <TRUE/>, then upon entering a new state, the "Next" button will automatically be enabled if and only if determineNextState does not return WZS_INVALID_STATE. */ - void enableAutomaticNextButtonState( bool _bEnable = true ); + void enableAutomaticNextButtonState(); bool isAutomaticNextButtonStateEnabled() const; /** removes a page from the history. Should be called when the page is being disabled @@ -282,7 +282,7 @@ namespace svt @see skipUntil @see skipBackwardUntil */ - void skip( sal_Int32 _nSteps = 1 ); + void skip(); /** skips one or more states, until a given state is reached diff --git a/svtools/inc/roadmap.hxx b/svtools/inc/roadmap.hxx index a79cd1894c45..4cc79cff7ed5 100644 --- a/svtools/inc/roadmap.hxx +++ b/svtools/inc/roadmap.hxx @@ -53,12 +53,12 @@ public: virtual ~ORoadmap( ); virtual void dispose() override; - void SetRoadmapBitmap( const BitmapEx& maBitmap, bool _bInvalidate = true ); + void SetRoadmapBitmap( const BitmapEx& maBitmap ); - void EnableRoadmapItem( ItemId _nItemId, bool _bEnable, ItemIndex _nStartIndex = 0 ); + void EnableRoadmapItem( ItemId _nItemId, bool _bEnable ); - void ChangeRoadmapItemLabel( ItemId _nID, const OUString& sLabel, ItemIndex _nStartIndex = 0 ); - void ChangeRoadmapItemID( ItemId _nID, ItemId _NewID, ItemIndex _nStartIndex = 0 ); + void ChangeRoadmapItemLabel( ItemId _nID, const OUString& sLabel ); + void ChangeRoadmapItemID( ItemId _nID, ItemId _NewID ); void SetRoadmapInteractive( bool _bInteractive ); bool IsRoadmapInteractive(); @@ -95,7 +95,7 @@ private: const RoadmapItem* GetByIndex( ItemIndex _nItemIndex ) const; RoadmapItem* GetByID( ItemId _nID, ItemIndex _nStartIndex = 0 ); - const RoadmapItem* GetByID( ItemId _nID, ItemIndex _nStartIndex = 0 ) const; + const RoadmapItem* GetByID( ItemId _nID ) const; RoadmapItem* GetPreviousHyperLabel( ItemIndex _Index); void DrawHeadline(vcl::RenderContext& rRenderContext); diff --git a/svtools/inc/table/tablecontrol.hxx b/svtools/inc/table/tablecontrol.hxx index c09cacb55ff4..b0725f51a373 100644 --- a/svtools/inc/table/tablecontrol.hxx +++ b/svtools/inc/table/tablecontrol.hxx @@ -120,7 +120,7 @@ namespace svt { namespace table SVT_DLLPRIVATE virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessibleControl( sal_Int32 _nIndex ) override; SVT_DLLPRIVATE virtual OUString GetAccessibleObjectName(AccessibleTableControlObjType eObjType, sal_Int32 _nRow, sal_Int32 _nCol) const override; SVT_DLLPRIVATE virtual void GoToCell( sal_Int32 _nColumnPos, sal_Int32 _nRow ) override; - SVT_DLLPRIVATE virtual OUString GetAccessibleObjectDescription(AccessibleTableControlObjType eObjType, sal_Int32 _nPosition = -1) const override; + SVT_DLLPRIVATE virtual OUString GetAccessibleObjectDescription(AccessibleTableControlObjType eObjType) const override; SVT_DLLPRIVATE virtual void FillAccessibleStateSet( ::utl::AccessibleStateSetHelper& rStateSet, AccessibleTableControlObjType eObjType ) const override; // temporary methods @@ -134,7 +134,7 @@ namespace svt { namespace table // IAccessibleTable virtual Rectangle GetWindowExtentsRelative( vcl::Window *pRelativeWindow ) const override; virtual void GrabFocus() override; - virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible( bool bCreate = true ) override; + virtual css::uno::Reference< css::accessibility::XAccessible > GetAccessible() override; virtual vcl::Window* GetAccessibleParentWindow() const override; virtual vcl::Window* GetWindowInstance() override; virtual sal_Int32 GetAccessibleControlCount() const override; @@ -142,9 +142,9 @@ namespace svt { namespace table virtual long GetRowCount() const override; virtual long GetColumnCount() const override; virtual bool ConvertPointToCellAddress( sal_Int32& _rnRow, sal_Int32& _rnColPos, const Point& _rPoint ) override; - virtual Rectangle calcHeaderRect( bool _bIsColumnBar, bool _bOnScreen = true ) override; + virtual Rectangle calcHeaderRect( bool _bIsColumnBar ) override; virtual Rectangle calcHeaderCellRect( bool _bIsColumnBar, sal_Int32 nPos) override; - virtual Rectangle calcTableRect( bool _bOnScreen = true ) override; + virtual Rectangle calcTableRect() override; virtual Rectangle calcCellRect( sal_Int32 _nRowPos, sal_Int32 _nColPos ) override; virtual Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override; virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint) override; diff --git a/svtools/source/brwbox/brwbox1.cxx b/svtools/source/brwbox/brwbox1.cxx index 870185098d0a..385eb089303f 100644 --- a/svtools/source/brwbox/brwbox1.cxx +++ b/svtools/source/brwbox/brwbox1.cxx @@ -322,13 +322,8 @@ void BrowseBox::SetToggledSelectedColumn(sal_uInt16 _nSelectedColumnId) } } -void BrowseBox::FreezeColumn( sal_uInt16 nItemId, bool bFreeze ) +void BrowseBox::FreezeColumn( sal_uInt16 nItemId ) { - - // never unfreeze the handle-column - if ( nItemId == HandleColumnId && !bFreeze ) - return; - // get the position in the current array size_t nItemPos = GetColumnPos( nItemId ); if ( nItemPos >= pCols->size() ) @@ -336,57 +331,33 @@ void BrowseBox::FreezeColumn( sal_uInt16 nItemId, bool bFreeze ) return; // doesn't the state change? - if ( (*pCols)[ nItemPos ]->IsFrozen() == bFreeze ) + if ( (*pCols)[ nItemPos ]->IsFrozen() ) return; // remark the column selection sal_uInt16 nSelectedColId = ToggleSelectedColumn(); - // freeze or unfreeze? - if ( bFreeze ) + // to be moved? + if ( nItemPos != 0 && !(*pCols)[ nItemPos-1 ]->IsFrozen() ) { - // to be moved? - if ( nItemPos != 0 && !(*pCols)[ nItemPos-1 ]->IsFrozen() ) - { - // move to the right of the last frozen column - sal_uInt16 nFirstScrollable = FrozenColCount(); - BrowserColumn *pColumn = (*pCols)[ nItemPos ]; - BrowserColumns::iterator it = pCols->begin(); - ::std::advance( it, nItemPos ); - pCols->erase( it ); - nItemPos = nFirstScrollable; - it = pCols->begin(); - ::std::advance( it, nItemPos ); - pCols->insert( it, pColumn ); - } - - // adjust the number of the first scrollable and visible column - if ( nFirstCol <= nItemPos ) - nFirstCol = nItemPos + 1; + // move to the right of the last frozen column + sal_uInt16 nFirstScrollable = FrozenColCount(); + BrowserColumn *pColumn = (*pCols)[ nItemPos ]; + BrowserColumns::iterator it = pCols->begin(); + ::std::advance( it, nItemPos ); + pCols->erase( it ); + nItemPos = nFirstScrollable; + it = pCols->begin(); + ::std::advance( it, nItemPos ); + pCols->insert( it, pColumn ); } - else - { - // to be moved? - if ( (sal_Int32)nItemPos != FrozenColCount()-1 ) - { - // move to the leftmost scrollable column - sal_uInt16 nFirstScrollable = FrozenColCount(); - BrowserColumn *pColumn = (*pCols)[ nItemPos ]; - BrowserColumns::iterator it = pCols->begin(); - ::std::advance( it, nItemPos ); - pCols->erase( it ); - nItemPos = nFirstScrollable; - it = pCols->begin(); - ::std::advance( it, nItemPos ); - pCols->insert( it, pColumn ); - } - // adjust the number of the first scrollable and visible column - nFirstCol = nItemPos; - } + // adjust the number of the first scrollable and visible column + if ( nFirstCol <= nItemPos ) + nFirstCol = nItemPos + 1; // toggle the freeze-state of the column - (*pCols)[ nItemPos ]->Freeze( bFreeze ); + (*pCols)[ nItemPos ]->Freeze(); // align the scrollbar-range UpdateScrollbars(); @@ -1889,10 +1860,10 @@ long BrowseBox::FirstSelectedColumn( ) const } -long BrowseBox::FirstSelectedRow( bool bInverse ) +long BrowseBox::FirstSelectedRow() { - return bMultiSelection ? uRow.pSel->FirstSelected(bInverse) : uRow.nSel; + return bMultiSelection ? uRow.pSel->FirstSelected() : uRow.nSel; } @@ -2039,7 +2010,7 @@ Rectangle BrowseBox::GetFieldRectPixel( long nRow, sal_uInt16 nColumnId, } -Rectangle BrowseBox::GetRowRectPixel( long nRow, bool bRelToBrowser ) const +Rectangle BrowseBox::GetRowRectPixel( long nRow ) const { // get the rectangle relative to DataWin @@ -2056,11 +2027,8 @@ Rectangle BrowseBox::GetRowRectPixel( long nRow, bool bRelToBrowser ) const // adjust relative to BrowseBox's output area Point aTopLeft( aRect.TopLeft() ); - if ( bRelToBrowser ) - { - aTopLeft = pDataWin->OutputToScreenPixel( aTopLeft ); - aTopLeft = ScreenToOutputPixel( aTopLeft ); - } + aTopLeft = pDataWin->OutputToScreenPixel( aTopLeft ); + aTopLeft = ScreenToOutputPixel( aTopLeft ); return Rectangle( aTopLeft, aRect.GetSize() ); } diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx index 1a3cfad27e11..e178fb02918f 100644 --- a/svtools/source/brwbox/brwbox2.cxx +++ b/svtools/source/brwbox/brwbox2.cxx @@ -236,14 +236,13 @@ void BrowseBox::EndScroll() } -void BrowseBox::ToggleSelection( bool bForce ) +void BrowseBox::ToggleSelection() { // selection highlight-toggling allowed? if ( bHideSelect ) return; - if ( !bForce && - ( bNotToggleSel || !IsUpdateMode() || !bSelectionIsVisible ) ) + if ( bNotToggleSel || !IsUpdateMode() || !bSelectionIsVisible ) return; // only highlight painted areas! diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx index 7e2af122454e..c98cc999b270 100644 --- a/svtools/source/brwbox/brwbox3.cxx +++ b/svtools/source/brwbox/brwbox3.cxx @@ -544,9 +544,9 @@ void BrowseBox::GrabFocus() Control::GrabFocus(); } -Reference< XAccessible > BrowseBox::GetAccessible( bool bCreate ) +Reference< XAccessible > BrowseBox::GetAccessible() { - return Control::GetAccessible( bCreate ); + return Control::GetAccessible(); } vcl::Window* BrowseBox::GetAccessibleParentWindow() const diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 7df9e0ed5a66..d1fee6b3b100 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -254,7 +254,7 @@ void BrowserDataWin::LeaveUpdateLock() } } -void InitSettings_Impl(vcl::Window* pWin, bool bFont, bool bForeground, bool bBackground) +void InitSettings_Impl(vcl::Window* pWin, bool bFont, bool bForeground) { const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings(); @@ -264,8 +264,7 @@ void InitSettings_Impl(vcl::Window* pWin, bool bFont, bool bForeground, bool bBa if (bFont || bForeground) pWin->ApplyControlForeground(*pWin, rStyleSettings.GetWindowTextColor()); - if (bBackground) - pWin->ApplyControlBackground(*pWin, rStyleSettings.GetWindowColor()); + pWin->ApplyControlBackground(*pWin, rStyleSettings.GetWindowColor()); } diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx index 7a218617902a..d4d1495076a8 100644 --- a/svtools/source/brwbox/datwin.hxx +++ b/svtools/source/brwbox/datwin.hxx @@ -198,7 +198,7 @@ public: void InitSettings_Impl( vcl::Window *pWin, - bool bFont = true, bool bForeground = true, bool bBackground = true ); + bool bFont = true, bool bForeground = true ); #endif diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index e6b6fde47d3f..c01254249832 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -224,7 +224,7 @@ class SvxIconChoiceCtrl_Impl DECL_LINK_TYPED( VisRectChangedHdl, Idle*, void ); DECL_LINK_TYPED( CallSelectHdlHdl, Idle*, void ); - void AdjustScrollBars( bool bVirtSizeGrowedOnly = false); + void AdjustScrollBars(); void PositionScrollBars( long nRealWidth, long nRealHeight ); static long GetScrollBarPageSize( long nVisibleRange ) { @@ -328,7 +328,7 @@ public: void InsertEntry( SvxIconChoiceCtrlEntry*, size_t nPos, const Point* pPos=nullptr ); void CreateAutoMnemonics( MnemonicGenerator* _pGenerator = nullptr ); void FontModified(); - void SelectAll( bool bSelect = true, bool bPaint = true ); + void SelectAll( bool bSelect = true ); void SelectEntry( SvxIconChoiceCtrlEntry*, bool bSelect, @@ -372,8 +372,7 @@ public: void SetCursor( SvxIconChoiceCtrlEntry*, // true == carry selection when single-selecting - bool bSyncSingleSelection = true, - bool bShowFocusAsync = false + bool bSyncSingleSelection = true ); SvxIconChoiceCtrlEntry* GetEntry( const Point& rDocPos, bool bHit = false ); @@ -419,8 +418,7 @@ public: bool bIsBackgroundPainted = false); void PaintItem(const Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, - sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext, const OUString* pStr = nullptr, - vcl::ControlLayoutData* _pLayoutData = nullptr); + sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext, const OUString* pStr = nullptr); // recalculates all BoundingRects if bMustRecalcBoundingRects == true void CheckBoundingRects() { if (bBoundRectsDirty) RecalcAllBoundingRectsSmart(); } @@ -592,11 +590,11 @@ public: void Clear(); - GridId GetGrid( const Point& rDocPos, bool* pbClipped = nullptr ); + GridId GetGrid( const Point& rDocPos ); GridId GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY ); - GridId GetUnoccupiedGrid( bool bOccupyFound=true ); + GridId GetUnoccupiedGrid(); - void OccupyGrids( const SvxIconChoiceCtrlEntry*, bool bOccupy = true ); + void OccupyGrids( const SvxIconChoiceCtrlEntry* ); void OccupyGrid( GridId nId, bool bOccupy = true ) { DBG_ASSERT(!_pGridMap || nId<(sal_uLong)(_nGridCols*_nGridRows),"OccupyGrid: Bad GridId"); diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 5cf55c7b220d..bd6fdd3af77b 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -1229,7 +1229,7 @@ void SvxIconChoiceCtrl_Impl::PositionScrollBars( long nRealWidth, long nRealHeig aVerSBar->SetPosPixel( aPos ); } -void SvxIconChoiceCtrl_Impl::AdjustScrollBars( bool ) +void SvxIconChoiceCtrl_Impl::AdjustScrollBars() { long nVirtHeight = aVirtOutputSize.Height(); long nVirtWidth = aVirtOutputSize.Width(); @@ -1572,7 +1572,7 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, const Rec void SvxIconChoiceCtrl_Impl::PaintItem(const Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags, - vcl::RenderContext& rRenderContext, const OUString* pStr, vcl::ControlLayoutData* _pLayoutData ) + vcl::RenderContext& rRenderContext, const OUString* pStr ) { if (eItem == IcnViewFieldTypeText) { @@ -1582,36 +1582,29 @@ void SvxIconChoiceCtrl_Impl::PaintItem(const Rectangle& rRect, else aText = *pStr; - if (_pLayoutData) + Color aOldFontColor = rRenderContext.GetTextColor(); + if (pView->AutoFontColor()) { - rRenderContext.DrawText(rRect, aText, nCurTextDrawFlags, &_pLayoutData->m_aUnicodeBoundRects, &_pLayoutData->m_aDisplayText); + Color aBkgColor(rRenderContext.GetBackground().GetColor()); + Color aFontColor; + sal_uInt16 nColor = (aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue()) / 3; + if (nColor > 127) + aFontColor.SetColor(COL_BLACK); + else + aFontColor.SetColor(COL_WHITE); + rRenderContext.SetTextColor(aFontColor); } - else - { - Color aOldFontColor = rRenderContext.GetTextColor(); - if (pView->AutoFontColor()) - { - Color aBkgColor(rRenderContext.GetBackground().GetColor()); - Color aFontColor; - sal_uInt16 nColor = (aBkgColor.GetRed() + aBkgColor.GetGreen() + aBkgColor.GetBlue()) / 3; - if (nColor > 127) - aFontColor.SetColor(COL_BLACK); - else - aFontColor.SetColor(COL_WHITE); - rRenderContext.SetTextColor(aFontColor); - } - rRenderContext.DrawText(rRect, aText, nCurTextDrawFlags); + rRenderContext.DrawText(rRect, aText, nCurTextDrawFlags); - if (pView->AutoFontColor()) - rRenderContext.SetTextColor(aOldFontColor); + if (pView->AutoFontColor()) + rRenderContext.SetTextColor(aOldFontColor); - if (pEntry->IsFocused()) - { - Rectangle aRect (CalcFocusRect(pEntry)); - ShowFocus(aRect); - DrawFocusRect(rRenderContext); - } + if (pEntry->IsFocused()) + { + Rectangle aRect (CalcFocusRect(pEntry)); + ShowFocus(aRect); + DrawFocusRect(rRenderContext); } } else @@ -2051,8 +2044,7 @@ void SvxIconChoiceCtrl_Impl::SetBoundingRect_Impl( SvxIconChoiceCtrlEntry* pEntr } -void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, bool bSyncSingleSelection, - bool bShowFocusAsync ) +void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, bool bSyncSingleSelection ) { if( pEntry == pCursor ) { @@ -2076,15 +2068,7 @@ void SvxIconChoiceCtrl_Impl::SetCursor( SvxIconChoiceCtrlEntry* pEntry, bool bSy pCursor->SetFlags( SvxIconViewFlags::FOCUSED ); if( eSelectionMode == SINGLE_SELECTION && bSyncSingleSelection ) SelectEntry( pCursor, true ); - if( !bShowFocusAsync ) - ShowCursor( true ); - else - { - if( !nUserEventShowCursor ) - nUserEventShowCursor = - Application::PostUserEvent( LINK( this, SvxIconChoiceCtrl_Impl, UserEventHdl), - EVENTID_SHOW_CURSOR ); - } + ShowCursor( true ); } } @@ -3105,9 +3089,9 @@ SvxIconChoiceCtrlEntry* SvxIconChoiceCtrl_Impl::GetFirstSelectedEntry() const return nullptr; } -void SvxIconChoiceCtrl_Impl::SelectAll( bool bSelect, bool bPaint ) +void SvxIconChoiceCtrl_Impl::SelectAll( bool bSelect ) { - bPaint = true; + bool bPaint = true; size_t nCount = aEntries.size(); for( size_t nCur = 0; nCur < nCount && (bSelect || GetSelectionCount() ); nCur++ ) diff --git a/svtools/source/contnr/imivctl2.cxx b/svtools/source/contnr/imivctl2.cxx index 549020906d57..8792ea4aee70 100644 --- a/svtools/source/contnr/imivctl2.cxx +++ b/svtools/source/contnr/imivctl2.cxx @@ -638,7 +638,7 @@ GridId IcnGridMap_Impl::GetGrid( sal_uInt16 nGridX, sal_uInt16 nGridY ) return nGridY + ( static_cast<GridId>(nGridX) * _nGridRows ); } -GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, bool* pbClipped ) +GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos ) { Create(); @@ -660,8 +660,6 @@ GridId IcnGridMap_Impl::GetGrid( const Point& rDocPos, bool* pbClipped ) bClipped = true; } GridId nId = GetGrid( (sal_uInt16)nX, (sal_uInt16)nY ); - if( pbClipped ) - *pbClipped = bClipped; DBG_ASSERT(nId <(sal_uLong)(_nGridCols*_nGridRows),"GetGrid failed"); return nId; } @@ -679,7 +677,7 @@ Rectangle IcnGridMap_Impl::GetGridRect( GridId nId ) nTop + _pView->nGridDY ); } -GridId IcnGridMap_Impl::GetUnoccupiedGrid( bool bOccupyFound ) +GridId IcnGridMap_Impl::GetUnoccupiedGrid() { Create(); sal_uLong nStart = 0; @@ -692,8 +690,7 @@ GridId IcnGridMap_Impl::GetUnoccupiedGrid( bool bOccupyFound ) { if( !_pGridMap[ nCur ] ) { - if( bOccupyFound ) - _pGridMap[ nCur ] = true; + _pGridMap[ nCur ] = true; return (GridId)nCur; } } @@ -709,11 +706,11 @@ GridId IcnGridMap_Impl::GetUnoccupiedGrid( bool bOccupyFound ) // An entry only means that there's a GridRect lying under its center. This // variant is much faster than allocating via the bounding rectangle but can // lead to small overlaps. -void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry, bool bOccupy ) +void IcnGridMap_Impl::OccupyGrids( const SvxIconChoiceCtrlEntry* pEntry ) { if( !_pGridMap || !SvxIconChoiceCtrl_Impl::IsBoundingRectValid( pEntry->aRect )) return; - OccupyGrid( GetGrid( pEntry->aRect.Center()), bOccupy ); + OccupyGrid( GetGrid( pEntry->aRect.Center()) ); } void IcnGridMap_Impl::Clear() diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index 63b78868e30e..c11e6f3c6fd7 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -101,9 +101,9 @@ void SvtIconChoiceCtrl::dispose() Control::dispose(); } -SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const OUString& rText, const Image& rImage, sal_uLong nPos, const Point* pPos, SvxIconViewFlags nFlags ) +SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::InsertEntry( const OUString& rText, const Image& rImage, sal_uLong nPos, const Point* pPos ) { - SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage, nFlags); + SvxIconChoiceCtrlEntry* pEntry = new SvxIconChoiceCtrlEntry( rText, rImage, SvxIconViewFlags::NONE); _pImp->InsertEntry( pEntry, nPos, pPos ); @@ -227,11 +227,11 @@ void SvtIconChoiceCtrl::SetPointFont(const vcl::Font& rFont) } } -SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( const Point& rPixPos, bool bHit ) const +SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetEntry( const Point& rPixPos ) const { Point aPos( rPixPos ); aPos -= GetMapMode().GetOrigin(); - return const_cast<SvtIconChoiceCtrl*>(this)->_pImp->GetEntry( aPos, bHit ); + return const_cast<SvtIconChoiceCtrl*>(this)->_pImp->GetEntry( aPos ); } void SvtIconChoiceCtrl::SetStyle( WinBits nWinStyle ) @@ -285,9 +285,9 @@ bool SvtIconChoiceCtrl::IsEntryEditing() const return _pImp->IsEntryEditing(); } -void SvtIconChoiceCtrl::SetChoiceWithCursor ( bool bDo ) +void SvtIconChoiceCtrl::SetChoiceWithCursor() { - _pImp->SetChoiceWithCursor (bDo); + _pImp->SetChoiceWithCursor(); } void SvtIconChoiceCtrl::KeyInput( const KeyEvent& rKEvt ) diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index e837ab6e4e45..e6607c12adf2 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -827,7 +827,7 @@ SvTreeListEntry* SvImpLBox::GetEntry( const Point& rPoint ) const } -SvTreeListEntry* SvImpLBox::MakePointVisible(const Point& rPoint, bool bNotifyScroll) +SvTreeListEntry* SvImpLBox::MakePointVisible(const Point& rPoint) { if( !pCursor ) return nullptr; @@ -845,9 +845,9 @@ SvTreeListEntry* SvImpLBox::MakePointVisible(const Point& rPoint, bool bNotifySc pView->SetEntryFocus( pCursor, false ); if( nY < 0 ) - KeyUp( false, bNotifyScroll ); + KeyUp( false ); else - KeyDown( false, bNotifyScroll ); + KeyDown( false ); } else { diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 8e845bbf0fb0..ba6e99b36ced 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -1123,9 +1123,9 @@ void SvHeaderTabListBox::GrabFocus() Control::GrabFocus(); } -Reference< XAccessible > SvHeaderTabListBox::GetAccessible( bool bCreate ) +Reference< XAccessible > SvHeaderTabListBox::GetAccessible() { - return Control::GetAccessible( bCreate ); + return Control::GetAccessible(); } vcl::Window* SvHeaderTabListBox::GetAccessibleParentWindow() const diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index c54a2a69d031..f0e9142b71f8 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -445,12 +445,12 @@ void SvTreeListBox::Clear() pModel->Clear(); // Model calls SvTreeListBox::ModelHasCleared() } -void SvTreeListBox::EnableEntryMnemonics( bool _bEnable ) +void SvTreeListBox::EnableEntryMnemonics() { - if ( _bEnable == IsEntryMnemonicsEnabled() ) + if ( IsEntryMnemonicsEnabled() ) return; - mpImpl->m_bEntryMnemonicsEnabled = _bEnable; + mpImpl->m_bEntryMnemonicsEnabled = true; Invalidate(); } @@ -1568,14 +1568,14 @@ void SvTreeListBox::DisconnectFromModel() pImp->SetModel( GetModel() ); } -void SvTreeListBox::SetSublistOpenWithReturn( bool b ) +void SvTreeListBox::SetSublistOpenWithReturn() { - pImp->bSubLstOpRet = b; + pImp->bSubLstOpRet = true; } -void SvTreeListBox::SetSublistOpenWithLeftRight( bool b ) +void SvTreeListBox::SetSublistOpenWithLeftRight() { - pImp->bSubLstOpLR = b; + pImp->bSubLstOpLR = true; } void SvTreeListBox::Resize() @@ -2273,10 +2273,9 @@ void SvTreeListBox::SetEntryHeight( SvTreeListEntry* pEntry ) } } -void SvTreeListBox::SetEntryHeight( short nHeight, bool bAlways ) +void SvTreeListBox::SetEntryHeight( short nHeight ) { - - if( bAlways || nHeight > nEntryHeight ) + if( nHeight > nEntryHeight ) { nEntryHeight = nHeight; if( nEntryHeight ) diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index 84b217d1d095..6ca8461c7994 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -653,11 +653,8 @@ static void ImplDrawSpinArrow(vcl::RenderContext& rRenderContext, const Rectangl } //end anonymous namespace -void Calendar::ImplDrawSpin(vcl::RenderContext& rRenderContext, bool bDrawPrev, bool bDrawNext ) +void Calendar::ImplDrawSpin(vcl::RenderContext& rRenderContext, bool bDrawPrev ) { - if (!bDrawPrev && !bDrawNext) - return; - rRenderContext.SetLineColor(); rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetButtonTextColor()); if (bDrawPrev) @@ -669,15 +666,12 @@ void Calendar::ImplDrawSpin(vcl::RenderContext& rRenderContext, bool bDrawPrev, aOutRect.Bottom() -= 3; ImplDrawSpinArrow(rRenderContext, aOutRect, true); } - if (bDrawNext) - { - Rectangle aOutRect = maNextRect; - aOutRect.Left() += 3; - aOutRect.Top() += 3; - aOutRect.Right() -= 3; - aOutRect.Bottom() -= 3; - ImplDrawSpinArrow(rRenderContext, aOutRect, false); - } + Rectangle aOutRect = maNextRect; + aOutRect.Left() += 3; + aOutRect.Top() += 3; + aOutRect.Right() -= 3; + aOutRect.Bottom() -= 3; + ImplDrawSpinArrow(rRenderContext, aOutRect, false); } void Calendar::ImplDrawDate(vcl::RenderContext& rRenderContext, @@ -1982,8 +1976,7 @@ void Calendar::EndSelection() } } -Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, - long nCalcLines ) const +Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine ) const { OUString a99Text("99"); vcl::Font aOldFont = GetFont(); @@ -2026,7 +2019,6 @@ Size Calendar::CalcWindowSizePixel( long nCalcMonthPerLine, aSize.Height() += nTextHeight + WEEKDAY_OFFY; aSize.Height() += ((nTextHeight+DAY_OFFY)*6); aSize.Height() += MONTH_OFFY; - aSize.Height() *= nCalcLines; return aSize; } diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index 6697d3fb3db7..48f3fb72c047 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -492,10 +492,10 @@ Color ImpLineListData::GetColorDist( const Color& rMain, const Color& rDefault ) return ( *m_pColorDistFn )( rMain, rDefault ); } -sal_uInt16 LineListBox::GetSelectEntryStyle( sal_Int32 nSelIndex ) const +sal_uInt16 LineListBox::GetSelectEntryStyle() const { sal_uInt16 nStyle = css::table::BorderLineStyle::SOLID; - sal_Int32 nPos = GetSelectEntryPos( nSelIndex ); + sal_Int32 nPos = GetSelectEntryPos(); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { if (!m_sNone.isEmpty()) @@ -962,9 +962,9 @@ void FontNameBox::dispose() ComboBox::dispose(); } -void FontNameBox::SaveMRUEntries( const OUString& aFontMRUEntriesFile, sal_Unicode cSep ) const +void FontNameBox::SaveMRUEntries( const OUString& aFontMRUEntriesFile ) const { - OString aEntries(OUStringToOString(GetMRUEntries(cSep), + OString aEntries(OUStringToOString(GetMRUEntries(), RTL_TEXTENCODING_UTF8)); if (aEntries.isEmpty() || aFontMRUEntriesFile.isEmpty()) @@ -983,7 +983,7 @@ void FontNameBox::SaveMRUEntries( const OUString& aFontMRUEntriesFile, sal_Unico aStream.WriteLine( OString() ); } -void FontNameBox::LoadMRUEntries( const OUString& aFontMRUEntriesFile, sal_Unicode cSep ) +void FontNameBox::LoadMRUEntries( const OUString& aFontMRUEntriesFile ) { if( aFontMRUEntriesFile.isEmpty() ) return; @@ -999,7 +999,7 @@ void FontNameBox::LoadMRUEntries( const OUString& aFontMRUEntriesFile, sal_Unico aStream.ReadLine( aLine ); OUString aEntries = OStringToOUString(aLine, RTL_TEXTENCODING_UTF8); - SetMRUEntries( aEntries, cSep ); + SetMRUEntries( aEntries ); } void FontNameBox::InitFontMRUEntriesFile() diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx index 987ad98d3dc2..31aa1c8e5844 100644 --- a/svtools/source/control/fmtfield.cxx +++ b/svtools/source/control/fmtfield.cxx @@ -1010,9 +1010,9 @@ void FormattedField::Last() SpinField::Last(); } -void FormattedField::UseInputStringForFormatting( bool bUseInputStr /* = true */ ) +void FormattedField::UseInputStringForFormatting() { - m_bUseInputStringForFormatting = bUseInputStr; + m_bUseInputStringForFormatting = true; } diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index de94b791eadf..a275af78dafd 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -295,11 +295,10 @@ RoadmapItem* ORoadmap::InsertHyperLabel(ItemIndex _Index, const OUString& _sLabe return pItem; } -void ORoadmap::SetRoadmapBitmap(const BitmapEx& _rBmp, bool _bInvalidate) +void ORoadmap::SetRoadmapBitmap(const BitmapEx& _rBmp) { m_pImpl->setPicture( _rBmp ); - if ( _bInvalidate ) - Invalidate( ); + Invalidate( ); } void ORoadmap::SetRoadmapInteractive(bool _bInteractive) @@ -406,22 +405,22 @@ bool ORoadmap::IsRoadmapComplete() const return m_pImpl->isComplete(); } -void ORoadmap::EnableRoadmapItem( ItemId _nItemId, bool _bEnable, ItemIndex _nStartIndex ) +void ORoadmap::EnableRoadmapItem( ItemId _nItemId, bool _bEnable ) { - RoadmapItem* pItem = GetByID( _nItemId, _nStartIndex ); + RoadmapItem* pItem = GetByID( _nItemId ); if ( pItem != nullptr ) pItem->Enable( _bEnable ); } -void ORoadmap::ChangeRoadmapItemLabel( ItemId _nID, const OUString& _sLabel, ItemIndex _nStartIndex ) +void ORoadmap::ChangeRoadmapItemLabel( ItemId _nID, const OUString& _sLabel ) { - RoadmapItem* pItem = GetByID( _nID, _nStartIndex ); + RoadmapItem* pItem = GetByID( _nID ); if ( pItem != nullptr ) { pItem->Update( pItem->GetIndex(), _sLabel ); const HL_Vector& rItems = m_pImpl->getHyperLabels(); - for ( HL_Vector::const_iterator i = rItems.begin() + _nStartIndex; + for ( HL_Vector::const_iterator i = rItems.begin(); i != rItems.end(); ++i ) @@ -431,9 +430,9 @@ void ORoadmap::ChangeRoadmapItemLabel( ItemId _nID, const OUString& _sLabel, Ite } } -void ORoadmap::ChangeRoadmapItemID(ItemId _nID, ItemId _NewID, ItemIndex _nStartIndex) +void ORoadmap::ChangeRoadmapItemID(ItemId _nID, ItemId _NewID) { - RoadmapItem* pItem = GetByID( _nID, _nStartIndex ); + RoadmapItem* pItem = GetByID( _nID ); if ( pItem != nullptr ) pItem->SetID( _NewID ); } @@ -454,9 +453,9 @@ RoadmapItem* ORoadmap::GetByID(ItemId _nID, ItemIndex _nStartIndex) return nullptr; } -const RoadmapItem* ORoadmap::GetByID(ItemId _nID, ItemIndex _nStartIndex) const +const RoadmapItem* ORoadmap::GetByID(ItemId _nID) const { - return const_cast< ORoadmap* >( this )->GetByID( _nID, _nStartIndex ); + return const_cast< ORoadmap* >( this )->GetByID( _nID ); } RoadmapItem* ORoadmap::GetByIndex(ItemIndex _nItemIndex) diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index 66a0aad73276..23ae4517ee7e 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -739,15 +739,15 @@ void ToolbarMenu::appendEntry( int nEntryId, const OUString& rStr, MenuItemBits } -void ToolbarMenu::appendEntry( int nEntryId, const OUString& rStr, const Image& rImage, MenuItemBits nItemBits ) +void ToolbarMenu::appendEntry( int nEntryId, const OUString& rStr, const Image& rImage ) { - appendEntry( new ToolbarMenuEntry( *this, nEntryId, rImage, rStr, nItemBits ) ); + appendEntry( new ToolbarMenuEntry( *this, nEntryId, rImage, rStr, MenuItemBits::NONE ) ); } -void ToolbarMenu::appendEntry( int nEntryId, Control* pControl, MenuItemBits nItemBits ) +void ToolbarMenu::appendEntry( int nEntryId, Control* pControl ) { - appendEntry( new ToolbarMenuEntry( *this, nEntryId, pControl, nItemBits ) ); + appendEntry( new ToolbarMenuEntry( *this, nEntryId, pControl, MenuItemBits::NONE ) ); } diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index fe799ff8cf68..556089bb1cf9 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -1053,7 +1053,7 @@ bool ValueSet::ImplScroll(const Point& rPos) return true; } -size_t ValueSet::ImplGetItem( const Point& rPos, bool bMove ) const +size_t ValueSet::ImplGetItem( const Point& rPos ) const { if (!mbHasVisibleItems) { @@ -1085,13 +1085,6 @@ size_t ValueSet::ImplGetItem( const Point& rPos, bool bMove ) const return item; } } - - // return the previously selected item if spacing is set and - // the mouse hasn't left the window yet - if (bMove && mnSpacing && mnHighItemId) - { - return GetItemPos( mnHighItemId ); - } } return VALUESET_ITEM_NOTFOUND; @@ -1597,13 +1590,13 @@ void ValueSet::UserDraw( const UserDrawEvent& ) { } -void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage, size_t nPos ) +void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage ) { ValueSetItem* pItem = new ValueSetItem( *this ); pItem->mnId = nItemId; pItem->meType = VALUESETITEM_IMAGE; pItem->maImage = rImage; - ImplInsertItem( pItem, nPos ); + ImplInsertItem( pItem, VALUESET_APPEND ); } void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage, @@ -1619,14 +1612,14 @@ void ValueSet::InsertItem( sal_uInt16 nItemId, const Image& rImage, } void ValueSet::InsertItem( sal_uInt16 nItemId, const Color& rColor, - const OUString& rText, size_t nPos ) + const OUString& rText ) { ValueSetItem* pItem = new ValueSetItem( *this ); pItem->mnId = nItemId; pItem->meType = VALUESETITEM_COLOR; pItem->maColor = rColor; pItem->maText = rText; - ImplInsertItem( pItem, nPos ); + ImplInsertItem( pItem, VALUESET_APPEND ); } void ValueSet::InsertItem( sal_uInt16 nItemId, size_t nPos ) @@ -2162,9 +2155,9 @@ void ValueSet::EndSelection() mbSelection = false; } -void ValueSet::SetFormat(bool bFormat) +void ValueSet::SetFormat() { - mbFormat = bFormat; + mbFormat = true; } void ValueSet::StartDrag( const CommandEvent& rEvent, vcl::Region& rRegion ) @@ -2279,7 +2272,7 @@ Size ValueSet::CalcWindowSizePixel( const Size& rItemSize, sal_uInt16 nDesireCol return aSize; } -Size ValueSet::CalcItemSizePixel( const Size& rItemSize, bool bOut ) const +Size ValueSet::CalcItemSizePixel( const Size& rItemSize) const { Size aSize = rItemSize; @@ -2293,16 +2286,8 @@ Size ValueSet::CalcItemSizePixel( const Size& rItemSize, bool bOut ) const else n = ITEM_OFFSET; - if ( bOut ) - { - aSize.Width() += n; - aSize.Height() += n; - } - else - { - aSize.Width() -= n; - aSize.Height() -= n; - } + aSize.Width() += n; + aSize.Height() += n; } return aSize; diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index b39fba449589..14407ac5a2d4 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -505,28 +505,24 @@ namespace svt } - void OWizardMachine::skip(sal_Int32 _nSteps) + void OWizardMachine::skip() { - DBG_ASSERT(_nSteps > 0, "OWizardMachine::skip: invalid number of steps!"); // allowed to leave the current page? if ( !prepareLeaveCurrentState( eTravelForward ) ) return; WizardState nCurrentState = getCurrentState(); WizardState nNextState = determineNextState(nCurrentState); - // loop _nSteps steps - while (_nSteps-- > 0) - { - if (WZS_INVALID_STATE == nNextState) - return; - // remember the skipped state in the history - m_pImpl->aStateHistory.push(nCurrentState); + if (WZS_INVALID_STATE == nNextState) + return; - // get the next state - nCurrentState = nNextState; - nNextState = determineNextState(nCurrentState); - } + // remember the skipped state in the history + m_pImpl->aStateHistory.push(nCurrentState); + + // get the next state + nCurrentState = nNextState; + nNextState = determineNextState(nCurrentState); // show the (n+1)th page if (!ShowPage(nCurrentState)) @@ -615,9 +611,9 @@ namespace svt } - void OWizardMachine::enableAutomaticNextButtonState( bool _bEnable ) + void OWizardMachine::enableAutomaticNextButtonState() { - m_pImpl->m_bAutoNextButtonState = _bEnable; + m_pImpl->m_bAutoNextButtonState = true; } diff --git a/svtools/source/edit/svmedit2.cxx b/svtools/source/edit/svmedit2.cxx index 533a6f7ee394..86ccf9b8737f 100644 --- a/svtools/source/edit/svmedit2.cxx +++ b/svtools/source/edit/svmedit2.cxx @@ -26,7 +26,7 @@ ExtMultiLineEdit::ExtMultiLineEdit( vcl::Window* pParent, WinBits nWinStyle ) : { } -void ExtMultiLineEdit::InsertText( const OUString& rNew, bool ) +void ExtMultiLineEdit::InsertText( const OUString& rNew ) { GetTextView()->InsertText( rNew ); } diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index c93cd2f51b3a..0f3a9d031f54 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -190,7 +190,7 @@ private: void SetNodeBmpTabDistance(); // Selection-Engine - SvTreeListEntry* MakePointVisible( const Point& rPoint, bool bNotifyScroll=true ); + SvTreeListEntry* MakePointVisible( const Point& rPoint ); void SetAnchorSelection( SvTreeListEntry* pOld, SvTreeListEntry* pNewCursor ); diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx index 4efd3d8de961..00b29182ae53 100644 --- a/svtools/source/misc/embedhlp.cxx +++ b/svtools/source/misc/embedhlp.cxx @@ -443,7 +443,7 @@ void EmbeddedObjectRef::GetReplacement( bool bUpdate ) } } -const Graphic* EmbeddedObjectRef::GetGraphic( OUString* pMediaType ) const +const Graphic* EmbeddedObjectRef::GetGraphic() const { try { @@ -458,8 +458,6 @@ const Graphic* EmbeddedObjectRef::GetGraphic( OUString* pMediaType ) const SAL_WARN("svtools.misc", "Something went wrong on getting the graphic: " << ex.Message); } - if ( mpImpl->pGraphic && pMediaType ) - *pMediaType = mpImpl->aMediaType; return mpImpl->pGraphic; } diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index 07b02bbb9ef8..bbc70f48d3bc 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -595,11 +595,11 @@ Image SvFileInformationManager::GetImage( const INetURLObject& rObject, bool bBi return GetImageFromList_Impl( nImage, bBig ); } -Image SvFileInformationManager::GetFileImage( const INetURLObject& rObject, bool bBig ) +Image SvFileInformationManager::GetFileImage( const INetURLObject& rObject ) { sal_Int16 nImage = GetImageId_Impl( rObject, false ); DBG_ASSERT( nImage, "invalid ImageId" ); - return GetImageFromList_Impl( nImage, bBig ); + return GetImageFromList_Impl( nImage, false/*bBig*/ ); } Image SvFileInformationManager::GetImageNoDefault( const INetURLObject& rObject, bool bBig ) @@ -613,7 +613,7 @@ Image SvFileInformationManager::GetImageNoDefault( const INetURLObject& rObject, return GetImageFromList_Impl( nImage, bBig ); } -Image SvFileInformationManager::GetFolderImage( const svtools::VolumeInfo& rInfo, bool bBig ) +Image SvFileInformationManager::GetFolderImage( const svtools::VolumeInfo& rInfo ) { sal_uInt16 nImage = IMG_FOLDER; DBG_ASSERT( nImage, "invalid ImageId" ); @@ -627,7 +627,7 @@ Image SvFileInformationManager::GetFolderImage( const svtools::VolumeInfo& rInfo else if ( rInfo.m_bIsVolume ) nImage = IMG_FIXEDDEV; - return GetImageFromList_Impl( nImage, bBig ); + return GetImageFromList_Impl( nImage, false/*bBig*/ ); } OUString SvFileInformationManager::GetDescription( const INetURLObject& rObject ) diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index d8d0ea386ab5..72c7bcbfb380 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -812,15 +812,15 @@ namespace svt } - bool TemplateFolderCache::needsUpdate( bool _bForceCheck ) + bool TemplateFolderCache::needsUpdate() { - return m_pImpl->needsUpdate( _bForceCheck ); + return m_pImpl->needsUpdate( false/*_bForceCheck*/ ); } - void TemplateFolderCache::storeState( bool _bForceRetrieval ) + void TemplateFolderCache::storeState() { - m_pImpl->storeState( _bForceRetrieval ); + m_pImpl->storeState( false/*_bForceRetrieval*/ ); } diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index d4761afd9672..81dd5dc34ee0 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -2177,8 +2177,7 @@ TransferableDataHelper TransferableDataHelper::CreateFromSelection( vcl::Window* bool TransferableDataHelper::IsEqual( const css::datatransfer::DataFlavor& rInternalFlavor, - const css::datatransfer::DataFlavor& rRequestFlavor, - bool ) + const css::datatransfer::DataFlavor& rRequestFlavor ) { Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); bool bRet = false; diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx index 444476b4a66b..f1c98bafb8da 100644 --- a/svtools/source/misc/transfer2.cxx +++ b/svtools/source/misc/transfer2.cxx @@ -525,11 +525,11 @@ bool TransferDataContainer::HasAnyData() const void TransferDataContainer::StartDrag( vcl::Window* pWindow, sal_Int8 nDragSourceActions, - const Link<sal_Int8,void>& rLnk, sal_Int32 nDragPointer, sal_Int32 nDragImage ) + const Link<sal_Int8,void>& rLnk, sal_Int32 nDragPointer ) { pImpl->aFinshedLnk = rLnk; TransferableHelper::StartDrag( pWindow, nDragSourceActions, - nDragPointer, nDragImage ); + nDragPointer ); } diff --git a/svtools/source/misc/unitconv.cxx b/svtools/source/misc/unitconv.cxx index dd13dad23701..e710e8d254f5 100644 --- a/svtools/source/misc/unitconv.cxx +++ b/svtools/source/misc/unitconv.cxx @@ -79,26 +79,23 @@ void SetFieldUnit( MetricField& rField, FieldUnit eUnit, bool bAll ) } -void SetFieldUnit( MetricBox& rBox, FieldUnit eUnit, bool bAll ) +void SetFieldUnit( MetricBox& rBox, FieldUnit eUnit ) { sal_Int64 nMin = rBox.Denormalize( rBox.GetMin( FUNIT_TWIP ) ); sal_Int64 nMax = rBox.Denormalize( rBox.GetMax( FUNIT_TWIP ) ); - if ( !bAll ) + switch ( eUnit ) { - switch ( eUnit ) - { - case FUNIT_M: - case FUNIT_KM: - eUnit = FUNIT_CM; - break; + case FUNIT_M: + case FUNIT_KM: + eUnit = FUNIT_CM; + break; - case FUNIT_FOOT: - case FUNIT_MILE: - eUnit = FUNIT_INCH; - break; - default: ;//prevent warning - } + case FUNIT_FOOT: + case FUNIT_MILE: + eUnit = FUNIT_INCH; + break; + default: ;//prevent warning } rBox.SetUnit( eUnit ); @@ -107,11 +104,8 @@ void SetFieldUnit( MetricBox& rBox, FieldUnit eUnit, bool bAll ) else rBox.SetDecimalDigits( 2 ); - if ( !bAll ) - { - rBox.SetMin( rBox.Normalize( nMin ), FUNIT_TWIP ); - rBox.SetMax( rBox.Normalize( nMax ), FUNIT_TWIP ); - } + rBox.SetMin( rBox.Normalize( nMin ), FUNIT_TWIP ); + rBox.SetMax( rBox.Normalize( nMax ), FUNIT_TWIP ); } diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index c90552947704..4347544582d8 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -558,8 +558,7 @@ SvStream& HTMLOutFuncs::FlushToAscii( SvStream& rStream, return rStream; } -SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLen, - rtl_TextEncoding ) +SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLen ) { // in einen Stream aus sal_Char aNToABuf[] = "0000000000000000"; diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx index bdc73d363970..f5a73b6b0a6a 100644 --- a/svtools/source/svrtf/parrtf.cxx +++ b/svtools/source/svrtf/parrtf.cxx @@ -304,8 +304,9 @@ sal_Unicode SvRTFParser::GetHexValue() return nHexVal; } -void SvRTFParser::ScanText( const sal_Unicode cBreak ) +void SvRTFParser::ScanText() { + const sal_Unicode cBreak = 0; OUStringBuffer aStrBuffer; bool bContinue = true; while( bContinue && IsParserWorking() && aStrBuffer.getLength() < MAX_STRING_LEN) diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index a43b78fb58a9..b46e0adb1257 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -339,7 +339,7 @@ namespace svt { namespace table } - OUString TableControl::GetAccessibleObjectDescription( AccessibleTableControlObjType eObjType, sal_Int32 ) const + OUString TableControl::GetAccessibleObjectDescription( AccessibleTableControlObjType eObjType ) const { OUString aRetText; switch( eObjType ) @@ -510,9 +510,9 @@ namespace svt { namespace table } - Reference< XAccessible > TableControl::GetAccessible( bool bCreate ) + Reference< XAccessible > TableControl::GetAccessible() { - return Control::GetAccessible( bCreate ); + return Control::GetAccessible(); } @@ -616,9 +616,8 @@ namespace svt { namespace table } - Rectangle TableControl::calcHeaderRect(bool _bIsColumnBar, bool _bOnScreen) + Rectangle TableControl::calcHeaderRect(bool _bIsColumnBar ) { - (void)_bOnScreen; return m_pImpl->calcHeaderRect( !_bIsColumnBar ); } @@ -629,9 +628,8 @@ namespace svt { namespace table } - Rectangle TableControl::calcTableRect(bool _bOnScreen) + Rectangle TableControl::calcTableRect() { - (void)_bOnScreen; return m_pImpl->calcTableRect(); } |