diff options
Diffstat (limited to 'lib/kformula/spaceelement.cc')
| -rw-r--r-- | lib/kformula/spaceelement.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/kformula/spaceelement.cc b/lib/kformula/spaceelement.cc index 7bc21d24e..f3f43d1c9 100644 --- a/lib/kformula/spaceelement.cc +++ b/lib/kformula/spaceelement.cc @@ -99,24 +99,24 @@ void SpaceElement::calcSizes( const ContextStyle& context, double width = style.getSpace( m_widthType, m_width ); if ( m_widthType == AbsoluteSize ) { - width = m_width / context.tqlayoutUnitPtToPt( context.getBaseSize() ); + width = m_width / context.layoutUnitPtToPt( context.getBaseSize() ); } else if ( m_widthType == PixelSize ) { - width = context.pixelYToPt( m_width ) / context.tqlayoutUnitPtToPt( context.getBaseSize() ); + width = context.pixelYToPt( m_width ) / context.layoutUnitPtToPt( context.getBaseSize() ); } double height = style.getSpace( m_heightType, m_height ); if ( m_heightType == AbsoluteSize ) { - height = m_height / context.tqlayoutUnitPtToPt( context.getBaseSize() ); + height = m_height / context.layoutUnitPtToPt( context.getBaseSize() ); } else if ( m_heightType == PixelSize ) { - height = context.pixelYToPt( m_height ) / context.tqlayoutUnitPtToPt( context.getBaseSize() ); + height = context.pixelYToPt( m_height ) / context.layoutUnitPtToPt( context.getBaseSize() ); } double depth = style.getSpace( m_depthType, m_depth ); if ( m_depthType == AbsoluteSize ) { - depth = m_depth / context.tqlayoutUnitPtToPt( context.getBaseSize() ); + depth = m_depth / context.layoutUnitPtToPt( context.getBaseSize() ); } else if ( m_depthType == PixelSize ) { - depth = context.pixelYToPt( m_depth ) / context.tqlayoutUnitPtToPt( context.getBaseSize() ); + depth = context.pixelYToPt( m_depth ) / context.layoutUnitPtToPt( context.getBaseSize() ); } setWidth( hbound.width() * width ); @@ -133,27 +133,27 @@ void SpaceElement::draw( TQPainter& painter, const LuPixelRect& /*r*/, ContextStyle::TextStyle /*tstyle*/, ContextStyle::IndexStyle /*istyle*/, StyleAttributes& /*style*/, - const LuPixelPoint& tqparentOrigin ) + const LuPixelPoint& parentOrigin ) { - LuPixelPoint myPos(tqparentOrigin.x()+getX(), tqparentOrigin.y()+getY()); + LuPixelPoint myPos(parentOrigin.x()+getX(), parentOrigin.y()+getY()); // there is such a thing as negative space! //if ( !LuPixelRect( myPos.x(), myPos.y(), getWidth(), getHeight() ).intersects( r ) ) // return; if ( context.edit() ) { painter.setPen( context.getEmptyColor() ); - painter.drawLine( context.tqlayoutUnitToPixelX( myPos.x() ), - context.tqlayoutUnitToPixelY( myPos.y()+getHeight() ), - context.tqlayoutUnitToPixelX( myPos.x()+getWidth()-1 ), - context.tqlayoutUnitToPixelY( myPos.y()+getHeight() ) ); - painter.drawLine( context.tqlayoutUnitToPixelX( myPos.x() ), - context.tqlayoutUnitToPixelY( myPos.y()+getHeight() ), - context.tqlayoutUnitToPixelX( myPos.x() ), - context.tqlayoutUnitToPixelY( myPos.y()+getHeight()-getHeight()/5 ) ); - painter.drawLine( context.tqlayoutUnitToPixelX( myPos.x()+getWidth()-1 ), - context.tqlayoutUnitToPixelY( myPos.y()+getHeight() ), - context.tqlayoutUnitToPixelX( myPos.x()+getWidth()-1 ), - context.tqlayoutUnitToPixelY( myPos.y()+getHeight()-getHeight()/5 ) ); + painter.drawLine( context.layoutUnitToPixelX( myPos.x() ), + context.layoutUnitToPixelY( myPos.y()+getHeight() ), + context.layoutUnitToPixelX( myPos.x()+getWidth()-1 ), + context.layoutUnitToPixelY( myPos.y()+getHeight() ) ); + painter.drawLine( context.layoutUnitToPixelX( myPos.x() ), + context.layoutUnitToPixelY( myPos.y()+getHeight() ), + context.layoutUnitToPixelX( myPos.x() ), + context.layoutUnitToPixelY( myPos.y()+getHeight()-getHeight()/5 ) ); + painter.drawLine( context.layoutUnitToPixelX( myPos.x()+getWidth()-1 ), + context.layoutUnitToPixelY( myPos.y()+getHeight() ), + context.layoutUnitToPixelX( myPos.x()+getWidth()-1 ), + context.layoutUnitToPixelY( myPos.y()+getHeight()-getHeight()/5 ) ); } } |
