summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-05 13:03:43 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-08 08:29:03 +0200
commit185ed3ddb8c01ee4465ce559e37113824f57b5c7 (patch)
tree596455ca4b9dc85666efbf06a1e1e0a3eec3ee2d /vcl
parentd33e262a244f351febc9dbe605b05f76cb834eeb (diff)
teach loplugin:constantparam about simple constructor calls
Change-Id: I7d2a28ab5951fbdb5a427c84e9ac4c1e32ecf9f9 Reviewed-on: https://gerrit.libreoffice.org/37280 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/listbox.hxx3
-rw-r--r--vcl/source/control/button.cxx10
-rw-r--r--vcl/source/control/combobox.cxx8
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/control/imp_listbox.cxx10
-rw-r--r--vcl/source/control/listbox.cxx12
-rw-r--r--vcl/source/control/scrbar.cxx12
-rw-r--r--vcl/source/control/slider.cxx4
-rw-r--r--vcl/source/control/spinfld.cxx12
-rw-r--r--vcl/source/control/tabctrl.cxx2
-rw-r--r--vcl/source/gdi/impanmvw.cxx4
-rw-r--r--vcl/source/outdev/nativecontrols.cxx3
-rw-r--r--vcl/source/window/brdwin.cxx4
-rw-r--r--vcl/source/window/clipping.cxx8
-rw-r--r--vcl/source/window/decoview.cxx2
-rw-r--r--vcl/source/window/menu.cxx7
-rw-r--r--vcl/source/window/status.cxx6
-rw-r--r--vcl/source/window/toolbox.cxx10
-rw-r--r--vcl/source/window/toolbox2.cxx20
-rw-r--r--vcl/source/window/window.cxx2
-rw-r--r--vcl/unx/generic/printer/ppdparser.cxx19
21 files changed, 73 insertions, 87 deletions
diff --git a/vcl/inc/listbox.hxx b/vcl/inc/listbox.hxx
index 04b7d0f61c5c..d2a096e4f322 100644
--- a/vcl/inc/listbox.hxx
+++ b/vcl/inc/listbox.hxx
@@ -548,8 +548,7 @@ public:
void EnableUserDraw( bool bUserDraw ) { mbUserDrawEnabled = bUserDraw; }
bool IsUserDrawEnabled() const { return mbUserDrawEnabled; }
- void DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage,
- bool bDrawTextAtImagePos, bool bLayout = false);
+ void DrawEntry(vcl::RenderContext& rRenderContext, bool bLayout);
bool GetEdgeBlending() const { return mbEdgeBlending; }
void SetEdgeBlending(bool bNew) { mbEdgeBlending = bNew; }
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index b2fe0fea93bd..4b255d37a1ba 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1148,7 +1148,7 @@ void PushButton::ImplSetDefButton( bool bSet )
// get native size of a 'default' button
// and adjust the VCL button if more space for adornment is required
if( GetNativeControlRegion( ControlType::Pushbutton, ControlPart::Entire, aCtrlRegion,
- nState, aControlValue, OUString(),
+ nState, aControlValue,
aBound, aCont ) )
{
dLeft = aCont.Left() - aBound.Left();
@@ -2726,7 +2726,7 @@ Size RadioButton::ImplGetRadioImageSize() const
// get native size of a radio button
if( GetNativeControlRegion( ControlType::Radiobutton, ControlPart::Entire, aCtrlRegion,
- nState, aControlValue, OUString(),
+ nState, aControlValue,
aBoundingRgn, aContentRgn ) )
{
aSize = aContentRgn.GetSize();
@@ -2847,7 +2847,7 @@ void RadioButton::ImplSetMinimumNWFSize()
// get native size of a radiobutton
if( GetNativeControlRegion( ControlType::Radiobutton, ControlPart::Entire, aCtrlRegion,
- ControlState::DEFAULT|ControlState::ENABLED, aControlValue, OUString(),
+ ControlState::DEFAULT|ControlState::ENABLED, aControlValue,
aBoundingRgn, aContentRgn ) )
{
Size aSize = aContentRgn.GetSize();
@@ -3598,7 +3598,7 @@ Size CheckBox::ImplGetCheckImageSize() const
// get native size of a check box
if( GetNativeControlRegion( ControlType::Checkbox, ControlPart::Entire, aCtrlRegion,
- nState, aControlValue, OUString(),
+ nState, aControlValue,
aBoundingRgn, aContentRgn ) )
{
aSize = aContentRgn.GetSize();
@@ -3703,7 +3703,7 @@ void CheckBox::ImplSetMinimumNWFSize()
// get native size of a radiobutton
if( GetNativeControlRegion( ControlType::Checkbox, ControlPart::Entire, aCtrlRegion,
- ControlState::DEFAULT|ControlState::ENABLED, aControlValue, OUString(),
+ ControlState::DEFAULT|ControlState::ENABLED, aControlValue,
aBoundingRgn, aContentRgn ) )
{
Size aSize = aContentRgn.GetSize();
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index c24ce0339a42..e8c9408e4023 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -157,7 +157,7 @@ void ComboBox::ImplCalcEditHeight()
if( GetNativeControlRegion( aType, ControlPart::Entire,
aCtrlRegion,
ControlState::ENABLED,
- aControlValue, OUString(),
+ aControlValue,
aBoundRegion, aContentRegion ) )
{
const long nNCHeight = aBoundRegion.GetHeight();
@@ -1010,7 +1010,7 @@ long ComboBox::getMaxWidthScrollBarAndDownButton() const
tools::Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
if ( GetNativeControlRegion(ControlType::Combobox, ControlPart::ButtonDown,
- aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
+ aArea, ControlState::NONE, aControlValue, aBound, aContent) )
{
nButtonDownWidth = aContent.getWidth();
}
@@ -1448,7 +1448,7 @@ ComboBoxBounds ComboBox::Impl::calcComboBoxDropDownComponentBounds(
tools::Rectangle aArea( aPoint, rBorderOutSz );
if (m_rThis.GetNativeControlRegion(ControlType::Combobox, ControlPart::ButtonDown,
- aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
+ aArea, ControlState::NONE, aControlValue, aBound, aContent) )
{
// convert back from border space to local coordinates
aPoint = pBorder->ScreenToOutputPixel(m_rThis.OutputToScreenPixel(aPoint));
@@ -1459,7 +1459,7 @@ ComboBoxBounds ComboBox::Impl::calcComboBoxDropDownComponentBounds(
// adjust the size of the edit field
if (m_rThis.GetNativeControlRegion(ControlType::Combobox, ControlPart::SubEdit,
- aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
+ aArea, ControlState::NONE, aControlValue, aBound, aContent) )
{
// convert back from border space to local coordinates
aContent.Move(-aPoint.X(), -aPoint.Y());
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 393d12740cea..236c706b9e71 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2727,7 +2727,7 @@ Size Edit::CalcMinimumSizeForText(const OUString &rString) const
tools::Rectangle aRect( Point( 0, 0 ), aSize );
tools::Rectangle aContent, aBound;
if (GetNativeControlRegion(eCtrlType, ControlPart::Entire, aRect, ControlState::NONE,
- aControlValue, OUString(), aBound, aContent))
+ aControlValue, aBound, aContent))
{
if (aBound.GetHeight() > aSize.Height())
aSize.Height() = aBound.GetHeight();
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index 6a4e02eaae04..39f4f7ede2eb 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -2728,7 +2728,7 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout)
}
else
{
- DrawEntry(rRenderContext, true, false, bLayout);
+ DrawEntry(rRenderContext, bLayout);
}
}
@@ -2757,13 +2757,13 @@ void ImplWin::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle&
ImplDraw(rRenderContext);
}
-void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, bool bDrawTextAtImagePos, bool bLayout)
+void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bLayout)
{
long nBorder = 1;
Size aOutSz(GetOutputSizePixel());
bool bImage = !!maImage;
- if (bDrawImage && bImage && !bLayout)
+ if (bImage && !bLayout)
{
DrawImageFlags nStyle = DrawImageFlags::NONE;
Size aImgSz = maImage.GetSizePixel();
@@ -2804,7 +2804,7 @@ void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, boo
{
DrawTextFlags nTextStyle = DrawTextFlags::VCenter;
- if ( bDrawImage && bImage && !bLayout )
+ if ( bImage && !bLayout )
nTextStyle |= DrawTextFlags::Left;
else if ( GetStyle() & WB_CENTER )
nTextStyle |= DrawTextFlags::Center;
@@ -2815,7 +2815,7 @@ void ImplWin::DrawEntry(vcl::RenderContext& rRenderContext, bool bDrawImage, boo
tools::Rectangle aTextRect( Point( nBorder, 0 ), Size( aOutSz.Width()-2*nBorder, aOutSz.Height() ) );
- if ( !bDrawTextAtImagePos && ( bImage || IsUserDrawEnabled() ) )
+ if ( bImage || IsUserDrawEnabled() )
{
aTextRect.Left() += maImage.GetSizePixel().Width() + IMG_TXT_DISTANCE;
}
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx
index fe07dc901c06..3cbd57e39867 100644
--- a/vcl/source/control/listbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -109,7 +109,7 @@ void ListBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
tools::Rectangle aBoundingRgn( aCtrlRegion );
tools::Rectangle aContentRgn( aCtrlRegion );
if( GetNativeControlRegion( ControlType::Listbox, ControlPart::Entire, aCtrlRegion,
- ControlState::ENABLED, aControlValue, OUString(),
+ ControlState::ENABLED, aControlValue,
aBoundingRgn, aContentRgn ) )
{
sal_Int32 nHeight = aBoundingRgn.GetHeight();
@@ -585,7 +585,7 @@ void ListBox::Resize()
tools::Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
if ( GetNativeControlRegion( ControlType::Listbox, ControlPart::ButtonDown,
- aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
+ aArea, ControlState::NONE, aControlValue, aBound, aContent) )
{
long nTop = 0;
// Convert back from border space to local coordinates
@@ -598,7 +598,7 @@ void ListBox::Resize()
// Adjust the size of the edit field
if ( GetNativeControlRegion( ControlType::Listbox, ControlPart::SubEdit,
- aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
+ aArea, ControlState::NONE, aControlValue, aBound, aContent) )
{
// Convert back from border space to local coordinates
aContent.Move( -aPoint.X(), -aPoint.Y() );
@@ -1187,7 +1187,7 @@ Size ListBox::CalcMinimumSize() const
Size aTestSize( 100, 20 );
tools::Rectangle aArea( aPoint, aTestSize );
if( GetNativeControlRegion( ControlType::Listbox, ControlPart::SubEdit, aArea, ControlState::NONE,
- aControlValue, OUString(), aBound, aContent) )
+ aControlValue, aBound, aContent) )
{
// use the themes drop down size
aSz.Width() += aTestSize.Width() - aContent.GetWidth();
@@ -1204,7 +1204,7 @@ Size ListBox::CalcMinimumSize() const
tools::Rectangle aRect( Point( 0, 0 ), aSz );
tools::Rectangle aContent, aBound;
if( GetNativeControlRegion( ControlType::Listbox, ControlPart::Entire, aRect, ControlState::NONE,
- aControlValue, OUString(), aBound, aContent) )
+ aControlValue, aBound, aContent) )
{
if( aBound.GetHeight() > aSz.Height() )
aSz.Height() = aBound.GetHeight();
@@ -1343,7 +1343,7 @@ void ListBox::DrawEntry(const UserDrawEvent& rEvt)
if (rEvt.GetWindow() == mpImplLB->GetMainWindow())
mpImplLB->GetMainWindow()->DrawEntry(*rEvt.GetRenderContext(), rEvt.GetItemId(), true/*bDrawImage*/, true/*bDrawText*/, false/*bDrawTextAtImagePos*/ );
else if (rEvt.GetWindow() == mpImplWin)
- mpImplWin->DrawEntry(*rEvt.GetRenderContext(), true/*bDrawImage*/, false/*bDrawTextAtImagePos*/);
+ mpImplWin->DrawEntry(*rEvt.GetRenderContext(), false/*layout*/);
}
void ListBox::EnableUserDraw( bool bUserDraw )
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 7ecb6702e353..95ab867d4844 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -246,9 +246,9 @@ void ScrollBar::ImplCalc( bool bUpdate )
if ( GetStyle() & WB_HORZ )
{
if ( GetNativeControlRegion( ControlType::Scrollbar, IsRTLEnabled()? ControlPart::ButtonRight: ControlPart::ButtonLeft,
- aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aBtn1Region ) &&
+ aControlRegion, ControlState::NONE, ImplControlValue(), aBoundingRegion, aBtn1Region ) &&
GetNativeControlRegion( ControlType::Scrollbar, IsRTLEnabled()? ControlPart::ButtonLeft: ControlPart::ButtonRight,
- aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aBtn2Region ) )
+ aControlRegion, ControlState::NONE, ImplControlValue(), aBoundingRegion, aBtn2Region ) )
{
maBtn1Rect = aBtn1Region;
maBtn2Rect = aBtn2Region;
@@ -263,7 +263,7 @@ void ScrollBar::ImplCalc( bool bUpdate )
}
if ( GetNativeControlRegion( ControlType::Scrollbar, ControlPart::TrackHorzArea,
- aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aTrackRegion ) )
+ aControlRegion, ControlState::NONE, ImplControlValue(), aBoundingRegion, aTrackRegion ) )
maTrackRect = aTrackRegion;
else
maTrackRect = tools::Rectangle( maBtn1Rect.TopRight(), maBtn2Rect.BottomLeft() );
@@ -287,9 +287,9 @@ void ScrollBar::ImplCalc( bool bUpdate )
else
{
if ( GetNativeControlRegion( ControlType::Scrollbar, ControlPart::ButtonUp,
- aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aBtn1Region ) &&
+ aControlRegion, ControlState::NONE, ImplControlValue(), aBoundingRegion, aBtn1Region ) &&
GetNativeControlRegion( ControlType::Scrollbar, ControlPart::ButtonDown,
- aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aBtn2Region ) )
+ aControlRegion, ControlState::NONE, ImplControlValue(), aBoundingRegion, aBtn2Region ) )
{
maBtn1Rect = aBtn1Region;
maBtn2Rect = aBtn2Region;
@@ -304,7 +304,7 @@ void ScrollBar::ImplCalc( bool bUpdate )
}
if ( GetNativeControlRegion( ControlType::Scrollbar, ControlPart::TrackVertArea,
- aControlRegion, ControlState::NONE, ImplControlValue(), OUString(), aBoundingRegion, aTrackRegion ) )
+ aControlRegion, ControlState::NONE, ImplControlValue(), aBoundingRegion, aTrackRegion ) )
maTrackRect = aTrackRegion;
else
maTrackRect = tools::Rectangle( maBtn1Rect.BottomLeft()+Point(0,1), maBtn2Rect.TopRight() );
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index f1a71c9af7c4..3bf88f210cd9 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -140,7 +140,7 @@ void Slider::ImplUpdateRects( bool bUpdate )
const tools::Rectangle aControlRegion( tools::Rectangle( Point(0,0), Size( SLIDER_THUMB_SIZE, 10 ) ) );
tools::Rectangle aThumbBounds, aThumbContent;
if ( GetNativeControlRegion( ControlType::Slider, ControlPart::ThumbHorz,
- aControlRegion, ControlState::NONE, ImplControlValue(), OUString(),
+ aControlRegion, ControlState::NONE, ImplControlValue(),
aThumbBounds, aThumbContent ) )
{
maThumbRect.Left() = mnThumbPixPos - aThumbBounds.GetWidth()/2;
@@ -174,7 +174,7 @@ void Slider::ImplUpdateRects( bool bUpdate )
const tools::Rectangle aControlRegion( tools::Rectangle( Point(0,0), Size( 10, SLIDER_THUMB_SIZE ) ) );
tools::Rectangle aThumbBounds, aThumbContent;
if ( GetNativeControlRegion( ControlType::Slider, ControlPart::ThumbVert,
- aControlRegion, ControlState::NONE, ImplControlValue(), OUString(),
+ aControlRegion, ControlState::NONE, ImplControlValue(),
aThumbBounds, aThumbContent ) )
{
maThumbRect.Top() = mnThumbPixPos - aThumbBounds.GetHeight()/2;
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 985656aa603a..f462a600b237 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -114,7 +114,7 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW
if (!ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize &&
pContext->GetNativeControlRegion(ControlType::Spinbox, ControlPart::Entire,
aNatRgn, ControlState::NONE, rSpinbuttonValue,
- OUString(), aBound, aContent))
+ aBound, aContent))
{
aSize = aContent.GetSize();
}
@@ -658,9 +658,9 @@ void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, tool
bNativeRegionOK =
pWin->GetNativeControlRegion(ControlType::Spinbox, ControlPart::ButtonUp,
- aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContentUp) &&
+ aArea, ControlState::NONE, aControlValue, aBound, aContentUp) &&
pWin->GetNativeControlRegion(ControlType::Spinbox, ControlPart::ButtonDown,
- aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContentDown);
+ aArea, ControlState::NONE, aControlValue, aBound, aContentDown);
if (bNativeRegionOK)
{
@@ -713,7 +713,7 @@ void SpinField::Resize()
// adjust position and size of the edit field
if (GetNativeControlRegion(ControlType::Spinbox, ControlPart::SubEdit, aArea, ControlState::NONE,
- aControlValue, OUString(), aBound, aContent) &&
+ aControlValue, aBound, aContent) &&
// there is just no useful native support for spinfields with dropdown
!(GetStyle() & WB_DROPDOWN))
{
@@ -905,9 +905,9 @@ Size SpinField::CalcMinimumSizeForText(const OUString &rString) const
tools::Rectangle aEntireBound, aEntireContent, aEditBound, aEditContent;
if (
GetNativeControlRegion(ControlType::Spinbox, ControlPart::Entire,
- aArea, ControlState::NONE, aControlValue, OUString(), aEntireBound, aEntireContent) &&
+ aArea, ControlState::NONE, aControlValue, aEntireBound, aEntireContent) &&
GetNativeControlRegion(ControlType::Spinbox, ControlPart::SubEdit,
- aArea, ControlState::NONE, aControlValue, OUString(), aEditBound, aEditContent)
+ aArea, ControlState::NONE, aControlValue, aEditBound, aEditContent)
)
{
aSz.Width() += (aEntireContent.GetWidth() - aEditContent.GetWidth());
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index de0c8d7952f9..62dcc5f8da53 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -237,7 +237,7 @@ Size TabControl::ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth )
aSize.Width() - TAB_TABOFFSET_X * 2,
aSize.Height() - TAB_TABOFFSET_Y * 2));
if(GetNativeControlRegion( ControlType::TabItem, ControlPart::Entire, aCtrlRegion,
- ControlState::ENABLED, aControlValue, OUString(),
+ ControlState::ENABLED, aControlValue,
aBoundingRgn, aContentRgn ) )
{
return aContentRgn.GetSize();
diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 969b071aef76..3da968663d6e 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -81,7 +81,7 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut,
MapMode aTempMap( mpOut->GetMapMode() );
aTempMap.SetOrigin( Point() );
mpBackground->SetMapMode( aTempMap );
- static_cast<vcl::Window*>( mpOut.get() )->SaveBackground( maDispPt, maDispSz, Point(), *mpBackground );
+ static_cast<vcl::Window*>( mpOut.get() )->SaveBackground( maDispPt, maDispSz, *mpBackground );
mpBackground->SetMapMode( MapMode() );
}
else
@@ -318,7 +318,7 @@ void ImplAnimView::repaint()
MapMode aTempMap( mpOut->GetMapMode() );
aTempMap.SetOrigin( Point() );
mpBackground->SetMapMode( aTempMap );
- static_cast<vcl::Window*>( mpOut.get() )->SaveBackground( maDispPt, maDispSz, Point(), *mpBackground );
+ static_cast<vcl::Window*>( mpOut.get() )->SaveBackground( maDispPt, maDispSz, *mpBackground );
mpBackground->SetMapMode( MapMode() );
}
else
diff --git a/vcl/source/outdev/nativecontrols.cxx b/vcl/source/outdev/nativecontrols.cxx
index e946d7f9f457..3f931bf85930 100644
--- a/vcl/source/outdev/nativecontrols.cxx
+++ b/vcl/source/outdev/nativecontrols.cxx
@@ -316,7 +316,6 @@ bool OutputDevice::GetNativeControlRegion( ControlType nType,
const tools::Rectangle& rControlRegion,
ControlState nState,
const ImplControlValue& aValue,
- const OUString& aCaption,
tools::Rectangle &rNativeBoundingRegion,
tools::Rectangle &rNativeContentRegion ) const
{
@@ -333,7 +332,7 @@ bool OutputDevice::GetNativeControlRegion( ControlType nType,
tools::Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) );
bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue,
- aCaption, rNativeBoundingRegion,
+ OUString(), rNativeBoundingRegion,
rNativeContentRegion, this );
if( bRet )
{
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index ea117be234ac..906486ad51d5 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -492,7 +492,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
tools::Rectangle aCtrlRegion( Point(mnLeftBorder, mnTopBorder), aMinSize );
tools::Rectangle aBounds, aContent;
if( pWin->GetNativeControlRegion( aCtrlType, ControlPart::Entire, aCtrlRegion,
- ControlState::ENABLED, aControlValue, OUString(),
+ ControlState::ENABLED, aControlValue,
aBounds, aContent ) )
{
mnLeftBorder = aContent.Left() - aBounds.Left();
@@ -696,7 +696,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c
tools::Rectangle aContentRgn(aCtrlRegion);
if (!ImplGetSVData()->maNWFData.mbCanDrawWidgetAnySize &&
rRenderContext.GetNativeControlRegion(aCtrlType, aCtrlPart, aCtrlRegion,
- nState, aControlValue, OUString(),
+ nState, aControlValue,
aBoundingRgn, aContentRgn))
{
aCtrlRegion=aContentRgn;
diff --git a/vcl/source/window/clipping.cxx b/vcl/source/window/clipping.cxx
index d87bafd74de3..ab46546a4daa 100644
--- a/vcl/source/window/clipping.cxx
+++ b/vcl/source/window/clipping.cxx
@@ -674,7 +674,7 @@ void Window::ImplCalcOverlapRegion( const tools::Rectangle& rSourceRect, vcl::Re
}
void Window::SaveBackground( const Point& rPos, const Size& rSize,
- const Point& rDestOff, VirtualDevice& rSaveDevice )
+ VirtualDevice& rSaveDevice )
{
if ( mpWindowImpl->mpPaintRegion )
{
@@ -687,7 +687,7 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize,
if ( !aClip.IsEmpty() )
{
const vcl::Region aOldClip( rSaveDevice.GetClipRegion() );
- const Point aPixOffset( rSaveDevice.LogicToPixel( rDestOff ) );
+ const Point aPixOffset( rSaveDevice.LogicToPixel( Point() ) );
const bool bMap = rSaveDevice.IsMapModeEnabled();
// move clip region to have the same distance to DestOffset
@@ -697,12 +697,12 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize,
rSaveDevice.EnableMapMode( false );
rSaveDevice.SetClipRegion( aClip );
rSaveDevice.EnableMapMode( bMap );
- rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this );
+ rSaveDevice.DrawOutDev( Point(), rSize, rPos, rSize, *this );
rSaveDevice.SetClipRegion( aOldClip );
}
}
else
- rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this );
+ rSaveDevice.DrawOutDev( Point(), rSize, rPos, rSize, *this );
}
} /* namespace vcl */
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index 4a84622b7ea6..ade16d0e2db6 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -603,7 +603,7 @@ void ImplDrawFrame( OutputDevice *const pDev, tools::Rectangle& rRect,
tools::Rectangle aBound, aContent;
tools::Rectangle aNatRgn( rRect );
if( pWin->GetNativeControlRegion(ControlType::Frame, ControlPart::Border,
- aNatRgn, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
+ aNatRgn, ControlState::NONE, aControlValue, aBound, aContent) )
{
// if bNoDraw is true then don't call the drawing routine
// but just update the target rectangle
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 77b48ad3c9d7..9c547a933fcf 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1289,7 +1289,7 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, lo
if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemCheckMark))
{
if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemCheckMark,
- aCtrlRegion, ControlState::ENABLED, aVal, OUString(),
+ aCtrlRegion, ControlState::ENABLED, aVal,
aNativeBounds, aNativeContent))
{
rCheckHeight = aNativeBounds.GetHeight();
@@ -1299,7 +1299,7 @@ Size Menu::ImplGetNativeCheckAndRadioSize(vcl::RenderContext& rRenderContext, lo
if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::MenuItemRadioMark))
{
if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::MenuItemRadioMark,
- aCtrlRegion, ControlState::ENABLED, aVal, OUString(),
+ aCtrlRegion, ControlState::ENABLED, aVal,
aNativeBounds, aNativeContent))
{
rRadioHeight = aNativeBounds.GetHeight();
@@ -1320,7 +1320,7 @@ bool Menu::ImplGetNativeSubmenuArrowSize(vcl::RenderContext& rRenderContext, Siz
{
if (rRenderContext.GetNativeControlRegion(ControlType::MenuPopup, ControlPart::SubmenuArrow,
aCtrlRegion, ControlState::ENABLED,
- aVal, OUString(), aNativeBounds, aNativeContent))
+ aVal, aNativeBounds, aNativeContent))
{
Size aSize(aNativeContent.GetWidth(), aNativeContent.GetHeight());
rArrowSize = aSize;
@@ -1566,7 +1566,6 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
aCtrlRegion,
ControlState::ENABLED,
aVal,
- OUString(),
aNativeBounds,
aNativeContent )
)
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 01f5b4a8b2f3..0fcaa9ec0d32 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -612,7 +612,7 @@ void StatusBar::ImplCalcProgressRect()
tools::Rectangle aControlRegion( tools::Rectangle( (const Point&)Point(), maPrgsFrameRect.GetSize() ) );
tools::Rectangle aNativeControlRegion, aNativeContentRegion;
if( (bNativeOK = GetNativeControlRegion( ControlType::Progress, ControlPart::Entire, aControlRegion,
- ControlState::ENABLED, aValue, OUString(),
+ ControlState::ENABLED, aValue,
aNativeControlRegion, aNativeContentRegion ) ) )
{
long nProgressHeight = aNativeControlRegion.GetHeight();
@@ -1418,7 +1418,7 @@ Size StatusBar::CalcWindowSizePixel() const
tools::Rectangle aControlRegion( (const Point&)Point(), Size( nCalcWidth, nMinHeight ) );
tools::Rectangle aNativeControlRegion, aNativeContentRegion;
if( GetNativeControlRegion( ControlType::Progress, ControlPart::Entire,
- aControlRegion, ControlState::ENABLED, aValue, OUString(),
+ aControlRegion, ControlState::ENABLED, aValue,
aNativeControlRegion, aNativeContentRegion ) )
{
nProgressHeight = aNativeControlRegion.GetHeight();
@@ -1432,7 +1432,7 @@ Size StatusBar::CalcWindowSizePixel() const
tools::Rectangle aBound, aContent;
tools::Rectangle aNatRgn( Point( 0, 0 ), Size( 150, 50 ) );
if( GetNativeControlRegion(ControlType::Frame, ControlPart::Border,
- aNatRgn, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
+ aNatRgn, ControlState::NONE, aControlValue, aBound, aContent) )
{
mpImplData->mnItemBorderWidth =
( aBound.GetHeight() - aContent.GetHeight() ) / 2;
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index e85da5b1f17a..d405717e0ad7 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -130,7 +130,7 @@ int ToolBox::ImplGetDragWidth( const vcl::RenderContext& rRenderContext, bool bH
if ( rRenderContext.GetNativeControlRegion(ControlType::Toolbar,
bHorz ? ControlPart::ThumbVert : ControlPart::ThumbHorz,
- aArea, ControlState::NONE, aControlValue, OUString(), aBound, aContent) )
+ aArea, ControlState::NONE, aControlValue, aBound, aContent) )
{
nWidth = bHorz ? aContent.GetWidth() : aContent.GetHeight();
}
@@ -1445,7 +1445,7 @@ bool ToolBox::ImplCalcItem()
if( GetNativeControlRegion( ControlType::Toolbar, ControlPart::Button,
aReg,
ControlState::ENABLED | ControlState::ROLLOVER,
- aVal, OUString(),
+ aVal,
aNativeBounds, aNativeContent ) )
{
aRect = aNativeBounds;
@@ -1470,7 +1470,7 @@ bool ToolBox::ImplCalcItem()
if( GetNativeControlRegion( ControlType::Combobox, ControlPart::Entire,
aReg,
ControlState::ENABLED | ControlState::ROLLOVER,
- aVal, OUString(),
+ aVal,
aNativeBounds, aNativeContent ) )
{
aRect = aNativeBounds;
@@ -1482,7 +1482,7 @@ bool ToolBox::ImplCalcItem()
if( GetNativeControlRegion( ControlType::Listbox, ControlPart::Entire,
aReg,
ControlState::ENABLED | ControlState::ROLLOVER,
- aVal, OUString(),
+ aVal,
aNativeBounds, aNativeContent ) )
{
aRect = aNativeBounds;
@@ -1494,7 +1494,7 @@ bool ToolBox::ImplCalcItem()
if( GetNativeControlRegion( ControlType::Spinbox, ControlPart::Entire,
aReg,
ControlState::ENABLED | ControlState::ROLLOVER,
- aVal, OUString(),
+ aVal,
aNativeBounds, aNativeContent ) )
{
aRect = aNativeBounds;
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 171635342747..7ee491c6c886 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -794,7 +794,7 @@ sal_uInt16 ToolBox::GetItemId(const OUString &rCommand) const
return 0;
}
-Point ToolBox::ImplGetPopupPosition( const tools::Rectangle& rRect, const Size& rSize ) const
+Point ToolBox::ImplGetPopupPosition( const tools::Rectangle& rRect ) const
{
Point aPos;
if( !rRect.IsEmpty() )
@@ -813,32 +813,28 @@ Point ToolBox::ImplGetPopupPosition( const tools::Rectangle& rRect, const Size&
aPos = rRect.BottomLeft();
aPos.Y()++;
devPos = OutputToAbsoluteScreenPixel( aPos );
- if( devPos.Y() + rSize.Height() >= aScreen.Bottom() )
- aPos.Y() = rRect.Top() - rSize.Height();
+ if( devPos.Y() >= aScreen.Bottom() )
+ aPos.Y() = rRect.Top();
break;
case WindowAlign::Bottom:
aPos = rRect.TopLeft();
aPos.Y()--;
devPos = OutputToAbsoluteScreenPixel( aPos );
- if( devPos.Y() - rSize.Height() > aScreen.Top() )
- aPos.Y() -= rSize.Height();
- else
+ if( devPos.Y() <= aScreen.Top() )
aPos.Y() = rRect.Bottom();
break;
case WindowAlign::Left:
aPos = rRect.TopRight();
aPos.X()++;
devPos = OutputToAbsoluteScreenPixel( aPos );
- if( devPos.X() + rSize.Width() >= aScreen.Right() )
- aPos.X() = rRect.Left() - rSize.Width();
+ if( devPos.X() >= aScreen.Right() )
+ aPos.X() = rRect.Left();
break;
case WindowAlign::Right:
aPos = rRect.TopLeft();
aPos.X()--;
devPos = OutputToAbsoluteScreenPixel( aPos );
- if( devPos.X() - rSize.Width() > aScreen.Left() )
- aPos.X() -= rSize.Width();
- else
+ if( devPos.X() <= aScreen.Left() )
aPos.X() = rRect.Right();
break;
default:
@@ -1701,7 +1697,7 @@ IMPL_LINK_NOARG(ToolBox, ImplCallExecuteCustomMenu, void*, void)
}
}
- sal_uInt16 uId = GetMenu()->Execute( pWin, tools::Rectangle( ImplGetPopupPosition( aMenuRect, Size() ), Size() ),
+ sal_uInt16 uId = GetMenu()->Execute( pWin, tools::Rectangle( ImplGetPopupPosition( aMenuRect ), Size() ),
PopupMenuFlags::ExecuteDown | PopupMenuFlags::NoMouseUpClose );
if ( pWin->IsDisposed() )
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 579fdb9ca92f..12a5a3027321 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1220,7 +1220,7 @@ void Window::ImplInitAppFontData( vcl::Window* pWindow )
tools::Rectangle aBoundingRgn( aCtrlRegion );
tools::Rectangle aContentRgn( aCtrlRegion );
if( pWindow->GetNativeControlRegion( ControlType::Editbox, ControlPart::Entire, aCtrlRegion,
- ControlState::ENABLED, aControlValue, OUString(),
+ ControlState::ENABLED, aControlValue,
aBoundingRgn, aContentRgn ) )
{
// comment: the magical +6 is for the extra border in bordered
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 5d6ad5e90b13..569f424dd5b9 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -103,19 +103,18 @@ namespace psp
OUString translateValue(
const OUString& i_rKey,
- const OUString& i_rOption,
- const OUString& i_rValue
+ const OUString& i_rOption
) const;
OUString translateOption( const OUString& i_rKey,
const OUString& i_rOption ) const
{
- return translateValue( i_rKey, i_rOption, OUString() );
+ return translateValue( i_rKey, i_rOption );
}
OUString translateKey( const OUString& i_rKey ) const
{
- return translateValue( i_rKey, OUString(), OUString() );
+ return translateValue( i_rKey, OUString() );
}
};
@@ -187,24 +186,18 @@ namespace psp
OUString PPDTranslator::translateValue(
const OUString& i_rKey,
- const OUString& i_rOption,
- const OUString& i_rValue
+ const OUString& i_rOption
) const
{
OUString aResult;
- OUStringBuffer aKey( i_rKey.getLength() + i_rOption.getLength() + i_rValue.getLength() + 2 );
+ OUStringBuffer aKey( i_rKey.getLength() + i_rOption.getLength() + 2 );
aKey.append( i_rKey );
- if( !i_rOption.isEmpty() || !i_rValue.isEmpty() )
+ if( !i_rOption.isEmpty() )
{
aKey.append( ':' );
aKey.append( i_rOption );
}
- if( !i_rValue.isEmpty() )
- {
- aKey.append( ':' );
- aKey.append( i_rValue );
- }
if( !aKey.isEmpty() )
{
OUString aK( aKey.makeStringAndClear() );