loplugin:oncevar extend to tools/gen.hxx types

Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2
Reviewed-on: https://gerrit.libreoffice.org/50283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2018-02-24 13:47:25 +02:00
parent 9bc8714308
commit 08ab1f46b1
120 changed files with 165 additions and 297 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -1999,7 +1999,7 @@ void cppuhelper::ServiceManager::preloadImplementations() {
const char *mpFrom;
const char *mpTo;
const char *mpPurpose;
} aMappingLoad[] = {
} const aMappingLoad[] = {
{ "gcc3", "uno", "" },
{ "uno", "gcc3", "" },
};

View File

@ -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,

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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 ) );

View File

@ -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 );

View File

@ -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 );
}

View File

@ -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() );

View File

@ -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 )

View File

@ -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();
}

View File

@ -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 );

View File

@ -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 )

View File

@ -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);

View File

@ -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 );

View File

@ -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();

View File

@ -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 );

View File

@ -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 );

View File

@ -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());

View File

@ -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() );

View File

@ -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 );

View File

@ -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();

View File

@ -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;

View File

@ -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);

View File

@ -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

View File

@ -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 );
}
}

View File

@ -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;
}

View File

@ -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)

View File

@ -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 );

View File

@ -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)

View File

@ -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"));
}

View File

@ -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));

View File

@ -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 );

View File

@ -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() );

View File

@ -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 );
}

View File

@ -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() );

View File

@ -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 );

View File

@ -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()));

View File

@ -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);

View File

@ -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() );

View File

@ -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 ) )
p->FadeOut();
}

View File

@ -825,8 +825,7 @@ awt::Rectangle SAL_CALL ThumbnailViewItemAcc::getBounds()
if( mpParent )
{
tools::Rectangle aRect( mpParent->getDrawArea() );
Point aOrigin;
tools::Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() );
tools::Rectangle aParentRect( Point(), mpParent->mrParent.GetOutputSizePixel() );
aRect.Intersection( aParentRect );

View File

