Use a local variable for the points

Change-Id: Ibd274ecd7eaeadaaef9f2a17a0d721355a561431
This commit is contained in:
Fridrich Štrba
2013-06-11 11:41:09 +02:00
parent eb0a738d1b
commit 721f82c9bf

View File

@@ -1618,11 +1618,13 @@ namespace cppcanvas
double cellSize = setFont (flags & 0xff, rFactoryParms, rState); double cellSize = setFont (flags & 0xff, rFactoryParms, rState);
rState.textColor = COLOR( brushId ); rState.textColor = COLOR( brushId );
::basegfx::B2DPoint point( Map( lx + 0.15*cellSize, ly + cellSize ) );
ActionSharedPtr pTextAction( ActionSharedPtr pTextAction(
TextActionFactory::createTextAction( TextActionFactory::createTextAction(
// position is just rough guess for now // position is just rough guess for now
// we should calculate it exactly from layoutRect or font // we should calculate it exactly from layoutRect or font
::vcl::unotools::pointFromB2DPoint ( Map( lx + 0.15*cellSize, ly + cellSize ) ), ::vcl::unotools::pointFromB2DPoint ( point ),
::Size(), ::Size(),
::Color(), ::Color(),
::Size(), ::Size(),
@@ -1863,9 +1865,11 @@ namespace cppcanvas
if( flags & 0x8000 ) if( flags & 0x8000 )
rState.textColor = COLOR( brushIndexOrColor ); rState.textColor = COLOR( brushIndexOrColor );
::basegfx::B2DPoint point( Map( charsPosX[0], charsPosY[0] ) );
ActionSharedPtr pTextAction( ActionSharedPtr pTextAction(
TextActionFactory::createTextAction( TextActionFactory::createTextAction(
::vcl::unotools::pointFromB2DPoint ( Map( charsPosX[0], charsPosY[0] ) ), ::vcl::unotools::pointFromB2DPoint ( point ),
::Size(), ::Size(),
::Color(), ::Color(),
::Size(), ::Size(),