Anonymous avatar Anonymous committed 4325f67

textalignment01: #i105270# - refactoring of <SvxAdjust> and <SvxAdjustItem>

Comments (0)

Files changed (20)

cui/source/tabpages/paragrph.cxx

 	}
     USHORT _nWhich = GetWhich( SID_ATTR_PARA_ADJUST );
 
-	if ( bAdj )
-	{
-		const SvxAdjustItem* pOld =
-			(const SvxAdjustItem*)GetOldItem( rOutSet, SID_ATTR_PARA_ADJUST );
-		SvxAdjust eOneWord = aExpandCB.IsChecked() ? SVX_ADJUST_BLOCK
-												   : SVX_ADJUST_LEFT;
-		USHORT nLBPos = aLastLineLB.GetSelectEntryPos();
-		SvxAdjust eLastBlock = SVX_ADJUST_LEFT;
+    if ( bAdj )
+    {
+        const SvxAdjustItem* pOld =
+            (const SvxAdjustItem*)GetOldItem( rOutSet, SID_ATTR_PARA_ADJUST );
+        const bool bOneWordBlocked = aExpandCB.IsChecked();
+        USHORT nLBPos = aLastLineLB.GetSelectEntryPos();
+        SvxAdjust eLastLineAdjust = SVX_ADJUST_LEFT;
 
-		if ( 1 == nLBPos )
-			eLastBlock = SVX_ADJUST_CENTER;
-		else if ( 2 == nLBPos )
-			eLastBlock = SVX_ADJUST_BLOCK;
+        if ( 1 == nLBPos )
+            eLastLineAdjust = SVX_ADJUST_CENTER;
+        else if ( 2 == nLBPos )
+            eLastLineAdjust = SVX_ADJUST_BLOCK;
 
-		FASTBOOL bNothingWasChecked =
-			!aLeft.GetSavedValue() && !aRight.GetSavedValue() &&
-			!aCenter.GetSavedValue() && !aJustify.GetSavedValue();
+        FASTBOOL bNothingWasChecked =
+            !aLeft.GetSavedValue() && !aRight.GetSavedValue() &&
+            !aCenter.GetSavedValue() && !aJustify.GetSavedValue();
 
-		if ( !pOld || pOld->GetAdjust() != eAdjust ||
-			 pOld->GetOneWord() != eOneWord ||
-			 pOld->GetLastBlock() != eLastBlock ||
-			 ( bChecked && bNothingWasChecked ) )
-		{
-			bModified |= TRUE;
-			SvxAdjustItem aAdj(
+        if ( !pOld || pOld->GetAdjust() != eAdjust ||
+             pOld->GetOneWordBlocked() != bOneWordBlocked ||
+             pOld->GetLastLineAdjust() != eLastLineAdjust ||
+             ( bChecked && bNothingWasChecked ) )
+        {
+            bModified |= TRUE;
+            SvxAdjustItem aAdj(
                 (const SvxAdjustItem&)GetItemSet().Get( _nWhich ) );
-			aAdj.SetAdjust( eAdjust );
-			aAdj.SetOneWord( eOneWord );
-			aAdj.SetLastBlock( eLastBlock );
-			rOutSet.Put( aAdj );
-		}
-	}
+            aAdj.SetAdjust( eAdjust );
+            aAdj.SetOneWordBlocked( bOneWordBlocked );
+            aAdj.SetLastLineAdjust( eLastLineAdjust );
+            rOutSet.Put( aAdj );
+        }
+    }
     if(aSnapToGridCB.IsChecked() != aSnapToGridCB.GetSavedValue())
     {
         rOutSet.Put(SvxParaGridItem(aSnapToGridCB.IsChecked(), GetWhich( SID_ATTR_PARA_SNAPTOGRID )));
 		aLastLineLB.Enable(bEnable);
 		aExpandCB  .Enable(bEnable);
 
-		aExpandCB.Check(SVX_ADJUST_BLOCK == rAdj.GetOneWord());
-		switch(rAdj.GetLastBlock())
+        aExpandCB.Check( rAdj.GetOneWordBlocked() );
+        switch( rAdj.GetLastLineAdjust() )
 		{
 			case SVX_ADJUST_LEFT:  nLBSelect = 0; break;
 

editeng/inc/editeng/adjitem.hxx

 
 class EDITENG_DLLPUBLIC SvxAdjustItem : public SfxEnumItemInterface
 {
-	BOOL    bLeft      : 1;
-	BOOL    bRight     : 1;
-	BOOL    bCenter    : 1;
-	BOOL    bBlock     : 1;
+    // --> OD 2010-10-28 #i105270#
+    // Replacing booleans by enumeration type <SvxAdjust>.
+    SvxAdjust meAdjust;
+    // <--
 
-	// nur aktiv, wenn bBlock
-	BOOL    bOneBlock : 1;
-	BOOL    bLastCenter : 1;
-	BOOL    bLastBlock : 1;
+    // Only relevant and valid, if meAdjust == SVX_ADJUST_BLOCK
+    // --> OD 2010-10-28 #i105270#
+    // Replacing booleans <bLastCenter> and <bLastBlock> by enumeration type <SvxAdjust>.
+    // Only the following values are allowed: 
+    // - SVX_ADJUST_LEFT/SVX_ADJUST_START, 
+    // - SVX_ADJUST_CENTER 
+    // - SVX_ADJUST_BLOCK
+    SvxAdjust meLastLineAdjust;
+    
+    // Only relevant and valid, if meAdjust == SVX_ADJUST_BLOCK
+    bool mbOneWordBlocked;
 
 	friend SvStream& operator<<( SvStream&, SvxAdjustItem& ); //$ ostream
 public:
 	virtual SvStream&		 Store(SvStream &, USHORT nItemVersion ) const;
 	virtual USHORT			 GetVersion( USHORT nFileVersion ) const;
 
-	inline void SetOneWord( const SvxAdjust eType )
-	{
-		bOneBlock  = eType == SVX_ADJUST_BLOCK;
-	}
+    // --> OD 2010-10-28 #i105270#
+    // Refactoring interface methods
+    void SetAdjust( const SvxAdjust eAdjust );
+    SvxAdjust GetAdjust() const;
 
-	inline void SetLastBlock( const SvxAdjust eType )
-	{
-		bLastBlock = eType == SVX_ADJUST_BLOCK;
-		bLastCenter = eType == SVX_ADJUST_CENTER;
-	}
+    void SetLastLineAdjust( const SvxAdjust eLastLineAdjust );
+    SvxAdjust GetLastLineAdjust() const;
 
-	inline void SetAdjust( const SvxAdjust eType )
-	{
-		bLeft = eType == SVX_ADJUST_LEFT;
-		bRight = eType == SVX_ADJUST_RIGHT;
-		bCenter = eType == SVX_ADJUST_CENTER;
-		bBlock = eType == SVX_ADJUST_BLOCK;
-	}
+    void SetOneWordBlocked( const bool bOneWordBlocked );
+    bool GetOneWordBlocked() const;
+//    inline void SetOneWord( const SvxAdjust eType )
+//    {
+//        bOneBlock  = eType == SVX_ADJUST_BLOCK;
+//    }
 
-	inline SvxAdjust GetLastBlock() const
-	{
-		SvxAdjust eRet = SVX_ADJUST_LEFT;
+//    inline void SetLastBlock( const SvxAdjust eType )
+//    {
+//        bLastBlock = eType == SVX_ADJUST_BLOCK;
+//        bLastCenter = eType == SVX_ADJUST_CENTER;
+//    }
 
-		if ( bLastBlock )
-			eRet = SVX_ADJUST_BLOCK;
-		else if( bLastCenter )
-			eRet = SVX_ADJUST_CENTER;
-		return eRet;
-	}
+//    inline void SetAdjust( const SvxAdjust eType )
+//    {
+//        bLeft = eType == SVX_ADJUST_LEFT;
+//        bRight = eType == SVX_ADJUST_RIGHT;
+//        bCenter = eType == SVX_ADJUST_CENTER;
+//        bBlock = eType == SVX_ADJUST_BLOCK;
+//    }
 
-	inline SvxAdjust GetOneWord() const
-	{
-		SvxAdjust eRet = SVX_ADJUST_LEFT;
+//    inline SvxAdjust GetLastBlock() const
+//    {
+//        SvxAdjust eRet = SVX_ADJUST_LEFT;
 
-		if ( bBlock && bOneBlock )
-			eRet = SVX_ADJUST_BLOCK;
-		return eRet;
-	}
+//        if ( bLastBlock )
+//            eRet = SVX_ADJUST_BLOCK;
+//        else if( bLastCenter )
+//            eRet = SVX_ADJUST_CENTER;
+//        return eRet;
+//    }
 
-	inline SvxAdjust GetAdjust() const
-	{
-		SvxAdjust eRet = SVX_ADJUST_LEFT;
+//    inline SvxAdjust GetOneWord() const
+//    {
+//        SvxAdjust eRet = SVX_ADJUST_LEFT;
 
-		if ( bRight )
-			eRet = SVX_ADJUST_RIGHT;
-		else if ( bCenter )
-			eRet = SVX_ADJUST_CENTER;
-		else if ( bBlock )
-			eRet = SVX_ADJUST_BLOCK;
-		return eRet;
-	}
+//        if ( bBlock && bOneBlock )
+//            eRet = SVX_ADJUST_BLOCK;
+//        return eRet;
+//    }
+
+//    inline SvxAdjust GetAdjust() const
+//    {
+//        SvxAdjust eRet = SVX_ADJUST_LEFT;
+
+//        if ( bRight )
+//            eRet = SVX_ADJUST_RIGHT;
+//        else if ( bCenter )
+//            eRet = SVX_ADJUST_CENTER;
+//        else if ( bBlock )
+//            eRet = SVX_ADJUST_BLOCK;
+//        return eRet;
+//    }
 };
 
 #endif

editeng/inc/editeng/editrids.hrc

 #define RID_SVXITEMS_ADJUST_CENTER			(RID_EDIT_START + 212)
 #define RID_SVXITEMS_ADJUST_BLOCKLINE		(RID_EDIT_START + 213)
 
+// for SvxTabStop -----------------------------------------------------------
 #define RID_SVXITEMS_TAB_DECIMAL_CHAR		(RID_EDIT_START + 214)
 #define RID_SVXITEMS_TAB_FILL_CHAR			(RID_EDIT_START + 215)
 
+// enum SvxTabAdjust --------------------------------------------------------
 #define RID_SVXITEMS_TAB_ADJUST_BEGIN		(RID_EDIT_START + 217)
 #define RID_SVXITEMS_TAB_ADJUST_LEFT		(RID_EDIT_START + 217)
 #define RID_SVXITEMS_TAB_ADJUST_RIGHT		(RID_EDIT_START + 218)

editeng/inc/editeng/svxenum.hxx

 
 enum SvxAdjust
 {
-	SVX_ADJUST_LEFT,
+    // --> OD 2010-10-28 #i105270#
+    // left and right text alignment does not exist in ODF
+    // Still supporting left and right text alignment for 
+    // -- legacy documents
+    // -- deprecated UNO-API
+    // -- foreign file format filter until these are adjusted.
+    SVX_ADJUST_LEFT,
 	SVX_ADJUST_RIGHT,
+    // <--
 	SVX_ADJUST_BLOCK,
 	SVX_ADJUST_CENTER,
-	SVX_ADJUST_BLOCKLINE,
-	SVX_ADJUST_END
+    // --> OD 2010-10-28 #i105270#
+    // only needed for UNO-API com::sun::star::style::ParagraphProperties::ParaAdjust
+    // in order to support property value com::sun::star::style::ParagraphAdjust::STRETCH
+    SVX_ADJUST_BLOCKLINE,
+    // <--
+    // --> OD 2010-10-28 #i105270#
+    // new text alignments
+//    SVX_ADJUST_START,
+//    SVX_ADJUST_END,
+    // <--
+    // --> OD 2010-10-27 #i105270#
+    // renamed
+    SVX_ADJUST_INVALID_ENUM_END
+    // <--
 };
 
 enum SvxSpecialLineSpace
 enum SvxCellHorJustify
 {
 	SVX_HOR_JUSTIFY_STANDARD,
+    // --> OD 2010-10-28 #i105270#
+    // left text alignment does not exist in ODF
+    // Still supporting left text alignment for 
+    // -- legacy documents
+    // -- deprecated UNO-API
+    // -- foreign file format filter until these are adjusted.
 	SVX_HOR_JUSTIFY_LEFT,
+    // <--
 	SVX_HOR_JUSTIFY_CENTER,
+    // --> OD 2010-10-28 #i105270#
+    // right text alignment does not exist in ODF
+    // Still supporting right text alignment for 
+    // -- legacy documents
+    // -- deprecated UNO-API
+    // -- foreign file format filter until these are adjusted.
 	SVX_HOR_JUSTIFY_RIGHT,
+    // <--
 	SVX_HOR_JUSTIFY_BLOCK,
-	SVX_HOR_JUSTIFY_REPEAT
+    SVX_HOR_JUSTIFY_REPEAT,
+    // --> OD 2010-10-28 #i105270#
+    // new text alignments
+//    SVX_HOR_JUSTIFY_START,
+//    SVX_HOR_JUSTIFY_END
+    // <--
 };
 
 enum SvxCellVerJustify

editeng/source/items/paraitem.cxx

 // class SvxAdjustItem ---------------------------------------------------
 
 SvxAdjustItem::SvxAdjustItem(const SvxAdjust eAdjst, const sal_uInt16 nId )
-	: SfxEnumItemInterface( nId ),
-	bOneBlock( sal_False ), bLastCenter( sal_False ), bLastBlock( sal_False )
+    : SfxEnumItemInterface( nId )
+    // --> OD 2010-10-28 #i105270#
+    , meAdjust( SVX_ADJUST_LEFT )
+    , meLastLineAdjust( SVX_ADJUST_LEFT )
+    , mbOneWordBlocked( false )
+    // <--
 {
 	SetAdjust( eAdjst );
 }
 {
 	DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
 
-	return( ( GetAdjust() == ((SvxAdjustItem&)rAttr).GetAdjust() &&
-		bOneBlock == ((SvxAdjustItem&)rAttr).bOneBlock &&
-		bLastCenter == ((SvxAdjustItem&)rAttr).bLastCenter &&
-		bLastBlock == ((SvxAdjustItem&)rAttr).bLastBlock )
-		? 1 : 0 );
+    return ( ( GetAdjust() == ((SvxAdjustItem&)rAttr).GetAdjust() &&
+               GetLastLineAdjust() == ((SvxAdjustItem&)rAttr).GetLastLineAdjust() &&
+               GetOneWordBlocked() == ((SvxAdjustItem&)rAttr).GetOneWordBlocked() )
+             ? 1 
+             : 0 );
 }
 
 /*-----------------18.03.98 16:15-------------------
 --------------------------------------------------*/
 sal_Bool SvxAdjustItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
 {
-//    sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
     nMemberId &= ~CONVERT_TWIPS;
 	switch( nMemberId )
 	{
 		case MID_PARA_ADJUST	  :	rVal <<= (sal_Int16)GetAdjust(); break;
-		case MID_LAST_LINE_ADJUST : rVal <<= (sal_Int16)GetLastBlock(); break;
+        case MID_LAST_LINE_ADJUST : rVal <<= (sal_Int16)GetLastLineAdjust(); break;
 		case MID_EXPAND_SINGLE    :
 		{
-			sal_Bool bValue = bOneBlock;
+            const sal_Bool bValue = GetOneWordBlocked();
 			rVal.setValue( &bValue, ::getCppuBooleanType() );
 			break;
 		}
 				eVal = ::comphelper::getEnumAsINT32(rVal);
 			}
 			catch(...) {}
-			if(eVal >= 0 && eVal <= 4)
+            
+            if ( eVal >= 0 && eVal < (sal_uInt16)SVX_ADJUST_INVALID_ENUM_END )
 			{
-				if(MID_LAST_LINE_ADJUST == nMemberId &&
-					eVal != SVX_ADJUST_LEFT &&
-					eVal != SVX_ADJUST_BLOCK &&
-					eVal != SVX_ADJUST_CENTER)
-						return FALSE;
-				if(eVal < (sal_uInt16)SVX_ADJUST_END)
-					nMemberId == MID_PARA_ADJUST ?
-						SetAdjust((SvxAdjust)eVal) :
-							SetLastBlock((SvxAdjust)eVal);
+                if ( MID_LAST_LINE_ADJUST == nMemberId &&
+                     eVal != SVX_ADJUST_LEFT &&
+                     eVal != SVX_ADJUST_BLOCK &&
+                     eVal != SVX_ADJUST_CENTER )
+                {
+                        return sal_False;
+                }
+                
+                nMemberId == MID_PARA_ADJUST 
+                ? SetAdjust((SvxAdjust)eVal) 
+                : SetLastLineAdjust((SvxAdjust)eVal);
 			}
 		}
 		break;
 		case MID_EXPAND_SINGLE :
-			bOneBlock = Any2Bool(rVal);
+            SetOneWordBlocked( Any2Bool(rVal) );
 			break;
 	}
 	return sal_True;
 
 sal_uInt16 SvxAdjustItem::GetValueCount() const
 {
-	return SVX_ADJUST_END;	// SVX_ADJUST_BLOCKLINE + 1
+    return SVX_ADJUST_INVALID_ENUM_END;
 }
 
 // -----------------------------------------------------------------------
 
 XubString SvxAdjustItem::GetValueTextByPos( sal_uInt16 nPos ) const
 {
-	DBG_ASSERT( nPos <= (sal_uInt16)SVX_ADJUST_BLOCKLINE, "enum overflow!" );
+    DBG_ASSERT( nPos < (sal_uInt16)SVX_ADJUST_INVALID_ENUM_END, "enum overflow!" );
 	return EE_RESSTR(RID_SVXITEMS_ADJUST_BEGIN + nPos);
 }
 
 	{
 		sal_Int8 nFlags;
 		rStrm >> nFlags;
-		pRet->bOneBlock = 0 != (nFlags & 0x0001);
-		pRet->bLastCenter = 0 != (nFlags & 0x0002);
-		pRet->bLastBlock = 0 != (nFlags & 0x0004);
+        pRet->mbOneWordBlocked = ( 0 != (nFlags & 0x0001) );
+        pRet->meLastLineAdjust = SVX_ADJUST_LEFT;
+        if ( 0 != (nFlags & 0x0002) )
+        {
+            pRet->meLastLineAdjust = SVX_ADJUST_CENTER;
+        }
+        else if ( 0 != (nFlags & 0x0004) )
+        {
+            pRet->meLastLineAdjust = SVX_ADJUST_BLOCK;
+        }
 	}
 	return pRet;
 }
 	if ( nItemVersion >= ADJUST_LASTBLOCK_VERSION )
 	{
 		sal_Int8 nFlags = 0;
-		if ( bOneBlock )
+        if ( mbOneWordBlocked )
 			nFlags |= 0x0001;
-		if ( bLastCenter )
+        if ( meLastLineAdjust == SVX_ADJUST_CENTER )
 			nFlags |= 0x0002;
-		if ( bLastBlock )
-			nFlags |= 0x0004;
+        if ( meLastLineAdjust == SVX_ADJUST_BLOCK )
+            nFlags |= 0x0004;
 		rStrm << (sal_Int8) nFlags;
 	}
 	return rStrm;
 }
 
