summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-06-25 17:38:24 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-06-26 09:22:50 +0200
commit783361da4efa20422769dcda64c59b615c31c6d6 (patch)
tree3ffc981959f2ed04c275c3a56846c03b3af3b1f9 /sw
parent8155ba78bab5dfe600170d42c0b1ae47da602657 (diff)
SwTextFormatInfo::SwTextFormatInfo: use vcl::RenderContext
(cherry picked from commit 54106fae68149c0b1dbb4f6ece133fefacacc322) Conflicts: sw/source/core/text/frmform.cxx Change-Id: I8ff1647bdf8c46d395c398c97b97066d7b128cdb
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/text/frmform.cxx10
-rw-r--r--sw/source/core/text/inftxt.cxx4
-rw-r--r--sw/source/core/text/inftxt.hxx2
-rw-r--r--sw/source/core/text/txtfrm.cxx8
-rw-r--r--sw/source/core/text/txtftn.cxx2
-rw-r--r--sw/source/core/text/txthyph.cxx3
6 files changed, 15 insertions, 14 deletions
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 1434a49ae242..3f91eada0265 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -504,7 +504,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() );
@@ -868,8 +868,8 @@ bool SwTextFrm::CalcPreps()
SWAP_IF_NOT_SWAPPED( this )
- SwTextFormatInfo aInf( this );
- SwTextFormatter aLine( this, &aInf );
+ SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this );
+ SwTextFormatter aLine( this, &aInf );
WidowsAndOrphans aFrmBreak( this );
// Whatever the attributes say: we split the paragraph in
@@ -1665,7 +1665,7 @@ void SwTextFrm::_Format( SwParaPortion *pPara )
if ( IsVertical() )
SwapWidthAndHeight();
- SwTextFormatInfo aInf( this );
+ SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this );
SwTextFormatter aLine( this, &aInf );
HideAndShowObjects();
@@ -1892,7 +1892,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;
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 741bef706b02..ae679c3290a0 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -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);
}
/**
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index fc28a0a49f7e..9c09bfcd1a9f 100644
--- a/sw/source/core/text/inftxt.hxx
+++ b/sw/source/core/text/inftxt.hxx
@@ -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)
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index bc3e656bb4cd..d51b613237ad 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -758,7 +758,7 @@ void SwTextFrm::CalcLineSpace()
Size aNewSize( Prt().SSize() );
- SwTextFormatInfo aInf( this );
+ SwTextFormatInfo aInf( getRootFrm()->GetCurrShell()->GetOut(), this );
SwTextFormatter aLine( this, &aInf );
if( aLine.GetDropLines() )
{
@@ -1882,7 +1882,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 );
@@ -2120,7 +2120,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 );
@@ -2180,7 +2180,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 );
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 07ba9d6e8083..7a69dc25e34e 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -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!
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index 9ced752ad8aa..9ae675f1a4a0 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -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 );