#101771# support ctl on ruler

This commit is contained in:
Christian Lippka 2002-09-27 11:32:00 +00:00
parent 8559517841
commit 3914bf7344
3 changed files with 42 additions and 17 deletions

View file

@ -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 ;

View file

@ -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 ||

View file

@ -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 <svx/protitem.hxx>
#endif
#ifndef _SVX_FRMDIRITEM_HXX
#include <svx/frmdiritem.hxx>
#endif
#ifndef _SVX_RULER_HXX
#include <svx/ruler.hxx>
@ -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 );