Kaydet (Commit) 8af39740 authored tarafından Miklos Vajna's avatar Miklos Vajna

SwTextSizeInfo::CtorInitTextSizeInfo: use vcl::RenderContext

Change-Id: I6dfceb02b57d886dd8025520e5ed21a2ad46a5b1
üst d7eacc57
...@@ -251,7 +251,7 @@ SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew ) ...@@ -251,7 +251,7 @@ SwTextSizeInfo::SwTextSizeInfo( const SwTextSizeInfo &rNew )
#endif #endif
} }
void SwTextSizeInfo::CtorInitTextSizeInfo( SwTextFrm *pFrame, SwFont *pNewFnt, void SwTextSizeInfo::CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextFrm *pFrame, SwFont *pNewFnt,
const sal_Int32 nNewIdx, const sal_Int32 nNewLen ) const sal_Int32 nNewIdx, const sal_Int32 nNewLen )
{ {
m_pKanaComp = NULL; m_pKanaComp = NULL;
...@@ -264,9 +264,9 @@ void SwTextSizeInfo::CtorInitTextSizeInfo( SwTextFrm *pFrame, SwFont *pNewFnt, ...@@ -264,9 +264,9 @@ void SwTextSizeInfo::CtorInitTextSizeInfo( SwTextFrm *pFrame, SwFont *pNewFnt,
// Get the output and reference device // Get the output and reference device
if ( m_pVsh ) if ( m_pVsh )
{ {
m_pOut = m_pVsh->GetOut(); m_pOut = pRenderContext;
m_pRef = &m_pVsh->GetRefDev(); m_pRef = &m_pVsh->GetRefDev();
m_bOnWin = m_pVsh->GetWin() || OUTDEV_WINDOW == m_pOut->GetOutDevType(); m_bOnWin = m_pVsh->GetWin() || OUTDEV_WINDOW == m_pOut->GetOutDevType() || m_pVsh->isOutputToWindow();
} }
else else
{ {
...@@ -368,7 +368,7 @@ SwTextSizeInfo::SwTextSizeInfo( SwTextFrm *pTextFrm, SwFont *pTextFnt, ...@@ -368,7 +368,7 @@ SwTextSizeInfo::SwTextSizeInfo( SwTextFrm *pTextFrm, SwFont *pTextFnt,
const sal_Int32 nLength ) const sal_Int32 nLength )
: m_bOnWin(false) : m_bOnWin(false)
{ {
CtorInitTextSizeInfo( pTextFrm, pTextFnt, nIndex, nLength ); CtorInitTextSizeInfo( pTextFrm->getRootFrm()->GetCurrShell()->GetOut(), pTextFrm, pTextFnt, nIndex, nLength );
} }
void SwTextSizeInfo::SelectFont() void SwTextSizeInfo::SelectFont()
...@@ -489,7 +489,7 @@ bool SwTextSizeInfo::_HasHint( const SwTextNode* pTextNode, sal_Int32 nPos ) ...@@ -489,7 +489,7 @@ bool SwTextSizeInfo::_HasHint( const SwTextNode* pTextNode, sal_Int32 nPos )
void SwTextPaintInfo::CtorInitTextPaintInfo( SwTextFrm *pFrame, const SwRect &rPaint ) void SwTextPaintInfo::CtorInitTextPaintInfo( SwTextFrm *pFrame, const SwRect &rPaint )
{ {
CtorInitTextSizeInfo( pFrame ); CtorInitTextSizeInfo( pFrame->getRootFrm()->GetCurrShell()->GetOut(), pFrame );
aTextFly.CtorInitTextFly( pFrame ), aTextFly.CtorInitTextFly( pFrame ),
aPaintRect = rPaint; aPaintRect = rPaint;
nSpaceIdx = 0; nSpaceIdx = 0;
......
...@@ -191,7 +191,7 @@ protected: ...@@ -191,7 +191,7 @@ protected:
sal_uInt8 m_nDirection : 2; // writing direction: 0/90/180/270 degree sal_uInt8 m_nDirection : 2; // writing direction: 0/90/180/270 degree
protected: protected:
void CtorInitTextSizeInfo( SwTextFrm *pFrm, SwFont *pFnt = 0, void CtorInitTextSizeInfo( OutputDevice* pRenderContext, SwTextFrm *pFrm, SwFont *pFnt = 0,
const sal_Int32 nIdx = 0, const sal_Int32 nIdx = 0,
const sal_Int32 nLen = COMPLETE_STRING ); const sal_Int32 nLen = COMPLETE_STRING );
SwTextSizeInfo(); SwTextSizeInfo();
......
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