[ooo-build-commit] .: 2 commits - patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Fri May 21 12:31:45 PDT 2010


 patches/dev300/apply                                          |    8 
 patches/dev300/calc-distributed-cell-text-dev300-editeng.diff |  719 ++++++++++
 patches/dev300/calc-distributed-cell-text-dev300-svx.diff     |  616 ++++++++
 3 files changed, 1341 insertions(+), 2 deletions(-)

New commits:
commit 7ec642cd4abd66061f914d25a8e15790eee7603f
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Fri May 21 15:30:53 2010 -0400

    Temporarily disabled the writer doc comparison patches.
    
    This unfortunately breaks due to editeng separation.
    
    * patches/dev300/apply:

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 21dfc60..68c6b3c 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3217,9 +3217,9 @@ SectionOwner => jholesov
 # http://gsoc-tzvetelina.blogspot.com/
 
 # Improved document comparison
-writer-doc-comparison.diff, tzvetelina
+# FIXME dev300-m77 writer-doc-comparison.diff, tzvetelina
 # Help files for the document comparison
-writer-doc-comparison-help.diff, tzvetelina
+# FIXME dev300-m77 writer-doc-comparison-help.diff, tzvetelina
 
 
 [ ExtensionFixes ]
commit 04debc256e23528823a2cb488f038744ec77b247
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Fri May 21 15:28:37 2010 -0400

    Adjustment of distributed text patches for the dev300 codeline.
    
    * patches/dev300/apply:
    * patches/dev300/calc-distributed-cell-text-dev300-editeng.diff:
    * patches/dev300/calc-distributed-cell-text-dev300-svx.diff:

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 57f7aa0..21dfc60 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3585,6 +3585,10 @@ calc-formula-r1c1-parser-fix.diff, n#604903, kohei
 
 system-mdds.diff, rengelha
 
+# Adjustment for the dev300 code base.
+calc-distributed-cell-text-dev300-editeng.diff, kohei
+calc-distributed-cell-text-dev300-svx.diff,     kohei
+
 [ GentooExperimental ]
 SectionOwner => hmth
 # jemalloc allocator