+// --> OD 2010-10-28 #i105270#
+void SvxAdjustItem::SetAdjust( const SvxAdjust eAdjust )
+{
+    meAdjust = eAdjust;
+
+    // special handling for SVX_ADJUST_BLOCKLINE
+    if ( meAdjust == SVX_ADJUST_BLOCKLINE )
+    {
+        meAdjust = SVX_ADJUST_BLOCK;
+        SetLastLineAdjust( SVX_ADJUST_BLOCK );
+    }
+}
+            
+SvxAdjust SvxAdjustItem::GetAdjust() const
+{
+    return meAdjust;
+}            
+
+void SvxAdjustItem::SetLastLineAdjust( const SvxAdjust eLastLineAdjust )
+{
+    DBG_ASSERT( eLastLineAdjust == SVX_ADJUST_LEFT ||
+                eLastLineAdjust == SVX_ADJUST_CENTER ||
+                eLastLineAdjust == SVX_ADJUST_BLOCK,
+                "<SvxAdjustItem::SetLastLineAdjust(..)> - unsupported value for last line alignment" );
+    
+    meLastLineAdjust = ( eLastLineAdjust == SVX_ADJUST_LEFT ||
+                         eLastLineAdjust == SVX_ADJUST_CENTER ||
+                         eLastLineAdjust == SVX_ADJUST_BLOCK )
+                       ? eLastLineAdjust
+                       : SVX_ADJUST_LEFT;
+}
+            
+SvxAdjust SvxAdjustItem::GetLastLineAdjust() const
+{
+    return meLastLineAdjust;
+}
+
+void SvxAdjustItem::SetOneWordBlocked( const bool bOneWordBlocked )
+{
+    mbOneWordBlocked = bOneWordBlocked;
+}
+            
+bool SvxAdjustItem::GetOneWordBlocked() const
+{
+    return mbOneWordBlocked;
+}
+// <--
+
 // class SvxWidowsItem ---------------------------------------------------
 
 SvxWidowsItem::SvxWidowsItem(const BYTE nL, const USHORT nId ) :

