diff options
author | Frank Meies <fme@openoffice.org> | 2001-08-31 05:22:48 +0000 |
---|---|---|
committer | Frank Meies <fme@openoffice.org> | 2001-08-31 05:22:48 +0000 |
commit | 86d39652e7d54c99dbf1f0609c5c8df2263d72b1 (patch) | |
tree | 33b20a128c63bcf803766ca3c520d99711734fda /sw/source/core/text/redlnitr.cxx | |
parent | 2e8bc45e7167c3188354a136e3d3556a496b68cc (diff) |
New: Vertical text formatting
Diffstat (limited to 'sw/source/core/text/redlnitr.cxx')
-rw-r--r-- | sw/source/core/text/redlnitr.cxx | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx index 4f531d2326fa..f1b20a004fe3 100644 --- a/sw/source/core/text/redlnitr.cxx +++ b/sw/source/core/text/redlnitr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: redlnitr.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: fme $ $Date: 2001-07-12 11:19:17 $ + * last change: $Author: fme $ $Date: 2001-08-31 06:19:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -130,6 +130,9 @@ #include <vcl/settings.hxx> #endif +#ifndef _TXTFRM_HXX +#include <txtfrm.hxx> // SwTxtFrm +#endif #ifndef _APP_HXX //autogen #include <vcl/svapp.hxx> #endif @@ -145,8 +148,11 @@ using namespace ::com::sun::star; /************************************************************************* * SwAttrIter::CtorInit() *************************************************************************/ - +#ifdef VERTICAL_LAYOUT +void SwAttrIter::CtorInit( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf, SwTxtFrm* pFrm ) +#else void SwAttrIter::CtorInit( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf ) +#endif { // Beim HTML-Import kann es vorkommen, dass kein Layout existiert. SwRootFrm *pRootFrm = rTxtNode.GetDoc()->GetRootFrm(); @@ -156,19 +162,41 @@ void SwAttrIter::CtorInit( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf ) pAttrSet = &rTxtNode.GetSwAttrSet(); pHints = rTxtNode.GetpSwpHints(); +#ifndef VERTICAL_LAYOUT const sal_Bool bAttrSet = rTxtNode.HasSwAttrSet(); +#endif + SwFontAccess aFontAccess( &rTxtNode.GetAnyFmtColl(), pShell ); delete pFnt; pFnt = new SwFont( *aFontAccess.Get()->GetFont() ); +#ifdef VERTICAL_LAYOUT + // set font to vertical if frame layout is vertical + sal_Bool bVertLayout = sal_False; + if ( pFrm && pFrm->IsVertical() ) + { + bVertLayout = sal_True; + pFnt->SetVertical( pFnt->GetOrientation(), sal_True ); + } +#endif + // Initialize the default attribute of the attribute handler // based on the attribute array cached together with the font. // If any further attributes for the paragraph are given in pAttrSet // consider them during construction of the default array, and apply // them to the font +#ifdef VERTICAL_LAYOUT + if ( rTxtNode.HasSwAttrSet() ) + aAttrHandler.Init( aFontAccess.Get()->GetDefault(), pAttrSet, + *rTxtNode.GetDoc(), *pFnt, bVertLayout ); + else + aAttrHandler.Init( aFontAccess.Get()->GetDefault(), 0, + *rTxtNode.GetDoc(), *pFnt, bVertLayout ); +#else aAttrHandler.Init( aFontAccess.Get()->GetDefault(), *pAttrSet, *rTxtNode.GetDoc(), *pFnt, bAttrSet ); +#endif aMagicNo[SW_LATIN] = aMagicNo[SW_CJK] = aMagicNo[SW_CTL] = NULL; |