summaryrefslogtreecommitdiff
path: root/sc/source/ui/view/prevloc.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/prevloc.cxx')
-rw-r--r--sc/source/ui/view/prevloc.cxx74
1 files changed, 37 insertions, 37 deletions
diff --git a/sc/source/ui/view/prevloc.cxx b/sc/source/ui/view/prevloc.cxx
index 2a562262997c..4c9f6ed18450 100644
--- a/sc/source/ui/view/prevloc.cxx
+++ b/sc/source/ui/view/prevloc.cxx
@@ -40,12 +40,12 @@ enum ScPreviewLocationType
struct ScPreviewLocationEntry
{
ScPreviewLocationType eType;
- Rectangle aPixelRect;
+ tools::Rectangle aPixelRect;
ScRange aCellRange;
bool bRepeatCol;
bool bRepeatRow;
- ScPreviewLocationEntry( ScPreviewLocationType eNewType, const Rectangle& rPixel, const ScRange& rRange,
+ ScPreviewLocationEntry( ScPreviewLocationType eNewType, const tools::Rectangle& rPixel, const ScRange& rRange,
bool bRepCol, bool bRepRow ) :
eType( eNewType ),
aPixelRect( rPixel ),
@@ -90,7 +90,7 @@ void ScPreviewTableInfo::SetRowInfo( SCROW nCount, ScPreviewColRowInfo* pNewInfo
nRows = nCount;
}
-void ScPreviewTableInfo::LimitToArea( const Rectangle& rPixelArea )
+void ScPreviewTableInfo::LimitToArea( const tools::Rectangle& rPixelArea )
{
if ( pColInfo )
{
@@ -177,10 +177,10 @@ void ScPreviewLocationData::Clear()
nDrawRanges = 0;
}
-void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange& rRange, bool bRepCol, bool bRepRow,
+void ScPreviewLocationData::AddCellRange( const tools::Rectangle& rRect, const ScRange& rRange, bool bRepCol, bool bRepRow,
const MapMode& rDrawMap )
{
- Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
+ tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_CELLRANGE, aPixelRect, rRange, bRepCol, bRepRow) );
OSL_ENSURE( nDrawRanges < SC_PREVIEW_MAXRANGES, "too many ranges" );
@@ -209,28 +209,28 @@ void ScPreviewLocationData::AddCellRange( const Rectangle& rRect, const ScRange&
}
}
-void ScPreviewLocationData::AddColHeaders( const Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, bool bRepCol )
+void ScPreviewLocationData::AddColHeaders( const tools::Rectangle& rRect, SCCOL nStartCol, SCCOL nEndCol, bool bRepCol )
{
SCTAB nTab = 0; //! ?
ScRange aRange( nStartCol, 0, nTab, nEndCol, 0, nTab );
- Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
+ tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_COLHEADER, aPixelRect, aRange, bRepCol, false) );
}
-void ScPreviewLocationData::AddRowHeaders( const Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, bool bRepRow )
+void ScPreviewLocationData::AddRowHeaders( const tools::Rectangle& rRect, SCROW nStartRow, SCROW nEndRow, bool bRepRow )
{
SCTAB nTab = 0; //! ?
ScRange aRange( 0, nStartRow, nTab, 0, nEndRow, nTab );
- Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
+ tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_ROWHEADER, aPixelRect, aRange, false, bRepRow) );
}
-void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, bool bHeader, bool bLeft )
+void ScPreviewLocationData::AddHeaderFooter( const tools::Rectangle& rRect, bool bHeader, bool bLeft )
{
ScRange aRange; //! ?
- Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
+ tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
ScPreviewLocationType eType = bHeader ?
( bLeft ? SC_PLOC_LEFTHEADER : SC_PLOC_RIGHTHEADER ) :
@@ -239,23 +239,23 @@ void ScPreviewLocationData::AddHeaderFooter( const Rectangle& rRect, bool bHeade
m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(eType, aPixelRect, aRange, false, false) );
}
-void ScPreviewLocationData::AddNoteMark( const Rectangle& rRect, const ScAddress& rPos )
+void ScPreviewLocationData::AddNoteMark( const tools::Rectangle& rRect, const ScAddress& rPos )
{
ScRange aRange( rPos );
- Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
+ tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_NOTEMARK, aPixelRect, aRange, false, false) );
}
-void ScPreviewLocationData::AddNoteText( const Rectangle& rRect, const ScAddress& rPos )
+void ScPreviewLocationData::AddNoteText( const tools::Rectangle& rRect, const ScAddress& rPos )
{
ScRange aRange( rPos );
- Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
+ tools::Rectangle aPixelRect( pWindow->LogicToPixel( rRect ) );
m_Entries.push_front( o3tl::make_unique<ScPreviewLocationEntry>(SC_PLOC_NOTETEXT, aPixelRect, aRange, false, false) );
}
-void ScPreviewLocationData::GetDrawRange( sal_uInt16 nPos, Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const
+void ScPreviewLocationData::GetDrawRange( sal_uInt16 nPos, tools::Rectangle& rPixelRect, MapMode& rMapMode, sal_uInt8& rRangeId ) const
{
OSL_ENSURE( nPos < nDrawRanges, "wrong position" );
if ( nPos < nDrawRanges )
@@ -279,7 +279,7 @@ static ScPreviewLocationEntry* lcl_GetEntryByAddress(
return nullptr;
}
-Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, const ScRange& rRange ) const
+tools::Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, const ScRange& rRange ) const
{
const double nScaleX = HMM_PER_TWIPS;
const double nScaleY = HMM_PER_TWIPS;
@@ -305,23 +305,23 @@ Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, cons
Size aOffsetPixel = pWindow->LogicToPixel( aOffsetLogic, aCellMapMode );
Size aSizePixel = pWindow->LogicToPixel( aSizeLogic, aCellMapMode );
- return Rectangle( Point( aOffsetPixel.Width(), aOffsetPixel.Height() ), aSizePixel );
+ return tools::Rectangle( Point( aOffsetPixel.Width(), aOffsetPixel.Height() ), aSizePixel );
}
-void ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, Rectangle& rCellRect ) const
+void ScPreviewLocationData::GetCellPosition( const ScAddress& rCellPos, tools::Rectangle& rCellRect ) const
{
ScPreviewLocationEntry* pEntry = lcl_GetEntryByAddress( m_Entries, rCellPos, SC_PLOC_CELLRANGE );
if ( pEntry )
{
- Rectangle aOffsetRect = GetOffsetPixel( rCellPos, pEntry->aCellRange );
- rCellRect = Rectangle( aOffsetRect.Left() + pEntry->aPixelRect.Left(),
+ tools::Rectangle aOffsetRect = GetOffsetPixel( rCellPos, pEntry->aCellRange );
+ rCellRect = tools::Rectangle( aOffsetRect.Left() + pEntry->aPixelRect.Left(),
aOffsetRect.Top() + pEntry->aPixelRect.Top(),
aOffsetRect.Right() + pEntry->aPixelRect.Left(),
aOffsetRect.Bottom() + pEntry->aPixelRect.Top() );
}
}
-bool ScPreviewLocationData::HasCellsInRange( const Rectangle& rVisiblePixel ) const
+bool ScPreviewLocationData::HasCellsInRange( const tools::Rectangle& rVisiblePixel ) const
{
for (auto const& it : m_Entries)
{
@@ -333,7 +333,7 @@ bool ScPreviewLocationData::HasCellsInRange( const Rectangle& rVisiblePixel ) co
return false;
}
-bool ScPreviewLocationData::GetHeaderPosition( Rectangle& rRect ) const
+bool ScPreviewLocationData::GetHeaderPosition( tools::Rectangle& rRect ) const
{
for (auto const& it : m_Entries)
{
@@ -347,7 +347,7 @@ bool ScPreviewLocationData::GetHeaderPosition( Rectangle& rRect ) const
return false;
}
-bool ScPreviewLocationData::GetFooterPosition( Rectangle& rRect ) const
+bool ScPreviewLocationData::GetFooterPosition( tools::Rectangle& rRect ) const
{
for (auto const& it : m_Entries)
{
@@ -389,7 +389,7 @@ bool ScPreviewLocationData::IsFooterLeft() const
return false;
}
-long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel, bool bNoteMarks ) const
+long ScPreviewLocationData::GetNoteCountInRange( const tools::Rectangle& rVisiblePixel, bool bNoteMarks ) const
{
ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT;
@@ -403,8 +403,8 @@ long ScPreviewLocationData::GetNoteCountInRange( const Rectangle& rVisiblePixel,
return nRet;
}
-bool ScPreviewLocationData::GetNoteInRange( const Rectangle& rVisiblePixel, long nIndex, bool bNoteMarks,
- ScAddress& rCellPos, Rectangle& rNoteRect ) const
+bool ScPreviewLocationData::GetNoteInRange( const tools::Rectangle& rVisiblePixel, long nIndex, bool bNoteMarks,
+ ScAddress& rCellPos, tools::Rectangle& rNoteRect ) const
{
ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT;
@@ -426,7 +426,7 @@ bool ScPreviewLocationData::GetNoteInRange( const Rectangle& rVisiblePixel, long
return false;
}
-Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const Rectangle& rVisiblePixel, bool bNoteMarks, const ScAddress& aCellPos) const
+tools::Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const tools::Rectangle& rVisiblePixel, bool bNoteMarks, const ScAddress& aCellPos) const
{
ScPreviewLocationType eType = bNoteMarks ? SC_PLOC_NOTEMARK : SC_PLOC_NOTETEXT;
@@ -441,10 +441,10 @@ Rectangle ScPreviewLocationData::GetNoteInRangeOutputRect(const Rectangle& rVisi
}
}
- return Rectangle();
+ return tools::Rectangle();
}
-void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPreviewTableInfo& rInfo ) const
+void ScPreviewLocationData::GetTableInfo( const tools::Rectangle& rVisiblePixel, ScPreviewTableInfo& rInfo ) const
{
const double nScaleX = HMM_PER_TWIPS;
const double nScaleY = HMM_PER_TWIPS;
@@ -467,7 +467,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
SCROW nMainRowStart = 0;
SCROW nMainRowEnd = 0;
- Rectangle aHeaderRect, aRepeatRect, aMainRect;
+ tools::Rectangle aHeaderRect, aRepeatRect, aMainRect;
SCTAB nTab = 0;
for (auto const& it : m_Entries)
@@ -665,11 +665,11 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
rInfo.LimitToArea( rVisiblePixel );
}
-Rectangle ScPreviewLocationData::GetHeaderCellOutputRect(const Rectangle& rVisRect, const ScAddress& rCellPos, bool bColHeader) const
+tools::Rectangle ScPreviewLocationData::GetHeaderCellOutputRect(const tools::Rectangle& rVisRect, const ScAddress& rCellPos, bool bColHeader) const
{
// first a stupid implementation
// NN says here should be done more
- Rectangle aClipRect;
+ tools::Rectangle aClipRect;
ScPreviewTableInfo aTableInfo;
GetTableInfo( rVisRect, aTableInfo );
@@ -687,23 +687,23 @@ Rectangle ScPreviewLocationData::GetHeaderCellOutputRect(const Rectangle& rVisRe
const ScPreviewColRowInfo& rRowInfo = aTableInfo.GetRowInfo()[nRow];
if ( rColInfo.bIsHeader || rRowInfo.bIsHeader )
- aClipRect = Rectangle( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd );
+ aClipRect = tools::Rectangle( rColInfo.nPixelStart, rRowInfo.nPixelStart, rColInfo.nPixelEnd, rRowInfo.nPixelEnd );
}
return aClipRect;
}
-Rectangle ScPreviewLocationData::GetCellOutputRect(const ScAddress& rCellPos) const
+tools::Rectangle ScPreviewLocationData::GetCellOutputRect(const ScAddress& rCellPos) const
{
// first a stupid implementation
// NN says here should be done more
- Rectangle aRect;
+ tools::Rectangle aRect;
GetCellPosition(rCellPos, aRect);
return aRect;
}
// GetMainCellRange is used for links in PDF export
-bool ScPreviewLocationData::GetMainCellRange( ScRange& rRange, Rectangle& rPixRect ) const
+bool ScPreviewLocationData::GetMainCellRange( ScRange& rRange, tools::Rectangle& rPixRect ) const
{
for (auto const& it : m_Entries)
{