sc/source/core/data/patattr.cxx

 			case SVX_ADJUST_BLOCKLINE:
 				eVal = SVX_HOR_JUSTIFY_BLOCK;
 				break;
-			case SVX_ADJUST_END:
+            case SVX_ADJUST_INVALID_ENUM_END:
 				eVal = SVX_HOR_JUSTIFY_RIGHT;
 				break;
 			default:

sc/source/core/tool/autoform.cxx

 void ScAutoFormatDataField::SetAdjust( const SvxAdjustItem& rAdjust )
 {
     aAdjust.SetAdjust( rAdjust.GetAdjust() );
-    aAdjust.SetOneWord( rAdjust.GetOneWord() );
-    aAdjust.SetLastBlock( rAdjust.GetLastBlock() );
+    aAdjust.SetOneWordBlocked( rAdjust.GetOneWordBlocked() );
+    aAdjust.SetLastLineAdjust( rAdjust.GetLastLineAdjust() );
 }
 
 #define READ( aItem, ItemType, nVers )      \

starmath/sdi/smitems.sdi

 	SVX_ADJUST_BLOCK,
 	SVX_ADJUST_CENTER,
 	SVX_ADJUST_BLOCKLINE,
-	SVX_ADJUST_END
+        SVX_ADJUST_INVALID_ENUM_END
 };
 item SvxAdjust SvxAdjustItem;
 

