diff options
-rw-r--r-- | svx/prj/d.lst | 1 | ||||
-rw-r--r-- | svx/source/svdraw/svdoattr.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 7 | ||||
-rw-r--r-- | svx/source/svdraw/svdotxat.cxx | 15 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 30 |
5 files changed, 23 insertions, 36 deletions
diff --git a/svx/prj/d.lst b/svx/prj/d.lst index eab791c5a6f4..9b48c1d7f8f3 100644 --- a/svx/prj/d.lst +++ b/svx/prj/d.lst @@ -608,6 +608,7 @@ hedabu: ..\inc\ShapeTypeHandler.hxx %_DEST%\inc%_EXT%\svx\ShapeTypeHandler.hxx hedabu: ..\inc\SvxShapeTypes.hxx %_DEST%\inc%_EXT%\svx\SvxShapeTypes.hxx hedabu: ..\inc\DescriptionGenerator.hxx %_DEST%\inc%_EXT%\svx\DescriptionGenerator.hxx hedabu: ..\inc\pgrditem.hxx %_DEST%\inc%_EXT%\svx\pgrditem.hxx +hedabu: ..\inc\writingmodeitem.hxx %_DEST%\inc%_EXT%\svx\writingmodeitem.hxx ..\xml\SvxDrawPage.xml %_DEST%\xml%_EXT%\SvxDrawPage.xml ..\xml\SvxGraphicObject.xml %_DEST%\xml%_EXT%\SvxGraphicObject.xml diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx index 2f7035d4f897..a70e7b18f4e7 100644 --- a/svx/source/svdraw/svdoattr.cxx +++ b/svx/source/svdraw/svdoattr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svdoattr.cxx,v $ * - * $Revision: 1.35 $ + * $Revision: 1.36 $ * - * last change: $Author: cl $ $Date: 2002-04-08 10:36:57 $ + * last change: $Author: cl $ $Date: 2002-04-25 09:58:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -821,7 +821,7 @@ SfxItemSet* SdrAttrObj::CreateNewItemSet(SfxItemPool& rPool) // ranges from SdrAttrObj SDRATTR_START, SDRATTRSET_SHADOW, SDRATTRSET_OUTLINER, SDRATTRSET_MISC, - SDRATTR_TEXTDIRECTION_LEFT_TO_RIGHT, SDRATTR_TEXTDIRECTION_TOP_TO_BOTTOM, + SDRATTR_TEXTDIRECTION, SDRATTR_TEXTDIRECTION, // outliner and end EE_ITEMS_START, EE_ITEMS_END, diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 1dc132337ccb..fd22ab19a7ae 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svdotext.cxx,v $ * - * $Revision: 1.42 $ + * $Revision: 1.43 $ * - * last change: $Author: cl $ $Date: 2002-04-12 12:12:37 $ + * last change: $Author: cl $ $Date: 2002-04-25 09:58:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,6 +74,7 @@ #include "svdglob.hxx" // Stringcache #include "svdstr.hrc" // Objektname #include "svdtxhdl.hxx" // DrawTextToPath +#include "writingmodeitem.hxx" #ifndef _EEITEM_HXX //autogen #include <eeitem.hxx> @@ -1776,7 +1777,7 @@ void SdrTextObj::NbcSetOutlinerParaObject(OutlinerParaObject* pTextObject) if( pOutlinerParaObject ) { ImpForceItemSet(); - mpObjectItemSet->Put( SfxBoolItem( SDRATTR_TEXTDIRECTION_LEFT_TO_RIGHT, !pOutlinerParaObject->IsVertical() ) ); + mpObjectItemSet->Put( SvxWritingModeItem( pOutlinerParaObject->IsVertical() ? com::sun::star::text::WritingMode_TB_RL : com::sun::star::text::WritingMode_LR_TB ) ); } SetTextSizeDirty(); diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx index 0eb8d0753e60..3fad9154a70d 100644 --- a/svx/source/svdraw/svdotxat.cxx +++ b/svx/source/svdraw/svdotxat.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svdotxat.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: aw $ $Date: 2001-12-04 19:26:29 $ + * last change: $Author: cl $ $Date: 2002-04-25 09:58:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -67,6 +67,7 @@ #include "svdorect.hxx" // fuer SetDirty bei NbcAdjustTextFrameWidthAndHeight #include "svdocapt.hxx" // fuer SetDirty bei NbcAdjustTextFrameWidthAndHeight #include <svdetc.hxx> +#include "writingmodeitem.hxx" #ifndef _MyEDITVIEW_HXX #include "editview.hxx" @@ -304,10 +305,14 @@ void SdrTextObj::ItemSetChanged(const SfxItemSet& rSet) void SdrTextObj::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem) { - if( pNewItem && nWhich == SDRATTR_TEXTDIRECTION_LEFT_TO_RIGHT ) + if( pNewItem && nWhich == SDRATTR_TEXTDIRECTION ) { - if( pOutlinerParaObject ) - SetVerticalWriting( !( (SfxBoolItem*) pNewItem )->GetValue() ); + bool bVertical = ( (SvxWritingModeItem*) pNewItem )->GetValue() == com::sun::star::text::WritingMode_TB_RL; + + if( bVertical || pOutlinerParaObject ) + { + SetVerticalWriting( bVertical ); + } } // #95501# reset to default diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 3a0c0eeccc3d..7ac8dd15844a 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unoshape.cxx,v $ * - * $Revision: 1.92 $ + * $Revision: 1.93 $ * - * last change: $Author: cl $ $Date: 2002-03-21 11:28:50 $ + * last change: $Author: cl $ $Date: 2002-04-25 09:54:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1644,16 +1644,6 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const } break; } - case OWN_ATTR_WRITINGMODE: - { - text::WritingMode eMode; - if( pObj && pObj->ISA(SdrTextObj) && (rVal >>= eMode) ) - { - SdrTextObj* pText = (SdrTextObj*)pObj; - pText->SetVerticalWriting( eMode == text::WritingMode_TB_RL ); - return; - } - } case OWN_ATTR_FRAMERECT: { awt::Rectangle aUnoRect; @@ -2031,10 +2021,10 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const } default: { - DBG_ASSERT( pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST, "Not persist item not handled!" ); + DBG_ASSERT( pMap->nWID == SDRATTR_TEXTDIRECTION || pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST, "Not persist item not handled!" ); DBG_ASSERT( pMap->nWID < OWN_ATTR_VALUE_START || pMap->nWID > OWN_ATTR_VALUE_END, "Not item property not handled!" ); - sal_Bool bIsNotPersist = pMap->nWID >= SDRATTR_NOTPERSIST_FIRST && pMap->nWID <= SDRATTR_NOTPERSIST_LAST; + sal_Bool bIsNotPersist = pMap->nWID >= SDRATTR_NOTPERSIST_FIRST && pMap->nWID <= SDRATTR_NOTPERSIST_LAST && pMap->nWID != SDRATTR_TEXTDIRECTION; if( pMap->nWID == SDRATTR_ECKENRADIUS ) { @@ -2265,16 +2255,6 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName ) break; } - case OWN_ATTR_WRITINGMODE: - { - if( pObj && pObj->ISA(SdrTextObj) ) - { - SdrTextObj* pText = (SdrTextObj*)pObj; - text::WritingMode eMode = pText->IsVerticalWriting() ? text::WritingMode_TB_RL : text::WritingMode_LR_TB; - aAny <<= eMode; - break; - } - } case OWN_ATTR_ISFONTWORK: { aAny <<= (sal_Bool)(pObj->ISA(SdrTextObj) && ((SdrTextObj*)pObj)->IsFontwork()); @@ -2545,7 +2525,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName ) } default: { - DBG_ASSERT( pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST, "Not persist item not handled!" ); + DBG_ASSERT( pMap->nWID == SDRATTR_TEXTDIRECTION || (pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST), "Not persist item not handled!" ); DBG_ASSERT( pMap->nWID < OWN_ATTR_VALUE_START || pMap->nWID > OWN_ATTR_VALUE_END, "Not item property not handled!" ); SfxItemSet aSet( pModel->GetItemPool(), pMap->nWID, pMap->nWID); |