loplugin:constantparam in sdext
Change-Id: Ib349a856665776ef51524b3c6613774f739bbdfe
This commit is contained in:
@@ -105,11 +105,11 @@ void OptimizerDialog::InitRoadmap()
|
|||||||
Reference< XPropertySet > xPropertySet( mxRoadmapControlModel, UNO_QUERY_THROW );
|
Reference< XPropertySet > xPropertySet( mxRoadmapControlModel, UNO_QUERY_THROW );
|
||||||
xPropertySet->setPropertyValue( "Name", Any( OUString("rdmNavi") ) );
|
xPropertySet->setPropertyValue( "Name", Any( OUString("rdmNavi") ) );
|
||||||
mxRoadmapControl = mxDialog->getControl( "rdmNavi" );
|
mxRoadmapControl = mxDialog->getControl( "rdmNavi" );
|
||||||
InsertRoadmapItem( 0, true, getString( STR_INTRODUCTION ), ITEM_ID_INTRODUCTION );
|
InsertRoadmapItem( 0, getString( STR_INTRODUCTION ), ITEM_ID_INTRODUCTION );
|
||||||
InsertRoadmapItem( 1, true, getString( STR_SLIDES ), ITEM_ID_SLIDES );
|
InsertRoadmapItem( 1, getString( STR_SLIDES ), ITEM_ID_SLIDES );
|
||||||
InsertRoadmapItem( 2, true, getString( STR_IMAGE_OPTIMIZATION ), ITEM_ID_GRAPHIC_OPTIMIZATION );
|
InsertRoadmapItem( 2, getString( STR_IMAGE_OPTIMIZATION ), ITEM_ID_GRAPHIC_OPTIMIZATION );
|
||||||
InsertRoadmapItem( 3, true, getString( STR_OLE_OBJECTS ), ITEM_ID_OLE_OPTIMIZATION );
|
InsertRoadmapItem( 3, getString( STR_OLE_OBJECTS ), ITEM_ID_OLE_OPTIMIZATION );
|
||||||
InsertRoadmapItem( 4, true, getString( STR_SUMMARY ), ITEM_ID_SUMMARY );
|
InsertRoadmapItem( 4, getString( STR_SUMMARY ), ITEM_ID_SUMMARY );
|
||||||
|
|
||||||
// Well, that's messy, but the
|
// Well, that's messy, but the
|
||||||
// BMP_PRESENTATION_MINIMIZER from sd module cannot be used here directly
|
// BMP_PRESENTATION_MINIMIZER from sd module cannot be used here directly
|
||||||
@@ -128,7 +128,7 @@ void OptimizerDialog::InitRoadmap()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void OptimizerDialog::InsertRoadmapItem( const sal_Int32 nIndex, const bool bEnabled, const OUString& rLabel, const sal_Int32 nItemID )
|
void OptimizerDialog::InsertRoadmapItem( const sal_Int32 nIndex, const OUString& rLabel, const sal_Int32 nItemID )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -137,7 +137,7 @@ void OptimizerDialog::InsertRoadmapItem( const sal_Int32 nIndex, const bool bEna
|
|||||||
Reference< XInterface > xRoadmapItem( xSFRoadmap->createInstance(), UNO_QUERY_THROW );
|
Reference< XInterface > xRoadmapItem( xSFRoadmap->createInstance(), UNO_QUERY_THROW );
|
||||||
Reference< XPropertySet > xPropertySet( xRoadmapItem, UNO_QUERY_THROW );
|
Reference< XPropertySet > xPropertySet( xRoadmapItem, UNO_QUERY_THROW );
|
||||||
xPropertySet->setPropertyValue( "Label", Any( rLabel ) );
|
xPropertySet->setPropertyValue( "Label", Any( rLabel ) );
|
||||||
xPropertySet->setPropertyValue( "Enabled", Any( bEnabled ) );
|
xPropertySet->setPropertyValue( "Enabled", Any( true ) );
|
||||||
xPropertySet->setPropertyValue( "ID", Any( nItemID ) );
|
xPropertySet->setPropertyValue( "ID", Any( nItemID ) );
|
||||||
aIndexContainerRoadmap->insertByIndex( nIndex, Any( xRoadmapItem ) );
|
aIndexContainerRoadmap->insertByIndex( nIndex, Any( xRoadmapItem ) );
|
||||||
}
|
}
|
||||||
|
@@ -101,7 +101,7 @@ private:
|
|||||||
|
|
||||||
void ActivatePage( sal_Int16 nStep );
|
void ActivatePage( sal_Int16 nStep );
|
||||||
void DeactivatePage( sal_Int16 nStep );
|
void DeactivatePage( sal_Int16 nStep );
|
||||||
void InsertRoadmapItem( const sal_Int32 nIndex, const bool bEnabled, const OUString& rLabel, const sal_Int32 nItemID );
|
void InsertRoadmapItem( const sal_Int32 nIndex, const OUString& rLabel, const sal_Int32 nItemID );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@@ -120,8 +120,7 @@ public:
|
|||||||
const std::shared_ptr<RendererPaneStyle>& rpStyle,
|
const std::shared_ptr<RendererPaneStyle>& rpStyle,
|
||||||
const awt::Rectangle& rUpdateBox,
|
const awt::Rectangle& rUpdateBox,
|
||||||
const awt::Rectangle& rOuterBox,
|
const awt::Rectangle& rOuterBox,
|
||||||
const awt::Rectangle& rInnerBox,
|
const awt::Rectangle& rInnerBox);
|
||||||
const bool bPaintBackground);
|
|
||||||
void SetupClipping (
|
void SetupClipping (
|
||||||
const awt::Rectangle& rUpdateBox,
|
const awt::Rectangle& rUpdateBox,
|
||||||
const awt::Rectangle& rOuterBox,
|
const awt::Rectangle& rOuterBox,
|
||||||
@@ -491,7 +490,7 @@ void PresenterPaneBorderPainter::Renderer::PaintBorder (
|
|||||||
PaintBitmap(aCenterBox, rUpdateBox, +1,+1, 0,0, false, pBottomRight, pBackground);
|
PaintBitmap(aCenterBox, rUpdateBox, +1,+1, 0,0, false, pBottomRight, pBackground);
|
||||||
|
|
||||||
// Paint the title.
|
// Paint the title.
|
||||||
PaintTitle(rsTitle, pStyle, rUpdateBox, aOuterBox, aInnerBox, false);
|
PaintTitle(rsTitle, pStyle, rUpdateBox, aOuterBox, aInnerBox);
|
||||||
|
|
||||||
// In a double buffering environment request to make the changes visible.
|
// In a double buffering environment request to make the changes visible.
|
||||||
Reference<rendering::XSpriteCanvas> xSpriteCanvas (mxCanvas, UNO_QUERY);
|
Reference<rendering::XSpriteCanvas> xSpriteCanvas (mxCanvas, UNO_QUERY);
|
||||||
@@ -504,8 +503,7 @@ void PresenterPaneBorderPainter::Renderer::PaintTitle (
|
|||||||
const std::shared_ptr<RendererPaneStyle>& rpStyle,
|
const std::shared_ptr<RendererPaneStyle>& rpStyle,
|
||||||
const awt::Rectangle& rUpdateBox,
|
const awt::Rectangle& rUpdateBox,
|
||||||
const awt::Rectangle& rOuterBox,
|
const awt::Rectangle& rOuterBox,
|
||||||
const awt::Rectangle& rInnerBox,
|
const awt::Rectangle& rInnerBox)
|
||||||
bool bPaintBackground)
|
|
||||||
{
|
{
|
||||||
if ( ! mxCanvas.is())
|
if ( ! mxCanvas.is())
|
||||||
return;
|
return;
|
||||||
@@ -566,35 +564,14 @@ void PresenterPaneBorderPainter::Renderer::PaintTitle (
|
|||||||
Sequence<double>(4),
|
Sequence<double>(4),
|
||||||
rendering::CompositeOperation::SOURCE);
|
rendering::CompositeOperation::SOURCE);
|
||||||
|
|
||||||
if (bPaintBackground)
|
PresenterCanvasHelper::SetDeviceColor(
|
||||||
{
|
|
||||||
PresenterCanvasHelper::SetDeviceColor(aRenderState, util::Color(0x00ffffff));
|
|
||||||
Sequence<Sequence<geometry::RealPoint2D> > aPolygons(1);
|
|
||||||
aPolygons[0] = Sequence<geometry::RealPoint2D>(4);
|
|
||||||
aPolygons[0][0] = geometry::RealPoint2D(0, -nTextHeight);
|
|
||||||
aPolygons[0][1] = geometry::RealPoint2D(0, 0);
|
|
||||||
aPolygons[0][2] = geometry::RealPoint2D(nTextWidth, 0);
|
|
||||||
aPolygons[0][3] = geometry::RealPoint2D(nTextWidth, -nTextHeight);
|
|
||||||
Reference<rendering::XPolyPolygon2D> xPolygon (
|
|
||||||
mxCanvas->getDevice()->createCompatibleLinePolyPolygon(aPolygons), UNO_QUERY);
|
|
||||||
if (xPolygon.is())
|
|
||||||
xPolygon->setClosed(0, sal_True);
|
|
||||||
mxCanvas->fillPolyPolygon(
|
|
||||||
xPolygon,
|
|
||||||
maViewState,
|
|
||||||
aRenderState);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
PresenterCanvasHelper::SetDeviceColor(
|
|
||||||
aRenderState,
|
aRenderState,
|
||||||
rpStyle->mpFont->mnColor);
|
rpStyle->mpFont->mnColor);
|
||||||
|
|
||||||
mxCanvas->drawTextLayout (
|
mxCanvas->drawTextLayout (
|
||||||
xLayout,
|
xLayout,
|
||||||
maViewState,
|
maViewState,
|
||||||
aRenderState);
|
aRenderState);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<RendererPaneStyle>
|
std::shared_ptr<RendererPaneStyle>
|
||||||
|
@@ -186,14 +186,13 @@ void PresenterScrollBar::SetThumbPosition (
|
|||||||
double nPosition,
|
double nPosition,
|
||||||
const bool bAsynchronousUpdate)
|
const bool bAsynchronousUpdate)
|
||||||
{
|
{
|
||||||
SetThumbPosition(nPosition, bAsynchronousUpdate, true, true);
|
SetThumbPosition(nPosition, bAsynchronousUpdate, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PresenterScrollBar::SetThumbPosition (
|
void PresenterScrollBar::SetThumbPosition (
|
||||||
double nPosition,
|
double nPosition,
|
||||||
const bool bAsynchronousUpdate,
|
const bool bAsynchronousUpdate,
|
||||||
const bool bValidate,
|
const bool bValidate)
|
||||||
const bool bNotify)
|
|
||||||
{
|
{
|
||||||
if (bValidate)
|
if (bValidate)
|
||||||
nPosition = ValidateThumbPosition(nPosition);
|
nPosition = ValidateThumbPosition(nPosition);
|
||||||
@@ -204,8 +203,7 @@ void PresenterScrollBar::SetThumbPosition (
|
|||||||
|
|
||||||
UpdateBorders();
|
UpdateBorders();
|
||||||
Repaint(GetRectangle(Total), bAsynchronousUpdate);
|
Repaint(GetRectangle(Total), bAsynchronousUpdate);
|
||||||
if (bNotify)
|
NotifyThumbPositionChange();
|
||||||
NotifyThumbPositionChange();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,7 +442,7 @@ void SAL_CALL PresenterScrollBar::mouseDragged (const css::awt::MouseEvent& rEve
|
|||||||
UpdateDragAnchor(nDragDistance);
|
UpdateDragAnchor(nDragDistance);
|
||||||
if (nDragDistance != 0)
|
if (nDragDistance != 0)
|
||||||
{
|
{
|
||||||
SetThumbPosition(mnThumbPosition + nDragDistance, false, true, true);
|
SetThumbPosition(mnThumbPosition + nDragDistance, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -228,8 +228,7 @@ protected:
|
|||||||
void SetThumbPosition (
|
void SetThumbPosition (
|
||||||
double nPosition,
|
double nPosition,
|
||||||
const bool bAsynchronousRepaint,
|
const bool bAsynchronousRepaint,
|
||||||
const bool bValidate,
|
const bool bValidate);
|
||||||
const bool bNotify);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class MousePressRepeater;
|
class MousePressRepeater;
|
||||||
|
Reference in New Issue
Block a user