svx/sdi/svxitems.sdi

 	SVX_ADJUST_BLOCK,
 	SVX_ADJUST_CENTER,
 	SVX_ADJUST_BLOCKLINE,
-	SVX_ADJUST_END
+        SVX_ADJUST_INVALID_ENUM_END
 };
 
 struct SvxAdjustStruct

sw/inc/tblafmt.hxx

 	void SetAdjust( const SvxAdjustItem& rNew )
 		{
 			aAdjust.SetAdjust( rNew.GetAdjust() );
-			aAdjust.SetOneWord( rNew.GetOneWord() );
-			aAdjust.SetLastBlock( rNew.GetLastBlock() );
+            aAdjust.SetOneWordBlocked( rNew.GetOneWordBlocked() );
+            aAdjust.SetLastLineAdjust( rNew.GetLastLineAdjust() );
 		}
 	void SetBox( const SvxBoxItem& rNew ) 				{ aBox = rNew; }
     void SetBackground( const SvxBrushItem& rNew )      { aBackground = rNew; }

sw/source/core/para/paratr.cxx

 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
-#include "hintids.hxx"
-#include <swtypes.hxx>
-#include "unomid.h"
-#include <com/sun/star/style/LineSpacingMode.hpp>
-#include <com/sun/star/style/ParagraphAdjust.hpp>
 #include <com/sun/star/style/DropCapFormat.hpp>
