diff options
Diffstat (limited to 'sc/source/ui/docshell')
-rw-r--r-- | sc/source/ui/docshell/docsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh2.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh6.cxx | 14 |
4 files changed, 18 insertions, 18 deletions
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 44ae2e3e8677..3fc6d41bd1cb 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -1619,7 +1619,7 @@ ScDocShell::PrepareSaveGuard::PrepareSaveGuard( ScDocShell& rDocShell ) } } if (mrDocShell.GetCreateMode()== SfxObjectCreateMode::STANDARD) - mrDocShell.SfxObjectShell::SetVisArea( Rectangle() ); // "Normally" worked on => no VisArea. + mrDocShell.SfxObjectShell::SetVisArea( tools::Rectangle() ); // "Normally" worked on => no VisArea. } ScDocShell::PrepareSaveGuard::~PrepareSaveGuard() @@ -2231,7 +2231,7 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed ) if (pAutoStyleList) pAutoStyleList->ExecuteAllNow(); // Execute template timeouts now if (GetCreateMode()== SfxObjectCreateMode::STANDARD) - SfxObjectShell::SetVisArea( Rectangle() ); // Edited normally -> no VisArea + SfxObjectShell::SetVisArea( tools::Rectangle() ); // Edited normally -> no VisArea OSL_ENSURE( rMed.GetFilter(), "Filter == 0" ); diff --git a/sc/source/ui/docshell/docsh2.cxx b/sc/source/ui/docshell/docsh2.cxx index 4aaa39a29403..9dc8cd2b319d 100644 --- a/sc/source/ui/docshell/docsh2.cxx +++ b/sc/source/ui/docshell/docsh2.cxx @@ -50,7 +50,7 @@ bool ScDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) Size aSize( (long) ( STD_COL_WIDTH * HMM_PER_TWIPS * OLE_STD_CELLS_X ), (long) ( ScGlobal::nStdRowHeight * HMM_PER_TWIPS * OLE_STD_CELLS_Y ) ); // Also adjust start here - SetVisAreaOrSize( Rectangle( Point(), aSize ) ); + SetVisAreaOrSize( tools::Rectangle( Point(), aSize ) ); } // InitOptions sets the document languages, must be called before CreateStandardStyles diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index fa4cc7f676fd..521dd0dfa8bd 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1915,7 +1915,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI if ( nAspect == ASPECT_THUMBNAIL ) { - Rectangle aBoundRect = GetVisArea( ASPECT_THUMBNAIL ); + tools::Rectangle aBoundRect = GetVisArea( ASPECT_THUMBNAIL ); ScViewData aTmpData( this, nullptr ); aTmpData.SetTabNo(nVisTab); SnapVisArea( aBoundRect ); @@ -1924,7 +1924,7 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI } else { - Rectangle aBoundRect = SfxObjectShell::GetVisArea(); + tools::Rectangle aBoundRect = SfxObjectShell::GetVisArea(); ScViewData aTmpData( this, nullptr ); aTmpData.SetTabNo(nVisTab); SnapVisArea( aBoundRect ); @@ -1935,14 +1935,14 @@ void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, sal_uI pDev->SetLayoutMode( nOldLayoutMode ); } -Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const +tools::Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const { SfxObjectCreateMode eShellMode = GetCreateMode(); if ( eShellMode == SfxObjectCreateMode::ORGANIZER ) { // without contents we also don't know how large are the contents; // return empty rectangle, it will then be calculated after the loading - return Rectangle(); + return tools::Rectangle(); } if( nAspect == ASPECT_THUMBNAIL ) @@ -1956,7 +1956,7 @@ Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const Size aSize = aDocument.GetPageSize(nVisTab); const long SC_PREVIEW_SIZE_X = 10000; const long SC_PREVIEW_SIZE_Y = 12400; - Rectangle aArea( 0,0, SC_PREVIEW_SIZE_X, SC_PREVIEW_SIZE_Y); + tools::Rectangle aArea( 0,0, SC_PREVIEW_SIZE_X, SC_PREVIEW_SIZE_Y); if (aSize.Width() > aSize.Height()) { aArea.Right() = SC_PREVIEW_SIZE_Y; @@ -1989,7 +1989,7 @@ Rectangle ScDocShell::GetVisArea( sal_uInt16 nAspect ) const nStartCol = nEndCol; if (nStartRow>nEndRow) nStartRow = nEndRow; - Rectangle aNewArea = ((ScDocument&)aDocument) + tools::Rectangle aNewArea = ((ScDocument&)aDocument) .GetMMRect( nStartCol,nStartRow, nEndCol,nEndRow, nVisTab ); //TODO/LATER: different methods for setting VisArea?! const_cast<ScDocShell*>(this)->SfxObjectShell::SetVisArea( aNewArea ); @@ -2059,7 +2059,7 @@ void SnapVer( const ScDocument& rDoc, SCTAB nTab, long& rVal, SCROW& rStartRow ) } -void ScDocShell::SnapVisArea( Rectangle& rRect ) const +void ScDocShell::SnapVisArea( tools::Rectangle& rRect ) const { SCTAB nTab = aDocument.GetVisibleTab(); bool bNegativePage = aDocument.IsNegativePage( nTab ); @@ -2270,7 +2270,7 @@ void ScDocShell::LOKCommentNotify(LOKCommentNotificationType nType, const ScDocu const double fPPTX = pViewData->GetPPTX(); const double fPPTY = pViewData->GetPPTY(); - Rectangle aRect(Point(aScrPos.getX() / fPPTX, aScrPos.getY() / fPPTY), + tools::Rectangle aRect(Point(aScrPos.getX() / fPPTX, aScrPos.getY() / fPPTY), Size(nSizeXPix / fPPTX, nSizeYPix / fPPTY)); aAnnotation.put("cellPos", aRect.toString()); diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx index 66ecd7182b85..7c9353497a63 100644 --- a/sc/source/ui/docshell/docsh6.cxx +++ b/sc/source/ui/docshell/docsh6.cxx @@ -53,14 +53,14 @@ struct ScStylePair // Ole -void ScDocShell::SetVisArea( const Rectangle & rVisArea ) +void ScDocShell::SetVisArea( const tools::Rectangle & rVisArea ) { // with the SnapVisArea call in SetVisAreaOrSize, it's safe to always // use both the size and position of the VisArea SetVisAreaOrSize( rVisArea ); } -static void lcl_SetTopRight( Rectangle& rRect, const Point& rPos ) +static void lcl_SetTopRight( tools::Rectangle& rRect, const Point& rPos ) { Size aSize = rRect.GetSize(); rRect.Right() = rPos.X(); @@ -69,11 +69,11 @@ static void lcl_SetTopRight( Rectangle& rRect, const Point& rPos ) rRect.Bottom() = rPos.Y() + aSize.Height() - 1; } -void ScDocShell::SetVisAreaOrSize( const Rectangle& rVisArea ) +void ScDocShell::SetVisAreaOrSize( const tools::Rectangle& rVisArea ) { bool bNegativePage = aDocument.IsNegativePage( aDocument.GetVisibleTab() ); - Rectangle aArea = rVisArea; + tools::Rectangle aArea = rVisArea; // when loading, don't check for negative values, because the sheet orientation // might be set later if ( !aDocument.IsImportingXML() ) @@ -158,8 +158,8 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, bool bSnapSize ) OSL_ENSURE(pViewData,"pViewData==0 bei ScDocShell::UpdateOle"); - Rectangle aOldArea = SfxObjectShell::GetVisArea(); - Rectangle aNewArea = aOldArea; + tools::Rectangle aOldArea = SfxObjectShell::GetVisArea(); + tools::Rectangle aNewArea = aOldArea; bool bEmbedded = aDocument.IsEmbedded(); if (bEmbedded) @@ -173,7 +173,7 @@ void ScDocShell::UpdateOle( const ScViewData* pViewData, bool bSnapSize ) bool bNegativePage = aDocument.IsNegativePage( nTab ); SCCOL nX = pViewData->GetPosX(SC_SPLIT_LEFT); SCROW nY = pViewData->GetPosY(SC_SPLIT_BOTTOM); - Rectangle aMMRect = aDocument.GetMMRect( nX,nY, nX,nY, nTab ); + tools::Rectangle aMMRect = aDocument.GetMMRect( nX,nY, nX,nY, nTab ); if (bNegativePage) lcl_SetTopRight( aNewArea, aMMRect.TopRight() ); else |