summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/dialog/framelinkarray.cxx61
-rw-r--r--svx/source/dialog/frmsel.cxx4
2 files changed, 27 insertions, 38 deletions
diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx
index 27e227c678ad..aabce64ba78e 100644
--- a/svx/source/dialog/framelinkarray.cxx
+++ b/svx/source/dialog/framelinkarray.cxx
@@ -919,46 +919,35 @@ sal_Int32 Array::GetHeight() const
return GetRowPosition( mxImpl->mnHeight ) - GetRowPosition( 0 );
}
-basegfx::B2DRange Array::GetCellRange( sal_Int32 nCol, sal_Int32 nRow, bool bExpandMerged ) const
+basegfx::B2DRange Array::GetCellRange( sal_Int32 nCol, sal_Int32 nRow ) const
{
- if(bExpandMerged)
- {
- // get the Range of the fully expanded cell (if merged)
- const sal_Int32 nFirstCol(mxImpl->GetMergedFirstCol( nCol, nRow ));
- const sal_Int32 nFirstRow(mxImpl->GetMergedFirstRow( nCol, nRow ));
- const sal_Int32 nLastCol(mxImpl->GetMergedLastCol( nCol, nRow ));
- const sal_Int32 nLastRow(mxImpl->GetMergedLastRow( nCol, nRow ));
- const Point aPoint( GetColPosition( nFirstCol ), GetRowPosition( nFirstRow ) );
- const Size aSize( GetColWidth( nFirstCol, nLastCol ) + 1, GetRowHeight( nFirstRow, nLastRow ) + 1 );
- tools::Rectangle aRect(aPoint, aSize);
-
- // adjust rectangle for partly visible merged cells
- const Cell& rCell = CELL( nCol, nRow );
-
- if( rCell.IsMerged() )
- {
- // not *sure* what exactly this is good for,
- // it is just a hard set extension at merged cells,
- // probably *should* be included in the above extended
- // GetColPosition/GetColWidth already. This might be
- // added due to GetColPosition/GetColWidth not working
- // correctly over PageChanges (if used), but not sure.
- aRect.AdjustLeft( -(rCell.mnAddLeft) );
- aRect.AdjustRight(rCell.mnAddRight );
- aRect.AdjustTop( -(rCell.mnAddTop) );
- aRect.AdjustBottom(rCell.mnAddBottom );
- }
+ // get the Range of the fully expanded cell (if merged)
+ const sal_Int32 nFirstCol(mxImpl->GetMergedFirstCol( nCol, nRow ));
+ const sal_Int32 nFirstRow(mxImpl->GetMergedFirstRow( nCol, nRow ));
+ const sal_Int32 nLastCol(mxImpl->GetMergedLastCol( nCol, nRow ));
+ const sal_Int32 nLastRow(mxImpl->GetMergedLastRow( nCol, nRow ));
+ const Point aPoint( GetColPosition( nFirstCol ), GetRowPosition( nFirstRow ) );
+ const Size aSize( GetColWidth( nFirstCol, nLastCol ) + 1, GetRowHeight( nFirstRow, nLastRow ) + 1 );
+ tools::Rectangle aRect(aPoint, aSize);
- return vcl::unotools::b2DRectangleFromRectangle(aRect);
- }
- else
- {
- const Point aPoint( GetColPosition( nCol ), GetRowPosition( nRow ) );
- const Size aSize( GetColWidth( nCol, nCol ) + 1, GetRowHeight( nRow, nRow ) + 1 );
- const tools::Rectangle aRect(aPoint, aSize);
+ // adjust rectangle for partly visible merged cells
+ const Cell& rCell = CELL( nCol, nRow );
- return vcl::unotools::b2DRectangleFromRectangle(aRect);
+ if( rCell.IsMerged() )
+ {
+ // not *sure* what exactly this is good for,
+ // it is just a hard set extension at merged cells,
+ // probably *should* be included in the above extended
+ // GetColPosition/GetColWidth already. This might be
+ // added due to GetColPosition/GetColWidth not working
+ // correctly over PageChanges (if used), but not sure.
+ aRect.AdjustLeft( -(rCell.mnAddLeft) );
+ aRect.AdjustRight(rCell.mnAddRight );
+ aRect.AdjustTop( -(rCell.mnAddTop) );
+ aRect.AdjustBottom(rCell.mnAddBottom );
}
+
+ return vcl::unotools::b2DRectangleFromRectangle(aRect);
}
// return output range of given row/col range in logical coordinates
diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx
index d2c67d75f970..fed0d59d0d6d 100644
--- a/svx/source/dialog/frmsel.cxx
+++ b/svx/source/dialog/frmsel.cxx
@@ -424,7 +424,7 @@ void FrameSelectorImpl::InitBorderGeometry()
{
for( nRow = 0, nRows = maArray.GetRowCount(); nRow < nRows; ++nRow )
{
- const basegfx::B2DRange aCellRange(maArray.GetCellRange( nCol, nRow, true ));
+ const basegfx::B2DRange aCellRange(maArray.GetCellRange( nCol, nRow ));
const tools::Rectangle aRect(
basegfx::fround(aCellRange.getMinX()), basegfx::fround(aCellRange.getMinY()),
basegfx::fround(aCellRange.getMaxX()), basegfx::fround(aCellRange.getMaxY()));
@@ -484,7 +484,7 @@ void FrameSelectorImpl::InitBorderGeometry()
for( nRow = 0, nRows = maArray.GetRowCount(); nRow < nRows; ++nRow )
{
// the usable area between horizontal/vertical frame borders of current quadrant
- const basegfx::B2DRange aCellRange(maArray.GetCellRange( nCol, nRow, true ));
+ const basegfx::B2DRange aCellRange(maArray.GetCellRange( nCol, nRow ));
const tools::Rectangle aRect(
basegfx::fround(aCellRange.getMinX()) + nClV + 1, basegfx::fround(aCellRange.getMinY()) + nClH + 1,
basegfx::fround(aCellRange.getMaxX()) - nClV + 1, basegfx::fround(aCellRange.getMaxY()) - nClH + 1);