-#include <com/sun/star/style/LineSpacing.hpp>
-#include <com/sun/star/text/RelOrientation.hpp>
-#include <com/sun/star/text/VertOrientation.hpp>
-#include <com/sun/star/text/HorizontalAdjust.hpp>
-#include <com/sun/star/text/DocumentStatistic.hpp>
-#include <com/sun/star/text/HoriOrientation.hpp>
-#include <com/sun/star/text/HoriOrientationFormat.hpp>
-#include <com/sun/star/text/NotePrintMode.hpp>
-#include <com/sun/star/text/SizeType.hpp>
-#include <com/sun/star/text/VertOrientationFormat.hpp>
-#include <com/sun/star/text/WrapTextMode.hpp>
-#include <unostyle.hxx>
 #include <SwStyleNameMapper.hxx>
-#include "errhdl.hxx"
 #include "paratr.hxx"
 #include "charfmt.hxx"
 #include "cmdid.h"

sw/source/core/text/itrcrsr.cxx

             nAdjust = SVX_ADJUST_LEFT;
     }
 
-	bOneBlock = rAdjust.GetOneWord() == SVX_ADJUST_BLOCK;
-	bLastBlock = rAdjust.GetLastBlock() == SVX_ADJUST_BLOCK;
-	bLastCenter = rAdjust.GetLastBlock() == SVX_ADJUST_CENTER;
+    bOneBlock = rAdjust.GetOneWordBlocked();
+    bLastBlock = ( rAdjust.GetLastLineAdjust() == SVX_ADJUST_BLOCK );
+    bLastCenter = ( rAdjust.GetLastLineAdjust() == SVX_ADJUST_CENTER );
 
     // --> OD 2008-07-01 #i91133#
     mnTabLeft = pNode->GetLeftMarginForTabCalculation();