diff --git a/patches/dev300/calc-distributed-cell-text-dev300-editeng.diff b/patches/dev300/calc-distributed-cell-text-dev300-editeng.diff
new file mode 100644
index 0000000..37efc9e
--- /dev/null
+++ b/patches/dev300/calc-distributed-cell-text-dev300-editeng.diff
@@ -0,0 +1,719 @@
+diff --git editeng/inc/editeng/editrids.hrc editeng/inc/editeng/editrids.hrc
+index 97c9a4b..6d17175 100644
+--- editeng/inc/editeng/editrids.hrc
++++ editeng/inc/editeng/editrids.hrc
+@@ -420,7 +420,24 @@
+ #define RID_SVXSTR_A11Y_IMAGEBULLET_DESCRIPTION	(RID_EDIT_START + 314)
+ #define RID_SVXSTR_A11Y_IMAGEBULLET_NAME		(RID_EDIT_START + 315)
+ 
+-#if 315 > (RID_EDIT_END-RID_EDIT_START)
++// enum SvxCellHorJustify
++#define RID_SVXITEMS_HORJUST_STANDARD		(RID_EDIT_START + 316)
++#define RID_SVXITEMS_HORJUST_LEFT			(RID_EDIT_START + 317)
++#define RID_SVXITEMS_HORJUST_CENTER			(RID_EDIT_START + 318)
++#define RID_SVXITEMS_HORJUST_RIGHT			(RID_EDIT_START + 319)
++#define RID_SVXITEMS_HORJUST_BLOCK			(RID_EDIT_START + 320)
++#define RID_SVXITEMS_HORJUST_REPEAT			(RID_EDIT_START + 321)
++
++// enum SvxCellVerJustify
++#define RID_SVXITEMS_VERJUST_STANDARD		(RID_EDIT_START + 322)
++#define RID_SVXITEMS_VERJUST_TOP			(RID_EDIT_START + 323)
++#define RID_SVXITEMS_VERJUST_CENTER			(RID_EDIT_START + 324)
++#define RID_SVXITEMS_VERJUST_BOTTOM			(RID_EDIT_START + 325)
++
++#define RID_SVXITEMS_JUSTMETHOD_AUTO            (RID_EDIT_START + 326)
++#define RID_SVXITEMS_JUSTMETHOD_DISTRIBUTE      (RID_EDIT_START + 327)
++
++#if 327 > (RID_EDIT_END-RID_EDIT_START)
+ #error Resource-Ueberlauf in #line, #file
+ #endif
+ 
+diff --git editeng/inc/editeng/justifyitem.hxx editeng/inc/editeng/justifyitem.hxx
+new file mode 100644
+index 0000000..da59e5c
+--- /dev/null
++++ editeng/inc/editeng/justifyitem.hxx
+@@ -0,0 +1,127 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2000, 2010 Oracle and/or its affiliates.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU Lesser General Public License version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org.  If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++
++#ifndef __EDITENG_JUSTIFYITEM_HXX__
++#define __EDITENG_JUSTIFYITEM_HXX__
++
++#include "editeng/editengdllapi.h"
++#include "editeng/svxenum.hxx"
++#include <svl/eitem.hxx>
++#include <sal/types.h>
++
++class EDITENG_DLLPUBLIC SvxHorJustifyItem: public SfxEnumItem
++{
++public:
++    TYPEINFO();
++
++    SvxHorJustifyItem( const USHORT nId );
++
++    SvxHorJustifyItem(
++        const SvxCellHorJustify eJustify /*= SVX_HOR_JUSTIFY_STANDARD*/,
++        const USHORT nId );
++
++    virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
++                                    SfxMapUnit eCoreMetric,
++                                    SfxMapUnit ePresMetric,
++                                    String &rText, const IntlWrapper * = 0 ) const;
++
++    virtual	sal_Bool        	 QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
++    virtual	sal_Bool			 PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
++
++    virtual USHORT          GetValueCount() const;
++    virtual String          GetValueText( USHORT nVal ) const;
++    virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
++    virtual SfxPoolItem*    Create( SvStream& rStream, USHORT nVer ) const;
++
++    inline  SvxHorJustifyItem& operator=(const SvxHorJustifyItem& rHorJustify)
++            {
++                SetValue( rHorJustify.GetValue() );
++                return *this;
++            }
++};
++
++//------------------------------------------------------------------------
++
++class EDITENG_DLLPUBLIC SvxVerJustifyItem: public SfxEnumItem
++{
++public:
++    TYPEINFO();
++
++    SvxVerJustifyItem( const USHORT nId  );
++
++    SvxVerJustifyItem(
++        const SvxCellVerJustify eJustify /*= SVX_VER_JUSTIFY_STANDARD*/,
++        const USHORT nId  );
++
++    virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
++                                    SfxMapUnit eCoreMetric,
++                                    SfxMapUnit ePresMetric,
++                                    String &rText, const IntlWrapper * = 0 ) const;
++
++    virtual	sal_Bool        	 QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
++    virtual	sal_Bool			 PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
++
++    virtual USHORT          GetValueCount() const;
++    virtual String          GetValueText( USHORT nVal ) const;
++    virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
++    virtual SfxPoolItem*    Create( SvStream& rStream, USHORT nVer ) const;
++
++    inline  SvxVerJustifyItem& operator=(const SvxVerJustifyItem& rVerJustify)
++            {
++                SetValue( rVerJustify.GetValue() );
++                return *this;
++            }
++};
++
++//------------------------------------------------------------------------
++
++class EDITENG_DLLPUBLIC SvxJustifyMethodItem: public SfxEnumItem
++{
++public:
++    SvxJustifyMethodItem( const USHORT nId );
++
++    SvxJustifyMethodItem(
++        const SvxCellJustifyMethod eMethod,
++        const USHORT nId );
++
++    virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
++                                    SfxMapUnit eCoreMetric,
++                                    SfxMapUnit ePresMetric,
++                                    String &rText, const IntlWrapper * = 0 ) const;
++
++    virtual sal_Bool             QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
++    virtual sal_Bool             PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
++
++    virtual USHORT          GetValueCount() const;
++    virtual String          GetValueText( USHORT nVal ) const;
++    virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
++    virtual SfxPoolItem*    Create( SvStream& rStream, USHORT nVer ) const;
++
++    SvxJustifyMethodItem& operator=(const SvxJustifyMethodItem& r);
++};
++
++#endif
+diff --git editeng/inc/editeng/memberids.hrc editeng/inc/editeng/memberids.hrc
+index 0eaff89..e9cb0b5 100644
+--- editeng/inc/editeng/memberids.hrc
++++ editeng/inc/editeng/memberids.hrc
+@@ -191,6 +191,8 @@
+ #define MID_CASEMAP_VARIANT		0
+ #define MID_CASEMAP_TRANS		1
+ 
+-
++// SvxHorJustifyItem
++#define MID_HORJUST_HORJUST		0
++#define MID_HORJUST_ADJUST		1
+ 
+ #endif
+diff --git editeng/source/editeng/eerdll.cxx editeng/source/editeng/eerdll.cxx
+index c26ae20..6c335c9 100644
+--- editeng/source/editeng/eerdll.cxx
++++ editeng/source/editeng/eerdll.cxx
+@@ -73,7 +73,7 @@
+ #include <editeng/frmdiritem.hxx>
+ #include <editeng/xmlcnitm.hxx>
+ #include <editeng/forbiddencharacterstable.hxx>
+-#include <svx/algitem.hxx>
++#include <editeng/justifyitem.hxx>
+ #include <comphelper/processfactory.hxx>
+ 
+ static EditDLL* pDLL=0;
+diff --git editeng/source/editeng/impedit2.cxx editeng/source/editeng/impedit2.cxx
+index fe964ee..45cb490 100644
+--- editeng/source/editeng/impedit2.cxx
++++ editeng/source/editeng/impedit2.cxx
+@@ -58,7 +58,7 @@
+ #include <editeng/scripttypeitem.hxx>
+ #include <editeng/frmdiritem.hxx>
+ #include <editeng/fontitem.hxx>
+-#include <svx/algitem.hxx>
++#include <editeng/justifyitem.hxx>
+ #include <vcl/cmdevt.h>
+ 
+ #include <com/sun/star/i18n/CharacterIteratorMode.hpp>
+diff --git editeng/source/editeng/impedit3.cxx editeng/source/editeng/impedit3.cxx
+index 42f0e76..7490a8c 100644
+--- editeng/source/editeng/impedit3.cxx
++++ editeng/source/editeng/impedit3.cxx
+@@ -61,7 +61,7 @@
+ #include <editeng/scriptspaceitem.hxx>
+ #include <editeng/charscaleitem.hxx>
+ #include <editeng/numitem.hxx>
+-#include <svx/algitem.hxx>
++#include <editeng/justifyitem.hxx>
+ 
+ #include <svtools/colorcfg.hxx>
+ #include <svl/ctloptions.hxx>
+diff --git editeng/source/items/justifyitem.cxx editeng/source/items/justifyitem.cxx
+new file mode 100644
+index 0000000..01b9fef
+--- /dev/null
++++ editeng/source/items/justifyitem.cxx
+@@ -0,0 +1,485 @@
++/*************************************************************************
++ *
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ * 
++ * Copyright 2000, 2010 Oracle and/or its affiliates.
++ *
++ * OpenOffice.org - a multi-platform office productivity suite
++ *
++ * This file is part of OpenOffice.org.
++ *
++ * OpenOffice.org is free software: you can redistribute it and/or modify
++ * it under the terms of the GNU Lesser General Public License version 3
++ * only, as published by the Free Software Foundation.
++ *
++ * OpenOffice.org is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU Lesser General Public License version 3 for more details
++ * (a copy is included in the LICENSE file that accompanied this code).
++ *
++ * You should have received a copy of the GNU Lesser General Public License
++ * version 3 along with OpenOffice.org.  If not, see
++ * <http://www.openoffice.org/license.html>
++ * for a copy of the LGPLv3 License.
++ *
++ ************************************************************************/
++
++// MARKER(update_precomp.py): autogen include statement, do not remove
++#include "precompiled_editeng.hxx"
++
++// include ---------------------------------------------------------------
++
++#include "editeng/justifyitem.hxx"
++#include "editeng/memberids.hrc"
++#include "editeng/editrids.hrc"
++#include "editeng/eerdll.hxx"
++
++#include <tools/stream.hxx>
++
++#include <com/sun/star/table/CellHoriJustify.hpp>
++#include <com/sun/star/style/ParagraphAdjust.hpp>
++#include <com/sun/star/table/CellJustifyMethod.hpp>
++#include <com/sun/star/table/CellVertJustify2.hpp>
++#include <com/sun/star/style/VerticalAlignment.hpp>
++
++// STATIC DATA -----------------------------------------------------------
++
++TYPEINIT1_FACTORY( SvxHorJustifyItem, SfxEnumItem, new SvxHorJustifyItem(SVX_HOR_JUSTIFY_STANDARD, 0) );
++TYPEINIT1_FACTORY( SvxVerJustifyItem, SfxEnumItem, new SvxVerJustifyItem(SVX_VER_JUSTIFY_STANDARD, 0) );
++
++using namespace ::com::sun::star;
++
++// class SvxHorJustifyItem -----------------------------------------------
++
++
++SvxHorJustifyItem::SvxHorJustifyItem( const USHORT nId ) :
++    SfxEnumItem( nId, (USHORT)SVX_HOR_JUSTIFY_STANDARD )
++{
++}
++
++SvxHorJustifyItem::SvxHorJustifyItem( const SvxCellHorJustify eJustify,
++                                      const USHORT nId ) :
++    SfxEnumItem( nId, (USHORT)eJustify )
++{
++}
++
++//------------------------------------------------------------------------
++
++SfxItemPresentation SvxHorJustifyItem::GetPresentation
++(
++    SfxItemPresentation ePres,
++    SfxMapUnit          /*eCoreUnit*/,
++    SfxMapUnit          /*ePresUnit*/,
++    XubString&              rText, const IntlWrapper *)    const
++{
++    switch ( ePres )
++    {
++        case SFX_ITEM_PRESENTATION_NONE:
++            rText.Erase();
++            return SFX_ITEM_PRESENTATION_NONE;
++        case SFX_ITEM_PRESENTATION_NAMELESS:
++        case SFX_ITEM_PRESENTATION_COMPLETE:
++            rText = GetValueText( GetValue() );
++            return SFX_ITEM_PRESENTATION_COMPLETE;
++        default: ; //prevent warning
++    }
++    return SFX_ITEM_PRESENTATION_NONE;
++}
++
++//------------------------------------------------------------------------
++
++sal_Bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
++{
++//    sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
++    nMemberId &= ~CONVERT_TWIPS;
++    switch ( nMemberId )
++    {
++        case MID_HORJUST_HORJUST:
++            {
++                table::CellHoriJustify eUno = table::CellHoriJustify_STANDARD;
++                switch ( (SvxCellHorJustify)GetValue() )
++                {
++                    case SVX_HOR_JUSTIFY_STANDARD: eUno = table::CellHoriJustify_STANDARD; break;
++                    case SVX_HOR_JUSTIFY_LEFT:	   eUno = table::CellHoriJustify_LEFT;	   break;
++                    case SVX_HOR_JUSTIFY_CENTER:   eUno = table::CellHoriJustify_CENTER;   break;
++                    case SVX_HOR_JUSTIFY_RIGHT:	   eUno = table::CellHoriJustify_RIGHT;	   break;
++                    case SVX_HOR_JUSTIFY_BLOCK:	   eUno = table::CellHoriJustify_BLOCK;	   break;
++                    case SVX_HOR_JUSTIFY_REPEAT:   eUno = table::CellHoriJustify_REPEAT;   break;
++                }
++                rVal <<= eUno;
++            }
++            break;
++        case MID_HORJUST_ADJUST:
++            {
++                //	ParagraphAdjust values, as in SvxAdjustItem
++                //	(same value for ParaAdjust and ParaLastLineAdjust)
++
++                sal_Int16 nAdjust = style::ParagraphAdjust_LEFT;
++                switch ( (SvxCellHorJustify)GetValue() )
++                {
++                    // ParagraphAdjust_LEFT is used for STANDARD and REPEAT
++                    case SVX_HOR_JUSTIFY_STANDARD:
++                    case SVX_HOR_JUSTIFY_REPEAT:
++                    case SVX_HOR_JUSTIFY_LEFT:	 nAdjust = style::ParagraphAdjust_LEFT;	  break;
++                    case SVX_HOR_JUSTIFY_CENTER: nAdjust = style::ParagraphAdjust_CENTER; break;
++                    case SVX_HOR_JUSTIFY_RIGHT:	 nAdjust = style::ParagraphAdjust_RIGHT;  break;
++                    case SVX_HOR_JUSTIFY_BLOCK:	 nAdjust = style::ParagraphAdjust_BLOCK;  break;
++                }
++                rVal <<= nAdjust;		// as sal_Int16
++            }
++            break;
++    }
++    return sal_True;
++}
++
++sal_Bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
++{
++//    sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
++    nMemberId &= ~CONVERT_TWIPS;
++    switch ( nMemberId )
++    {
++        case MID_HORJUST_HORJUST:
++            {
++                table::CellHoriJustify eUno;
++                if(!(rVal >>= eUno))
++                {
++                    sal_Int32 nValue = 0;
++                    if(!(rVal >>= nValue))
++                        return sal_False;
++                    eUno = (table::CellHoriJustify)nValue;
++                }
++                SvxCellHorJustify eSvx = SVX_HOR_JUSTIFY_STANDARD;
++                switch (eUno)
++                {
++                    case table::CellHoriJustify_STANDARD: eSvx = SVX_HOR_JUSTIFY_STANDARD; break;
++                    case table::CellHoriJustify_LEFT:	  eSvx = SVX_HOR_JUSTIFY_LEFT;	   break;
++                    case table::CellHoriJustify_CENTER:   eSvx = SVX_HOR_JUSTIFY_CENTER;   break;
++                    case table::CellHoriJustify_RIGHT:	  eSvx = SVX_HOR_JUSTIFY_RIGHT;	   break;
++                    case table::CellHoriJustify_BLOCK:	  eSvx = SVX_HOR_JUSTIFY_BLOCK;	   break;
++                    case table::CellHoriJustify_REPEAT:   eSvx = SVX_HOR_JUSTIFY_REPEAT;   break;
++                    default: ; //prevent warning
++                }
++                SetValue( (USHORT)eSvx );
++            }
++            break;
++        case MID_HORJUST_ADJUST:
++            {
++                //	property contains ParagraphAdjust values as sal_Int16
++                sal_Int16 nVal = sal_Int16();
++                if(!(rVal >>= nVal))
++                    return sal_False;
++
++                SvxCellHorJustify eSvx = SVX_HOR_JUSTIFY_STANDARD;
++                switch (nVal)
++                {
++                    //	STRETCH is treated as BLOCK
++                    case style::ParagraphAdjust_LEFT:    eSvx = SVX_HOR_JUSTIFY_LEFT;   break;
++                    case style::ParagraphAdjust_RIGHT:   eSvx = SVX_HOR_JUSTIFY_RIGHT;  break;
++                    case style::ParagraphAdjust_STRETCH:
++                    case style::ParagraphAdjust_BLOCK:   eSvx = SVX_HOR_JUSTIFY_BLOCK;  break;
++                    case style::ParagraphAdjust_CENTER:  eSvx = SVX_HOR_JUSTIFY_CENTER; break;
++                }
++                SetValue( (USHORT)eSvx );
++            }
++    }
++    return sal_True;
++}
++
++//------------------------------------------------------------------------
++
++XubString SvxHorJustifyItem::GetValueText( USHORT nVal ) const
++{
++    DBG_ASSERT( nVal <= SVX_HOR_JUSTIFY_REPEAT, "enum overflow!" );
++    return EE_RESSTR(RID_SVXITEMS_HORJUST_STANDARD + nVal);
++}
++
++//------------------------------------------------------------------------
++
++SfxPoolItem* SvxHorJustifyItem::Clone( SfxItemPool* ) const
++{
++    return new SvxHorJustifyItem( *this );
++}
++
++//------------------------------------------------------------------------
++
++SfxPoolItem* SvxHorJustifyItem::Create( SvStream& rStream, USHORT ) const
++{
++    USHORT nVal;
++    rStream >> nVal;
++    return new SvxHorJustifyItem( (SvxCellHorJustify)nVal, Which() );
++}
++//------------------------------------------------------------------------
++
++USHORT SvxHorJustifyItem::GetValueCount() const
++{
++    return SVX_HOR_JUSTIFY_REPEAT + 1;	// letzter Enum-Wert + 1
++}
++
++// class SvxVerJustifyItem -----------------------------------------------
++
++SvxVerJustifyItem::SvxVerJustifyItem( const USHORT nId ) :
++    SfxEnumItem( nId, (USHORT)SVX_VER_JUSTIFY_STANDARD )
++{
++}
++
++SvxVerJustifyItem::SvxVerJustifyItem( const SvxCellVerJustify eJustify,
++                                      const USHORT nId ) :
++    SfxEnumItem( nId, (USHORT)eJustify )
++{
++}
++
++//------------------------------------------------------------------------
++
++SfxItemPresentation SvxVerJustifyItem::GetPresentation
++(
++    SfxItemPresentation ePres,
++    SfxMapUnit          /*eCoreUnit*/,
++    SfxMapUnit          /*ePresUnit*/,
++    XubString&              rText,
++    const IntlWrapper * )    const
++{
++    switch ( ePres )
++    {
++        case SFX_ITEM_PRESENTATION_NONE:
++            rText.Erase();
++            return SFX_ITEM_PRESENTATION_NONE;
++        case SFX_ITEM_PRESENTATION_NAMELESS:
++        case SFX_ITEM_PRESENTATION_COMPLETE:
++            rText = GetValueText( GetValue() );
++            return SFX_ITEM_PRESENTATION_COMPLETE;
++        default: ; //prevent warning
++    }
++    return SFX_ITEM_PRESENTATION_NONE;
++}
++
++//------------------------------------------------------------------------
++
++sal_Bool SvxVerJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
++{
++    nMemberId &= ~CONVERT_TWIPS;
++    switch ( nMemberId )
++    {
++        case MID_HORJUST_ADJUST:
++            {
++                style::VerticalAlignment eUno = style::VerticalAlignment_TOP;
++                switch ( (SvxCellVerJustify)GetValue() )
++                {
++                    case SVX_VER_JUSTIFY_TOP:	   eUno = style::VerticalAlignment_TOP;	    break;
++                    case SVX_VER_JUSTIFY_CENTER:   eUno = style::VerticalAlignment_MIDDLE;	break;
++                    case SVX_VER_JUSTIFY_BOTTOM:   eUno = style::VerticalAlignment_BOTTOM;	break;
++                    default: ; //prevent warning
++                }
++                rVal <<= eUno;
++                break;
++            }
++        default:
++            {
++                sal_Int32 nUno = table::CellVertJustify2::STANDARD;
++                switch ( (SvxCellVerJustify)GetValue() )
++                {
++                    case SVX_VER_JUSTIFY_STANDARD: nUno = table::CellVertJustify2::STANDARD; break;
++                    case SVX_VER_JUSTIFY_TOP:      nUno = table::CellVertJustify2::TOP;     break;
++                    case SVX_VER_JUSTIFY_CENTER:   nUno = table::CellVertJustify2::CENTER;  break;
++                    case SVX_VER_JUSTIFY_BOTTOM:   nUno = table::CellVertJustify2::BOTTOM;  break;
++                    case SVX_VER_JUSTIFY_BLOCK:    nUno = table::CellVertJustify2::BLOCK;  break;
++                    default: ; //prevent warning
++                }
++                rVal <<= nUno;
++                break;
++            }
++    }
++    return sal_True;
++}
++
++sal_Bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
++{
++    nMemberId &= ~CONVERT_TWIPS;
++    switch ( nMemberId )
++    {
++        case MID_HORJUST_ADJUST:
++            {
++                //	property contains ParagraphAdjust values as sal_Int16
++                style::VerticalAlignment nVal = style::VerticalAlignment_TOP;
++                if(!(rVal >>= nVal))
++                    return sal_False;
++
++                SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD;
++                switch (nVal)
++                {
++                    case style::VerticalAlignment_TOP:      eSvx = SVX_VER_JUSTIFY_TOP;     break;
++                    case style::VerticalAlignment_MIDDLE:   eSvx = SVX_VER_JUSTIFY_CENTER;  break;
++                    case style::VerticalAlignment_BOTTOM:   eSvx = SVX_VER_JUSTIFY_BOTTOM;  break;
++                    default:;
++                }
++                SetValue( (USHORT)eSvx );
++                break;
++            }
++        default:
++            {
++                sal_Int32 eUno;
++                if(!(rVal >>= eUno))
++                {
++                    eUno = table::CellVertJustify2::STANDARD;
++                }
++
++                SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD;
++                switch (eUno)
++                {
++                    case table::CellVertJustify2::STANDARD: eSvx = SVX_VER_JUSTIFY_STANDARD;  break;
++                    case table::CellVertJustify2::TOP:      eSvx = SVX_VER_JUSTIFY_TOP;       break;
++                    case table::CellVertJustify2::CENTER:   eSvx = SVX_VER_JUSTIFY_CENTER;    break;
++                    case table::CellVertJustify2::BOTTOM:   eSvx = SVX_VER_JUSTIFY_BOTTOM;    break;
++                    case table::CellVertJustify2::BLOCK:    eSvx = SVX_VER_JUSTIFY_BLOCK;     break;
++                    default: ; //prevent warning
++                }
++                SetValue( (USHORT)eSvx );
++                break;
++            }
++    }
++
++    return sal_True;
++}
++
++//------------------------------------------------------------------------
++
++XubString SvxVerJustifyItem::GetValueText( USHORT nVal ) const
++{
++    DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" );
++    return EE_RESSTR(RID_SVXITEMS_VERJUST_STANDARD + nVal);
++}
++
++//------------------------------------------------------------------------
++
++SfxPoolItem* SvxVerJustifyItem::Clone( SfxItemPool* ) const
++{
++    return new SvxVerJustifyItem( *this );
++}
++
++//------------------------------------------------------------------------
++
++SfxPoolItem* SvxVerJustifyItem::Create( SvStream& rStream, USHORT ) const
++{
++    USHORT nVal;
++    rStream >> nVal;
++    return new SvxVerJustifyItem( (SvxCellVerJustify)nVal, Which() );
++}
++
++//------------------------------------------------------------------------
++
++USHORT SvxVerJustifyItem::GetValueCount() const
++{
++    return SVX_VER_JUSTIFY_BOTTOM + 1;	// letzter Enum-Wert + 1
++}
++
++
++// class SvxJustifyMethodItem -----------------------------------------------
++
++SvxJustifyMethodItem::SvxJustifyMethodItem( const USHORT nId ) :
++    SfxEnumItem( nId, (USHORT)SVX_JUSTIFY_METHOD_AUTO )
++{
++}
++
++SvxJustifyMethodItem::SvxJustifyMethodItem( const SvxCellJustifyMethod eJustify,
++                                      const USHORT nId ) :
++    SfxEnumItem( nId, (USHORT)eJustify )
++{
++}
++
++//------------------------------------------------------------------------
++
++SfxItemPresentation SvxJustifyMethodItem::GetPresentation
++(
++    SfxItemPresentation ePres,
++    SfxMapUnit          /*eCoreUnit*/,
++    SfxMapUnit          /*ePresUnit*/,
++    XubString&              rText,
++    const IntlWrapper * )    const
++{
++    switch ( ePres )
++    {
++        case SFX_ITEM_PRESENTATION_NONE:
++            rText.Erase();
++            return SFX_ITEM_PRESENTATION_NONE;
++        case SFX_ITEM_PRESENTATION_NAMELESS:
++        case SFX_ITEM_PRESENTATION_COMPLETE:
++            rText = GetValueText( GetValue() );
++            return SFX_ITEM_PRESENTATION_COMPLETE;
++        default: ; //prevent warning
++    }
++    return SFX_ITEM_PRESENTATION_NONE;
++}
++
++//------------------------------------------------------------------------
++
++sal_Bool SvxJustifyMethodItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
++{
++    sal_Int32 nUno = table::CellJustifyMethod::AUTO;
++    switch (static_cast<SvxCellJustifyMethod>(GetValue()))
++    {
++        case SVX_JUSTIFY_METHOD_AUTO:       nUno = table::CellJustifyMethod::AUTO;       break;
++        case SVX_JUSTIFY_METHOD_DISTRIBUTE: nUno = table::CellJustifyMethod::DISTRIBUTE; break;
++        default:;
++    }
++    rVal <<= nUno;
++    return true;
++}
++
++sal_Bool SvxJustifyMethodItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
++{
++    sal_Int32 nVal = table::CellJustifyMethod::AUTO;
++    if (!(rVal >>= nVal))
++        return false;
++
++    SvxCellJustifyMethod eSvx = SVX_JUSTIFY_METHOD_AUTO;
++    switch (nVal)
++    {
++        case table::CellJustifyMethod::AUTO:
++            eSvx = SVX_JUSTIFY_METHOD_AUTO;
++        break;
++        case table::CellJustifyMethod::DISTRIBUTE:
++            eSvx = SVX_JUSTIFY_METHOD_DISTRIBUTE;
++        break;
++        default:;
++    }
++    SetValue(static_cast<USHORT>(eSvx));
++    return true;
++}
++
++//------------------------------------------------------------------------
++
++XubString SvxJustifyMethodItem::GetValueText( USHORT nVal ) const
++{
++    DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" );
++    return EE_RESSTR(RID_SVXITEMS_JUSTMETHOD_AUTO + nVal);
++}
++
++//------------------------------------------------------------------------
++
++SfxPoolItem* SvxJustifyMethodItem::Clone( SfxItemPool* ) const
++{
++    return new SvxJustifyMethodItem( *this );
++}
++
++//------------------------------------------------------------------------
++
++SfxPoolItem* SvxJustifyMethodItem::Create( SvStream& rStream, USHORT ) const
++{
++    USHORT nVal;
++    rStream >> nVal;
++    return new SvxJustifyMethodItem( (SvxCellJustifyMethod)nVal, Which() );
++}
++
++//------------------------------------------------------------------------
++
++USHORT SvxJustifyMethodItem::GetValueCount() const
++{
++    return SVX_JUSTIFY_METHOD_DISTRIBUTE + 1;	// letzter Enum-Wert + 1
++}
++
++SvxJustifyMethodItem& SvxJustifyMethodItem::operator=(const SvxJustifyMethodItem& r)
++{
++    SetValue( r.GetValue() );
++    return *this;
++}
++
+diff --git editeng/source/items/makefile.mk editeng/source/items/makefile.mk
+index 512db7c..1a24244 100644
+--- editeng/source/items/makefile.mk
++++ editeng/source/items/makefile.mk
+@@ -56,6 +56,7 @@ SLOFILES= \
+                 $(SLO)$/svdfield.obj \
+         $(SLO)$/writingmodeitem.obj \
+         $(SLO)$/frmitems.obj \
++        $(SLO)$/justifyitem.obj \
+         $(SLO)$/paraitem.obj \
+         $(SLO)$/textitem.obj \
+         $(SLO)$/flditem.obj \
diff --git a/patches/dev300/calc-distributed-cell-text-dev300-svx.diff b/patches/dev300/calc-distributed-cell-text-dev300-svx.diff
new file mode 100644
index 0000000..35f0aba
--- /dev/null
+++ b/patches/dev300/calc-distributed-cell-text-dev300-svx.diff
@@ -0,0 +1,616 @@
+diff --git svx/inc/svx/algitem.hxx svx/inc/svx/algitem.hxx
+index 2196c62..2663c47 100644
+--- svx/inc/svx/algitem.hxx
++++ svx/inc/svx/algitem.hxx
+@@ -39,104 +39,6 @@ class SvStream;
+ 
+ //------------------------------------------------------------------------
+ 
+-
+-
+-class SVX_DLLPUBLIC SvxHorJustifyItem: public SfxEnumItem
+-{
+-public:
+-    TYPEINFO();
+-
+-    SvxHorJustifyItem( const USHORT nId );
+-
+-    SvxHorJustifyItem(
+-        const SvxCellHorJustify eJustify /*= SVX_HOR_JUSTIFY_STANDARD*/,
+-        const USHORT nId );
+-
+-    virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+-                                    SfxMapUnit eCoreMetric,
+-                                    SfxMapUnit ePresMetric,
+-                                    String &rText, const IntlWrapper * = 0 ) const;
+-
+-    virtual	sal_Bool        	 QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+-    virtual	sal_Bool			 PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+-
+-    virtual USHORT          GetValueCount() const;
+-    virtual String          GetValueText( USHORT nVal ) const;
+-    virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
+-    virtual SfxPoolItem*    Create( SvStream& rStream, USHORT nVer ) const;
+-
+-    inline  SvxHorJustifyItem& operator=(const SvxHorJustifyItem& rHorJustify)
+-            {
+-                SetValue( rHorJustify.GetValue() );
+-                return *this;
+-            }
+-};
+-
+-
+-//------------------------------------------------------------------------
+-
+-
+-class SVX_DLLPUBLIC SvxVerJustifyItem: public SfxEnumItem
+-{
+-public:
+-    TYPEINFO();
+-
+-    SvxVerJustifyItem( const USHORT nId  );
+-
+-    SvxVerJustifyItem(
+-        const SvxCellVerJustify eJustify /*= SVX_VER_JUSTIFY_STANDARD*/,
+-        const USHORT nId  );
+-
+-    virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+-                                    SfxMapUnit eCoreMetric,
+-                                    SfxMapUnit ePresMetric,
+-                                    String &rText, const IntlWrapper * = 0 ) const;
+-
+-    virtual	sal_Bool        	 QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+-    virtual	sal_Bool			 PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+-
+-    virtual USHORT          GetValueCount() const;
+-    virtual String          GetValueText( USHORT nVal ) const;
+-    virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
+-    virtual SfxPoolItem*    Create( SvStream& rStream, USHORT nVer ) const;
+-
+-    inline  SvxVerJustifyItem& operator=(const SvxVerJustifyItem& rVerJustify)
+-            {
+-                SetValue( rVerJustify.GetValue() );
+-                return *this;
+-            }
+-};
+-
+-//------------------------------------------------------------------------
+-
+-class SVX_DLLPUBLIC SvxJustifyMethodItem: public SfxEnumItem
+-{
+-public:
+-    SvxJustifyMethodItem( const USHORT nId );
+-
+-    SvxJustifyMethodItem(
+-        const SvxCellJustifyMethod eMethod,
+-        const USHORT nId );
+-
+-    virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
+-                                    SfxMapUnit eCoreMetric,
+-                                    SfxMapUnit ePresMetric,
+-                                    String &rText, const IntlWrapper * = 0 ) const;
+-
+-    virtual sal_Bool             QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
+-    virtual sal_Bool             PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
+-
+-    virtual USHORT          GetValueCount() const;
+-    virtual String          GetValueText( USHORT nVal ) const;
+-    virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
+-    virtual SfxPoolItem*    Create( SvStream& rStream, USHORT nVer ) const;
+-
+-    SvxJustifyMethodItem& operator=(const SvxJustifyMethodItem& r);
+-};
+-
+-
+-//------------------------------------------------------------------------
+-
+ class SVX_DLLPUBLIC SvxOrientationItem: public SfxEnumItem
+ {
+ public:
+diff --git svx/inc/svx/svxitems.hrc svx/inc/svx/svxitems.hrc
+index 7833fd8..8a1a2cd 100644
+--- svx/inc/svx/svxitems.hrc
++++ svx/inc/svx/svxitems.hrc
+@@ -104,20 +104,6 @@
+ #define RID_SVXITEMS_CHARSET_SYSTEM			(RID_SVXITEMS_START + 154)
+ #define RID_SVXITEMS_CHARSET_SYMBOL			(RID_SVXITEMS_START + 155)
+ 
+-// enum SvxCellHorJustify
+-#define RID_SVXITEMS_HORJUST_STANDARD		(RID_SVXITEMS_START + 400)
+-#define RID_SVXITEMS_HORJUST_LEFT			(RID_SVXITEMS_START + 401)
+-#define RID_SVXITEMS_HORJUST_CENTER			(RID_SVXITEMS_START + 402)
+-#define RID_SVXITEMS_HORJUST_RIGHT			(RID_SVXITEMS_START + 403)
+-#define RID_SVXITEMS_HORJUST_BLOCK			(RID_SVXITEMS_START + 404)
+-#define RID_SVXITEMS_HORJUST_REPEAT			(RID_SVXITEMS_START + 405)
+-
+-// enum SvxCellVerJustify
+-#define RID_SVXITEMS_VERJUST_STANDARD		(RID_SVXITEMS_START + 406)
+-#define RID_SVXITEMS_VERJUST_TOP			(RID_SVXITEMS_START + 407)
+-#define RID_SVXITEMS_VERJUST_CENTER			(RID_SVXITEMS_START + 408)
+-#define RID_SVXITEMS_VERJUST_BOTTOM			(RID_SVXITEMS_START + 409)
+-
+ // enum SvxCellOrientation
+ #define RID_SVXITEMS_ORI_STANDARD			(RID_SVXITEMS_START + 410)
+ #define RID_SVXITEMS_ORI_TOPBOTTOM			(RID_SVXITEMS_START + 411)
+@@ -161,13 +147,10 @@
+ #define RID_SVXITEMS_BRUSH_CHAR				(RID_SVXITEMS_START + 527)
+ #define RID_ATTR_NAMES                      (RID_SVXITEMS_START + 528)
+ 
+-#define RID_SVXITEMS_JUSTMETHOD_AUTO            (RID_SVXITEMS_START + 579)
+-#define RID_SVXITEMS_JUSTMETHOD_DISTRIBUTE      (RID_SVXITEMS_START + 580)
+-
+ // Ueberlaufpruefung --------------------------------------------------------
+ 
+ // Resource-Id's
+-#define ACT_RID_SVXITEMS_END    RID_SVXITEMS_JUSTMETHOD_DISTRIBUTE
++#define ACT_RID_SVXITEMS_END    RID_ATTR_NAMES
+ #if ACT_RID_SVXITEMS_END > RID_SVXITEMS_END
+ #error Resource-Ueberlauf in #line, #file
+ #endif
+diff --git svx/source/items/algitem.cxx svx/source/items/algitem.cxx
+index b2e09f7..a8551cc 100644
+--- svx/source/items/algitem.cxx
++++ svx/source/items/algitem.cxx
+@@ -33,17 +33,12 @@
+ 
+ #include <tools/stream.hxx>
+ #include <com/sun/star/table/BorderLine.hpp>
+-#include <com/sun/star/table/CellJustifyMethod.hpp>
+-#include <com/sun/star/table/CellVertJustify2.hpp>
+ #include <com/sun/star/table/ShadowLocation.hpp>
+ #include <com/sun/star/table/TableBorder.hpp>
+ #include <com/sun/star/table/ShadowFormat.hpp>
+ #include <com/sun/star/table/CellRangeAddress.hpp>
+ #include <com/sun/star/table/CellContentType.hpp>
+ #include <com/sun/star/table/TableOrientation.hpp>
+-#include <com/sun/star/table/CellHoriJustify.hpp>
+-#include <com/sun/star/style/ParagraphAdjust.hpp>
+-#include "com/sun/star/style/VerticalAlignment.hpp"
+ #include <com/sun/star/util/SortField.hpp>
+ #include <com/sun/star/util/SortFieldType.hpp>
+ #include <com/sun/star/table/CellOrientation.hpp>
+@@ -64,444 +59,9 @@ using namespace ::com::sun::star;
+ // STATIC DATA -----------------------------------------------------------
+ 
+ //TYPEINIT1_AUTOFACTORY( SvxHorJustifyItem, SfxEnumItem );
+-TYPEINIT1_FACTORY( SvxHorJustifyItem, SfxEnumItem, new SvxHorJustifyItem(SVX_HOR_JUSTIFY_STANDARD, 0))
+-TYPEINIT1_FACTORY( SvxVerJustifyItem, SfxEnumItem, new SvxVerJustifyItem(SVX_VER_JUSTIFY_STANDARD, 0) );
+ TYPEINIT1_FACTORY( SvxOrientationItem, SfxEnumItem, new SvxOrientationItem(SVX_ORIENTATION_STANDARD, 0) );
+ TYPEINIT1_FACTORY( SvxMarginItem, SfxPoolItem, new SvxMarginItem(0) );
+ 
+-// class SvxHorJustifyItem -----------------------------------------------
+-
+-
+-SvxHorJustifyItem::SvxHorJustifyItem( const USHORT nId ) :
+-    SfxEnumItem( nId, (USHORT)SVX_HOR_JUSTIFY_STANDARD )
+-{
+-}
+-
+-SvxHorJustifyItem::SvxHorJustifyItem( const SvxCellHorJustify eJustify,
+-                                      const USHORT nId ) :
+-    SfxEnumItem( nId, (USHORT)eJustify )
+-{
+-}
+-
+-//------------------------------------------------------------------------
+-
+-SfxItemPresentation SvxHorJustifyItem::GetPresentation
+-(
+-    SfxItemPresentation ePres,
+-    SfxMapUnit          /*eCoreUnit*/,
+-    SfxMapUnit          /*ePresUnit*/,
+-    XubString&              rText, const IntlWrapper *)    const
+-{
+-    switch ( ePres )
+-    {
+-        case SFX_ITEM_PRESENTATION_NONE:
+-            rText.Erase();
+-            return SFX_ITEM_PRESENTATION_NONE;
+-        case SFX_ITEM_PRESENTATION_NAMELESS:
+-        case SFX_ITEM_PRESENTATION_COMPLETE:
+-            rText = GetValueText( GetValue() );
+-            return SFX_ITEM_PRESENTATION_COMPLETE;
+-        default: ; //prevent warning
+-    }
+-    return SFX_ITEM_PRESENTATION_NONE;
+-}
+-
+-//------------------------------------------------------------------------
+-
+-sal_Bool SvxHorJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+-{
+-//    sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+-    nMemberId &= ~CONVERT_TWIPS;
+-    switch ( nMemberId )
+-    {
+-        case MID_HORJUST_HORJUST:
+-            {
+-                table::CellHoriJustify eUno = table::CellHoriJustify_STANDARD;
+-                switch ( (SvxCellHorJustify)GetValue() )
+-                {
+-                    case SVX_HOR_JUSTIFY_STANDARD: eUno = table::CellHoriJustify_STANDARD; break;
+-                    case SVX_HOR_JUSTIFY_LEFT:	   eUno = table::CellHoriJustify_LEFT;	   break;
+-                    case SVX_HOR_JUSTIFY_CENTER:   eUno = table::CellHoriJustify_CENTER;   break;
+-                    case SVX_HOR_JUSTIFY_RIGHT:	   eUno = table::CellHoriJustify_RIGHT;	   break;
+-                    case SVX_HOR_JUSTIFY_BLOCK:	   eUno = table::CellHoriJustify_BLOCK;	   break;
+-                    case SVX_HOR_JUSTIFY_REPEAT:   eUno = table::CellHoriJustify_REPEAT;   break;
+-                }
+-                rVal <<= eUno;
+-            }
+-            break;
+-        case MID_HORJUST_ADJUST:
+-            {
+-                //	ParagraphAdjust values, as in SvxAdjustItem
+-                //	(same value for ParaAdjust and ParaLastLineAdjust)
+-
+-                sal_Int16 nAdjust = style::ParagraphAdjust_LEFT;
+-                switch ( (SvxCellHorJustify)GetValue() )
+-                {
+-                    // ParagraphAdjust_LEFT is used for STANDARD and REPEAT
+-                    case SVX_HOR_JUSTIFY_STANDARD:
+-                    case SVX_HOR_JUSTIFY_REPEAT:
+-                    case SVX_HOR_JUSTIFY_LEFT:	 nAdjust = style::ParagraphAdjust_LEFT;	  break;
+-                    case SVX_HOR_JUSTIFY_CENTER: nAdjust = style::ParagraphAdjust_CENTER; break;
+-                    case SVX_HOR_JUSTIFY_RIGHT:	 nAdjust = style::ParagraphAdjust_RIGHT;  break;
+-                    case SVX_HOR_JUSTIFY_BLOCK:	 nAdjust = style::ParagraphAdjust_BLOCK;  break;
+-                }
+-                rVal <<= nAdjust;		// as sal_Int16
+-            }
+-            break;
+-    }
+-    return sal_True;
+-}
+-
+-sal_Bool SvxHorJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+-{
+-//    sal_Bool bConvert = 0!=(nMemberId&CONVERT_TWIPS);
+-    nMemberId &= ~CONVERT_TWIPS;
+-    switch ( nMemberId )
+-    {
+-        case MID_HORJUST_HORJUST:
+-            {
+-                table::CellHoriJustify eUno;
+-                if(!(rVal >>= eUno))
+-                {
+-                    sal_Int32 nValue = 0;
+-                    if(!(rVal >>= nValue))
+-                        return sal_False;
+-                    eUno = (table::CellHoriJustify)nValue;
+-                }
+-                SvxCellHorJustify eSvx = SVX_HOR_JUSTIFY_STANDARD;
+-                switch (eUno)
+-                {
+-                    case table::CellHoriJustify_STANDARD: eSvx = SVX_HOR_JUSTIFY_STANDARD; break;
+-                    case table::CellHoriJustify_LEFT:	  eSvx = SVX_HOR_JUSTIFY_LEFT;	   break;
+-                    case table::CellHoriJustify_CENTER:   eSvx = SVX_HOR_JUSTIFY_CENTER;   break;
+-                    case table::CellHoriJustify_RIGHT:	  eSvx = SVX_HOR_JUSTIFY_RIGHT;	   break;
+-                    case table::CellHoriJustify_BLOCK:	  eSvx = SVX_HOR_JUSTIFY_BLOCK;	   break;
+-                    case table::CellHoriJustify_REPEAT:   eSvx = SVX_HOR_JUSTIFY_REPEAT;   break;
+-                    default: ; //prevent warning
+-                }
+-                SetValue( (USHORT)eSvx );
+-            }
+-            break;
+-        case MID_HORJUST_ADJUST:
+-            {
+-                //	property contains ParagraphAdjust values as sal_Int16
+-                sal_Int16 nVal = sal_Int16();
+-                if(!(rVal >>= nVal))
+-                    return sal_False;
+-
+-                SvxCellHorJustify eSvx = SVX_HOR_JUSTIFY_STANDARD;
+-                switch (nVal)
+-                {
+-                    //	STRETCH is treated as BLOCK
+-                    case style::ParagraphAdjust_LEFT:    eSvx = SVX_HOR_JUSTIFY_LEFT;   break;
+-                    case style::ParagraphAdjust_RIGHT:   eSvx = SVX_HOR_JUSTIFY_RIGHT;  break;
+-                    case style::ParagraphAdjust_STRETCH:
+-                    case style::ParagraphAdjust_BLOCK:   eSvx = SVX_HOR_JUSTIFY_BLOCK;  break;
+-                    case style::ParagraphAdjust_CENTER:  eSvx = SVX_HOR_JUSTIFY_CENTER; break;
+-                }
+-                SetValue( (USHORT)eSvx );
+-            }
+-    }
+-    return sal_True;
+-}
+-
+-//------------------------------------------------------------------------
+-
+-XubString SvxHorJustifyItem::GetValueText( USHORT nVal ) const
+-{
+-    DBG_ASSERT( nVal <= SVX_HOR_JUSTIFY_REPEAT, "enum overflow!" );
+-    return SVX_RESSTR(RID_SVXITEMS_HORJUST_STANDARD + nVal);
+-}
+-
+-//------------------------------------------------------------------------
+-
+-SfxPoolItem* SvxHorJustifyItem::Clone( SfxItemPool* ) const
+-{
+-    return new SvxHorJustifyItem( *this );
+-}
+-
+-//------------------------------------------------------------------------
+-
+-SfxPoolItem* SvxHorJustifyItem::Create( SvStream& rStream, USHORT ) const
+-{
+-    USHORT nVal;
+-    rStream >> nVal;
+-    return new SvxHorJustifyItem( (SvxCellHorJustify)nVal, Which() );
+-}
+-//------------------------------------------------------------------------
+-
+-USHORT SvxHorJustifyItem::GetValueCount() const
+-{
+-    return SVX_HOR_JUSTIFY_REPEAT + 1;	// letzter Enum-Wert + 1
+-}
+-
+-// class SvxVerJustifyItem -----------------------------------------------
+-
+-SvxVerJustifyItem::SvxVerJustifyItem( const USHORT nId ) :
+-    SfxEnumItem( nId, (USHORT)SVX_VER_JUSTIFY_STANDARD )
+-{
+-}
+-
+-SvxVerJustifyItem::SvxVerJustifyItem( const SvxCellVerJustify eJustify,
+-                                      const USHORT nId ) :
+-    SfxEnumItem( nId, (USHORT)eJustify )
+-{
+-}
+-
+-//------------------------------------------------------------------------
+-
+-SfxItemPresentation SvxVerJustifyItem::GetPresentation
+-(
+-    SfxItemPresentation ePres,
+-    SfxMapUnit          /*eCoreUnit*/,
+-    SfxMapUnit          /*ePresUnit*/,
+-    XubString&              rText,
+-    const IntlWrapper * )    const
+-{
+-    switch ( ePres )
+-    {
+-        case SFX_ITEM_PRESENTATION_NONE:
+-            rText.Erase();
+-            return SFX_ITEM_PRESENTATION_NONE;
+-        case SFX_ITEM_PRESENTATION_NAMELESS:
+-        case SFX_ITEM_PRESENTATION_COMPLETE:
+-            rText = GetValueText( GetValue() );
+-            return SFX_ITEM_PRESENTATION_COMPLETE;
+-        default: ; //prevent warning
+-    }
+-    return SFX_ITEM_PRESENTATION_NONE;
+-}
+-
+-//------------------------------------------------------------------------
+-
+-sal_Bool SvxVerJustifyItem::QueryValue( uno::Any& rVal, BYTE nMemberId ) const
+-{
+-    nMemberId &= ~CONVERT_TWIPS;
+-    switch ( nMemberId )
+-    {
+-        case MID_HORJUST_ADJUST:
+-            {
+-                style::VerticalAlignment eUno = style::VerticalAlignment_TOP;
+-                switch ( (SvxCellVerJustify)GetValue() )
+-                {
+-                    case SVX_VER_JUSTIFY_TOP:	   eUno = style::VerticalAlignment_TOP;	    break;
+-                    case SVX_VER_JUSTIFY_CENTER:   eUno = style::VerticalAlignment_MIDDLE;	break;
+-                    case SVX_VER_JUSTIFY_BOTTOM:   eUno = style::VerticalAlignment_BOTTOM;	break;
+-                    default: ; //prevent warning
+-                }
+-                rVal <<= eUno;
+-                break;
+-            }
+-        default:
+-            {
+-                sal_Int32 nUno = table::CellVertJustify2::STANDARD;
+-                switch ( (SvxCellVerJustify)GetValue() )
+-                {
+-                    case SVX_VER_JUSTIFY_STANDARD: nUno = table::CellVertJustify2::STANDARD; break;
+-                    case SVX_VER_JUSTIFY_TOP:      nUno = table::CellVertJustify2::TOP;     break;
+-                    case SVX_VER_JUSTIFY_CENTER:   nUno = table::CellVertJustify2::CENTER;  break;
+-                    case SVX_VER_JUSTIFY_BOTTOM:   nUno = table::CellVertJustify2::BOTTOM;  break;
+-                    case SVX_VER_JUSTIFY_BLOCK:    nUno = table::CellVertJustify2::BLOCK;  break;
+-                    default: ; //prevent warning
+-                }
+-                rVal <<= nUno;
+-                break;
+-            }
+-    }
+-    return sal_True;
+-}
+-
+-sal_Bool SvxVerJustifyItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
+-{
+-    nMemberId &= ~CONVERT_TWIPS;
+-    switch ( nMemberId )
+-    {
+-        case MID_HORJUST_ADJUST:
+-            {
+-                //	property contains ParagraphAdjust values as sal_Int16
+-                style::VerticalAlignment nVal = style::VerticalAlignment_TOP;
+-                if(!(rVal >>= nVal))
+-                    return sal_False;
+-
+-                SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD;
+-                switch (nVal)
+-                {
+-                    case style::VerticalAlignment_TOP:      eSvx = SVX_VER_JUSTIFY_TOP;     break;
+-                    case style::VerticalAlignment_MIDDLE:   eSvx = SVX_VER_JUSTIFY_CENTER;  break;
+-                    case style::VerticalAlignment_BOTTOM:   eSvx = SVX_VER_JUSTIFY_BOTTOM;  break;
+-                    default:;
+-                }
+-                SetValue( (USHORT)eSvx );
+-                break;
+-            }
+-        default:
+-            {
+-                sal_Int32 eUno;
+-                if(!(rVal >>= eUno))
+-                {
+-                    eUno = table::CellVertJustify2::STANDARD;
+-                }
+-
+-                SvxCellVerJustify eSvx = SVX_VER_JUSTIFY_STANDARD;
+-                switch (eUno)
+-                {
+-                    case table::CellVertJustify2::STANDARD: eSvx = SVX_VER_JUSTIFY_STANDARD;  break;
+-                    case table::CellVertJustify2::TOP:      eSvx = SVX_VER_JUSTIFY_TOP;       break;
+-                    case table::CellVertJustify2::CENTER:   eSvx = SVX_VER_JUSTIFY_CENTER;    break;
+-                    case table::CellVertJustify2::BOTTOM:   eSvx = SVX_VER_JUSTIFY_BOTTOM;    break;
+-                    case table::CellVertJustify2::BLOCK:    eSvx = SVX_VER_JUSTIFY_BLOCK;     break;
+-                    default: ; //prevent warning
+-                }
+-                SetValue( (USHORT)eSvx );
+-                break;
+-            }
+-    }
+-
+-    return sal_True;
+-}
+-
+-//------------------------------------------------------------------------
+-
+-XubString SvxVerJustifyItem::GetValueText( USHORT nVal ) const
+-{
+-    DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" );
+-    return SVX_RESSTR(RID_SVXITEMS_VERJUST_STANDARD + nVal);
+-}
+-
+-//------------------------------------------------------------------------
+-
+-SfxPoolItem* SvxVerJustifyItem::Clone( SfxItemPool* ) const
+-{
+-    return new SvxVerJustifyItem( *this );
+-}
+-
+-//------------------------------------------------------------------------
+-
+-SfxPoolItem* SvxVerJustifyItem::Create( SvStream& rStream, USHORT ) const
+-{
+-    USHORT nVal;
+-    rStream >> nVal;
+-    return new SvxVerJustifyItem( (SvxCellVerJustify)nVal, Which() );
+-}
+-
+-//------------------------------------------------------------------------
+-
+-USHORT SvxVerJustifyItem::GetValueCount() const
+-{
+-    return SVX_VER_JUSTIFY_BOTTOM + 1;	// letzter Enum-Wert + 1
+-}
+-
+-
+-// class SvxJustifyMethodItem -----------------------------------------------
+-
+-SvxJustifyMethodItem::SvxJustifyMethodItem( const USHORT nId ) :
+-    SfxEnumItem( nId, (USHORT)SVX_JUSTIFY_METHOD_AUTO )
+-{
+-}
+-
+-SvxJustifyMethodItem::SvxJustifyMethodItem( const SvxCellJustifyMethod eJustify,
+-                                      const USHORT nId ) :
+-    SfxEnumItem( nId, (USHORT)eJustify )
+-{
+-}
+-
+-//------------------------------------------------------------------------
+-
+-SfxItemPresentation SvxJustifyMethodItem::GetPresentation
+-(
+-    SfxItemPresentation ePres,
+-    SfxMapUnit          /*eCoreUnit*/,
+-    SfxMapUnit          /*ePresUnit*/,
+-    XubString&              rText,
+-    const IntlWrapper * )    const
+-{
+-    switch ( ePres )
+-    {
+-        case SFX_ITEM_PRESENTATION_NONE:
+-            rText.Erase();
+-            return SFX_ITEM_PRESENTATION_NONE;
+-        case SFX_ITEM_PRESENTATION_NAMELESS:
+-        case SFX_ITEM_PRESENTATION_COMPLETE:
+-            rText = GetValueText( GetValue() );
+-            return SFX_ITEM_PRESENTATION_COMPLETE;
+-        default: ; //prevent warning
+-    }
+-    return SFX_ITEM_PRESENTATION_NONE;
+-}
+-
+-//------------------------------------------------------------------------
+-
+-sal_Bool SvxJustifyMethodItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const
+-{
+-    sal_Int32 nUno = table::CellJustifyMethod::AUTO;
+-    switch (static_cast<SvxCellJustifyMethod>(GetValue()))
+-    {
+-        case SVX_JUSTIFY_METHOD_AUTO:       nUno = table::CellJustifyMethod::AUTO;       break;
+-        case SVX_JUSTIFY_METHOD_DISTRIBUTE: nUno = table::CellJustifyMethod::DISTRIBUTE; break;
+-        default:;
+-    }
+-    rVal <<= nUno;
+-    return true;
+-}
+-
+-sal_Bool SvxJustifyMethodItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ )
+-{
+-    sal_Int32 nVal = table::CellJustifyMethod::AUTO;
+-    if (!(rVal >>= nVal))
+-        return false;
+-
+-    SvxCellJustifyMethod eSvx = SVX_JUSTIFY_METHOD_AUTO;
+-    switch (nVal)
+-    {
+-        case table::CellJustifyMethod::AUTO:
+-            eSvx = SVX_JUSTIFY_METHOD_AUTO;
+-        break;
+-        case table::CellJustifyMethod::DISTRIBUTE:
+-            eSvx = SVX_JUSTIFY_METHOD_DISTRIBUTE;
+-        break;
+-        default:;
+-    }
+-    SetValue(static_cast<USHORT>(eSvx));
+-    return true;
+-}
+-
+-//------------------------------------------------------------------------
+-
+-XubString SvxJustifyMethodItem::GetValueText( USHORT nVal ) const
+-{
+-    DBG_ASSERT( nVal <= SVX_VER_JUSTIFY_BOTTOM, "enum overflow!" );
+-    return SVX_RESSTR(RID_SVXITEMS_JUSTMETHOD_AUTO + nVal);
+-}
+-
+-//------------------------------------------------------------------------
+-
+-SfxPoolItem* SvxJustifyMethodItem::Clone( SfxItemPool* ) const
+-{
+-    return new SvxJustifyMethodItem( *this );
+-}
+-
+-//------------------------------------------------------------------------
+-
+-SfxPoolItem* SvxJustifyMethodItem::Create( SvStream& rStream, USHORT ) const
+-{
+-    USHORT nVal;
+-    rStream >> nVal;
+-    return new SvxJustifyMethodItem( (SvxCellJustifyMethod)nVal, Which() );
+-}
+-
+-//------------------------------------------------------------------------
+-
+-USHORT SvxJustifyMethodItem::GetValueCount() const
+-{
+-    return SVX_JUSTIFY_METHOD_DISTRIBUTE + 1;	// letzter Enum-Wert + 1
+-}
+-
+-SvxJustifyMethodItem& SvxJustifyMethodItem::operator=(const SvxJustifyMethodItem& r)
+-{
+-    SetValue( r.GetValue() );
+-    return *this;
+-}
+-
+ // class SvxOrientationItem ----------------------------------------------
+ 
+ SvxOrientationItem::SvxOrientationItem( const SvxCellOrientation eOrientation,


More information about the ooo-build-commit mailing list