diff options
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/inc/formatsh.hxx | 7 | ||||
-rw-r--r-- | sc/source/ui/src/toolbox.src | 21 | ||||
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 57 | ||||
-rw-r--r-- | sc/source/ui/view/tabview3.cxx | 7 |
4 files changed, 80 insertions, 12 deletions
diff --git a/sc/source/ui/inc/formatsh.hxx b/sc/source/ui/inc/formatsh.hxx index 3a84750155ec..5be6a1202e4c 100644 --- a/sc/source/ui/inc/formatsh.hxx +++ b/sc/source/ui/inc/formatsh.hxx @@ -2,9 +2,9 @@ * * $RCSfile: formatsh.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:44:58 $ + * last change: $Author: dr $ $Date: 2002-04-03 15:10:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -111,6 +111,9 @@ public: void ExecBckCol( SfxRequest& rReq ); void GetBckColState( SfxItemSet& rSet ); + + void ExecuteTextDirection( SfxRequest& rReq ); + void GetTextDirectionState( SfxItemSet& rSet ); }; #endif diff --git a/sc/source/ui/src/toolbox.src b/sc/source/ui/src/toolbox.src index 5b4b140939e2..c11b4e79a6fb 100644 --- a/sc/source/ui/src/toolbox.src +++ b/sc/source/ui/src/toolbox.src @@ -2,9 +2,9 @@ * * $RCSfile: toolbox.src,v $ * - * $Revision: 1.34 $ + * $Revision: 1.35 $ * - * last change: $Author: rt $ $Date: 2001-12-14 17:10:32 $ + * last change: $Author: dr $ $Date: 2002-04-03 15:09:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,7 +62,7 @@ // Toolbox - Resourcen // // (C) 1994 StarDivision GmbH, Hamburg, Germany - // $Author: rt $ $Date: 2001-12-14 17:10:32 $ $Revision: 1.34 $ + // $Author: dr $ $Date: 2002-04-03 15:09:35 $ $Revision: 1.35 $ // $Logfile: T:/sc/source/ui/src/toolbox.srv $ $Workfile: TOOLBOX.SRC $ //================================================================== @@ -824,6 +824,21 @@ ToolBox RID_OBJECTBAR_FORMAT //-------------------------------------------------------------------- ToolBoxItem { + Identifier = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; + HelpID = SID_TEXTDIRECTION_LEFT_TO_RIGHT ; + Hide=TRUE; + }; + ToolBoxItem + { + Identifier = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; + HelpID = SID_TEXTDIRECTION_TOP_TO_BOTTOM ; + Hide=TRUE; + }; + //-------------------------------------------------------------------- + ToolBoxItem { Type = TOOLBOXITEM_SEPARATOR ; }; + //-------------------------------------------------------------------- + ToolBoxItem + { Identifier = SID_NUMBER_CURRENCY ; HelpId = SID_NUMBER_CURRENCY ; }; diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 020345365563..4450fdf358c4 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -2,9 +2,9 @@ * * $RCSfile: formatsh.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: dr $ $Date: 2002-03-07 14:00:17 $ + * last change: $Author: dr $ $Date: 2002-04-03 15:08:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1750,9 +1750,6 @@ void ScFormatShell::GetAlignState( SfxItemSet& rSet ) const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); SfxWhichIter aIter(rSet); USHORT nWhich = aIter.FirstWhich(); - SvxCellHorJustify eHorJustify = SVX_HOR_JUSTIFY_STANDARD; - SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD; - while ( nWhich ) { @@ -1844,4 +1841,54 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) } +void ScFormatShell::ExecuteTextDirection( SfxRequest& rReq ) +{ + ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); + pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox + + USHORT nSlot = rReq.GetSlot(); + switch( nSlot ) + { + case SID_TEXTDIRECTION_LEFT_TO_RIGHT: + case SID_TEXTDIRECTION_TOP_TO_BOTTOM: + { + BOOL bVert = (nSlot == SID_TEXTDIRECTION_TOP_TO_BOTTOM); + SvxCellOrientation eOrient = bVert ? SVX_ORIENTATION_STACKED : SVX_ORIENTATION_STANDARD; + ScPatternAttr aAttr( GetViewData()->GetDocument()->GetPool() ); + SfxItemSet& rItemSet = aAttr.GetItemSet(); + rItemSet.Put( SvxOrientationItem( eOrient, ATTR_ORIENTATION ) ); + rItemSet.Put( SfxBoolItem( ATTR_VERTICAL_ASIAN, bVert ) ); + pTabViewShell->ApplySelectionPattern( aAttr ); + } + break; + } +} + +void ScFormatShell::GetTextDirectionState( SfxItemSet& rSet ) +{ + ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell(); + const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet(); + + BOOL bVertDontCare = (rAttrSet.GetItemState( ATTR_VERTICAL_ASIAN ) == SFX_ITEM_DONTCARE); + BOOL bTopBottom = !bVertDontCare && ((const SfxBoolItem&) rAttrSet.Get( ATTR_VERTICAL_ASIAN )).GetValue(); + BOOL bLeftRight = !bTopBottom && (((const SvxOrientationItem&) rAttrSet.Get( ATTR_ORIENTATION )).GetValue() != SVX_ORIENTATION_STACKED); + + SfxWhichIter aIter( rSet ); + USHORT nWhich = aIter.FirstWhich(); + while( nWhich ) + { + switch( nWhich ) + { + case SID_TEXTDIRECTION_LEFT_TO_RIGHT: + if( !bVertDontCare ) + rSet.Put( SfxBoolItem( nWhich, bLeftRight ) ); + break; + case SID_TEXTDIRECTION_TOP_TO_BOTTOM: + if( !bVertDontCare ) + rSet.Put( SfxBoolItem( nWhich, bTopBottom ) ); + break; + } + nWhich = aIter.NextWhich(); + } +} diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index e2c487b7c088..a1d53a4796bc 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -2,9 +2,9 @@ * * $RCSfile: tabview3.cxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: dr $ $Date: 2002-03-13 11:45:16 $ + * last change: $Author: dr $ $Date: 2002-04-03 15:08:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -330,6 +330,9 @@ void ScTabView::InvalidateAttribs() rBindings.Invalidate( SID_ATTR_ALIGN_LINEBREAK ); rBindings.Invalidate( SID_NUMBER_FORMAT ); + rBindings.Invalidate( SID_TEXTDIRECTION_LEFT_TO_RIGHT ); + rBindings.Invalidate( SID_TEXTDIRECTION_TOP_TO_BOTTOM ); + // rBindings.Invalidate( SID_RANGE_VALUE ); // rBindings.Invalidate( SID_RANGE_FORMULA ); } |