sw/source/filter/html/htmlcss1.cxx

 			   SVX_CSS1_LTYPE_PERCENTAGE != rPropInfo.eTopType &&
 			  (SVX_CSS1_LTYPE_TWIP		 == rPropInfo.eLeftType ||
 			   SVX_CSS1_LTYPE_TWIP		 != rPropInfo.eTopType) ) ||
-			 ( SVX_ADJUST_END        	 != rPropInfo.eFloat  ) ) &&
+             ( SVX_ADJUST_INVALID_ENUM_END != rPropInfo.eFloat  ) ) &&
 		   ( bAutoWidth ||
 			 SVX_CSS1_LTYPE_TWIP         == rPropInfo.eWidthType ||
 			 SVX_CSS1_LTYPE_PERCENTAGE   == rPropInfo.eWidthType );

sw/source/filter/html/htmlsect.cxx

 {
 	String aId, aHRef, aStyle, aClass, aLang, aDir;
 	SvxAdjust eAdjust = HTML_CENTER_ON==nToken ? SVX_ADJUST_CENTER
-											   : SVX_ADJUST_END;
+                                               : SVX_ADJUST_INVALID_ENUM_END;
 
 	sal_Bool bHeader=sal_False, bFooter=sal_False;
 	const HTMLOptions *pHTMLOptions = GetOptions();
 		pCntxt->SetAppendMode( AM_NOSPACE );
 	}
 
-	if( SVX_ADJUST_END != eAdjust )
+    if( SVX_ADJUST_INVALID_ENUM_END != eAdjust )
 	{
         InsertAttr( &aAttrTab.pAdjust, SvxAdjustItem(eAdjust, RES_PARATR_ADJUST), pCntxt );
 	}

sw/source/filter/html/htmltab.cxx

 
 	SvxAdjust GetTableAdjust( sal_Bool bAny ) const
 	{
-		return (bTableAdjustOfTag || bAny) ? eTableAdjust : SVX_ADJUST_END;
+        return (bTableAdjustOfTag || bAny) 
+               ? eTableAdjust 
+               : SVX_ADJUST_INVALID_ENUM_END;
 	}
     sal_Int16 GetVertOri() const { return eVertOri; }
 
 	bSplitable( sal_False ),
 	nHeight(0),
 	nEmptyRows(0),
-	eAdjust(SVX_ADJUST_END),
+    eAdjust(SVX_ADJUST_INVALID_ENUM_END),
     eVertOri(text::VertOrientation::TOP),
 	pBGBrush(0),
 	bBottomBorder(sal_False)
 
 /* 
 */
 
