diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-11-26 15:19:48 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-11-26 15:19:48 +0000 |
commit | f13d06d832788a6901c899f1c8b54726e7ca4439 (patch) | |
tree | 00bc5eeff29671cbc68ab0acbbcf7dd3be2ecc24 /chart2/source/controller | |
parent | 60f8b3a3249c2865514a62df516526f8d411f15a (diff) |
CWS-TOOLING: integrate CWS rtlchart01
Diffstat (limited to 'chart2/source/controller')
27 files changed, 398 insertions, 128 deletions
diff --git a/chart2/source/controller/dialogs/Strings.src b/chart2/source/controller/dialogs/Strings.src index 928373f11..df48da195 100644 --- a/chart2/source/controller/dialogs/Strings.src +++ b/chart2/source/controller/dialogs/Strings.src @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: Strings.src,v $ - * $Revision: 1.12 $ + * $Revision: 1.12.72.2 $ * * This file is part of OpenOffice.org. * @@ -549,5 +549,22 @@ String STR_DATA_EDITOR_INCORRECT_INPUT Text [ en-US ] = "Your last input is incorrect.\nIgnore this change and close the dialog?" ; }; +// frame direction ------------------------------------------------------------ + +String STR_TEXT_DIRECTION_LTR +{ + Text [ en-US ] = "Left-to-right"; +}; + +String STR_TEXT_DIRECTION_RTL +{ + Text [ en-US ] = "Right-to-left"; +}; + +String STR_TEXT_DIRECTION_SUPER +{ + Text [ en-US ] = "Use superordinate object settings"; +}; + //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- diff --git a/chart2/source/controller/dialogs/TabPages.hrc b/chart2/source/controller/dialogs/TabPages.hrc index 2907bac09..52be9de99 100644 --- a/chart2/source/controller/dialogs/TabPages.hrc +++ b/chart2/source/controller/dialogs/TabPages.hrc @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: TabPages.hrc,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.20.1 $ * * This file is part of OpenOffice.org. * @@ -35,7 +35,10 @@ //see attrib.hrc in old chart //#define TP_LEGEND_POS 900 -#define GRP_LEGEND 1 +#define GRP_LEGEND 1 +#define FL_LEGEND_TEXTORIENT 2 +#define FT_LEGEND_TEXTDIR 3 +#define LB_LEGEND_TEXTDIR 4 //#define TP_DATA_DESCR 901 @@ -60,6 +63,8 @@ #define CTR_DUMMY 6034 #define FT_DUMMY 6035 #define FL_ALIGN 6037 +#define FT_TEXTDIR 6038 +#define LB_TEXTDIR 6039 /* //Symbol-Tabpage (zum Teil sehr Aehnlich der SVX_AREA_TABPAGE) (obsolete) @@ -123,6 +128,9 @@ #define FL_SEPARATOR 18 +#define FT_AXIS_TEXTDIR 19 +#define LB_AXIS_TEXTDIR 20 + //#define TP_SCALE_Y 903 #define FL_SCALE_Y 1 diff --git a/chart2/source/controller/dialogs/TextDirectionListBox.cxx b/chart2/source/controller/dialogs/TextDirectionListBox.cxx new file mode 100644 index 000000000..d1365b908 --- /dev/null +++ b/chart2/source/controller/dialogs/TextDirectionListBox.cxx @@ -0,0 +1,63 @@ +/************************************************************************* +* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: TextDirectionListBox.cxx,v $ + * $Revision: 1.1.2.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_chart2.hxx" + +#include "TextDirectionListBox.hxx" +#include "ResId.hxx" +#include "Strings.hrc" +#include <svtools/languageoptions.hxx> +#include <vcl/window.hxx> + +namespace chart +{ + +TextDirectionListBox::TextDirectionListBox( Window* pParent, const ResId& rResId, Window* pWindow1, Window* pWindow2 ) : + svx::FrameDirectionListBox( pParent, rResId ) +{ + InsertEntryValue( String( SchResId( STR_TEXT_DIRECTION_LTR ) ), FRMDIR_HORI_LEFT_TOP ); + InsertEntryValue( String( SchResId( STR_TEXT_DIRECTION_RTL ) ), FRMDIR_HORI_RIGHT_TOP ); + InsertEntryValue( String( SchResId( STR_TEXT_DIRECTION_SUPER ) ), FRMDIR_ENVIRONMENT ); + + if( !SvtLanguageOptions().IsCTLFontEnabled() ) + { + Hide(); + if( pWindow1 ) pWindow1->Hide(); + if( pWindow2 ) pWindow2->Hide(); + } +} + +TextDirectionListBox::~TextDirectionListBox() +{ +} + +} //namespace chart + diff --git a/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx b/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx index 0769d1318..79f4bf52d 100644 --- a/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx +++ b/chart2/source/controller/dialogs/dlg_InsertDataLabel.cxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: dlg_InsertDataLabel.cxx,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.72.1 $ * * This file is part of OpenOffice.org. * @@ -47,7 +47,7 @@ DataLabelsDialog::DataLabelsDialog(Window* pWindow, const SfxItemSet& rInAttrs, m_aBtnOK(this, SchResId(BTN_OK)), m_aBtnCancel(this, SchResId(BTN_CANCEL)), m_aBtnHelp(this, SchResId(BTN_HELP)), - m_apDataLabelResources( new DataLabelResources(this,rInAttrs) ), + m_apDataLabelResources( new DataLabelResources(this,rInAttrs,false) ), m_rInAttrs(rInAttrs) { FreeResource(); diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index 74636ea60..9540577cb 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -64,19 +64,15 @@ #include <com/sun/star/chart2/XChartType.hpp> #include <com/sun/star/chart2/XDataSeries.hpp> #include <svtools/intitem.hxx> +#include <svtools/languageoptions.hxx> -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif - #include <svx/drawitem.hxx> #include <svx/ofaitem.hxx> #include <svx/svxgrahicitem.hxx> -#ifndef _SVX_DIALOGS_HRC #include <svx/dialogs.hrc> -#endif #include <svx/flstitem.hxx> #include <svx/tabline.hxx> @@ -145,7 +141,7 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel m_bHasGeometryProperties = ChartTypeHelper::isSupportingGeometryProperties( xChartType, nDimensionCount ); m_bHasAreaProperties = ChartTypeHelper::isSupportingAreaProperties( xChartType, nDimensionCount ); m_bHasSymbolProperties = ChartTypeHelper::isSupportingSymbolProperties( xChartType, nDimensionCount ); - + if( bHasSeriesProperties ) { m_bHasStatisticProperties = ChartTypeHelper::isSupportingStatisticProperties( xChartType, nDimensionCount ); @@ -399,6 +395,11 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent, AddTabPage(RID_SVXPAGE_CHAR_NAME, String(SchResId(STR_PAGE_CHARACTERS))); AddTabPage(RID_SVXPAGE_CHAR_EFFECTS, String(SchResId(STR_PAGE_FONT_EFFECTS))); AddTabPage(RID_SVXPAGE_NUMBERFORMAT, String(SchResId(STR_PAGE_NUMBERS))); + if( SvtLanguageOptions().IsCTLFontEnabled() ) + /* When rotation is supported for equation text boxes, use + SchAlignmentTabPage::Create here. The special + SchAlignmentTabPage::CreateWithoutRotation can be deleted. */ + AddTabPage(TP_ALIGNMENT, String(SchResId(STR_PAGE_ALIGNMENT)), SchAlignmentTabPage::CreateWithoutRotation, NULL); break; } diff --git a/chart2/source/controller/dialogs/hidother.src b/chart2/source/controller/dialogs/hidother.src index 0edf6fd16..d36131f2c 100644 --- a/chart2/source/controller/dialogs/hidother.src +++ b/chart2/source/controller/dialogs/hidother.src @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: hidother.src,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.56.2 $ * * This file is part of OpenOffice.org. * @@ -88,6 +88,9 @@ hidspecial HID_SCH_PB_NUMBERFORMAT {HelpId= HID_SCH_PB_NUMBERFORMAT; }; hidspecial HID_SCH_PB_PERCENT_NUMBERFORMAT {HelpId= HID_SCH_PB_PERCENT_NUMBERFORMAT; }; hidspecial HID_SCH_DATALABEL_SEPARATOR {HelpId= HID_SCH_DATALABEL_SEPARATOR; }; hidspecial HID_SCH_DATALABEL_PLACEMENT {HelpId= HID_SCH_DATALABEL_PLACEMENT; }; +hidspecial HID_SCH_TEXTDIRECTION {HelpId= HID_SCH_TEXTDIRECTION; }; +hidspecial HID_SCH_TEXTDIRECTION_TITLE {HelpId= HID_SCH_TEXTDIRECTION_TITLE; }; +hidspecial HID_SCH_TEXTDIRECTION_EQUATION {HelpId= HID_SCH_TEXTDIRECTION_EQUATION; }; hidspecial HID_SCH_TITLE_MAIN {HelpId= HID_SCH_TITLE_MAIN; }; hidspecial HID_SCH_TITLE_SUB {HelpId= HID_SCH_TITLE_SUB; }; diff --git a/chart2/source/controller/dialogs/makefile.mk b/chart2/source/controller/dialogs/makefile.mk index 06534c3fb..f124a9dc7 100644 --- a/chart2/source/controller/dialogs/makefile.mk +++ b/chart2/source/controller/dialogs/makefile.mk @@ -8,7 +8,7 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.19 $ +# $Revision: 1.19.72.1 $ # # This file is part of OpenOffice.org. # @@ -103,7 +103,8 @@ SLOFILES= \ $(SLO)$/RangeSelectionButton.obj \ $(SLO)$/RangeSelectionHelper.obj \ $(SLO)$/RangeSelectionListener.obj \ - $(SLO)$/RangeEdit.obj + $(SLO)$/RangeEdit.obj \ + $(SLO)$/TextDirectionListBox.obj # --- Resources --------------------------------------------------------------- diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index 3822b8113..ff92fe45f 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: res_DataLabel.cxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.72.1 $ * * This file is part of OpenOffice.org. * @@ -49,17 +49,15 @@ #include <svtools/stritem.hxx> //SfxIntegerListItem #include <svtools/ilstitem.hxx> +#include <svx/eeitem.hxx> +#include <svx/frmdiritem.hxx> // header for define RET_OK #include <vcl/msgbox.hxx> -#ifndef _SVX_SVXIDS_HRC #include <svx/svxids.hrc> -#endif // header for SvNumberFormatter #include <svtools/zforlist.hxx> -#ifndef _SVT_CONTROLDIMS_HRC_ #include <svtools/controldims.hrc> -#endif //............................................................................. @@ -114,7 +112,7 @@ void lcl_setBoolItemToCheckBox( const SfxItemSet& rInAttrs, USHORT nWhichId, Che }//end anonymous namespace -DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAttrs ) +DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAttrs, bool bShowTextDirectionListBox ) : m_aCBNumber(pWindow, SchResId(CB_VALUE_AS_NUMBER)), m_aPB_NumberFormatForValue(pWindow, SchResId(PB_NUMBERFORMAT)), m_aCBPercent(pWindow, SchResId(CB_VALUE_AS_PERCENTAGE)), @@ -124,6 +122,8 @@ DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAt m_aSeparatorResources(pWindow), m_aFT_LabelPlacement(pWindow, SchResId(FT_LABEL_PLACEMENT)), m_aLB_LabelPlacement(pWindow, SchResId(LB_LABEL_PLACEMENT)), + m_aFT_TextDirection(pWindow, SchResId(FT_LABEL_TEXTDIR)), + m_aLB_TextDirection(pWindow, SchResId(LB_LABEL_TEXTDIR), &m_aFT_TextDirection), m_pNumberFormatter(0), m_bNumberFormatMixedState(true), m_bPercentFormatMixedState(true), @@ -146,7 +146,7 @@ DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAt aAvailabelPlacementList =((const SfxIntegerListItem*)pPoolItem)->GetConstSequence(); m_aLB_LabelPlacement.Clear(); - + for( sal_Int32 nN=0; nN<aAvailabelPlacementList.getLength(); ++nN ) { USHORT nListBoxPos = static_cast<USHORT>( nN ); @@ -157,7 +157,7 @@ DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAt } m_aLB_LabelPlacement.SetDropDownLineCount(m_aLB_LabelPlacement.GetEntryCount()); - + Size aPBSize( m_aPB_NumberFormatForPercent.GetSizePixel() ); long nMinWidth = ::std::max( m_aPB_NumberFormatForPercent.CalcMinimumSize().getWidth(), m_aPB_NumberFormatForValue.CalcMinimumSize().getWidth() ); aPBSize.setWidth( nMinWidth+20 );//the min with is to small to fit, hm... so add alittle @@ -166,14 +166,14 @@ DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAt m_aPB_NumberFormatForPercent.SetSizePixel( aPBSize ); long nWantedMinRightBorder = m_aPB_NumberFormatForPercent.GetPosPixel().X() + m_aPB_NumberFormatForPercent.GetSizePixel().Width() - 1; - + Size aSize( m_aFT_LabelPlacement.GetSizePixel() ); aSize.setWidth( m_aFT_LabelPlacement.CalcMinimumSize().getWidth() ); m_aFT_LabelPlacement.SetSizePixel(aSize); Size aControlDistance( pWindow->LogicToPixel( Size(RSC_SP_CTRL_DESC_X,RSC_SP_CTRL_GROUP_Y), MapMode(MAP_APPFONT) ) ); long nWantedMinLeftBorder = m_aFT_LabelPlacement.GetPosPixel().X() + aSize.getWidth () + aControlDistance.Width();; - + m_aSeparatorResources.PositionBelowControl(m_aCBSymbol); m_aSeparatorResources.AlignListBoxWidthAndXPos( nWantedMinLeftBorder, nWantedMinRightBorder, m_aLB_LabelPlacement.CalcMinimumSize().getWidth() ); m_aSeparatorResources.Show(true); @@ -192,6 +192,18 @@ DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAt aPos.Y() += nYDiff; m_aFT_LabelPlacement.SetPosPixel(aPos); + // hide "text direction" listbox is specified by caller + if( !bShowTextDirectionListBox ) + { + m_aFT_TextDirection.Hide(); + m_aLB_TextDirection.Hide(); + } + // move "text direction" listbox down below "label placement" listbox + long nNewY = m_aLB_LabelPlacement.GetPosPixel().Y() + m_aLB_LabelPlacement.GetSizePixel().Height() + aControlDistance.Height(); + nYDiff = nNewY - m_aLB_TextDirection.GetPosPixel().Y(); + m_aFT_TextDirection.SetPosPixel( m_aFT_TextDirection.GetPosPixel() + Point( 0, nYDiff ) ); + m_aLB_TextDirection.SetPosPixel( m_aLB_TextDirection.GetPosPixel() + Point( 0, nYDiff ) ); + m_aPB_NumberFormatForValue.SetClickHdl( LINK( this, DataLabelResources, NumberFormatDialogHdl ) ); m_aPB_NumberFormatForPercent.SetClickHdl( LINK( this, DataLabelResources, NumberFormatDialogHdl ) ); m_aCBNumber.SetClickHdl( LINK( this, DataLabelResources, CheckHdl )); @@ -234,11 +246,11 @@ IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, PushButton *, pButton ) bool& rUseSourceFormat = bPercent ? m_bSourceFormatForPercent : m_bSourceFormatForValue; bool& rbMixedState = bPercent ? m_bPercentFormatMixedState : m_bNumberFormatMixedState; bool& rbSourceMixedState = bPercent ? m_bPercentSourceMixedState : m_bSourceFormatMixedState; - + if(!rbMixedState) aNumberSet.Put( SfxUInt32Item( SID_ATTR_NUMBERFORMAT_VALUE, rnFormatKey )); aNumberSet.Put( SfxBoolItem( SID_ATTR_NUMBERFORMAT_SOURCE, rUseSourceFormat )); - + NumberFormatDialog aDlg(m_pWindow, aNumberSet); if( bPercent ) aDlg.SetText( String( SchResId( STR_DLG_NUMBERFORMAT_FOR_PERCENTAGE_VALUE ) ) ); @@ -250,7 +262,7 @@ IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, PushButton *, pButton ) bool bOldSource = rUseSourceFormat; ULONG nOldFormat = rnFormatKey; bool bOldMixedState = rbMixedState || rbSourceMixedState; - + rbMixedState = !lcl_ReadNumberFormatFromItemSet( *pResult, SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, rnFormatKey, rUseSourceFormat, rbSourceMixedState ); //todo this maybe can be removed when the numberformatter dialog does handle mixed state for source format correctly @@ -283,6 +295,9 @@ void DataLabelResources::EnableControls() if( m_aCBCategory.IsChecked() ) ++nNumberOfCheckedLabelParts; m_aSeparatorResources.Enable( nNumberOfCheckedLabelParts > 1 ); + bool bEnableTextDir = nNumberOfCheckedLabelParts > 0; + m_aFT_TextDirection.Enable( bEnableTextDir ); + m_aLB_TextDirection.Enable( bEnableTextDir ); bool bEnablePlacement = nNumberOfCheckedLabelParts > 0 && m_aLB_LabelPlacement.GetEntryCount()>1; m_aFT_LabelPlacement.Enable( bEnablePlacement ); m_aLB_LabelPlacement.Enable( bEnablePlacement ); @@ -325,7 +340,10 @@ BOOL DataLabelResources::FillItemSet( SfxItemSet& rOutAttrs ) const sal_Int32 nValue = aIt->second; rOutAttrs.Put( SfxInt32Item( SCHATTR_DATADESCR_PLACEMENT, nValue ) ); } - + + if( m_aLB_TextDirection.GetSelectEntryCount() > 0 ) + rOutAttrs.Put( SfxInt32Item( EE_PARA_WRITINGDIR, m_aLB_TextDirection.GetSelectEntryValue() ) ); + return TRUE; } @@ -338,7 +356,7 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs) lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_PERCENTAGE, m_aCBPercent ); lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_CATEGORY, m_aCBCategory ); lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_SYMBOL, m_aCBSymbol ); - + m_bNumberFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, m_nNumberFormatForValue, m_bSourceFormatForValue, m_bSourceFormatMixedState ); m_bPercentFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SCHATTR_PERCENT_NUMBERFORMAT_VALUE, SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, m_nNumberFormatForPercent, m_bSourceFormatForPercent , m_bPercentSourceMixedState); @@ -363,6 +381,8 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs) else m_aLB_LabelPlacement.SetNoSelection(); + if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + m_aLB_TextDirection.SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) ); EnableControls(); } diff --git a/chart2/source/controller/dialogs/res_DataLabel.hxx b/chart2/source/controller/dialogs/res_DataLabel.hxx index ba52b3cc6..cadbf1230 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.hxx +++ b/chart2/source/controller/dialogs/res_DataLabel.hxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: res_DataLabel.hxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.72.1 $ * * This file is part of OpenOffice.org. * @@ -32,11 +32,10 @@ #include "res_TextSeparator.hxx" // header for class CheckBox -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif // header for class SfxItemSet #include <svtools/itemset.hxx> +#include "TextDirectionListBox.hxx" class SvNumberFormatter; @@ -48,14 +47,14 @@ namespace chart class DataLabelResources { public: - DataLabelResources( Window* pParent, const SfxItemSet& rInAttrs ); + DataLabelResources( Window* pParent, const SfxItemSet& rInAttrs, bool bShowTextDirectionListBox ); virtual ~DataLabelResources(); BOOL FillItemSet(SfxItemSet& rOutAttrs) const; void Reset(const SfxItemSet& rInAttrs); void SetNumberFormatter( SvNumberFormatter* pFormatter ); - + private: CheckBox m_aCBNumber; PushButton m_aPB_NumberFormatForValue; @@ -69,6 +68,9 @@ private: FixedText m_aFT_LabelPlacement; ListBox m_aLB_LabelPlacement; + FixedText m_aFT_TextDirection; + TextDirectionListBox m_aLB_TextDirection; + ::std::map< sal_Int32, USHORT > m_aPlacementToListBoxMap; ::std::map< USHORT, sal_Int32 > m_aListBoxToPlacementMap; diff --git a/chart2/source/controller/dialogs/res_DataLabel_IDs.hrc b/chart2/source/controller/dialogs/res_DataLabel_IDs.hrc index 33fb78539..536b35598 100644 --- a/chart2/source/controller/dialogs/res_DataLabel_IDs.hrc +++ b/chart2/source/controller/dialogs/res_DataLabel_IDs.hrc @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: res_DataLabel_IDs.hrc,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.72.1 $ * * This file is part of OpenOffice.org. * @@ -37,5 +37,8 @@ #define PB_PERCENT_NUMBERFORMAT 21 #define FT_LABEL_PLACEMENT 2 - #define LB_LABEL_PLACEMENT 2 + +#define FT_LABEL_TEXTDIR 31 +#define LB_LABEL_TEXTDIR 32 + diff --git a/chart2/source/controller/dialogs/res_DataLabel_tmpl.hrc b/chart2/source/controller/dialogs/res_DataLabel_tmpl.hrc index 89d328ff4..e6d3a79d0 100644 --- a/chart2/source/controller/dialogs/res_DataLabel_tmpl.hrc +++ b/chart2/source/controller/dialogs/res_DataLabel_tmpl.hrc @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: res_DataLabel_tmpl.hrc,v $ - * $Revision: 1.11 $ + * $Revision: 1.11.20.2 $ * * This file is part of OpenOffice.org. * @@ -49,7 +49,7 @@ "Inside" ; \ "Outside" ; \ "Near origin" ; \ - }; + }; #define RESOURCE_DATALABEL( xpos, ypos ) \ @@ -120,6 +120,21 @@ ListBox LB_LABEL_PLACEMENT \ DropDown=TRUE; \ DDExtraWidth = TRUE ; \ WORKAROUND \ +}; \ +FixedText FT_LABEL_TEXTDIR \ +{ \ + Pos = MAP_APPFONT ( xpos , ypos+120 ) ; \ + Size = MAP_APPFONT ( 64 , 8 ) ; \ + Text [ en-US ] = "Te~xt direction" ; \ +}; \ +ListBox LB_LABEL_TEXTDIR \ +{ \ + HelpID = HID_SCH_TEXTDIRECTION; \ + Pos = MAP_APPFONT ( xpos+66 , ypos+118 ) ; \ + Size = MAP_APPFONT ( 170 , 100 ) ; \ + Border = TRUE; \ + TabStop = TRUE; \ + DropDown = TRUE; \ }; #endif diff --git a/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc b/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc index 9fafde132..b0f056763 100644 --- a/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc +++ b/chart2/source/controller/dialogs/res_LegendPosition_tmpl.hrc @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: res_LegendPosition_tmpl.hrc,v $ - * $Revision: 1.7 $ + * $Revision: 1.7.72.1 $ * * This file is part of OpenOffice.org. * @@ -77,4 +77,7 @@ RadioButton RBT_BOTTOM \ TabStop = TRUE ; \ }; +// height of RESOURCE_LEGENDPOSITION - don't forget to update when this is changed +#define RESOURCE_LEGENDPOSITION_HEIGHT 52 + #endif diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index 6c693ecb8..8ae1e8c20 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: tp_AxisLabel.cxx,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.72.1 $ * * This file is part of OpenOffice.org. * @@ -42,6 +42,8 @@ // header for SfxInt32Item #include <svtools/intitem.hxx> +#include <svx/eeitem.hxx> +#include <svx/frmdiritem.hxx> //............................................................................. namespace chart @@ -69,7 +71,10 @@ SchAxisLabelTabPage::SchAxisLabelTabPage( Window* pParent, const SfxItemSet& rIn aFtRotate( this, SchResId( FT_AXIS_LABEL_DEGREES ) ), aNfRotate( this, SchResId( NF_AXIS_LABEL_ORIENT ) ), aCbStacked( this, SchResId( PB_AXIS_LABEL_TEXTSTACKED ) ), - aOrientHlp( this, aCtrlDial, aNfRotate, aCbStacked ), + aOrientHlp( aCtrlDial, aNfRotate, aCbStacked ), + + m_aFtTextDirection( this, SchResId( FT_AXIS_TEXTDIR ) ), + m_aLbTextDirection( this, SchResId( LB_AXIS_TEXTDIR ), &m_aFtTextDirection ), m_bShowStaggeringControls( true ), @@ -149,6 +154,9 @@ BOOL SchAxisLabelTabPage::FillItemSet( SfxItemSet& rOutAttrs ) if( aCbShowDescription.GetState() != STATE_DONTKNOW ) rOutAttrs.Put( SfxBoolItem( SCHATTR_AXIS_SHOWDESCR, aCbShowDescription.IsChecked() ) ); + if( m_aLbTextDirection.GetSelectEntryCount() > 0 ) + rOutAttrs.Put( SfxInt32Item( EE_PARA_WRITINGDIR, m_aLbTextDirection.GetSelectEntryValue() ) ); + return TRUE; } @@ -202,6 +210,9 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) else aOrientHlp.SetStackedState( STATE_DONTKNOW ); + if( rInAttrs.GetItemState( EE_PARA_WRITINGDIR, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + m_aLbTextDirection.SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) ); + // Text overlap ---------- aState = rInAttrs.GetItemState( SCHATTR_TEXT_OVERLAP, FALSE, &pPoolItem ); if( aState == SFX_ITEM_DONTCARE ) @@ -305,6 +316,9 @@ IMPL_LINK ( SchAxisLabelTabPage, ToggleShowLabel, void *, EMPTYARG ) aCbTextOverlap.Enable( bEnable ); aCbTextBreak.Enable( bEnable ); + m_aFtTextDirection.Enable( bEnable ); + m_aLbTextDirection.Enable( bEnable ); + return 0L; } //............................................................................. diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx index b417a0e36..f01eb6adc 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: tp_AxisLabel.hxx,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.72.1 $ * * This file is part of OpenOffice.org. * @@ -31,14 +31,12 @@ #define _CHART2_TP_AXISLABEL_HXX #include <sfx2/tabdlg.hxx> -// header for CheckBox -#ifndef _SV_BUTTON_HXX #include <vcl/button.hxx> -#endif #include <vcl/fixed.hxx> #include <svx/dialcontrol.hxx> #include <svx/wrapfield.hxx> #include <svx/orienthelper.hxx> +#include "TextDirectionListBox.hxx" //............................................................................. namespace chart @@ -72,6 +70,9 @@ private: TriStateBox aCbStacked; svx::OrientationHelper aOrientHlp; + FixedText m_aFtTextDirection; + TextDirectionListBox m_aLbTextDirection; + BOOL m_bShowStaggeringControls; sal_Int32 m_nInitialDegrees; diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.src b/chart2/source/controller/dialogs/tp_AxisLabel.src index c48d6e174..5f7642474 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.src +++ b/chart2/source/controller/dialogs/tp_AxisLabel.src @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: tp_AxisLabel.src,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.72.1 $ * * This file is part of OpenOffice.org. * @@ -49,7 +49,7 @@ TabPage TP_AXIS_LABEL Pos = MAP_APPFONT ( 6 , 91 ) ; Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Rotate text" ; + Text [ en-US ] = "Text orientation" ; }; Control CT_AXIS_LABEL_DIAL { @@ -64,15 +64,12 @@ TabPage TP_AXIS_LABEL Pos = MAP_APPFONT ( 139 , 105 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; TabStop = TRUE ; -// DR: TODO - after OOo 2.0 - enable localized strings -// Text [ de ] = "~Senkrecht gestapelt"; Text [ en-US ] = "Ve~rtically stacked"; }; FixedText FT_AXIS_LABEL_DEGREES { Pos = MAP_APPFONT ( 93 , 122 ) ; Size = MAP_APPFONT ( 60 , 8 ) ; - Text [ en-US ] = "~Degrees" ; }; NumericField NF_AXIS_LABEL_ORIENT @@ -173,42 +170,20 @@ TabPage TP_AXIS_LABEL Text [ en-US ] = "A~utomatic" ; }; -}; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + FixedText FT_AXIS_TEXTDIR + { + Pos = MAP_APPFONT ( 12 , 156 ) ; + Size = MAP_APPFONT ( 64 , 8 ) ; + Text [ en-US ] = "Te~xt direction" ; + }; + ListBox LB_AXIS_TEXTDIR + { + Pos = MAP_APPFONT ( 78 , 154 ) ; + Size = MAP_APPFONT ( 170 , 100 ) ; + Border = TRUE; + TabStop = TRUE; + DropDown = TRUE; + }; +}; diff --git a/chart2/source/controller/dialogs/tp_DataLabel.cxx b/chart2/source/controller/dialogs/tp_DataLabel.cxx index 4aca06e67..35712ebcc 100644 --- a/chart2/source/controller/dialogs/tp_DataLabel.cxx +++ b/chart2/source/controller/dialogs/tp_DataLabel.cxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: tp_DataLabel.cxx,v $ - * $Revision: 1.9 $ + * $Revision: 1.9.72.1 $ * * This file is part of OpenOffice.org. * @@ -42,7 +42,7 @@ namespace chart DataLabelsTabPage::DataLabelsTabPage(Window* pWindow, const SfxItemSet& rInAttrs) : SfxTabPage(pWindow, SchResId(TP_DATA_DESCR), rInAttrs), - m_aDataLabelResources(this, rInAttrs) + m_aDataLabelResources(this, rInAttrs, true) { FreeResource(); } diff --git a/chart2/source/controller/dialogs/tp_DataLabel.hxx b/chart2/source/controller/dialogs/tp_DataLabel.hxx index 986ae4ae2..9e5bd9681 100644 --- a/chart2/source/controller/dialogs/tp_DataLabel.hxx +++ b/chart2/source/controller/dialogs/tp_DataLabel.hxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: tp_DataLabel.hxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.72.1 $ * * This file is part of OpenOffice.org. * diff --git a/chart2/source/controller/dialogs/tp_DataLabel.src b/chart2/source/controller/dialogs/tp_DataLabel.src index 0f0ed0741..de4434759 100644 --- a/chart2/source/controller/dialogs/tp_DataLabel.src +++ b/chart2/source/controller/dialogs/tp_DataLabel.src @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: tp_DataLabel.src,v $ - * $Revision: 1.4 $ + * $Revision: 1.4.72.1 $ * * This file is part of OpenOffice.org. * diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx index d3890fb7a..c2c0ad7e2 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: tp_LegendPosition.cxx,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.72.1 $ * * This file is part of OpenOffice.org. * @@ -37,6 +37,8 @@ #include "chartview/ChartSfxItemIds.hxx" #include "NoWarningThisInCTOR.hxx" #include <svx/chrtitem.hxx> +#include <svx/eeitem.hxx> +#include <svx/frmdiritem.hxx> //............................................................................. namespace chart @@ -48,6 +50,9 @@ SchLegendPosTabPage::SchLegendPosTabPage(Window* pWindow, : SfxTabPage( pWindow, SchResId(TP_LEGEND_POS), rInAttrs ) , aGrpLegend( this, SchResId(GRP_LEGEND) ) , m_apLegendPositionResources( new LegendPositionResources(this) ) + , m_aFlTextOrient( this, SchResId( FL_LEGEND_TEXTORIENT ) ) + , m_aFtTextDirection( this, SchResId( FT_LEGEND_TEXTDIR ) ) + , m_aLbTextDirection( this, SchResId( LB_LEGEND_TEXTDIR ), &m_aFlTextOrient, &m_aFtTextDirection ) { FreeResource(); } @@ -65,12 +70,20 @@ SfxTabPage* SchLegendPosTabPage::Create(Window* pWindow, BOOL SchLegendPosTabPage::FillItemSet(SfxItemSet& rOutAttrs) { m_apLegendPositionResources->writeToItemSet(rOutAttrs); + + if( m_aLbTextDirection.GetSelectEntryCount() > 0 ) + rOutAttrs.Put( SfxInt32Item( EE_PARA_WRITINGDIR, m_aLbTextDirection.GetSelectEntryValue() ) ); + return TRUE; } void SchLegendPosTabPage::Reset(const SfxItemSet& rInAttrs) { m_apLegendPositionResources->initFromItemSet(rInAttrs); + + const SfxPoolItem* pPoolItem = 0; + if( rInAttrs.GetItemState( EE_PARA_WRITINGDIR, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + m_aLbTextDirection.SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) ); } //............................................................................. diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.hxx b/chart2/source/controller/dialogs/tp_LegendPosition.hxx index 5887e67ef..76bef610c 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.hxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.hxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: tp_LegendPosition.hxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.72.1 $ * * This file is part of OpenOffice.org. * @@ -36,6 +36,7 @@ #include <vcl/fixed.hxx> //for auto_ptr #include <memory> +#include "TextDirectionListBox.hxx" //............................................................................. namespace chart @@ -47,9 +48,13 @@ class SchLegendPosTabPage : public SfxTabPage { private: FixedLine aGrpLegend; - + ::std::auto_ptr< LegendPositionResources > m_apLegendPositionResources; + FixedLine m_aFlTextOrient; + FixedText m_aFtTextDirection; + TextDirectionListBox m_aLbTextDirection; + public: SchLegendPosTabPage(Window* pParent, const SfxItemSet& rInAttrs); virtual ~SchLegendPosTabPage(); diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.src b/chart2/source/controller/dialogs/tp_LegendPosition.src index 29692da7c..ac1323bc5 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.src +++ b/chart2/source/controller/dialogs/tp_LegendPosition.src @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: tp_LegendPosition.src,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.72.1 $ * * This file is part of OpenOffice.org. * @@ -44,4 +44,25 @@ TabPage TP_LEGEND_POS Text [ en-US ] = "Position" ; }; RESOURCE_LEGENDPOSITION( 12, 14 ) + + FixedLine FL_LEGEND_TEXTORIENT + { + Pos = MAP_APPFONT ( 6 , 14 + RESOURCE_LEGENDPOSITION_HEIGHT + 6 ) ; + Size = MAP_APPFONT ( 248 , 8 ) ; + Text [ en-US ] = "Text orientation" ; + }; + FixedText FT_LEGEND_TEXTDIR + { + Pos = MAP_APPFONT ( 12 , 14 + RESOURCE_LEGENDPOSITION_HEIGHT + 19 ) ; + Size = MAP_APPFONT ( 64 , 8 ) ; + Text [ en-US ] = "Te~xt direction" ; + }; + ListBox LB_LEGEND_TEXTDIR + { + Pos = MAP_APPFONT ( 78 , 14 + RESOURCE_LEGENDPOSITION_HEIGHT + 17 ) ; + Size = MAP_APPFONT ( 170 , 100 ) ; + Border = TRUE; + TabStop = TRUE; + DropDown = TRUE; + }; }; diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx index 23a5a59e2..6733d9e08 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: tp_TitleRotation.cxx,v $ - * $Revision: 1.11 $ + * $Revision: 1.11.72.2 $ * * This file is part of OpenOffice.org. * @@ -35,6 +35,9 @@ #include "ResId.hxx" #include "TabPages.hrc" #include "chartview/ChartSfxItemIds.hxx" +#include "HelpIds.hrc" +#include <svx/eeitem.hxx> +#include <svx/frmdiritem.hxx> // header for class SfxInt32Item #include <svtools/intitem.hxx> @@ -45,29 +48,47 @@ namespace chart //............................................................................. SchAlignmentTabPage::SchAlignmentTabPage(Window* pWindow, - const SfxItemSet& rInAttrs) : + const SfxItemSet& rInAttrs, bool bWithRotation) : SfxTabPage(pWindow, SchResId(TP_ALIGNMENT), rInAttrs), aFlAlign ( this, SchResId( FL_ALIGN ) ), aCtrlDial ( this, SchResId( CTR_DIAL ) ), aFtRotate ( this, SchResId( FT_DEGREES ) ), aNfRotate ( this, SchResId( NF_ORIENT ) ), aCbStacked ( this, SchResId( BTN_TXTSTACKED ) ), - aOrientHlp ( this, aCtrlDial, aNfRotate, aCbStacked ) + aOrientHlp ( aCtrlDial, aNfRotate, aCbStacked ), + aFtTextDirection( this, SchResId( FT_TEXTDIR ) ), + aLbTextDirection( this, SchResId( LB_TEXTDIR ), &aFtTextDirection ) { FreeResource(); aCbStacked.EnableTriState( FALSE ); aOrientHlp.AddDependentWindow( aFtRotate, STATE_CHECK ); + + if( !bWithRotation ) + { + aOrientHlp.Hide(); + Point aMove( 0, aCtrlDial.GetPosPixel().Y() - aFtTextDirection.GetPosPixel().Y() ); + aFtTextDirection.SetPosPixel( aFtTextDirection.GetPosPixel() + aMove ); + aLbTextDirection.SetPosPixel( aLbTextDirection.GetPosPixel() + aMove ); + + aLbTextDirection.SetHelpId( HID_SCH_TEXTDIRECTION_EQUATION ); + } } SchAlignmentTabPage::~SchAlignmentTabPage() { } -SfxTabPage* SchAlignmentTabPage::Create(Window* pWindow, - const SfxItemSet& rOutAttrs) +SfxTabPage* SchAlignmentTabPage::Create(Window* pParent, + const SfxItemSet& rInAttrs) +{ + return new SchAlignmentTabPage(pParent, rInAttrs); +} + +SfxTabPage* SchAlignmentTabPage::CreateWithoutRotation(Window* pParent, + const SfxItemSet& rInAttrs) { - return new SchAlignmentTabPage(pWindow, rOutAttrs); + return new SchAlignmentTabPage(pParent, rInAttrs, false); } BOOL SchAlignmentTabPage::FillItemSet(SfxItemSet& rOutAttrs) @@ -78,6 +99,10 @@ BOOL SchAlignmentTabPage::FillItemSet(SfxItemSet& rOutAttrs) sal_Int32 nDegrees = bStacked ? 0 : aCtrlDial.GetRotation(); rOutAttrs.Put( SfxInt32Item( SCHATTR_TEXT_DEGREES, nDegrees ) ); + + SvxFrameDirection aDirection( aLbTextDirection.GetSelectEntryValue() ); + rOutAttrs.Put( SfxInt32Item( EE_PARA_WRITINGDIR, aDirection ) ); + return TRUE; } @@ -91,6 +116,10 @@ void SchAlignmentTabPage::Reset(const SfxItemSet& rInAttrs) pItem = GetItem( rInAttrs, SCHATTR_TEXT_STACKED ); bool bStacked = pItem && ((const SfxBoolItem*)pItem)->GetValue(); aOrientHlp.SetStackedState( bStacked ? STATE_CHECK : STATE_NOCHECK ); + + + if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, TRUE, &pItem) == SFX_ITEM_SET) + aLbTextDirection.SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pItem)->GetValue()) ); } //............................................................................. diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.hxx b/chart2/source/controller/dialogs/tp_TitleRotation.hxx index 34bb3db33..fb2081964 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.hxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.hxx @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: tp_TitleRotation.hxx,v $ - * $Revision: 1.9 $ + * $Revision: 1.9.72.1 $ * * This file is part of OpenOffice.org. * @@ -36,6 +36,7 @@ #include <svx/wrapfield.hxx> #include <svx/orienthelper.hxx> #include <vcl/fixed.hxx> +#include "TextDirectionListBox.hxx" //............................................................................. namespace chart @@ -51,12 +52,15 @@ private: svx::WrapField aNfRotate; TriStateBox aCbStacked; svx::OrientationHelper aOrientHlp; + FixedText aFtTextDirection; + TextDirectionListBox aLbTextDirection; public: - SchAlignmentTabPage(Window* pParent, const SfxItemSet& rInAttrs); + SchAlignmentTabPage(Window* pParent, const SfxItemSet& rInAttrs, bool bWithRotation = true); virtual ~SchAlignmentTabPage(); static SfxTabPage* Create(Window* pParent, const SfxItemSet& rInAttrs); + static SfxTabPage* CreateWithoutRotation(Window* pParent, const SfxItemSet& rInAttrs); virtual BOOL FillItemSet(SfxItemSet& rOutAttrs); virtual void Reset(const SfxItemSet& rInAttrs); }; diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.src b/chart2/source/controller/dialogs/tp_TitleRotation.src index f7fc34d10..8d516c13f 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.src +++ b/chart2/source/controller/dialogs/tp_TitleRotation.src @@ -1,13 +1,13 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: tp_TitleRotation.src,v $ - * $Revision: 1.10 $ + * $Revision: 1.10.72.2 $ * * This file is part of OpenOffice.org. * @@ -75,7 +75,22 @@ TabPage TP_ALIGNMENT { Pos = MAP_APPFONT ( 6 , 3 ) ; Size = MAP_APPFONT ( 248 , 8 ) ; - Text [ en-US ] = "Text direction" ; + Text [ en-US ] = "Text orientation" ; + }; + FixedText FT_TEXTDIR + { + Pos = MAP_APPFONT ( 12 , 65 ) ; + Size = MAP_APPFONT ( 64 , 8 ) ; + Text [ en-US ] = "Te~xt direction" ; + }; + ListBox LB_TEXTDIR + { + HelpId = HID_SCH_TEXTDIRECTION_TITLE ; + Pos = MAP_APPFONT ( 78 , 63 ) ; + Size = MAP_APPFONT ( 170 , 100 ) ; + Border = TRUE; + TabStop = TRUE; + DropDown = TRUE; }; }; diff --git a/chart2/source/controller/inc/HelpIds.hrc b/chart2/source/controller/inc/HelpIds.hrc index 872a60d3b..909ea6465 100644 --- a/chart2/source/controller/inc/HelpIds.hrc +++ b/chart2/source/controller/inc/HelpIds.hrc @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: HelpIds.hrc,v $ - * $Revision: 1.8 $ + * $Revision: 1.8.56.2 $ * * This file is part of OpenOffice.org. * @@ -31,7 +31,7 @@ #define CHART_HELPIDS_HRC #include <svtools/solar.hrc> -//next is 115 +//next is 118 //see old chart: schhids.h @@ -141,6 +141,9 @@ #define HID_SCH_PB_PERCENT_NUMBERFORMAT (HID_SCH_START + 89) #define HID_SCH_DATALABEL_SEPARATOR (HID_SCH_START + 90) #define HID_SCH_DATALABEL_PLACEMENT (HID_SCH_START + 91) +#define HID_SCH_TEXTDIRECTION (HID_SCH_START + 115) +#define HID_SCH_TEXTDIRECTION_TITLE (HID_SCH_START + 116) +#define HID_SCH_TEXTDIRECTION_EQUATION (HID_SCH_START + 117) #define HID_SCH_TITLE_MAIN (HID_SCH_START + 80) #define HID_SCH_TITLE_SUB (HID_SCH_START + 81) diff --git a/chart2/source/controller/inc/TextDirectionListBox.hxx b/chart2/source/controller/inc/TextDirectionListBox.hxx new file mode 100644 index 000000000..fdd44069c --- /dev/null +++ b/chart2/source/controller/inc/TextDirectionListBox.hxx @@ -0,0 +1,52 @@ +/************************************************************************* +* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: TextDirectionListBox.hxx,v $ + * $Revision: 1.1.2.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * +************************************************************************/ + +#ifndef CHART2_TEXTDIRECTIONLISTBOX_HXX +#define CHART2_TEXTDIRECTIONLISTBOX_HXX + +#include <svx/frmdirlbox.hxx> + +class Window; + +namespace chart +{ + +class TextDirectionListBox : public svx::FrameDirectionListBox +{ +public: + explicit TextDirectionListBox( Window* pParent, const ResId& rResId, + Window* pWindow1 = 0, Window* pWindow2 = 0 ); + virtual ~TextDirectionListBox(); +}; + +} //namespace chart + +#endif + diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx index 3820174bc..e167c3995 100644 --- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: CharacterPropertyItemConverter.cxx,v $ - * $Revision: 1.14 $ + * $Revision: 1.14.56.1 $ * * This file is part of OpenOffice.org. * @@ -70,6 +70,8 @@ namespace IPM_MAP_ENTRY( EE_CHAR_OUTLINE, "CharContoured", 0 ) IPM_MAP_ENTRY( EE_CHAR_EMPHASISMARK, "CharEmphasis", 0 ) + IPM_MAP_ENTRY( EE_PARA_WRITINGDIR, "WritingMode", 0 ) + // IPM_MAP_ENTRY( EE_CHAR_FONTHEIGHT_CJK, "CharHeightAsian", 0 ) // IPM_MAP_ENTRY( EE_CHAR_FONTHEIGHT_CTL, "CharHeightComplex", 0 ) // IPM_MAP_ENTRY( EE_CHAR_WEIGHT_CJK, "CharWeightAsian", 0 ) |