// Make sure HideSdrPage is also executed after ShowSdrPage. if( m_pDrawView )
m_pDrawView->HideSdrPage();
m_pDrawView.reset();
DeletePaintRegion();
OSL_ENSURE( !m_pLayAction, "Have action for the rest of your life." );
OSL_ENSURE( !m_pIdleAct,"Be idle for the rest of your life." );
}
bool SwViewShellImp::AddPaintRect( const SwRect &rRect )
{ // In case of tiled rendering the visual area is the last painted tile -> not interesting. if ( rRect.Overlaps( m_rShell.VisArea() ) || comphelper::LibreOfficeKit::isActive() )
{ if ( !m_oPaintRegion )
{ // In case of normal rendering, this makes sure only visible rectangles are painted. // Otherwise get the rectangle of the full document, so all paint rectangles are invalidated. const SwRect& rArea = comphelper::LibreOfficeKit::isActive() ? m_rShell.GetLayout()->getFrameArea() : m_rShell.VisArea();
m_oPaintRegion.emplace();
m_oPaintRegion->ChangeOrigin(rArea);
} if(!m_oPaintRegion->empty())
{ // This function often gets called with rectangles that line up vertically. // Try to extend the last one downwards to include the new one (use Union() // in case the new one is actually already contained in the last one).
SwRect& last = m_oPaintRegion->back(); if(last.Left() == rRect.Left() && last.Width() == rRect.Width()
&& last.Bottom() + 1 >= rRect.Top() && last.Bottom() <= rRect.Bottom())
{
last.Union(rRect); // And these rectangles lined up vertically often come up in groups // that line up horizontally. Try to extend the previous rectangle // to the right to include the last one. if(m_oPaintRegion->size() > 1)
{
SwRect& last2 = (*m_oPaintRegion)[m_oPaintRegion->size() - 2]; if(last2.Top() == last.Top() && last2.Height() == last.Height()
&& last2.Right() + 1 >= last.Left() && last2.Right() <= last2.Right())
{
last2.Union(last);
m_oPaintRegion->pop_back(); returntrue;
}
} returntrue;
}
}
(*m_oPaintRegion) += rRect; returntrue;
} returnfalse;
}
void SwViewShellImp::AddPendingLOKInvalidation( const SwRect& rRect )
{
std::vector<SwRect>& l = m_pendingLOKInvalidations; if(l.empty() && m_rShell.GetSfxViewShell()) // Announce that these invalidations will need flushing.
m_rShell.GetSfxViewShell()->libreOfficeKitViewAddPendingInvalidateTiles(); // These are often repeated, so check first for duplicates. if( std::find( l.begin(), l.end(), rRect ) == l.end())
l.push_back( rRect );
}
void SwViewShellImp::SetFirstVisPage(OutputDevice const * pRenderContext)
{ if ( m_rShell.mbDocSizeChgd && m_rShell.VisArea().Top() > m_rShell.GetLayout()->getFrameArea().Height() )
{ //We are in an action and because of erase actions the VisArea is //after the first visible page. //To avoid excessive formatting, hand back the last page.
m_pFirstVisiblePage = static_cast<SwPageFrame*>(m_rShell.GetLayout()->Lower()); while ( m_pFirstVisiblePage && m_pFirstVisiblePage->GetNext() )
m_pFirstVisiblePage = static_cast<SwPageFrame*>(m_pFirstVisiblePage->GetNext());
} else
{ const SwViewOption* pSwViewOption = GetShell().GetViewOptions(); constbool bBookMode = pSwViewOption->IsViewLayoutBookMode();
// the else here is not an error, MakeDrawModel_() calls this method again // after the DrawModel is created to create DrawViews for all shells... if( !rIDDMA.GetDrawModel() )
{
rIDDMA.MakeDrawModel_();
} else
{ if ( !m_pDrawView )
{ // #i72809# // Discussed with FME, he also thinks that the getPrinter is old and not correct. When i got // him right, it anyways returns GetOut() when it's a printer, but NULL when not. He suggested // to use GetOut() and check the existing cases. // Check worked well. Took a look at viewing, printing, PDF export and print preview with a test // document which has an empty 2nd page (right page, see bug) auto pWin = GetShell().GetWin();
OutputDevice* pOutDevForDrawView = pWin ? pWin->GetOutDev() : nullptr;
// #i68597# If document is read-only, we will not profit from overlay, // so switch it off. if (m_pDrawView->IsBufferedOverlayAllowed())
{ if(pSwViewOption->IsReadonly())
{
m_pDrawView->SetBufferedOverlayAllowed(false);
}
}
}
}
// create page preview layout void SwViewShellImp::InitPagePreviewLayout()
{
OSL_ENSURE( m_rShell.GetLayout(), "no layout - page preview layout can not be created."); if ( m_rShell.GetLayout() )
m_pPagePreviewLayout.reset( new SwPagePreviewLayout(m_rShell, *(m_rShell.GetLayout()) ) );
}
#if !ENABLE_WASM_STRIP_ACCESSIBILITY void SwViewShellImp::UpdateAccessible()
{ // We require a layout and an XModel to be accessible.
IDocumentLayoutAccess& rIDLA = GetShell().getIDocumentLayoutAccess();
vcl::Window *pWin = GetShell().GetWin();
OSL_ENSURE( GetShell().GetLayout(), "no layout, no access" );
OSL_ENSURE( pWin, "no window, no access" );
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.