From 3914bf7344ec5c79e45fa478f0b8fb83262a14bd Mon Sep 17 00:00:00 2001 From: Christian Lippka Date: Fri, 27 Sep 2002 11:32:00 +0000 Subject: [PATCH] #101771# support ctl on ruler --- sd/sdi/_drvwsh.sdi | 10 ++++++-- sd/source/ui/view/drtxtob1.cxx | 6 +++-- sd/source/ui/view/drviews3.cxx | 43 ++++++++++++++++++++++++---------- 3 files changed, 42 insertions(+), 17 deletions(-) diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index c15192b9883c..35ebe13ddd80 100644 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -2,9 +2,9 @@ * * $RCSfile: _drvwsh.sdi,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: mba $ $Date: 2002-08-29 13:18:57 $ + * last change: $Author: cl $ $Date: 2002-09-27 12:27:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1410,6 +1410,12 @@ interface DrawView : View StateMethod = GetRulerState ; ] + SID_RULER_TEXT_RIGHT_TO_LEFT + [ + ExecMethod = ExecRuler ; + StateMethod = GetRulerState ; + ] + SID_ATTR_TABSTOP // ole : no, status : ? [ ExecMethod = ExecRuler ; diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx index 592ffe5d536e..7f668fb0fb21 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.16 $ + * $Revision: 1.17 $ * - * last change: $Author: cl $ $Date: 2002-09-13 10:34:58 $ + * last change: $Author: cl $ $Date: 2002-09-27 12:28:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -594,6 +594,8 @@ void SdDrawTextObjectBar::Execute( SfxRequest &rReq ) rReq.Done( aNewAttr ); pArgs = rReq.GetArgs(); + + Invalidate( SID_RULER_TEXT_RIGHT_TO_LEFT ); } else if ( nSlot == SID_ATTR_CHAR_FONT || nSlot == SID_ATTR_CHAR_FONTHEIGHT || diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index abbae28fdb08..dec96217a537 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -2,9 +2,9 @@ * * $RCSfile: drviews3.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: cl $ $Date: 2002-08-29 14:25:43 $ + * last change: $Author: cl $ $Date: 2002-09-27 12:32:00 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -71,6 +71,9 @@ #ifndef _SVX_PROTITEM_HXX //autogen #include #endif +#ifndef _SVX_FRMDIRITEM_HXX +#include +#endif #ifndef _SVX_RULER_HXX #include @@ -816,28 +819,42 @@ void SdDrawViewShell::GetRulerState(SfxItemSet& rSet) aProtect.SetSizeProtect( TRUE ); aProtect.SetPosProtect( TRUE ); } - } - } - else if( pDrView->IsResizeAllowed(TRUE) ) - { - Rectangle aRect = aMarkRect; - aRect.SetPos(aRect.TopLeft() + aPagePos); - SvxObjectItem aObjItem(aRect.Left(), aRect.Right(), - aRect.Top(), aRect.Bottom()); - rSet.Put(aObjItem); - rSet.DisableItem( ITEMID_TABSTOP ); + if( aEditAttr.GetItemState( EE_PARA_WRITINGDIR ) >= SFX_ITEM_AVAILABLE ) + { + const SvxFrameDirectionItem& rItem = (const SvxFrameDirectionItem&) aEditAttr.Get( EE_PARA_WRITINGDIR ); + + const sal_Bool bRTL = rItem.GetValue() == ::com::sun::star::text::WritingMode_RL_TB; + rSet.Put(SfxBoolItem(SID_RULER_TEXT_RIGHT_TO_LEFT, bRTL)); + } + } } else { - rSet.DisableItem( SID_RULER_OBJECT ); rSet.DisableItem( ITEMID_TABSTOP ); + rSet.DisableItem( SID_RULER_TEXT_RIGHT_TO_LEFT ); + + if( pDrView->IsResizeAllowed(TRUE) ) + { + Rectangle aRect = aMarkRect; + + aRect.SetPos(aRect.TopLeft() + aPagePos); + SvxObjectItem aObjItem(aRect.Left(), aRect.Right(), + aRect.Top(), aRect.Bottom()); + rSet.Put(aObjItem); + rSet.DisableItem( ITEMID_TABSTOP ); + } + else + { + rSet.DisableItem( SID_RULER_OBJECT ); + } } } else { rSet.DisableItem( SID_RULER_OBJECT ); rSet.DisableItem( ITEMID_TABSTOP ); + rSet.DisableItem( SID_RULER_TEXT_RIGHT_TO_LEFT ); } rSet.Put( aLRSpace );