Kaydet (Commit) 54106fae authored tarafından Miklos Vajna's avatar Miklos Vajna

SwTextFormatInfo::SwTextFormatInfo: use vcl::RenderContext

Change-Id: I8ff1647bdf8c46d395c398c97b97066d7b128cdb
üst a5fe6ea0
......@@ -491,7 +491,7 @@ com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > SwTextFrm::Get
com::sun::star::uno::Sequence< ::com::sun::star::style::TabStop > tabs(1);
::com::sun::star::style::TabStop ts;
SwTextFormatInfo aInf( this );
SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this );
SwTextFormatter aLine( this, &aInf );
SwTextCursor TextCursor( this, &aInf );
const Point aCharPos( TextCursor.GetTopLeft() );
......@@ -855,7 +855,7 @@ bool SwTextFrm::CalcPreps()
{
SWAP_IF_NOT_SWAPPED swap( this );
SwTextFormatInfo aInf( this );
SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this );
SwTextFormatter aLine( this, &aInf );
WidowsAndOrphans aFrmBreak( this );
......@@ -1650,7 +1650,7 @@ void SwTextFrm::_Format( SwParaPortion *pPara )
if ( IsVertical() )
SwapWidthAndHeight();
SwTextFormatInfo aInf( this );
SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this );
SwTextFormatter aLine( this, &aInf );
HideAndShowObjects();
......@@ -1877,7 +1877,7 @@ bool SwTextFrm::FormatQuick( bool bForceQuickFormat )
SwFrmSwapper aSwapper( this, true );
TextFrmLockGuard aLock(this);
SwTextFormatInfo aInf( this, false, true );
SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this, false, true );
if( 0 != aInf.MaxHyph() ) // Respect MaxHyphen!
return false;
......
......@@ -1467,10 +1467,10 @@ void SwTextFormatInfo::Init()
SetPaintOfst(0);
}
SwTextFormatInfo::SwTextFormatInfo(SwTextFrm *pFrame, const bool bInterHyphL,
SwTextFormatInfo::SwTextFormatInfo(OutputDevice* pRenderContext, SwTextFrm *pFrame, const bool bInterHyphL,
const bool bQuickL, const bool bTst)
{
CtorInitTextFormatInfo(pFrame->getRootFrm()->GetCurrShell()->GetOut(), pFrame, bInterHyphL, bQuickL, bTst);
CtorInitTextFormatInfo(pRenderContext, pFrame, bInterHyphL, bQuickL, bTst);
}
/**
......
......@@ -563,7 +563,7 @@ class SwTextFormatInfo : public SwTextPaintInfo
public:
void CtorInitTextFormatInfo( OutputDevice* pRenderContext, SwTextFrm *pFrm, const bool bInterHyph = false,
const bool bQuick = false, const bool bTst = false );
SwTextFormatInfo(SwTextFrm *pFrame, const bool bInterHyphL = false,
SwTextFormatInfo(OutputDevice* pRenderContext, SwTextFrm *pFrame, const bool bInterHyphL = false,
const bool bQuickL = false, const bool bTst = false);
// For the formatting inside a double line in a line (multi-line portion)
......
......@@ -754,7 +754,7 @@ void SwTextFrm::CalcLineSpace()
Size aNewSize( Prt().SSize() );
SwTextFormatInfo aInf( this );
SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this );
SwTextFormatter aLine( this, &aInf );
if( aLine.GetDropLines() )
{
......@@ -1876,7 +1876,7 @@ SwTestFormat::SwTestFormat( SwTextFrm* pTextFrm, const SwFrm* pPre, SwTwips nMax
if ( pFrm->IsVertical() )
pFrm->SwapWidthAndHeight();
SwTextFormatInfo aInf( pFrm, false, true, true );
SwTextFormatInfo aInf( pFrm->getRootFrm()->GetCurrShell()->GetOut(), pFrm, false, true, true );
SwTextFormatter aLine( pFrm, &aInf );
pFrm->_Format( aLine, aInf );
......@@ -2110,7 +2110,7 @@ SwTwips SwTextFrm::CalcFitToContent()
// #i31490#
TextFrmLockGuard aLock( this );
SwTextFormatInfo aInf( this, false, true, true );
SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this, false, true, true );
aInf.SetIgnoreFly( true );
SwTextFormatter aLine( this, &aInf );
SwHookOut aHook( aInf );
......@@ -2170,7 +2170,7 @@ void SwTextFrm::CalcAdditionalFirstLineOffset()
TextFrmLockGuard aLock( this );
// simulate text formatting
SwTextFormatInfo aInf( this, false, true, true );
SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this, false, true, true );
aInf.SetIgnoreFly( true );
SwTextFormatter aLine( this, &aInf );
SwHookOut aHook( aInf );
......
......@@ -144,7 +144,7 @@ bool SwTextFrm::CalcPrepFootnoteAdjust()
bReArrange = false;
if( !pCont || !pFootnote || bReArrange != (pFootnote->FindFootnoteBossFrm() == pBoss) )
{
SwTextFormatInfo aInf( this );
SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this );
SwTextFormatter aLine( this, &aInf );
aLine.TruncLines();
SetPara( 0 ); // May be deleted!
......
......@@ -28,6 +28,7 @@
#include <itrform2.hxx>
#include <guess.hxx>
#include <splargs.hxx>
#include <rootfrm.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
......@@ -78,7 +79,7 @@ bool SwTextFrm::Hyphenate( SwInterHyphInfo &rHyphInf )
if ( IsVertical() )
SwapWidthAndHeight();
SwTextFormatInfo aInf( this, true ); // true for interactive hyph!
SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this, true ); // true for interactive hyph!
SwTextFormatter aLine( this, &aInf );
aLine.CharToLine( rHyphInf.nStart );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment