summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-03-30 20:27:55 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-03-31 06:27:11 +0000
commita5a571307fb3306b74ab46b085cde6388270a770 (patch)
tree66d4ce12bb5236c50ab6a5d253bc8c6d8b5d292d /editeng
parent17d821af6bb9df93569836a92f6bed975587fc6c (diff)
tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx20
-rw-r--r--editeng/source/accessibility/AccessibleImageBullet.cxx8
-rw-r--r--editeng/source/accessibility/AccessibleStaticTextBase.cxx10
-rw-r--r--editeng/source/accessibility/AccessibleStringWrap.cxx6
-rw-r--r--editeng/source/editeng/editdbg.cxx2
-rw-r--r--editeng/source/editeng/editeng.cxx30
-rw-r--r--editeng/source/editeng/editview.cxx26
-rw-r--r--editeng/source/editeng/impedit.cxx88
-rw-r--r--editeng/source/editeng/impedit.hxx30
-rw-r--r--editeng/source/editeng/impedit2.cxx26
-rw-r--r--editeng/source/editeng/impedit3.cxx38
-rw-r--r--editeng/source/editeng/impedit4.cxx10
-rw-r--r--editeng/source/items/svxfont.cxx2
-rw-r--r--editeng/source/misc/txtrange.cxx4
-rw-r--r--editeng/source/outliner/outleeng.cxx4
-rw-r--r--editeng/source/outliner/outleeng.hxx2
-rw-r--r--editeng/source/outliner/outlin2.cxx4
-rw-r--r--editeng/source/outliner/outliner.cxx14
-rw-r--r--editeng/source/outliner/outlvw.cxx16
-rw-r--r--editeng/source/uno/unoedhlp.cxx4
-rw-r--r--editeng/source/uno/unoedprx.cxx14
-rw-r--r--editeng/source/uno/unofored.cxx10
-rw-r--r--editeng/source/uno/unoforou.cxx10
-rw-r--r--editeng/source/uno/unotext.cxx8
-rw-r--r--editeng/source/uno/unoviwou.cxx8
25 files changed, 197 insertions, 197 deletions
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 11a212b02f41..993f906d5b05 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -544,10 +544,10 @@ namespace accessibility
return GetTextForwarder().HaveImageBullet( GetParagraphIndex() );
}
- Rectangle AccessibleEditableTextPara::LogicToPixel( const Rectangle& rRect, const MapMode& rMapMode, SvxViewForwarder& rForwarder )
+ tools::Rectangle AccessibleEditableTextPara::LogicToPixel( const tools::Rectangle& rRect, const MapMode& rMapMode, SvxViewForwarder& rForwarder )
{
// convert to screen coordinates
- return Rectangle( rForwarder.LogicToPixel( rRect.TopLeft(), rMapMode ),
+ return tools::Rectangle( rForwarder.LogicToPixel( rRect.TopLeft(), rMapMode ),
rForwarder.LogicToPixel( rRect.BottomRight(), rMapMode ) );
}
@@ -1001,7 +1001,7 @@ namespace accessibility
"AccessibleEditableTextPara::contains: index value overflow");
awt::Rectangle aTmpRect = getBounds();
- Rectangle aRect( Point(aTmpRect.X, aTmpRect.Y), Size(aTmpRect.Width, aTmpRect.Height) );
+ tools::Rectangle aRect( Point(aTmpRect.X, aTmpRect.Y), Size(aTmpRect.Width, aTmpRect.Height) );
Point aPoint( aTmpPoint.X, aTmpPoint.Y );
return aRect.IsInside( aPoint );
@@ -1029,7 +1029,7 @@ namespace accessibility
aBulletInfo.bVisible &&
aBulletInfo.nType == SVX_NUM_BITMAP )
{
- Rectangle aRect = aBulletInfo.aBounds;
+ tools::Rectangle aRect = aBulletInfo.aBounds;
if( aRect.IsInside( aLogPoint ) )
return getAccessibleChild(0);
@@ -1048,10 +1048,10 @@ namespace accessibility
"AccessibleEditableTextPara::getBounds: index value overflow");
SvxTextForwarder& rCacheTF = GetTextForwarder();
- Rectangle aRect = rCacheTF.GetParaBounds( GetParagraphIndex() );
+ tools::Rectangle aRect = rCacheTF.GetParaBounds( GetParagraphIndex() );
// convert to screen coordinates
- Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect,
+ tools::Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect,
rCacheTF.GetMapMode(),
GetViewForwarder() );
@@ -1311,10 +1311,10 @@ namespace accessibility
CheckPosition( nIndex );
SvxTextForwarder& rCacheTF = GetTextForwarder();
- Rectangle aRect = rCacheTF.GetCharBounds(GetParagraphIndex(), nIndex);
+ tools::Rectangle aRect = rCacheTF.GetCharBounds(GetParagraphIndex(), nIndex);
// convert to screen
- Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect,
+ tools::Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect,
rCacheTF.GetMapMode(),
GetViewForwarder() );
// #109864# offset from parent (paragraph), but in screen
@@ -1358,7 +1358,7 @@ namespace accessibility
Point aLogPoint( GetViewForwarder().PixelToLogic( aPoint, rCacheTF.GetMapMode() ) );
// re-offset to parent (paragraph)
- Rectangle aParaRect = rCacheTF.GetParaBounds( GetParagraphIndex() );
+ tools::Rectangle aParaRect = rCacheTF.GetParaBounds( GetParagraphIndex() );
aLogPoint.Move( aParaRect.Left(), aParaRect.Top() );
if( rCacheTF.GetIndexAtPoint( aLogPoint, nPara, nIndex ) &&
@@ -1368,7 +1368,7 @@ namespace accessibility
try
{
awt::Rectangle aRect1( getCharacterBounds(nIndex) );
- Rectangle aRect2( aRect1.X, aRect1.Y,
+ tools::Rectangle aRect2( aRect1.X, aRect1.Y,
aRect1.Width + aRect1.X, aRect1.Height + aRect1.Y );
if( aRect2.IsInside( Point( rPoint.X, rPoint.Y ) ) )
return nIndex;
diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx
index c287c5d6235d..4015d7e08e4d 100644
--- a/editeng/source/accessibility/AccessibleImageBullet.cxx
+++ b/editeng/source/accessibility/AccessibleImageBullet.cxx
@@ -219,7 +219,7 @@ namespace accessibility
"AccessibleEditableTextPara::contains: index value overflow");
awt::Rectangle aTmpRect = getBounds();
- Rectangle aRect( Point(aTmpRect.X, aTmpRect.Y), Size(aTmpRect.Width, aTmpRect.Height) );
+ tools::Rectangle aRect( Point(aTmpRect.X, aTmpRect.Y), Size(aTmpRect.Width, aTmpRect.Height) );
Point aPoint( rPoint.X, rPoint.Y );
return aRect.IsInside( aPoint );
@@ -242,19 +242,19 @@ namespace accessibility
SvxTextForwarder& rCacheTF = GetTextForwarder();
EBulletInfo aBulletInfo = rCacheTF.GetBulletInfo( GetParagraphIndex() );
- Rectangle aParentRect = rCacheTF.GetParaBounds( GetParagraphIndex() );
+ tools::Rectangle aParentRect = rCacheTF.GetParaBounds( GetParagraphIndex() );
if( aBulletInfo.nParagraph != EE_PARA_NOT_FOUND &&
aBulletInfo.bVisible &&
aBulletInfo.nType == SVX_NUM_BITMAP )
{
- Rectangle aRect = aBulletInfo.aBounds;
+ tools::Rectangle aRect = aBulletInfo.aBounds;
// subtract paragraph position (bullet pos is absolute in EditEngine/Outliner)
aRect.Move( -aParentRect.Left(), -aParentRect.Top() );
// convert to screen coordinates
- Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect,
+ tools::Rectangle aScreenRect = AccessibleEditableTextPara::LogicToPixel( aRect,
rCacheTF.GetMapMode(),
GetViewForwarder() );
diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
index 6700b1402a43..c75af4633b90 100644
--- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx
+++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
@@ -148,7 +148,7 @@ namespace accessibility
bool CopyText( sal_Int32 nStartPara, sal_Int32 nStartIndex,
sal_Int32 nEndPara, sal_Int32 nEndIndex );
- Rectangle GetParagraphBoundingBox() const;
+ tools::Rectangle GetParagraphBoundingBox() const;
bool RemoveLineBreakCount( sal_Int32& rIndex );
private:
@@ -367,13 +367,13 @@ namespace accessibility
}
}
- Rectangle AccessibleStaticTextBase_Impl::GetParagraphBoundingBox() const
+ tools::Rectangle AccessibleStaticTextBase_Impl::GetParagraphBoundingBox() const
{
- Rectangle aRect;
+ tools::Rectangle aRect;
if( mxTextParagraph.is() )
{
awt::Rectangle aAwtRect = mxTextParagraph->getBounds();
- aRect = Rectangle( Point( aAwtRect.X, aAwtRect.Y ), Size( aAwtRect.Width, aAwtRect.Height ) );
+ aRect = tools::Rectangle( Point( aAwtRect.X, aAwtRect.Y ), Size( aAwtRect.Width, aAwtRect.Height ) );
}
else
{
@@ -962,7 +962,7 @@ namespace accessibility
return ::comphelper::concatSequences( aRunAttrSeq, comphelper::containerToSequence(aDiffVec) );
}
- Rectangle AccessibleStaticTextBase::GetParagraphBoundingBox() const
+ tools::Rectangle AccessibleStaticTextBase::GetParagraphBoundingBox() const
{
return mpImpl->GetParagraphBoundingBox();
}
diff --git a/editeng/source/accessibility/AccessibleStringWrap.cxx b/editeng/source/accessibility/AccessibleStringWrap.cxx
index f5589f703854..af55049458f0 100644
--- a/editeng/source/accessibility/AccessibleStringWrap.cxx
+++ b/editeng/source/accessibility/AccessibleStringWrap.cxx
@@ -36,7 +36,7 @@ AccessibleStringWrap::AccessibleStringWrap( OutputDevice& rDev, SvxFont& rFont,
{
}
-void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRect )
+void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, tools::Rectangle& rRect )
{
DBG_ASSERT(nIndex >= 0 && nIndex <= USHRT_MAX,
"SvxAccessibleStringWrap::GetCharacterBounds: index value overflow");
@@ -65,7 +65,7 @@ void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRec
if( mrFont.IsVertical() )
{
// #101701# Rotate to vertical
- rRect = Rectangle( Point(-rRect.Top(), rRect.Left()),
+ rRect = tools::Rectangle( Point(-rRect.Top(), rRect.Left()),
Point(-rRect.Bottom(), rRect.Right()));
}
}
@@ -73,7 +73,7 @@ void AccessibleStringWrap::GetCharacterBounds( sal_Int32 nIndex, Rectangle& rRec
sal_Int32 AccessibleStringWrap::GetIndexAtPoint( const Point& rPoint )
{
// search for character bounding box containing given point
- Rectangle aRect;
+ tools::Rectangle aRect;
sal_Int32 i, nLen = maText.getLength();
for( i=0; i<nLen; ++i )
{
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index 674e091b9a44..7929980b92ad 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -465,7 +465,7 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, bool bInfoBox )
EditView* pV = pEE->GetView( nView );
DBG_ASSERT( pV, "View not found!" );
fprintf( fp, "\nView %zu: Focus=%i", nView, pV->GetWindow()->HasFocus() );
- Rectangle aR( pV->GetOutputArea() );
+ tools::Rectangle aR( pV->GetOutputArea() );
fprintf( fp, "\n OutputArea: nX=%li, nY=%li, dX=%li, dY=%li, MapMode = %i", aR.TopLeft().X(), aR.TopLeft().Y(), aR.GetSize().Width(), aR.GetSize().Height() , int( pV->GetWindow()->GetMapMode().GetMapUnit() ) );
aR = pV->GetVisArea();
fprintf( fp, "\n VisArea: nX=%li, nY=%li, dX=%li, dY=%li", aR.TopLeft().X(), aR.TopLeft().Y(), aR.GetSize().Width(), aR.GetSize().Height() );
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index a50e2903ae36..32a48b1e84d3 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -205,7 +205,7 @@ const SfxItemSet& EditEngine::GetEmptyItemSet()
return pImpEditEngine->GetEmptyItemSet();
}
-void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect )
+void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect )
{
Draw( pOutDev, rOutRect, Point( 0, 0 ) );
}
@@ -214,7 +214,7 @@ void EditEngine::Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOri
{
// Create with 2 points, as with positive points it will end up with
// LONGMAX as Size, Bottom and Right in the range > LONGMAX.
- Rectangle aBigRect( -0x3FFFFFFF, -0x3FFFFFFF, 0x3FFFFFFF, 0x3FFFFFFF );
+ tools::Rectangle aBigRect( -0x3FFFFFFF, -0x3FFFFFFF, 0x3FFFFFFF, 0x3FFFFFFF );
if( pOutDev->GetConnectMetaFile() )
pOutDev->Push();
Point aStartPos( rStartPos );
@@ -228,12 +228,12 @@ void EditEngine::Draw( OutputDevice* pOutDev, const Point& rStartPos, short nOri
pOutDev->Pop();
}
-void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos )
+void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos )
{
Draw( pOutDev, rOutRect, rStartDocPos, true );
}
-void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const Point& rStartDocPos, bool bClip )
+void EditEngine::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect, const Point& rStartDocPos, bool bClip )
{
#if defined( DBG_UTIL ) || (OSL_DEBUG_LEVEL > 1)
if ( bDebugPaint )
@@ -242,7 +242,7 @@ void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const P
// Align to the pixel boundary, so that it becomes exactly the same
// as Paint ()
- Rectangle aOutRect( pOutDev->LogicToPixel( rOutRect ) );
+ tools::Rectangle aOutRect( pOutDev->LogicToPixel( rOutRect ) );
aOutRect = pOutDev->PixelToLogic( aOutRect );
Point aStartPos;
@@ -276,7 +276,7 @@ void EditEngine::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect, const P
{
// Some printer drivers cause problems if characters graze the
// ClipRegion, therefore rather add a pixel more ...
- Rectangle aClipRect( aOutRect );
+ tools::Rectangle aClipRect( aOutRect );
if ( pOutDev->GetOutDevType() == OUTDEV_PRINTER )
{
Size aPixSz( 1, 0 );
@@ -403,7 +403,7 @@ void EditEngine::SetPaperSize( const Size& rNewSize )
pView->pImpEditView->RecalcOutputArea();
else if ( pView->pImpEditView->DoAutoSize() )
{
- pView->pImpEditView->ResetOutputArea( Rectangle(
+ pView->pImpEditView->ResetOutputArea( tools::Rectangle(
pView->pImpEditView->GetOutputArea().TopLeft(), aNewSize ) );
}
}
@@ -1022,7 +1022,7 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v
P2.Y() += nH;
pEditView->GetWindow()->SetLineColor();
pEditView->GetWindow()->SetFillColor( Color( (n%2) ? COL_YELLOW : COL_LIGHTGREEN ) );
- pEditView->GetWindow()->DrawRect( Rectangle( P1, P2 ) );
+ pEditView->GetWindow()->DrawRect( tools::Rectangle( P1, P2 ) );
aPos.Y() += nH;
}
}
@@ -1341,7 +1341,7 @@ bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, v
aPos = pEditView->pImpEditView->GetWindow()->LogicToPixel( aPos );
aPos = pEditView->GetWindow()->OutputToScreenPixel( aPos );
aPos.Y() -= 3;
- Help::ShowQuickHelp( pEditView->GetWindow(), Rectangle( aPos, Size( 1, 1 ) ), aComplete, QuickHelpFlags::Bottom|QuickHelpFlags::Left );
+ Help::ShowQuickHelp( pEditView->GetWindow(), tools::Rectangle( aPos, Size( 1, 1 ) ), aComplete, QuickHelpFlags::Bottom|QuickHelpFlags::Left );
}
}
}
@@ -1774,7 +1774,7 @@ SvxFont EditEngine::GetStandardSvxFont( sal_Int32 nPara )
void EditEngine::StripPortions()
{
ScopedVclPtrInstance< VirtualDevice > aTmpDev;
- Rectangle aBigRect( Point( 0, 0 ), Size( 0x7FFFFFFF, 0x7FFFFFFF ) );
+ tools::Rectangle aBigRect( Point( 0, 0 ), Size( 0x7FFFFFFF, 0x7FFFFFFF ) );
if ( IsVertical() )
{
aBigRect.Right() = 0;
@@ -2369,16 +2369,16 @@ EPosition EditEngine::FindDocPosition( const Point& rDocPos ) const
return aPos;
}
-Rectangle EditEngine::GetCharacterBounds( const EPosition& rPos ) const
+tools::Rectangle EditEngine::GetCharacterBounds( const EPosition& rPos ) const
{
- Rectangle aBounds;
+ tools::Rectangle aBounds;
ContentNode* pNode = pImpEditEngine->GetEditDoc().GetObject( rPos.nPara );
// Check against index, not paragraph
if ( pNode && ( rPos.nIndex < pNode->Len() ) )
{
aBounds = pImpEditEngine->PaMtoEditCursor( EditPaM( pNode, rPos.nIndex ), GetCursorFlags::TextOnly );
- Rectangle aR2 = pImpEditEngine->PaMtoEditCursor( EditPaM( pNode, rPos.nIndex+1 ), GetCursorFlags::TextOnly|GetCursorFlags::EndOfLine );
+ tools::Rectangle aR2 = pImpEditEngine->PaMtoEditCursor( EditPaM( pNode, rPos.nIndex+1 ), GetCursorFlags::TextOnly|GetCursorFlags::EndOfLine );
if ( aR2.Right() > aBounds.Right() )
aBounds.Right() = aR2.Right();
}
@@ -2540,9 +2540,9 @@ OUString EditEngine::GetUndoComment( sal_uInt16 nId ) const
return aComment;
}
-Rectangle EditEngine::GetBulletArea( sal_Int32 )
+tools::Rectangle EditEngine::GetBulletArea( sal_Int32 )
{
- return Rectangle( Point(), Point() );
+ return tools::Rectangle( Point(), Point() );
}
OUString EditEngine::CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, Color*&, Color*& )
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 7b6ec40254cf..3f6aeacd7c37 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -172,13 +172,13 @@ EditEngine* EditView::GetEditEngine() const
return pImpEditView->pEditEngine;
}
-Rectangle EditView::GetInvalidateRect() const
+tools::Rectangle EditView::GetInvalidateRect() const
{
if ( !pImpEditView->DoInvalidateMore() )
return pImpEditView->aOutArea;
else
{
- Rectangle aRect( pImpEditView->aOutArea );
+ tools::Rectangle aRect( pImpEditView->aOutArea );
long nMore = pImpEditView->GetWindow()->PixelToLogic( Size( pImpEditView->GetInvalidateMore(), 0 ) ).Width();
aRect.Left() -= nMore;
aRect.Right() += nMore;
@@ -188,7 +188,7 @@ Rectangle EditView::GetInvalidateRect() const
}
}
-void EditView::InvalidateOtherViewWindows( const Rectangle& rInvRect )
+void EditView::InvalidateOtherViewWindows( const tools::Rectangle& rInvRect )
{
if (comphelper::LibreOfficeKit::isActive())
{
@@ -202,7 +202,7 @@ void EditView::InvalidateOtherViewWindows( const Rectangle& rInvRect )
void EditView::Invalidate()
{
- const Rectangle& rInvRect = GetInvalidateRect();
+ const tools::Rectangle& rInvRect = GetInvalidateRect();
pImpEditView->GetWindow()->Invalidate( rInvRect );
InvalidateOtherViewWindows( rInvRect );
}
@@ -283,12 +283,12 @@ SvtScriptType EditView::GetSelectedScriptType() const
return pImpEditView->pEditEngine->GetScriptType( pImpEditView->GetEditSelection() );
}
-void EditView::GetSelectionRectangles(std::vector<Rectangle>& rLogicRects) const
+void EditView::GetSelectionRectangles(std::vector<tools::Rectangle>& rLogicRects) const
{
return pImpEditView->GetSelectionRectangles(rLogicRects);
}
-void EditView::Paint( const Rectangle& rRect, OutputDevice* pTargetDevice )
+void EditView::Paint( const tools::Rectangle& rRect, OutputDevice* pTargetDevice )
{
pImpEditView->pEditEngine->pImpEditEngine->Paint( pImpEditView.get(), rRect, pTargetDevice );
}
@@ -337,20 +337,20 @@ bool EditView::RemoveOtherViewWindow( vcl::Window* pWin )
return true;
}
-void EditView::SetVisArea( const Rectangle& rRect )
+void EditView::SetVisArea( const tools::Rectangle& rRect )
{
pImpEditView->SetVisDocStartPos( rRect.TopLeft() );
}
-const Rectangle& EditView::GetVisArea() const
+const tools::Rectangle& EditView::GetVisArea() const
{
// Change return value to Rectangle in next incompatible build !!!
- static Rectangle aRect;
+ static tools::Rectangle aRect;
aRect = pImpEditView->GetVisDocArea();
return aRect;
}
-void EditView::SetOutputArea( const Rectangle& rRect )
+void EditView::SetOutputArea( const tools::Rectangle& rRect )
{
pImpEditView->SetOutputArea( rRect );
@@ -361,7 +361,7 @@ void EditView::SetOutputArea( const Rectangle& rRect )
pImpEditView->ShowCursor( false, false );
}
-const Rectangle& EditView::GetOutputArea() const
+const tools::Rectangle& EditView::GetOutputArea() const
{
return pImpEditView->GetOutputArea();
}
@@ -978,10 +978,10 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
aPopupMenu->RemoveDisabledEntries( true, true );
- Rectangle aTempRect = pImpEditView->pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, GetCursorFlags::TextOnly );
+ tools::Rectangle aTempRect = pImpEditView->pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, GetCursorFlags::TextOnly );
Point aScreenPos = pImpEditView->GetWindowPos( aTempRect.TopLeft() );
aScreenPos = pImpEditView->GetWindow()->OutputToScreenPixel( aScreenPos );
- aTempRect = pImpEditView->GetWindow()->LogicToPixel( Rectangle(aScreenPos, aTempRect.GetSize() ));
+ aTempRect = pImpEditView->GetWindow()->LogicToPixel( tools::Rectangle(aScreenPos, aTempRect.GetSize() ));
//tdf#106123 store and restore the EditPaM around the menu Execute
//because the loss of focus in the current editeng causes writer
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 9d2f03c3f585..25df5d898fd8 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -230,7 +230,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
// aTmpOutArea: if OutputArea > Paper width and
// Text > Paper width ( over large fields )
- Rectangle aTmpOutArea( aOutArea );
+ tools::Rectangle aTmpOutArea( aOutArea );
if ( aTmpOutArea.GetWidth() > pEditEngine->pImpEditEngine->GetPaperSize().Width() )
aTmpOutArea.Right() = aTmpOutArea.Left() + pEditEngine->pImpEditEngine->GetPaperSize().Width();
pTarget->IntersectClipRegion( aTmpOutArea );
@@ -294,7 +294,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
if ( nEndIndex < nStartIndex )
nEndIndex = nStartIndex;
- Rectangle aTmpRect( pEditEngine->pImpEditEngine->GetEditCursor( pTmpPortion, nStartIndex ) );
+ tools::Rectangle aTmpRect( pEditEngine->pImpEditEngine->GetEditCursor( pTmpPortion, nStartIndex ) );
Point aTopLeft( aTmpRect.TopLeft() );
Point aBottomRight( aTmpRect.BottomRight() );
@@ -380,21 +380,21 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
// If we are not in selection mode, then the exported own selection should be empty.
if (pEditEngine->pImpEditEngine->IsInSelectionMode() || mpOtherShell)
{
- std::vector<Rectangle> aRectangles;
+ std::vector<tools::Rectangle> aRectangles;
pRegion->GetRegionRectangles(aRectangles);
if (!aRectangles.empty())
{
- Rectangle& rStart = aRectangles.front();
- Rectangle aStart = Rectangle(rStart.Left(), rStart.Top(), rStart.Left() + 1, rStart.Bottom());
+ tools::Rectangle& rStart = aRectangles.front();
+ tools::Rectangle aStart = tools::Rectangle(rStart.Left(), rStart.Top(), rStart.Left() + 1, rStart.Bottom());
if (bMm100ToTwip)
aStart = OutputDevice::LogicToLogic(aStart, MapUnit::Map100thMM, MapUnit::MapTwip);
aStart.Move(aOrigin.getX(), aOrigin.getY());
mpViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION_START, aStart.toString().getStr());
- Rectangle& rEnd = aRectangles.back();
- Rectangle aEnd = Rectangle(rEnd.Right() - 1, rEnd.Top(), rEnd.Right(), rEnd.Bottom());
+ tools::Rectangle& rEnd = aRectangles.back();
+ tools::Rectangle aEnd = tools::Rectangle(rEnd.Right() - 1, rEnd.Top(), rEnd.Right(), rEnd.Bottom());
if (bMm100ToTwip)
aEnd = OutputDevice::LogicToLogic(aEnd, MapUnit::Map100thMM, MapUnit::MapTwip);
aEnd.Move(aOrigin.getX(), aOrigin.getY());
@@ -403,7 +403,7 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
}
std::vector<OString> v;
- for (Rectangle & rRectangle : aRectangles)
+ for (tools::Rectangle & rRectangle : aRectangles)
{
if (bMm100ToTwip)
rRectangle = OutputDevice::LogicToLogic(rRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
@@ -442,14 +442,14 @@ void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, Ou
}
}
-void ImpEditView::GetSelectionRectangles(std::vector<Rectangle>& rLogicRects)
+void ImpEditView::GetSelectionRectangles(std::vector<tools::Rectangle>& rLogicRects)
{
bool bMm100ToTwip = pOutWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM;
vcl::Region aRegion;
DrawSelection(aEditSelection, &aRegion);
aRegion.GetRegionRectangles(rLogicRects);
- for (Rectangle& rRectangle : rLogicRects)
+ for (tools::Rectangle& rRectangle : rLogicRects)
{
if (bMm100ToTwip)
rRectangle = OutputDevice::LogicToLogic(rRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
@@ -476,7 +476,7 @@ void ImpEditView::ImplDrawHighlightRect( OutputDevice* _pTarget, const Point& rD
lcl_AllignToPixel( aPnt2, _pTarget, ( bPixelMode ? 0 : +1 ), 0 );
}
- Rectangle aRect( aPnt1, aPnt2 );
+ tools::Rectangle aRect( aPnt1, aPnt2 );
if ( pPolyPoly )
{
tools::Polygon aTmpPoly( 4 );
@@ -513,9 +513,9 @@ bool ImpEditView::IsVertical() const
return pEditEngine->pImpEditEngine->IsVertical();
}
-Rectangle ImpEditView::GetVisDocArea() const
+tools::Rectangle ImpEditView::GetVisDocArea() const
{
- return Rectangle( GetVisDocLeft(), GetVisDocTop(), GetVisDocRight(), GetVisDocBottom() );
+ return tools::Rectangle( GetVisDocLeft(), GetVisDocTop(), GetVisDocRight(), GetVisDocBottom() );
}
Point ImpEditView::GetDocPos( const Point& rWindowPos ) const
@@ -556,20 +556,20 @@ Point ImpEditView::GetWindowPos( const Point& rDocPos ) const
return aPoint;
}
-Rectangle ImpEditView::GetWindowPos( const Rectangle& rDocRect ) const
+tools::Rectangle ImpEditView::GetWindowPos( const tools::Rectangle& rDocRect ) const
{
// Document position => window position
Point aPos( GetWindowPos( rDocRect.TopLeft() ) );
Size aSz = rDocRect.GetSize();
- Rectangle aRect;
+ tools::Rectangle aRect;
if ( !pEditEngine->pImpEditEngine->IsVertical() )
{
- aRect = Rectangle( aPos, aSz );
+ aRect = tools::Rectangle( aPos, aSz );
}
else
{
Point aNewPos( aPos.X()-aSz.Height(), aPos.Y() );
- aRect = Rectangle( aNewPos, Size( aSz.Height(), aSz.Width() ) );
+ aRect = tools::Rectangle( aNewPos, Size( aSz.Height(), aSz.Width() ) );
}
return aRect;
}
@@ -584,10 +584,10 @@ void ImpEditView::SetSelectionMode( EESelectionMode eNewMode )
}
}
-void ImpEditView::SetOutputArea( const Rectangle& rRect )
+void ImpEditView::SetOutputArea( const tools::Rectangle& rRect )
{
// should be better be aligned on pixels!
- Rectangle aNewRect( pOutWin->LogicToPixel( rRect ) );
+ tools::Rectangle aNewRect( pOutWin->LogicToPixel( rRect ) );
aNewRect = pOutWin->PixelToLogic( aNewRect );
aOutArea = aNewRect;
if ( aOutArea.Right() < aOutArea.Left() )
@@ -601,10 +601,10 @@ void ImpEditView::SetOutputArea( const Rectangle& rRect )
SetScrollDiffX( (sal_uInt16)aOutArea.GetWidth() * 2 / 10 );
}
-void ImpEditView::ResetOutputArea( const Rectangle& rRect )
+void ImpEditView::ResetOutputArea( const tools::Rectangle& rRect )
{
// remember old out area
- const Rectangle aOldArea(aOutArea);
+ const tools::Rectangle aOldArea(aOutArea);
// apply new one
SetOutputArea(rRect);
@@ -617,38 +617,38 @@ void ImpEditView::ResetOutputArea( const Rectangle& rRect )
if(aOldArea.Left() > aOutArea.Left())
{
- GetWindow()->Invalidate(Rectangle(aOutArea.Left() - nMore, aOldArea.Top() - nMore, aOldArea.Left(), aOldArea.Bottom() + nMore));
+ GetWindow()->Invalidate(tools::Rectangle(aOutArea.Left() - nMore, aOldArea.Top() - nMore, aOldArea.Left(), aOldArea.Bottom() + nMore));
}
else if(aOldArea.Left() < aOutArea.Left())
{
- GetWindow()->Invalidate(Rectangle(aOldArea.Left() - nMore, aOldArea.Top() - nMore, aOutArea.Left(), aOldArea.Bottom() + nMore));
+ GetWindow()->Invalidate(tools::Rectangle(aOldArea.Left() - nMore, aOldArea.Top() - nMore, aOutArea.Left(), aOldArea.Bottom() + nMore));
}
if(aOldArea.Right() > aOutArea.Right())
{
- GetWindow()->Invalidate(Rectangle(aOutArea.Right(), aOldArea.Top() - nMore, aOldArea.Right() + nMore, aOldArea.Bottom() + nMore));
+ GetWindow()->Invalidate(tools::Rectangle(aOutArea.Right(), aOldArea.Top() - nMore, aOldArea.Right() + nMore, aOldArea.Bottom() + nMore));
}
else if(aOldArea.Right() < aOutArea.Right())
{
- GetWindow()->Invalidate(Rectangle(aOldArea.Right(), aOldArea.Top() - nMore, aOutArea.Right() + nMore, aOldArea.Bottom() + nMore));
+ GetWindow()->Invalidate(tools::Rectangle(aOldArea.Right(), aOldArea.Top() - nMore, aOutArea.Right() + nMore, aOldArea.Bottom() + nMore));
}
if(aOldArea.Top() > aOutArea.Top())
{
- GetWindow()->Invalidate(Rectangle(aOldArea.Left() - nMore, aOutArea.Top() - nMore, aOldArea.Right() + nMore, aOldArea.Top()));
+ GetWindow()->Invalidate(tools::Rectangle(aOldArea.Left() - nMore, aOutArea.Top() - nMore, aOldArea.Right() + nMore, aOldArea.Top()));
}
else if(aOldArea.Top() < aOutArea.Top())
{
- GetWindow()->Invalidate(Rectangle(aOldArea.Left() - nMore, aOldArea.Top() - nMore, aOldArea.Right() + nMore, aOutArea.Top()));
+ GetWindow()->Invalidate(tools::Rectangle(aOldArea.Left() - nMore, aOldArea.Top() - nMore, aOldArea.Right() + nMore, aOutArea.Top()));
}
if(aOldArea.Bottom() > aOutArea.Bottom())
{
- GetWindow()->Invalidate(Rectangle(aOldArea.Left() - nMore, aOutArea.Bottom(), aOldArea.Right() + nMore, aOldArea.Bottom() + nMore));
+ GetWindow()->Invalidate(tools::Rectangle(aOldArea.Left() - nMore, aOutArea.Bottom(), aOldArea.Right() + nMore, aOldArea.Bottom() + nMore));
}
else if(aOldArea.Bottom() < aOutArea.Bottom())
{
- GetWindow()->Invalidate(Rectangle(aOldArea.Left() - nMore, aOldArea.Bottom(), aOldArea.Right() + nMore, aOutArea.Bottom() + nMore));
+ GetWindow()->Invalidate(tools::Rectangle(aOldArea.Left() - nMore, aOldArea.Bottom(), aOldArea.Right() + nMore, aOutArea.Bottom() + nMore));
}
}
}
@@ -719,7 +719,7 @@ void ImpEditView::RecalcOutputArea()
break;
}
}
- ResetOutputArea( Rectangle( aNewTopLeft, aNewSz ) );
+ ResetOutputArea( tools::Rectangle( aNewTopLeft, aNewSz ) );
}
void ImpEditView::SetAnchorMode( EVAnchorMode eMode )
@@ -827,7 +827,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
nShowCursorFlags |= GetCursorFlags::PreferPortionStart;
}
- Rectangle aEditCursor = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, nShowCursorFlags );
+ tools::Rectangle aEditCursor = pEditEngine->pImpEditEngine->PaMtoEditCursor( aPaM, nShowCursorFlags );
if ( !IsInsertMode() && !aEditSelection.HasRange() )
{
if ( aPaM.GetNode()->Len() && ( aPaM.GetIndex() < aPaM.GetNode()->Len() ) )
@@ -844,7 +844,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
else
{
EditPaM aNext = pEditEngine->CursorRight( aPaM );
- Rectangle aTmpRect = pEditEngine->pImpEditEngine->PaMtoEditCursor( aNext, GetCursorFlags::TextOnly );
+ tools::Rectangle aTmpRect = pEditEngine->pImpEditEngine->PaMtoEditCursor( aNext, GetCursorFlags::TextOnly );
if ( aTmpRect.Top() != aEditCursor.Top() )
aTmpRect = pEditEngine->pImpEditEngine->PaMtoEditCursor( aNext, GetCursorFlags::TextOnly|GetCursorFlags::EndOfLine );
aEditCursor.Right() = aTmpRect.Left();
@@ -863,7 +863,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
long nDocDiffX = 0;
long nDocDiffY = 0;
- Rectangle aTmpVisArea( GetVisDocArea() );
+ tools::Rectangle aTmpVisArea( GetVisDocArea() );
// aTmpOutArea: if OutputArea > Paper width and
// Text > Paper width ( over large fields )
long nMaxTextWidth = !IsVertical() ? pEditEngine->pImpEditEngine->GetPaperSize().Width() : pEditEngine->pImpEditEngine->GetPaperSize().Height();
@@ -971,7 +971,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
( aEditCursor.Left() + nOnePixel >= GetVisDocLeft() ) &&
( aEditCursor.Right() - nOnePixel <= GetVisDocRight() ) ) )
{
- Rectangle aCursorRect = GetWindowPos( aEditCursor );
+ tools::Rectangle aCursorRect = GetWindowPos( aEditCursor );
GetCursor()->SetPos( aCursorRect.TopLeft() );
Size aCursorSz( aCursorRect.GetSize() );
// Rectangle is inclusive
@@ -1004,7 +1004,7 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor )
if (comphelper::LibreOfficeKit::isActive() && mpViewShell)
{
const Point& rPos = GetCursor()->GetPos();
- Rectangle aRect(rPos.getX(), rPos.getY(), rPos.getX() + GetCursor()->GetWidth(), rPos.getY() + GetCursor()->GetHeight());
+ tools::Rectangle aRect(rPos.getX(), rPos.getY(), rPos.getX() + GetCursor()->GetWidth(), rPos.getY() + GetCursor()->GetHeight());
// LOK output is always in twips, convert from mm100 if necessary.
if (pOutWin->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
@@ -1071,13 +1071,13 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck )
return Pair( 0, 0 );
#ifdef DBG_UTIL
- Rectangle aR( aOutArea );
+ tools::Rectangle aR( aOutArea );
aR = pOutWin->LogicToPixel( aR );
aR = pOutWin->PixelToLogic( aR );
SAL_WARN_IF( aR != aOutArea, "editeng", "OutArea before Scroll not aligned" );
#endif
- Rectangle aNewVisArea( GetVisDocArea() );
+ tools::Rectangle aNewVisArea( GetVisDocArea() );
// Vertical:
if ( !IsVertical() )
@@ -1144,7 +1144,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck )
// rectangle ...
aVisDocStartPos = pOutWin->LogicToPixel( aVisDocStartPos );
aVisDocStartPos = pOutWin->PixelToLogic( aVisDocStartPos );
- Rectangle aRect( aOutArea );
+ tools::Rectangle aRect( aOutArea );
pOutWin->Scroll( nRealDiffX, nRealDiffY, aRect, ScrollFlags::Clip );
if (comphelper::LibreOfficeKit::isActive())
@@ -1157,7 +1157,7 @@ Pair ImpEditView::Scroll( long ndX, long ndY, ScrollRangeCheck nRangeCheck )
pCrsr->SetPos( pCrsr->GetPos() + Point( nRealDiffX, nRealDiffY ) );
if ( bVisCursor )
{
- Rectangle aCursorRect( pCrsr->GetPos(), pCrsr->GetSize() );
+ tools::Rectangle aCursorRect( pCrsr->GetPos(), pCrsr->GetSize() );
if ( aOutArea.IsInside( aCursorRect ) )
pCrsr->Show();
}
@@ -1405,7 +1405,7 @@ bool ImpEditView::IsBulletArea( const Point& rPos, sal_Int32* pPara )
if ( aPaM.GetIndex() == 0 )
{
sal_Int32 nPara = pEditEngine->GetEditDoc().GetPos( aPaM.GetNode() );
- Rectangle aBulletArea = pEditEngine->GetBulletArea( nPara );
+ tools::Rectangle aBulletArea = pEditEngine->GetBulletArea( nPara );
long nY = pEditEngine->GetDocPosTopLeft( nPara ).Y();
const ParaPortion* pParaPortion = pEditEngine->GetParaPortions()[nPara];
nY += pParaPortion->GetFirstLineOffset();
@@ -1659,7 +1659,7 @@ void ImpEditView::HideDDCursor()
}
}
-void ImpEditView::ShowDDCursor( const Rectangle& rRect )
+void ImpEditView::ShowDDCursor( const tools::Rectangle& rRect )
{
if ( pDragAndDropInfo && !pDragAndDropInfo->bVisCursor )
{
@@ -1670,7 +1670,7 @@ void ImpEditView::ShowDDCursor( const Rectangle& rRect )
GetWindow()->SetFillColor( Color(4210752) ); // GRAY BRUSH_50, OLDSV, change to DDCursor!
// Save background ...
- Rectangle aSaveRect( GetWindow()->LogicToPixel( rRect ) );
+ tools::Rectangle aSaveRect( GetWindow()->LogicToPixel( rRect ) );
// prefer to save some more ...
aSaveRect.Right() += 1;
aSaveRect.Bottom() += 1;
@@ -2076,7 +2076,7 @@ void ImpEditView::dragOver(const css::datatransfer::dnd::DropTargetDragEvent& rD
}
if ( bAccept )
{
- Rectangle aEditCursor;
+ tools::Rectangle aEditCursor;
if ( pDragAndDropInfo->bOutlinerMode )
{
long nDDYPos;
@@ -2093,7 +2093,7 @@ void ImpEditView::dragOver(const css::datatransfer::dnd::DropTargetDragEvent& rD
aStartPos = GetWindowPos( aStartPos );
Point aEndPos( GetOutputArea().GetWidth(), nDDYPos );
aEndPos = GetWindowPos( aEndPos );
- aEditCursor = GetWindow()->LogicToPixel( Rectangle( aStartPos, aEndPos ) );
+ aEditCursor = GetWindow()->LogicToPixel( tools::Rectangle( aStartPos, aEndPos ) );
if ( !pEditEngine->IsVertical() )
{
aEditCursor.Top()--;
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index e3a0d8046c5e..fe0ce85c2386 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -116,8 +116,8 @@ namespace o3tl {
struct DragAndDropInfo
{
- Rectangle aCurCursor;
- Rectangle aCurSavedCursor;
+ tools::Rectangle aCurCursor;
+ tools::Rectangle aCurSavedCursor;
sal_uInt16 nSensibleRange;
sal_uInt16 nCursorWidth;
ESelection aBeginDragSel;
@@ -253,7 +253,7 @@ private:
bool bActiveDragAndDropListener;
Point aAnchorPoint;
- Rectangle aOutArea;
+ tools::Rectangle aOutArea;
Point aVisDocStartPos;
EESelectionMode eSelectionMode;
EditSelection aEditSelection;
@@ -269,7 +269,7 @@ protected:
void dragExit( const css::datatransfer::dnd::DropTargetEvent& dte ) override;
void dragOver(const css::datatransfer::dnd::DropTargetDragEvent& dtde) override;
- void ShowDDCursor( const Rectangle& rRect );
+ void ShowDDCursor( const tools::Rectangle& rRect );
void HideDDCursor();
void ImplDrawHighlightRect( OutputDevice* _pTarget, const Point& rDocPosTopLeft, const Point& rDocPosBottomRight, tools::PolyPolygon* pPolyPoly );
@@ -288,11 +288,11 @@ public:
Point GetDocPos( const Point& rWindowPos ) const;
Point GetWindowPos( const Point& rDocPos ) const;
- Rectangle GetWindowPos( const Rectangle& rDocPos ) const;
+ tools::Rectangle GetWindowPos( const tools::Rectangle& rDocPos ) const;
- void SetOutputArea( const Rectangle& rRect );
- void ResetOutputArea( const Rectangle& rRect );
- const Rectangle& GetOutputArea() const { return aOutArea; }
+ void SetOutputArea( const tools::Rectangle& rRect );
+ void ResetOutputArea( const tools::Rectangle& rRect );
+ const tools::Rectangle& GetOutputArea() const { return aOutArea; }
bool IsVertical() const;
@@ -313,7 +313,7 @@ public:
long GetVisDocTop() const { return aVisDocStartPos.Y(); }
long GetVisDocRight() const { return aVisDocStartPos.X() + ( !IsVertical() ? aOutArea.GetWidth() : aOutArea.GetHeight() ); }
long GetVisDocBottom() const { return aVisDocStartPos.Y() + ( !IsVertical() ? aOutArea.GetHeight() : aOutArea.GetWidth() ); }
- Rectangle GetVisDocArea() const;
+ tools::Rectangle GetVisDocArea() const;
EditSelection& GetEditSelection() { return aEditSelection; }
void SetEditSelection( const EditSelection& rEditSelection );
@@ -321,7 +321,7 @@ public:
void DrawSelection() { DrawSelection( aEditSelection ); }
void DrawSelection( EditSelection, vcl::Region* pRegion = nullptr, OutputDevice* pTargetDevice = nullptr );
- void GetSelectionRectangles(std::vector<Rectangle>& rLogicRects);
+ void GetSelectionRectangles(std::vector<tools::Rectangle>& rLogicRects);
vcl::Window* GetWindow() const { return pOutWin; }
@@ -470,7 +470,7 @@ private:
// For Formatting / Update ....
std::vector<std::unique_ptr<DeletedNodeInfo> > aDeletedNodes;
- Rectangle aInvalidRect;
+ tools::Rectangle aInvalidRect;
sal_uInt32 nCurTextHeight;
sal_uInt32 nCurTextHeightNTP; // without trailing empty paragraphs
sal_uInt16 nOnePixelInRef;
@@ -751,8 +751,8 @@ public:
void FormatDoc();
void FormatFullDoc();
void UpdateViews( EditView* pCurView = nullptr );
- void Paint( ImpEditView* pView, const Rectangle& rRect, OutputDevice* pTargetDevice );
- void Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aStartPos, bool bStripOnly = false, short nOrientation = 0 );
+ void Paint( ImpEditView* pView, const tools::Rectangle& rRect, OutputDevice* pTargetDevice );
+ void Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Point aStartPos, bool bStripOnly = false, short nOrientation = 0 );
bool MouseButtonUp( const MouseEvent& rMouseEvent, EditView* pView );
bool MouseButtonDown( const MouseEvent& rMouseEvent, EditView* pView );
@@ -834,8 +834,8 @@ public:
bool HasParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const;
const SfxPoolItem& GetParaAttrib( sal_Int32 nPara, sal_uInt16 nWhich ) const;
- Rectangle PaMtoEditCursor( EditPaM aPaM, GetCursorFlags nFlags = GetCursorFlags::NONE );
- Rectangle GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex, GetCursorFlags nFlags = GetCursorFlags::NONE );
+ tools::Rectangle PaMtoEditCursor( EditPaM aPaM, GetCursorFlags nFlags = GetCursorFlags::NONE );
+ tools::Rectangle GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex, GetCursorFlags nFlags = GetCursorFlags::NONE );
bool IsModified() const { return aEditDoc.IsModified(); }
void SetModifyFlag( bool b ) { aEditDoc.SetModified( b ); }
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index d925b2c8a0cc..64f9daaf9a2e 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -483,7 +483,7 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
if ( mpIMEInfos && mpIMEInfos->nLen )
{
EditPaM aPaM( pView->pImpEditView->GetEditSelection().Max() );
- Rectangle aR1 = PaMtoEditCursor( aPaM );
+ tools::Rectangle aR1 = PaMtoEditCursor( aPaM );
sal_Int32 nInputEnd = mpIMEInfos->aPos.GetIndex() + mpIMEInfos->nLen;
@@ -495,8 +495,8 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
const EditLine& rLine = pParaPortion->GetLines()[nLine];
if ( nInputEnd > rLine.GetEnd() )
nInputEnd = rLine.GetEnd();
- Rectangle aR2 = PaMtoEditCursor( EditPaM( aPaM.GetNode(), nInputEnd ), GetCursorFlags::EndOfLine );
- Rectangle aRect = pView->GetImpEditView()->GetWindowPos( aR1 );
+ tools::Rectangle aR2 = PaMtoEditCursor( EditPaM( aPaM.GetNode(), nInputEnd ), GetCursorFlags::EndOfLine );
+ tools::Rectangle aRect = pView->GetImpEditView()->GetWindowPos( aR1 );
pView->GetWindow()->SetCursorRect( &aRect, aR2.Left()-aR1.Right() );
}
else
@@ -551,13 +551,13 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
ParaPortion* pParaPortion = GetParaPortions().SafeGetObject( GetEditDoc().GetPos( aPaM.GetNode() ) );
sal_Int32 nLine = pParaPortion->GetLines().FindLine( aPaM.GetIndex(), true );
const EditLine& rLine = pParaPortion->GetLines()[nLine];
- std::unique_ptr<Rectangle[]> aRects(new Rectangle[ mpIMEInfos->nLen ]);
+ std::unique_ptr<tools::Rectangle[]> aRects(new tools::Rectangle[ mpIMEInfos->nLen ]);
for (sal_Int32 i = 0; i < mpIMEInfos->nLen; ++i)
{
sal_Int32 nInputPos = mpIMEInfos->aPos.GetIndex() + i;
if ( nInputPos > rLine.GetEnd() )
nInputPos = rLine.GetEnd();
- Rectangle aR2 = GetEditCursor( pParaPortion, nInputPos );
+ tools::Rectangle aR2 = GetEditCursor( pParaPortion, nInputPos );
aRects[ i ] = pView->GetImpEditView()->GetWindowPos( aR2 );
}
pView->GetWindow()->SetCompositionCharRect( aRects.get(), mpIMEInfos->nLen );
@@ -671,7 +671,7 @@ void ImpEditEngine::SetText(const OUString& rText)
// => The text remains.
if (rText.isEmpty() && GetUpdateMode())
{
- Rectangle aTmpRect( pView->GetOutputArea().TopLeft(),
+ tools::Rectangle aTmpRect( pView->GetOutputArea().TopLeft(),
Size( aPaperSize.Width(), nCurTextHeight ) );
aTmpRect.Intersection( pView->GetOutputArea() );
pView->GetWindow()->Invalidate( aTmpRect );
@@ -1374,7 +1374,7 @@ EditPaM ImpEditEngine::CursorEndOfDoc()
EditPaM ImpEditEngine::PageUp( const EditPaM& rPaM, EditView* pView )
{
- Rectangle aRect = PaMtoEditCursor( rPaM );
+ tools::Rectangle aRect = PaMtoEditCursor( rPaM );
Point aTopLeft = aRect.TopLeft();
aTopLeft.Y() -= pView->GetVisArea().GetHeight() *9/10;
aTopLeft.X() += nOnePixelInRef;
@@ -1387,7 +1387,7 @@ EditPaM ImpEditEngine::PageUp( const EditPaM& rPaM, EditView* pView )
EditPaM ImpEditEngine::PageDown( const EditPaM& rPaM, EditView* pView )
{
- Rectangle aRect = PaMtoEditCursor( rPaM );
+ tools::Rectangle aRect = PaMtoEditCursor( rPaM );
Point aBottomRight = aRect.BottomRight();
aBottomRight.Y() += pView->GetVisArea().GetHeight() *9/10;
aBottomRight.X() += nOnePixelInRef;
@@ -2976,11 +2976,11 @@ EditPaM ImpEditEngine::InsertLineBreak(const EditSelection& aCurSel)
// Helper functions
-Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, GetCursorFlags nFlags )
+tools::Rectangle ImpEditEngine::PaMtoEditCursor( EditPaM aPaM, GetCursorFlags nFlags )
{
OSL_ENSURE( GetUpdateMode(), "Must not be reached when Update=FALSE: PaMtoEditCursor" );
- Rectangle aEditCursor;
+ tools::Rectangle aEditCursor;
long nY = 0;
for ( sal_Int32 nPortion = 0; nPortion < GetParaPortions().Count(); nPortion++ )
{
@@ -4126,7 +4126,7 @@ void ImpEditEngine::CalcHeight( ParaPortion* pPortion )
}
}
-Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex, GetCursorFlags nFlags )
+tools::Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex, GetCursorFlags nFlags )
{
OSL_ENSURE( pPortion->IsVisible(), "Why GetEditCursor() for an invisible paragraph?" );
OSL_ENSURE( IsFormatted() || GetTextRanger(), "GetEditCursor: Not formatted" );
@@ -4148,7 +4148,7 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex,
sal_Int32 nLineCount = pPortion->GetLines().Count();
OSL_ENSURE( nLineCount, "Empty ParaPortion in GetEditCursor!" );
if (nLineCount == 0)
- return Rectangle();
+ return tools::Rectangle();
const EditLine* pLine = nullptr;
bool bEOL( nFlags & GetCursorFlags::EndOfLine );
for (sal_Int32 nLine = 0; nLine < nLineCount; ++nLine)
@@ -4176,7 +4176,7 @@ Rectangle ImpEditEngine::GetEditCursor( ParaPortion* pPortion, sal_Int32 nIndex,
nY -= nSBL;
}
- Rectangle aEditCursor;
+ tools::Rectangle aEditCursor;
aEditCursor.Top() = nY;
nY += pLine->GetHeight();
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index c45f239d3885..ba3520c00572 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -281,8 +281,8 @@ void ImpEditEngine::UpdateViews( EditView* pCurView )
{
pView->HideCursor();
- Rectangle aClipRect( aInvalidRect );
- Rectangle aVisArea( pView->GetVisArea() );
+ tools::Rectangle aClipRect( aInvalidRect );
+ tools::Rectangle aVisArea( pView->GetVisArea() );
aClipRect.Intersection( aVisArea );
if ( !aClipRect.IsEmpty() )
@@ -300,7 +300,7 @@ void ImpEditEngine::UpdateViews( EditView* pCurView )
pCurView->ShowCursor( bGotoCursor );
}
- aInvalidRect = Rectangle();
+ aInvalidRect = tools::Rectangle();
CallStatusHdl();
}
@@ -372,7 +372,7 @@ void ImpEditEngine::FormatDoc()
// Here already, so that not always in CreateLines...
bool bMapChanged = ImpCheckRefMapMode();
- aInvalidRect = Rectangle(); // make empty
+ aInvalidRect = tools::Rectangle(); // make empty
for ( sal_Int32 nPara = 0; nPara < GetParaPortions().Count(); nPara++ )
{
ParaPortion* pParaPortion = GetParaPortions()[nPara];
@@ -404,7 +404,7 @@ void ImpEditEngine::FormatDoc()
// For Paperwidth 0 (AutoPageSize) it would otherwise be Empty()...
long nWidth = std::max( (long)1, ( !IsVertical() ? aPaperSize.Width() : aPaperSize.Height() ) );
Range aInvRange( GetInvalidYOffsets( pParaPortion ) );
- aInvalidRect = Rectangle( Point( 0, nY+aInvRange.Min() ),
+ aInvalidRect = tools::Rectangle( Point( 0, nY+aInvRange.Min() ),
Size( nWidth, aInvRange.Len() ) );
}
else
@@ -456,7 +456,7 @@ void ImpEditEngine::FormatDoc()
aSz.Height() = aMaxAutoPaperSize.Height();
else if ( aSz.Height() < aMinAutoPaperSize.Height() )
aSz.Height() = aMinAutoPaperSize.Height();
- pImpView->ResetOutputArea( Rectangle(
+ pImpView->ResetOutputArea( tools::Rectangle(
pImpView->GetOutputArea().TopLeft(), aSz ) );
}
}
@@ -545,7 +545,7 @@ void ImpEditEngine::CheckAutoPageSize()
aSz.Width() = aInvSize.Height();
aSz.Height() = aInvSize.Width();
}
- aInvalidRect = Rectangle( Point(), aSz );
+ aInvalidRect = tools::Rectangle( Point(), aSz );
for (EditView* pView : aEditViews)
@@ -726,8 +726,8 @@ bool ImpEditEngine::CreateLines( sal_Int32 nPara, sal_uInt32 nStartPosY )
EditLine* pLine = &pParaPortion->GetLines()[nLine];
- static Rectangle aZeroArea = Rectangle( Point(), Point() );
- Rectangle aBulletArea( aZeroArea );
+ static tools::Rectangle aZeroArea = tools::Rectangle( Point(), Point() );
+ tools::Rectangle aBulletArea( aZeroArea );
if ( !nLine )
{
aBulletArea = GetEditEnginePtr()->GetBulletArea( GetParaPortions().GetPos( pParaPortion ) );
@@ -1645,7 +1645,7 @@ void ImpEditEngine::CreateAndInsertEmptyLine( ParaPortion* pParaPortion, sal_uIn
const SvxLineSpacingItem& rLSItem = static_cast<const SvxLineSpacingItem&>(pParaPortion->GetNode()->GetContentAttribs().GetItem( EE_PARA_SBL ));
long nStartX = GetXValue( rLRItem.GetTextLeft() + rLRItem.GetTextFirstLineOfst() + nSpaceBefore );
- Rectangle aBulletArea = Rectangle( Point(), Point() );
+ tools::Rectangle aBulletArea = tools::Rectangle( Point(), Point() );
if ( bLineBreak )
{
nStartX = GetXValue( rLRItem.GetTextLeft() + rLRItem.GetTextFirstLineOfst() + nSpaceBeforeAndMinLabelWidth );
@@ -2905,7 +2905,7 @@ void ImpEditEngine::RecalcFormatterFontMetrics( FormatterFontMetric& rCurMetrics
}
}
-void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aStartPos, bool bStripOnly, short nOrientation )
+void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Point aStartPos, bool bStripOnly, short nOrientation )
{
if ( !GetUpdateMode() && !bStripOnly )
return;
@@ -3162,7 +3162,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
pOutDev->SetFillColor( COL_LIGHTGRAY );
pOutDev->SetLineColor( COL_LIGHTGRAY );
- const Rectangle aBackRect( aTopLeftRectPos, aBottomRightRectPos );
+ const tools::Rectangle aBackRect( aTopLeftRectPos, aBottomRightRectPos );
pOutDev->DrawRect( aBackRect );
pOutDev->Pop();
@@ -3492,7 +3492,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
aTopLeft.Y() -= pLine->GetMaxAscent();
if ( nOrientation )
aTopLeft = lcl_ImplCalcRotatedPos( aTopLeft, aOrigin, nSin, nCos );
- Rectangle aRect( aTopLeft, rTextPortion.GetSize() );
+ tools::Rectangle aRect( aTopLeft, rTextPortion.GetSize() );
pOutDev->DrawRect( aRect );
}
@@ -3511,7 +3511,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
Point aTopLeft( aTmpPos );
aTopLeft.Y() -= pLine->GetMaxAscent();
- Rectangle aRect( aTopLeft, rTextPortion.GetSize() );
+ tools::Rectangle aRect( aTopLeft, rTextPortion.GetSize() );
vcl::PDFExtOutDevBookmarkEntry aBookmark;
aBookmark.nLinkId = pPDFExtOutDevData->CreateLink( aRect );
aBookmark.aBookmark = static_cast<const SvxURLField*>(pFieldData)->GetURL();
@@ -3713,7 +3713,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
pOutDev->SetFont( aOldFont );
}
-void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRect, OutputDevice* pTargetDevice )
+void ImpEditEngine::Paint( ImpEditView* pView, const tools::Rectangle& rRect, OutputDevice* pTargetDevice )
{
DBG_ASSERT( pView, "No View - No Paint!" );
@@ -3721,7 +3721,7 @@ void ImpEditEngine::Paint( ImpEditView* pView, const Rectangle& rRect, OutputDev
return;
// Intersection of paint area and output area.
- Rectangle aClipRect( pView->GetOutputArea() );
+ tools::Rectangle aClipRect( pView->GetOutputArea() );
aClipRect.Intersection( rRect );
OutputDevice* pTarget = pTargetDevice ? pTargetDevice : pView->GetWindow();
@@ -3860,7 +3860,7 @@ void ImpEditEngine::ShowParagraph( sal_Int32 nParagraph, bool bShow )
pPPortion->SetMustRepaint( true );
if ( GetUpdateMode() && !IsInUndo() && !GetTextRanger() )
{
- aInvalidRect = Rectangle( Point( 0, GetParaPortions().GetYOffset( pPPortion ) ),
+ aInvalidRect = tools::Rectangle( Point( 0, GetParaPortions().GetYOffset( pPPortion ) ),
Point( GetPaperSize().Width(), nCurTextHeight ) );
UpdateViews( GetActiveView() );
}
@@ -3892,7 +3892,7 @@ EditSelection ImpEditEngine::MoveParagraphs( Range aOldPositions, sal_Int32 nNew
ParaPortion* pUpperPortion = GetParaPortions().SafeGetObject( nFirstPortion );
ParaPortion* pLowerPortion = GetParaPortions().SafeGetObject( nLastPortion );
- aInvalidRect = Rectangle(); // make empty
+ aInvalidRect = tools::Rectangle(); // make empty
aInvalidRect.Left() = 0;
aInvalidRect.Right() = aPaperSize.Width();
aInvalidRect.Top() = GetParaPortions().GetYOffset( pUpperPortion );
@@ -4122,7 +4122,7 @@ void ImpEditEngine::SetCharStretching( sal_uInt16 nX, sal_uInt16 nY )
{
FormatFullDoc();
// (potentially) need everything redrawn
- aInvalidRect=Rectangle(0,0,1000000,1000000);
+ aInvalidRect=tools::Rectangle(0,0,1000000,1000000);
UpdateViews( GetActiveView() );
}
}
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index c647a820cad8..99a926075737 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2389,8 +2389,8 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC
// clipping, ... over all views. Probably not worthwhile.
EditPaM aStartPaM( pNode, nPaintFrom );
EditPaM aEndPaM( pNode, nPaintTo );
- Rectangle aStartCursor( PaMtoEditCursor( aStartPaM ) );
- Rectangle aEndCursor( PaMtoEditCursor( aEndPaM ) );
+ tools::Rectangle aStartCursor( PaMtoEditCursor( aStartPaM ) );
+ tools::Rectangle aEndCursor( PaMtoEditCursor( aEndPaM ) );
DBG_ASSERT( aInvalidRect.IsEmpty(), "InvalidRect set!" );
aInvalidRect.Left() = 0;
aInvalidRect.Right() = GetPaperSize().Width();
@@ -2405,7 +2405,7 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC
{
for (EditView* pView : aEditViews)
{
- Rectangle aClipRect( aInvalidRect );
+ tools::Rectangle aClipRect( aInvalidRect );
aClipRect.Intersection( pView->GetVisArea() );
if ( !aClipRect.IsEmpty() )
{
@@ -2419,7 +2419,7 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC
{
UpdateViews( pActiveView );
}
- aInvalidRect = Rectangle();
+ aInvalidRect = tools::Rectangle();
}
}
// After two corrected nodes give up the control ...
@@ -2693,7 +2693,7 @@ void ImpEditEngine::SetAutoCompleteText(const OUString& rStr, bool bClearTipWind
{
aAutoCompleteText = rStr;
if ( bClearTipWindow && pActiveView )
- Help::ShowQuickHelp( pActiveView->GetWindow(), Rectangle(), OUString() );
+ Help::ShowQuickHelp( pActiveView->GetWindow(), tools::Rectangle(), OUString() );
}
namespace
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index 274e31f8f2ab..33b267be1fb9 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -55,7 +55,7 @@ SvxFont::SvxFont( const SvxFont &rFont )
SetLanguage(rFont.GetLanguage());
}
-void SvxFont::DrawArrow( OutputDevice &rOut, const Rectangle& rRect,
+void SvxFont::DrawArrow( OutputDevice &rOut, const tools::Rectangle& rRect,
const Size& rSize, const Color& rCol, bool bLeft )
{
long nLeft = ( rRect.Left() + rRect.Right() - rSize.Width() )/ 2;
diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx
index afa88b53cbe9..08fd01941a27 100644
--- a/editeng/source/misc/txtrange.cxx
+++ b/editeng/source/misc/txtrange.cxx
@@ -654,10 +654,10 @@ LongDqPtr TextRanger::GetTextRanges( const Range& rRange )
return &(mRangeCache.back().results);
}
-const Rectangle& TextRanger::GetBoundRect_()
+const tools::Rectangle& TextRanger::GetBoundRect_()
{
DBG_ASSERT( nullptr == pBound, "Don't call twice." );
- pBound = new Rectangle( mpPolyPolygon->GetBoundRect() );
+ pBound = new tools::Rectangle( mpPolyPolygon->GetBoundRect() );
return *pBound;
}
diff --git a/editeng/source/outliner/outleeng.cxx b/editeng/source/outliner/outleeng.cxx
index 3863c98e5919..571196e24b74 100644
--- a/editeng/source/outliner/outleeng.cxx
+++ b/editeng/source/outliner/outleeng.cxx
@@ -64,9 +64,9 @@ const SvxNumberFormat* OutlinerEditEng::GetNumberFormat( sal_Int32 nPara ) const
}
-Rectangle OutlinerEditEng::GetBulletArea( sal_Int32 nPara )
+tools::Rectangle OutlinerEditEng::GetBulletArea( sal_Int32 nPara )
{
- Rectangle aBulletArea = Rectangle( Point(), Point() );
+ tools::Rectangle aBulletArea = tools::Rectangle( Point(), Point() );
if ( nPara < pOwner->pParaList->GetParagraphCount() )
{
if ( pOwner->ImplHasNumberFormat( nPara ) )
diff --git a/editeng/source/outliner/outleeng.hxx b/editeng/source/outliner/outleeng.hxx
index daaa6696c367..093ef2991c8e 100644
--- a/editeng/source/outliner/outleeng.hxx
+++ b/editeng/source/outliner/outleeng.hxx
@@ -74,7 +74,7 @@ public:
virtual void FieldClicked( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos ) override;
virtual OUString CalcFieldValue( const SvxFieldItem& rField, sal_Int32 nPara, sal_Int32 nPos, Color*& rTxtColor, Color*& rFldColor ) override;
- virtual Rectangle GetBulletArea( sal_Int32 nPara ) override;
+ virtual tools::Rectangle GetBulletArea( sal_Int32 nPara ) override;
virtual void SetParaAttribs( sal_Int32 nPara, const SfxItemSet& rSet ) override;
diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx
index 2f6d8a3d608d..d3504c94b24f 100644
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -173,7 +173,7 @@ OUString Outliner::GetWord( sal_Int32 nPara, sal_Int32 nIndex )
return pEditEngine->GetWord( nPara, nIndex );
}
-void Outliner::Draw( OutputDevice* pOutDev, const Rectangle& rOutRect )
+void Outliner::Draw( OutputDevice* pOutDev, const tools::Rectangle& rOutRect )
{
pEditEngine->Draw( pOutDev, rOutRect );
}
@@ -444,7 +444,7 @@ bool Outliner::IsTextPos( const Point& rPaperPos, sal_uInt16 nBorder, bool* pbBu
sal_Int32 nPara = pEditEngine->FindParagraph( aDocPos.Y() );
if ( ( nPara != EE_PARA_NOT_FOUND ) && ImplHasNumberFormat( nPara ) )
{
- Rectangle aBulArea = ImpCalcBulletArea( nPara, true, true );
+ tools::Rectangle aBulArea = ImpCalcBulletArea( nPara, true, true );
if ( aBulArea.IsInside( rPaperPos ) )
{
bTextPos = true;
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 014ece747009..3f7914ff2ad2 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -893,10 +893,10 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
bool bRightToLeftPara = pEditEngine->IsRightToLeft( nPara );
- Rectangle aBulletArea( ImpCalcBulletArea( nPara, true, false ) );
+ tools::Rectangle aBulletArea( ImpCalcBulletArea( nPara, true, false ) );
sal_uInt16 nStretchX, nStretchY;
GetGlobalCharStretching(nStretchX, nStretchY);
- aBulletArea = Rectangle( Point(aBulletArea.Left()*nStretchX/100,
+ aBulletArea = tools::Rectangle( Point(aBulletArea.Left()*nStretchX/100,
aBulletArea.Top()),
Size(aBulletArea.GetWidth()*nStretchX/100,
aBulletArea.GetHeight()) );
@@ -1066,7 +1066,7 @@ void Outliner::InvalidateBullet(sal_Int32 nPara)
for (OutlinerView* pView : aViewList)
{
Point aPos( pView->pEditView->GetWindowPosTopLeft(nPara ) );
- Rectangle aRect( pView->GetOutputArea() );
+ tools::Rectangle aRect( pView->GetOutputArea() );
aRect.Right() = aPos.X();
aRect.Top() = aPos.Y();
aRect.Bottom() = aPos.Y();
@@ -1508,10 +1508,10 @@ void Outliner::StyleSheetChanged( SfxStyleSheet* pStyle )
}
}
-Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bReturnPaperPos )
+tools::Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bReturnPaperPos )
{
// Bullet area within the paragraph ...
- Rectangle aBulletArea;
+ tools::Rectangle aBulletArea;
const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
if ( pFmt )
@@ -1581,7 +1581,7 @@ Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bRetu
if ( aTopLeft.X() < 0 ) // then push
aTopLeft.X() = 0;
- aBulletArea = Rectangle( aTopLeft, aBulletSize );
+ aBulletArea = tools::Rectangle( aTopLeft, aBulletSize );
}
if ( bReturnPaperPos )
{
@@ -1605,7 +1605,7 @@ Rectangle Outliner::ImpCalcBulletArea( sal_Int32 nPara, bool bAdjust, bool bRetu
aBulletPos.X() = GetPaperSize().Width() - aBulletDocPos.X() - aBulletSize.Width();
}
- aBulletArea = Rectangle( aBulletPos, aBulletSize );
+ aBulletArea = tools::Rectangle( aBulletPos, aBulletSize );
}
return aBulletArea;
}
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index a08eb17d641b..3d34502f611f 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -60,7 +60,7 @@ OutlinerView::~OutlinerView()
{
}
-void OutlinerView::Paint( const Rectangle& rRect, OutputDevice* pTargetDevice )
+void OutlinerView::Paint( const tools::Rectangle& rRect, OutputDevice* pTargetDevice )
{
// For the first Paint/KeyInput/Drop an empty Outliner is turned into
// an Outliner with exactly one paragraph.
@@ -253,8 +253,8 @@ sal_Int32 OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTa
reTarget = MouseTarget::Text;
Point aPaperPos( aMousePosWin );
- Rectangle aOutArea = pEditView->GetOutputArea();
- Rectangle aVisArea = pEditView->GetVisArea();
+ tools::Rectangle aOutArea = pEditView->GetOutputArea();
+ tools::Rectangle aVisArea = pEditView->GetVisArea();
aPaperPos.X() -= aOutArea.Left();
aPaperPos.X() += aVisArea.Left();
aPaperPos.Y() -= aOutArea.Top();
@@ -572,7 +572,7 @@ void OutlinerView::AdjustHeight( long nDY )
pEditView->MoveParagraphs( nDY );
}
-Rectangle OutlinerView::GetVisArea() const
+tools::Rectangle OutlinerView::GetVisArea() const
{
return pEditView->GetVisArea();
}
@@ -1193,7 +1193,7 @@ void OutlinerView::InsertText( const OUString& rNew, bool bSelect )
pEditView->InsertText( rNew, bSelect );
}
-void OutlinerView::SetVisArea( const Rectangle& rRect )
+void OutlinerView::SetVisArea( const tools::Rectangle& rRect )
{
pEditView->SetVisArea( rRect );
}
@@ -1204,7 +1204,7 @@ void OutlinerView::SetSelection( const ESelection& rSel )
pEditView->SetSelection( rSel );
}
-void OutlinerView::GetSelectionRectangles(std::vector<Rectangle>& rLogicRects) const
+void OutlinerView::GetSelectionRectangles(std::vector<tools::Rectangle>& rLogicRects) const
{
pEditView->GetSelectionRectangles(rLogicRects);
}
@@ -1244,12 +1244,12 @@ vcl::Window* OutlinerView::GetWindow() const
return pEditView->GetWindow();
}
-void OutlinerView::SetOutputArea( const Rectangle& rRect )
+void OutlinerView::SetOutputArea( const tools::Rectangle& rRect )
{
pEditView->SetOutputArea( rRect );
}
-Rectangle OutlinerView::GetOutputArea() const
+tools::Rectangle OutlinerView::GetOutputArea() const
{
return pEditView->GetOutputArea();
}
diff --git a/editeng/source/uno/unoedhlp.cxx b/editeng/source/uno/unoedhlp.cxx
index 54839155d4c4..00f27fddea8e 100644
--- a/editeng/source/uno/unoedhlp.cxx
+++ b/editeng/source/uno/unoedhlp.cxx
@@ -255,9 +255,9 @@ Point SvxEditSourceHelper::UserSpaceToEE( const Point& rPoint, const Size& rEESi
return bIsVertical ? Point( rPoint.Y(), -rPoint.X() + rEESize.Height() ) : rPoint;
}
-Rectangle SvxEditSourceHelper::EEToUserSpace( const Rectangle& rRect, const Size& rEESize, bool bIsVertical )
+tools::Rectangle SvxEditSourceHelper::EEToUserSpace( const tools::Rectangle& rRect, const Size& rEESize, bool bIsVertical )
{
- return bIsVertical ? Rectangle( EEToUserSpace(rRect.BottomLeft(), rEESize, bIsVertical),
+ return bIsVertical ? tools::Rectangle( EEToUserSpace(rRect.BottomLeft(), rEESize, bIsVertical),
EEToUserSpace(rRect.TopRight(), rEESize, bIsVertical) ) : rRect;
}
diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx
index 363ed425f6c9..7ddbb28a4d3a 100644
--- a/editeng/source/uno/unoedprx.cxx
+++ b/editeng/source/uno/unoedprx.cxx
@@ -693,7 +693,7 @@ bool SvxAccessibleTextAdapter::GetUpdateModeForAcc( ) const
return mpTextForwarder->GetUpdateModeForAcc();
}
-Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const
+tools::Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const
{
assert(mpTextForwarder && "SvxAccessibleTextAdapter: no forwarder");
@@ -702,7 +702,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nI
// preset if anything goes wrong below
// n-th char in GetParagraphIndex's paragraph
- Rectangle aRect = mpTextForwarder->GetCharBounds( nPara, aIndex.GetEEIndex() );
+ tools::Rectangle aRect = mpTextForwarder->GetCharBounds( nPara, aIndex.GetEEIndex() );
if( aIndex.InBullet() )
{
@@ -740,7 +740,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nI
aFont,
mpTextForwarder->GetText( aSel ) );
- Rectangle aStartRect = mpTextForwarder->GetCharBounds( nPara, aIndex.GetEEIndex() );
+ tools::Rectangle aStartRect = mpTextForwarder->GetCharBounds( nPara, aIndex.GetEEIndex() );
aStringWrap.GetCharacterBounds( aIndex.GetFieldOffset(), aRect );
aRect.Move( aStartRect.Left(), aStartRect.Top() );
@@ -751,7 +751,7 @@ Rectangle SvxAccessibleTextAdapter::GetCharBounds( sal_Int32 nPara, sal_Int32 nI
return aRect;
}
-Rectangle SvxAccessibleTextAdapter::GetParaBounds( sal_Int32 nPara ) const
+tools::Rectangle SvxAccessibleTextAdapter::GetParaBounds( sal_Int32 nPara ) const
{
assert(mpTextForwarder && "SvxAccessibleTextAdapter: no forwarder");
@@ -762,7 +762,7 @@ Rectangle SvxAccessibleTextAdapter::GetParaBounds( sal_Int32 nPara ) const
aBulletInfo.nType != SVX_NUM_BITMAP )
{
// include bullet in para bounding box
- Rectangle aRect( mpTextForwarder->GetParaBounds( nPara ) );
+ tools::Rectangle aRect( mpTextForwarder->GetParaBounds( nPara ) );
aRect.Union( aBulletInfo.aBounds );
@@ -846,7 +846,7 @@ bool SvxAccessibleTextAdapter::GetIndexAtPoint( const Point& rPoint, sal_Int32&
aFont,
mpTextForwarder->GetText( aSelection ) );
- Rectangle aRect = mpTextForwarder->GetCharBounds( nPara, aIndex.GetEEIndex() );
+ tools::Rectangle aRect = mpTextForwarder->GetCharBounds( nPara, aIndex.GetEEIndex() );
Point aPoint = rPoint;
aPoint.Move( -aRect.Left(), -aRect.Top() );
@@ -1140,7 +1140,7 @@ bool SvxAccessibleTextEditViewAdapter::IsValid() const
return false;
}
-Rectangle SvxAccessibleTextEditViewAdapter::GetVisArea() const
+tools::Rectangle SvxAccessibleTextEditViewAdapter::GetVisArea() const
{
DBG_ASSERT(mpViewForwarder, "SvxAccessibleTextEditViewAdapter: no forwarder");
diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx
index f2063e4d515a..2d18e32c3a33 100644
--- a/editeng/source/uno/unofored.cxx
+++ b/editeng/source/uno/unofored.cxx
@@ -285,7 +285,7 @@ EBulletInfo SvxEditEngineForwarder::GetBulletInfo( sal_Int32 ) const
return EBulletInfo();
}
-Rectangle SvxEditEngineForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const
+tools::Rectangle SvxEditEngineForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const
{
// EditEngine's 'internal' methods like GetCharacterBounds()
// don't rotate for vertical text.
@@ -296,7 +296,7 @@ Rectangle SvxEditEngineForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nInd
// #108900# Handle virtual position one-past-the end of the string
if( nIndex >= rEditEngine.GetTextLen(nPara) )
{
- Rectangle aLast;
+ tools::Rectangle aLast;
if( nIndex )
{
@@ -332,7 +332,7 @@ Rectangle SvxEditEngineForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nInd
}
}
-Rectangle SvxEditEngineForwarder::GetParaBounds( sal_Int32 nPara ) const
+tools::Rectangle SvxEditEngineForwarder::GetParaBounds( sal_Int32 nPara ) const
{
const Point aPnt = rEditEngine.GetDocPosTopLeft( nPara );
sal_uLong nWidth;
@@ -348,14 +348,14 @@ Rectangle SvxEditEngineForwarder::GetParaBounds( sal_Int32 nPara ) const
nHeight = rEditEngine.GetTextHeight();
nTextWidth = rEditEngine.GetTextHeight();
- return Rectangle( nTextWidth - aPnt.Y() - nWidth, 0, nTextWidth - aPnt.Y(), nHeight );
+ return tools::Rectangle( nTextWidth - aPnt.Y() - nWidth, 0, nTextWidth - aPnt.Y(), nHeight );
}
else
{
nWidth = rEditEngine.CalcTextWidth();
nHeight = rEditEngine.GetTextHeight( nPara );
- return Rectangle( 0, aPnt.Y(), nWidth, aPnt.Y() + nHeight );
+ return tools::Rectangle( 0, aPnt.Y(), nWidth, aPnt.Y() + nHeight );
}
}
diff --git a/editeng/source/uno/unoforou.cxx b/editeng/source/uno/unoforou.cxx
index 6e75f2ae44f8..f1d16b76fda1 100644
--- a/editeng/source/uno/unoforou.cxx
+++ b/editeng/source/uno/unoforou.cxx
@@ -287,7 +287,7 @@ EBulletInfo SvxOutlinerForwarder::GetBulletInfo( sal_Int32 nPara ) const
return rOutliner.GetBulletInfo( nPara );
}
-Rectangle SvxOutlinerForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const
+tools::Rectangle SvxOutlinerForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex ) const
{
// EditEngine's 'internal' methods like GetCharacterBounds()
// don't rotate for vertical text.
@@ -298,7 +298,7 @@ Rectangle SvxOutlinerForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex
// #108900# Handle virtual position one-past-the end of the string
if( nIndex >= GetTextLen(nPara) )
{
- Rectangle aLast;
+ tools::Rectangle aLast;
if( nIndex )
{
@@ -334,7 +334,7 @@ Rectangle SvxOutlinerForwarder::GetCharBounds( sal_Int32 nPara, sal_Int32 nIndex
}
}
-Rectangle SvxOutlinerForwarder::GetParaBounds( sal_Int32 nPara ) const
+tools::Rectangle SvxOutlinerForwarder::GetParaBounds( sal_Int32 nPara ) const
{
Point aPnt = rOutliner.GetDocPosTopLeft( nPara );
Size aSize = rOutliner.CalcTextSize();
@@ -346,13 +346,13 @@ Rectangle SvxOutlinerForwarder::GetParaBounds( sal_Int32 nPara ) const
// don't rotate.
sal_uLong nWidth = rOutliner.GetTextHeight( nPara );
- return Rectangle( aSize.Width() - aPnt.Y() - nWidth, 0, aSize.Width() - aPnt.Y(), aSize.Height() );
+ return tools::Rectangle( aSize.Width() - aPnt.Y() - nWidth, 0, aSize.Width() - aPnt.Y(), aSize.Height() );
}
else
{
sal_uLong nHeight = rOutliner.GetTextHeight( nPara );
- return Rectangle( 0, aPnt.Y(), aSize.Width(), aPnt.Y() + nHeight );
+ return tools::Rectangle( 0, aPnt.Y(), aSize.Width(), aPnt.Y() + nHeight );
}
}
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index 0263f955b9f4..e18a660e5df3 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -2439,14 +2439,14 @@ EBulletInfo SvxDummyTextSource::GetBulletInfo( sal_Int32 ) const
return EBulletInfo();
}
-Rectangle SvxDummyTextSource::GetCharBounds( sal_Int32, sal_Int32 ) const
+tools::Rectangle SvxDummyTextSource::GetCharBounds( sal_Int32, sal_Int32 ) const
{
- return Rectangle();
+ return tools::Rectangle();
}
-Rectangle SvxDummyTextSource::GetParaBounds( sal_Int32 ) const
+tools::Rectangle SvxDummyTextSource::GetParaBounds( sal_Int32 ) const
{
- return Rectangle();
+ return tools::Rectangle();
}
MapMode SvxDummyTextSource::GetMapMode() const
diff --git a/editeng/source/uno/unoviwou.cxx b/editeng/source/uno/unoviwou.cxx
index 106002919d30..96f445e7cb02 100644
--- a/editeng/source/uno/unoviwou.cxx
+++ b/editeng/source/uno/unoviwou.cxx
@@ -41,7 +41,7 @@ SvxDrawOutlinerViewForwarder::~SvxDrawOutlinerViewForwarder()
Point SvxDrawOutlinerViewForwarder::GetTextOffset() const
{
// calc text offset from shape anchor
- Rectangle aOutputRect( mrOutlinerView.GetOutputArea() );
+ tools::Rectangle aOutputRect( mrOutlinerView.GetOutputArea() );
return aOutputRect.TopLeft() - maTextShapeTopLeft;
}
@@ -51,13 +51,13 @@ bool SvxDrawOutlinerViewForwarder::IsValid() const
return true;
}
-Rectangle SvxDrawOutlinerViewForwarder::GetVisArea() const
+tools::Rectangle SvxDrawOutlinerViewForwarder::GetVisArea() const
{
OutputDevice* pOutDev = mrOutlinerView.GetWindow();
if( pOutDev )
{
- Rectangle aVisArea = mrOutlinerView.GetVisArea();
+ tools::Rectangle aVisArea = mrOutlinerView.GetVisArea();
Point aTextOffset( GetTextOffset() );
aVisArea.Move( aTextOffset.X(), aTextOffset.Y() );
@@ -76,7 +76,7 @@ Rectangle SvxDrawOutlinerViewForwarder::GetVisArea() const
}
}
- return Rectangle();
+ return tools::Rectangle();
}
Point SvxDrawOutlinerViewForwarder::LogicToPixel( const Point& rPoint, const MapMode& rMapMode ) const