@ -175,9 +175,9 @@ OUString SfxFilter::GetTypeFromStorage(
SotClipboardFormatId nClipId = SotExchange::GetFormat( aDataFlavor );
if ( nClipId != SotClipboardFormatId::NONE )
{
SfxFilterFlags nMust = SfxFilterFlags::IMPORT;
SfxFilterFlags const nMust = SfxFilterFlags::IMPORT;
// template filters shouldn't be detected if not explicitly asked for
SfxFilterFlags nDont = SFX_FILTER_NOTINSTALLED | SfxFilterFlags::TEMPLATEPATH;
SfxFilterFlags const nDont = SFX_FILTER_NOTINSTALLED | SfxFilterFlags::TEMPLATEPATH;
// get filter from storage MediaType
std::shared_ptr<const SfxFilter> pFilter = aMatcher.GetFilter4ClipBoardId( nClipId, nMust, nDont );

View File

@ -69,8 +69,7 @@ Size SfxPreviewBase_Impl::GetOptimalSize() const
void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, GDIMetaFile* pFile)
{
rRenderContext.SetLineColor();
Color aLightGrayCol(COL_LIGHTGRAY);
rRenderContext.SetFillColor(aLightGrayCol);
rRenderContext.SetFillColor(COL_LIGHTGRAY);
rRenderContext.DrawRect(tools::Rectangle(Point(0,0), rRenderContext.GetOutputSize()));
Size aTmpSize = pFile ? pFile->GetPrefSize() : Size(1, 1);
@ -101,10 +100,8 @@ void SfxPreviewWin_Impl::ImpPaint(vcl::RenderContext& rRenderContext, GDIMetaFil
if (pFile)
{
Color aBlackCol(COL_BLACK);
Color aWhiteCol(COL_WHITE);
rRenderContext.SetLineColor(aBlackCol);
rRenderContext.SetFillColor(aWhiteCol);
rRenderContext.SetLineColor(COL_BLACK);
rRenderContext.SetFillColor(COL_WHITE);
rRenderContext.DrawRect(tools::Rectangle(aPoint + Point(FRAME, FRAME), bPoint + Point(FRAME, FRAME)));
pFile->WindStart();
pFile->Play(&rRenderContext, aPoint + Point(FRAME, FRAME), aSize);

View File

@ -599,8 +599,7 @@ void SfxFrame::SetToolSpaceBorderPixel_Impl( const SvBorder& rBorder )
tools::Rectangle SfxFrame::GetTopOuterRectPixel_Impl() const
{
Size aSize( GetWindow().GetOutputSizePixel() );
Point aPoint;
return ( tools::Rectangle ( aPoint, aSize ) );
return tools::Rectangle( Point(), aSize );
}
SfxWorkWindow* SfxFrame::GetWorkWindow_Impl() const

View File

@ -1168,8 +1168,7 @@ void SfxViewFrame::SetBorderPixelImpl
}
else
{
Point aPoint;
tools::Rectangle aEditArea( aPoint, GetWindow().GetOutputSizePixel() );
tools::Rectangle aEditArea( Point(), GetWindow().GetOutputSizePixel() );
aEditArea.AdjustLeft(rBorder.Left() );
aEditArea.AdjustRight( -(rBorder.Right()) );
aEditArea.AdjustTop(rBorder.Top() );

View File

@ -140,11 +140,10 @@ public:
{
// wrap bitmap into GDIMetafile
GDIMetaFileSharedPtr xMtf(new GDIMetaFile);
::Point aEmptyPoint;
::BitmapEx aBmpEx( aGraphic.GetBitmapEx() );
xMtf->AddAction( new MetaBmpExAction( aEmptyPoint,
xMtf->AddAction( new MetaBmpExAction( Point(),
aBmpEx ) );
xMtf->SetPrefSize( aBmpEx.GetPrefSize() );
xMtf->SetPrefMapMode( aBmpEx.GetPrefMapMode() );

View File

@ -554,8 +554,7 @@ IMPL_LINK( SmEditWindow, ScrollHdl, ScrollBar *, /*pScrollBar*/, void )
tools::Rectangle SmEditWindow::AdjustScrollBars()
{
const Size aOut( GetOutputSizePixel() );
Point aPoint;
tools::Rectangle aRect( aPoint, aOut );
tools::Rectangle aRect( Point(), aOut );
if (pVScrollBar && pHScrollBar && pScrollBox)
{

View File

@ -73,8 +73,7 @@ bool SmGetGlyphBoundRect(const vcl::RenderContext &rDev,
pGlyphDev->SetFont(aFnt);
long nTextWidth = rDev.GetTextWidth(rText);
Point aPoint;
tools::Rectangle aResult (aPoint, Size(nTextWidth, rDev.GetTextHeight())),
tools::Rectangle aResult (Point(), Size(nTextWidth, rDev.GetTextHeight())),
aTmp;
bool bSuccess = pGlyphDev->GetTextBoundRect(aTmp, rText);

View File

@ -1015,8 +1015,7 @@ void SAL_CALL SmModel::render(
aPrtPageOffset = Point( static_cast<long>(aPrtPaperSize.Width() * 0.0250),
static_cast<long>(aPrtPaperSize.Height() * 0.0214));
}
Point aZeroPoint;
tools::Rectangle OutputRect( aZeroPoint, aOutputSize );
tools::Rectangle OutputRect( Point(), aOutputSize );
// set minimum top and bottom border

View File

@ -809,8 +809,7 @@ IMPL_LINK_NOARG( SmCmdBoxWindow, InitialFocusTimerHdl, Timer *, void )
void SmCmdBoxWindow::AdjustPosition()
{
Point aPt;
const tools::Rectangle aRect( aPt, GetParent()->GetOutputSizePixel() );
const tools::Rectangle aRect( Point(), GetParent()->GetOutputSizePixel() );
Point aTopLeft( Point( aRect.Left(),
aRect.Bottom() - GetSizePixel().Height() ) );
Point aPos( GetParent()->OutputToScreenPixel( aTopLeft ) );
@ -2021,8 +2020,7 @@ void SmViewShell::ZoomByItemSet(const SfxItemSet *pSet)
{
const MapMode aMap( MapUnit::Map100thMM );
SfxPrinter *pPrinter = GetPrinter( true );
Point aPoint;
tools::Rectangle OutputRect(aPoint, pPrinter->GetOutputSize());
tools::Rectangle OutputRect(Point(), pPrinter->GetOutputSize());
Size OutputSize(pPrinter->LogicToPixel(Size(OutputRect.GetWidth(),
OutputRect.GetHeight()), aMap));
Size GraphicSize(pPrinter->LogicToPixel(GetDoc()->GetSize(), aMap));

View File

@ -349,8 +349,7 @@ void SvtIconChoiceCtrl::SetBackground( const Wallpaper& rPaper )
WallpaperStyle eStyle = aBackground.GetStyle();
Color aBack( aBackground.GetColor());
Color aTrans( COL_TRANSPARENT );
if( aBack == aTrans &&
if( aBack == COL_TRANSPARENT &&
(!aBackground.IsBitmap() ||
aBackground.GetBitmap().IsTransparent() ||
(eStyle != WallpaperStyle::Tile && eStyle != WallpaperStyle::Scale)) )

View File

@ -1143,8 +1143,7 @@ Reference< XAccessible > SvHeaderTabListBox::CreateAccessible()
tools::Rectangle SvHeaderTabListBox::GetFieldCharacterBounds(sal_Int32,sal_Int32,sal_Int32)
{
tools::Rectangle aRect;
return aRect;
return tools::Rectangle();
}
sal_Int32 SvHeaderTabListBox::GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 _nColumnPos,const Point& _rPoint)

View File

@ -3472,8 +3472,7 @@ void SvTreeListBox::EnableAsyncDrag( bool b )
SvTreeListEntry* SvTreeListBox::GetFirstEntryInView() const
{
Point aPos;
return GetEntry( aPos );
return GetEntry( Point() );
}
SvTreeListEntry* SvTreeListBox::GetNextEntryInView(SvTreeListEntry* pEntry ) const

View File

@ -220,7 +220,7 @@ void Calendar::ImplFormat()
if ( (aOutSize.Width() <= 1) || (aOutSize.Height() <= 1) )
return;
OUString a99Text("99");
OUString const a99Text("99");
vcl::Font aOldFont = GetFont();
@ -1577,7 +1577,7 @@ void Calendar::EndSelection()
Size Calendar::CalcWindowSizePixel() const
{
OUString a99Text("99");
OUString const a99Text("99");
vcl::Font aOldFont = GetFont();
Size aSize;

View File

@ -762,8 +762,7 @@ awt::Rectangle SAL_CALL ToolbarMenuEntryAcc::getBounds()
if( mpParent )
{
tools::Rectangle aRect( mpParent->maRect );
Point aOrigin;
tools::Rectangle aParentRect( aOrigin, mpParent->mrMenu.GetOutputSizePixel() );
tools::Rectangle aParentRect( Point(), mpParent->mrMenu.GetOutputSizePixel() );
aRect.Intersection( aParentRect );

View File

@ -951,8 +951,7 @@ awt::Rectangle SAL_CALL ValueItemAcc::getBounds()
if( mpParent )
{
tools::Rectangle aRect( mpParent->mrParent.GetItemRect(mpParent->mnId) );
Point aOrigin;
tools::Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() );
tools::Rectangle aParentRect( Point(), mpParent->mrParent.GetOutputSizePixel() );
aRect.Intersection( aParentRect );

View File

@ -921,8 +921,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice,
// calculate output sizes
if( !pBmpEx )
{
Point aPt;
tools::Rectangle aOutRect( aPt, pOutputDevice->GetOutputSizePixel() );
tools::Rectangle aOutRect( Point(), pOutputDevice->GetOutputSizePixel() );
tools::Rectangle aBmpRect( aOutputPointPix, aOutputSizePix );
if( pOutputDevice->GetOutDevType() == OUTDEV_WINDOW )

View File

@ -109,10 +109,8 @@ void SvResizeHelper::Draw(vcl::RenderContext& rRenderContext)
{
rRenderContext.Push();
rRenderContext.SetMapMode( MapMode() );
Color aColBlack;
Color aFillColor( COL_LIGHTGRAY );
rRenderContext.SetFillColor( aFillColor );
rRenderContext.SetFillColor( COL_LIGHTGRAY );
rRenderContext.SetLineColor();
tools::Rectangle aMoveRects[ 4 ];
@ -121,7 +119,7 @@ void SvResizeHelper::Draw(vcl::RenderContext& rRenderContext)
for (i = 0; i < 4; i++)
rRenderContext.DrawRect(aMoveRects[i]);
// draw handles
rRenderContext.SetFillColor(aColBlack);
rRenderContext.SetFillColor(Color()); // black
tools::Rectangle aRects[ 8 ];
FillHandleRectsPixel(aRects);
for (i = 0; i < 8; i++)

View File

@ -115,7 +115,7 @@ OUString getInstalledLocaleForSystemUILanguage(const css::uno::Sequence<OUString
{
// Get the list of langpacks that this build was configured to include
std::vector<OUString> aPackages;
OUString sAvailableLocales(WITH_LANG);
OUString const sAvailableLocales(WITH_LANG);
std::vector<OUString> aAvailable;
sal_Int32 nIndex = 0;
do

View File

@ -738,8 +738,7 @@ awt::Rectangle SvxShowCharSetItemAcc::implGetBounds( )
if( mpParent )
{
tools::Rectangle aRect( mpParent->maRect );
Point aOrigin;
tools::Rectangle aParentRect( aOrigin, mpParent->mrParent.GetOutputSizePixel() );
tools::Rectangle aParentRect( Point(), mpParent->mrParent.GetOutputSizePixel() );
aRect.Intersection( aParentRect );

View File

@ -134,8 +134,7 @@ void SvxXConnectionPreview::AdaptSize()
aDisplayMap.SetOrigin( aNewPos );
SetMapMode( aDisplayMap );
Point aPos;
MouseEvent aMEvt( aPos, 1, MouseEventModifiers::NONE, MOUSE_RIGHT );
MouseEvent aMEvt( Point(), 1, MouseEventModifiers::NONE, MOUSE_RIGHT );
MouseButtonDown( aMEvt );
}

View File

@ -174,8 +174,7 @@ void ContourWindow::MouseMove( const MouseEvent& rMEvt )
void ContourWindow::MouseButtonUp(const MouseEvent& rMEvt)
{
Point aTmpPoint;
const tools::Rectangle aGraphRect( aTmpPoint, GetGraphicSize() );
const tools::Rectangle aGraphRect( Point(), GetGraphicSize() );
const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) );
bClickValid = aGraphRect.IsInside( aLogPt );

View File

@ -182,8 +182,7 @@ void IMapWindow::SetTargetList( TargetList& rTargetList )
SdrObject* IMapWindow::CreateObj( const IMapObject* pIMapObj )
{
Point aPoint;
tools::Rectangle aClipRect( aPoint, GetGraphicSize() );
tools::Rectangle aClipRect( Point(), GetGraphicSize() );
SdrObject* pSdrObj = nullptr;
IMapObjectPtr pCloneIMapObj;

View File

@ -129,11 +129,10 @@ void LineWidthValueSet::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

View File

@ -585,7 +585,6 @@ void SdrHdl::CreateB2dIAObject()
float fScalingFactor = rOutDev.GetDPIScaleFactor();
basegfx::B2DSize aB2DSize(fSize * fScalingFactor, fSize * fScalingFactor);
Color aHandleStrokeColor(COL_BLACK);
Color aHandleFillColor(COL_LIGHTGREEN);
switch (eColIndex)
{
@ -607,7 +606,7 @@ void SdrHdl::CreateB2dIAObject()
default:
break;
}
pNewOverlayObject = new sdr::overlay::OverlayHandle(aPosition, aB2DSize, aHandleStrokeColor, aHandleFillColor);
pNewOverlayObject = new sdr::overlay::OverlayHandle(aPosition, aB2DSize, /*HandleStrokeColor*/COL_BLACK, aHandleFillColor);
}
else
{

View File

@ -2957,13 +2957,12 @@ void SdrObjCustomShape::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix,
}
// build and set BaseRect (use scale)
Point aPoint;
Size aSize(FRound(aScale.getX()), FRound(aScale.getY()));
// fdo#47434 We need a valid rectangle here
if( !aSize.Height() ) aSize.setHeight( 1 );
if( !aSize.Width() ) aSize.setWidth( 1 );
tools::Rectangle aBaseRect(aPoint, aSize);
tools::Rectangle aBaseRect(Point(), aSize);
SetSnapRect(aBaseRect);
// shear?

View File

@ -1204,9 +1204,8 @@ void SdrTextObj::ImpInitDrawOutliner( SdrOutliner& rOutl ) const
EEControlBits nStat=rOutl.GetControlWord();
nStat &= ~EEControlBits(EEControlBits::STRETCHING|EEControlBits::AUTOPAGESIZE);
rOutl.SetControlWord(nStat);
Size aNullSize;
Size aMaxSize(100000,100000);
rOutl.SetMinAutoPaperSize(aNullSize);
rOutl.SetMinAutoPaperSize(Size());
rOutl.SetMaxAutoPaperSize(aMaxSize);
rOutl.SetPaperSize(aMaxSize);
rOutl.ClearPolygon();

View File

@ -56,9 +56,8 @@ void SdrOutliner::SetTextObj( const SdrTextObj* pObj )
nStat &= ~EEControlBits( EEControlBits::STRETCHING | EEControlBits::AUTOPAGESIZE );
SetControlWord(nStat);
Size aNullSize;
Size aMaxSize( 100000,100000 );
SetMinAutoPaperSize( aNullSize );
SetMinAutoPaperSize( Size() );
SetMaxAutoPaperSize( aMaxSize );
SetPaperSize( aMaxSize );
ClearPolygon();

View File

@ -1393,10 +1393,9 @@ void SdrTableObj::TakeTextRect( const CellPos& rPos, SdrOutliner& rOutliner, too
SdrTextVertAdjust eVAdj=xCell->GetTextVerticalAdjust();
EEControlBits nStat0=rOutliner.GetControlWord();
Size aNullSize;
nStat0 |= EEControlBits::AUTOPAGESIZE;
rOutliner.SetControlWord(nStat0);
rOutliner.SetMinAutoPaperSize(aNullSize);
rOutliner.SetMinAutoPaperSize(Size());
rOutliner.SetMaxAutoPaperSize(aAnkRect.GetSize());
rOutliner.SetPaperSize(aAnkRect.GetSize());

View File

@ -148,14 +148,11 @@ void SdrUIObject::execute(const OUString& rAction,
}
else if (rAction == "Mirror")
{
Point aPos;
Point aPos2;
pObj->Mirror(aPos, aPos2);
pObj->Mirror(Point(), Point());
}
else if (rAction == "SHEAR")
{
Point aPos;
pObj->Shear(aPos, 0.0/*nAngle*/, 0, false);
pObj->Shear(Point(), 0.0/*nAngle*/, 0, false);
}
}

View File

@ -1060,9 +1060,8 @@ OUString SAL_CALL SvXMLGraphicHelper::saveGraphicByName(css::uno::Reference<css:
OUString SAL_CALL SvXMLGraphicHelper::saveGraphic(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic)
{
OUString aEmpty;
OUString aOutMimeType;
return implSaveGraphic(rxGraphic, aOutMimeType, aEmpty);
return implSaveGraphic(rxGraphic, aOutMimeType, OUString());
}
OUString SvXMLGraphicHelper::implSaveGraphic(css::uno::Reference<css::graphic::XGraphic> const & rxGraphic,

View File

@ -532,8 +532,7 @@ tools::Polygon XOutBitmap::GetContour( const Bitmap& rBmp, const XOutFlags nFlag
{
Bitmap aWorkBmp;
tools::Polygon aRetPoly;
Point aTmpPoint;
tools::Rectangle aWorkRect( aTmpPoint, rBmp.GetSizePixel() );
tools::Rectangle aWorkRect( Point(), rBmp.GetSizePixel() );
if( pWorkRectPixel )
aWorkRect.Intersection( *pWorkRectPixel );

View File

@ -1369,9 +1369,8 @@ bool SwAccessibleContext::Select( SwPaM *pPaM, SdrObject *pObj,
{
if( pFEShell )
{
Point aDummy;
sal_uInt8 nFlags = bAdd ? SW_ADD_SELECT : 0;
pFEShell->SelectObj( aDummy, nFlags, pObj );
pFEShell->SelectObj( Point(), nFlags, pObj );
bRet = true;
}
}

View File

@ -1504,8 +1504,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
case RES_POOLCHR_INET_NORMAL:
{
Color aCol( COL_BLUE );
aSet.Put( SvxColorItem( aCol, RES_CHRATR_COLOR ) );
aSet.Put( SvxColorItem( COL_BLUE, RES_CHRATR_COLOR ) );
aSet.Put( SvxUnderlineItem( LINESTYLE_SINGLE, RES_CHRATR_UNDERLINE ) );
// i40133: patch submitted by rail: set language to 'none' to prevent spell checking:
aSet.Put( SvxLanguageItem( LANGUAGE_NONE, RES_CHRATR_LANGUAGE ) );
@ -1515,8 +1514,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
break;
case RES_POOLCHR_INET_VISIT:
{
Color aCol( COL_RED );
aSet.Put( SvxColorItem( aCol, RES_CHRATR_COLOR ) );
aSet.Put( SvxColorItem( COL_RED, RES_CHRATR_COLOR ) );
aSet.Put( SvxUnderlineItem( LINESTYLE_SINGLE, RES_CHRATR_UNDERLINE ) );
aSet.Put( SvxLanguageItem( LANGUAGE_NONE, RES_CHRATR_LANGUAGE ) );
aSet.Put( SvxLanguageItem( LANGUAGE_NONE, RES_CHRATR_CJK_LANGUAGE ) );
@ -1525,8 +1523,7 @@ SwFormat* DocumentStylePoolManager::GetFormatFromPool( sal_uInt16 nId )
break;
case RES_POOLCHR_JUMPEDIT:
{
Color aCol( COL_CYAN );
aSet.Put( SvxColorItem( aCol, RES_CHRATR_COLOR ) );
aSet.Put( SvxColorItem( COL_CYAN, RES_CHRATR_COLOR ) );
aSet.Put( SvxUnderlineItem( LINESTYLE_DOTTED, RES_CHRATR_UNDERLINE ) );
aSet.Put( SvxCaseMapItem( SvxCaseMap::SmallCaps, RES_CHRATR_CASEMAP ) );
}

View File

@ -1116,8 +1116,7 @@ bool SwFEShell::SetDrawingAttr( SfxItemSet& rSet )
if( GetDoc()->SetFlyFrameAttr( *pFormat, rSet ))
{
bRet = true;
Point aTmp;
SelectObj( aTmp, 0, pObj );
SelectObj( Point(), 0, pObj );
}
EndAllActionAndCall();
EndUndo();

View File

@ -993,12 +993,10 @@ void SwTextPaintInfo::DrawRedArrow( const SwLinePortion &rPor ) const
if ( GetTextFrame()->IsVertical() )
GetTextFrame()->SwitchHorizontalToVertical( aRect );
Color aCol( COL_LIGHTRED );
if( aRect.HasArea() )
{
const sal_uInt8 nOptions = 0;
lcl_DrawSpecial( *this, rPor, aRect, aCol, cChar, nOptions );
lcl_DrawSpecial( *this, rPor, aRect, COL_LIGHTRED, cChar, nOptions );
}
}

View File

@ -134,8 +134,7 @@ Size SwSubFont::GetCapitalSize( SwDrawTextInfo& rInf )
// Start:
const long nOldKern = rInf.GetKern();
rInf.SetKern( CheckKerning() );
Point aPos;
rInf.SetPos( aPos );
rInf.SetPos( Point() );
rInf.SetSpace( 0 );
rInf.SetDrawSpace( false );
SwDoGetCapitalSize aDo( rInf );
@ -377,8 +376,7 @@ sal_Int32 SwSubFont::GetCapitalCursorOfst( SwDrawTextInfo& rInf )
const long nOldKern = rInf.GetKern();
rInf.SetKern( CheckKerning() );
SwDoCapitalCursorOfst aDo( rInf, rInf.GetOfst() );
Point aPos;
rInf.SetPos( aPos );
rInf.SetPos( Point() );
rInf.SetDrawSpace( false );
DoOnCapitals( aDo );
rInf.SetKern( nOldKern );

View File

@ -193,8 +193,7 @@ void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine,
{
if( sal_uInt32(-1) == m_nBorderColor )
{
Color aGrayColor( COL_GRAY );
if( !pBorderLine->GetColor().IsRGBEqual( aGrayColor ) )
if( !pBorderLine->GetColor().IsRGBEqual( COL_GRAY ) )
m_nBorderColor = pBorderLine->GetColor().GetColor();
}

View File

@ -674,7 +674,7 @@ void MSWordStyles::OutputStylesTable()
// and refuses to load .docx with more, even though the spec seems to allow that;
// so simply if there are more styles, don't export those
// Implementing check for all exports DOCX, DOC, RTF
sal_uInt16 nLimit = MSWORD_MAX_STYLES_LIMIT;
sal_uInt16 const nLimit = MSWORD_MAX_STYLES_LIMIT;
m_nUsedSlots = std::min(nLimit, m_nUsedSlots);
for ( n = 0; n < m_nUsedSlots; n++ )

View File

@ -131,17 +131,15 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet,
{
// bGraphicNeeded set to true is right / fixes #i51670#.
bGraphicNeeded = true;
Point aTmpPoint;
tools::Rectangle aRect( aTmpPoint, Size( nX, nY ) );
tools::Rectangle aRect( Point(), Size( nX, nY ) );
Graphic aGraph(aWMF);
ErrCode nErr = ERRCODE_NONE;
tools::Rectangle aVisArea;
sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT;
if ( pOLENd )
nAspect = pOLENd->GetAspect();
SdrOle2Obj *pRet = SvxMSDffManager::CreateSdrOLEFromStorage(
rStorageName,xObjStg,m_pDoc->GetDocStorage(),aGraph,aRect,aVisArea,nullptr,nErr,0,nAspect, m_pWriter->GetBaseURL());
rStorageName,xObjStg,m_pDoc->GetDocStorage(),aGraph,aRect,tools::Rectangle(),nullptr,nErr,0,nAspect, m_pWriter->GetBaseURL());
if (pRet)
{

View File

@ -1783,8 +1783,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject const * pSdrObj,
rFlySet.Put( aShadow );
}
Color Temp(COL_WHITE);
SvxBrushItem aBrushItem(Temp, RES_BACKGROUND);
SvxBrushItem aBrushItem(COL_WHITE, RES_BACKGROUND);
bool bBrushItemOk = false;
sal_uInt8 nTrans = 0;

View File

@ -561,10 +561,9 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj const * pTextObj,
m_pDataStream->SeekRel( nNameLen );
}
tools::Rectangle aChildRect;
tools::Rectangle aClientRect( 0,0, aPD.nWidth, aPD.nHeight);
SvxMSDffImportData aData( aClientRect );
pObject = m_xMSDffManager->ImportObj(*m_pDataStream, &aData, aClientRect, aChildRect, /*nCalledByGroup*/0, /*pShapeId*/nullptr );
pObject = m_xMSDffManager->ImportObj(*m_pDataStream, &aData, aClientRect, tools::Rectangle(), /*nCalledByGroup*/0, /*pShapeId*/nullptr );
if (pObject)
{
// for the frame

View File

@ -179,7 +179,7 @@ void SignatureLineDialog::Apply()
OUString SignatureLineDialog::getSignatureImage()
{
OUString svg(
OUString const svg(
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><svg "
"xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:cc=\"http://creativecommons.org/ns#\" "
"xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" "

View File

@ -774,9 +774,8 @@ bool SwSpellDialogChildWindow::FindNextDrawTextError_Impl(SwWrtShell& rSh)
std::unique_ptr<OutlinerView> pOutlView( new OutlinerView( &aTmpOutliner, &(rView.GetEditWin()) ) );
pOutlView->GetOutliner()->SetRefDevice( rSh.getIDocumentDeviceAccess().getPrinter( false ) );
aTmpOutliner.InsertView( pOutlView.get() );
Point aPt;
Size aSize(1,1);
tools::Rectangle aRect( aPt, aSize );
tools::Rectangle aRect( Point(), aSize );
pOutlView->SetOutputArea( aRect );
aTmpOutliner.SetText( *pParaObj );
aTmpOutliner.ClearModifyFlag();

View File

@ -338,8 +338,7 @@ sal_Int8 SwEditWin::AcceptDrop( const AcceptDropEvent& rEvt )
// If the cursor is near the inner boundary
// we attempt to scroll towards the desired direction.
Point aPoint;
tools::Rectangle aWin(aPoint,GetOutputSizePixel());
tools::Rectangle aWin(Point(), GetOutputSizePixel());
const int nMargin = 10;
aWin.AdjustLeft(nMargin );
aWin.AdjustTop(nMargin );

View File

@ -602,9 +602,8 @@ void SwAnnotationShell::Exec( SfxRequest &rReq )
aNewAttr.Put(*pNewItem);
}
tools::Rectangle aNullRect;
tools::Rectangle aOutRect = pOLV->GetOutputArea();
if (aNullRect != aOutRect)
if (tools::Rectangle() != aOutRect)
pOLV->SetAttribs(aNewAttr);
rView.GetViewFrame()->GetBindings().InvalidateAll(false);

View File

@ -160,11 +160,10 @@ void SwDrawTextShell::StateDisableItems( SfxItemSet &rSet )
void SwDrawTextShell::SetAttrToMarked(const SfxItemSet& rAttr)
{
tools::Rectangle aNullRect;
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
tools::Rectangle aOutRect = pOLV->GetOutputArea();
if (aNullRect != aOutRect)
if (tools::Rectangle() != aOutRect)
{
GetShell().GetDrawView()->SetAttributes(rAttr);
}

View File

@ -1648,7 +1648,7 @@ void SwView::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
break;
case SfxHintId::RedlineChanged:
{
sal_uInt16 aSlotRedLine[] = {
static sal_uInt16 const aSlotRedLine[] = {
FN_REDLINE_NEXT_CHANGE,
FN_REDLINE_PREV_CHANGE,
FN_REDLINE_ACCEPT_DIRECT,

View File

@ -3575,8 +3575,7 @@ void SwContentLBoxString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::Ren
{
vcl::Font aOldFont(rRenderContext.GetFont());
vcl::Font aFont(aOldFont);
Color aCol(COL_LIGHTGRAY);
aFont.SetColor(aCol);
aFont.SetColor(COL_LIGHTGRAY);
rRenderContext.SetFont(aFont );
rRenderContext.DrawText(rPos, GetText());
rRenderContext.SetFont(aOldFont);

View File

@ -1258,8 +1258,7 @@ void SwLBoxString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderCont
rRenderContext.Push(PushFlags::FONT);
vcl::Font aOldFont(rRenderContext.GetFont());
vcl::Font aFont(rRenderContext.GetFont());
Color aCol(COL_LIGHTRED);
aFont.SetColor(aCol);
aFont.SetColor(COL_LIGHTRED);
rRenderContext.SetFont(aFont);
rRenderContext.DrawText(rPos, GetText());
rRenderContext.Pop();

View File

@ -340,7 +340,6 @@ void HelpTextWindow::SetHelpText( const OUString& rHelpText )
}
else // HELPWINSTYLE_BALLOON
{
Point aTmpPoint;
sal_Int32 nCharsInLine = 35 + ((maHelpText.getLength()/100)*5);
// average width to have all windows consistent
OUStringBuffer aBuf;
@ -348,7 +347,7 @@ void HelpTextWindow::SetHelpText( const OUString& rHelpText )
OUString aXXX = aBuf.makeStringAndClear();
long nWidth = GetTextWidth( aXXX );
Size aTmpSize( nWidth, 0x7FFFFFFF );
tools::Rectangle aTry1( aTmpPoint, aTmpSize );
tools::Rectangle aTry1( Point(), aTmpSize );
DrawTextFlags nDrawFlags = DrawTextFlags::MultiLine | DrawTextFlags::WordBreak |
DrawTextFlags::Left | DrawTextFlags::Top;
if ( mnStyle & QuickHelpFlags::CtrlText )

View File

@ -750,8 +750,7 @@ void PushButton::ImplDrawPushButtonFrame(vcl::RenderContext& rRenderContext,
bool PushButton::ImplHitTestPushButton( vcl::Window const * pDev,
const Point& rPos )
{
Point aTempPoint;
tools::Rectangle aTestRect( aTempPoint, pDev->GetOutputSizePixel() );
tools::Rectangle aTestRect( Point(), pDev->GetOutputSizePixel() );
return aTestRect.IsInside( rPos );
}
@ -934,9 +933,8 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
HideFocus();
DrawButtonFlags nButtonStyle = ImplGetButtonState();
Point aPoint;
Size aOutSz(GetOutputSizePixel());
tools::Rectangle aRect(aPoint, aOutSz);
tools::Rectangle aRect(Point(), aOutSz);
tools::Rectangle aInRect = aRect;
bool bNativeOK = false;
@ -1517,8 +1515,7 @@ bool PushButton::PreNotify( NotifyEvent& rNEvt )
if(aCtrlType == ControlType::Combobox)
{
// only paint the button part to avoid flickering of the combobox text
Point aPt;
tools::Rectangle aClipRect( aPt, GetOutputSizePixel() );
tools::Rectangle aClipRect( Point(), GetOutputSizePixel() );
aClipRect.SetPos(pBorder->ScreenToOutputPixel(OutputToScreenPixel(aClipRect.TopLeft())));
pBorder->Invalidate( aClipRect );
}

View File

@ -1002,11 +1002,10 @@ long ComboBox::getMaxWidthScrollBarAndDownButton() const
vcl::Window *pBorder = GetWindow( GetWindowType::Border );
ImplControlValue aControlValue;
Point aPoint;
tools::Rectangle aContent, aBound;
// use the full extent of the control
tools::Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() );
tools::Rectangle aArea( Point(), pBorder->GetOutputSizePixel() );
if ( GetNativeControlRegion(ControlType::Combobox, ControlPart::ButtonDown,
aArea, ControlState::NONE, aControlValue, aBound, aContent) )

View File

@ -985,8 +985,7 @@ void Edit::ImplClearBackground(vcl::RenderContext& rRenderContext, const tools::
/*
* note: at this point the cursor must be switched off already
*/
Point aTmpPoint;
tools::Rectangle aRect(aTmpPoint, GetOutputSizePixel());
tools::Rectangle aRect(Point(), GetOutputSizePixel());
aRect.SetLeft( nXStart );
aRect.SetRight( nXEnd );
@ -1007,8 +1006,7 @@ void Edit::ImplPaintBorder(vcl::RenderContext const & rRenderContext, long nXSta
if (SupportsDoubleBuffering())
return;
Point aTmpPoint;
tools::Rectangle aRect(aTmpPoint, GetOutputSizePixel());
tools::Rectangle aRect(Point(), GetOutputSizePixel());
aRect.SetLeft( nXStart );
aRect.SetRight( nXEnd );

Some files were not shown because too many files have changed in this diff Show More