Kaydet (Commit) 08ab1f46 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:oncevar extend to tools/gen.hxx types

Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2
Reviewed-on: https://gerrit.libreoffice.org/50283Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 9bc87143
......@@ -472,8 +472,7 @@ void DlgEditor::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle
aPaintRect = rRect;
mnPaintGuard++;
Size aMacSize;
if (bFirstDraw && rWindow.IsVisible() && (rRenderContext.GetOutputSize() != aMacSize))
if (bFirstDraw && rWindow.IsVisible() && (rRenderContext.GetOutputSize() != Size()))
{
bFirstDraw = false;
......
......@@ -647,8 +647,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
SbxDimArray* pArray = nullptr;
Sequence< sal_Int32 > indices;
Sequence< sal_Int32 > sizes;
sal_Int32 dimension = 0;
implSequenceToMultiDimArray( pArray, indices, sizes, aWrap.Array, dimension, aWrap.IsZeroIndex, nullptr );
implSequenceToMultiDimArray( pArray, indices, sizes, aWrap.Array, /*dimension*/0, aWrap.IsZeroIndex, nullptr );
if ( pArray )
{
SbxDimArrayRef xArray = pArray;
......
......@@ -334,7 +334,14 @@ bool OnceVar::VisitVarDecl( const VarDecl* varDecl )
&& !tc.Class("OString").Namespace("rtl").GlobalNamespace()
&& !tc.Class("OUString").Namespace("rtl").GlobalNamespace()
&& !tc.Class("OStringBuffer").Namespace("rtl").GlobalNamespace()
&& !tc.Class("OUStringBuffer").Namespace("rtl").GlobalNamespace())
&& !tc.Class("OUStringBuffer").Namespace("rtl").GlobalNamespace()
&& !tc.Class("Color").GlobalNamespace()
&& !tc.Class("Pair").GlobalNamespace()
&& !tc.Class("Point").GlobalNamespace()
&& !tc.Class("Size").GlobalNamespace()
&& !tc.Class("Range").GlobalNamespace()
&& !tc.Class("Selection").GlobalNamespace()
&& !tc.Class("Rectangle").Namespace("tools").GlobalNamespace())
{
return true;
}
......
......@@ -1999,7 +1999,7 @@ void cppuhelper::ServiceManager::preloadImplementations() {
const char *mpFrom;
const char *mpTo;
const char *mpPurpose;
} aMappingLoad[] = {
} const aMappingLoad[] = {
{ "gcc3", "uno", "" },
{ "uno", "gcc3", "" },
};
......
......@@ -359,7 +359,6 @@ int SvxHlinkDlgMarkWnd::FillTree( const uno::Reference< container::XNameAccess >
const sal_uLong nLinks = aNames.getLength();
const OUString* pNames = aNames.getConstArray();
Color aMaskColor( COL_LIGHTMAGENTA );
const OUString aProp_LinkDisplayName( "LinkDisplayName" );
const OUString aProp_LinkTarget( "com.sun.star.document.LinkTarget" );
const OUString aProp_LinkDisplayBitmap( "LinkDisplayBitmap" );
......@@ -410,7 +409,7 @@ int SvxHlinkDlgMarkWnd::FillTree( const uno::Reference< container::XNameAccess >
aXBitmap( xTarget->getPropertyValue( aProp_LinkDisplayBitmap ), uno::UNO_QUERY );
if( aXBitmap.is() )
{
Image aBmp(BitmapEx(VCLUnoHelper::GetBitmap(aXBitmap).GetBitmap(), aMaskColor));
Image aBmp(BitmapEx(VCLUnoHelper::GetBitmap(aXBitmap).GetBitmap(), /*mask*/COL_LIGHTMAGENTA));
// insert Displayname into treelist with bitmaps
pEntry = mpLbTree->InsertEntry ( aStrDisplayname,
aBmp, aBmp,
......
......@@ -547,8 +547,7 @@ void ColorConfigWindow_Impl::CreateEntries()
void ColorConfigWindow_Impl::SetAppearance ()
{
Color TempColor(COL_TRANSPARENT);
Wallpaper const aTransparentWall(TempColor);
Wallpaper const aTransparentWall(COL_TRANSPARENT);
StyleSettings const& rStyleSettings = GetSettings().GetStyleSettings();
Color const aBackColor = rStyleSettings.GetHighContrastMode() ?
rStyleSettings.GetShadowColor() : Color(COL_LIGHTGRAY);
......
......@@ -374,8 +374,7 @@ bool SvxTransparenceTabPage::FillItemSet(SfxItemSet* rAttrs)
// disable unused XFillFloatTransparenceItem
if(bSwitchOffGradient && (bGradActive || bGradUsed))
{
Color aColor(COL_BLACK);
XGradient aGrad(aColor, Color(COL_WHITE));
XGradient aGrad(COL_BLACK, Color(COL_WHITE));
aGrad.SetStartIntens(100);
aGrad.SetEndIntens(100);
XFillFloatTransparenceItem aItem(aGrad);
......
......@@ -3406,7 +3406,7 @@ unsigned char* doc_renderFont(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pTh
if (*pFontWidth > 0 && *pFontHeight > 0)
{
DrawTextFlags nStyle =
DrawTextFlags const nStyle =
DrawTextFlags::Center
| DrawTextFlags::VCenter
| DrawTextFlags::MultiLine
......
......@@ -984,8 +984,7 @@ namespace emfio
void MtfTools::ImplSetNonPersistentLineColorTransparenz()
{
Color aColor( COL_TRANSPARENT);
WinMtfLineStyle aTransparentLine( aColor, true );
WinMtfLineStyle aTransparentLine( COL_TRANSPARENT, true );
if ( ! ( maLatestLineStyle == aTransparentLine ) )
{
maLatestLineStyle = aTransparentLine;
......
......@@ -508,8 +508,7 @@ IMPL_LINK_NOARG( BibToolBar, MenuHdl, ToolBox*, void)
SendDispatch(nTBC_BT_AUTOFILTER, aPropVal);
}
Point aPoint;
MouseEvent aLeave( aPoint, 0, MouseEventModifiers::LEAVEWINDOW | MouseEventModifiers::SYNTHETIC );
MouseEvent aLeave( Point(), 0, MouseEventModifiers::LEAVEWINDOW | MouseEventModifiers::SYNTHETIC );
MouseMove( aLeave );
SetItemDown(nTBC_BT_AUTOFILTER, false);
......
......@@ -138,10 +138,9 @@ bool PSDReader::ReadPSD(Graphic & rGraphic )
if ( mnXResFixed && mnYResFixed )
{
Point aEmptyPoint;
Fraction aFractX( 1, mnXResFixed >> 16 );
Fraction aFractY( 1, mnYResFixed >> 16 );
MapMode aMapMode( MapUnit::MapInch, aEmptyPoint, aFractX, aFractY );
MapMode aMapMode( MapUnit::MapInch, Point(), aFractX, aFractY );
Size aPrefSize = OutputDevice::LogicToLogic(aBitmapSize, aMapMode, MapMode(MapUnit::Map100thMM));
rGraphic.SetPrefSize( aPrefSize );
rGraphic.SetPrefMapMode( MapMode( MapUnit::Map100thMM ) );
......
......@@ -196,8 +196,6 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
}
}
Point aTextRefPoint;
if( rObj.GetType() == "drawing.Group" )
{
Reference< XIndexAccess > xXIndexAccess( rObj.GetShapeRef(), UNO_QUERY );
......@@ -700,7 +698,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
if( bAdditionalText )
{
mpEscherEx->EndShape( nShapeType, nShapeID );
ImplWriteAdditionalText( rObj, aTextRefPoint );
ImplWriteAdditionalText( rObj, Point() );
}
} while ( false );
......
......@@ -2558,9 +2558,8 @@ void DffPropertyReader::ApplyCustomShapeGeometryAttributes( SvStream& rIn, SfxIt
void DffPropertyReader::ApplyAttributes( SvStream& rIn, SfxItemSet& rSet ) const
{
tools::Rectangle aEmptyRect;
DffRecordHeader aHdTemp;
DffObjData aDffObjTemp( aHdTemp, aEmptyRect, 0 );
DffObjData aDffObjTemp( aHdTemp, tools::Rectangle(), 0 );
ApplyAttributes( rIn, rSet, aDffObjTemp );
}
......
......@@ -1007,8 +1007,7 @@ bool PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData&
basegfx::B2DPolygon aSize(tools::Polygon(tools::Rectangle(Point(0, 0), rMtf.GetPrefSize())).getB2DPolygon());
basegfx::B2DPolygon aSizePDF(OutputDevice::LogicToLogic(aSize, rMtf.GetPrefMapMode(), MapMode(MapUnit::MapPoint)));
basegfx::B2DRange aRangePDF(aSizePDF.getB2DRange());
Point aOrigin;
tools::Rectangle aPageRect( aOrigin, rMtf.GetPrefSize() );
tools::Rectangle aPageRect( Point(), rMtf.GetPrefSize() );
rWriter.NewPage( aRangePDF.getWidth(), aRangePDF.getHeight() );
rWriter.SetMapMode( rMtf.GetPrefMapMode() );
......
......@@ -2714,8 +2714,7 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& rBmpEx,
if( !!rBmpEx )
{
BitmapEx aBmpEx( rBmpEx );
Point aPoint;
const tools::Rectangle aBmpRect( aPoint, rBmpEx.GetSizePixel() );
const tools::Rectangle aBmpRect( Point(), rBmpEx.GetSizePixel() );
const tools::Rectangle aSrcRect( rSrcPt, rSrcSz );
if( aSrcRect != aBmpRect )
......
......@@ -252,9 +252,8 @@ void SAL_CALL MenuBarManager::elementInserted( const css::ui::ConfigurationEvent
return;
sal_Int16 nImageType = sal_Int16();
sal_Int16 nCurrentImageType = css::ui::ImageType::SIZE_LARGE;
if (( Event.aInfo >>= nImageType ) &&
( nImageType == nCurrentImageType ))
( nImageType == css::ui::ImageType::SIZE_LARGE ))
RequestImages();
}
......
......@@ -1088,11 +1088,10 @@ void ZipPackage::WriteContentTypes( ZipOutputStream& aZipOut, const vector< uno:
// Convert vector into a uno::Sequence
// TODO/LATER: use Default entries in future
uno::Sequence< beans::StringPair > aDefaultsSequence(aManList.size());
uno::Sequence< beans::StringPair > aDefaultsSequence(1);
// Add at least the application/xml default entry.
aDefaultsSequence[0].First = "xml";
aDefaultsSequence[0].Second= "application/xml";
sal_Int32 nDefSeqLength = 1;
uno::Sequence< beans::StringPair > aOverridesSequence(aManList.size());
sal_Int32 nOverSeqLength = 0;
......@@ -1117,7 +1116,6 @@ void ZipPackage::WriteContentTypes( ZipOutputStream& aZipOut, const vector< uno:
}
}
aOverridesSequence.realloc(nOverSeqLength);
aDefaultsSequence.realloc(nDefSeqLength);
::comphelper::OFOPXMLHelper::WriteContentSequence(
xConTypeOutStream, aDefaultsSequence, aOverridesSequence, m_xContext );
......
......@@ -239,8 +239,7 @@ IMPL_LINK(Condition, DropdownClick, ToolBox*, pToolBox, void)
IMPL_LINK_NOARG( Condition, OnFormatAction, ToolBox*, void )
{
Color aCol(COL_AUTO);
ApplyCommand(mapToolbarItemToSlotId(m_pActions->GetCurItemId()),aCol);
ApplyCommand(mapToolbarItemToSlotId(m_pActions->GetCurItemId()),COL_AUTO);
}
IMPL_LINK( Condition, OnConditionAction, Button*, _pClickedButton, void )
......
......@@ -214,7 +214,6 @@ void ScStyleSheetPool::CreateStandardStyles()
// Add new entries even for CopyStdStylesFrom
Color aColBlack ( COL_BLACK );
Color aColGrey ( COL_LIGHTGRAY );
OUString aStr;
sal_Int32 nStrLen;
OUString aHelpFile;//which text???
......@@ -338,7 +337,7 @@ void ScStyleSheetPool::CreateStandardStyles()
pHFSetItem = new SvxSetItem( pSet->Get( ATTR_PAGE_HEADERSET ) );
pHFSet = &(pHFSetItem->GetItemSet());
pHFSet->Put( SvxBrushItem( aColGrey, ATTR_BACKGROUND ) );
pHFSet->Put( SvxBrushItem( COL_LIGHTGRAY, ATTR_BACKGROUND ) );
pHFSet->Put( aBoxItem );
pHFSet->Put( aBoxInfoItem );
pHFSetItem->SetWhich(ATTR_PAGE_HEADERSET);
......
......@@ -885,10 +885,9 @@ ScAutoFormat::ScAutoFormat() :
aBox.SetLine(&aLine, SvxBoxItemLine::BOTTOM);
Color aWhite(COL_WHITE);
Color aBlue(COL_BLUE);
SvxColorItem aWhiteText( aWhite, ATTR_FONT_COLOR );
SvxColorItem aBlackText( aBlack, ATTR_FONT_COLOR );
SvxBrushItem aBlueBack( aBlue, ATTR_BACKGROUND );
SvxBrushItem aBlueBack( COL_BLUE, ATTR_BACKGROUND );
SvxBrushItem aWhiteBack( aWhite, ATTR_BACKGROUND );
SvxBrushItem aGray70Back( Color(0x4d, 0x4d, 0x4d), ATTR_BACKGROUND );
SvxBrushItem aGray20Back( Color(0xcc, 0xcc, 0xcc), ATTR_BACKGROUND );
......
......@@ -1127,8 +1127,7 @@ ScPagePreviewCountData::ScPagePreviewCountData( const ScPreviewLocationData& rDa
Size aOutputSize;
if ( pSizeWindow )
aOutputSize = pSizeWindow->GetOutputSizePixel();
Point aPoint;
aVisRect = tools::Rectangle( aPoint, aOutputSize );
aVisRect = tools::Rectangle( Point(), aOutputSize );
tools::Rectangle aObjRect;
......@@ -1236,8 +1235,7 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint
vcl::Window* pSizeWindow = mpViewShell->GetWindow();
if ( pSizeWindow )
aOutputSize = pSizeWindow->GetOutputSizePixel();
Point aPoint;
tools::Rectangle aVisRect( aPoint, aOutputSize );
tools::Rectangle aVisRect( Point(), aOutputSize );
GetNotesChildren()->DataChanged(aVisRect);
GetShapeChildren()->DataChanged();
......@@ -1273,8 +1271,7 @@ void ScAccessibleDocumentPagePreview::Notify( SfxBroadcaster& rBC, const SfxHint
vcl::Window* pSizeWindow = mpViewShell->GetWindow();
if ( pSizeWindow )
aOutputSize = pSizeWindow->GetOutputSizePixel();
Point aPoint;
tools::Rectangle aVisRect( aPoint, aOutputSize );
tools::Rectangle aVisRect( Point(), aOutputSize );
GetNotesChildren()->DataChanged(aVisRect);
GetShapeChildren()->VisAreaChanged();
......
......@@ -405,8 +405,7 @@ void ScAccessiblePreviewHeaderCell::FillTableInfo() const
vcl::Window* pWindow = mpViewShell->GetWindow();
if ( pWindow )
aOutputSize = pWindow->GetOutputSizePixel();
Point aPoint;
tools::Rectangle aVisRect( aPoint, aOutputSize );
tools::Rectangle aVisRect( Point(), aOutputSize );
mpTableInfo = new ScPreviewTableInfo;
mpViewShell->GetLocationData().GetTableInfo( aVisRect, *mpTableInfo );
......
......@@ -636,8 +636,7 @@ void ScAccessiblePreviewTable::FillTableInfo() const
vcl::Window* pWindow = mpViewShell->GetWindow();
if ( pWindow )
aOutputSize = pWindow->GetOutputSizePixel();
Point aPoint;
tools::Rectangle aVisRect( aPoint, aOutputSize );
tools::Rectangle aVisRect( Point(), aOutputSize );
mpTableInfo = new ScPreviewTableInfo;
mpViewShell->GetLocationData().GetTableInfo( aVisRect, *mpTableInfo );
......
......@@ -265,9 +265,8 @@ bool ScPreviewViewForwarder::IsValid() const
tools::Rectangle ScPreviewViewForwarder::GetVisArea() const
{
tools::Rectangle aVisArea;
OSL_FAIL("should be implemented in an abrevated class");
return aVisArea;
return tools::Rectangle();
}
Point ScPreviewViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const
......@@ -325,8 +324,7 @@ tools::Rectangle ScPreviewViewForwarder::GetVisRect() const
vcl::Window* pWindow = mpViewShell->GetWindow();
if ( pWindow )
aOutputSize = pWindow->GetOutputSizePixel();
Point aPoint;
tools::Rectangle aVisRect( aPoint, aOutputSize );
tools::Rectangle aVisRect( Point(), aOutputSize );
return aVisRect;
}
return tools::Rectangle();
......@@ -1274,8 +1272,7 @@ SvxTextForwarder* ScAccessiblePreviewHeaderCellTextData::GetTextForwarder()
vcl::Window* pWindow = mpViewShell->GetWindow();
if ( pWindow )
aOutputSize = pWindow->GetOutputSizePixel();
Point aPoint;
tools::Rectangle aVisRect( aPoint, aOutputSize );
tools::Rectangle aVisRect( Point(), aOutputSize );
Size aSize(mpViewShell->GetLocationData().GetHeaderCellOutputRect(aVisRect, aCellPos, mbColHeader).GetSize());
if (pWindow)
aSize = pWindow->PixelToLogic(aSize, pEditEngine->GetRefMapMode());
......@@ -1501,8 +1498,7 @@ SvxTextForwarder* ScAccessibleNoteTextData::GetTextForwarder()
vcl::Window* pWindow = mpViewShell->GetWindow();
if ( pWindow )
aOutputSize = pWindow->GetOutputSizePixel();
Point aPoint;
tools::Rectangle aVisRect( aPoint, aOutputSize );
tools::Rectangle aVisRect( Point(), aOutputSize );
Size aSize(mpViewShell->GetLocationData().GetNoteInRangeOutputRect(aVisRect, mbMarkNote, maCellPos).GetSize());
if (pWindow)
aSize = pWindow->PixelToLogic(aSize, mpEditEngine->GetRefMapMode());
......
......@@ -744,8 +744,7 @@ void ScDrawTransferObj::InitDocShell()
}
}
Point aTmpPoint;
tools::Rectangle aDestArea( aTmpPoint, aSrcSize );
tools::Rectangle aDestArea( Point(), aSrcSize );
pDocSh->SetVisArea( aDestArea );
ScViewOptions aViewOpt( rDestDoc.GetViewOptions() );
......
......@@ -102,8 +102,7 @@ void ScTransferObj::PaintToDev( OutputDevice* pDev, ScDocument* pDoc, double nPr
if (!pDoc)
return;
Point aPoint;
tools::Rectangle aBound( aPoint, pDev->GetOutputSize() ); //! use size from clip area?
tools::Rectangle aBound( Point(), pDev->GetOutputSize() ); //! use size from clip area?
ScViewData aViewData(nullptr,nullptr);
aViewData.InitData( pDoc );
......
......@@ -988,8 +988,7 @@ void ScCsvGrid::Command( const CommandEvent& rCEvt )
break;
case CommandEventId::Wheel:
{
Point aPoint;
tools::Rectangle aRect( aPoint, maWinSize );
tools::Rectangle aRect( Point(), maWinSize );
if( aRect.IsInside( rCEvt.GetMousePosPixel() ) )
{
const CommandWheelData* pData = rCEvt.GetWheelData();
......
......@@ -410,8 +410,7 @@ void ScCsvRuler::MouseMove( const MouseEvent& rMEvt )
}
else
{
Point aPoint;
tools::Rectangle aRect( aPoint, maWinSize );
tools::Rectangle aRect( Point(), maWinSize );
if( !IsVisibleSplitPos( nPos ) || !aRect.IsInside( rMEvt.GetPosPixel() ) )
// if focused, keep old cursor position for key input
nPos = HasFocus() ? GetRulerCursorPos() : CSV_POS_INVALID;
......
......@@ -507,8 +507,7 @@ void ScAutoFmtPreview::DoPaint(vcl::RenderContext& rRenderContext)
Size aWndSize(GetSizePixel());
vcl::Font aFont(aVD->GetFont());
Color aBackCol(rRenderContext.GetSettings().GetStyleSettings().GetWindowColor());
Point aTmpPoint;
tools::Rectangle aRect(aTmpPoint, aWndSize);
tools::Rectangle aRect(Point(), aWndSize);
aFont.SetTransparent( true );
aVD->SetFont(aFont);
......
......@@ -92,11 +92,10 @@ void CellLineStyleValueSet::UserDraw( const UserDrawEvent& rUDEvt )
if( nSelItem == nItemId )
{
Color aBackColor(50,107,197);
tools::Rectangle aBackRect = aRect;
aBackRect.AdjustTop(3 );
aBackRect.AdjustBottom( -2 );
pDev->SetFillColor(aBackColor);
pDev->SetFillColor(Color(50,107,197));
pDev->DrawRect(aBackRect);
}
else
......
......@@ -1905,8 +1905,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
{
// Similar to as in and when calling ScTransferObj::PaintToDev()
Point aPoint;
tools::Rectangle aBound( aPoint, pDev->GetOutputSize());
tools::Rectangle aBound( Point(), pDev->GetOutputSize());
ScViewData aViewData(nullptr,nullptr);
aViewData.InitData( &rDoc );
......@@ -4496,11 +4495,10 @@ void SAL_CALL ScScenariosObj::addNewByName( const OUString& aName,
}
}
Color aColor( COL_LIGHTGRAY ); // Default
ScScenarioFlags const nFlags = ScScenarioFlags::ShowFrame | ScScenarioFlags::PrintFrame
| ScScenarioFlags::TwoWay | ScScenarioFlags::Protected;
pDocShell->MakeScenario( nTab, aName, aComment, aColor, nFlags, aMarkData );
pDocShell->MakeScenario( nTab, aName, aComment, COL_LIGHTGRAY, nFlags, aMarkData );
}
}
......
......@@ -301,7 +301,6 @@ ScVbaValidation::getFormula1()
ScRefFlags nFlags = ScRefFlags::ZERO;
ScRangeList aCellRanges;
formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1;
ScDocShell* pDocSh = excel::GetDocShellFromRange( m_xRange );
// in calc validation formula is either a range or formula
......@@ -309,7 +308,7 @@ ScVbaValidation::getFormula1()
// In VBA both formula and address can have a leading '='
// in result of getFormula1, however it *seems* that a named range or
// real formula has to (or is expected to) have the '='
if ( pDocSh && !ScVbaRange::getCellRangesForAddress( nFlags, sString, pDocSh, aCellRanges, eConv, 0 ) )
if ( pDocSh && !ScVbaRange::getCellRangesForAddress( nFlags, sString, pDocSh, aCellRanges, formula::FormulaGrammar::CONV_XL_A1, 0 ) )
sString = "=" + sString;
return sString;
}
......
......@@ -264,9 +264,8 @@ void ScDrawView::UpdateWorkArea()
SdrPage* pPage = GetModel()->GetPage(static_cast<sal_uInt16>(nTab));
if (pPage)
{
Point aPos;
Size aPageSize( pPage->GetSize() );
tools::Rectangle aNewArea( aPos, aPageSize );
tools::Rectangle aNewArea( Point(), aPageSize );
if ( aPageSize.Width() < 0 )
{
// RTL: from max.negative (left) to zero (right)
......
......@@ -258,9 +258,8 @@ void ScHeaderControl::Paint( vcl::RenderContext& /*rRenderContext*/, const tools
aBoldFont.SetColor( aSelTextColor );
SetTextColor( ( bBoldSet && !bHighContrast ) ? aSelTextColor : aTextColor );
Color aBlack( COL_BLACK );
Color aSelLineColor = rStyleSettings.GetHighlightColor();
aSelLineColor.Merge( aBlack, 0xe0 ); // darken just a little bit
aSelLineColor.Merge( COL_BLACK, 0xe0 ); // darken just a little bit
bool bLayoutRTL = IsLayoutRTL();
long nLayoutSign = bLayoutRTL ? -1 : 1;
......@@ -707,8 +706,7 @@ void ScHeaderControl::MouseButtonDown( const MouseEvent& rMEvt )
else
{
pSelEngine->SetWindow( this );
Point aPoint;
tools::Rectangle aVis( aPoint,GetOutputSizePixel() );
tools::Rectangle aVis( Point(), GetOutputSizePixel() );
if (bVertical)
{
aVis.SetLeft( LONG_MIN );
......
......@@ -514,8 +514,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
rDefPattern.FillEditItemSet(pEditDefaults);
pEditEng->SetDefaults(pEditDefaults);
Color aTextColor(COL_LIGHTGRAY);
pEditDefaults->Put(SvxColorItem(aTextColor, EE_CHAR_COLOR));
pEditDefaults->Put(SvxColorItem(COL_LIGHTGRAY, EE_CHAR_COLOR));
OUString aEmptyMsg;
if (mbHasEmptyRangeTable)
......
......@@ -279,9 +279,8 @@ public:
OUString SwarmSolver::getResourceString(const char* pId)
{
OUString sString;
if (!pId)
return sString;
return OUString();
return Translate::get(pId, Translate::Create("scc"));
}
......
......@@ -167,9 +167,8 @@ void SdDrawDocument::CreateLayoutTemplates()
rISet.Put( XFillGradientItem( aNullGrad) );
rISet.Put(XFillHatchItem(aNullHatch));
Size aNullSize( 32, 32 );
Color aNullColor( COL_WHITE );
Bitmap aNullBmp( aNullSize, 8 );
aNullBmp.Erase( aNullColor );
aNullBmp.Erase( COL_WHITE );
rISet.Put(XFillBitmapItem(Graphic(aNullBmp)));
// Shadow attributes (Drawing Engine)
......@@ -401,8 +400,7 @@ void SdDrawDocument::CreateLayoutTemplates()
// Don't get color from the color table, because the color might have been
// deleted or changed there
Color aOrange4(255, 204, 153);
pISet->Put(XFillColorItem(OUString(), aOrange4));
pISet->Put(XFillColorItem(OUString(), Color(255, 204, 153))); // orange
pISet->Put(makeSdrShadowItem(true));
pISet->Put(makeSdrShadowColorItem(COL_GRAY));
......
......@@ -828,8 +828,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj )
{
case css::drawing::FillStyle_GRADIENT :
{
Point aEmptyPoint;
::tools::Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) );
::tools::Rectangle aRect( Point(), Size( 28000, 21000 ) );
EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect );
aPropOpt.CreateGradientProperties( mXPropSet );
aPropOpt.GetOpt( ESCHER_Prop_fillColor, nBackgroundColor );
......@@ -851,8 +850,7 @@ void PPTWriter::ImplWritePortions( SvStream& rOut, TextObj& rTextObj )
{
case css::drawing::FillStyle_GRADIENT :
{
Point aEmptyPoint;
::tools::Rectangle aRect( aEmptyPoint, Size( 28000, 21000 ) );
::tools::Rectangle aRect( Point(), Size( 28000, 21000 ) );
EscherPropertyContainer aPropOpt( mpPptEscherEx->GetGraphicProvider(), mpPicStrm, aRect );
aPropOpt.CreateGradientProperties( mXBackgroundPropSet );
aPropOpt.GetOpt( ESCHER_Prop_fillColor, nBackgroundColor );
......
......@@ -450,8 +450,7 @@ void AnnotationTag::addCustomHandles( SdrHdlList& rHandlerList )
if( mxAnnotation.is() )
{
SmartTagReference xThis( this );
Point aPoint;
AnnotationHdl* pHdl = new AnnotationHdl( xThis, mxAnnotation, aPoint );
AnnotationHdl* pHdl = new AnnotationHdl( xThis, mxAnnotation, Point() );
pHdl->SetObjHdlNum( SMART_TAG_HDL_NUM );
pHdl->SetPageView( mrView.GetSdrPageView() );
......
......@@ -82,10 +82,9 @@ void SdInsertPagesObjsDlg::Reset()
}
else
{
Color aColor( COL_WHITE );
BitmapEx aBmpText(BMP_DOC_TEXT);
//to-do, check if this is already transparent and remove intermedia bitmapex if it is
Image aImgText(BitmapEx(aBmpText.GetBitmap(), aColor));
Image aImgText(BitmapEx(aBmpText.GetBitmap(), COL_WHITE));
m_pLbTree->InsertEntry( rName, aImgText, aImgText );
}
......
......@@ -273,8 +273,7 @@ void CreateTableFromRTF( SvStream& rStream, SdDrawDocument* pModel )
if( pPage )
{
Size aSize( 200, 200 );
Point aPos;
::tools::Rectangle aRect (aPos, aSize);
::tools::Rectangle aRect (Point(), aSize);
sdr::table::SdrTableObj* pObj = new sdr::table::SdrTableObj( pModel, aRect, 1, 1 );
pObj->NbcSetStyleSheet( pModel->GetDefaultStyleSheet(), true );
apply_table_style( pObj, pModel, OUString() );
......
......@@ -1118,10 +1118,9 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName )
std::shared_ptr<GDIMetaFile> xMetaFile = pDocShell->GetPreviewMetaFile();
if (xMetaFile)
{
Point aPoint;
Size aSize( GetPage()->GetSize() );
xMetaFile->AddAction( static_cast<MetaAction*>(new MetaFillColorAction( COL_WHITE, true )), 0 );
xMetaFile->AddAction( static_cast<MetaAction*>(new MetaRectAction( ::tools::Rectangle( aPoint, aSize ) )), 1 );
xMetaFile->AddAction( static_cast<MetaAction*>(new MetaRectAction( ::tools::Rectangle( Point(), aSize ) )), 1 );
xMetaFile->SetPrefMapMode(MapMode(MapUnit::Map100thMM));
xMetaFile->SetPrefSize( aSize );
......
......@@ -647,8 +647,7 @@ void DrawViewShell::AttrExec (SfxRequest &rReq)
if (i >= nCounts)
{
Color aBlack (0, 0, 0);
XHatch aHatch (aBlack, static_cast<css::drawing::HatchStyle>(pStyle->GetValue ()), pDistance->GetValue (),
XHatch aHatch (Color(0), static_cast<css::drawing::HatchStyle>(pStyle->GetValue ()), pDistance->GetValue (),
pAngle->GetValue () * 10);
pHatchList->Insert(o3tl::make_unique<XHatchEntry>(aHatch, pName->GetValue()));
......
......@@ -113,8 +113,7 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, vcl::Window* pWindow, OutlineVie
}
mpOutlinerView[0] = new OutlinerView(&mrOutliner, pWindow);
::tools::Rectangle aNullRect;
mpOutlinerView[0]->SetOutputArea(aNullRect);
mpOutlinerView[0]->SetOutputArea(::tools::Rectangle());
mrOutliner.SetUpdateMode(false);
mrOutliner.InsertView(mpOutlinerView[0], EE_APPEND);
......
......@@ -689,7 +689,7 @@ static bool impl_showOnlineHelp( const OUString& rURL )
static bool impl_showOfflineHelp( const OUString& rURL )
{
OUString aBaseInstallPath = getHelpRootURL();
OUString aInternal( "vnd.sun.star.help://" );
OUString const aInternal( "vnd.sun.star.help://" );
OUString aHelpLink( aBaseInstallPath + "/" + utl::ConfigManager::getProductVersion() + "/index.html?" );
aHelpLink += rURL.copy( aInternal.getLength() );
......
......@@ -2317,8 +2317,7 @@ void SfxWorkWindow::EndAutoShow_Impl( Point aPos )
if ( p && p->IsAutoHide(false) )
{
Point aLocalPos = p->ScreenToOutputPixel( aPos );
Point aEmptyPoint;
tools::Rectangle aRect( aEmptyPoint, p->GetSizePixel() );
tools::Rectangle aRect( Point(), p->GetSizePixel() );
if ( !aRect.IsInside( aLocalPos ) )