summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-01 15:43:18 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-04 12:03:33 +0000
commitecdf7aaede66c209fa5c101c0435322a765f02ee (patch)
treec6bd3812c3d3d67b71644e0e9b3d474f1dd0f455
parent3979afceecb98780549fda60c7f75c8015bb33d8 (diff)
loplugin:constantparam in svtools
Change-Id: Iceb1b57997e0369946150ef0764b71da59a6b7a6 Reviewed-on: https://gerrit.libreoffice.org/23725 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--include/svtools/breadcrumb.hxx2
-rw-r--r--include/svtools/calendar.hxx4
-rw-r--r--include/svtools/editbrowsebox.hxx6
-rw-r--r--include/svtools/filectrl.hxx14
-rw-r--r--include/svtools/headbar.hxx6
-rw-r--r--include/svtools/ivctrl.hxx7
-rw-r--r--include/svtools/scrwin.hxx2
-rw-r--r--include/svtools/treelistbox.hxx1
-rw-r--r--starmath/source/view.cxx2
-rw-r--r--svtools/source/brwbox/brwbox2.cxx4
-rw-r--r--svtools/source/brwbox/datwin.cxx10
-rw-r--r--svtools/source/brwbox/datwin.hxx3
-rw-r--r--svtools/source/brwbox/ebbcontrols.cxx12
-rw-r--r--svtools/source/contnr/imivctl.hxx5
-rw-r--r--svtools/source/contnr/imivctl1.cxx24
-rw-r--r--svtools/source/contnr/treelistbox.cxx8
-rw-r--r--svtools/source/control/breadcrumb.cxx2
-rw-r--r--svtools/source/control/calendar.cxx21
-rw-r--r--svtools/source/control/filectrl.cxx10
-rw-r--r--svtools/source/control/headbar.cxx21
-rw-r--r--svtools/source/control/scrwin.cxx4
-rw-r--r--svtools/source/table/tablegeometry.cxx5
-rw-r--r--svtools/source/table/tablegeometry.hxx6
-rw-r--r--svtools/source/uno/treecontrolpeer.cxx7
-rw-r--r--svtools/source/uno/treecontrolpeer.hxx2
25 files changed, 60 insertions, 128 deletions
diff --git a/include/svtools/breadcrumb.hxx b/include/svtools/breadcrumb.hxx
index e87ab6831dff..ac109ecbbfcd 100644
--- a/include/svtools/breadcrumb.hxx
+++ b/include/svtools/breadcrumb.hxx
@@ -49,7 +49,7 @@ class SVT_DLLPUBLIC Breadcrumb : public VclHBox
DECL_LINK_TYPED( ClickLinkHdl, FixedHyperlink&, void );
public:
- Breadcrumb( vcl::Window* pParent, WinBits nWinStyle = 0 );
+ Breadcrumb( vcl::Window* pParent );
virtual ~Breadcrumb();
void dispose() override;
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index 362019ecd8fe..029afb2752cf 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -227,8 +227,8 @@ private:
SVT_DLLPRIVATE void ImplDrawSpin(vcl::RenderContext& rRenderContext);
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,
- bool bOther = false, sal_uLong nToday = 0);
+ DayOfWeek eDayOfWeek,
+ bool bOther, sal_uLong nToday);
SVT_DLLPRIVATE void ImplDraw(vcl::RenderContext& rRenderContext);
SVT_DLLPRIVATE void ImplUpdateDate( const Date& rDate );
SVT_DLLPRIVATE void ImplUpdateSelection( IntDateSet* pOld );
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index 7af671faf9ab..d28511e49250 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -283,7 +283,7 @@ namespace svt
Link<LinkParamNone*,void> m_aModifyLink;
public:
- CheckBoxControl(vcl::Window* pParent, WinBits nWinStyle = 0);
+ CheckBoxControl(vcl::Window* pParent);
virtual ~CheckBoxControl();
virtual void dispose() override;
@@ -332,7 +332,7 @@ namespace svt
friend class ComboBoxCellController;
public:
- ComboBoxControl(vcl::Window* pParent, WinBits nWinStyle = 0);
+ ComboBoxControl(vcl::Window* pParent);
protected:
virtual bool PreNotify( NotifyEvent& rNEvt ) override;
@@ -365,7 +365,7 @@ namespace svt
friend class ListBoxCellController;
public:
- ListBoxControl(vcl::Window* pParent, WinBits nWinStyle = 0);
+ ListBoxControl(vcl::Window* pParent);
protected:
virtual bool PreNotify( NotifyEvent& rNEvt ) override;
diff --git a/include/svtools/filectrl.hxx b/include/svtools/filectrl.hxx
index 14fe9466a84f..1c677e82487c 100644
--- a/include/svtools/filectrl.hxx
+++ b/include/svtools/filectrl.hxx
@@ -28,17 +28,6 @@
#define STR_FILECTRL_BUTTONTEXT 333 // ID-Range?!
-// Flags for FileControl
-enum class FileControlMode
-{
- NONE = 0x00,
- RESIZEBUTTONBYPATHLEN = 0x01, //if this is set, the button will become small as soon as the Text in the Edit Field is to long to be shown completely
-};
-namespace o3tl
-{
- template<> struct typed_flags<FileControlMode> : is_typed_flags<FileControlMode, 0x01> {};
-}
-
// Flags for internal use of FileControl
enum class FileControlMode_Internal
{
@@ -60,7 +49,6 @@ private:
OUString maButtonText;
bool mbOpenDlg;
- FileControlMode mnFlags;
FileControlMode_Internal mnInternalFlags;
private:
@@ -74,7 +62,7 @@ protected:
DECL_DLLPRIVATE_LINK_TYPED( ButtonHdl, Button*, void );
public:
- FileControl( vcl::Window* pParent, WinBits nStyle, FileControlMode = FileControlMode::NONE );
+ FileControl( vcl::Window* pParent, WinBits nStyle );
virtual ~FileControl();
virtual void dispose() override;
diff --git a/include/svtools/headbar.hxx b/include/svtools/headbar.hxx
index 60f05ec53882..8ebef5e9b6ee 100644
--- a/include/svtools/headbar.hxx
+++ b/include/svtools/headbar.hxx
@@ -256,10 +256,10 @@ private:
using Window::ImplHitTest;
SVT_DLLPRIVATE sal_uInt16 ImplHitTest( const Point& rPos, long& nMouseOff, sal_uInt16& nPos ) const;
SVT_DLLPRIVATE void ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos );
- SVT_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh, bool bDrag,
+ SVT_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh,
const Rectangle& rItemRect, const Rectangle* pRect, DrawFlags nFlags);
- SVT_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh = false,
- bool bDrag = false, const Rectangle* pRect = nullptr);
+ SVT_DLLPRIVATE void ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh,
+ const Rectangle* pRect);
SVT_DLLPRIVATE void ImplUpdate( sal_uInt16 nPos,
bool bEnd = false );
SVT_DLLPRIVATE void ImplStartDrag( const Point& rPos, bool bCommand );
diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx
index 0e5896512066..2f37b12b01ab 100644
--- a/include/svtools/ivctrl.hxx
+++ b/include/svtools/ivctrl.hxx
@@ -153,12 +153,11 @@ class SvxIconChoiceCtrlColumnInfo
Image aColImage;
long nWidth;
SvxIconChoiceCtrlColumnAlign eAlignment;
- sal_uInt16 nSubItem;
+ sal_uInt16 nSubItem;
public:
- SvxIconChoiceCtrlColumnInfo( sal_uInt16 nSub, long nWd,
- SvxIconChoiceCtrlColumnAlign eAlign ) :
- nWidth( nWd ), eAlignment( eAlign ), nSubItem( nSub ) {}
+ SvxIconChoiceCtrlColumnInfo( long nWd ) :
+ nWidth( nWd ), eAlignment( IcnViewAlignLeft ), nSubItem( 0 ) {}
SvxIconChoiceCtrlColumnInfo( const SvxIconChoiceCtrlColumnInfo& );
void SetWidth( long nWd ) { nWidth = nWd; }
diff --git a/include/svtools/scrwin.hxx b/include/svtools/scrwin.hxx
index 05ba486195a9..0a67f288290d 100644
--- a/include/svtools/scrwin.hxx
+++ b/include/svtools/scrwin.hxx
@@ -62,7 +62,7 @@ private:
DECL_DLLPRIVATE_LINK_TYPED( EndScrollHdl, ScrollBar *, void );
public:
- ScrollableWindow( vcl::Window* pParent, WinBits nBits = 0,
+ ScrollableWindow( vcl::Window* pParent,
ScrollableWindowFlags = ScrollableWindowFlags::DEFAULT );
virtual ~ScrollableWindow();
virtual void dispose() override;
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 8375dbd757b6..75f27ba02f1b 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -318,7 +318,6 @@ protected:
// In-place editing
SvInplaceEdit2* pEdCtrl;
void EditText( const OUString&, const Rectangle&,const Selection&);
- void EditText( const OUString&, const Rectangle&,const Selection&, bool bMulti);
void CancelTextEditing();
bool EditingCanceled() const;
bool IsEmptyTextAllowed() const;
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 860f4a8c2582..65104000332e 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -95,7 +95,7 @@ using namespace css::accessibility;
using namespace css::uno;
SmGraphicWindow::SmGraphicWindow(SmViewShell* pShell)
- : ScrollableWindow(&pShell->GetViewFrame()->GetWindow(), 0)
+ : ScrollableWindow(&pShell->GetViewFrame()->GetWindow())
, pAccessible(nullptr)
, pViewShell(pShell)
, nZoom(100)
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index e7e0279cd3fc..486771523e3e 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -615,7 +615,7 @@ void BrowseBox::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
{
ButtonFrame aButtonFrame( Point( nX, 0 ),
Size( pCol->Width()-1, GetTitleHeight()-1 ),
- pCol->Title(), false, !IsEnabled());
+ pCol->Title(), !IsEnabled());
aButtonFrame.Draw(rRenderContext);
rRenderContext.DrawLine(Point(nX + pCol->Width() - 1, 0),
Point(nX + pCol->Width() - 1, GetTitleHeight() - 1));
@@ -739,7 +739,7 @@ void BrowseBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
{
ButtonFrame aButtonFrame( aRealPos,
Size( pFirstCol->Width()-1, nTitleHeight-1 ),
- pFirstCol->Title(), false, !IsEnabled());
+ pFirstCol->Title(), !IsEnabled());
aButtonFrame.Draw( *pDev );
pDev->Push( PushFlags::LINECOLOR );
diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx
index 1efb9f43a48f..df66e02eabc8 100644
--- a/svtools/source/brwbox/datwin.cxx
+++ b/svtools/source/brwbox/datwin.cxx
@@ -89,14 +89,6 @@ void ButtonFrame::Draw( OutputDevice& rDev )
rDev.SetTextColor(aOldColor);
}
- if ( bCurs )
- {
- rDev.SetLineColor( Color( COL_BLACK ) );
- rDev.SetFillColor();
- rDev.DrawRect( Rectangle(
- Point( aRect.Left(), aRect.Top() ), Point( aRect.Right(), aRect.Bottom() ) ) );
- }
-
rDev.SetLineColor( aOldLineColor );
rDev.SetFillColor( aOldFillColor );
}
@@ -146,7 +138,7 @@ void BrowserColumn::Draw( BrowseBox& rBox, OutputDevice& rDev, const Point& rPos
{
// paint handle column
ButtonFrame( rPos, Size( Width()-1, rBox.GetDataRowHeight()-1 ),
- "", false/*bCurs*/, false ).Draw( rDev );
+ "", false ).Draw( rDev );
Color aOldLineColor = rDev.GetLineColor();
rDev.SetLineColor( Color( COL_BLACK ) );
rDev.DrawLine(
diff --git a/svtools/source/brwbox/datwin.hxx b/svtools/source/brwbox/datwin.hxx
index ecb4bbe12f7b..b320138bbfba 100644
--- a/svtools/source/brwbox/datwin.hxx
+++ b/svtools/source/brwbox/datwin.hxx
@@ -39,20 +39,17 @@ class ButtonFrame
Rectangle aInnerRect;
OUString aText;
bool bPressed;
- bool bCurs;
bool m_bDrawDisabled;
public:
ButtonFrame( const Point& rPt, const Size& rSz,
const OUString &rText,
- bool bCursor,
bool _bDrawDisabled)
:aRect( rPt, rSz )
,aInnerRect( Point( aRect.Left()+1, aRect.Top()+1 ),
Size( aRect.GetWidth()-2, aRect.GetHeight()-2 ) )
,aText(rText)
,bPressed(false)
- ,bCurs(bCursor)
,m_bDrawDisabled(_bDrawDisabled)
{
}
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index ef1974a2f149..1f7a413b8e2f 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -30,8 +30,8 @@ namespace svt
//= ComboBoxControl
- ComboBoxControl::ComboBoxControl(vcl::Window* pParent, WinBits nWinStyle)
- :ComboBox(pParent, nWinStyle|WB_DROPDOWN|WB_NOBORDER)
+ ComboBoxControl::ComboBoxControl(vcl::Window* pParent)
+ :ComboBox(pParent, WB_DROPDOWN|WB_NOBORDER)
{
EnableAutoSize(false);
EnableAutocomplete(true);
@@ -126,8 +126,8 @@ namespace svt
}
//= ListBoxControl
- ListBoxControl::ListBoxControl(vcl::Window* pParent, WinBits nWinStyle)
- :ListBox(pParent, nWinStyle|WB_DROPDOWN|WB_NOBORDER)
+ ListBoxControl::ListBoxControl(vcl::Window* pParent)
+ :ListBox(pParent, WB_DROPDOWN|WB_NOBORDER)
{
EnableAutoSize(false);
EnableMultiSelection(false);
@@ -215,8 +215,8 @@ namespace svt
//= CheckBoxControl
- CheckBoxControl::CheckBoxControl(vcl::Window* pParent, WinBits nWinStyle)
- :Control(pParent, nWinStyle)
+ CheckBoxControl::CheckBoxControl(vcl::Window* pParent)
+ :Control(pParent, 0)
{
const Wallpaper& rParentBackground = pParent->GetBackground();
if ( (pParent->GetStyle() & WB_CLIPCHILDREN) || rParentBackground.IsFixed() )
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx
index d5e251399077..9094b0ec6f29 100644
--- a/svtools/source/contnr/imivctl.hxx
+++ b/svtools/source/contnr/imivctl.hxx
@@ -405,9 +405,8 @@ public:
}
static bool IsBoundingRectValid( const Rectangle& rRect ) { return ( rRect.Right() != LONG_MAX ); }
- void PaintEmphasis(const Rectangle& rRect1, const Rectangle& rRect2, bool bSelected,
- bool bDropTarget, bool bCursored, vcl::RenderContext& rRenderContext,
- bool bIsBackgroundPainted = false);
+ void PaintEmphasis(const Rectangle& rRect1, bool bSelected,
+ bool bDropTarget, bool bCursored, vcl::RenderContext& rRenderContext );
void PaintItem(const Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry,
sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext);
diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx
index 794fdfca4fbb..0629b613a138 100644
--- a/svtools/source/contnr/imivctl1.cxx
+++ b/svtools/source/contnr/imivctl1.cxx
@@ -232,7 +232,7 @@ void SvxIconChoiceCtrl_Impl::SetStyle( WinBits nWinStyle )
if( (nWinStyle & WB_DETAILS))
{
if (!m_pColumns)
- SetColumn( 0, SvxIconChoiceCtrlColumnInfo( 0, 100, IcnViewAlignLeft ));
+ SetColumn( 0, SvxIconChoiceCtrlColumnInfo( 100 ));
}
}
@@ -1503,8 +1503,8 @@ void SvxIconChoiceCtrl_Impl::SetUpdateMode( bool bUpdate )
}
// priorities of the emphasis: bDropTarget => bCursored => bSelected
-void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, const Rectangle& rImageRect, bool bSelected,
- bool bDropTarget, bool bCursored, vcl::RenderContext& rRenderContext, bool bIsBackgroundPainted)
+void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, bool bSelected,
+ bool bDropTarget, bool bCursored, vcl::RenderContext& rRenderContext)
{
static Color aTransparent(COL_TRANSPARENT);
@@ -1512,13 +1512,11 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, const Rec
Color aOldFillColor(rRenderContext.GetFillColor());
bool bSolidTextRect = false;
- bool bSolidImageRect = false;
if(bDropTarget && (eSelectionMode != NO_SELECTION))
{
rRenderContext.SetFillColor(rSettings.GetHighlightColor());
bSolidTextRect = true;
- bSolidImageRect = true;
}
else
{
@@ -1532,12 +1530,7 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, const Rec
}
// draw text rectangle
- if (!bSolidTextRect)
- {
- if (!bIsBackgroundPainted)
- rRenderContext.Erase(rTextRect);
- }
- else
+ if (bSolidTextRect)
{
Color aOldLineColor;
if (bCursored)
@@ -1550,13 +1543,6 @@ void SvxIconChoiceCtrl_Impl::PaintEmphasis(const Rectangle& rTextRect, const Rec
rRenderContext.SetLineColor(aOldLineColor);
}
- // draw image rectangle
- if (!bSolidImageRect)
- {
- if (!bIsBackgroundPainted)
- rRenderContext.Erase(rImageRect);
- }
-
rRenderContext.SetFillColor(aOldFillColor);
}
@@ -1669,7 +1655,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po
sal_uInt16 nTextPaintFlags = bLargeIconMode ? PAINTFLAG_HOR_CENTERED : PAINTFLAG_VER_CENTERED;
if( !bNoEmphasis )
- PaintEmphasis(aTextRect, aBmpRect, bSelected, bDropTarget, bCursored, rRenderContext, true/*bIsBackgroundPainted*/);
+ PaintEmphasis(aTextRect, bSelected, bDropTarget, bCursored, rRenderContext);
if ( bShowSelection )
vcl::RenderTools::DrawSelectionBackground(rRenderContext, *pView.get(), CalcFocusRect(pEntry),
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 821e2e5ddc30..025fabf1dc3b 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -967,12 +967,6 @@ void SvTreeListBox::EnableSelectionAsDropTarget( bool bEnable )
void SvTreeListBox::EditText( const OUString& rStr, const Rectangle& rRect,
const Selection& rSel )
{
- EditText( rStr, rRect, rSel, false );
-}
-
-void SvTreeListBox::EditText( const OUString& rStr, const Rectangle& rRect,
- const Selection& rSel, bool bMulti )
-{
delete pEdCtrl;
nImpFlags |= SvTreeListBoxFlags::IN_EDT;
nImpFlags &= ~SvTreeListBoxFlags::EDTEND_CALLED;
@@ -980,7 +974,7 @@ void SvTreeListBox::EditText( const OUString& rStr, const Rectangle& rRect,
pEdCtrl = new SvInplaceEdit2(
this, rRect.TopLeft(), rRect.GetSize(), rStr,
LINK( this, SvTreeListBox, TextEditEndedHdl_Impl ),
- rSel, bMulti );
+ rSel, false/*bMulti*/ );
}
IMPL_LINK_NOARG_TYPED(SvTreeListBox, TextEditEndedHdl_Impl, SvInplaceEdit2&, void)
diff --git a/svtools/source/control/breadcrumb.cxx b/svtools/source/control/breadcrumb.cxx
index 5ad6bf30af4d..edbe22de1bb9 100644
--- a/svtools/source/control/breadcrumb.cxx
+++ b/svtools/source/control/breadcrumb.cxx
@@ -41,7 +41,7 @@ protected:
}
};
-Breadcrumb::Breadcrumb( vcl::Window* pParent, WinBits nWinStyle ) : VclHBox( pParent, nWinStyle )
+Breadcrumb::Breadcrumb( vcl::Window* pParent ) : VclHBox( pParent )
{
m_eMode = SvtBreadcrumbMode::ONLY_CURRENT_PATH;
set_spacing( SPACING );
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 58010872b18a..c04650c7b132 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -675,7 +675,7 @@ void Calendar::ImplDrawDate(vcl::RenderContext& rRenderContext,
long nX, long nY,
sal_uInt16 nDay, sal_uInt16 nMonth, sal_uInt16 nYear,
DayOfWeek eDayOfWeek,
- bool bBack, bool bOther, sal_uLong nToday )
+ bool bOther, sal_uLong nToday )
{
Color* pTextColor = nullptr;
const OUString& rDay = maDayTexts[nDay - 1];
@@ -716,16 +716,11 @@ void Calendar::ImplDrawDate(vcl::RenderContext& rRenderContext,
// display background
const StyleSettings& rStyleSettings = rRenderContext.GetSettings().GetStyleSettings();
- if (bSel || bBack)
+ if (bSel)
{
- if (bSel)
- {
- rRenderContext.SetLineColor();
- rRenderContext.SetFillColor(rStyleSettings.GetHighlightColor());
- rRenderContext.DrawRect(aDateRect);
- }
- else
- rRenderContext.Erase(aDateRect);
+ rRenderContext.SetLineColor();
+ rRenderContext.SetFillColor(rStyleSettings.GetHighlightColor());
+ rRenderContext.DrawRect(aDateRect);
}
// display text
@@ -922,7 +917,7 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext)
nDeltaX = nDayX + (nDay * mnDayWidth);
ImplDrawDate(rRenderContext, nDeltaX, nDayY, nDay + aTempDate.GetDay(),
aTempDate.GetMonth(), aTempDate.GetYear(),
- (DayOfWeek)((nDay + (sal_uInt16)eStartDay) % 7), false, true, nToday);
+ (DayOfWeek)((nDay + (sal_uInt16)eStartDay) % 7), true, nToday);
}
}
for (nDay = 1; nDay <= nDaysInMonth; nDay++)
@@ -930,7 +925,7 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext)
nDeltaX = nDayX + (nDayIndex * mnDayWidth);
ImplDrawDate(rRenderContext, nDeltaX, nDayY, nDay, nMonth, nYear,
(DayOfWeek)((nDayIndex + (sal_uInt16)eStartDay) % 7),
- false, false, nToday);
+ false, nToday);
if (nDayIndex == 6)
{
nDayIndex = 0;
@@ -952,7 +947,7 @@ void Calendar::ImplDraw(vcl::RenderContext& rRenderContext)
ImplDrawDate(rRenderContext, nDeltaX, nDayY, nDay,
aTempDate.GetMonth(), aTempDate.GetYear(),
(DayOfWeek)((nDayIndex + (sal_uInt16)eStartDay) % 7),
- false, true, nToday);
+ true, nToday);
if (nDayIndex == 6)
{
nDayIndex = 0;
diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx
index c9ed32072914..5f452463860a 100644
--- a/svtools/source/control/filectrl.cxx
+++ b/svtools/source/control/filectrl.cxx
@@ -33,12 +33,11 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::ui;
-FileControl::FileControl( vcl::Window* pParent, WinBits nStyle, FileControlMode nFlags ) :
+FileControl::FileControl( vcl::Window* pParent, WinBits nStyle ) :
Window( pParent, nStyle|WB_DIALOGCONTROL ),
maEdit( VclPtr<Edit>::Create(this, (nStyle&(~WB_BORDER))|WB_NOTABSTOP) ),
maButton( VclPtr<PushButton>::Create( this, (nStyle&(~WB_BORDER))|WB_NOLIGHTBORDER|WB_NOPOINTERFOCUS|WB_NOTABSTOP ) ),
maButtonText( SVT_RESSTR(STR_FILECTRL_BUTTONTEXT) ),
- mnFlags( nFlags ),
mnInternalFlags( FileControlMode_Internal::ORIGINALBUTTONTEXT )
{
maButton->SetClickHdl( LINK( this, FileControl, ButtonHdl ) );
@@ -96,8 +95,6 @@ void FileControl::dispose()
void FileControl::SetText( const OUString& rStr )
{
maEdit->SetText( rStr );
- if ( mnFlags & FileControlMode::RESIZEBUTTONBYPATHLEN )
- Resize();
}
@@ -157,10 +154,7 @@ void FileControl::Resize()
Size aOutSz = GetOutputSizePixel();
long nButtonTextWidth = maButton->GetTextWidth( maButtonText );
if ( !(mnInternalFlags & FileControlMode_Internal::ORIGINALBUTTONTEXT) ||
- ( nButtonTextWidth < aOutSz.Width()/3 &&
- ( !( mnFlags & FileControlMode::RESIZEBUTTONBYPATHLEN ) ||
- ( maEdit->GetTextWidth( maEdit->GetText() )
- <= aOutSz.Width() - nButtonTextWidth - ButtonBorder ) ) ) )
+ ( nButtonTextWidth < aOutSz.Width()/3 ) )
{
maButton->SetText( maButtonText );
}
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index 99e0d5c7b25d..d61e4c432174 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -277,7 +277,7 @@ void HeaderBar::ImplInvertDrag( sal_uInt16 nStartPos, sal_uInt16 nEndPos )
SetRasterOp( ROP_OVERPAINT );
}
-void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh, bool bDrag,
+void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos, bool bHigh,
const Rectangle& rItemRect, const Rectangle* pRect, DrawFlags )
{
ImplControlValue aControlValue(0);
@@ -324,16 +324,9 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos
aRect.Bottom() -= mnBorderOff2;
// delete background
- if ( !pRect || bDrag )
+ if ( !pRect )
{
- if (bDrag)
- {
- rRenderContext.SetLineColor();
- rRenderContext.SetFillColor(rStyleSettings.GetCheckedColor());
- rRenderContext.DrawRect(aRect);
- }
- else
- rRenderContext.DrawWallpaper(aRect, rRenderContext.GetBackground());
+ rRenderContext.DrawWallpaper(aRect, rRenderContext.GetBackground());
}
}
@@ -616,10 +609,10 @@ void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos
}
void HeaderBar::ImplDrawItem(vcl::RenderContext& rRenderContext, sal_uInt16 nPos,
- bool bHigh, bool bDrag, const Rectangle* pRect )
+ bool bHigh, const Rectangle* pRect )
{
Rectangle aRect = ImplGetItemRect(nPos);
- ImplDrawItem(rRenderContext, nPos, bHigh, bDrag, aRect, pRect, DrawFlags::NONE );
+ ImplDrawItem(rRenderContext, nPos, bHigh, aRect, pRect, DrawFlags::NONE );
}
void HeaderBar::ImplUpdate(sal_uInt16 nPos, bool bEnd)
@@ -943,7 +936,7 @@ void HeaderBar::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect
nCurItemPos = HEADERBAR_ITEM_NOTFOUND;
sal_uInt16 nItemCount = static_cast<sal_uInt16>(mpItemList->size());
for (sal_uInt16 i = 0; i < nItemCount; i++)
- ImplDrawItem(rRenderContext, i, (i == nCurItemPos), false, &rRect);
+ ImplDrawItem(rRenderContext, i, (i == nCurItemPos), &rRect);
}
void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
@@ -993,7 +986,7 @@ void HeaderBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize,
aItemRect.Right() = 16000;
vcl::Region aRegion( aRect );
pDev->SetClipRegion( aRegion );
- ImplDrawItem(*pDev, i, false, false, aItemRect, &aRect, nFlags );
+ ImplDrawItem(*pDev, i, false, aItemRect, &aRect, nFlags );
pDev->SetClipRegion();
}
diff --git a/svtools/source/control/scrwin.cxx b/svtools/source/control/scrwin.cxx
index 892de72c7edd..061bfb0a070f 100644
--- a/svtools/source/control/scrwin.cxx
+++ b/svtools/source/control/scrwin.cxx
@@ -38,9 +38,9 @@ void ScrollableWindow::ImpInitialize( ScrollableWindowFlags nFlags )
}
-ScrollableWindow::ScrollableWindow( vcl::Window* pParent, WinBits nBits,
+ScrollableWindow::ScrollableWindow( vcl::Window* pParent,
ScrollableWindowFlags nFlags ) :
- Window( pParent, WinBits(nBits|WB_CLIPCHILDREN) ),
+ Window( pParent, WB_CLIPCHILDREN ),
aVScroll( VclPtr<ScrollBar>::Create(this, WinBits(WB_VSCROLL | WB_DRAG)) ),
aHScroll( VclPtr<ScrollBar>::Create(this, WinBits(WB_HSCROLL | WB_DRAG)) ),
aCornerWin( VclPtr<ScrollBarBox>::Create(this) )
diff --git a/svtools/source/table/tablegeometry.cxx b/svtools/source/table/tablegeometry.cxx
index 519162f1b428..feeb5b9aec8d 100644
--- a/svtools/source/table/tablegeometry.cxx
+++ b/svtools/source/table/tablegeometry.cxx
@@ -87,10 +87,9 @@ namespace svt { namespace table
TableColumnGeometry::TableColumnGeometry( TableControl_Impl const & _rControl, Rectangle const & _rBoundaries,
- ColPos const _nCol, bool const i_allowVirtualColumns )
+ ColPos const _nCol )
:TableGeometry( _rControl, _rBoundaries )
,m_nColPos( _nCol )
- ,m_bAllowVirtualColumns( i_allowVirtualColumns )
{
if ( m_nColPos == COL_ROW_HEADERS )
{
@@ -123,7 +122,7 @@ namespace svt { namespace table
bool TableColumnGeometry::impl_isValidColumn( ColPos const i_column ) const
{
- return m_bAllowVirtualColumns || ( i_column < ColPos( m_rControl.m_aColumnWidths.size() ) );
+ return i_column < ColPos( m_rControl.m_aColumnWidths.size() );
}
diff --git a/svtools/source/table/tablegeometry.hxx b/svtools/source/table/tablegeometry.hxx
index 3c40a60b0026..c5943625e101 100644
--- a/svtools/source/table/tablegeometry.hxx
+++ b/svtools/source/table/tablegeometry.hxx
@@ -96,14 +96,12 @@ namespace svt { namespace table
{
protected:
ColPos m_nColPos;
- bool m_bAllowVirtualColumns;
public:
TableColumnGeometry(
TableControl_Impl const & _rControl,
Rectangle const & _rBoundaries,
- ColPos const _nCol,
- bool const i_allowVirtualColumns = false
+ ColPos const _nCol
);
// status
@@ -135,7 +133,7 @@ namespace svt { namespace table
RowPos const _nRow
)
:m_aRow( _rControl, _rBoundaries, _nRow, false/*allowVirtualCells*/ )
- ,m_aCol( _rControl, _rBoundaries, _nCol, false/*allowVirtualCells*/ )
+ ,m_aCol( _rControl, _rBoundaries, _nCol )
{
}
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index b2644c5360dd..24e4d375105d 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -1004,10 +1004,10 @@ void TreeControlPeer::updateTree( const css::awt::tree::TreeDataModelEvent& rEve
}
if( xNode.is() )
- updateNode( rTree, xNode, true/*bRecursive*/ );
+ updateNode( rTree, xNode );
}
-void TreeControlPeer::updateNode( UnoTreeListBoxImpl& rTree, const Reference< XTreeNode >& xNode, bool bRecursive )
+void TreeControlPeer::updateNode( UnoTreeListBoxImpl& rTree, const Reference< XTreeNode >& xNode )
{
if( xNode.is() )
{
@@ -1028,8 +1028,7 @@ void TreeControlPeer::updateNode( UnoTreeListBoxImpl& rTree, const Reference< XT
pNodeEntry = createEntry( xNode, pParentEntry, nChild );
}
- if( bRecursive )
- updateChildNodes( rTree, xNode, pNodeEntry );
+ updateChildNodes( rTree, xNode, pNodeEntry );
}
}
diff --git a/svtools/source/uno/treecontrolpeer.hxx b/svtools/source/uno/treecontrolpeer.hxx
index 0187f4f5dc0d..c1d8f9ba787e 100644
--- a/svtools/source/uno/treecontrolpeer.hxx
+++ b/svtools/source/uno/treecontrolpeer.hxx
@@ -130,7 +130,7 @@ private:
void updateEntry( UnoTreeListEntry* pEntry );
void updateTree( const css::awt::tree::TreeDataModelEvent& rEvent );
- void updateNode( UnoTreeListBoxImpl& rTree, const css::uno::Reference< css::awt::tree::XTreeNode >& xNode, bool bRecursive );
+ void updateNode( UnoTreeListBoxImpl& rTree, const css::uno::Reference< css::awt::tree::XTreeNode >& xNode );
void updateChildNodes( UnoTreeListBoxImpl& rTree, const css::uno::Reference< css::awt::tree::XTreeNode >& xParentNode, UnoTreeListEntry* pParentEntry );
static OUString getEntryString( const css::uno::Any& rValue );