-HTMLTableColumn::HTMLTableColumn():
-	bIsEndOfGroup(sal_False),
-	nWidth(0), bRelWidth(sal_False),
-    eAdjust(SVX_ADJUST_END), eVertOri(text::VertOrientation::TOP),
-	bLeftBorder(sal_False)
+HTMLTableColumn::HTMLTableColumn()
+    : bIsEndOfGroup(sal_False)
+    , nWidth(0)
+    , bRelWidth(sal_False)
+    , eAdjust(SVX_ADJUST_INVALID_ENUM_END)
+    , eVertOri(text::VertOrientation::TOP)
+    , bLeftBorder(sal_False)
 {
 	for( sal_uInt16 i=0; i<6; i++ )
 		aFrmFmts[i] = 0;
 									 ->IsTextFormat( nNumFmt );
 				SfxItemSet aItemSet( *pFrmFmt->GetAttrSet().GetPool(),
 									 RES_BOXATR_FORMAT, RES_BOXATR_VALUE );
-				SvxAdjust eAdjust = SVX_ADJUST_END;
+                SvxAdjust eAdjust = SVX_ADJUST_INVALID_ENUM_END;
 				SwCntntNode *pCNd = 0;
 				if( !bLock )
 				{
                 pFrmFmt->SetFmtAttr( aItemSet );
 				if( bLock )
 					pFrmFmt->UnlockModify();
-				else if( pCNd && SVX_ADJUST_END != eAdjust )
+                else if( pCNd && SVX_ADJUST_INVALID_ENUM_END != eAdjust )
 				{
                     SvxAdjustItem aAdjItem( eAdjust, RES_PARATR_ADJUST );
 					pCNd->SetAttr( aAdjItem );
 SvxAdjust HTMLTable::GetInheritedAdjust() const
 {
 	SvxAdjust eAdjust = (nCurCol<nCols ? ((*pColumns)[nCurCol])->GetAdjust()
-									   : SVX_ADJUST_END );
-	if( SVX_ADJUST_END==eAdjust )
+                                       : SVX_ADJUST_INVALID_ENUM_END );
+    if( SVX_ADJUST_INVALID_ENUM_END==eAdjust )
 		eAdjust = ((*pRows)[nCurRow])->GetAdjust();
 
 	return eAdjust;
 		nColl = RES_POOLCOLL_TABLE;
 	}
 	_HTMLAttrContext *pCntxt = new _HTMLAttrContext( nToken, nColl, aEmptyStr, sal_True );
-	if( SVX_ADJUST_END != eAdjust )
+    if( SVX_ADJUST_INVALID_ENUM_END != eAdjust )
         rParser.InsertAttr( &rParser.aAttrTab.pAdjust, SvxAdjustItem(eAdjust, RES_PARATR_ADJUST),
 							pCntxt );
 
 			{
 				sal_Bool bTopTable = sal_False;
 				sal_Bool bHasToFly = sal_False;
-				SvxAdjust eTabAdjust = SVX_ADJUST_END;
+                SvxAdjust eTabAdjust = SVX_ADJUST_INVALID_ENUM_END;
 				if( !pPendStack )
 				{
 					// nur wenn eine neue Tabelle aufgemacht wird, aber
 							{
 								SvxAdjust eAdjust =
 									(SvxAdjust)pOption->GetEnum(
-											aHTMLPAlignTable, SVX_ADJUST_END );
+                                            aHTMLPAlignTable, SVX_ADJUST_INVALID_ENUM_END );
 								bNeedsSection = SVX_ADJUST_LEFT == eAdjust ||
 												SVX_ADJUST_RIGHT == eAdjust;
 								break;
 					eTabAdjust = aAttrTab.pAdjust
 						? ((const SvxAdjustItem&)aAttrTab.pAdjust->GetItem()).
 												 GetAdjust()
-						: SVX_ADJUST_END;
+                        : SVX_ADJUST_INVALID_ENUM_END;
 				}
 
 				HTMLTable *pSubTable = BuildTable( eTabAdjust,
     sal_Int16 eVertOri;
 	sal_Bool bHasCells;
 
-	_RowSaveStruct() :
-        eAdjust( SVX_ADJUST_END ), eVertOri( text::VertOrientation::TOP ), bHasCells( sal_False )
+    _RowSaveStruct() 
+        : eAdjust( SVX_ADJUST_INVALID_ENUM_END )
+        , eVertOri( text::VertOrientation::TOP )
+        , bHasCells( sal_False )
 	{}
 };
 
 	inline void CloseColGroup( HTMLTable *pTable );
 };
 
-inline _TblColGrpSaveStruct::_TblColGrpSaveStruct() :
-	nColGrpSpan( 1 ), nColGrpWidth( 0 ),
-	bRelColGrpWidth( sal_False ), eColGrpAdjust( SVX_ADJUST_END ),
-    eColGrpVertOri( text::VertOrientation::TOP )
+inline _TblColGrpSaveStruct::_TblColGrpSaveStruct() 
+    : nColGrpSpan( 1 )
+    , nColGrpWidth( 0 )
+    , bRelColGrpWidth( sal_False )
+    , eColGrpAdjust( SVX_ADJUST_INVALID_ENUM_END )
+    , eColGrpVertOri( text::VertOrientation::TOP )
 {}
 
 
 			}
 			else
 			{
-				BuildTable( SVX_ADJUST_END );
+                BuildTable( SVX_ADJUST_INVALID_ENUM_END );
 			}
 			if( SVPAR_PENDING != GetStatus() )
 			{

sw/source/filter/html/svxcss1.cxx

 {
 	{ sCSS1_PV_left,	SVX_ADJUST_LEFT			},
 	{ sCSS1_PV_right,   SVX_ADJUST_RIGHT		},
-	{ sCSS1_PV_none,   	SVX_ADJUST_END			},
+    { sCSS1_PV_none,    SVX_ADJUST_INVALID_ENUM_END     },
 	{ 0,				0		  				}
 };
 
 	bTopMargin = bBottomMargin = FALSE;
 	bLeftMargin = bRightMargin = bTextIndent = FALSE;
 	nLeftMargin = nRightMargin = 0;
-	eFloat = SVX_ADJUST_END;
+    eFloat = SVX_ADJUST_INVALID_ENUM_END;
 
 	ePosition = SVX_CSS1_POS_NONE;
 	nTopBorderDistance = nBottomBorderDistance =
 	if( USHRT_MAX != rProp.nRightBorderDistance )
 		nRightBorderDistance = rProp.nRightBorderDistance;
 
-	if( rProp.eFloat != SVX_ADJUST_END )
+    if( rProp.eFloat != SVX_ADJUST_INVALID_ENUM_END )
 		eFloat = rProp.eFloat;
 
 	if( rProp.ePosition != SVX_CSS1_POS_NONE )

sw/source/filter/html/swhtml.cxx

 #ifdef DBG_UTIL
 	nContinue( 0 ),
 #endif
-	eParaAdjust( SVX_ADJUST_END ),
+    eParaAdjust( SVX_ADJUST_INVALID_ENUM_END ),
 	bDocInitalized( FALSE ),
 	bSetModEnabled( FALSE ),
 	bInFloatingFrame( FALSE ),
 
 	case HTML_TABLE_ON:
 		if( pPendStack )
-			BuildTable( SVX_ADJUST_END );
+            BuildTable( SVX_ADJUST_INVALID_ENUM_END );
 		else
 		{
 			if( nOpenParaToken )
 				SvxAdjust eAdjust = aAttrTab.pAdjust
 					? ((const SvxAdjustItem&)aAttrTab.pAdjust->GetItem()).
 											 GetAdjust()
-					: SVX_ADJUST_END;
+                    : SVX_ADJUST_INVALID_ENUM_END;
 				BuildTable( eAdjust );
 			}
 			else
 	else
 		AddParSpace();
 
-	eParaAdjust = SVX_ADJUST_END;
+    eParaAdjust = SVX_ADJUST_INVALID_ENUM_END;
 	String aId, aStyle, aClass, aLang, aDir;
 
 	const HTMLOptions *pHTMLOptions = GetOptions();
 		}
 	}
 
