diff options
author | Dieter Loeschky <dl@openoffice.org> | 2001-02-07 08:15:46 +0000 |
---|---|---|
committer | Dieter Loeschky <dl@openoffice.org> | 2001-02-07 08:15:46 +0000 |
commit | af2c3f8662f696b2d2dbeb9421a988de89814e9f (patch) | |
tree | 64c8cc5082ffb06c16de83357f599935cb6e91fa /sd/source/ui/view/drtxtob1.cxx | |
parent | e7b748b0e987b6a5aebd14626a5c0a0473664983 (diff) |
SID_TEXTDIRECTION... added
Diffstat (limited to 'sd/source/ui/view/drtxtob1.cxx')
-rw-r--r-- | sd/source/ui/view/drtxtob1.cxx | 58 |
1 files changed, 56 insertions, 2 deletions
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index c4802d643741..4010d4da526e 100644 --- a/sd/source/ui/view/drtxtob1.cxx +++ b/sd/source/ui/view/drtxtob1.cxx @@ -2,9 +2,9 @@ * * $RCSfile: drtxtob1.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: dl $ $Date: 2000-11-30 11:24:34 $ + * last change: $Author: dl $ $Date: 2001-02-07 09:14:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -135,6 +135,9 @@ #ifndef _SVX_SRIPTTYPEITEM_HXX //autogen #include <svx/scripttypeitem.hxx> #endif +#ifndef _SVDOUTL_HXX +#include <svx/svdoutl.hxx> +#endif #pragma hdrstop @@ -336,6 +339,57 @@ void SdDrawTextObjectBar::Execute( SfxRequest &rReq ) } break; + case SID_TEXTDIRECTION_LEFT_TO_RIGHT: + case SID_TEXTDIRECTION_TOP_TO_BOTTOM: + { + SdrOutliner* pOutl = pView->GetTextEditOutliner(); + if( pOutl ) + { + if( nSlot == SID_TEXTDIRECTION_LEFT_TO_RIGHT ) + { + if( pOutl->IsVertical() ) + pOutl->SetVertical( FALSE ); + } + else + { + if( !pOutl->IsVertical() ) + pOutl->SetVertical( TRUE ); + } + } + + const SdrMarkList& rMark = pView->GetMarkList(); + SdrObject* pObj = NULL; + OutlinerParaObject* pOPO = 0; + for( ULONG i = 0; i < rMark.GetMarkCount(); i++ ) + { + pObj = rMark.GetMark( i )->GetObj(); + pOPO = pObj->GetOutlinerParaObject(); + if( pOPO ) + { + SdrOutliner* pOutl = pView->GetTextEditOutliner(); + if( nSlot == SID_TEXTDIRECTION_LEFT_TO_RIGHT ) + { + if( pOPO && pOPO->IsVertical() ) + { + pOPO->SetVertical( FALSE ); + pObj->SendRepaintBroadcast(); + } + } + else + { + if( pOPO && !pOPO->IsVertical() ) + { + pOPO->SetVertical( TRUE ); + pObj->SendRepaintBroadcast(); + } + } + } + } + + rReq.Done(); + } + break; + default: { SfxItemSet aEditAttr( pView->GetDoc()->GetPool() ); |