-	if( SVX_ADJUST_END != eParaAdjust )
+    if( SVX_ADJUST_INVALID_ENUM_END != eParaAdjust )
         InsertAttr( &aAttrTab.pAdjust, SvxAdjustItem(eParaAdjust, RES_PARATR_ADJUST), pCntxt );
 
 	// und auf den Stack packen
 
 void SwHTMLParser::NewHeading( int nToken )
 {
-	eParaAdjust = SVX_ADJUST_END;
+    eParaAdjust = SVX_ADJUST_INVALID_ENUM_END;
 
 	String aId, aStyle, aClass, aLang, aDir;
 
 		}
 	}
 
-	if( SVX_ADJUST_END != eParaAdjust )
+    if( SVX_ADJUST_INVALID_ENUM_END != eParaAdjust )
         InsertAttr( &aAttrTab.pAdjust, SvxAdjustItem(eParaAdjust, RES_PARATR_ADJUST), pCntxt );
 
 	// udn auf den Stack packen
 	USHORT nSize = 0;
 	USHORT nWidth = 0;
 
-	SvxAdjust eAdjust = SVX_ADJUST_END;
+    SvxAdjust eAdjust = SVX_ADJUST_INVALID_ENUM_END;
 
 	BOOL bPrcWidth = FALSE;
 	BOOL bNoShade = FALSE;

sw/source/filter/ww8/wrtw8num.cxx

             nb = 3;
             break;
         case SVX_ADJUST_LEFT:
-        case SVX_ADJUST_END:
+        case SVX_ADJUST_INVALID_ENUM_END:
             break;
     }
 
             nb = 3;
             break;
         case SVX_ADJUST_LEFT:
-        case SVX_ADJUST_END:
+        case SVX_ADJUST_INVALID_ENUM_END:
             break;
     }
 

sw/source/filter/ww8/ww8par6.cxx

     }
     SvxAdjustItem aAdjust(eAdjust, RES_PARATR_ADJUST);
     if (bDistributed)
-        aAdjust.SetLastBlock(SVX_ADJUST_BLOCK);
+        aAdjust.SetLastLineAdjust(SVX_ADJUST_BLOCK);
 
     NewAttr(aAdjust);
 }
         }
         SvxAdjustItem aAdjust(eAdjust, RES_PARATR_ADJUST);
         if (bDistributed)
-            aAdjust.SetLastBlock(SVX_ADJUST_BLOCK);
+            aAdjust.SetLastLineAdjust(SVX_ADJUST_BLOCK);
 
         NewAttr(aAdjust);
     }

sw/source/ui/shells/txtattr.cxx

 				SvxAdjustItem aAdj( rAdj.GetAdjust(), RES_PARATR_ADJUST );
 				if ( rAdj.GetAdjust() == SVX_ADJUST_BLOCK )
 				{
-					aAdj.SetLastBlock( rAdj.GetLastBlock() );
-					aAdj.SetOneWord( rAdj.GetOneWord() );
+                    aAdj.SetLastLineAdjust( rAdj.GetLastLineAdjust() );
+                    aAdj.SetOneWordBlocked( rAdj.GetOneWordBlocked() );
 				}
 
 				aSet.Put(aAdj);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.