diff options
Diffstat (limited to 'chart2/source/controller/dialogs')
93 files changed, 1293 insertions, 594 deletions
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx index e8984a0e0b4f..1ecca13d84f8 100644 --- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx +++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx @@ -1167,6 +1167,8 @@ void CombiColumnLineChartDialogController::showExtraControls( Window* pParent, c m_pFT_NumberOfLines->Show(); m_pMF_NumberOfLines->Show(); + m_pMF_NumberOfLines->SetAccessibleName(m_pFT_NumberOfLines->GetText()); + m_pMF_NumberOfLines->SetAccessibleRelationLabeledBy(m_pFT_NumberOfLines); } void CombiColumnLineChartDialogController::hideExtraControls() const { diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 85bbc8c82fda..bebbf410a89c 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -48,7 +48,7 @@ #include "ChartModelHelper.hxx" #include "CommonConverters.hxx" #include "macros.hxx" -#include "chartview/NumberFormatterWrapper.hxx" +#include "NumberFormatterWrapper.hxx" #include "servicenames_charttypes.hxx" #include "ResId.hxx" #include "Bitmaps.hrc" @@ -64,6 +64,7 @@ #include <com/sun/star/chart2/XChartType.hpp> #include <com/sun/star/container/XIndexReplace.hpp> +#include <com/sun/star/util/XNumberFormats.hpp> #include <algorithm> #include <functional> @@ -102,7 +103,7 @@ sal_Int32 lcl_getRowInData( long nRow ) return static_cast< sal_Int32 >( nRow ); } -sal_Int32 lcl_getColumnInData( USHORT nCol ) +sal_Int32 lcl_getColumnInData( sal_uInt16 nCol ) { return static_cast< sal_Int32 >( nCol ) - 1; } @@ -237,7 +238,7 @@ SeriesHeader::SeriesHeader( Window * pParent ) : m_spSeriesName->EnableUpdateData( 4 * EDIT_UPDATEDATA_TIMEOUT ); // define is in vcl/edit.hxx m_spSeriesName->SetUpdateDataHdl( LINK( this, SeriesHeader, SeriesNameChanged )); m_spSeriesName->SetModifyHdl( LINK( this, SeriesHeader, SeriesNameEdited )); - m_spSeriesName->SetSmartHelpId( SmartId( HID_SCH_DATA_SERIES_LABEL )); + m_spSeriesName->SetHelpId( HID_SCH_DATA_SERIES_LABEL ); Show(); } @@ -471,13 +472,13 @@ bool lcl_SeriesHeaderHasFocus( } sal_Int32 lcl_getColumnInDataOrHeader( - USHORT nCol, const ::std::vector< ::boost::shared_ptr< ::chart::impl::SeriesHeader > > & rSeriesHeader ) + sal_uInt16 nCol, const ::std::vector< ::boost::shared_ptr< ::chart::impl::SeriesHeader > > & rSeriesHeader ) { sal_Int32 nColIdx = 0; bool bHeaderHasFocus( lcl_SeriesHeaderHasFocus( rSeriesHeader, &nColIdx )); if( bHeaderHasFocus ) - nColIdx = lcl_getColumnInData( static_cast< USHORT >( rSeriesHeader[nColIdx]->GetStartColumn())); + nColIdx = lcl_getColumnInData( static_cast< sal_uInt16 >( rSeriesHeader[nColIdx]->GetStartColumn())); else nColIdx = lcl_getColumnInData( nCol ); @@ -502,7 +503,7 @@ DataBrowser::DataBrowser( Window* pParent, const ResId& rId, bool bLiveUpdate ) double fNan; ::rtl::math::setNan( & fNan ); m_aNumberEditField.SetDefaultValue( fNan ); - m_aNumberEditField.TreatAsNumber( TRUE ); + m_aNumberEditField.TreatAsNumber( sal_True ); RenewTable(); SetClean(); } @@ -578,10 +579,10 @@ void DataBrowser::RenewTable() return; long nOldRow = GetCurRow(); - USHORT nOldColId = GetCurColumnId(); + sal_uInt16 nOldColId = GetCurColumnId(); - BOOL bLastUpdateMode = GetUpdateMode(); - SetUpdateMode( FALSE ); + sal_Bool bLastUpdateMode = GetUpdateMode(); + SetUpdateMode( sal_False ); if( IsModified() ) SaveModified(); @@ -609,7 +610,7 @@ void DataBrowser::RenewTable() RowInserted( 1, nRowCountLocal ); GoToRow( ::std::min( nOldRow, GetRowCount() - 1 )); - GoToColumnId( ::std::min( nOldColId, static_cast< USHORT >( ColCount() - 1 ))); + GoToColumnId( ::std::min( nOldColId, static_cast< sal_uInt16 >( ColCount() - 1 ))); Window * pWin = this->GetParent(); if( !pWin ) @@ -665,7 +666,7 @@ String DataBrowser::GetRowString( sal_Int32 nRow ) const return String::CreateFromInt32( nRow + 1 ); } -String DataBrowser::GetCellText( long nRow, USHORT nColumnId ) const +String DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const { String aResult; @@ -690,6 +691,23 @@ String DataBrowser::GetCellText( long nRow, USHORT nColumnId ) const GetNumberFormatKey( nRow, nColumnId ), fData, nLabelColor, bColorChanged )); } + else if( m_apDataBrowserModel->getCellType( nColIndex, nRow ) == DataBrowserModel::TEXTORDATE ) + { + uno::Any aAny = m_apDataBrowserModel->getCellAny( nColIndex, nRow ); + OUString aText; + double fDouble=0.0; + if( aAny>>=aText ) + aResult = aText; + else if( aAny>>=fDouble ) + { + sal_Int32 nLabelColor; + bool bColorChanged = false; + sal_Int32 nDateNumberFormat = DiagramHelper::getDateNumberFormat( Reference< util::XNumberFormatsSupplier >( m_xChartDoc, uno::UNO_QUERY) ); + if( ! ::rtl::math::isNan( fDouble ) && m_spNumberFormatterWrapper.get() ) + aResult = String( m_spNumberFormatterWrapper->getFormattedString( + nDateNumberFormat, fDouble, nLabelColor, bColorChanged )); + } + } else { OSL_ASSERT( m_apDataBrowserModel->getCellType( nColIndex, nRow ) == DataBrowserModel::TEXT ); @@ -700,7 +718,7 @@ String DataBrowser::GetCellText( long nRow, USHORT nColumnId ) const return aResult; } -double DataBrowser::GetCellNumber( long nRow, USHORT nColumnId ) const +double DataBrowser::GetCellNumber( long nRow, sal_uInt16 nColumnId ) const { double fResult; ::rtl::math::setNan( & fResult ); @@ -717,8 +735,8 @@ double DataBrowser::GetCellNumber( long nRow, USHORT nColumnId ) const void DataBrowser::Resize() { - BOOL bLastUpdateMode = GetUpdateMode(); - SetUpdateMode( FALSE ); + sal_Bool bLastUpdateMode = GetUpdateMode(); + SetUpdateMode( sal_False ); ::svt::EditBrowseBox::Resize(); ImplAdjustHeaderControls(); @@ -848,6 +866,9 @@ void DataBrowser::SetDataFromModel( new NumberFormatterWrapper( Reference< util::XNumberFormatsSupplier >( m_xChartDoc, uno::UNO_QUERY ))); + if( m_spNumberFormatterWrapper.get() ) + m_aNumberEditField.SetFormatter( m_spNumberFormatterWrapper->getSvNumberFormatter() ); + RenewTable(); const sal_Int32 nColCnt = m_apDataBrowserModel->getColumnCount(); @@ -1115,6 +1136,22 @@ sal_uInt32 DataBrowser::GetNumberFormatKey( sal_Int32 nRow, sal_uInt16 nCol ) co return m_apDataBrowserModel->getNumberFormatKey( lcl_getColumnInData( nCol ), lcl_getRowInData( nRow )); } +bool DataBrowser::isDateString( rtl::OUString aInputString, double& fOutDateValue ) +{ + sal_uInt32 nNumberFormat=0; + SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : 0; + if( aInputString.getLength() > 0 && pSvNumberFormatter && pSvNumberFormatter->IsNumberFormat( aInputString, nNumberFormat, fOutDateValue ) ) + { + Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( m_xChartDoc, uno::UNO_QUERY ); + Reference< util::XNumberFormats > xNumberFormats; + if( xNumberFormatsSupplier.is() ) + xNumberFormats = Reference< util::XNumberFormats >( xNumberFormatsSupplier->getNumberFormats() ); + if( DiagramHelper::isDateNumberFormat( nNumberFormat, xNumberFormats ) ) + return true; + } + return false; +} + sal_Bool DataBrowser::SaveModified() { if( ! IsModified() ) @@ -1127,6 +1164,7 @@ sal_Bool DataBrowser::SaveModified() DBG_ASSERT( nRow >= 0 || nCol >= 0, "This cell should not be modified!" ); + SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : 0; switch( m_apDataBrowserModel->getCellType( nCol, nRow )) { case DataBrowserModel::NUMBER: @@ -1136,11 +1174,8 @@ sal_Bool DataBrowser::SaveModified() String aText( m_aNumberEditField.GetText()); // an empty string is valid, if no numberformatter exists, all // values are treated as valid - if( aText.Len() > 0 && - m_spNumberFormatterWrapper.get() && - m_spNumberFormatterWrapper->getSvNumberFormatter() && - ! m_spNumberFormatterWrapper->getSvNumberFormatter()->IsNumberFormat( - aText, nDummy, fDummy )) + if( aText.Len() > 0 && pSvNumberFormatter && + ! pSvNumberFormatter->IsNumberFormat( aText, nDummy, fDummy ) ) { bChangeValid = sal_False; } @@ -1151,6 +1186,17 @@ sal_Bool DataBrowser::SaveModified() } } break; + case DataBrowserModel::TEXTORDATE: + { + OUString aText( m_aTextEditField.GetText() ); + double fDateValue=0.0; + bChangeValid = sal_False; + if( isDateString( aText, fDateValue ) ) + bChangeValid = m_apDataBrowserModel->setCellAny( nCol, nRow, uno::makeAny( fDateValue ) ); + if(!bChangeValid) + bChangeValid = m_apDataBrowserModel->setCellAny( nCol, nRow, uno::makeAny( aText ) ); + } + break; case DataBrowserModel::TEXT: { OUString aText( m_aTextEditField.GetText()); @@ -1191,10 +1237,10 @@ sal_Int16 DataBrowser::GetFirstVisibleColumNumber() const return GetFirstVisibleColNumber(); } -void DataBrowser::ColumnResized( USHORT nColId ) +void DataBrowser::ColumnResized( sal_uInt16 nColId ) { - BOOL bLastUpdateMode = GetUpdateMode(); - SetUpdateMode( FALSE ); + sal_Bool bLastUpdateMode = GetUpdateMode(); + SetUpdateMode( sal_False ); EditBrowseBox::ColumnResized( nColId ); ImplAdjustHeaderControls(); @@ -1203,8 +1249,8 @@ void DataBrowser::ColumnResized( USHORT nColId ) void DataBrowser::EndScroll() { - BOOL bLastUpdateMode = GetUpdateMode(); - SetUpdateMode( FALSE ); + sal_Bool bLastUpdateMode = GetUpdateMode(); + SetUpdateMode( sal_False ); EditBrowseBox::EndScroll(); RenewSeriesHeaders(); @@ -1331,8 +1377,8 @@ IMPL_LINK( DataBrowser, SeriesHeaderChanged, impl::SeriesHeaderEdit*, pEdit ) sal_Int32 DataBrowser::GetTotalWidth() const { - ULONG nWidth = 0; - for ( USHORT nCol = 0; nCol < ColCount(); ++nCol ) + sal_uLong nWidth = 0; + for ( sal_uInt16 nCol = 0; nCol < ColCount(); ++nCol ) nWidth += GetColumnWidth( nCol ); return static_cast< sal_Int32 >( nWidth ); } diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx index 9ebaca3f860e..4f63138cd619 100644 --- a/chart2/source/controller/dialogs/DataBrowser.hxx +++ b/chart2/source/controller/dialogs/DataBrowser.hxx @@ -69,7 +69,7 @@ protected: virtual void CursorMoved(); // called whenever the control of the current cell has been modified virtual void CellModified(); - virtual void ColumnResized( USHORT nColId ); + virtual void ColumnResized( sal_uInt16 nColId ); virtual void EndScroll(); virtual void MouseButtonDown( const BrowserMouseEvent& rEvt ); @@ -87,12 +87,14 @@ public: @return the text out of the cell */ - virtual String GetCellText(long nRow, USHORT nColId) const; + virtual String GetCellText(long nRow, sal_uInt16 nColId) const; /** returns the number in the given cell. If a cell is empty or contains a string, the result will be Nan */ - double GetCellNumber( long nRow, USHORT nColumnId ) const; + double GetCellNumber( long nRow, sal_uInt16 nColumnId ) const; + + bool isDateString( rtl::OUString aInputString, double& fOutDateValue ); // Window virtual void Resize(); diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx index d092d81d7383..f5d9628a1b31 100644 --- a/chart2/source/controller/dialogs/DataBrowserModel.cxx +++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx @@ -44,6 +44,7 @@ #include "ExplicitCategoriesProvider.hxx" #include <com/sun/star/container/XIndexReplace.hpp> +#include <com/sun/star/chart2/XAxis.hpp> #include <com/sun/star/chart2/XDataSeriesContainer.hpp> #include <com/sun/star/chart2/XInternalDataProvider.hpp> #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> @@ -589,7 +590,7 @@ Reference< chart2::XDataSeries > return 0; } -DataBrowserModel::eCellType DataBrowserModel::getCellType( sal_Int32 nAtColumn, sal_Int32 /* nAtRow */ ) +DataBrowserModel::eCellType DataBrowserModel::getCellType( sal_Int32 nAtColumn, sal_Int32 /* nAtRow */ ) const { eCellType eResult = TEXT; tDataColumnVector::size_type nIndex( nAtColumn ); @@ -619,6 +620,26 @@ double DataBrowserModel::getCellNumber( sal_Int32 nAtColumn, sal_Int32 nAtRow ) return fResult; } +uno::Any DataBrowserModel::getCellAny( sal_Int32 nAtColumn, sal_Int32 nAtRow ) +{ + uno::Any aResult; + + tDataColumnVector::size_type nIndex( nAtColumn ); + if( nIndex < m_aColumns.size() && + m_aColumns[ nIndex ].m_xLabeledDataSequence.is()) + { + Reference< chart2::data::XDataSequence > xData( + m_aColumns[ nIndex ].m_xLabeledDataSequence->getValues() ); + if( xData.is() ) + { + Sequence< uno::Any > aValues( xData->getData()); + if( nAtRow < aValues.getLength()) + aResult = aValues[nAtRow]; + } + } + return aResult; +} + OUString DataBrowserModel::getCellText( sal_Int32 nAtColumn, sal_Int32 nAtRow ) { OUString aResult; @@ -800,7 +821,7 @@ void DataBrowserModel::updateFromModel() aCategories.m_aUIRoleName = DialogModel::GetRoleDataLabel(); else aCategories.m_aUIRoleName = lcl_getUIRoleName( xCategories ); - aCategories.m_eCellType = TEXT; + aCategories.m_eCellType = TEXTORDATE; m_aColumns.push_back( aCategories ); ++nHeaderStart; } diff --git a/chart2/source/controller/dialogs/DataBrowserModel.hxx b/chart2/source/controller/dialogs/DataBrowserModel.hxx index 58d64be83a80..ee48fa0d8065 100644 --- a/chart2/source/controller/dialogs/DataBrowserModel.hxx +++ b/chart2/source/controller/dialogs/DataBrowserModel.hxx @@ -82,18 +82,20 @@ public: enum eCellType { NUMBER, - TEXT + TEXT, + TEXTORDATE }; - eCellType getCellType( sal_Int32 nAtColumn, sal_Int32 nAtRow ); + eCellType getCellType( sal_Int32 nAtColumn, sal_Int32 nAtRow ) const; /// If getCellType( nAtColumn, nAtRow ) returns TEXT, the result will be Nan double getCellNumber( sal_Int32 nAtColumn, sal_Int32 nAtRow ); ::rtl::OUString getCellText( sal_Int32 nAtColumn, sal_Int32 nAtRow ); + ::com::sun::star::uno::Any getCellAny( sal_Int32 nAtColumn, sal_Int32 nAtRow ); sal_uInt32 getNumberFormatKey( sal_Int32 nAtColumn, sal_Int32 nAtRow ); - /// returns </TRUE> if the number could successfully be set at the given position + /// returns </sal_True> if the number could successfully be set at the given position bool setCellNumber( sal_Int32 nAtColumn, sal_Int32 nAtRow, double fValue ); - /// returns </TRUE> if the text could successfully be set at the given position + /// returns </sal_True> if the text could successfully be set at the given position bool setCellText( sal_Int32 nAtColumn, sal_Int32 nAtRow, const ::rtl::OUString & rText ); bool setCellAny( sal_Int32 nAtColumn, sal_Int32 nAtRow, const ::com::sun::star::uno::Any & aValue ); diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx index 8a86162061ae..ac2d4fa07129 100644 --- a/chart2/source/controller/dialogs/DialogModel.cxx +++ b/chart2/source/controller/dialogs/DialogModel.cxx @@ -162,7 +162,7 @@ void lcl_createRoleIndexMap( lcl_tRoleIndexMap & rOutMap ) struct lcl_DataSeriesContainerAppend : public ::std::iterator< ::std::output_iterator_tag, Reference< XDataSeriesContainer > > { - typedef ::std::vector< chart::DialogModel::tSeriesWithChartTypeByName > tContainerType; + typedef ::std::vector< ::chart::DialogModel::tSeriesWithChartTypeByName > tContainerType; explicit lcl_DataSeriesContainerAppend( tContainerType & rCnt ) : m_rDestCnt( rCnt ) @@ -182,7 +182,7 @@ struct lcl_DataSeriesContainerAppend : public for( sal_Int32 nI = 0; nI < aSeq.getLength(); ++ nI ) { m_rDestCnt.push_back( - chart::DialogModel::tSeriesWithChartTypeByName( + ::chart::DialogModel::tSeriesWithChartTypeByName( ::chart::DataSeriesHelper::getDataSeriesLabel( aSeq[nI], aRole ), ::std::make_pair( aSeq[nI], xCT ))); } @@ -383,7 +383,6 @@ DialogModel::DialogModel( m_xContext( xContext ), m_aTimerTriggeredControllerLock( uno::Reference< frame::XModel >( m_xChartDocument, uno::UNO_QUERY ) ) { - createBackup(); } DialogModel::~DialogModel() @@ -752,20 +751,6 @@ sal_Int32 DialogModel::GetRoleIndexForSorting( const ::rtl::OUString & rInternal // private methods -void DialogModel::createBackup() -{ - OSL_ENSURE( ! m_xBackupChartDocument.is(), "Cloning already cloned model" ); - try - { - Reference< util::XCloneable > xCloneable( m_xChartDocument, uno::UNO_QUERY_THROW ); - m_xBackupChartDocument.set( xCloneable->createClone(), uno::UNO_QUERY_THROW ); - } - catch( uno::Exception & ex ) - { - ASSERT_EXCEPTION( ex ); - } -} - void DialogModel::applyInterpretedData( const InterpretedData & rNewData, const ::std::vector< Reference< XDataSeries > > & rSeriesToReUse, diff --git a/chart2/source/controller/dialogs/DialogModel.hxx b/chart2/source/controller/dialogs/DialogModel.hxx index 3f79356e8675..8b113311e927 100644 --- a/chart2/source/controller/dialogs/DialogModel.hxx +++ b/chart2/source/controller/dialogs/DialogModel.hxx @@ -164,10 +164,6 @@ private: m_xChartDocument; ::com::sun::star::uno::Reference< - ::com::sun::star::chart2::XChartDocument > - m_xBackupChartDocument; - - ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartTypeTemplate > m_xTemplate; diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx index 86b85c427828..34838abaeee3 100644 --- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx +++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx @@ -41,7 +41,7 @@ #include "AxisIndexDefines.hxx" #include "ExplicitCategoriesProvider.hxx" #include "CommonConverters.hxx" -#include "chartview/NumberFormatterWrapper.hxx" +#include "NumberFormatterWrapper.hxx" #include "RegressionCurveHelper.hxx" #include <rtl/math.hxx> #include <tools/debug.hxx> @@ -192,14 +192,7 @@ OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal if( aX.getLength() == 0 ) { - rtl::OUString aCategory = ::rtl::OUString( String(SchResId(STR_TIP_CATEGORY_VALUE))); - - replaceParamterInString( aCategory - , C2U("%CATEGORYVALUE") - , ExplicitCategoriesProvider::getCategoryByIndex( xCooSys, xChartModel, nPointIndex ) - ); - - aRet = aCategory; + aRet = ExplicitCategoriesProvider::getCategoryByIndex( xCooSys, xChartModel, nPointIndex ); } else { diff --git a/chart2/source/controller/dialogs/Strings.src b/chart2/source/controller/dialogs/Strings.src index cf189b1b82bf..67967140ae71 100644 --- a/chart2/source/controller/dialogs/Strings.src +++ b/chart2/source/controller/dialogs/Strings.src @@ -101,6 +101,15 @@ String STR_PAGE_POSITION Text [ en-US ] = "Position" ; }; +String STR_BUTTON_UP +{ + Text [ en-US ] = "Up"; +}; +String STR_BUTTON_DOWN +{ + Text [ en-US ] = "Down"; +}; + String STR_PAGE_LAYOUT { Text [ en-US ] = "Layout"; @@ -383,11 +392,6 @@ String STR_TIP_DATAPOINT_VALUES Text [ en-US ] = "Values: %POINTVALUES"; }; -String STR_TIP_CATEGORY_VALUE -{ - Text [ en-US ] = "'%CATEGORYVALUE'"; -}; - String STR_TIP_DATAPOINT { Text [ en-US ] = "Data Point %POINTNUMBER, data series %SERIESNUMBER, values: %POINTVALUES"; @@ -458,6 +462,10 @@ String STR_ACTION_NOTPOSSIBLE { Text [ en-US ] = "This function cannot be completed with the selected objects." ; }; +String STR_ACTION_EDIT_TEXT +{ + Text [ en-US ] = "Edit text"; +}; String STR_COLUMN_LABEL { diff --git a/chart2/source/controller/dialogs/Strings_Scale.src b/chart2/source/controller/dialogs/Strings_Scale.src index e7a3d6c2b1cf..6f8b75d9509c 100644 --- a/chart2/source/controller/dialogs/Strings_Scale.src +++ b/chart2/source/controller/dialogs/Strings_Scale.src @@ -42,3 +42,11 @@ String STR_MIN_GREATER_MAX { Text [ en-US ] = "The minimum must be lower than the maximum. Check your input." ; }; +String STR_INVALID_INTERVALS +{ + Text [ en-US ] = "The major interval needs to be greater than the minor interval. Check your input." ; +}; +String STR_INVALID_TIME_UNIT +{ + Text [ en-US ] = "The major and minor interval need to be greater or equal to the resolution. Check your input." ; +}; diff --git a/chart2/source/controller/dialogs/Strings_Statistic.src b/chart2/source/controller/dialogs/Strings_Statistic.src index f2dc4235f783..10c59a4c9b1d 100644 --- a/chart2/source/controller/dialogs/Strings_Statistic.src +++ b/chart2/source/controller/dialogs/Strings_Statistic.src @@ -51,22 +51,22 @@ String STR_CONTROLTEXT_ERROR_BARS_FROM_DATA String STR_REGRESSION_LINEAR { - Text [ en-US ] = "Linear Regression" ; + Text [ en-US ] = "Linear (%SERIESNAME)" ; }; String STR_REGRESSION_LOG { - Text [ en-US ] = "Logarithmic Regression" ; + Text [ en-US ] = "Logarithmic (%SERIESNAME)" ; }; String STR_REGRESSION_EXP { - Text [ en-US ] = "Exponential Regression" ; + Text [ en-US ] = "Exponential (%SERIESNAME)" ; }; String STR_REGRESSION_POWER { - Text [ en-US ] = "Power Regression" ; + Text [ en-US ] = "Power (%SERIESNAME)" ; }; -String STR_STATISTICS_IN_LEGEND +String STR_REGRESSION_MEAN { - Text [ en-US ] = "%REGRESSIONCURVE for %SERIESNAME" ; + Text [ en-US ] = "Mean (%SERIESNAME)" ; }; diff --git a/chart2/source/controller/dialogs/TabPages.hrc b/chart2/source/controller/dialogs/TabPages.hrc index 697f700d4de9..c43ef24cd003 100644 --- a/chart2/source/controller/dialogs/TabPages.hrc +++ b/chart2/source/controller/dialogs/TabPages.hrc @@ -77,28 +77,9 @@ #define FL_SEPARATOR 18 #define FT_AXIS_TEXTDIR 19 #define LB_AXIS_TEXTDIR 20 -#define FL_SCALE 1 - -#define TXT_MIN 1 -#define TXT_MAX 2 -#define TXT_STEP_MAIN 3 -#define TXT_STEP_HELP 4 -#define TXT_ORIGIN 5 - -#define CBX_AUTO_MIN 1 -#define CBX_AUTO_MAX 2 -#define CBX_AUTO_STEP_MAIN 3 -#define CBX_AUTO_STEP_HELP 4 -#define CBX_AUTO_ORIGIN 5 -#define CBX_LOGARITHM 6 -#define CBX_REVERSE 7 - -#define EDT_STEP_MAIN 1 -#define EDT_MAX 2 -#define EDT_MIN 3 -#define EDT_ORIGIN 4 - -#define MT_STEPHELP 10 + +//#define TP_AXIS_POSITIONS 904 + #define FL_AXIS_LINE 1 #define FL_LABELS 2 #define FL_TICKS 3 diff --git a/chart2/source/controller/dialogs/dlg_ChartType.src b/chart2/source/controller/dialogs/dlg_ChartType.src index 5523ad8956db..57e1f281a613 100644 --- a/chart2/source/controller/dialogs/dlg_ChartType.src +++ b/chart2/source/controller/dialogs/dlg_ChartType.src @@ -38,7 +38,7 @@ ModalDialog DLG_DIAGRAM_TYPE { - HelpID = SID_DIAGRAM_TYPE ; + HelpID = HID_DIAGRAM_TYPE ; Size = MAP_APPFONT ( CHART_TYPE_DLG_WIDTH , CHART_TYPE_DLG_HEIGHT ) ; diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx index 31e9d542ec05..d4e7147ac23a 100644 --- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx +++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx @@ -84,7 +84,7 @@ CreationWizard::CreationWizard( Window* pParent, const uno::Reference< frame::XM m_apDialogModel.reset( new DialogModel( m_xChartModel, m_xCC )); // Do not call FreeResource(), because there are no sub-elements defined in // the dialog resource - ShowButtonFixedLine( TRUE ); + ShowButtonFixedLine( sal_True ); defaultButton( WZB_FINISH ); if( m_nOnePageOnlyIndex < 0 || m_nOnePageOnlyIndex >= nPageCount ) @@ -102,7 +102,7 @@ CreationWizard::CreationWizard( Window* pParent, const uno::Reference< frame::XM , STATE_OBJECTS , WZS_INVALID_STATE ); - this->SetRoadmapSmartHelpId( SmartId( HID_SCH_WIZARD_ROADMAP ) ); + this->SetRoadmapHelpId( HID_SCH_WIZARD_ROADMAP ); this->SetRoadmapInteractive( sal_True ); Size aAdditionalRoadmapSize( LogicToPixel( Size( 85, 0 ), MAP_APPFONT ) ); Size aSize( this->GetSizePixel() ); @@ -213,7 +213,7 @@ void CreationWizard::setValidPage( TabPage * /* pTabPage */ ) String CreationWizard::getStateDisplayName( WizardState nState ) const { - USHORT nResId = 0; + sal_uInt16 nResId = 0; switch( nState ) { case STATE_CHARTTYPE: diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx index 8f3502204107..574b464b5dac 100644 --- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx +++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx @@ -186,13 +186,13 @@ void DataEditor::SetReadOnly( bool bReadOnly ) m_bReadOnly = bReadOnly; if( m_bReadOnly ) { - m_aTbxData.EnableItem( TBI_DATA_INSERT_ROW, FALSE ); - m_aTbxData.EnableItem( TBI_DATA_INSERT_COL, FALSE ); - m_aTbxData.EnableItem( TBI_DATA_INSERT_TEXT_COL, FALSE ); - m_aTbxData.EnableItem( TBI_DATA_DELETE_ROW, FALSE ); - m_aTbxData.EnableItem( TBI_DATA_DELETE_COL, FALSE ); - m_aTbxData.EnableItem( TBI_DATA_SWAP_COL, FALSE ); - m_aTbxData.EnableItem( TBI_DATA_SWAP_ROW, FALSE ); + m_aTbxData.EnableItem( TBI_DATA_INSERT_ROW, sal_False ); + m_aTbxData.EnableItem( TBI_DATA_INSERT_COL, sal_False ); + m_aTbxData.EnableItem( TBI_DATA_INSERT_TEXT_COL, sal_False ); + m_aTbxData.EnableItem( TBI_DATA_DELETE_ROW, sal_False ); + m_aTbxData.EnableItem( TBI_DATA_DELETE_COL, sal_False ); + m_aTbxData.EnableItem( TBI_DATA_SWAP_COL, sal_False ); + m_aTbxData.EnableItem( TBI_DATA_SWAP_ROW, sal_False ); } m_apBrwData->SetReadOnly( m_bReadOnly ); @@ -235,12 +235,12 @@ void DataEditor::Resize() AdaptBrowseBoxSize(); } -BOOL DataEditor::Close() +sal_Bool DataEditor::Close() { if( ApplyChangesToModel() ) return ModalDialog::Close(); else - return TRUE; + return sal_True; } bool DataEditor::ApplyChangesToModel() diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.src b/chart2/source/controller/dialogs/dlg_DataEditor.src index 4f4d33ebb832..1bee31dd21fe 100644 --- a/chart2/source/controller/dialogs/dlg_DataEditor.src +++ b/chart2/source/controller/dialogs/dlg_DataEditor.src @@ -36,7 +36,7 @@ ModalDialog DLG_DIAGRAM_DATA { - HelpID = SID_DIAGRAM_DATA ; + HelpID = HID_DIAGRAM_DATA ; OutputSize = TRUE ; Hide = TRUE ; SVLook = TRUE ; diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx index ec72cd6c0381..b90f9a569665 100644 --- a/chart2/source/controller/dialogs/dlg_DataSource.cxx +++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx @@ -147,7 +147,7 @@ void DataSourceTabControl::EnableTabToggling() // ---------------------------------------- -USHORT DataSourceDialog::m_nLastPageId = 0; +sal_uInt16 DataSourceDialog::m_nLastPageId = 0; DataSourceDialog::DataSourceDialog( Window * pParent, @@ -221,7 +221,7 @@ void DataSourceDialog::setInvalidPage( TabPage * pTabPage ) if( ! (m_bRangeChooserTabIsValid && m_bDataSourceTabIsValid )) { - m_aBtnOK.Enable( FALSE ); + m_aBtnOK.Enable( sal_False ); OSL_ASSERT( m_pTabControl ); // note: there seems to be no suitable mechanism to address pages by // identifier, at least it is unclear what the page identifiers are. @@ -243,7 +243,7 @@ void DataSourceDialog::setValidPage( TabPage * pTabPage ) if( m_bRangeChooserTabIsValid && m_bDataSourceTabIsValid ) { - m_aBtnOK.Enable( TRUE ); + m_aBtnOK.Enable( sal_True ); OSL_ASSERT( m_pTabControl ); m_pTabControl->EnableTabToggling(); } diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx index 0ca0a2abc497..7e0bc698f436 100644 --- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx +++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx @@ -64,7 +64,7 @@ InsertAxisOrGridDialogData::InsertAxisOrGridDialogData() //============================== SchAxisDlg::SchAxisDlg( Window* pWindow - , const InsertAxisOrGridDialogData& rInput, BOOL bAxisDlg ) + , const InsertAxisOrGridDialogData& rInput, sal_Bool bAxisDlg ) : ModalDialog( pWindow, SchResId( DLG_AXIS_OR_GRID )), @@ -89,7 +89,7 @@ SchAxisDlg::SchAxisDlg( Window* pWindow FreeResource(); if(!bAxisDlg) { - SetHelpId( SID_INSERT_GRIDS ); + SetHelpId( HID_INSERT_GRIDS ); SetText( ObjectNameProvider::getName(OBJECTTYPE_GRID,true) ); aCbPrimaryX.SetHelpId( HID_SCH_CB_XGRID ); diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src index 91d995b5231c..03faaa4ede45 100644 --- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src +++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.src @@ -33,7 +33,7 @@ ModalDialog DLG_AXIS_OR_GRID { - HelpID = SID_INSERT_AXIS ; + HelpID = HID_INSERT_AXIS ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 160 , 113 ) ; diff --git a/chart2/source/controller/dialogs/dlg_InsertDataLabel.src b/chart2/source/controller/dialogs/dlg_InsertDataLabel.src index 8f8a64485778..24ae2f63fce1 100644 --- a/chart2/source/controller/dialogs/dlg_InsertDataLabel.src +++ b/chart2/source/controller/dialogs/dlg_InsertDataLabel.src @@ -32,7 +32,7 @@ ModalDialog DLG_DATA_DESCR { - HelpID = SID_INSERT_DESCRIPTION ; + HelpID = HID_INSERT_DESCRIPTION ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 316 , 185 ) ; diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx index 78218e2e4ae1..d804d19e3cf8 100644 --- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx +++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx @@ -119,7 +119,7 @@ double InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( pExplicitValueProvider->getExplicitValuesForAxis( xAxis,aExplicitScale, aExplicitIncrement ); fStepWidth = aExplicitIncrement.Distance; - if( aExplicitIncrement.SubIncrements.getLength() && aExplicitIncrement.SubIncrements[0].IntervalCount>0 ) + if( !aExplicitIncrement.SubIncrements.empty() && aExplicitIncrement.SubIncrements[0].IntervalCount>0 ) fStepWidth=fStepWidth/double(aExplicitIncrement.SubIncrements[0].IntervalCount); else fStepWidth/=10; diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.src b/chart2/source/controller/dialogs/dlg_InsertErrorBars.src index f7a61cf1e283..462c81211011 100644 --- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.src +++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.src @@ -33,6 +33,7 @@ ModalDialog DLG_DATA_YERRORBAR { + HelpID = "chart2:ModalDialog:DLG_DATA_YERRORBAR"; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 300 , 156 ) ; diff --git a/chart2/source/controller/dialogs/dlg_InsertLegend.src b/chart2/source/controller/dialogs/dlg_InsertLegend.src index 95a1d5516ab5..1f768f7c065b 100644 --- a/chart2/source/controller/dialogs/dlg_InsertLegend.src +++ b/chart2/source/controller/dialogs/dlg_InsertLegend.src @@ -36,7 +36,7 @@ ModalDialog DLG_LEGEND { - HelpID = SID_INSERT_CHART_LEGEND ; + HelpID = HID_INSERT_CHART_LEGEND ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 156 , 80 ) ; diff --git a/chart2/source/controller/dialogs/dlg_InsertTitle.src b/chart2/source/controller/dialogs/dlg_InsertTitle.src index f84ff2c6acd7..446763e93b9e 100644 --- a/chart2/source/controller/dialogs/dlg_InsertTitle.src +++ b/chart2/source/controller/dialogs/dlg_InsertTitle.src @@ -32,7 +32,7 @@ ModalDialog DLG_TITLE { - HelpID = SID_INSERT_TITLE ; + HelpID = HID_INSERT_TITLE ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 220 , 156 ) ; diff --git a/chart2/source/controller/dialogs/dlg_InsertTrendline.src b/chart2/source/controller/dialogs/dlg_InsertTrendline.src index 24704f0d0c7c..3a866501ef92 100644 --- a/chart2/source/controller/dialogs/dlg_InsertTrendline.src +++ b/chart2/source/controller/dialogs/dlg_InsertTrendline.src @@ -37,7 +37,7 @@ ModalDialog DLG_DATA_TRENDLINE { - HelpID = SID_INSERT_STATISTICS ; + HelpID = HID_INSERT_STATISTICS ; OutputSize = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT( DLG_DATA_TRENDLINE_RES_WIDTH + DLG_DATA_TRENDLINE_ADD_TO_RES, 172 ); diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx index 87533fc9069c..b50398309700 100644 --- a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx +++ b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx @@ -70,7 +70,7 @@ NumberFormatDialog::~NumberFormatDialog() SfxItemSet NumberFormatDialog::CreateEmptyItemSetForNumberFormatDialog( SfxItemPool& rItemPool ) { - static const USHORT nWhichPairs[] = + static const sal_uInt16 nWhichPairs[] = { SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO, SID_ATTR_NUMBERFORMAT_NOLANGUAGE, SID_ATTR_NUMBERFORMAT_NOLANGUAGE, diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx index a7f30165c0c2..54e0a606cd3d 100644 --- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx +++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx @@ -57,9 +57,10 @@ #include "ChartTypeHelper.hxx" #include "ObjectNameProvider.hxx" #include "DiagramHelper.hxx" -#include "chartview/NumberFormatterWrapper.hxx" +#include "NumberFormatterWrapper.hxx" #include "AxisIndexDefines.hxx" #include "AxisHelper.hxx" +#include "ExplicitCategoriesProvider.hxx" #include <com/sun/star/chart2/XAxis.hpp> #include <com/sun/star/chart2/XChartType.hpp> @@ -117,6 +118,7 @@ ObjectPropertiesDialogParameter::ObjectPropertiesDialogParameter( const rtl::OUS , m_bIsCrossingAxisIsCategoryAxis(false) , m_aCategories() , m_xChartDocument( 0 ) + , m_bComplexCategoriesAxis( false ) { rtl::OUString aParticleID = ObjectIdentifier::getParticleID( m_aObjectCID ); m_bAffectsMultipleObjects = aParticleID.equals(C2U("ALLELEMENTS")); @@ -180,7 +182,7 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel ScaleData aData( xAxis->getScaleData() ); if( chart2::AxisType::SERIES == aData.AxisType ) m_bHasScaleProperties = false; - if( chart2::AxisType::REALNUMBER == aData.AxisType || chart2::AxisType::PERCENT == aData.AxisType ) + if( chart2::AxisType::SERIES != aData.AxisType ) m_bHasNumberProperties = true; sal_Int32 nCooSysIndex=0; @@ -207,6 +209,13 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel if( m_bIsCrossingAxisIsCategoryAxis ) m_aCategories = DiagramHelper::getExplicitSimpleCategories( Reference< chart2::XChartDocument >( xChartModel, uno::UNO_QUERY) ); } + + m_bComplexCategoriesAxis = false; + if ( nDimensionIndex == 0 && aData.AxisType == chart2::AxisType::CATEGORY ) + { + ExplicitCategoriesProvider aExplicitCategoriesProvider( xCooSys, xChartModel ); + m_bComplexCategoriesAxis = aExplicitCategoriesProvider.hasComplexCategories(); + } } } @@ -323,8 +332,12 @@ uno::Reference< chart2::XChartDocument > ObjectPropertiesDialogParameter::getDoc { return m_xChartDocument; } +bool ObjectPropertiesDialogParameter::IsComplexCategoriesAxis() const +{ + return m_bComplexCategoriesAxis; +} -const USHORT nNoArrowNoShadowDlg = 1101; +const sal_uInt16 nNoArrowNoShadowDlg = 1101; //------------------------------------------------------------------- //------------------------------------------------------------------- @@ -505,7 +518,7 @@ SchAttribTabDlg::~SchAttribTabDlg() delete m_pAutoSymbolGraphic; } -void SchAttribTabDlg::PageCreated(USHORT nId, SfxTabPage &rPage) +void SchAttribTabDlg::PageCreated(sal_uInt16 nId, SfxTabPage &rPage) { SfxAllItemSet aSet(*(GetInputSetImpl()->GetPool())); switch (nId) @@ -561,6 +574,7 @@ void SchAttribTabDlg::PageCreated(USHORT nId, SfxTabPage &rPage) { bool bShowStaggeringControls = m_pParameter->CanAxisLabelsBeStaggered(); ((SchAxisLabelTabPage&)rPage).ShowStaggeringControls( bShowStaggeringControls ); + ( dynamic_cast< SchAxisLabelTabPage& >( rPage ) ).SetComplexCategories( m_pParameter->IsComplexCategoriesAxis() ); break; } @@ -604,7 +618,7 @@ void SchAttribTabDlg::PageCreated(USHORT nId, SfxTabPage &rPage) break; case RID_SVXPAGE_NUMBERFORMAT: - aSet.Put (SvxNumberInfoItem( m_pNumberFormatter, (const USHORT)SID_ATTR_NUMBERFORMAT_INFO)); + aSet.Put (SvxNumberInfoItem( m_pNumberFormatter, (const sal_uInt16)SID_ATTR_NUMBERFORMAT_INFO)); rPage.PageCreated(aSet); break; diff --git a/chart2/source/controller/dialogs/dlg_ShapeFont.cxx b/chart2/source/controller/dialogs/dlg_ShapeFont.cxx index 3f188aa90bfd..5bf73b537b59 100644 --- a/chart2/source/controller/dialogs/dlg_ShapeFont.cxx +++ b/chart2/source/controller/dialogs/dlg_ShapeFont.cxx @@ -64,7 +64,7 @@ ShapeFontDialog::~ShapeFontDialog() { } -void ShapeFontDialog::PageCreated( USHORT nId, SfxTabPage& rPage ) +void ShapeFontDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage ) { SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) ); switch ( nId ) diff --git a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx index ee43d301255f..b53851f20779 100644 --- a/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx +++ b/chart2/source/controller/dialogs/dlg_ShapeParagraph.cxx @@ -70,7 +70,7 @@ ShapeParagraphDialog::~ShapeParagraphDialog() { } -void ShapeParagraphDialog::PageCreated( USHORT nId, SfxTabPage& rPage ) +void ShapeParagraphDialog::PageCreated( sal_uInt16 nId, SfxTabPage& rPage ) { SfxAllItemSet aSet( *( GetInputSetImpl()->GetPool() ) ); switch ( nId ) diff --git a/chart2/source/controller/dialogs/dlg_View3D.cxx b/chart2/source/controller/dialogs/dlg_View3D.cxx index 11170fa5a466..b852d561764d 100644 --- a/chart2/source/controller/dialogs/dlg_View3D.cxx +++ b/chart2/source/controller/dialogs/dlg_View3D.cxx @@ -57,7 +57,8 @@ using namespace ::com::sun::star::chart2; //----------------------------------------------------------------------------- //------------------------------------------------------------------- //------------------------------------------------------------------- -USHORT View3DDialog::m_nLastPageId = 0; + +sal_uInt16 View3DDialog::m_nLastPageId = 0; View3DDialog::View3DDialog(Window* pParent, const uno::Reference< frame::XModel > & xChartModel, XColorTable* pColorTable ) : TabDialog(pParent,SchResId(DLG_3D_VIEW)) diff --git a/chart2/source/controller/dialogs/dlg_View3D.src b/chart2/source/controller/dialogs/dlg_View3D.src index 0f1fb639d326..02818733b2a9 100644 --- a/chart2/source/controller/dialogs/dlg_View3D.src +++ b/chart2/source/controller/dialogs/dlg_View3D.src @@ -28,10 +28,11 @@ #include "dlg_View3D.hrc" #include "SchSlotIds.hxx" #include "CommonResources.hrc" +#include "HelpIds.hrc" TabDialog DLG_3D_VIEW { - HelpID = SID_3D_VIEW ; + HelpID = HID_3D_VIEW ; OutputSize = TRUE ; SVLook = TRUE ; Moveable = TRUE ; diff --git a/chart2/source/controller/dialogs/hidother.src b/chart2/source/controller/dialogs/hidother.src index 4b006f0f1f93..195115e93bd1 100644 --- a/chart2/source/controller/dialogs/hidother.src +++ b/chart2/source/controller/dialogs/hidother.src @@ -25,9 +25,6 @@ * ************************************************************************/ #include "HelpIds.hrc" -#include "SchSlotIds.hxx" - -hidspecial SID_INSERT_GRIDS {HelpId= SID_INSERT_GRIDS; }; hidspecial HID_SCH_CB_XAXIS {HelpId= HID_SCH_CB_XAXIS; }; hidspecial HID_SCH_CB_YAXIS {HelpId= HID_SCH_CB_YAXIS; }; diff --git a/chart2/source/controller/dialogs/res_BarGeometry.cxx b/chart2/source/controller/dialogs/res_BarGeometry.cxx index 06b8be7a3f6e..45465066db7e 100644 --- a/chart2/source/controller/dialogs/res_BarGeometry.cxx +++ b/chart2/source/controller/dialogs/res_BarGeometry.cxx @@ -47,6 +47,8 @@ BarGeometryResources::BarGeometryResources( Window* pWindow ) { m_aFT_Geometry.SetText( String( SchResId( STR_BAR_GEOMETRY )) ); m_aFT_Geometry.SetSizePixel( m_aFT_Geometry.CalcMinimumSize() ); + m_aLB_Geometry.SetAccessibleName(m_aFT_Geometry.GetText()); + m_aLB_Geometry.SetAccessibleRelationLabeledBy(&m_aFT_Geometry); } void BarGeometryResources::SetPosPixel( const Point& rPosition ) { @@ -91,15 +93,15 @@ void BarGeometryResources::Enable( bool bEnable ) m_aLB_Geometry.Enable( bEnable ); } -USHORT BarGeometryResources::GetSelectEntryCount() const +sal_uInt16 BarGeometryResources::GetSelectEntryCount() const { return m_aLB_Geometry.GetSelectEntryCount(); } -USHORT BarGeometryResources::GetSelectEntryPos() const +sal_uInt16 BarGeometryResources::GetSelectEntryPos() const { return m_aLB_Geometry.GetSelectEntryPos(); } -void BarGeometryResources::SelectEntryPos( USHORT nPos ) +void BarGeometryResources::SelectEntryPos( sal_uInt16 nPos ) { if( nPos < m_aLB_Geometry.GetEntryCount() ) m_aLB_Geometry.SelectEntryPos( nPos ); diff --git a/chart2/source/controller/dialogs/res_BarGeometry.hxx b/chart2/source/controller/dialogs/res_BarGeometry.hxx index cdddd9cfb4ce..07d853d74dca 100644 --- a/chart2/source/controller/dialogs/res_BarGeometry.hxx +++ b/chart2/source/controller/dialogs/res_BarGeometry.hxx @@ -50,9 +50,9 @@ public: void Show( bool bShow ); void Enable( bool bEnable ); - USHORT GetSelectEntryCount() const; - USHORT GetSelectEntryPos() const; - void SelectEntryPos( USHORT nPos ); + sal_uInt16 GetSelectEntryCount() const; + sal_uInt16 GetSelectEntryPos() const; + void SelectEntryPos( sal_uInt16 nPos ); void SetSelectHdl( const Link& rLink ); diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index 27f54002c1d4..e7d3ed750f54 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -66,11 +66,11 @@ namespace chart namespace { -bool lcl_ReadNumberFormatFromItemSet( const SfxItemSet& rSet, USHORT nValueWhich, USHORT nSourceFormatWhich, ULONG& rnFormatKeyOut, bool& rbSourceFormatOut, bool& rbSourceFormatMixedStateOut ) +bool lcl_ReadNumberFormatFromItemSet( const SfxItemSet& rSet, sal_uInt16 nValueWhich, sal_uInt16 nSourceFormatWhich, sal_uLong& rnFormatKeyOut, bool& rbSourceFormatOut, bool& rbSourceFormatMixedStateOut ) { bool bSet = false; const SfxPoolItem *pItem1 = NULL; - if( rSet.GetItemState( nValueWhich, TRUE, &pItem1 ) == SFX_ITEM_SET ) + if( rSet.GetItemState( nValueWhich, sal_True, &pItem1 ) == SFX_ITEM_SET ) { const SfxUInt32Item * pNumItem = dynamic_cast< const SfxUInt32Item * >( pItem1 ); if( pNumItem ) @@ -82,7 +82,7 @@ bool lcl_ReadNumberFormatFromItemSet( const SfxItemSet& rSet, USHORT nValueWhich rbSourceFormatMixedStateOut=true; const SfxPoolItem *pItem2 = NULL; - if( rSet.GetItemState( nSourceFormatWhich, TRUE, &pItem2 ) == SFX_ITEM_SET ) + if( rSet.GetItemState( nSourceFormatWhich, sal_True, &pItem2 ) == SFX_ITEM_SET ) { const SfxBoolItem * pBoolItem = dynamic_cast< const SfxBoolItem * >( pItem2 ); if( pBoolItem ) @@ -94,16 +94,16 @@ bool lcl_ReadNumberFormatFromItemSet( const SfxItemSet& rSet, USHORT nValueWhich return bSet; } -void lcl_setBoolItemToCheckBox( const SfxItemSet& rInAttrs, USHORT nWhichId, CheckBox& rCheckbox ) +void lcl_setBoolItemToCheckBox( const SfxItemSet& rInAttrs, sal_uInt16 nWhichId, CheckBox& rCheckbox ) { - rCheckbox.EnableTriState( FALSE ); + rCheckbox.EnableTriState( sal_False ); const SfxPoolItem *pPoolItem = NULL; - if( rInAttrs.GetItemState(nWhichId, TRUE, &pPoolItem) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState(nWhichId, sal_True, &pPoolItem) == SFX_ITEM_SET ) rCheckbox.Check( ((const SfxBoolItem*)pPoolItem)->GetValue() ); else { - rCheckbox.EnableTriState( TRUE ); + rCheckbox.EnableTriState( sal_True ); rCheckbox.SetState( STATE_DONTKNOW ); } } @@ -141,17 +141,17 @@ DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAt //fill label placement list std::map< sal_Int32, XubString > aPlacementToStringMap; for( sal_Int32 nEnum=0; nEnum<m_aLB_LabelPlacement.GetEntryCount(); ++nEnum ) - aPlacementToStringMap[nEnum]=m_aLB_LabelPlacement.GetEntry(static_cast<USHORT>(nEnum)); + aPlacementToStringMap[nEnum]=m_aLB_LabelPlacement.GetEntry(static_cast<sal_uInt16>(nEnum)); ::com::sun::star::uno::Sequence < sal_Int32 > aAvailabelPlacementList; const SfxPoolItem *pPoolItem = NULL; - if( rInAttrs.GetItemState(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, TRUE, &pPoolItem) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, sal_True, &pPoolItem) == SFX_ITEM_SET ) aAvailabelPlacementList =((const SfxIntegerListItem*)pPoolItem)->GetConstSequence(); m_aLB_LabelPlacement.Clear(); for( sal_Int32 nN=0; nN<aAvailabelPlacementList.getLength(); ++nN ) { - USHORT nListBoxPos = static_cast<USHORT>( nN ); + sal_uInt16 nListBoxPos = static_cast<sal_uInt16>( nN ); sal_Int32 nPlacement = aAvailabelPlacementList[nN]; m_aPlacementToListBoxMap[nPlacement]=nListBoxPos; m_aListBoxToPlacementMap[nListBoxPos]=nPlacement; @@ -213,7 +213,7 @@ DataLabelResources::DataLabelResources( Window* pWindow, const SfxItemSet& rInAt 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); - if( rInAttrs.GetItemState(SCHATTR_DATADESCR_NO_PERCENTVALUE, TRUE, &pPoolItem) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState(SCHATTR_DATADESCR_NO_PERCENTVALUE, sal_True, &pPoolItem) == SFX_ITEM_SET ) { bool bForbidPercentValue = (static_cast< const SfxBoolItem & >( rInAttrs.Get( SCHATTR_DATADESCR_NO_PERCENTVALUE )).GetValue() ); if( bForbidPercentValue ) @@ -246,11 +246,11 @@ IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, PushButton *, pButton ) m_aCBPercent.Check(); SfxItemSet aNumberSet = NumberFormatDialog::CreateEmptyItemSetForNumberFormatDialog( *m_pPool ); - aNumberSet.Put (SvxNumberInfoItem( m_pNumberFormatter, (const USHORT)SID_ATTR_NUMBERFORMAT_INFO)); + aNumberSet.Put (SvxNumberInfoItem( m_pNumberFormatter, (const sal_uInt16)SID_ATTR_NUMBERFORMAT_INFO)); bool bPercent = ( pButton == &m_aPB_NumberFormatForPercent ); - ULONG& rnFormatKey = bPercent ? m_nNumberFormatForPercent : m_nNumberFormatForValue; + sal_uLong& rnFormatKey = bPercent ? m_nNumberFormatForPercent : m_nNumberFormatForValue; bool& rUseSourceFormat = bPercent ? m_bSourceFormatForPercent : m_bSourceFormatForValue; bool& rbMixedState = bPercent ? m_bPercentFormatMixedState : m_bNumberFormatMixedState; bool& rbSourceMixedState = bPercent ? m_bPercentSourceMixedState : m_bSourceFormatMixedState; @@ -268,7 +268,7 @@ IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, PushButton *, pButton ) if( pResult ) { bool bOldSource = rUseSourceFormat; - ULONG nOldFormat = rnFormatKey; + sal_uLong nOldFormat = rnFormatKey; bool bOldMixedState = rbMixedState || rbSourceMixedState; rbMixedState = !lcl_ReadNumberFormatFromItemSet( *pResult, SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, rnFormatKey, rUseSourceFormat, rbSourceMixedState ); @@ -284,7 +284,7 @@ IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, PushButton *, pButton ) IMPL_LINK( DataLabelResources, CheckHdl, CheckBox*, pBox ) { if( pBox ) - pBox->EnableTriState( FALSE ); + pBox->EnableTriState( sal_False ); EnableControls(); return 0; } @@ -321,7 +321,7 @@ void DataLabelResources::EnableControls() m_aNF_Degrees.Enable( bEnableRotation ); } -BOOL DataLabelResources::FillItemSet( SfxItemSet& rOutAttrs ) const +sal_Bool DataLabelResources::FillItemSet( SfxItemSet& rOutAttrs ) const { if( m_aCBNumber.IsChecked() ) { @@ -348,7 +348,7 @@ BOOL DataLabelResources::FillItemSet( SfxItemSet& rOutAttrs ) const rOutAttrs.Put( SfxBoolItem( SCHATTR_DATADESCR_SHOW_SYMBOL, m_aCBSymbol.IsChecked()) ); rOutAttrs.Put( SfxStringItem( SCHATTR_DATADESCR_SEPARATOR, m_aSeparatorResources.GetValue() ) ); - ::std::map< USHORT, sal_Int32 >::const_iterator aIt( m_aListBoxToPlacementMap.find(m_aLB_LabelPlacement.GetSelectEntryPos()) ); + ::std::map< sal_uInt16, sal_Int32 >::const_iterator aIt( m_aListBoxToPlacementMap.find(m_aLB_LabelPlacement.GetSelectEntryPos()) ); if(aIt!=m_aListBoxToPlacementMap.end()) { sal_Int32 nValue = aIt->second; @@ -364,13 +364,13 @@ BOOL DataLabelResources::FillItemSet( SfxItemSet& rOutAttrs ) const rOutAttrs.Put(SfxInt32Item( SCHATTR_TEXT_DEGREES, nDegrees ) ); } - return TRUE; + return sal_True; } void DataLabelResources::Reset(const SfxItemSet& rInAttrs) { // default state - m_aCBSymbol.Enable( FALSE ); + m_aCBSymbol.Enable( sal_False ); lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_NUMBER, m_aCBNumber ); lcl_setBoolItemToCheckBox( rInAttrs, SCHATTR_DATADESCR_SHOW_PERCENTAGE, m_aCBPercent ); @@ -381,18 +381,18 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs) m_bPercentFormatMixedState = !lcl_ReadNumberFormatFromItemSet( rInAttrs, SCHATTR_PERCENT_NUMBERFORMAT_VALUE, SCHATTR_PERCENT_NUMBERFORMAT_SOURCE, m_nNumberFormatForPercent, m_bSourceFormatForPercent , m_bPercentSourceMixedState); const SfxPoolItem *pPoolItem = NULL; - if( rInAttrs.GetItemState(SCHATTR_DATADESCR_SEPARATOR, TRUE, &pPoolItem) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState(SCHATTR_DATADESCR_SEPARATOR, sal_True, &pPoolItem) == SFX_ITEM_SET ) m_aSeparatorResources.SetValue( ((const SfxStringItem*)pPoolItem)->GetValue() ); else m_aSeparatorResources.SetDefault(); - if( rInAttrs.GetItemState(SCHATTR_DATADESCR_PLACEMENT, TRUE, &pPoolItem) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState(SCHATTR_DATADESCR_PLACEMENT, sal_True, &pPoolItem) == SFX_ITEM_SET ) { sal_Int32 nPlacement = ((const SfxInt32Item*)pPoolItem)->GetValue(); - ::std::map< sal_Int32, USHORT >::const_iterator aIt( m_aPlacementToListBoxMap.find(nPlacement) ); + ::std::map< sal_Int32, sal_uInt16 >::const_iterator aIt( m_aPlacementToListBoxMap.find(nPlacement) ); if(aIt!=m_aPlacementToListBoxMap.end()) { - USHORT nPos = aIt->second; + sal_uInt16 nPos = aIt->second; m_aLB_LabelPlacement.SelectEntryPos( nPos ); } else @@ -401,10 +401,10 @@ void DataLabelResources::Reset(const SfxItemSet& rInAttrs) else m_aLB_LabelPlacement.SetNoSelection(); - if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, sal_True, &pPoolItem ) == SFX_ITEM_SET ) m_aLB_TextDirection.SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) ); - if( rInAttrs.GetItemState( SCHATTR_TEXT_DEGREES, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState( SCHATTR_TEXT_DEGREES, sal_True, &pPoolItem ) == SFX_ITEM_SET ) { sal_Int32 nDegrees = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); m_aDC_Dial.SetRotation( nDegrees ); diff --git a/chart2/source/controller/dialogs/res_DataLabel.hxx b/chart2/source/controller/dialogs/res_DataLabel.hxx index 525d52b8da3b..f8b56fb9e855 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.hxx +++ b/chart2/source/controller/dialogs/res_DataLabel.hxx @@ -50,7 +50,7 @@ public: DataLabelResources( Window* pParent, const SfxItemSet& rInAttrs ); virtual ~DataLabelResources(); - BOOL FillItemSet(SfxItemSet& rOutAttrs) const; + sal_Bool FillItemSet(SfxItemSet& rOutAttrs) const; void Reset(const SfxItemSet& rInAttrs); void SetNumberFormatter( SvNumberFormatter* pFormatter ); @@ -76,14 +76,14 @@ private: FixedText m_aFT_TextDirection; TextDirectionListBox m_aLB_TextDirection; - ::std::map< sal_Int32, USHORT > m_aPlacementToListBoxMap; - ::std::map< USHORT, sal_Int32 > m_aListBoxToPlacementMap; + ::std::map< sal_Int32, sal_uInt16 > m_aPlacementToListBoxMap; + ::std::map< sal_uInt16, sal_Int32 > m_aListBoxToPlacementMap; SvNumberFormatter* m_pNumberFormatter; bool m_bNumberFormatMixedState; bool m_bPercentFormatMixedState; - ULONG m_nNumberFormatForValue; - ULONG m_nNumberFormatForPercent; + sal_uLong m_nNumberFormatForValue; + sal_uLong m_nNumberFormatForPercent; bool m_bSourceFormatMixedState; bool m_bPercentSourceMixedState; diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index 1cd110439e7f..9a645ab0cf4b 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -51,8 +51,8 @@ void lcl_enableRangeChoosing( bool bEnable, Dialog * pDialog ) { if( pDialog ) { - pDialog->Show( bEnable ? FALSE : TRUE ); - pDialog->SetModalInputMode( bEnable ? FALSE : TRUE ); + pDialog->Show( bEnable ? sal_False : sal_True ); + pDialog->SetModalInputMode( bEnable ? sal_False : sal_True ); } } @@ -158,7 +158,7 @@ ErrorBarResources::ErrorBarResources( Window* pParent, Dialog * pParentDialog, m_aRbRange.SetClickHdl( LINK( this, ErrorBarResources, CategoryChosen )); m_aLbFunction.SetSelectHdl( LINK( this, ErrorBarResources, CategoryChosen )); - m_aCbSyncPosNeg.Check( FALSE ); + m_aCbSyncPosNeg.Check( sal_False ); m_aCbSyncPosNeg.SetToggleHdl( LINK( this, ErrorBarResources, SynchronizePosAndNeg )); m_aMfPositive.SetModifyHdl( LINK( this, ErrorBarResources, PosValueChanged )); @@ -470,12 +470,12 @@ IMPL_LINK( ErrorBarResources, ChooseRange, RangeSelectionButton *, pButton ) if( pButton == &m_aIbRangePositive ) { m_pCurrentRangeChoosingField = &m_aEdRangePositive; - aUIString = ::rtl::OUString( String( SchResId( STR_DATA_SELECT_RANGE_FOR_POSITIVE_ERRORBARS ))); + aUIString = String( SchResId( STR_DATA_SELECT_RANGE_FOR_POSITIVE_ERRORBARS )); } else { m_pCurrentRangeChoosingField = &m_aEdRangeNegative; - aUIString = ::rtl::OUString( String( SchResId( STR_DATA_SELECT_RANGE_FOR_NEGATIVE_ERRORBARS ))); + aUIString = String( SchResId( STR_DATA_SELECT_RANGE_FOR_NEGATIVE_ERRORBARS )); } OSL_ASSERT( m_pParentDialog ); @@ -516,7 +516,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) // category m_eErrorKind = CHERROR_NONE; - aState = rInAttrs.GetItemState( SCHATTR_STAT_KIND_ERROR, TRUE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_STAT_KIND_ERROR, sal_True, &pPoolItem ); m_bErrorKindUnique = ( aState != SFX_ITEM_DONTCARE ); if( aState == SFX_ITEM_SET ) @@ -550,14 +550,14 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) } else { - m_aRbNone.Check( FALSE ); - m_aRbConst.Check( FALSE ); - m_aRbPercent.Check( FALSE ); - m_aRbFunction.Check( FALSE ); + m_aRbNone.Check( sal_False ); + m_aRbConst.Check( sal_False ); + m_aRbPercent.Check( sal_False ); + m_aRbFunction.Check( sal_False ); } // parameters - aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTPLUS, TRUE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTPLUS, sal_True, &pPoolItem ); m_bPlusUnique = ( aState != SFX_ITEM_DONTCARE ); double fPlusValue = 0.0; if( aState == SFX_ITEM_SET ) @@ -567,7 +567,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) m_aMfPositive.SetValue( nPlusValue ); } - aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTMINUS, TRUE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTMINUS, sal_True, &pPoolItem ); m_bMinusUnique = ( aState != SFX_ITEM_DONTCARE ); if( aState == SFX_ITEM_SET ) { @@ -581,7 +581,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) } // indicator - aState = rInAttrs.GetItemState( SCHATTR_STAT_INDICATE, TRUE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_STAT_INDICATE, sal_True, &pPoolItem ); m_bIndicatorUnique = ( aState != SFX_ITEM_DONTCARE ); if( aState == SFX_ITEM_SET) m_eIndicate = ((const SvxChartIndicateItem * ) pPoolItem)->GetValue(); @@ -604,13 +604,13 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) } else { - m_aRbBoth.Check( FALSE ); - m_aRbPositive.Check( FALSE ); - m_aRbNegative.Check( FALSE ); + m_aRbBoth.Check( sal_False ); + m_aRbPositive.Check( sal_False ); + m_aRbNegative.Check( sal_False ); } // ranges - aState = rInAttrs.GetItemState( SCHATTR_STAT_RANGE_POS, TRUE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_STAT_RANGE_POS, sal_True, &pPoolItem ); m_bRangePosUnique = ( aState != SFX_ITEM_DONTCARE ); if( aState == SFX_ITEM_SET ) { @@ -618,7 +618,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) m_aEdRangePositive.SetText( sRangePositive ); } - aState = rInAttrs.GetItemState( SCHATTR_STAT_RANGE_NEG, TRUE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_STAT_RANGE_NEG, sal_True, &pPoolItem ); m_bRangeNegUnique = ( aState != SFX_ITEM_DONTCARE ); if( aState == SFX_ITEM_SET ) { @@ -633,7 +633,7 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) UpdateControlStates(); } -BOOL ErrorBarResources::FillItemSet(SfxItemSet& rOutAttrs) const +sal_Bool ErrorBarResources::FillItemSet(SfxItemSet& rOutAttrs) const { if( m_bErrorKindUnique ) rOutAttrs.Put( SvxChartKindErrorItem( m_eErrorKind, SCHATTR_STAT_KIND_ERROR )); @@ -686,7 +686,7 @@ BOOL ErrorBarResources::FillItemSet(SfxItemSet& rOutAttrs) const } } - return TRUE; + return sal_True; } void ErrorBarResources::FillValueSets() diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx index 33f02c442f1b..6d99a2fbea3c 100644 --- a/chart2/source/controller/dialogs/res_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx @@ -40,13 +40,12 @@ #include <svtools/controldims.hrc> #include <com/sun/star/chart2/LegendPosition.hpp> -#include <com/sun/star/chart2/LegendExpansion.hpp> +#include <com/sun/star/chart/ChartLegendExpansion.hpp> //itemset stuff #include "chartview/ChartSfxItemIds.hxx" -#include <svx/chrtitem.hxx> -// header for class SfxItemPool -#include <svl/itempool.hxx> +#include <svl/intitem.hxx> +#include <svl/eitem.hxx> //............................................................................. namespace chart @@ -60,8 +59,8 @@ LegendPositionResources::LegendPositionResources( Window* pWindow ) : m_xCC() //unused in this scenario , m_aCbxShow( pWindow ) //unused in this scenario , m_aRbtLeft( pWindow, SchResId(RBT_LEFT) ) - , m_aRbtTop( pWindow, SchResId(RBT_TOP) ) , m_aRbtRight( pWindow, SchResId(RBT_RIGHT) ) + , m_aRbtTop( pWindow, SchResId(RBT_TOP) ) , m_aRbtBottom( pWindow, SchResId(RBT_BOTTOM) ) { m_aCbxShow.Check();//legend is assumed to be visible in this scenario @@ -72,12 +71,17 @@ LegendPositionResources::LegendPositionResources( Window* pWindow, const uno::Re : m_xCC( xCC ) , m_aCbxShow( pWindow, SchResId(CBX_SHOWLEGEND) ) , m_aRbtLeft( pWindow, SchResId(RBT_LEFT) ) - , m_aRbtTop( pWindow, SchResId(RBT_TOP) ) , m_aRbtRight( pWindow, SchResId(RBT_RIGHT) ) + , m_aRbtTop( pWindow, SchResId(RBT_TOP) ) , m_aRbtBottom( pWindow, SchResId(RBT_BOTTOM) ) { m_aCbxShow.SetToggleHdl( LINK( this, LegendPositionResources, PositionEnableHdl ) ); impl_setRadioButtonToggleHdl(); + m_aCbxShow.SetAccessibleRelationMemberOf(&m_aCbxShow); + m_aRbtLeft.SetAccessibleRelationMemberOf(&m_aCbxShow); + m_aRbtRight.SetAccessibleRelationMemberOf(&m_aCbxShow); + m_aRbtTop.SetAccessibleRelationMemberOf(&m_aCbxShow); + m_aRbtBottom.SetAccessibleRelationMemberOf(&m_aCbxShow); } void LegendPositionResources::impl_setRadioButtonToggleHdl() @@ -150,7 +154,7 @@ void LegendPositionResources::writeToModel( const ::com::sun::star::uno::Referen //position chart2::LegendPosition eNewPos; - chart2::LegendExpansion eExp = chart2::LegendExpansion_HIGH; + ::com::sun::star::chart::ChartLegendExpansion eExp = ::com::sun::star::chart::ChartLegendExpansion_HIGH; if( m_aRbtLeft.IsChecked() ) eNewPos = chart2::LegendPosition_LINE_START; @@ -161,12 +165,12 @@ void LegendPositionResources::writeToModel( const ::com::sun::star::uno::Referen else if( m_aRbtTop.IsChecked() ) { eNewPos = chart2::LegendPosition_PAGE_START; - eExp = chart2::LegendExpansion_WIDE; + eExp = ::com::sun::star::chart::ChartLegendExpansion_WIDE; } else if( m_aRbtBottom.IsChecked() ) { eNewPos = chart2::LegendPosition_PAGE_END; - eExp = chart2::LegendExpansion_WIDE; + eExp = ::com::sun::star::chart::ChartLegendExpansion_WIDE; } xProp->setPropertyValue( C2U( "AnchorPosition" ), uno::makeAny( eNewPos )); @@ -182,7 +186,7 @@ void LegendPositionResources::writeToModel( const ::com::sun::star::uno::Referen IMPL_LINK( LegendPositionResources, PositionEnableHdl, void*, EMPTYARG ) { - BOOL bEnable = m_aCbxShow.IsChecked(); + sal_Bool bEnable = m_aCbxShow.IsChecked(); m_aRbtLeft.Enable( bEnable ); m_aRbtTop.Enable( bEnable ); @@ -196,51 +200,50 @@ IMPL_LINK( LegendPositionResources, PositionEnableHdl, void*, EMPTYARG ) void LegendPositionResources::initFromItemSet( const SfxItemSet& rInAttrs ) { - SvxChartLegendPos ePos = CHLEGEND_NONE; - const SfxPoolItem* pPoolItem = NULL; - if( rInAttrs.GetItemState( SCHATTR_LEGEND_POS, - TRUE, &pPoolItem ) != SFX_ITEM_SET ) - pPoolItem = &(rInAttrs.GetPool()->GetDefaultItem( SCHATTR_LEGEND_POS )); - - if( pPoolItem ) - ePos = ((const SvxChartLegendPosItem*)pPoolItem)->GetValue(); + if( rInAttrs.GetItemState( SCHATTR_LEGEND_POS, sal_True, &pPoolItem ) == SFX_ITEM_SET ) + { + sal_Int32 nLegendPosition = ((const SfxInt32Item*)pPoolItem)->GetValue(); + switch( nLegendPosition ) + { + case chart2::LegendPosition_LINE_START: + m_aRbtLeft.Check(sal_True); + break; + case chart2::LegendPosition_PAGE_START: + m_aRbtTop.Check(sal_True); + break; + case chart2::LegendPosition_LINE_END: + m_aRbtRight.Check(sal_True); + break; + case chart2::LegendPosition_PAGE_END: + m_aRbtBottom.Check(sal_True); + break; + default: + break; + } + } - switch( ePos ) + if( rInAttrs.GetItemState( SCHATTR_LEGEND_SHOW, sal_True, &pPoolItem ) == SFX_ITEM_SET ) { - case CHLEGEND_LEFT: - m_aRbtLeft.Check(TRUE); - break; - case CHLEGEND_TOP: - m_aRbtTop.Check(TRUE); - break; - case CHLEGEND_RIGHT: - m_aRbtRight.Check(TRUE); - break; - case CHLEGEND_BOTTOM: - m_aRbtBottom.Check(TRUE); - break; - default: - break; + bool bShow = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); + m_aCbxShow.Check(bShow); } } void LegendPositionResources::writeToItemSet( SfxItemSet& rOutAttrs ) const { - SvxChartLegendPos ePos; - + sal_Int32 nLegendPosition = chart2::LegendPosition_CUSTOM; if( m_aRbtLeft.IsChecked() ) - ePos = CHLEGEND_LEFT; + nLegendPosition = chart2::LegendPosition_LINE_START; else if( m_aRbtTop.IsChecked() ) - ePos = CHLEGEND_TOP; + nLegendPosition = chart2::LegendPosition_PAGE_START; else if( m_aRbtRight.IsChecked() ) - ePos = CHLEGEND_RIGHT; + nLegendPosition = chart2::LegendPosition_LINE_END; else if( m_aRbtBottom.IsChecked() ) - ePos = CHLEGEND_BOTTOM; - else - ePos = CHLEGEND_NONE; + nLegendPosition = chart2::LegendPosition_PAGE_END; + rOutAttrs.Put(SfxInt32Item(SCHATTR_LEGEND_POS, nLegendPosition )); - rOutAttrs.Put(SvxChartLegendPosItem( ePos, SCHATTR_LEGEND_POS )); + rOutAttrs.Put( SfxBoolItem(SCHATTR_LEGEND_SHOW, m_aCbxShow.IsChecked()) ); } IMPL_LINK( LegendPositionResources, PositionChangeHdl, RadioButton*, pRadio ) @@ -258,6 +261,14 @@ void LegendPositionResources::SetChangeHdl( const Link& rLink ) m_aChangeLink = rLink; } +void LegendPositionResources::SetAccessibleRelationMemberOf(Window* pMemberOf) +{ + m_aRbtLeft.SetAccessibleRelationMemberOf(pMemberOf); + m_aRbtRight.SetAccessibleRelationMemberOf(pMemberOf); + m_aRbtTop.SetAccessibleRelationMemberOf(pMemberOf); + m_aRbtBottom.SetAccessibleRelationMemberOf(pMemberOf); +} + //............................................................................. } //namespace chart //............................................................................. diff --git a/chart2/source/controller/dialogs/res_LegendPosition.hxx b/chart2/source/controller/dialogs/res_LegendPosition.hxx index 0fc13b3b068b..bee192ff8b03 100644 --- a/chart2/source/controller/dialogs/res_LegendPosition.hxx +++ b/chart2/source/controller/dialogs/res_LegendPosition.hxx @@ -43,6 +43,7 @@ namespace chart class LegendPositionResources { + public: //constructor without Display checkbox LegendPositionResources( Window* pParent ); @@ -65,6 +66,8 @@ public: DECL_LINK( PositionEnableHdl, void* ); DECL_LINK( PositionChangeHdl, RadioButton* ); + void SetAccessibleRelationMemberOf(Window* pMemberOf); //IAccessibility2 Implementation 2009----- + private: void impl_setRadioButtonToggleHdl(); @@ -75,8 +78,8 @@ private: CheckBox m_aCbxShow; RadioButton m_aRbtLeft; - RadioButton m_aRbtTop; RadioButton m_aRbtRight; + RadioButton m_aRbtTop; RadioButton m_aRbtBottom; Link m_aChangeLink; diff --git a/chart2/source/controller/dialogs/res_TextSeparator.cxx b/chart2/source/controller/dialogs/res_TextSeparator.cxx index cef13277d9cf..7bf1cc0c8221 100644 --- a/chart2/source/controller/dialogs/res_TextSeparator.cxx +++ b/chart2/source/controller/dialogs/res_TextSeparator.cxx @@ -58,6 +58,9 @@ TextSeparatorResources::TextSeparatorResources( Window* pWindow ) m_aEntryMap[ C2U( ", " ) ] = 1; m_aEntryMap[ C2U( "; " ) ] = 2; m_aEntryMap[ C2U( "\n" ) ] = 3; + + m_aLB_Separator.SetAccessibleName(m_aFT_Separator.GetText()); + m_aLB_Separator.SetAccessibleRelationLabeledBy(&m_aFT_Separator); } TextSeparatorResources::~TextSeparatorResources() { @@ -123,7 +126,7 @@ Size TextSeparatorResources::GetCurrentListBoxSize() const void TextSeparatorResources::SetValue( const rtl::OUString& rSeparator ) { - ::std::map< ::rtl::OUString, USHORT >::iterator aIter( m_aEntryMap.find(rSeparator) ); + ::std::map< ::rtl::OUString, sal_uInt16 >::iterator aIter( m_aEntryMap.find(rSeparator) ); if( aIter == m_aEntryMap.end() ) m_aLB_Separator.SelectEntryPos( m_nDefaultPos ); else @@ -137,8 +140,8 @@ void TextSeparatorResources::SetDefault() rtl::OUString TextSeparatorResources::GetValue() const { - USHORT nPos = m_aLB_Separator.GetSelectEntryPos(); - ::std::map< ::rtl::OUString, USHORT >::const_iterator aIter( m_aEntryMap.begin() ); + sal_uInt16 nPos = m_aLB_Separator.GetSelectEntryPos(); + ::std::map< ::rtl::OUString, sal_uInt16 >::const_iterator aIter( m_aEntryMap.begin() ); while( aIter != m_aEntryMap.end() ) { if(aIter->second==nPos ) diff --git a/chart2/source/controller/dialogs/res_TextSeparator.hxx b/chart2/source/controller/dialogs/res_TextSeparator.hxx index b2701bf0aaec..9113c6bdcfa5 100644 --- a/chart2/source/controller/dialogs/res_TextSeparator.hxx +++ b/chart2/source/controller/dialogs/res_TextSeparator.hxx @@ -64,9 +64,9 @@ private: FixedText m_aFT_Separator; ListBox m_aLB_Separator; - ::std::map< ::rtl::OUString, USHORT > m_aEntryMap; + ::std::map< ::rtl::OUString, sal_uInt16 > m_aEntryMap; - const USHORT m_nDefaultPos; + const sal_uInt16 m_nDefaultPos; }; //............................................................................. diff --git a/chart2/source/controller/dialogs/res_Titles.cxx b/chart2/source/controller/dialogs/res_Titles.cxx index 2b164216c28a..b24dc911ab94 100644 --- a/chart2/source/controller/dialogs/res_Titles.cxx +++ b/chart2/source/controller/dialogs/res_Titles.cxx @@ -127,7 +127,7 @@ TitleResources::~TitleResources() void TitleResources::SetUpdateDataHdl( const Link& rLink ) { - ULONG nTimeout = 4*EDIT_UPDATEDATA_TIMEOUT; + sal_uLong nTimeout = 4*EDIT_UPDATEDATA_TIMEOUT; m_aEd_Main.EnableUpdateData( nTimeout ); m_aEd_Main.SetUpdateDataHdl( rLink ); diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx index dadfd998940a..dcd376530a90 100644 --- a/chart2/source/controller/dialogs/res_Trendline.cxx +++ b/chart2/source/controller/dialogs/res_Trendline.cxx @@ -184,7 +184,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) const SfxPoolItem *pPoolItem = NULL; SfxItemState aState = SFX_ITEM_UNKNOWN; - aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_TYPE, TRUE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_TYPE, sal_True, &pPoolItem ); m_bTrendLineUnique = ( aState != SFX_ITEM_DONTCARE ); if( aState == SFX_ITEM_SET ) { @@ -193,28 +193,28 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) m_eTrendLineType = pItem->GetValue(); } - aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SHOW_EQUATION, TRUE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SHOW_EQUATION, sal_True, &pPoolItem ); if( aState == SFX_ITEM_DONTCARE ) { - m_aCBShowEquation.EnableTriState( TRUE ); + m_aCBShowEquation.EnableTriState( sal_True ); m_aCBShowEquation.SetState( STATE_DONTKNOW ); } else { - m_aCBShowEquation.EnableTriState( FALSE ); + m_aCBShowEquation.EnableTriState( sal_False ); if( aState == SFX_ITEM_SET ) m_aCBShowEquation.Check( static_cast< const SfxBoolItem * >( pPoolItem )->GetValue()); } - aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SHOW_COEFF, TRUE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SHOW_COEFF, sal_True, &pPoolItem ); if( aState == SFX_ITEM_DONTCARE ) { - m_aCBShowCorrelationCoeff.EnableTriState( TRUE ); + m_aCBShowCorrelationCoeff.EnableTriState( sal_True ); m_aCBShowCorrelationCoeff.SetState( STATE_DONTKNOW ); } else { - m_aCBShowCorrelationCoeff.EnableTriState( FALSE ); + m_aCBShowCorrelationCoeff.EnableTriState( sal_False ); if( aState == SFX_ITEM_SET ) m_aCBShowCorrelationCoeff.Check( static_cast< const SfxBoolItem * >( pPoolItem )->GetValue()); } @@ -243,7 +243,7 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) } } -BOOL TrendlineResources::FillItemSet(SfxItemSet& rOutAttrs) const +sal_Bool TrendlineResources::FillItemSet(SfxItemSet& rOutAttrs) const { if( m_bTrendLineUnique ) rOutAttrs.Put( SvxChartRegressItem( m_eTrendLineType, SCHATTR_REGRESSION_TYPE )); @@ -251,7 +251,7 @@ BOOL TrendlineResources::FillItemSet(SfxItemSet& rOutAttrs) const rOutAttrs.Put( SfxBoolItem( SCHATTR_REGRESSION_SHOW_EQUATION, m_aCBShowEquation.IsChecked() )); if( m_aCBShowCorrelationCoeff.GetState() != STATE_DONTKNOW ) rOutAttrs.Put( SfxBoolItem( SCHATTR_REGRESSION_SHOW_COEFF, m_aCBShowCorrelationCoeff.IsChecked() )); - return TRUE; + return sal_True; } void TrendlineResources::FillValueSets() diff --git a/chart2/source/controller/dialogs/res_Trendline.hxx b/chart2/source/controller/dialogs/res_Trendline.hxx index 45a054e4ae57..6e290f850328 100644 --- a/chart2/source/controller/dialogs/res_Trendline.hxx +++ b/chart2/source/controller/dialogs/res_Trendline.hxx @@ -45,7 +45,7 @@ public: virtual ~TrendlineResources(); void Reset(const SfxItemSet& rInAttrs); - BOOL FillItemSet(SfxItemSet& rOutAttrs) const; + sal_Bool FillItemSet(SfxItemSet& rOutAttrs) const; void FillValueSets(); diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx index ff26d19ea7f0..6a5cacf52807 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx @@ -111,9 +111,9 @@ ThreeD_SceneAppearance_TabPage::ThreeD_SceneAppearance_TabPage( , m_aFT_Scheme ( this, SchResId( FT_SCHEME ) ) , m_aLB_Scheme ( this, SchResId( LB_SCHEME ) ) , m_aFL_Seperator ( this, SchResId( FL_SEPERATOR ) ) - , m_aCB_RoundedEdge ( this, SchResId( CB_ROUNDEDEDGE ) ) , m_aCB_Shading ( this, SchResId( CB_SHADING ) ) , m_aCB_ObjectLines ( this, SchResId( CB_OBJECTLINES ) ) + , m_aCB_RoundedEdge ( this, SchResId( CB_ROUNDEDEDGE ) ) , m_bUpdateOtherControls( true ) , m_bCommitToModel( true ) , m_rControllerLockHelper( rControllerLockHelper ) @@ -129,9 +129,9 @@ ThreeD_SceneAppearance_TabPage::ThreeD_SceneAppearance_TabPage( m_aCB_Shading.SetToggleHdl( LINK( this, ThreeD_SceneAppearance_TabPage, SelectShading ) ); m_aCB_ObjectLines.SetToggleHdl( LINK( this, ThreeD_SceneAppearance_TabPage, SelectRoundedEdgeOrObjectLines ) ); - m_aCB_RoundedEdge.EnableTriState( TRUE ); - m_aCB_Shading.EnableTriState( TRUE ); - m_aCB_ObjectLines.EnableTriState( TRUE ); + m_aCB_RoundedEdge.EnableTriState( sal_True ); + m_aCB_Shading.EnableTriState( sal_True ); + m_aCB_ObjectLines.EnableTriState( sal_True ); initControlsFromModel(); } @@ -220,50 +220,50 @@ void ThreeD_SceneAppearance_TabPage::initControlsFromModel() if(aProps.m_aShadeMode == drawing::ShadeMode_FLAT) { - m_aCB_Shading.EnableTriState( FALSE ); - m_aCB_Shading.Check(FALSE); + m_aCB_Shading.EnableTriState( sal_False ); + m_aCB_Shading.Check(sal_False); } else if(aProps.m_aShadeMode == drawing::ShadeMode_SMOOTH) { - m_aCB_Shading.EnableTriState( FALSE ); - m_aCB_Shading.Check(TRUE); + m_aCB_Shading.EnableTriState( sal_False ); + m_aCB_Shading.Check(sal_True); } else { - m_aCB_Shading.EnableTriState( TRUE ); + m_aCB_Shading.EnableTriState( sal_True ); m_aCB_Shading.SetState( STATE_DONTKNOW ); } if(aProps.m_nObjectLines == 0) { - m_aCB_ObjectLines.EnableTriState( FALSE ); - m_aCB_ObjectLines.Check(FALSE); + m_aCB_ObjectLines.EnableTriState( sal_False ); + m_aCB_ObjectLines.Check(sal_False); } else if(aProps.m_nObjectLines==1) { - m_aCB_ObjectLines.EnableTriState( FALSE ); - m_aCB_ObjectLines.Check(TRUE); + m_aCB_ObjectLines.EnableTriState( sal_False ); + m_aCB_ObjectLines.Check(sal_True); } else { - m_aCB_ObjectLines.EnableTriState( TRUE ); + m_aCB_ObjectLines.EnableTriState( sal_True ); m_aCB_ObjectLines.SetState( STATE_DONTKNOW ); } if(aProps.m_nRoundedEdges >= 5) { - m_aCB_RoundedEdge.EnableTriState( FALSE ); - m_aCB_RoundedEdge.Check(TRUE); + m_aCB_RoundedEdge.EnableTriState( sal_False ); + m_aCB_RoundedEdge.Check(sal_True); } else if(aProps.m_nRoundedEdges<0) { - m_aCB_RoundedEdge.EnableTriState( FALSE ); + m_aCB_RoundedEdge.EnableTriState( sal_False ); m_aCB_RoundedEdge.SetState( STATE_DONTKNOW ); } else { - m_aCB_RoundedEdge.EnableTriState( TRUE ); - m_aCB_RoundedEdge.Check(FALSE); + m_aCB_RoundedEdge.EnableTriState( sal_True ); + m_aCB_RoundedEdge.Check(sal_False); } m_aCB_RoundedEdge.Enable( !m_aCB_ObjectLines.IsChecked() ); @@ -331,7 +331,7 @@ IMPL_LINK( ThreeD_SceneAppearance_TabPage, SelectShading, void*, EMPTYARG ) if( !m_bUpdateOtherControls ) return 0; - m_aCB_Shading.EnableTriState( FALSE ); + m_aCB_Shading.EnableTriState( sal_False ); applyShadeModeToModel(); updateScheme(); return 0; @@ -343,15 +343,15 @@ IMPL_LINK( ThreeD_SceneAppearance_TabPage, SelectRoundedEdgeOrObjectLines, Check if( pCheckBox == &m_aCB_ObjectLines ) { - m_aCB_ObjectLines.EnableTriState( FALSE ); + m_aCB_ObjectLines.EnableTriState( sal_False ); m_bUpdateOtherControls = false; m_aCB_RoundedEdge.Enable( !m_aCB_ObjectLines.IsChecked() ); if(!m_aCB_RoundedEdge.IsEnabled()) - m_aCB_RoundedEdge.Check(FALSE); + m_aCB_RoundedEdge.Check(sal_False); m_bUpdateOtherControls = true; } else - m_aCB_RoundedEdge.EnableTriState( FALSE ); + m_aCB_RoundedEdge.EnableTriState( sal_False ); applyRoundedEdgeAndObjectLinesToModel(); updateScheme(); return 0; diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx index db7d91e59766..7ec53947dd52 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.hxx @@ -81,9 +81,9 @@ private: FixedLine m_aFL_Seperator; - CheckBox m_aCB_RoundedEdge; CheckBox m_aCB_Shading; CheckBox m_aCB_ObjectLines; + CheckBox m_aCB_RoundedEdge; bool m_bUpdateOtherControls; bool m_bCommitToModel; diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.src b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.src index e9b4887da21a..5f193db7e252 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.src +++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.src @@ -51,6 +51,7 @@ TabPage TP_3D_SCENEAPPEARANCE { + HelpID = "chart2:TabPage:TP_3D_SCENEAPPEARANCE"; OutputSize = TRUE ; SVLook = TRUE ; Hide = TRUE ; @@ -64,6 +65,7 @@ TabPage TP_3D_SCENEAPPEARANCE }; ListBox LB_SCHEME { + HelpID = "chart2:ListBox:TP_3D_SCENEAPPEARANCE:LB_SCHEME"; Border = TRUE; TabStop = TRUE; DropDown = TRUE; @@ -78,12 +80,14 @@ TabPage TP_3D_SCENEAPPEARANCE CheckBox CB_SHADING { + HelpID = "chart2:CheckBox:TP_3D_SCENEAPPEARANCE:CB_SHADING"; Pos = MAP_APPFONT ( POS_X_1 , POS_Y_SHADING ) ; Size = MAP_APPFONT ( WIDTH_FL , HEIGHT_LB ) ; Text [ en-US ] = "~Shading" ; }; CheckBox CB_OBJECTLINES { + HelpID = "chart2:CheckBox:TP_3D_SCENEAPPEARANCE:CB_OBJECTLINES"; Pos = MAP_APPFONT ( POS_X_1 , POS_Y_OBJECTLINES ) ; Size = MAP_APPFONT ( WIDTH_FL , HEIGHT_LB ) ; Text [ en-US ] = "~Object borders" ; diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx index b280f0476357..536ecce1eeca 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx @@ -116,7 +116,7 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage( Window* pWindow m_aMFYRotation.SetValue(m_nYRotation); m_aMFZRotation.SetValue(m_nZRotation); - const ULONG nTimeout = 4*EDIT_UPDATEDATA_TIMEOUT; + const sal_uLong nTimeout = 4*EDIT_UPDATEDATA_TIMEOUT; Link aAngleChangedLink( LINK( this, ThreeD_SceneGeometry_TabPage, AngleChanged )); Link aAngleEditedLink( LINK( this, ThreeD_SceneGeometry_TabPage, AngleEdited )); @@ -162,6 +162,8 @@ ThreeD_SceneGeometry_TabPage::ThreeD_SceneGeometry_TabPage( Window* pWindow { m_aCbxRightAngledAxes.Enable(false); } + m_aMFPerspective.SetAccessibleName(m_aCbxPerspective.GetText()); + m_aMFPerspective.SetAccessibleRelationLabeledBy(&m_aCbxPerspective); } ThreeD_SceneGeometry_TabPage::~ThreeD_SceneGeometry_TabPage() diff --git a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.src b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.src index 85b306523960..ac277d34c4f9 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneGeometry.src +++ b/chart2/source/controller/dialogs/tp_3D_SceneGeometry.src @@ -28,6 +28,7 @@ #include "tp_3D_SceneGeometry.hrc" #include "dlg_View3D.hrc" #include "SchSlotIds.hxx" +#include "HelpIds.hrc" #ifndef _SVT_CONTROLDIMS_HRC_ #include <svtools/controldims.hrc> @@ -68,7 +69,7 @@ CustomUnitText [ en-US ] = " degrees" ; TabPage TP_3D_SCENEGEOMETRY { - HelpID = SID_3D_VIEW ; + HelpID = HID_3D_VIEW ; OutputSize = TRUE ; SVLook = TRUE ; Hide = TRUE ; @@ -76,6 +77,7 @@ TabPage TP_3D_SCENEGEOMETRY CheckBox CBX_RIGHT_ANGLED_AXES { + HelpID = "chart2:CheckBox:TP_3D_SCENEGEOMETRY:CBX_RIGHT_ANGLED_AXES"; Pos = MAP_APPFONT ( POS_X_1 , POS_Y_0 ) ; Size = MAP_APPFONT ( (WIDTH_FT+WIDTH_MF) , HEIGHT_FT ) ; TabStop = TRUE ; @@ -101,18 +103,21 @@ TabPage TP_3D_SCENEGEOMETRY }; MetricField MTR_FLD_X_ROTATION { + HelpID = "chart2:MetricField:TP_3D_SCENEGEOMETRY:MTR_FLD_X_ROTATION"; Pos = MAP_APPFONT ( POS_X_2 , POS_Y_1-2 ) ; Size = MAP_APPFONT ( WIDTH_MF , HEIGHT_MF ) ; CUSTOMUNITTEXT_DEGREE }; MetricField MTR_FLD_Y_ROTATION { + HelpID = "chart2:MetricField:TP_3D_SCENEGEOMETRY:MTR_FLD_Y_ROTATION"; Pos = MAP_APPFONT ( POS_X_2 , POS_Y_2-2 ) ; Size = MAP_APPFONT ( WIDTH_MF , HEIGHT_MF ) ; CUSTOMUNITTEXT_DEGREE }; MetricField MTR_FLD_Z_ROTATION { + HelpID = "chart2:MetricField:TP_3D_SCENEGEOMETRY:MTR_FLD_Z_ROTATION"; Pos = MAP_APPFONT ( POS_X_2 , POS_Y_3-2 ) ; Size = MAP_APPFONT ( WIDTH_MF , HEIGHT_MF ) ; CUSTOMUNITTEXT_DEGREE @@ -120,6 +125,7 @@ TabPage TP_3D_SCENEGEOMETRY CheckBox CBX_PERSPECTIVE { + HelpID = "chart2:CheckBox:TP_3D_SCENEGEOMETRY:CBX_PERSPECTIVE"; Pos = MAP_APPFONT ( POS_X_1 , POS_Y_4 ) ; Size = MAP_APPFONT ( WIDTH_FT , HEIGHT_FT ) ; TabStop = TRUE ; @@ -127,6 +133,7 @@ TabPage TP_3D_SCENEGEOMETRY }; MetricField MTR_FLD_PERSPECTIVE { + HelpID = "chart2:MetricField:TP_3D_SCENEGEOMETRY:MTR_FLD_PERSPECTIVE"; Pos = MAP_APPFONT ( POS_X_2 , POS_Y_4-2 ) ; Size = MAP_APPFONT ( WIDTH_MF , HEIGHT_MF ) ; Border = TRUE ; diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx index dcf70f841db7..bd818fc3a29c 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx @@ -163,13 +163,13 @@ namespace rtl::OUString lcl_makeColorName( Color rColor ) { String aStr(SVX_RES(RID_SVXFLOAT3D_FIX_R)); - aStr += String::CreateFromInt32((INT32)rColor.GetRed()); + aStr += String::CreateFromInt32((sal_Int32)rColor.GetRed()); aStr += sal_Unicode(' '); aStr += String(SVX_RES(RID_SVXFLOAT3D_FIX_G)); - aStr += String::CreateFromInt32((INT32)rColor.GetGreen()); + aStr += String::CreateFromInt32((sal_Int32)rColor.GetGreen()); aStr += sal_Unicode(' '); aStr += String(SVX_RES(RID_SVXFLOAT3D_FIX_B)); - aStr += String::CreateFromInt32((INT32)rColor.GetBlue()); + aStr += String::CreateFromInt32((sal_Int32)rColor.GetBlue()); return aStr; } void lcl_selectColor( ColorListBox& rListBox, const Color& rColor ) @@ -178,7 +178,7 @@ namespace rListBox.SelectEntry( rColor ); if( rListBox.GetSelectEntryCount() == 0 ) { - USHORT nPos = rListBox.InsertEntry( rColor, lcl_makeColorName( rColor ) ); + sal_uInt16 nPos = rListBox.InsertEntry( rColor, lcl_makeColorName( rColor ) ); rListBox.SelectEntryPos( nPos ); } } @@ -354,6 +354,15 @@ ThreeD_SceneIllumination_TabPage::ThreeD_SceneIllumination_TabPage( Window* pWin ClickLightSourceButtonHdl(&m_aBtn_Light2); m_aModelChangeListener.startListening( uno::Reference< util::XModifyBroadcaster >(m_xSceneProperties, uno::UNO_QUERY) ); + m_aBtn_Light1.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aBtn_Light2.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aBtn_Light3.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aBtn_Light4.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aBtn_Light5.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aBtn_Light6.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aBtn_Light7.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aBtn_Light8.SetAccessibleRelationLabeledBy(&m_aFT_LightSource); + m_aCtl_Preview.SetAccessibleName(String(SchResId( STR_LIGHT_PREVIEW ))); } ThreeD_SceneIllumination_TabPage::~ThreeD_SceneIllumination_TabPage() diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hrc b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hrc index e2d031955867..f5ae0dcda267 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hrc +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.hrc @@ -42,5 +42,7 @@ #define BTN_LIGHT_6 8 #define BTN_LIGHT_7 9 #define BTN_LIGHT_8 10 - +//IAccessibility2 Implementation 2009----- +#define STR_LIGHT_PREVIEW 6000 +//-----IAccessibility2 Implementation 2009 #define CTL_LIGHT_PREVIEW 1 diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.src b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.src index 57f15a1894d7..cf5898af8c85 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.src +++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.src @@ -59,6 +59,7 @@ TabPage TP_3D_SCENEILLUMINATION { + HelpID = "chart2:TabPage:TP_3D_SCENEILLUMINATION"; OutputSize = TRUE ; SVLook = TRUE ; Hide = TRUE ; @@ -72,46 +73,55 @@ TabPage TP_3D_SCENEILLUMINATION }; ImageButton BTN_LIGHT_1 { + HelpID = "chart2:ImageButton:TP_3D_SCENEILLUMINATION:BTN_LIGHT_1"; Pos = MAP_APPFONT ( POS_X_0 , POS_Y_LIGHTSOURCE_BUTTONS ) ; Size = MAP_APPFONT ( WIDTH_IB , HEIGHT_IB ) ; }; ImageButton BTN_LIGHT_2 { + HelpID = "chart2:ImageButton:TP_3D_SCENEILLUMINATION:BTN_LIGHT_2"; Pos = MAP_APPFONT ( POS_X_0+BUTTON_DISTANCE , POS_Y_LIGHTSOURCE_BUTTONS ) ; Size = MAP_APPFONT ( WIDTH_IB , HEIGHT_IB ) ; }; ImageButton BTN_LIGHT_3 { + HelpID = "chart2:ImageButton:TP_3D_SCENEILLUMINATION:BTN_LIGHT_3"; Pos = MAP_APPFONT ( POS_X_0+2*BUTTON_DISTANCE , POS_Y_LIGHTSOURCE_BUTTONS ) ; Size = MAP_APPFONT ( WIDTH_IB , HEIGHT_IB ) ; }; ImageButton BTN_LIGHT_4 { + HelpID = "chart2:ImageButton:TP_3D_SCENEILLUMINATION:BTN_LIGHT_4"; Pos = MAP_APPFONT ( POS_X_0+3*BUTTON_DISTANCE , POS_Y_LIGHTSOURCE_BUTTONS ) ; Size = MAP_APPFONT ( WIDTH_IB , HEIGHT_IB ) ; }; ImageButton BTN_LIGHT_5 { + HelpID = "chart2:ImageButton:TP_3D_SCENEILLUMINATION:BTN_LIGHT_5"; Pos = MAP_APPFONT ( POS_X_0 , POS_Y_LIGHTSOURCE_BUTTONS_2 ) ; Size = MAP_APPFONT ( WIDTH_IB , HEIGHT_IB ) ; }; ImageButton BTN_LIGHT_6 { + HelpID = "chart2:ImageButton:TP_3D_SCENEILLUMINATION:BTN_LIGHT_6"; Pos = MAP_APPFONT ( POS_X_0+1*BUTTON_DISTANCE , POS_Y_LIGHTSOURCE_BUTTONS_2 ) ; Size = MAP_APPFONT ( WIDTH_IB , HEIGHT_IB ) ; }; ImageButton BTN_LIGHT_7 { + HelpID = "chart2:ImageButton:TP_3D_SCENEILLUMINATION:BTN_LIGHT_7"; Pos = MAP_APPFONT ( POS_X_0+2*BUTTON_DISTANCE , POS_Y_LIGHTSOURCE_BUTTONS_2 ) ; Size = MAP_APPFONT ( WIDTH_IB , HEIGHT_IB ) ; }; ImageButton BTN_LIGHT_8 { + HelpID = "chart2:ImageButton:TP_3D_SCENEILLUMINATION:BTN_LIGHT_8"; Pos = MAP_APPFONT ( POS_X_0+3*BUTTON_DISTANCE , POS_Y_LIGHTSOURCE_BUTTONS_2 ) ; Size = MAP_APPFONT ( WIDTH_IB , HEIGHT_IB ) ; }; ListBox LB_LIGHTSOURCE { + HelpID = "chart2:ListBox:TP_3D_SCENEILLUMINATION:LB_LIGHTSOURCE"; Border = TRUE ; Pos = MAP_APPFONT ( POS_X_0 , POS_Y_LIGHTSOURCE ) ; Size = MAP_APPFONT ( WIDTH_LB , HEIGHT_LB ) ; @@ -120,6 +130,7 @@ TabPage TP_3D_SCENEILLUMINATION }; ImageButton BTN_LIGHTSOURCE_COLOR { + HelpID = "chart2:ImageButton:TP_3D_SCENEILLUMINATION:BTN_LIGHTSOURCE_COLOR"; Pos = MAP_APPFONT ( POS_X_1 , POS_Y_LIGHTSOURCE ) ; Size = MAP_APPFONT ( WIDTH_IB , HEIGHT_IB ) ; TabStop = TRUE ; @@ -136,6 +147,7 @@ TabPage TP_3D_SCENEILLUMINATION }; ListBox LB_AMBIENTLIGHT { + HelpID = "chart2:ListBox:TP_3D_SCENEILLUMINATION:LB_AMBIENTLIGHT"; Border = TRUE ; Pos = MAP_APPFONT ( POS_X_0 , POS_Y_AMBIENT ) ; Size = MAP_APPFONT ( WIDTH_LB , HEIGHT_LB ) ; @@ -144,6 +156,7 @@ TabPage TP_3D_SCENEILLUMINATION }; ImageButton BTN_AMBIENT_COLOR { + HelpID = "chart2:ImageButton:TP_3D_SCENEILLUMINATION:BTN_AMBIENT_COLOR"; Pos = MAP_APPFONT ( POS_X_1 , POS_Y_AMBIENT ) ; Size = MAP_APPFONT ( WIDTH_IB , HEIGHT_IB ) ; TabStop = TRUE ; @@ -160,3 +173,8 @@ TabPage TP_3D_SCENEILLUMINATION }; }; +String STR_LIGHT_PREVIEW +{ + Text [ en-US ] = "Light Preview" ; +}; + diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index fd21bacca0b2..4da8cd64b08c 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -79,11 +79,12 @@ SchAxisLabelTabPage::SchAxisLabelTabPage( Window* pParent, const SfxItemSet& rIn m_nInitialDegrees( 0 ), m_bHasInitialDegrees( true ), m_bInitialStacking( false ), - m_bHasInitialStacking( true ) + m_bHasInitialStacking( true ), + m_bComplexCategories( false ) { FreeResource(); - aCbStacked.EnableTriState( FALSE ); + aCbStacked.EnableTriState( sal_False ); aOrientHlp.AddDependentWindow( aFlOrient ); aOrientHlp.AddDependentWindow( aFtRotate, STATE_CHECK ); @@ -108,7 +109,7 @@ SfxTabPage* SchAxisLabelTabPage::Create( Window* pParent, const SfxItemSet& rAtt return new SchAxisLabelTabPage( pParent, rAttrs ); } -BOOL SchAxisLabelTabPage::FillItemSet( SfxItemSet& rOutAttrs ) +sal_Bool SchAxisLabelTabPage::FillItemSet( SfxItemSet& rOutAttrs ) { bool bStacked = false; if( aOrientHlp.GetStackedState() != STATE_DONTKNOW ) @@ -142,20 +143,20 @@ BOOL SchAxisLabelTabPage::FillItemSet( SfxItemSet& rOutAttrs ) bRadioButtonChecked = false; if( bRadioButtonChecked ) - rOutAttrs.Put( SvxChartTextOrderItem( eOrder, SCHATTR_TEXT_ORDER )); + rOutAttrs.Put( SvxChartTextOrderItem( eOrder, SCHATTR_AXIS_LABEL_ORDER )); } if( aCbTextOverlap.GetState() != STATE_DONTKNOW ) - rOutAttrs.Put( SfxBoolItem( SCHATTR_TEXT_OVERLAP, aCbTextOverlap.IsChecked() ) ); + rOutAttrs.Put( SfxBoolItem( SCHATTR_AXIS_LABEL_OVERLAP, aCbTextOverlap.IsChecked() ) ); if( aCbTextBreak.GetState() != STATE_DONTKNOW ) - rOutAttrs.Put( SfxBoolItem( SCHATTR_TEXTBREAK, aCbTextBreak.IsChecked() ) ); + rOutAttrs.Put( SfxBoolItem( SCHATTR_AXIS_LABEL_BREAK, aCbTextBreak.IsChecked() ) ); 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; + return sal_True; } void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) @@ -164,16 +165,16 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) SfxItemState aState = SFX_ITEM_UNKNOWN; // show description ---------- - aState = rInAttrs.GetItemState( SCHATTR_AXIS_SHOWDESCR, FALSE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_AXIS_SHOWDESCR, sal_False, &pPoolItem ); if( aState == SFX_ITEM_DONTCARE ) { - aCbShowDescription.EnableTriState( TRUE ); + aCbShowDescription.EnableTriState( sal_True ); aCbShowDescription.SetState( STATE_DONTKNOW ); } else { - aCbShowDescription.EnableTriState( FALSE ); - BOOL bCheck = FALSE; + aCbShowDescription.EnableTriState( sal_False ); + sal_Bool bCheck = sal_False; if( aState == SFX_ITEM_SET ) bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); aCbShowDescription.Check( bCheck ); @@ -186,7 +187,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) // check new degree item m_nInitialDegrees = 0; - aState = rInAttrs.GetItemState( SCHATTR_TEXT_DEGREES, FALSE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_TEXT_DEGREES, sal_False, &pPoolItem ); if( aState == SFX_ITEM_SET ) m_nInitialDegrees = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); @@ -198,7 +199,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) // check stacked item m_bInitialStacking = false; - aState = rInAttrs.GetItemState( SCHATTR_TEXT_STACKED, FALSE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_TEXT_STACKED, sal_False, &pPoolItem ); if( aState == SFX_ITEM_SET ) m_bInitialStacking = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); @@ -208,20 +209,20 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) else aOrientHlp.SetStackedState( STATE_DONTKNOW ); - if( rInAttrs.GetItemState( EE_PARA_WRITINGDIR, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState( EE_PARA_WRITINGDIR, sal_True, &pPoolItem ) == SFX_ITEM_SET ) m_aLbTextDirection.SelectEntryValue( SvxFrameDirection(((const SvxFrameDirectionItem*)pPoolItem)->GetValue()) ); // Text overlap ---------- - aState = rInAttrs.GetItemState( SCHATTR_TEXT_OVERLAP, FALSE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_AXIS_LABEL_OVERLAP, sal_False, &pPoolItem ); if( aState == SFX_ITEM_DONTCARE ) { - aCbTextOverlap.EnableTriState( TRUE ); + aCbTextOverlap.EnableTriState( sal_True ); aCbTextOverlap.SetState( STATE_DONTKNOW ); } else { - aCbTextOverlap.EnableTriState( FALSE ); - BOOL bCheck = FALSE; + aCbTextOverlap.EnableTriState( sal_False ); + sal_Bool bCheck = sal_False; if( aState == SFX_ITEM_SET ) bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); aCbTextOverlap.Check( bCheck ); @@ -231,16 +232,16 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) } // text break ---------- - aState = rInAttrs.GetItemState( SCHATTR_TEXTBREAK, FALSE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_AXIS_LABEL_BREAK, sal_False, &pPoolItem ); if( aState == SFX_ITEM_DONTCARE ) { - aCbTextBreak.EnableTriState( TRUE ); + aCbTextBreak.EnableTriState( sal_True ); aCbTextBreak.SetState( STATE_DONTKNOW ); } else { - aCbTextBreak.EnableTriState( FALSE ); - BOOL bCheck = FALSE; + aCbTextBreak.EnableTriState( sal_False ); + sal_Bool bCheck = sal_False; if( aState == SFX_ITEM_SET ) bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); aCbTextBreak.Check( bCheck ); @@ -256,7 +257,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) // text order ---------- if( m_bShowStaggeringControls ) { - aState = rInAttrs.GetItemState( SCHATTR_TEXT_ORDER, FALSE, &pPoolItem ); + aState = rInAttrs.GetItemState( SCHATTR_AXIS_LABEL_ORDER, sal_False, &pPoolItem ); if( aState == SFX_ITEM_SET ) { SvxChartTextOrder eOrder = static_cast< const SvxChartTextOrderItem * >( pPoolItem )->GetValue(); @@ -282,7 +283,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) ToggleShowLabel( (void*)0 ); } -void SchAxisLabelTabPage::ShowStaggeringControls( BOOL bShowStaggeringControls ) +void SchAxisLabelTabPage::ShowStaggeringControls( sal_Bool bShowStaggeringControls ) { m_bShowStaggeringControls = bShowStaggeringControls; @@ -296,12 +297,17 @@ void SchAxisLabelTabPage::ShowStaggeringControls( BOOL bShowStaggeringControls ) } } +void SchAxisLabelTabPage::SetComplexCategories( bool bComplexCategories ) +{ + m_bComplexCategories = bComplexCategories; +} + // event handling routines // ----------------------- IMPL_LINK ( SchAxisLabelTabPage, ToggleShowLabel, void *, EMPTYARG ) { - BOOL bEnable = ( aCbShowDescription.GetState() != STATE_NOCHECK ); + sal_Bool bEnable = ( aCbShowDescription.GetState() != STATE_NOCHECK ); aOrientHlp.Enable( bEnable ); aFlOrder.Enable( bEnable ); @@ -311,7 +317,7 @@ IMPL_LINK ( SchAxisLabelTabPage, ToggleShowLabel, void *, EMPTYARG ) aRbAuto.Enable( bEnable ); aFlTextFlow.Enable( bEnable ); - aCbTextOverlap.Enable( bEnable ); + aCbTextOverlap.Enable( bEnable && !m_bComplexCategories ); aCbTextBreak.Enable( bEnable ); m_aFtTextDirection.Enable( bEnable ); diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.hxx b/chart2/source/controller/dialogs/tp_AxisLabel.hxx index 8e234b76af47..e56ed843fad6 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.hxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.hxx @@ -71,12 +71,13 @@ private: FixedText m_aFtTextDirection; TextDirectionListBox m_aLbTextDirection; - BOOL m_bShowStaggeringControls; + sal_Bool m_bShowStaggeringControls; sal_Int32 m_nInitialDegrees; bool m_bHasInitialDegrees; /// false = DialControl in tristate bool m_bInitialStacking; bool m_bHasInitialStacking; /// false = checkbox in tristate + bool m_bComplexCategories; DECL_LINK ( ToggleShowLabel, void* ); @@ -87,10 +88,11 @@ public: void Construct(); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs ); - virtual BOOL FillItemSet( SfxItemSet& rOutAttrs ); + virtual sal_Bool FillItemSet( SfxItemSet& rOutAttrs ); virtual void Reset( const SfxItemSet& rInAttrs ); - void ShowStaggeringControls( BOOL bShowStaggeringControls ); + void ShowStaggeringControls( sal_Bool bShowStaggeringControls ); + void SetComplexCategories( bool bComplexCategories ); }; //............................................................................. } //namespace chart diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.src b/chart2/source/controller/dialogs/tp_AxisLabel.src index bcba1926c242..75da7dc5e653 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.src +++ b/chart2/source/controller/dialogs/tp_AxisLabel.src @@ -35,6 +35,7 @@ TabPage TP_AXIS_LABEL CheckBox CB_AXIS_LABEL_SCHOW_DESCR { + HelpID = "chart2:CheckBox:TP_AXIS_LABEL:CB_AXIS_LABEL_SCHOW_DESCR"; Pos = MAP_APPFONT ( 6 , 6 ) ; Size = MAP_APPFONT ( 248 , 12 ) ; @@ -112,6 +113,7 @@ TabPage TP_AXIS_LABEL }; CheckBox CB_AXIS_LABEL_TEXTOVERLAP { + HelpID = "chart2:CheckBox:TP_AXIS_LABEL:CB_AXIS_LABEL_TEXTOVERLAP"; Pos = MAP_APPFONT ( 139 , 33 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; TabStop = TRUE ; @@ -120,6 +122,7 @@ TabPage TP_AXIS_LABEL }; CheckBox CB_AXIS_LABEL_TEXTBREAK { + HelpID = "chart2:CheckBox:TP_AXIS_LABEL:CB_AXIS_LABEL_TEXTBREAK"; Pos = MAP_APPFONT ( 139 , 47 ) ; Size = MAP_APPFONT ( 115 , 10 ) ; TabStop = TRUE ; @@ -137,6 +140,7 @@ TabPage TP_AXIS_LABEL }; RadioButton RB_AXIS_LABEL_SIDEBYSIDE { + HelpID = "chart2:RadioButton:TP_AXIS_LABEL:RB_AXIS_LABEL_SIDEBYSIDE"; Pos = MAP_APPFONT ( 12 , 33 ) ; Size = MAP_APPFONT ( 112 , 10 ) ; TabStop = TRUE ; @@ -145,6 +149,7 @@ TabPage TP_AXIS_LABEL }; RadioButton RB_AXIS_LABEL_UPDOWN { + HelpID = "chart2:RadioButton:TP_AXIS_LABEL:RB_AXIS_LABEL_UPDOWN"; Pos = MAP_APPFONT ( 12 , 47 ) ; Size = MAP_APPFONT ( 112 , 10 ) ; TabStop = TRUE ; @@ -153,6 +158,7 @@ TabPage TP_AXIS_LABEL }; RadioButton RB_AXIS_LABEL_DOWNUP { + HelpID = "chart2:RadioButton:TP_AXIS_LABEL:RB_AXIS_LABEL_DOWNUP"; Pos = MAP_APPFONT ( 12 , 61 ) ; Size = MAP_APPFONT ( 112 , 10 ) ; TabStop = TRUE ; @@ -161,6 +167,7 @@ TabPage TP_AXIS_LABEL }; RadioButton RB_AXIS_LABEL_AUTOORDER { + HelpID = "chart2:RadioButton:TP_AXIS_LABEL:RB_AXIS_LABEL_AUTOORDER"; Pos = MAP_APPFONT ( 12 , 75 ) ; Size = MAP_APPFONT ( 112 , 10 ) ; TabStop = TRUE ; @@ -176,6 +183,7 @@ TabPage TP_AXIS_LABEL }; ListBox LB_AXIS_TEXTDIR { + HelpID = "chart2:ListBox:TP_AXIS_LABEL:LB_AXIS_TEXTDIR"; Pos = MAP_APPFONT ( 78 , 154 ) ; Size = MAP_APPFONT ( 170 , 100 ) ; Border = TRUE; diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx index c4d073e3d03d..61cde8fabf56 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx @@ -221,6 +221,10 @@ AxisPositionsTabPage::AxisPositionsTabPage(Window* pWindow,const SfxItemSet& rIn m_aLB_PlaceLabels.SetSelectHdl( LINK( this, AxisPositionsTabPage, PlaceLabelsSelectHdl ) ); m_aLB_PlaceLabels.SetDropDownLineCount( m_aLB_PlaceLabels.GetEntryCount() ); m_aLB_PlaceTicks.SetDropDownLineCount( m_aLB_PlaceTicks.GetEntryCount() ); + m_aCB_TicksInner.SetAccessibleRelationLabeledBy(&m_aFT_Major); + m_aCB_TicksOuter.SetAccessibleRelationLabeledBy(&m_aFT_Major); + m_aCB_MinorInner.SetAccessibleRelationLabeledBy(&m_aFT_Minor); + m_aCB_MinorOuter.SetAccessibleRelationLabeledBy(&m_aFT_Minor); } SfxTabPage* AxisPositionsTabPage::Create(Window* pWindow,const SfxItemSet& rOutAttrs) @@ -228,10 +232,10 @@ SfxTabPage* AxisPositionsTabPage::Create(Window* pWindow,const SfxItemSet& rOutA return new AxisPositionsTabPage(pWindow, rOutAttrs); } -BOOL AxisPositionsTabPage::FillItemSet(SfxItemSet& rOutAttrs) +sal_Bool AxisPositionsTabPage::FillItemSet(SfxItemSet& rOutAttrs) { // axis line - USHORT nPos = m_aLB_CrossesAt.GetSelectEntryPos(); + sal_uInt16 nPos = m_aLB_CrossesAt.GetSelectEntryPos(); rOutAttrs.Put( SfxInt32Item( SCHATTR_AXIS_POSITION, nPos+1 )); if( 2==nPos ) { @@ -242,7 +246,7 @@ BOOL AxisPositionsTabPage::FillItemSet(SfxItemSet& rOutAttrs) } // labels - USHORT nLabelPos = m_aLB_PlaceLabels.GetSelectEntryPos(); + sal_uInt16 nLabelPos = m_aLB_PlaceLabels.GetSelectEntryPos(); if( nLabelPos != LISTBOX_ENTRY_NOTFOUND ) rOutAttrs.Put( SfxInt32Item( SCHATTR_AXIS_LABEL_POSITION, nLabelPos )); @@ -262,11 +266,11 @@ BOOL AxisPositionsTabPage::FillItemSet(SfxItemSet& rOutAttrs) rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_TICKS,nTicks)); rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_HELPTICKS,nMinorTicks)); - USHORT nMarkPos = m_aLB_PlaceTicks.GetSelectEntryPos(); + sal_uInt16 nMarkPos = m_aLB_PlaceTicks.GetSelectEntryPos(); if( nMarkPos != LISTBOX_ENTRY_NOTFOUND ) rOutAttrs.Put( SfxInt32Item( SCHATTR_AXIS_MARK_POSITION, nMarkPos )); - return TRUE; + return sal_True; } void AxisPositionsTabPage::Reset(const SfxItemSet& rInAttrs) @@ -280,7 +284,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet& rInAttrs) for( sal_Int32 nN=0; nN<m_aCategories.getLength() && nN<nMaxCount; nN++ ) m_aED_CrossesAtCategory.InsertEntry( m_aCategories[nN] ); - USHORT nCount = m_aED_CrossesAtCategory.GetEntryCount(); + sal_uInt16 nCount = m_aED_CrossesAtCategory.GetEntryCount(); if( nCount>30 ) nCount=30; m_aED_CrossesAtCategory.SetDropDownLineCount( nCount ); @@ -298,10 +302,10 @@ void AxisPositionsTabPage::Reset(const SfxItemSet& rInAttrs) const SfxPoolItem *pPoolItem = NULL; //axis line - if(rInAttrs.GetItemState(SCHATTR_AXIS_POSITION,TRUE, &pPoolItem)== SFX_ITEM_SET) + if(rInAttrs.GetItemState(SCHATTR_AXIS_POSITION,sal_True, &pPoolItem)== SFX_ITEM_SET) { bool bZero = false; - USHORT nPos = (USHORT)static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); + sal_uInt16 nPos = (sal_uInt16)static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); if(nPos==0) { //switch to value @@ -315,13 +319,13 @@ void AxisPositionsTabPage::Reset(const SfxItemSet& rInAttrs) m_aLB_CrossesAt.SelectEntryPos( nPos ); CrossesAtSelectHdl( (void*)0 ); - if( rInAttrs.GetItemState(SCHATTR_AXIS_POSITION_VALUE,TRUE, &pPoolItem)== SFX_ITEM_SET || bZero ) + if( rInAttrs.GetItemState(SCHATTR_AXIS_POSITION_VALUE,sal_True, &pPoolItem)== SFX_ITEM_SET || bZero ) { double fCrossover = 0.0; if( !bZero ) fCrossover = (((const SvxDoubleItem*)pPoolItem)->GetValue()); if( m_bCrossingAxisIsCategoryAxis ) - m_aED_CrossesAtCategory.SelectEntryPos( static_cast<USHORT>(::rtl::math::round(fCrossover-1.0)) ); + m_aED_CrossesAtCategory.SelectEntryPos( static_cast<sal_uInt16>(::rtl::math::round(fCrossover-1.0)) ); else m_aED_CrossesAt.SetValue(fCrossover); } @@ -334,13 +338,13 @@ void AxisPositionsTabPage::Reset(const SfxItemSet& rInAttrs) else { m_aLB_CrossesAt.SetNoSelection(); - m_aED_CrossesAt.Enable( FALSE ); + m_aED_CrossesAt.Enable( sal_False ); } // Labels - if( rInAttrs.GetItemState( SCHATTR_AXIS_LABEL_POSITION, FALSE, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState( SCHATTR_AXIS_LABEL_POSITION, sal_False, &pPoolItem ) == SFX_ITEM_SET ) { - USHORT nPos = (USHORT)static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); + sal_uInt16 nPos = (sal_uInt16)static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); if( nPos < m_aLB_PlaceLabels.GetEntryCount() ) m_aLB_PlaceLabels.SelectEntryPos( nPos ); } @@ -350,20 +354,20 @@ void AxisPositionsTabPage::Reset(const SfxItemSet& rInAttrs) // Tick marks long nTicks=0,nMinorTicks=0; - if(rInAttrs.GetItemState(SCHATTR_AXIS_TICKS,TRUE, &pPoolItem)== SFX_ITEM_SET) + if(rInAttrs.GetItemState(SCHATTR_AXIS_TICKS,sal_True, &pPoolItem)== SFX_ITEM_SET) nTicks=((const SfxInt32Item*)pPoolItem)->GetValue(); - if(rInAttrs.GetItemState(SCHATTR_AXIS_HELPTICKS,TRUE, &pPoolItem)== SFX_ITEM_SET) + if(rInAttrs.GetItemState(SCHATTR_AXIS_HELPTICKS,sal_True, &pPoolItem)== SFX_ITEM_SET) nMinorTicks=((const SfxInt32Item*)pPoolItem)->GetValue(); - m_aCB_TicksInner.Check(BOOL(nTicks&CHAXIS_MARK_INNER)); - m_aCB_TicksOuter.Check(BOOL(nTicks&CHAXIS_MARK_OUTER)); - m_aCB_MinorInner.Check(BOOL(nMinorTicks&CHAXIS_MARK_INNER)); - m_aCB_MinorOuter.Check(BOOL(nMinorTicks&CHAXIS_MARK_OUTER)); + m_aCB_TicksInner.Check(sal_Bool(nTicks&CHAXIS_MARK_INNER)); + m_aCB_TicksOuter.Check(sal_Bool(nTicks&CHAXIS_MARK_OUTER)); + m_aCB_MinorInner.Check(sal_Bool(nMinorTicks&CHAXIS_MARK_INNER)); + m_aCB_MinorOuter.Check(sal_Bool(nMinorTicks&CHAXIS_MARK_OUTER)); // Tick position - if( rInAttrs.GetItemState( SCHATTR_AXIS_MARK_POSITION, FALSE, &pPoolItem ) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState( SCHATTR_AXIS_MARK_POSITION, sal_False, &pPoolItem ) == SFX_ITEM_SET ) { - USHORT nPos = (USHORT)static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); + sal_uInt16 nPos = (sal_uInt16)static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); if( nPos < m_aLB_PlaceTicks.GetEntryCount() ) m_aLB_PlaceTicks.SelectEntryPos( nPos ); } @@ -438,9 +442,9 @@ void AxisPositionsTabPage::SetNumFormatter( SvNumberFormatter* pFormatter ) m_aED_CrossesAt.UseInputStringForFormatting(); const SfxPoolItem *pPoolItem = NULL; - if( GetItemSet().GetItemState( SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + if( GetItemSet().GetItemState( SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT, sal_True, &pPoolItem ) == SFX_ITEM_SET ) { - ULONG nFmt = (ULONG)((const SfxInt32Item*)pPoolItem)->GetValue(); + sal_uLong nFmt = (sal_uLong)((const SfxInt32Item*)pPoolItem)->GetValue(); m_aED_CrossesAt.SetFormatKey( nFmt ); } } @@ -462,7 +466,7 @@ void AxisPositionsTabPage::SupportAxisPositioning( bool bSupportAxisPositioning IMPL_LINK ( AxisPositionsTabPage, CrossesAtSelectHdl, void *, EMPTYARG ) { - USHORT nPos = m_aLB_CrossesAt.GetSelectEntryPos(); + sal_uInt16 nPos = m_aLB_CrossesAt.GetSelectEntryPos(); m_aED_CrossesAt.Show( (2==nPos) && !m_bCrossingAxisIsCategoryAxis ); m_aED_CrossesAtCategory.Show( (2==nPos) && m_bCrossingAxisIsCategoryAxis ); @@ -477,12 +481,12 @@ IMPL_LINK ( AxisPositionsTabPage, CrossesAtSelectHdl, void *, EMPTYARG ) IMPL_LINK ( AxisPositionsTabPage, PlaceLabelsSelectHdl, void *, EMPTYARG ) { - USHORT nLabelPos = m_aLB_PlaceLabels.GetSelectEntryPos(); + sal_uInt16 nLabelPos = m_aLB_PlaceLabels.GetSelectEntryPos(); bool bEnableTickmarkPlacement = (nLabelPos>1); if( bEnableTickmarkPlacement ) { - USHORT nAxisPos = m_aLB_CrossesAt.GetSelectEntryPos(); + sal_uInt16 nAxisPos = m_aLB_CrossesAt.GetSelectEntryPos(); if( nLabelPos-2 == nAxisPos ) bEnableTickmarkPlacement=false; } diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.hxx b/chart2/source/controller/dialogs/tp_AxisPositions.hxx index 61fb13ecedd3..5bfc694b8939 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.hxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.hxx @@ -47,7 +47,7 @@ public: AxisPositionsTabPage( Window* pParent, const SfxItemSet& rInAttrs ); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs ); - virtual BOOL FillItemSet( SfxItemSet& rOutAttrs ); + virtual sal_Bool FillItemSet( SfxItemSet& rOutAttrs ); virtual void Reset( const SfxItemSet& rInAttrs ); using TabPage::DeactivatePage; virtual int DeactivatePage( SfxItemSet* pItemSet = NULL ); diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.src b/chart2/source/controller/dialogs/tp_AxisPositions.src index 8ce1ba39056a..1173b841354a 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.src +++ b/chart2/source/controller/dialogs/tp_AxisPositions.src @@ -60,6 +60,7 @@ TabPage TP_AXIS_POSITIONS { + HelpID = "chart2:TabPage:TP_AXIS_POSITIONS"; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 260 , 185 ) ; @@ -79,6 +80,7 @@ TabPage TP_AXIS_POSITIONS }; ListBox LB_CROSSES_OTHER_AXIS_AT { + HelpID = "chart2:ListBox:TP_AXIS_POSITIONS:LB_CROSSES_OTHER_AXIS_AT"; Border = TRUE ; AutoHScroll = TRUE ; Pos = MAP_APPFONT ( X4 , Y1-2 ) ; @@ -98,6 +100,7 @@ TabPage TP_AXIS_POSITIONS }; SpinField EDT_CROSSES_OTHER_AXIS_AT { + HelpID = "chart2:SpinField:TP_AXIS_POSITIONS:EDT_CROSSES_OTHER_AXIS_AT"; Border = TRUE ; SVLook = TRUE ; Pos = MAP_APPFONT ( X5 , Y1-2 ) ; @@ -106,6 +109,7 @@ TabPage TP_AXIS_POSITIONS }; ComboBox EDT_CROSSES_OTHER_AXIS_AT_CATEGORY { + HelpID = "chart2:ComboBox:TP_AXIS_POSITIONS:EDT_CROSSES_OTHER_AXIS_AT_CATEGORY"; Border = TRUE ; SVLook = TRUE ; Pos = MAP_APPFONT ( X5 , Y1-2 ) ; @@ -116,6 +120,7 @@ TabPage TP_AXIS_POSITIONS CheckBox CB_AXIS_BETWEEN_CATEGORIES { + HelpID = "chart2:CheckBox:TP_AXIS_POSITIONS:CB_AXIS_BETWEEN_CATEGORIES"; Hide = TRUE; Pos = MAP_APPFONT ( X2 , Y2 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; @@ -137,6 +142,7 @@ TabPage TP_AXIS_POSITIONS }; ListBox LB_PLACE_LABELS { + HelpID = "chart2:ListBox:TP_AXIS_POSITIONS:LB_PLACE_LABELS"; Border = TRUE ; AutoHScroll = TRUE ; Pos = MAP_APPFONT ( X4 , Y4-2 ) ; @@ -164,6 +170,7 @@ TabPage TP_AXIS_POSITIONS }; SpinField EDT_AXIS_LABEL_DISTANCE { + HelpID = "chart2:SpinField:TP_AXIS_POSITIONS:EDT_AXIS_LABEL_DISTANCE"; Hide = TRUE; Border = TRUE ; SVLook = TRUE ; @@ -186,12 +193,14 @@ TabPage TP_AXIS_POSITIONS }; CheckBox CB_TICKS_INNER { + HelpID = "chart2:CheckBox:TP_AXIS_POSITIONS:CB_TICKS_INNER"; Pos = MAP_APPFONT ( XTICK_2 , Y7 ) ; Size = MAP_APPFONT ( TICKWIDTH , 10 ) ; Text [ en-US ] = "~Inner"; }; CheckBox CB_TICKS_OUTER { + HelpID = "chart2:CheckBox:TP_AXIS_POSITIONS:CB_TICKS_OUTER"; Pos = MAP_APPFONT ( XTICK_3 , Y7 ) ; Size = MAP_APPFONT ( TICKWIDTH , 10 ) ; Text [ en-US ] = "~Outer"; @@ -205,12 +214,14 @@ TabPage TP_AXIS_POSITIONS }; CheckBox CB_MINOR_INNER { + HelpID = "chart2:CheckBox:TP_AXIS_POSITIONS:CB_MINOR_INNER"; Pos = MAP_APPFONT ( XTICK_2 , Y8 ); Size = MAP_APPFONT ( TICKWIDTH , 10 ) ; Text [ en-US ] = "I~nner"; }; CheckBox CB_MINOR_OUTER { + HelpID = "chart2:CheckBox:TP_AXIS_POSITIONS:CB_MINOR_OUTER"; Pos = MAP_APPFONT ( XTICK_3 , Y8 ) ; Size = MAP_APPFONT ( TICKWIDTH , 10 ) ; Text [ en-US ] = "O~uter"; @@ -232,6 +243,7 @@ TabPage TP_AXIS_POSITIONS }; ListBox LB_PLACE_TICKS { + HelpID = "chart2:ListBox:TP_AXIS_POSITIONS:LB_PLACE_TICKS"; Border = TRUE ; AutoHScroll = TRUE ; Pos = MAP_APPFONT ( X3 , Y9-2 ) ; @@ -259,6 +271,7 @@ TabPage TP_AXIS_POSITIONS }; CheckBox CB_MAJOR_GRID { + HelpID = "chart2:CheckBox:TP_AXIS_POSITIONS:CB_MAJOR_GRID"; Hide = TRUE ; Pos = MAP_APPFONT ( X2 , Y11 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; @@ -267,6 +280,7 @@ TabPage TP_AXIS_POSITIONS }; PushButton PB_MAJOR_GRID { + HelpID = "chart2:PushButton:TP_AXIS_POSITIONS:PB_MAJOR_GRID"; Hide = TRUE ; TabStop = TRUE; Pos = MAP_APPFONT ( X3 , Y11-2 ); @@ -275,6 +289,7 @@ TabPage TP_AXIS_POSITIONS }; CheckBox CB_MINOR_GRID { + HelpID = "chart2:CheckBox:TP_AXIS_POSITIONS:CB_MINOR_GRID"; Hide = TRUE ; Pos = MAP_APPFONT ( X2 , Y12 ) ; Size = MAP_APPFONT ( 150 , 10 ) ; @@ -283,6 +298,7 @@ TabPage TP_AXIS_POSITIONS }; PushButton PB_MINOR_GRID { + HelpID = "chart2:PushButton:TP_AXIS_POSITIONS:PB_MINOR_GRID"; Hide = TRUE ; TabStop = TRUE; Pos = MAP_APPFONT ( X3 , Y12-2 ); diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index 728e7e6cf443..5774f9d9dc7c 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -179,6 +179,8 @@ Dim3DLookResourceGroup::Dim3DLookResourceGroup( Window* pWindow ) m_aLB_Scheme.SetDropDownLineCount(2); m_aLB_Scheme.SetSelectHdl( LINK( this, Dim3DLookResourceGroup, SelectSchemeHdl ) ); + m_aLB_Scheme.SetAccessibleName(m_aCB_3DLook.GetText()); + m_aLB_Scheme.SetAccessibleRelationLabeledBy(&m_aCB_3DLook); } Dim3DLookResourceGroup::~Dim3DLookResourceGroup() { @@ -218,7 +220,7 @@ void Dim3DLookResourceGroup::fillControls( const ChartTypeParameter& rParameter void Dim3DLookResourceGroup::fillParameter( ChartTypeParameter& rParameter ) { rParameter.b3DLook = m_aCB_3DLook.IsChecked(); - USHORT nPos = m_aLB_Scheme.GetSelectEntryPos(); + sal_uInt16 nPos = m_aLB_Scheme.GetSelectEntryPos(); if( POS_3DSCHEME_SIMPLE == nPos ) rParameter.eThreeDLookScheme = ThreeDLookScheme_Simple; else if( POS_3DSCHEME_REALISTIC == nPos ) @@ -334,6 +336,9 @@ StackingResourceGroup::StackingResourceGroup( Window* pWindow ) m_aRB_Stack_Y.SetToggleHdl( LINK( this, StackingResourceGroup, StackingChangeHdl ) ); m_aRB_Stack_Y_Percent.SetToggleHdl( LINK( this, StackingResourceGroup, StackingChangeHdl ) ); m_aRB_Stack_Z.SetToggleHdl( LINK( this, StackingResourceGroup, StackingChangeHdl ) ); + m_aRB_Stack_Y.SetAccessibleRelationMemberOf(&m_aCB_Stacked); + m_aRB_Stack_Y_Percent.SetAccessibleRelationMemberOf(&m_aCB_Stacked); + m_aRB_Stack_Z.SetAccessibleRelationMemberOf(&m_aCB_Stacked); } StackingResourceGroup::~StackingResourceGroup() { @@ -462,9 +467,9 @@ private: MetricField m_aMF_SplineOrder; FixedLine m_aFL_DialogButtons; + HelpButton m_aBP_Help; OKButton m_aBP_OK; CancelButton m_aBP_Cancel; - HelpButton m_aBP_Help; }; SplinePropertiesDialog::SplinePropertiesDialog( Window* pParent ) @@ -477,9 +482,9 @@ SplinePropertiesDialog::SplinePropertiesDialog( Window* pParent ) , m_aFT_SplineOrder( this, SchResId( FT_SPLINE_ORDER ) ) , m_aMF_SplineOrder( this, SchResId( MF_SPLINE_ORDER ) ) , m_aFL_DialogButtons( this, SchResId( FL_SPLINE_DIALOGBUTTONS ) ) + , m_aBP_Help( this, SchResId(BTN_HELP) ) , m_aBP_OK( this, SchResId(BTN_OK) ) - , m_aBP_Cancel( this, SchResId(BTN_CANCEL) ) - , m_aBP_Help( this, SchResId(BTN_HELP) ) + , m_aBP_Cancel( this, SchResId(BTN_CANCEL) ) { FreeResource(); @@ -697,7 +702,7 @@ IMPL_LINK( SplineResourceGroup, SplineDetailsDialogHdl, void*, EMPTYARG ) ChartTypeParameter aOldParameter; getSplinePropertiesDialog().fillParameter( aOldParameter, m_aCB_Splines.IsChecked() ); - BOOL bOldSmoothLines = m_aCB_Splines.IsChecked(); + sal_Bool bOldSmoothLines = m_aCB_Splines.IsChecked(); m_aCB_Splines.Check(); if( RET_OK == getSplinePropertiesDialog().Execute() ) { @@ -758,7 +763,7 @@ void GeometryResourceGroup::setPosition( const Point& rPoint ) void GeometryResourceGroup::fillControls( const ChartTypeParameter& rParameter ) { - USHORT nGeometry3D = static_cast<USHORT>(rParameter.nGeometry3D); + sal_uInt16 nGeometry3D = static_cast<sal_uInt16>(rParameter.nGeometry3D); m_aGeometryResources.SelectEntryPos(nGeometry3D); m_aGeometryResources.Enable(rParameter.b3DLook); } @@ -1074,8 +1079,11 @@ void ChartTypeTabPage::fillAllControls( const ChartTypeParameter& rParameter, bo { m_nChangingCalls++; if( m_pCurrentMainType && bAlsoResetSubTypeList ) - m_pCurrentMainType->fillSubTypeList( m_aSubTypeList, rParameter ); - m_aSubTypeList.SelectItem( static_cast<USHORT>( rParameter.nSubTypeIndex) ); + { + bool bIsHighContrast = ( true && GetSettings().GetStyleSettings().GetHighContrastMode() ); + m_pCurrentMainType->fillSubTypeList( m_aSubTypeList, bIsHighContrast, rParameter ); + } + m_aSubTypeList.SelectItem( static_cast<sal_uInt16>( rParameter.nSubTypeIndex) ); m_pAxisTypeResourceGroup->fillControls( rParameter ); m_pDim3DLookResourceGroup->fillControls( rParameter ); m_pStackingResourceGroup->fillControls( rParameter ); @@ -1100,7 +1108,7 @@ void ChartTypeTabPage::initializePage() ::std::vector< ChartTypeDialogController* >::iterator aIter = m_aChartTypeDialogControllerList.begin(); const ::std::vector< ChartTypeDialogController* >::const_iterator aEnd = m_aChartTypeDialogControllerList.end(); - for( USHORT nM=0; aIter != aEnd; aIter++, nM++ ) + for( sal_uInt16 nM=0; aIter != aEnd; aIter++, nM++ ) { if( (*aIter)->isSubType(aServiceName) ) { diff --git a/chart2/source/controller/dialogs/tp_ChartType.src b/chart2/source/controller/dialogs/tp_ChartType.src index a9bb2a039f3c..69c33cd14021 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.src +++ b/chart2/source/controller/dialogs/tp_ChartType.src @@ -69,7 +69,7 @@ TabPage TP_CHARTTYPE { Hide = TRUE ; - HelpID = SID_DIAGRAM_TYPE; + HelpID = HID_DIAGRAM_TYPE; SVLook = TRUE ; Size = MAP_APPFONT ( CHART_WIZARD_PAGEWIDTH , CHART_WIZARD_PAGEHEIGHT ) ; @@ -99,18 +99,21 @@ TabPage TP_CHARTTYPE CheckBox CB_X_AXIS_CATEGORIES { + HelpID = "chart2:CheckBox:TP_CHARTTYPE:CB_X_AXIS_CATEGORIES"; Pos = MAP_APPFONT ( POS_X_IMAGELIST , POS_Y_VALUE_X_AXIS ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text [ en-US ] = "X axis with Categories" ; }; CheckBox CB_3D_LOOK { + HelpID = "chart2:CheckBox:TP_CHARTTYPE:CB_3D_LOOK"; Pos = MAP_APPFONT ( POS_X_IMAGELIST , POS_Y_3D_LOOK ) ; Size = MAP_APPFONT ( WIDTH_3D , 10 ) ; Text [ en-US ] = "~3D Look" ; }; ListBox LB_3D_SCHEME { + HelpID = "chart2:ListBox:TP_CHARTTYPE:LB_3D_SCHEME"; Border = TRUE; TabStop = TRUE; DropDown = TRUE; @@ -120,12 +123,14 @@ TabPage TP_CHARTTYPE CheckBox CB_STACKED { + HelpID = "chart2:CheckBox:TP_CHARTTYPE:CB_STACKED"; Pos = MAP_APPFONT ( POS_X_IMAGELIST , POS_Y_STACKING ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text [ en-US ] = "~Stack series" ; }; RadioButton RB_STACK_Y { + HelpID = "chart2:RadioButton:TP_CHARTTYPE:RB_STACK_Y"; Pos = MAP_APPFONT ( POS_X_IMAGELIST+RSC_SP_CHK_TEXTINDENT, POS_Y_STACKING+12 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -135,6 +140,7 @@ TabPage TP_CHARTTYPE }; RadioButton RB_STACK_Y_PERCENT { + HelpID = "chart2:RadioButton:TP_CHARTTYPE:RB_STACK_Y_PERCENT"; Pos = MAP_APPFONT ( POS_X_IMAGELIST+RSC_SP_CHK_TEXTINDENT, POS_Y_STACKING+2*12 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -142,6 +148,7 @@ TabPage TP_CHARTTYPE }; RadioButton RB_STACK_Z { + HelpID = "chart2:RadioButton:TP_CHARTTYPE:RB_STACK_Z"; Pos = MAP_APPFONT ( POS_X_IMAGELIST+RSC_SP_CHK_TEXTINDENT, POS_Y_STACKING+3*12 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -152,6 +159,7 @@ TabPage TP_CHARTTYPE CheckBox CB_SPLINES { + HelpID = "chart2:CheckBox:TP_CHARTTYPE:CB_SPLINES"; Pos = MAP_APPFONT ( POS_X_IMAGELIST , POS_Y_SPLINES ) ; Size = MAP_APPFONT ( 150 , 10 ) ; Text [ en-US ] = "S~mooth lines" ; @@ -159,6 +167,7 @@ TabPage TP_CHARTTYPE PushButton PB_SPLINE_DIALOG { + HelpID = "chart2:PushButton:TP_CHARTTYPE:PB_SPLINE_DIALOG"; TabStop = TRUE ; Pos = MAP_APPFONT ( POS_X_IMAGELIST , POS_Y_SPLINES-6 ) ; Size = MAP_APPFONT ( 12 , 14 ) ; @@ -167,6 +176,7 @@ TabPage TP_CHARTTYPE CheckBox CB_XVALUE_SORTING { + HelpID = "chart2:CheckBox:TP_CHARTTYPE:CB_XVALUE_SORTING"; TabStop = TRUE ; Pos = MAP_APPFONT ( POS_X_IMAGELIST , POS_Y_XVALUE_SORTING ) ; Size = MAP_APPFONT ( WIDTH_XVALUE_SORTING , 10 ) ; @@ -185,6 +195,7 @@ ModalDialog DLG_SPLINE_PROPERTIES Closeable = TRUE; RadioButton RB_SPLINES_CUBIC { + HelpID = "chart2:RadioButton:DLG_SPLINE_PROPERTIES:RB_SPLINES_CUBIC"; Pos = MAP_APPFONT ( POS_X_SPLINES_1, POS_Y_SPLINES_2 ) ; Size = MAP_APPFONT ( SPLINES_WIDTH_RADIO , 10 ) ; TabStop = TRUE ; @@ -192,6 +203,7 @@ ModalDialog DLG_SPLINE_PROPERTIES }; RadioButton RB_SPLINES_B { + HelpID = "chart2:RadioButton:DLG_SPLINE_PROPERTIES:RB_SPLINES_B"; Pos = MAP_APPFONT ( POS_X_SPLINES_1, POS_Y_SPLINES_3 ) ; Size = MAP_APPFONT ( SPLINES_WIDTH_RADIO , 10 ) ; TabStop = TRUE ; @@ -213,6 +225,7 @@ ModalDialog DLG_SPLINE_PROPERTIES }; MetricField MF_SPLINE_RESOLUTION { + HelpID = "chart2:MetricField:DLG_SPLINE_PROPERTIES:MF_SPLINE_RESOLUTION"; Border = TRUE ; Pos = MAP_APPFONT ( POS_X_SPLINE_EXTRAS+SPLINES_WIDTH_METRIC_TEXT+RSC_SP_FLGR_SPACE_X , POS_Y_SPLINES_2-2 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; @@ -236,6 +249,7 @@ ModalDialog DLG_SPLINE_PROPERTIES }; MetricField MF_SPLINE_ORDER { + HelpID = "chart2:MetricField:DLG_SPLINE_PROPERTIES:MF_SPLINE_ORDER"; Border = TRUE ; Pos = MAP_APPFONT ( POS_X_SPLINE_EXTRAS+SPLINES_WIDTH_METRIC_TEXT+RSC_SP_FLGR_SPACE_X , POS_Y_SPLINES_3-2 ) ; Size = MAP_APPFONT ( 25 , 12 ) ; diff --git a/chart2/source/controller/dialogs/tp_DataLabel.cxx b/chart2/source/controller/dialogs/tp_DataLabel.cxx index a53c205d9ecc..78b730cfb9ed 100644 --- a/chart2/source/controller/dialogs/tp_DataLabel.cxx +++ b/chart2/source/controller/dialogs/tp_DataLabel.cxx @@ -55,7 +55,7 @@ SfxTabPage* DataLabelsTabPage::Create(Window* pWindow, return new DataLabelsTabPage(pWindow, rOutAttrs); } -BOOL DataLabelsTabPage::FillItemSet(SfxItemSet& rOutAttrs) +sal_Bool DataLabelsTabPage::FillItemSet(SfxItemSet& rOutAttrs) { return m_aDataLabelResources.FillItemSet(rOutAttrs); } diff --git a/chart2/source/controller/dialogs/tp_DataLabel.hxx b/chart2/source/controller/dialogs/tp_DataLabel.hxx index ed49bd58cab7..5c40ec6872f4 100644 --- a/chart2/source/controller/dialogs/tp_DataLabel.hxx +++ b/chart2/source/controller/dialogs/tp_DataLabel.hxx @@ -53,7 +53,7 @@ public: void SetNumberFormatter( SvNumberFormatter* pFormatter ); virtual void Reset(const SfxItemSet& rInAttrs); - virtual BOOL FillItemSet(SfxItemSet& rOutAttrs); + virtual sal_Bool FillItemSet(SfxItemSet& rOutAttrs); private: DataLabelResources m_aDataLabelResources; diff --git a/chart2/source/controller/dialogs/tp_DataLabel.src b/chart2/source/controller/dialogs/tp_DataLabel.src index 615e81c2c550..0f8f12c3e48b 100644 --- a/chart2/source/controller/dialogs/tp_DataLabel.src +++ b/chart2/source/controller/dialogs/tp_DataLabel.src @@ -28,10 +28,6 @@ #include "TabPages.hrc" #include "res_DataLabel.hrc" -#ifndef _GLOBLMN_HRC -#include <svx/globlmn.hrc> -#endif - TabPage TP_DATA_DESCR { Hide = TRUE ; diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx index 557de8492384..d18fe55d2951 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.cxx +++ b/chart2/source/controller/dialogs/tp_DataSource.cxx @@ -152,7 +152,7 @@ static long lcl_pRoleListBoxTabs[] = void lcl_ShowChooserButton( ::chart::RangeSelectionButton & rChooserButton, Edit & rEditField, - BOOL bShow ) + sal_Bool bShow ) { if( rChooserButton.IsVisible() != bShow ) { @@ -170,8 +170,8 @@ void lcl_enableRangeChoosing( bool bEnable, Dialog * pDialog ) { if( pDialog ) { - pDialog->Show( bEnable ? FALSE : TRUE ); - pDialog->SetModalInputMode( bEnable ? FALSE : TRUE ); + pDialog->Show( bEnable ? sal_False : sal_True ); + pDialog->SetModalInputMode( bEnable ? sal_False : sal_True ); } } @@ -312,7 +312,7 @@ DataSourceTabPage::DataSourceTabPage( // set handlers m_apLB_SERIES->SetSelectHdl( LINK( this, DataSourceTabPage, SeriesSelectionChangedHdl )); - m_aLB_ROLE.SetWindowBits( WB_HSCROLL | WB_CLIPCHILDREN ); + m_aLB_ROLE.SetStyle( m_aLB_ROLE.GetStyle() | WB_HSCROLL | WB_CLIPCHILDREN ); m_aLB_ROLE.SetSelectionMode( SINGLE_SELECTION ); m_aLB_ROLE.SetSelectHdl( LINK( this, DataSourceTabPage, RoleSelectionChangedHdl )); @@ -360,6 +360,8 @@ DataSourceTabPage::DataSourceTabPage( if( m_apLB_SERIES->First()) m_apLB_SERIES->Select( m_apLB_SERIES->First()); m_apLB_SERIES->GrabFocus(); + m_aBTN_UP.SetAccessibleName(String(SchResId(STR_BUTTON_UP))); + m_aBTN_DOWN.SetAccessibleName(String(SchResId(STR_BUTTON_DOWN))); } DataSourceTabPage::~DataSourceTabPage() @@ -460,7 +462,7 @@ void DataSourceTabPage::updateControlsFromDialogModel() void DataSourceTabPage::fillSeriesListBox() { - m_apLB_SERIES->SetUpdateMode( FALSE ); + m_apLB_SERIES->SetUpdateMode( sal_False ); Reference< XDataSeries > xSelected; SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_apLB_SERIES->FirstSelected()); @@ -512,7 +514,7 @@ void DataSourceTabPage::fillSeriesListBox() if( bHasSelectedEntry && pSelectedEntry ) m_apLB_SERIES->Select( pSelectedEntry ); - m_apLB_SERIES->SetUpdateMode( TRUE ); + m_apLB_SERIES->SetUpdateMode( sal_True ); } void DataSourceTabPage::fillRoleListBox() @@ -521,7 +523,7 @@ void DataSourceTabPage::fillRoleListBox() bool bHasSelectedEntry = (pSeriesEntry != 0); SvLBoxEntry * pRoleEntry = m_aLB_ROLE.FirstSelected(); - ULONG nRoleIndex = SAL_MAX_UINT32; + sal_uLong nRoleIndex = SAL_MAX_UINT32; if( pRoleEntry ) nRoleIndex = m_aLB_ROLE.GetModel()->GetAbsPos( pRoleEntry ); @@ -534,7 +536,7 @@ void DataSourceTabPage::fillRoleListBox() pSeriesEntry->m_xChartType )); // fill role list - m_aLB_ROLE.SetUpdateMode( FALSE ); + m_aLB_ROLE.SetUpdateMode( sal_False ); m_aLB_ROLE.Clear(); m_aLB_ROLE.RemoveSelection(); @@ -552,7 +554,7 @@ void DataSourceTabPage::fillRoleListBox() m_aLB_ROLE.Select( m_aLB_ROLE.GetEntry( nRoleIndex )); } - m_aLB_ROLE.SetUpdateMode( TRUE ); + m_aLB_ROLE.SetUpdateMode( sal_True ); } } @@ -579,7 +581,7 @@ void DataSourceTabPage::updateControlState() m_aFT_DATALABELS.Show(!bHasCategories); m_aFT_CATEGORIES.Show( bHasCategories); - BOOL bShowIB = bHasRangeChooser; + sal_Bool bShowIB = bHasRangeChooser; lcl_ShowChooserButton( m_aIMB_RANGE_CAT, m_aEDT_CATEGORIES, bShowIB ); m_aFT_SERIES.Enable(); diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx index 291e3719a9a0..f606e9899e66 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.hxx +++ b/chart2/source/controller/dialogs/tp_DataSource.hxx @@ -125,12 +125,12 @@ protected: ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XRangeSelectionListener > getSelectionRangeListener(); - /** @return </TRUE>, if the edit field contains a valid range entry. if no - XCellRangesAccess can be obtained, </TRUE> is returned. + /** @return </sal_True>, if the edit field contains a valid range entry. if no + XCellRangesAccess can be obtained, </sal_True> is returned. */ bool isRangeFieldContentValid( Edit & rEdit ); - /** @return </TRUE>, if the tab-page is in a consistent (commitable) state + /** @return </sal_True>, if the tab-page is in a consistent (commitable) state */ bool isValid(); void setDirty(); diff --git a/chart2/source/controller/dialogs/tp_DataSource.src b/chart2/source/controller/dialogs/tp_DataSource.src index 3e1f8a51c68a..9173a9c709ab 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.src +++ b/chart2/source/controller/dialogs/tp_DataSource.src @@ -29,6 +29,7 @@ TabPage TP_DATA_SOURCE { + HelpID = "chart2:TabPage:TP_DATA_SOURCE"; Hide = TRUE; Size = MAP_APPFONT ( 248, 140 ); SVLook = TRUE ; @@ -86,6 +87,7 @@ TabPage TP_DATA_SOURCE }; Edit EDT_RANGE { + HelpID = "chart2:Edit:TP_DATA_SOURCE:EDT_RANGE"; Border = TRUE; TabStop = TRUE; Pos = MAP_APPFONT ( 82 , 89 ); @@ -93,6 +95,7 @@ TabPage TP_DATA_SOURCE }; ImageButton IMB_RANGE_MAIN { + HelpID = "chart2:ImageButton:TP_DATA_SOURCE:IMB_RANGE_MAIN"; TabStop = TRUE; Pos = MAP_APPFONT ( 228 , 88 ); Size = MAP_APPFONT ( 14 , 14 ); @@ -118,6 +121,7 @@ TabPage TP_DATA_SOURCE Edit EDT_CATEGORIES { + HelpID = "chart2:Edit:TP_DATA_SOURCE:EDT_CATEGORIES"; Border = TRUE; TabStop = TRUE; Pos = MAP_APPFONT ( 82 , 117 ); @@ -125,6 +129,7 @@ TabPage TP_DATA_SOURCE }; ImageButton IMB_RANGE_CAT { + HelpID = "chart2:ImageButton:TP_DATA_SOURCE:IMB_RANGE_CAT"; TabStop = TRUE; Pos = MAP_APPFONT ( 228 , 116 ); Size = MAP_APPFONT ( 14 , 14 ); @@ -134,6 +139,7 @@ TabPage TP_DATA_SOURCE PushButton BTN_ADD { + HelpID = "chart2:PushButton:TP_DATA_SOURCE:BTN_ADD"; TabStop = TRUE; Disable = FALSE; Pos = MAP_APPFONT ( 6 , 105 ); @@ -143,6 +149,7 @@ TabPage TP_DATA_SOURCE }; PushButton BTN_REMOVE { + HelpID = "chart2:PushButton:TP_DATA_SOURCE:BTN_REMOVE"; TabStop = TRUE; Disable = TRUE; Pos = MAP_APPFONT ( 6 , 121 ); @@ -154,6 +161,7 @@ TabPage TP_DATA_SOURCE // Note: Text is only a black triangle symbol PushButton BTN_UP { + HelpID = "chart2:PushButton:TP_DATA_SOURCE:BTN_UP"; TabStop = TRUE; Disable = TRUE; Pos = MAP_APPFONT ( 64 , 105 ); @@ -163,6 +171,7 @@ TabPage TP_DATA_SOURCE // Note: Text is only a black triangle symbol PushButton BTN_DOWN { + HelpID = "chart2:PushButton:TP_DATA_SOURCE:BTN_DOWN"; TabStop = TRUE; Disable = TRUE; Pos = MAP_APPFONT ( 64 , 121 ); diff --git a/chart2/source/controller/dialogs/tp_ErrorBars.cxx b/chart2/source/controller/dialogs/tp_ErrorBars.cxx index 14214eb4189a..0c945846af44 100644 --- a/chart2/source/controller/dialogs/tp_ErrorBars.cxx +++ b/chart2/source/controller/dialogs/tp_ErrorBars.cxx @@ -62,7 +62,7 @@ SfxTabPage* ErrorBarsTabPage::Create( return new ErrorBarsTabPage( pParent, rOutAttrs ); } -BOOL ErrorBarsTabPage::FillItemSet( SfxItemSet& rOutAttrs ) +sal_Bool ErrorBarsTabPage::FillItemSet( SfxItemSet& rOutAttrs ) { return m_aErrorBarResources.FillItemSet( rOutAttrs ); } diff --git a/chart2/source/controller/dialogs/tp_ErrorBars.hxx b/chart2/source/controller/dialogs/tp_ErrorBars.hxx index cc581dd7afac..1d7c291f4fb3 100644 --- a/chart2/source/controller/dialogs/tp_ErrorBars.hxx +++ b/chart2/source/controller/dialogs/tp_ErrorBars.hxx @@ -50,7 +50,7 @@ public: ::com::sun::star::chart2::XChartDocument > & xChartDocument ); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs ); - virtual BOOL FillItemSet( SfxItemSet& rOutAttrs ); + virtual sal_Bool FillItemSet( SfxItemSet& rOutAttrs ); virtual void Reset( const SfxItemSet& rInAttrs ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); diff --git a/chart2/source/controller/dialogs/tp_ErrorBars.src b/chart2/source/controller/dialogs/tp_ErrorBars.src index aede04751907..b649cb4474c9 100644 --- a/chart2/source/controller/dialogs/tp_ErrorBars.src +++ b/chart2/source/controller/dialogs/tp_ErrorBars.src @@ -30,6 +30,7 @@ TabPage TP_YERRORBAR { + HelpID = "chart2:TabPage:TP_YERRORBAR"; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 260 , 185 ) ; diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.cxx b/chart2/source/controller/dialogs/tp_LegendPosition.cxx index 9b7d34b72930..8cbdc35b1d44 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.cxx @@ -52,6 +52,7 @@ SchLegendPosTabPage::SchLegendPosTabPage(Window* pWindow, , m_aFtTextDirection( this, SchResId( FT_LEGEND_TEXTDIR ) ) , m_aLbTextDirection( this, SchResId( LB_LEGEND_TEXTDIR ), &m_aFlTextOrient, &m_aFtTextDirection ) { + m_apLegendPositionResources->SetAccessibleRelationMemberOf(&aGrpLegend); FreeResource(); } @@ -65,14 +66,14 @@ SfxTabPage* SchLegendPosTabPage::Create(Window* pWindow, return new SchLegendPosTabPage(pWindow, rOutAttrs); } -BOOL SchLegendPosTabPage::FillItemSet(SfxItemSet& rOutAttrs) +sal_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; + return sal_True; } void SchLegendPosTabPage::Reset(const SfxItemSet& rInAttrs) @@ -80,7 +81,7 @@ 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 ) + if( rInAttrs.GetItemState( EE_PARA_WRITINGDIR, sal_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 521877af30b1..6140e7395623 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.hxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.hxx @@ -58,7 +58,7 @@ public: virtual ~SchLegendPosTabPage(); static SfxTabPage* Create(Window* pParent, const SfxItemSet& rInAttrs); - virtual BOOL FillItemSet(SfxItemSet& rOutAttrs); + virtual sal_Bool FillItemSet(SfxItemSet& rOutAttrs); virtual void Reset(const SfxItemSet& rInAttrs); }; diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.src b/chart2/source/controller/dialogs/tp_LegendPosition.src index 54b1065259df..2b0f93892fa9 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.src +++ b/chart2/source/controller/dialogs/tp_LegendPosition.src @@ -60,6 +60,7 @@ TabPage TP_LEGEND_POS ListBox LB_LEGEND_TEXTDIR { + HelpID = "chart2:ListBox:TP_LEGEND_POS:LB_LEGEND_TEXTDIR"; Pos = MAP_APPFONT ( 78 , 14 + RESOURCE_LEGENDPOSITION_HEIGHT + 17 ) ; Size = MAP_APPFONT ( 170 , 100 ) ; Border = TRUE; diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx index 5dd8f7cb44e6..1dd218a71d30 100644 --- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx @@ -67,7 +67,7 @@ SfxTabPage* SchLayoutTabPage::Create(Window* pWindow, return new SchLayoutTabPage(pWindow, rOutAttrs); } -BOOL SchLayoutTabPage::FillItemSet(SfxItemSet& rOutAttrs) +sal_Bool SchLayoutTabPage::FillItemSet(SfxItemSet& rOutAttrs) { if(m_pGeometryResources && m_pGeometryResources->GetSelectEntryCount()) @@ -82,19 +82,19 @@ BOOL SchLayoutTabPage::FillItemSet(SfxItemSet& rOutAttrs) rOutAttrs.Put(SfxInt32Item(SCHATTR_STYLE_SHAPE,nShape)); rOutAttrs.Put(Svx3DHorizontalSegmentsItem(nSegs)); } - return TRUE; + return sal_True; } void SchLayoutTabPage::Reset(const SfxItemSet& rInAttrs) { const SfxPoolItem *pPoolItem = NULL; - if (rInAttrs.GetItemState(SCHATTR_STYLE_SHAPE,TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_STYLE_SHAPE,sal_True, &pPoolItem) == SFX_ITEM_SET) { long nVal=((const SfxInt32Item*)pPoolItem)->GetValue(); if(m_pGeometryResources) { - m_pGeometryResources->SelectEntryPos(static_cast<USHORT>(nVal)); + m_pGeometryResources->SelectEntryPos(static_cast<sal_uInt16>(nVal)); m_pGeometryResources->Show( true ); } } diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.hxx b/chart2/source/controller/dialogs/tp_PointGeometry.hxx index aafe7856aafe..8a868158cf09 100644 --- a/chart2/source/controller/dialogs/tp_PointGeometry.hxx +++ b/chart2/source/controller/dialogs/tp_PointGeometry.hxx @@ -44,7 +44,7 @@ public: virtual ~SchLayoutTabPage(); static SfxTabPage* Create(Window* pParent, const SfxItemSet& rInAttrs); - virtual BOOL FillItemSet(SfxItemSet& rOutAttrs); + virtual sal_Bool FillItemSet(SfxItemSet& rOutAttrs); virtual void Reset(const SfxItemSet& rInAttrs); private: diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.src b/chart2/source/controller/dialogs/tp_PointGeometry.src index 39e1e1e9e21d..b6862cba3b77 100644 --- a/chart2/source/controller/dialogs/tp_PointGeometry.src +++ b/chart2/source/controller/dialogs/tp_PointGeometry.src @@ -29,6 +29,7 @@ TabPage TP_LAYOUT { + HelpID = "chart2:TabPage:TP_LAYOUT"; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 260 , 185 ) ; diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx index e71f29c54d9f..e1dc637948b6 100644 --- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx +++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx @@ -66,7 +66,7 @@ SfxTabPage* PolarOptionsTabPage::Create( Window* pWindow,const SfxItemSet& rOutA return new PolarOptionsTabPage( pWindow, rOutAttrs ); } -BOOL PolarOptionsTabPage::FillItemSet( SfxItemSet& rOutAttrs ) +sal_Bool PolarOptionsTabPage::FillItemSet( SfxItemSet& rOutAttrs ) { if( m_aAngleDial.IsVisible() ) { @@ -80,14 +80,15 @@ BOOL PolarOptionsTabPage::FillItemSet( SfxItemSet& rOutAttrs ) if (m_aCB_IncludeHiddenCells.IsVisible()) rOutAttrs.Put(SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, m_aCB_IncludeHiddenCells.IsChecked())); - return TRUE; + return sal_True; } void PolarOptionsTabPage::Reset(const SfxItemSet& rInAttrs) { const SfxPoolItem *pPoolItem = NULL; - if (rInAttrs.GetItemState(SCHATTR_STARTING_ANGLE, TRUE, &pPoolItem) == SFX_ITEM_SET) + long nTmp; + if (rInAttrs.GetItemState(SCHATTR_STARTING_ANGLE, sal_True, &pPoolItem) == SFX_ITEM_SET) { long nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue(); @@ -95,29 +96,29 @@ void PolarOptionsTabPage::Reset(const SfxItemSet& rInAttrs) } else { - m_aFL_StartingAngle.Show(FALSE); - m_aAngleDial.Show(FALSE); - m_aNF_StartingAngle.Show(FALSE); - m_aFT_Degrees.Show(FALSE); + m_aFL_StartingAngle.Show(sal_False); + m_aAngleDial.Show(sal_False); + m_aNF_StartingAngle.Show(sal_False); + m_aFT_Degrees.Show(sal_False); } - if (rInAttrs.GetItemState(SCHATTR_CLOCKWISE, TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_CLOCKWISE, sal_True, &pPoolItem) == SFX_ITEM_SET) { - BOOL bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); + sal_Bool bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); m_aCB_Clockwise.Check(bCheck); } else { - m_aCB_Clockwise.Show(FALSE); + m_aCB_Clockwise.Show(sal_False); } - if (rInAttrs.GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, sal_True, &pPoolItem) == SFX_ITEM_SET) { bool bVal = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue(); m_aCB_IncludeHiddenCells.Check(bVal); } else { - m_aCB_IncludeHiddenCells.Show(FALSE); - m_aFL_PlotOptions.Show(FALSE); + m_aCB_IncludeHiddenCells.Show(sal_False); + m_aFL_PlotOptions.Show(sal_False); } } diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.hxx b/chart2/source/controller/dialogs/tp_PolarOptions.hxx index 73ade4a4cecb..51a0e5c9ec3c 100644 --- a/chart2/source/controller/dialogs/tp_PolarOptions.hxx +++ b/chart2/source/controller/dialogs/tp_PolarOptions.hxx @@ -47,7 +47,7 @@ public: virtual ~PolarOptionsTabPage(); static SfxTabPage* Create(Window* pParent, const SfxItemSet& rInAttrs); - virtual BOOL FillItemSet(SfxItemSet& rOutAttrs); + virtual sal_Bool FillItemSet(SfxItemSet& rOutAttrs); virtual void Reset(const SfxItemSet& rInAttrs); private: diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.src b/chart2/source/controller/dialogs/tp_PolarOptions.src index 237fa027b55f..96463a97341b 100644 --- a/chart2/source/controller/dialogs/tp_PolarOptions.src +++ b/chart2/source/controller/dialogs/tp_PolarOptions.src @@ -30,12 +30,14 @@ TabPage TP_POLAROPTIONS { + HelpID = "chart2:TabPage:TP_POLAROPTIONS"; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 260 , 185 ) ; CheckBox CB_CLOCKWISE { + HelpID = "chart2:CheckBox:TP_POLAROPTIONS:CB_CLOCKWISE"; Pos = MAP_APPFONT ( 12 , 8 ); Size = MAP_APPFONT ( 248 , 10 ); TabStop = TRUE; @@ -61,6 +63,7 @@ TabPage TP_POLAROPTIONS }; NumericField NF_STARTING_ANGLE { + HelpID = "chart2:NumericField:TP_POLAROPTIONS:NF_STARTING_ANGLE"; Pos = MAP_APPFONT ( 61 , 53 ) ; Size = MAP_APPFONT ( 28 , 12 ) ; Border = TRUE ; @@ -79,6 +82,7 @@ TabPage TP_POLAROPTIONS }; CheckBox CB_INCLUDE_HIDDEN_CELLS_POLAR { + HelpID = "chart2:CheckBox:TP_POLAROPTIONS:CB_INCLUDE_HIDDEN_CELLS_POLAR"; Pos = MAP_APPFONT ( 12 , 104 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx index 083dd668a1ff..43ba8a16d307 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx @@ -49,7 +49,7 @@ namespace void lcl_ShowChooserButton( ::chart::RangeSelectionButton & rChooserButton, Edit & rEditField, - BOOL bShow ) + sal_Bool bShow ) { if( rChooserButton.IsVisible() != bShow ) { @@ -66,8 +66,8 @@ void lcl_enableRangeChoosing( bool bEnable, Dialog * pDialog ) { if( pDialog ) { - pDialog->Show( bEnable ? FALSE : TRUE ); - pDialog->SetModalInputMode( bEnable ? FALSE : TRUE ); + pDialog->Show( bEnable ? sal_False : sal_True ); + pDialog->SetModalInputMode( bEnable ? sal_False : sal_True ); } } void lcl_shiftControlY( Control & rControl, long nYOffset ) @@ -340,7 +340,7 @@ bool RangeChooserTabPage::isValid() m_aCB_FirstRowAsLabel.Enable( bIsValid ); m_aCB_FirstColumnAsLabel.Enable( bIsValid ); } - BOOL bShowIB = m_rDialogModel.getRangeSelectionHelper()->hasRangeSelection(); + sal_Bool bShowIB = m_rDialogModel.getRangeSelectionHelper()->hasRangeSelection(); lcl_ShowChooserButton( m_aIB_Range, m_aED_Range, bShowIB ); return bIsValid; @@ -365,7 +365,7 @@ IMPL_LINK( RangeChooserTabPage, ChooseRangeHdl, void *, EMPTYARG ) { rtl::OUString aRange = m_aED_Range.GetText(); // using assignment for broken gcc 3.3 - rtl::OUString aTitle = ::rtl::OUString( String( SchResId( STR_PAGE_DATA_RANGE ) )); + rtl::OUString aTitle = String( SchResId( STR_PAGE_DATA_RANGE ) ); lcl_enableRangeChoosing( true, m_pParentDialog ); m_rDialogModel.getRangeSelectionHelper()->chooseRange( aRange, aTitle, *this ); diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.src b/chart2/source/controller/dialogs/tp_RangeChooser.src index de07c9763b7d..962722b41c71 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.src +++ b/chart2/source/controller/dialogs/tp_RangeChooser.src @@ -37,6 +37,7 @@ TabPage TP_RANGECHOOSER { + HelpID = "chart2:TabPage:TP_RANGECHOOSER"; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 248, 140 ) ; @@ -55,18 +56,21 @@ TabPage TP_RANGECHOOSER }; Edit ED_RANGE { + HelpID = "chart2:Edit:TP_RANGECHOOSER:ED_RANGE"; Border = TRUE ; Pos = MAP_APPFONT ( 6 , 32 ) ; Size = MAP_APPFONT ( 220 , 12 ) ; }; ImageButton IB_RANGE { + HelpID = "chart2:ImageButton:TP_RANGECHOOSER:IB_RANGE"; Pos = MAP_APPFONT ( 228 , 31 ) ; Size = MAP_APPFONT ( 14 , 14 ) ; TabStop = FALSE ; }; RadioButton RB_DATAROWS { + HelpID = "chart2:RadioButton:TP_RANGECHOOSER:RB_DATAROWS"; Pos = MAP_APPFONT ( 6 , 52 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -74,6 +78,7 @@ TabPage TP_RANGECHOOSER }; RadioButton RB_DATACOLS { + HelpID = "chart2:RadioButton:TP_RANGECHOOSER:RB_DATACOLS"; Pos = MAP_APPFONT ( 6 , 66 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; TabStop = TRUE ; @@ -81,12 +86,14 @@ TabPage TP_RANGECHOOSER }; CheckBox CB_FIRST_ROW_ASLABELS { + HelpID = "chart2:CheckBox:TP_RANGECHOOSER:CB_FIRST_ROW_ASLABELS"; Pos = MAP_APPFONT ( 6 , 84 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "~First row as label" ; }; CheckBox CB_FIRST_COLUMN_ASLABELS { + HelpID = "chart2:CheckBox:TP_RANGECHOOSER:CB_FIRST_COLUMN_ASLABELS"; Pos = MAP_APPFONT ( 6 , 98 ) ; Size = MAP_APPFONT ( 236 , 10 ) ; Text [ en-US ] = "F~irst column as label" ; diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx index 195be46fedf6..df4a46a13ed6 100644 --- a/chart2/source/controller/dialogs/tp_Scale.cxx +++ b/chart2/source/controller/dialogs/tp_Scale.cxx @@ -29,9 +29,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_chart2.hxx" #include "tp_Scale.hxx" +#include "tp_Scale.hrc" #include "ResId.hxx" -#include "TabPages.hrc" #include "Strings.hrc" #include "chartview/ChartSfxItemIds.hxx" #include "NoWarningThisInCTOR.hxx" @@ -71,6 +71,20 @@ namespace chart namespace { +void lcl_placeControlAtX( Control& rControl, long nNewXPos ) +{ + Point aPos( rControl.GetPosPixel() ); + aPos.X() = nNewXPos; + rControl.SetPosPixel(aPos); +} + +void lcl_placeControlAtY( Control& rControl, long nNewYPos ) +{ + Point aPos( rControl.GetPosPixel() ); + aPos.Y() = nNewYPos; + rControl.SetPosPixel(aPos); +} + void lcl_shiftControls( Control& rEdit, Control& rAuto, long nNewXPos ) { Point aPos( rEdit.GetPosPixel() ); @@ -83,16 +97,15 @@ void lcl_shiftControls( Control& rEdit, Control& rAuto, long nNewXPos ) rAuto.SetPosPixel(aPos); } -void lcl_placeControlsAtY( Control& rTop, Control& rBottom, long nNewYPos ) +long lcl_getLabelDistance( Control& rControl ) { - Point aPos( rTop.GetPosPixel() ); - long nShift = nNewYPos - aPos.Y(); - aPos.Y() = nNewYPos; - rTop.SetPosPixel(aPos); + return rControl.LogicToPixel( Size(RSC_SP_CTRL_DESC_X, 0), MapMode(MAP_APPFONT) ).Width(); +} - aPos = rBottom.GetPosPixel(); - aPos.Y() += nShift; - rBottom.SetPosPixel(aPos); +void lcl_setValue( FormattedField& rFmtField, double fValue ) +{ + rFmtField.SetValue( fValue ); + rFmtField.SetDefaultValue( fValue ); } } @@ -101,32 +114,51 @@ ScaleTabPage::ScaleTabPage(Window* pWindow,const SfxItemSet& rInAttrs) : SfxTabPage(pWindow, SchResId(TP_SCALE), rInAttrs), aFlScale(this, SchResId(FL_SCALE)), + + aCbxReverse(this, SchResId(CBX_REVERSE)), + aCbxLogarithm(this, SchResId(CBX_LOGARITHM)), + + m_aTxt_AxisType(this, SchResId (TXT_AXIS_TYPE)), + m_aLB_AxisType(this, SchResId(LB_AXIS_TYPE)), + aTxtMin (this, SchResId (TXT_MIN)), aFmtFldMin(this, SchResId(EDT_MIN)), aCbxAutoMin(this, SchResId(CBX_AUTO_MIN)), + aTxtMax(this, SchResId (TXT_MAX)), aFmtFldMax(this, SchResId(EDT_MAX)), aCbxAutoMax(this, SchResId(CBX_AUTO_MAX)), + + m_aTxt_TimeResolution(this, SchResId (TXT_TIME_RESOLUTION)), + m_aLB_TimeResolution(this, SchResId(LB_TIME_RESOLUTION)), + m_aCbx_AutoTimeResolution(this, SchResId(CBX_AUTO_TIME_RESOLUTION)), + aTxtMain (this, SchResId (TXT_STEP_MAIN)), aFmtFldStepMain(this, SchResId(EDT_STEP_MAIN)), + m_aMt_MainDateStep(this, SchResId(MT_MAIN_DATE_STEP)), + m_aLB_MainTimeUnit(this, SchResId(LB_MAIN_TIME_UNIT)), aCbxAutoStepMain(this, SchResId(CBX_AUTO_STEP_MAIN)), + + aTxtHelpCount (this, SchResId (TXT_STEP_HELP_COUNT)), aTxtHelp (this, SchResId (TXT_STEP_HELP)), aMtStepHelp (this, SchResId (MT_STEPHELP)), + m_aLB_HelpTimeUnit(this, SchResId(LB_HELP_TIME_UNIT)), aCbxAutoStepHelp(this, SchResId(CBX_AUTO_STEP_HELP)), aTxtOrigin (this, SchResId (TXT_ORIGIN)), aFmtFldOrigin(this, SchResId(EDT_ORIGIN)), aCbxAutoOrigin(this, SchResId(CBX_AUTO_ORIGIN)), - aCbxLogarithm(this, SchResId(CBX_LOGARITHM)), - aCbxReverse(this, SchResId(CBX_REVERSE)), - fMin(0.0), fMax(0.0), fStepMain(0.0), nStepHelp(0), fOrigin(0.0), - nAxisType(chart2::AxisType::REALNUMBER), + m_nTimeResolution(1), + m_nMainTimeUnit(1), + m_nHelpTimeUnit(1), + m_nAxisType(chart2::AxisType::REALNUMBER), + m_bAllowDateAxis(false), pNumFormatter(NULL), m_bShowAxisOrigin(false) { @@ -138,6 +170,26 @@ ScaleTabPage::ScaleTabPage(Window* pWindow,const SfxItemSet& rInAttrs) : aCbxAutoStepMain.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl)); aCbxAutoStepHelp.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl)); aCbxAutoOrigin.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl)); + m_aCbx_AutoTimeResolution.SetClickHdl(LINK(this, ScaleTabPage, EnableValueHdl)); + + m_aLB_AxisType.SetDropDownLineCount(3); + m_aLB_AxisType.SetSelectHdl(LINK(this, ScaleTabPage, SelectAxisTypeHdl)); + + m_aLB_TimeResolution.SetDropDownLineCount(3); + m_aLB_MainTimeUnit.SetDropDownLineCount(3); + m_aLB_HelpTimeUnit.SetDropDownLineCount(3); + + aFmtFldMin.SetModifyHdl(LINK(this, ScaleTabPage, FmtFieldModifiedHdl)); + aFmtFldMax.SetModifyHdl(LINK(this, ScaleTabPage, FmtFieldModifiedHdl)); + aFmtFldStepMain.SetModifyHdl(LINK(this, ScaleTabPage, FmtFieldModifiedHdl)); + aFmtFldOrigin.SetModifyHdl(LINK(this, ScaleTabPage, FmtFieldModifiedHdl)); +} + +IMPL_LINK( ScaleTabPage, FmtFieldModifiedHdl, FormattedField*, pFmtFied ) +{ + if( pFmtFied ) + pFmtFied->SetDefaultValue( pFmtFied->GetValue() ); + return 0; } void ScaleTabPage::StateChanged( StateChangedType nType ) @@ -154,10 +206,13 @@ void ScaleTabPage::AdjustControlPositions() long nLabelWidth = ::std::max( aTxtMin.CalcMinimumSize().Width(), aTxtMax.CalcMinimumSize().Width() ); nLabelWidth = ::std::max( aTxtMain.CalcMinimumSize().Width(), nLabelWidth ); nLabelWidth = ::std::max( aTxtHelp.CalcMinimumSize().Width(), nLabelWidth ); + nLabelWidth = ::std::max( aTxtHelpCount.CalcMinimumSize().Width(), nLabelWidth ); nLabelWidth = ::std::max( aTxtOrigin.CalcMinimumSize().Width(), nLabelWidth ); + nLabelWidth = ::std::max( m_aTxt_TimeResolution.CalcMinimumSize().Width(), nLabelWidth ); + nLabelWidth = ::std::max( m_aTxt_AxisType.CalcMinimumSize().Width(), nLabelWidth ); nLabelWidth+=1; - long nLabelDistance = aTxtMin.LogicToPixel( Size(RSC_SP_CTRL_DESC_X, 0), MapMode(MAP_APPFONT) ).Width(); + long nLabelDistance = lcl_getLabelDistance(aTxtMin); long nNewXPos = aTxtMin.GetPosPixel().X() + nLabelWidth + nLabelDistance; //ensure that the auto checkboxes are wide enough and have correct size for calculation @@ -166,9 +221,10 @@ void ScaleTabPage::AdjustControlPositions() aCbxAutoStepMain.SetSizePixel( aCbxAutoStepMain.CalcMinimumSize() ); aCbxAutoStepHelp.SetSizePixel( aCbxAutoStepHelp.CalcMinimumSize() ); aCbxAutoOrigin.SetSizePixel( aCbxAutoOrigin.CalcMinimumSize() ); + m_aCbx_AutoTimeResolution.SetSizePixel( m_aCbx_AutoTimeResolution.CalcMinimumSize() ); //ensure new pos is ok - long nWidthOfOtherControls = aCbxAutoMin.GetPosPixel().X() + aCbxAutoMin.GetSizePixel().Width() - aFmtFldMin.GetPosPixel().X(); + long nWidthOfOtherControls = m_aLB_MainTimeUnit.GetPosPixel().X() + m_aLB_MainTimeUnit.GetSizePixel().Width() - aFmtFldMin.GetPosPixel().X(); long nDialogWidth = GetSizePixel().Width(); long nLeftSpace = nDialogWidth - nNewXPos - nWidthOfOtherControls; @@ -180,85 +236,201 @@ void ScaleTabPage::AdjustControlPositions() aTxtMax.SetSizePixel(aSize); aTxtMain.SetSizePixel(aSize); aTxtHelp.SetSizePixel(aSize); + aTxtHelpCount.SetSizePixel(aSize); aTxtOrigin.SetSizePixel(aSize); + m_aTxt_TimeResolution.SetSizePixel(aSize); + m_aTxt_AxisType.SetSizePixel(aSize); + + long nOrgAutoCheckX = aCbxAutoMin.GetPosPixel().X(); + lcl_placeControlAtX( aCbxAutoStepMain, nOrgAutoCheckX ); + lcl_placeControlAtX( aCbxAutoStepHelp, nOrgAutoCheckX ); lcl_shiftControls( aFmtFldMin, aCbxAutoMin, nNewXPos ); lcl_shiftControls( aFmtFldMax, aCbxAutoMax, nNewXPos ); lcl_shiftControls( aFmtFldStepMain, aCbxAutoStepMain, nNewXPos ); + lcl_placeControlAtX( m_aMt_MainDateStep, aFmtFldStepMain.GetPosPixel().X() ); lcl_shiftControls( aMtStepHelp, aCbxAutoStepHelp, nNewXPos ); lcl_shiftControls( aFmtFldOrigin, aCbxAutoOrigin, nNewXPos ); + lcl_shiftControls( m_aLB_TimeResolution, m_aCbx_AutoTimeResolution, nNewXPos ); + lcl_placeControlAtX( m_aLB_AxisType, nNewXPos ); + + nNewXPos = aCbxAutoStepMain.GetPosPixel().X() + aCbxAutoStepMain.GetSizePixel().Width() + nLabelDistance; + lcl_placeControlAtX( m_aLB_MainTimeUnit, nNewXPos ); + lcl_placeControlAtX( m_aLB_HelpTimeUnit, nNewXPos ); } + PlaceIntervalControlsAccordingToAxisType(); } -void ScaleTabPage::EnableControls() +void ScaleTabPage::PlaceIntervalControlsAccordingToAxisType() { - bool bEnableForValueOrPercentAxis = chart2::AxisType::REALNUMBER == nAxisType || chart2::AxisType::PERCENT == nAxisType; - aFlScale.Enable( bEnableForValueOrPercentAxis ); - aTxtMin.Enable( bEnableForValueOrPercentAxis ); - aFmtFldMin.Enable( bEnableForValueOrPercentAxis ); - aCbxAutoMin.Enable( bEnableForValueOrPercentAxis ); - aTxtMax.Enable( bEnableForValueOrPercentAxis ); - aFmtFldMax.Enable( bEnableForValueOrPercentAxis ); - aCbxAutoMax.Enable( bEnableForValueOrPercentAxis ); - aTxtMain.Enable( bEnableForValueOrPercentAxis ); - aFmtFldStepMain.Enable( bEnableForValueOrPercentAxis ); - aCbxAutoStepMain.Enable( bEnableForValueOrPercentAxis ); - aTxtHelp.Enable( bEnableForValueOrPercentAxis ); - aMtStepHelp.Enable( bEnableForValueOrPercentAxis ); - aCbxAutoStepHelp.Enable( bEnableForValueOrPercentAxis ); - aCbxLogarithm.Enable( bEnableForValueOrPercentAxis ); - - aTxtOrigin.Show( m_bShowAxisOrigin && bEnableForValueOrPercentAxis ); - aFmtFldOrigin.Show( m_bShowAxisOrigin && bEnableForValueOrPercentAxis ); - aCbxAutoOrigin.Show( m_bShowAxisOrigin && bEnableForValueOrPercentAxis ); - - long nNewYPos = aTxtOrigin.GetPosPixel().Y(); - if( m_bShowAxisOrigin ) - nNewYPos += ( aTxtOrigin.GetPosPixel().Y() - aTxtHelp.GetPosPixel().Y() ); - lcl_placeControlsAtY( aCbxLogarithm, aCbxReverse, nNewYPos ); + long nMinX = std::min( aCbxAutoStepMain.GetPosPixel().X(), m_aLB_MainTimeUnit.GetPosPixel().X() ); + long nLabelDistance = lcl_getLabelDistance(aTxtMin); + long nListWidth = m_aLB_MainTimeUnit.GetSizePixel().Width(); + + if( chart2::AxisType::DATE == m_nAxisType ) + { + lcl_placeControlAtX( m_aLB_MainTimeUnit, nMinX ); + lcl_placeControlAtX( m_aLB_HelpTimeUnit, nMinX ); + long nSecondX = nMinX + nListWidth + nLabelDistance; + lcl_placeControlAtX( aCbxAutoStepMain, nSecondX ); + lcl_placeControlAtX( aCbxAutoStepHelp, nSecondX ); + + long nOne = m_aMt_MainDateStep.LogicToPixel( Size(0, 1), MapMode(MAP_APPFONT) ).Height(); + + long nYMajor = m_aMt_MainDateStep.GetPosPixel().Y(); + lcl_placeControlAtY( aCbxAutoStepMain , nYMajor+(3*nOne)); + lcl_placeControlAtY( aTxtMain , nYMajor+nOne+nOne); + + long nYMinor = m_aLB_HelpTimeUnit.GetPosPixel().Y(); + lcl_placeControlAtY( aMtStepHelp , nYMinor ); + lcl_placeControlAtY( aCbxAutoStepHelp , nYMinor+(3*nOne)); + } + else + { + lcl_placeControlAtX( aCbxAutoStepMain, nMinX ); + lcl_placeControlAtX( aCbxAutoStepHelp, nMinX ); + long nSecondX = nMinX + aCbxAutoStepMain.GetSizePixel().Width() + nLabelDistance; + long nSecondXMax = GetSizePixel().Width() - nListWidth; + if( nSecondX > nSecondXMax ) + nSecondX = nSecondXMax; + lcl_placeControlAtX( m_aLB_MainTimeUnit, nSecondX ); + lcl_placeControlAtX( m_aLB_HelpTimeUnit, nSecondX ); + } } +void ScaleTabPage::EnableControls() +{ + bool bValueAxis = chart2::AxisType::REALNUMBER == m_nAxisType || chart2::AxisType::PERCENT == m_nAxisType || chart2::AxisType::DATE == m_nAxisType; + bool bDateAxis = chart2::AxisType::DATE == m_nAxisType; + + m_aTxt_AxisType.Show(m_bAllowDateAxis); + m_aLB_AxisType.Show(m_bAllowDateAxis); + + aCbxLogarithm.Show( bValueAxis && !bDateAxis ); + aTxtMin.Show( bValueAxis ); + aFmtFldMin.Show( bValueAxis ); + aCbxAutoMin.Show( bValueAxis ); + aTxtMax.Show( bValueAxis ); + aFmtFldMax.Show( bValueAxis ); + aCbxAutoMax.Show( bValueAxis ); + aTxtMain.Show( bValueAxis ); + aFmtFldStepMain.Show( bValueAxis ); + aCbxAutoStepMain.Show( bValueAxis ); + aTxtHelp.Show( bValueAxis ); + aTxtHelpCount.Show( bValueAxis ); + aMtStepHelp.Show( bValueAxis ); + aCbxAutoStepHelp.Show( bValueAxis ); + + aTxtOrigin.Show( m_bShowAxisOrigin && bValueAxis ); + aFmtFldOrigin.Show( m_bShowAxisOrigin && bValueAxis ); + aCbxAutoOrigin.Show( m_bShowAxisOrigin && bValueAxis ); + + aTxtHelpCount.Show( bValueAxis && !bDateAxis ); + aTxtHelp.Show( bDateAxis ); + + m_aTxt_TimeResolution.Show( bDateAxis ); + m_aLB_TimeResolution.Show( bDateAxis ); + m_aCbx_AutoTimeResolution.Show( bDateAxis ); + + bool bWasDateAxis = m_aMt_MainDateStep.IsVisible(); + if( bWasDateAxis != bDateAxis ) + { + //transport value from one to other control + if( bWasDateAxis ) + lcl_setValue( aFmtFldStepMain, m_aMt_MainDateStep.GetValue() ); + else + m_aMt_MainDateStep.SetValue( static_cast<sal_Int32>(aFmtFldStepMain.GetValue()) ); + } + aFmtFldStepMain.Show( bValueAxis && !bDateAxis ); + m_aMt_MainDateStep.Show( bDateAxis ); + + m_aLB_MainTimeUnit.Show( bDateAxis ); + m_aLB_HelpTimeUnit.Show( bDateAxis ); + EnableValueHdl(&aCbxAutoMin); + EnableValueHdl(&aCbxAutoMax); + EnableValueHdl(&aCbxAutoStepMain); + EnableValueHdl(&aCbxAutoStepHelp); + EnableValueHdl(&aCbxAutoOrigin); + EnableValueHdl(&m_aCbx_AutoTimeResolution); +} IMPL_LINK( ScaleTabPage, EnableValueHdl, CheckBox *, pCbx ) { + bool bEnable = pCbx && !pCbx->IsChecked() && pCbx->IsEnabled(); if (pCbx == &aCbxAutoMin) { - aFmtFldMin.Enable(!aCbxAutoMin.IsChecked()); + aFmtFldMin.Enable( bEnable ); } else if (pCbx == &aCbxAutoMax) { - aFmtFldMax.Enable(!aCbxAutoMax.IsChecked()); + aFmtFldMax.Enable( bEnable ); } else if (pCbx == &aCbxAutoStepMain) { - aFmtFldStepMain.Enable(!aCbxAutoStepMain.IsChecked()); + aFmtFldStepMain.Enable( bEnable ); + m_aMt_MainDateStep.Enable( bEnable ); + m_aLB_MainTimeUnit.Enable( bEnable ); } else if (pCbx == &aCbxAutoStepHelp) { - aMtStepHelp.Show (); - aMtStepHelp.Enable( ! aCbxAutoStepHelp.IsChecked() ); + aMtStepHelp.Enable( bEnable ); + m_aLB_HelpTimeUnit.Enable( bEnable ); + } + else if (pCbx == &m_aCbx_AutoTimeResolution) + { + m_aLB_TimeResolution.Enable( bEnable ); } else if (pCbx == &aCbxAutoOrigin) { - aFmtFldOrigin.Enable(!aCbxAutoOrigin.IsChecked()); + aFmtFldOrigin.Enable( bEnable ); } return 0; } +enum AxisTypeListBoxEntry +{ + TYPE_AUTO=0, + TYPE_TEXT=1, + TYPE_DATE=2 +}; + +IMPL_LINK( ScaleTabPage, SelectAxisTypeHdl, void *, EMPTYARG ) +{ + sal_uInt16 nPos = m_aLB_AxisType.GetSelectEntryPos(); + if( nPos==TYPE_DATE ) + m_nAxisType = chart2::AxisType::DATE; + else + m_nAxisType = chart2::AxisType::CATEGORY; + if( chart2::AxisType::DATE == m_nAxisType ) + aCbxLogarithm.Check(false); + EnableControls(); + PlaceIntervalControlsAccordingToAxisType(); + SetNumFormat(); + return 0; +} + SfxTabPage* ScaleTabPage::Create(Window* pWindow,const SfxItemSet& rOutAttrs) { return new ScaleTabPage(pWindow, rOutAttrs); } -BOOL ScaleTabPage::FillItemSet(SfxItemSet& rOutAttrs) +sal_Bool ScaleTabPage::FillItemSet(SfxItemSet& rOutAttrs) { DBG_ASSERT( pNumFormatter, "No NumberFormatter available" ); - rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_MIN ,aCbxAutoMin.IsChecked())); - rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_MAX ,aCbxAutoMax.IsChecked())); - rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_HELP,aCbxAutoStepHelp.IsChecked())); - rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_ORIGIN ,aCbxAutoOrigin.IsChecked())); + rOutAttrs.Put(SfxInt32Item(SCHATTR_AXISTYPE, m_nAxisType)); + if(m_bAllowDateAxis) + rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_DATEAXIS, TYPE_AUTO==m_aLB_AxisType.GetSelectEntryPos())); + + bool bAutoScale = false; + if( m_nAxisType==chart2::AxisType::CATEGORY ) + bAutoScale = true;//reset scaling for category charts + + rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_MIN ,bAutoScale || aCbxAutoMin.IsChecked())); + rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_MAX ,bAutoScale || aCbxAutoMax.IsChecked())); + rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_HELP,bAutoScale || aCbxAutoStepHelp.IsChecked())); + rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_ORIGIN ,bAutoScale || aCbxAutoOrigin.IsChecked())); rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_LOGARITHM ,aCbxLogarithm.IsChecked())); rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_REVERSE ,aCbxReverse.IsChecked())); rOutAttrs.Put(SvxDoubleItem(fMax , SCHATTR_AXIS_MAX)); @@ -266,10 +438,16 @@ BOOL ScaleTabPage::FillItemSet(SfxItemSet& rOutAttrs) rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_STEP_HELP, nStepHelp)); rOutAttrs.Put(SvxDoubleItem(fOrigin , SCHATTR_AXIS_ORIGIN)); - rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_MAIN,aCbxAutoStepMain.IsChecked())); + rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_STEP_MAIN,bAutoScale || aCbxAutoStepMain.IsChecked())); rOutAttrs.Put(SvxDoubleItem(fStepMain,SCHATTR_AXIS_STEP_MAIN)); - return TRUE; + rOutAttrs.Put(SfxBoolItem(SCHATTR_AXIS_AUTO_TIME_RESOLUTION,bAutoScale || m_aCbx_AutoTimeResolution.IsChecked())); + rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_TIME_RESOLUTION,m_nTimeResolution)); + + rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_MAIN_TIME_UNIT,m_nMainTimeUnit)); + rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS_HELP_TIME_UNIT,m_nHelpTimeUnit)); + + return sal_True; } void ScaleTabPage::Reset(const SfxItemSet& rInAttrs) @@ -279,63 +457,110 @@ void ScaleTabPage::Reset(const SfxItemSet& rInAttrs) return; const SfxPoolItem *pPoolItem = NULL; - nAxisType=chart2::AxisType::REALNUMBER; - if (rInAttrs.GetItemState(SCHATTR_AXISTYPE, TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_AXIS_ALLOW_DATEAXIS, sal_True, &pPoolItem) == SFX_ITEM_SET) + m_bAllowDateAxis = (bool) ((const SfxBoolItem*)pPoolItem)->GetValue(); + m_nAxisType=chart2::AxisType::REALNUMBER; + if (rInAttrs.GetItemState(SCHATTR_AXISTYPE, sal_True, &pPoolItem) == SFX_ITEM_SET) + m_nAxisType = (int) ((const SfxInt32Item*)pPoolItem)->GetValue(); + if( m_nAxisType==chart2::AxisType::DATE && !m_bAllowDateAxis ) + m_nAxisType=chart2::AxisType::CATEGORY; + if( m_bAllowDateAxis ) { - nAxisType = (int) ((const SfxInt32Item*)pPoolItem)->GetValue(); - EnableControls(); + bool bAutoDateAxis = false; + if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_DATEAXIS, sal_True, &pPoolItem) == SFX_ITEM_SET) + bAutoDateAxis = (bool) ((const SfxBoolItem*)pPoolItem)->GetValue(); + + sal_uInt16 nPos = 0; + if( m_nAxisType==chart2::AxisType::DATE ) + nPos=TYPE_DATE; + else if( bAutoDateAxis ) + nPos=TYPE_AUTO; + else + nPos=TYPE_TEXT; + m_aLB_AxisType.SelectEntryPos( nPos ); } - if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_MIN,TRUE,&pPoolItem) == SFX_ITEM_SET) + if( m_bAllowDateAxis ) + aCbxReverse.SetHelpId("chart2:CheckBox:TP_SCALE:CBX_REVERSE:MayBeDateAxis"); + else if( m_nAxisType==chart2::AxisType::CATEGORY || m_nAxisType==chart2::AxisType::SERIES ) + aCbxReverse.SetHelpId("chart2:CheckBox:TP_SCALE:CBX_REVERSE:Category"); + + PlaceIntervalControlsAccordingToAxisType(); + + aCbxAutoMin.Check( true ); + aCbxAutoMax.Check( true ); + aCbxAutoStepMain.Check( true ); + aCbxAutoStepHelp.Check( true ); + aCbxAutoOrigin.Check( true ); + m_aCbx_AutoTimeResolution.Check( true ); + + if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_MIN,sal_True,&pPoolItem) == SFX_ITEM_SET) aCbxAutoMin.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs.GetItemState(SCHATTR_AXIS_MIN,TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_AXIS_MIN,sal_True, &pPoolItem) == SFX_ITEM_SET) { fMin = ((const SvxDoubleItem*)pPoolItem)->GetValue(); - aFmtFldMin.SetValue( fMin ); + lcl_setValue( aFmtFldMin, fMin ); } - if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_MAX,TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_MAX,sal_True, &pPoolItem) == SFX_ITEM_SET) aCbxAutoMax.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs.GetItemState(SCHATTR_AXIS_MAX,TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_AXIS_MAX,sal_True, &pPoolItem) == SFX_ITEM_SET) { fMax = ((const SvxDoubleItem*)pPoolItem)->GetValue(); - aFmtFldMax.SetValue( fMax ); + lcl_setValue( aFmtFldMax, fMax ); } - if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_STEP_MAIN,TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_STEP_MAIN,sal_True, &pPoolItem) == SFX_ITEM_SET) aCbxAutoStepMain.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs.GetItemState(SCHATTR_AXIS_STEP_MAIN,TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_AXIS_STEP_MAIN,sal_True, &pPoolItem) == SFX_ITEM_SET) { fStepMain = ((const SvxDoubleItem*)pPoolItem)->GetValue(); - aFmtFldStepMain.SetValue( fStepMain ); + lcl_setValue( aFmtFldStepMain, fStepMain ); + m_aMt_MainDateStep.SetValue( static_cast<sal_Int32>(fStepMain) ); } - if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_STEP_HELP,TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_STEP_HELP,sal_True, &pPoolItem) == SFX_ITEM_SET) aCbxAutoStepHelp.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs.GetItemState(SCHATTR_AXIS_LOGARITHM,TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_AXIS_LOGARITHM,sal_True, &pPoolItem) == SFX_ITEM_SET) aCbxLogarithm.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs.GetItemState(SCHATTR_AXIS_REVERSE,TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_AXIS_REVERSE,sal_True, &pPoolItem) == SFX_ITEM_SET) aCbxReverse.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs.GetItemState(SCHATTR_AXIS_STEP_HELP,TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_AXIS_STEP_HELP,sal_True, &pPoolItem) == SFX_ITEM_SET) { nStepHelp = ((const SfxInt32Item*)pPoolItem)->GetValue(); aMtStepHelp.SetValue( nStepHelp ); } - if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_ORIGIN,TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_ORIGIN,sal_True, &pPoolItem) == SFX_ITEM_SET) aCbxAutoOrigin.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); - if (rInAttrs.GetItemState(SCHATTR_AXIS_ORIGIN,TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_AXIS_ORIGIN,sal_True, &pPoolItem) == SFX_ITEM_SET) { fOrigin = ((const SvxDoubleItem*)pPoolItem)->GetValue(); - aFmtFldOrigin.SetValue( fOrigin ); + lcl_setValue( aFmtFldOrigin, fOrigin ); } - EnableValueHdl(&aCbxAutoMin); - EnableValueHdl(&aCbxAutoMax); - EnableValueHdl(&aCbxAutoStepMain); - EnableValueHdl(&aCbxAutoStepHelp); - EnableValueHdl(&aCbxAutoOrigin); + if (rInAttrs.GetItemState(SCHATTR_AXIS_AUTO_TIME_RESOLUTION,sal_True, &pPoolItem) == SFX_ITEM_SET) + m_aCbx_AutoTimeResolution.Check(((const SfxBoolItem*)pPoolItem)->GetValue()); + if (rInAttrs.GetItemState(SCHATTR_AXIS_TIME_RESOLUTION,sal_True, &pPoolItem) == SFX_ITEM_SET) + { + m_nTimeResolution = ((const SfxInt32Item*)pPoolItem)->GetValue(); + m_aLB_TimeResolution.SelectEntryPos( m_nTimeResolution ); + } + + if (rInAttrs.GetItemState(SCHATTR_AXIS_MAIN_TIME_UNIT,sal_True, &pPoolItem) == SFX_ITEM_SET) + { + m_nMainTimeUnit = ((const SfxInt32Item*)pPoolItem)->GetValue(); + m_aLB_MainTimeUnit.SelectEntryPos( m_nMainTimeUnit ); + } + if (rInAttrs.GetItemState(SCHATTR_AXIS_HELP_TIME_UNIT,sal_True, &pPoolItem) == SFX_ITEM_SET) + { + m_nHelpTimeUnit = ((const SfxInt32Item*)pPoolItem)->GetValue(); + m_aLB_HelpTimeUnit.SelectEntryPos( m_nHelpTimeUnit ); + } + + EnableControls(); + SetNumFormat(); } int ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet) @@ -346,84 +571,116 @@ int ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet) return LEAVE_PAGE; } + bool bDateAxis = chart2::AxisType::DATE == m_nAxisType; + sal_uInt32 nIndex = pNumFormatter->GetStandardIndex(LANGUAGE_SYSTEM); const SfxPoolItem *pPoolItem = NULL; - if( GetItemSet().GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + if( GetItemSet().GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, sal_True, &pPoolItem ) == SFX_ITEM_SET ) nIndex = static_cast< sal_uInt32 >( static_cast< const SfxInt32Item* >(pPoolItem)->GetValue()); else { OSL_ENSURE( false, "Using Standard Language" ); } - Edit* pEdit = NULL; - USHORT nErrStrId = 0; + Control* pControl = NULL; + sal_uInt16 nErrStrId = 0; double fDummy; fMax = aFmtFldMax.GetValue(); fMin = aFmtFldMin.GetValue(); fOrigin = aFmtFldOrigin.GetValue(); - fStepMain = aFmtFldStepMain.GetValue(); + fStepMain = bDateAxis ? m_aMt_MainDateStep.GetValue() : aFmtFldStepMain.GetValue(); nStepHelp = static_cast< sal_Int32 >( aMtStepHelp.GetValue()); + m_nTimeResolution = m_aLB_TimeResolution.GetSelectEntryPos(); + m_nMainTimeUnit = m_aLB_MainTimeUnit.GetSelectEntryPos(); + m_nHelpTimeUnit = m_aLB_HelpTimeUnit.GetSelectEntryPos(); + + if( chart2::AxisType::REALNUMBER != m_nAxisType ) + aCbxLogarithm.Show( false ); + + //check wich entries need user action - //do some reasonable automatic correction of user input if necessary - if (!aCbxAutoMax.IsChecked() && !aCbxAutoMin.IsChecked() && - fMin >= fMax) - { - pEdit = &aFmtFldMin; - nErrStrId = STR_MIN_GREATER_MAX; - } - // check for entries in invalid ranges if ( aCbxLogarithm.IsChecked() && ( ( !aCbxAutoMin.IsChecked() && fMin <= 0.0 ) || ( !aCbxAutoMax.IsChecked() && fMax <= 0.0 ) ) ) { - pEdit = &aFmtFldMin; + pControl = &aFmtFldMin; nErrStrId = STR_BAD_LOGARITHM; } - if (!aCbxAutoStepMain.IsChecked() && fStepMain <= 0) + else if (!aCbxAutoMax.IsChecked() && !aCbxAutoMin.IsChecked() && + fMin >= fMax) + { + pControl = &aFmtFldMin; + nErrStrId = STR_MIN_GREATER_MAX; + } + else if (!aCbxAutoStepMain.IsChecked() && fStepMain <= 0) { - pEdit = &aFmtFldStepMain; + pControl = &aFmtFldStepMain; nErrStrId = STR_STEP_GT_ZERO; } - - //check wich entries need user action - // check for entries that cannot be parsed for the current number format - if ( aFmtFldMin.IsModified() + else if ( aFmtFldMin.IsModified() && !aCbxAutoMin.IsChecked() && !pNumFormatter->IsNumberFormat(aFmtFldMin.GetText(), nIndex, fDummy)) { - pEdit = &aFmtFldMin; + pControl = &aFmtFldMin; nErrStrId = STR_INVALID_NUMBER; } else if (aFmtFldMax.IsModified() && !aCbxAutoMax.IsChecked() && !pNumFormatter->IsNumberFormat(aFmtFldMax.GetText(), nIndex, fDummy)) { - pEdit = &aFmtFldMax; + pControl = &aFmtFldMax; nErrStrId = STR_INVALID_NUMBER; } - else if (aFmtFldStepMain.IsModified() && !aCbxAutoStepMain.IsChecked() && + else if ( !bDateAxis && aFmtFldStepMain.IsModified() && !aCbxAutoStepMain.IsChecked() && !pNumFormatter->IsNumberFormat(aFmtFldStepMain.GetText(), nIndex, fDummy)) { - pEdit = &aFmtFldStepMain; + pControl = &aFmtFldStepMain; nErrStrId = STR_STEP_GT_ZERO; } else if (aFmtFldOrigin.IsModified() && !aCbxAutoOrigin.IsChecked() && !pNumFormatter->IsNumberFormat(aFmtFldOrigin.GetText(), nIndex, fDummy)) { - pEdit = &aFmtFldOrigin; + pControl = &aFmtFldOrigin; nErrStrId = STR_INVALID_NUMBER; } else if (!aCbxAutoStepMain.IsChecked() && fStepMain <= 0.0) { - pEdit = &aFmtFldStepMain; + pControl = &aFmtFldStepMain; nErrStrId = STR_STEP_GT_ZERO; } + else if( bDateAxis ) + { + if( !aCbxAutoStepMain.IsChecked() && !aCbxAutoStepHelp.IsChecked() ) + { + if( m_nHelpTimeUnit > m_nMainTimeUnit ) + { + pControl = &m_aLB_MainTimeUnit; + nErrStrId = STR_INVALID_INTERVALS; + } + else if( m_nHelpTimeUnit == m_nMainTimeUnit && nStepHelp > fStepMain ) + { + pControl = &m_aLB_MainTimeUnit; + nErrStrId = STR_INVALID_INTERVALS; + } + } + if( !nErrStrId && !m_aCbx_AutoTimeResolution.IsChecked() ) + { + if( (!aCbxAutoStepMain.IsChecked() && m_nTimeResolution > m_nMainTimeUnit ) + || + (!aCbxAutoStepHelp.IsChecked() && m_nTimeResolution > m_nHelpTimeUnit ) + ) + { + pControl = &m_aLB_TimeResolution; + nErrStrId = STR_INVALID_TIME_UNIT; + } + } + } - if( ShowWarning( nErrStrId, pEdit ) ) + if( ShowWarning( nErrStrId, pControl ) ) return KEEP_PAGE; if( pItemSet ) @@ -456,9 +713,9 @@ void ScaleTabPage::SetNumFormat() { const SfxPoolItem *pPoolItem = NULL; - if( GetItemSet().GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, TRUE, &pPoolItem ) == SFX_ITEM_SET ) + if( GetItemSet().GetItemState( SID_ATTR_NUMBERFORMAT_VALUE, sal_True, &pPoolItem ) == SFX_ITEM_SET ) { - ULONG nFmt = (ULONG)((const SfxInt32Item*)pPoolItem)->GetValue(); + sal_uLong nFmt = (sal_uLong)((const SfxInt32Item*)pPoolItem)->GetValue(); aFmtFldMax.SetFormatKey( nFmt ); aFmtFldMin.SetFormatKey( nFmt ); @@ -485,6 +742,19 @@ void ScaleTabPage::SetNumFormat() else nFmt = pNumFormatter->GetStandardFormat( NUMBERFORMAT_TIME ); } + + if( chart2::AxisType::DATE == m_nAxisType && ( eType != NUMBERFORMAT_DATE && eType != NUMBERFORMAT_DATETIME) ) + { + const SvNumberformat* pFormat = pNumFormatter->GetEntry( nFmt ); + if( pFormat ) + nFmt = pNumFormatter->GetStandardFormat( NUMBERFORMAT_DATE, pFormat->GetLanguage() ); + else + nFmt = pNumFormatter->GetStandardFormat( NUMBERFORMAT_DATE ); + + aFmtFldMax.SetFormatKey( nFmt ); + aFmtFldMin.SetFormatKey( nFmt ); + aFmtFldOrigin.SetFormatKey( nFmt ); + } } aFmtFldStepMain.SetFormatKey( nFmt ); @@ -498,7 +768,7 @@ void ScaleTabPage::ShowAxisOrigin( bool bShowOrigin ) m_bShowAxisOrigin = true; } -bool ScaleTabPage::ShowWarning( USHORT nResIdMessage, Edit * pControl /* = NULL */ ) +bool ScaleTabPage::ShowWarning( sal_uInt16 nResIdMessage, Control* pControl /* = NULL */ ) { if( nResIdMessage == 0 ) return false; @@ -507,7 +777,9 @@ bool ScaleTabPage::ShowWarning( USHORT nResIdMessage, Edit * pControl /* = NULL if( pControl ) { pControl->GrabFocus(); - pControl->SetSelection( Selection( 0, SELECTION_MAX )); + Edit* pEdit = dynamic_cast<Edit*>(pControl); + if(pEdit) + pEdit->SetSelection( Selection( 0, SELECTION_MAX )); } return true; } diff --git a/chart2/source/controller/dialogs/tp_Scale.hrc b/chart2/source/controller/dialogs/tp_Scale.hrc new file mode 100644 index 000000000000..bde6c21c7924 --- /dev/null +++ b/chart2/source/controller/dialogs/tp_Scale.hrc @@ -0,0 +1,63 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * 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. + * + ************************************************************************/ + +#include "ResourceIds.hrc" + +#define FL_SCALE 1 + +#define TXT_MIN 1 +#define TXT_MAX 2 +#define TXT_STEP_MAIN 3 +#define TXT_STEP_HELP_COUNT 4 +#define TXT_ORIGIN 5 +#define TXT_TIME_RESOLUTION 6 +#define TXT_AXIS_TYPE 7 +#define TXT_STEP_HELP 8 + +#define CBX_AUTO_MIN 1 +#define CBX_AUTO_MAX 2 +#define CBX_AUTO_STEP_MAIN 3 +#define CBX_AUTO_STEP_HELP 4 +#define CBX_AUTO_ORIGIN 5 +#define CBX_LOGARITHM 6 +#define CBX_REVERSE 7 +#define CBX_AUTO_TIME_RESOLUTION 8 + +#define EDT_STEP_MAIN 1 +#define EDT_MAX 2 +#define EDT_MIN 3 +#define EDT_ORIGIN 4 + +#define MT_STEPHELP 10 +#define MT_MAIN_DATE_STEP 11 + +#define LB_AXIS_TYPE 1 +#define LB_MAIN_TIME_UNIT 2 +#define LB_HELP_TIME_UNIT 3 +#define LB_TIME_RESOLUTION 4 + +#define STR_LIST_TIME_UNIT 1 diff --git a/chart2/source/controller/dialogs/tp_Scale.hxx b/chart2/source/controller/dialogs/tp_Scale.hxx index 47745657dd53..f062ed438383 100644 --- a/chart2/source/controller/dialogs/tp_Scale.hxx +++ b/chart2/source/controller/dialogs/tp_Scale.hxx @@ -38,6 +38,8 @@ #include <vcl/button.hxx> // header for MetricField #include <vcl/field.hxx> +// header for class ListBox +#include <vcl/lstbox.hxx> //............................................................................. namespace chart @@ -50,7 +52,7 @@ public: ScaleTabPage( Window* pParent, const SfxItemSet& rInAttrs ); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs ); - virtual BOOL FillItemSet( SfxItemSet& rOutAttrs ); + virtual sal_Bool FillItemSet( SfxItemSet& rOutAttrs ); virtual void Reset( const SfxItemSet& rInAttrs ); using TabPage::DeactivatePage; virtual int DeactivatePage( SfxItemSet* pItemSet = NULL ); @@ -65,6 +67,13 @@ public: private: FixedLine aFlScale; + CheckBox aCbxReverse; + + CheckBox aCbxLogarithm; + + FixedText m_aTxt_AxisType; + ListBox m_aLB_AxisType; + FixedText aTxtMin; FormattedField aFmtFldMin; CheckBox aCbxAutoMin; @@ -73,35 +82,47 @@ private: FormattedField aFmtFldMax; CheckBox aCbxAutoMax; + FixedText m_aTxt_TimeResolution; + ListBox m_aLB_TimeResolution; + CheckBox m_aCbx_AutoTimeResolution; + FixedText aTxtMain; FormattedField aFmtFldStepMain; + MetricField m_aMt_MainDateStep; + ListBox m_aLB_MainTimeUnit; CheckBox aCbxAutoStepMain; + FixedText aTxtHelpCount; FixedText aTxtHelp; MetricField aMtStepHelp; + ListBox m_aLB_HelpTimeUnit; CheckBox aCbxAutoStepHelp; FixedText aTxtOrigin; FormattedField aFmtFldOrigin; CheckBox aCbxAutoOrigin; - CheckBox aCbxLogarithm; - CheckBox aCbxReverse; - double fMin; double fMax; double fStepMain; sal_Int32 nStepHelp; double fOrigin; - int nAxisType; + sal_Int32 m_nTimeResolution; + sal_Int32 m_nMainTimeUnit; + sal_Int32 m_nHelpTimeUnit; + int m_nAxisType; + bool m_bAllowDateAxis; SvNumberFormatter* pNumFormatter; bool m_bShowAxisOrigin; void AdjustControlPositions(); void EnableControls(); + void PlaceIntervalControlsAccordingToAxisType(); + DECL_LINK( SelectAxisTypeHdl, void* ); DECL_LINK( EnableValueHdl, CheckBox* ); + DECL_LINK( FmtFieldModifiedHdl, FormattedField* ); /** shows a warning window due to an invalid input. @@ -116,7 +137,7 @@ private: @return false, if nResIdMessage was 0, true otherwise */ - bool ShowWarning( USHORT nResIdMessage, Edit * pControl = NULL ); + bool ShowWarning( sal_uInt16 nResIdMessage, Control* pControl = NULL ); }; //............................................................................. diff --git a/chart2/source/controller/dialogs/tp_Scale.src b/chart2/source/controller/dialogs/tp_Scale.src index e0705fc32083..eb27b586f24b 100644..100755 --- a/chart2/source/controller/dialogs/tp_Scale.src +++ b/chart2/source/controller/dialogs/tp_Scale.src @@ -25,7 +25,7 @@ * ************************************************************************/ #include "HelpIds.hrc" -#include "TabPages.hrc" +#include "tp_Scale.hrc" #define YLine1 3 #define Y1 (YLine1+13) @@ -33,19 +33,30 @@ #define Y3 (Y2+16) #define Y4 (Y3+16) #define Y5 (Y4+16) -#define Y6 (Y5+17) -#define Y7 (Y6+15) +#define Y6 (Y5+16) +#define Y7 (Y6+16) +#define Y8 (Y7+16) #define LABELWIDTH 88 -#define AUTOCHECKWIDTH 88 +#define AUTOCHECKWIDTH 41 #define EDITWIDTH 50 #define X1 6 #define X2 11 #define X3 (X2+LABELWIDTH+4) #define X4 (X3+EDITWIDTH+5) +#define X5 (X4+AUTOCHECKWIDTH+5) + +#define STR_LIST_TIME_UNIT \ + StringList [ en-US ] = \ + { \ + "Days" ; \ + "Months" ; \ + "Years" ; \ + }; TabPage TP_SCALE { + HelpID = "chart2:TabPage:TP_SCALE"; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 260 , 185 ) ; @@ -57,25 +68,71 @@ TabPage TP_SCALE Text [ en-US ] = "Scale" ; }; - FixedText TXT_MIN + CheckBox CBX_REVERSE { + HelpID = "chart2:CheckBox:TP_SCALE:CBX_REVERSE:ValueAxis"; Pos = MAP_APPFONT ( X2 , Y1 ) ; + Size = MAP_APPFONT ( 244 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Reverse direction" ; + }; + //--------------------------- + CheckBox CBX_LOGARITHM + { + HelpID = "chart2:CheckBox:TP_SCALE:CBX_LOGARITHM"; + Pos = MAP_APPFONT ( X2 , Y2 ) ; + Size = MAP_APPFONT ( 244 , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "~Logarithmic scale" ; + }; + //--------------------------- + FixedText TXT_AXIS_TYPE + { + Pos = MAP_APPFONT ( X2 , Y2 ) ; Size = MAP_APPFONT ( LABELWIDTH , 8 ) ; - Text [ en-US ] = "~Minimum:" ; + Text [ en-US ] = "T~ype" ; + }; + ListBox LB_AXIS_TYPE + { + HelpID = "chart2:ListBox:TP_SCALE:LB_AXIS_TYPE"; + Border = TRUE ; + AutoHScroll = TRUE ; + Pos = MAP_APPFONT ( X3 , Y2-2 ) ; + Size = MAP_APPFONT ( EDITWIDTH , 12 ) ; + TabStop = TRUE ; + Group = TRUE ; + DropDown=TRUE; + DDExtraWidth = TRUE ; + + StringList [ en-US ] = + { + "Automatic" ; + "Text" ; + "Date" ; + }; + }; + //--------------------------- + FixedText TXT_MIN + { + Pos = MAP_APPFONT ( X2 , Y3 ) ; + Size = MAP_APPFONT ( LABELWIDTH , 8 ) ; + Text [ en-US ] = "~Minimum" ; }; SpinField EDT_MIN { + HelpID = "chart2:SpinField:TP_SCALE:EDT_MIN"; Border = TRUE ; SVLook = TRUE ; - Pos = MAP_APPFONT ( X3 , Y1-2 ) ; + Pos = MAP_APPFONT ( X3 , Y3-2 ) ; Size = MAP_APPFONT ( EDITWIDTH , 12 ) ; TabStop = TRUE ; }; CheckBox CBX_AUTO_MIN { - Pos = MAP_APPFONT ( X4 , Y1-1 ) ; + HelpID = "chart2:CheckBox:TP_SCALE:CBX_AUTO_MIN"; + Pos = MAP_APPFONT ( X4 , Y3+1 ) ; Size = MAP_APPFONT ( AUTOCHECKWIDTH , 10 ) ; TabStop = TRUE ; Text [ en-US ] = "~Automatic" ; @@ -83,62 +140,134 @@ TabPage TP_SCALE FixedText TXT_MAX { - Pos = MAP_APPFONT ( X2 , Y2 ) ; + Pos = MAP_APPFONT ( X2 , Y4 ) ; Size = MAP_APPFONT ( LABELWIDTH , 8 ) ; - Text [ en-US ] = "Ma~ximum:" ; + Text [ en-US ] = "Ma~ximum" ; }; SpinField EDT_MAX { + HelpID = "chart2:SpinField:TP_SCALE:EDT_MAX"; Border = TRUE ; SVLook = TRUE ; - Pos = MAP_APPFONT ( X3 , Y2-2 ) ; + Pos = MAP_APPFONT ( X3 , Y4-2 ) ; Size = MAP_APPFONT ( EDITWIDTH , 12 ) ; TabStop = TRUE ; }; CheckBox CBX_AUTO_MAX { - Pos = MAP_APPFONT ( X4 , Y2-1 ) ; + HelpID = "chart2:CheckBox:TP_SCALE:CBX_AUTO_MAX"; + Pos = MAP_APPFONT ( X4 , Y4+1 ) ; Size = MAP_APPFONT ( AUTOCHECKWIDTH , 10 ) ; TabStop = TRUE ; Text [ en-US ] = "A~utomatic" ; }; + //--------------------------- + FixedText TXT_TIME_RESOLUTION + { + Pos = MAP_APPFONT ( X2 , Y5 ) ; + Size = MAP_APPFONT ( LABELWIDTH , 8 ) ; + Text [ en-US ] = "R~esolution" ; + }; + ListBox LB_TIME_RESOLUTION + { + HelpID = "chart2:ListBox:TP_SCALE:LB_TIME_RESOLUTION"; + Border = TRUE ; + AutoHScroll = TRUE ; + Pos = MAP_APPFONT ( X3 , Y5-2 ) ; + Size = MAP_APPFONT ( EDITWIDTH , 12 ) ; + TabStop = TRUE ; + Group = TRUE ; + DropDown=TRUE; + DDExtraWidth = TRUE ; + STR_LIST_TIME_UNIT + }; + CheckBox CBX_AUTO_TIME_RESOLUTION + { + HelpID = "chart2:CheckBox:TP_SCALE:CBX_AUTO_TIME_RESOLUTION"; + Pos = MAP_APPFONT ( X4 , Y5+1 ) ; + Size = MAP_APPFONT ( AUTOCHECKWIDTH , 10 ) ; + TabStop = TRUE ; + Text [ en-US ] = "Automat~ic" ; + }; + //--------------------------- FixedText TXT_STEP_MAIN { - Pos = MAP_APPFONT ( X2 , Y3 ) ; + Pos = MAP_APPFONT ( X2 , Y5 ) ; Size = MAP_APPFONT ( LABELWIDTH , 8 ) ; - Text [ en-US ] = "Ma~jor interval:" ; + Text [ en-US ] = "Ma~jor interval" ; }; SpinField EDT_STEP_MAIN { + HelpID = "chart2:SpinField:TP_SCALE:EDT_STEP_MAIN"; + Border = TRUE ; + Pos = MAP_APPFONT ( X3 , Y5-2 ) ; + Size = MAP_APPFONT ( EDITWIDTH , 12 ) ; + TabStop = TRUE ; + }; + MetricField MT_MAIN_DATE_STEP + { + HelpID = "chart2:MetricField:TP_SCALE:MT_MAIN_DATE_STEP"; + Border = TRUE ; + Pos = MAP_APPFONT ( X3 , Y6-2 ) ; + Size = MAP_APPFONT ( EDITWIDTH , 12 ) ; + TabStop = TRUE ; + Repeat = TRUE ; + Spin = TRUE ; + Minimum = 1 ; + Maximum = 100000 ; + StrictFormat = TRUE ; + Unit = FUNIT_CUSTOM ; + First = 1 ; + Last = 100000 ; + SpinSize = 1 ; + }; + + ListBox LB_MAIN_TIME_UNIT + { + HelpID = "chart2:ListBox:TP_SCALE:LB_MAIN_TIME_UNIT"; Border = TRUE ; - Pos = MAP_APPFONT ( X3 , Y3-2 ) ; + AutoHScroll = TRUE ; + Pos = MAP_APPFONT ( X5 , Y6-2 ) ; Size = MAP_APPFONT ( EDITWIDTH , 12 ) ; TabStop = TRUE ; + Group = TRUE ; + DropDown=TRUE; + DDExtraWidth = TRUE ; + + STR_LIST_TIME_UNIT }; CheckBox CBX_AUTO_STEP_MAIN { - Pos = MAP_APPFONT ( X4 , Y3-1 ) ; + HelpID = "chart2:CheckBox:TP_SCALE:CBX_AUTO_STEP_MAIN"; + Pos = MAP_APPFONT ( X4 , Y5+1 ) ; Size = MAP_APPFONT ( AUTOCHECKWIDTH , 10 ) ; TabStop = TRUE ; Text [ en-US ] = "Au~tomatic" ; }; - + //--------------------------- + FixedText TXT_STEP_HELP_COUNT + { + Pos = MAP_APPFONT ( X2 , Y6 ) ; + Size = MAP_APPFONT ( LABELWIDTH , 8 ) ; + Text [ en-US ] = "Minor inter~val count" ; + }; FixedText TXT_STEP_HELP { - Pos = MAP_APPFONT ( X2 , Y4 ) ; + Pos = MAP_APPFONT ( X2 , Y7 ) ; Size = MAP_APPFONT ( LABELWIDTH , 8 ) ; - Text [ en-US ] = "Minor interval ~count:" ; + Text [ en-US ] = "Minor inter~val" ; }; MetricField MT_STEPHELP { + HelpID = "chart2:MetricField:TP_SCALE:MT_STEPHELP"; Border = TRUE ; - Pos = MAP_APPFONT ( X3 , Y4-2 ) ; + Pos = MAP_APPFONT ( X3 , Y6-2 ) ; Size = MAP_APPFONT ( EDITWIDTH , 12 ) ; TabStop = TRUE ; Repeat = TRUE ; @@ -151,10 +280,24 @@ TabPage TP_SCALE Last = 100 ; SpinSize = 1 ; }; + ListBox LB_HELP_TIME_UNIT + { + HelpID = "chart2:ListBox:TP_SCALE:LB_HELP_TIME_UNIT"; + Border = TRUE ; + AutoHScroll = TRUE ; + Pos = MAP_APPFONT ( X5 , Y7-2 ) ; + Size = MAP_APPFONT ( EDITWIDTH , 12 ) ; + TabStop = TRUE ; + Group = TRUE ; + DropDown=TRUE; + DDExtraWidth = TRUE ; + STR_LIST_TIME_UNIT + }; CheckBox CBX_AUTO_STEP_HELP { - Pos = MAP_APPFONT ( X4 , Y4-1 ) ; + HelpID = "chart2:CheckBox:TP_SCALE:CBX_AUTO_STEP_HELP"; + Pos = MAP_APPFONT ( X4 , Y6+1 ) ; Size = MAP_APPFONT ( AUTOCHECKWIDTH , 10 ) ; TabStop = TRUE ; Text [ en-US ] = "Aut~omatic" ; @@ -162,40 +305,27 @@ TabPage TP_SCALE FixedText TXT_ORIGIN { - Pos = MAP_APPFONT ( X2 , Y5 ) ; + Pos = MAP_APPFONT ( X2 , Y7 ) ; Size = MAP_APPFONT ( LABELWIDTH , 8 ) ; - Text [ en-US ] = "Reference ~value:" ; + Text [ en-US ] = "Re~ference value" ; }; SpinField EDT_ORIGIN { + HelpID = "chart2:SpinField:TP_SCALE:EDT_ORIGIN"; Border = TRUE ; SVLook = TRUE ; - Pos = MAP_APPFONT ( X3 , Y5-2 ) ; + Pos = MAP_APPFONT ( X3 , Y7-2 ) ; Size = MAP_APPFONT ( EDITWIDTH , 12 ) ; TabStop = TRUE ; }; CheckBox CBX_AUTO_ORIGIN { - Pos = MAP_APPFONT ( X4 , Y5-1 ) ; + HelpID = "chart2:CheckBox:TP_SCALE:CBX_AUTO_ORIGIN"; + Pos = MAP_APPFONT ( X4 , Y7+1 ) ; Size = MAP_APPFONT ( AUTOCHECKWIDTH , 10 ) ; TabStop = TRUE ; Text [ en-US ] = "Automat~ic" ; }; - - CheckBox CBX_LOGARITHM - { - Pos = MAP_APPFONT ( X2 , Y6 ) ; - Size = MAP_APPFONT ( 244 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Logarithmic scale" ; - }; - - CheckBox CBX_REVERSE - { - Pos = MAP_APPFONT ( X2 , Y7 ) ; - Size = MAP_APPFONT ( 244 , 10 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Reverse direction" ; - }; + //--------------------------- }; diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx index b99675652084..c3f00f1c2ace 100644 --- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx @@ -97,7 +97,7 @@ SfxTabPage* SchOptionTabPage::Create(Window* pWindow,const SfxItemSet& rOutAttrs return new SchOptionTabPage(pWindow, rOutAttrs); } -BOOL SchOptionTabPage::FillItemSet(SfxItemSet& rOutAttrs) +sal_Bool SchOptionTabPage::FillItemSet(SfxItemSet& rOutAttrs) { if(aRbtAxis2.IsChecked()) rOutAttrs.Put(SfxInt32Item(SCHATTR_AXIS,CHART_AXIS_SECONDARY_Y)); @@ -128,113 +128,113 @@ BOOL SchOptionTabPage::FillItemSet(SfxItemSet& rOutAttrs) if (m_aCBIncludeHiddenCells.IsVisible()) rOutAttrs.Put(SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, m_aCBIncludeHiddenCells.IsChecked())); - return TRUE; + return sal_True; } void SchOptionTabPage::Reset(const SfxItemSet& rInAttrs) { const SfxPoolItem *pPoolItem = NULL; - aRbtAxis1.Check(TRUE); - aRbtAxis2.Check(FALSE); - if (rInAttrs.GetItemState(SCHATTR_AXIS,TRUE, &pPoolItem) == SFX_ITEM_SET) + aRbtAxis1.Check(sal_True); + aRbtAxis2.Check(sal_False); + if (rInAttrs.GetItemState(SCHATTR_AXIS,sal_True, &pPoolItem) == SFX_ITEM_SET) { long nVal=((const SfxInt32Item*)pPoolItem)->GetValue(); if(nVal==CHART_AXIS_SECONDARY_Y) { - aRbtAxis2.Check(TRUE); - aRbtAxis1.Check(FALSE); + aRbtAxis2.Check(sal_True); + aRbtAxis1.Check(sal_False); } } long nTmp; - if (rInAttrs.GetItemState(SCHATTR_BAR_GAPWIDTH, TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_BAR_GAPWIDTH, sal_True, &pPoolItem) == SFX_ITEM_SET) { nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue(); aMTGap.SetValue(nTmp); } - if (rInAttrs.GetItemState(SCHATTR_BAR_OVERLAP, TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_BAR_OVERLAP, sal_True, &pPoolItem) == SFX_ITEM_SET) { nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue(); aMTOverlap.SetValue(nTmp); } - if (rInAttrs.GetItemState(SCHATTR_BAR_CONNECT, TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_BAR_CONNECT, sal_True, &pPoolItem) == SFX_ITEM_SET) { - BOOL bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); + sal_Bool bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); aCBConnect.Check(bCheck); } - if (rInAttrs.GetItemState(SCHATTR_AXIS_FOR_ALL_SERIES, TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_AXIS_FOR_ALL_SERIES, sal_True, &pPoolItem) == SFX_ITEM_SET) { m_nAllSeriesAxisIndex = static_cast< const SfxInt32Item * >( pPoolItem )->GetValue(); aCBAxisSideBySide.Disable(); } - if (rInAttrs.GetItemState(SCHATTR_GROUP_BARS_PER_AXIS, TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_GROUP_BARS_PER_AXIS, sal_True, &pPoolItem) == SFX_ITEM_SET) { // model property is "group bars per axis", UI feature is the other way // round: "show bars side by side" - BOOL bCheck = ! static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); + sal_Bool bCheck = ! static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); aCBAxisSideBySide.Check( bCheck ); } else { - aCBAxisSideBySide.Show(FALSE); + aCBAxisSideBySide.Show(sal_False); } //missing value treatment { ::com::sun::star::uno::Sequence < sal_Int32 > aMissingValueTreatments; - if( rInAttrs.GetItemState(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, TRUE, &pPoolItem) == SFX_ITEM_SET ) + if( rInAttrs.GetItemState(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, sal_True, &pPoolItem) == SFX_ITEM_SET ) aMissingValueTreatments =((const SfxIntegerListItem*)pPoolItem)->GetConstSequence(); - if ( aMissingValueTreatments.getLength()>1 && rInAttrs.GetItemState(SCHATTR_MISSING_VALUE_TREATMENT,TRUE, &pPoolItem) == SFX_ITEM_SET) + if ( aMissingValueTreatments.getLength()>1 && rInAttrs.GetItemState(SCHATTR_MISSING_VALUE_TREATMENT,sal_True, &pPoolItem) == SFX_ITEM_SET) { - m_aRB_DontPaint.Enable(FALSE); - m_aRB_AssumeZero.Enable(FALSE); - m_aRB_ContinueLine.Enable(FALSE); + m_aRB_DontPaint.Enable(sal_False); + m_aRB_AssumeZero.Enable(sal_False); + m_aRB_ContinueLine.Enable(sal_False); for( sal_Int32 nN =0; nN<aMissingValueTreatments.getLength(); nN++ ) { sal_Int32 nVal = aMissingValueTreatments[nN]; if(nVal==::com::sun::star::chart::MissingValueTreatment::LEAVE_GAP) - m_aRB_DontPaint.Enable(TRUE); + m_aRB_DontPaint.Enable(sal_True); else if(nVal==::com::sun::star::chart::MissingValueTreatment::USE_ZERO) - m_aRB_AssumeZero.Enable(TRUE); + m_aRB_AssumeZero.Enable(sal_True); else if(nVal==::com::sun::star::chart::MissingValueTreatment::CONTINUE) - m_aRB_ContinueLine.Enable(TRUE); + m_aRB_ContinueLine.Enable(sal_True); } long nVal=((const SfxInt32Item*)pPoolItem)->GetValue(); if(nVal==::com::sun::star::chart::MissingValueTreatment::LEAVE_GAP) - m_aRB_DontPaint.Check(TRUE); + m_aRB_DontPaint.Check(sal_True); else if(nVal==::com::sun::star::chart::MissingValueTreatment::USE_ZERO) - m_aRB_AssumeZero.Check(TRUE); + m_aRB_AssumeZero.Check(sal_True); else if(nVal==::com::sun::star::chart::MissingValueTreatment::CONTINUE) - m_aRB_ContinueLine.Check(TRUE); + m_aRB_ContinueLine.Check(sal_True); } else { - m_aFT_MissingValues.Show(FALSE); - m_aRB_DontPaint.Show(FALSE); - m_aRB_AssumeZero.Show(FALSE); - m_aRB_ContinueLine.Show(FALSE); + m_aFT_MissingValues.Show(sal_False); + m_aRB_DontPaint.Show(sal_False); + m_aRB_AssumeZero.Show(sal_False); + m_aRB_ContinueLine.Show(sal_False); } } // Include hidden cells - if (rInAttrs.GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, TRUE, &pPoolItem) == SFX_ITEM_SET) + if (rInAttrs.GetItemState(SCHATTR_INCLUDE_HIDDEN_CELLS, sal_True, &pPoolItem) == SFX_ITEM_SET) { bool bVal = static_cast<const SfxBoolItem*>(pPoolItem)->GetValue(); m_aCBIncludeHiddenCells.Check(bVal); } else { - m_aCBIncludeHiddenCells.Show(FALSE); + m_aCBIncludeHiddenCells.Show(sal_False); if(!m_aFT_MissingValues.IsVisible()) - m_aFL_PlotOptions.Show(FALSE); + m_aFL_PlotOptions.Show(sal_False); } AdaptControlPositionsAndVisibility(); @@ -276,7 +276,7 @@ void SchOptionTabPage::AdaptControlPositionsAndVisibility() if( !aMTGap.IsVisible() && !aMTOverlap.IsVisible() ) { - aGrpBar.Show(FALSE); + aGrpBar.Show(sal_False); Point aPos; if( !aRbtAxis1.IsVisible() && !aRbtAxis2.IsVisible() ) aPos = aGrpAxis.GetPosPixel(); diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx index baa8c5e8b4d1..f09b24814511 100644 --- a/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.hxx @@ -49,7 +49,7 @@ public: virtual ~SchOptionTabPage(); static SfxTabPage* Create(Window* pParent, const SfxItemSet& rInAttrs); - virtual BOOL FillItemSet(SfxItemSet& rOutAttrs); + virtual sal_Bool FillItemSet(SfxItemSet& rOutAttrs); virtual void Reset(const SfxItemSet& rInAttrs); void Init( bool bProvidesSecondaryYAxis, bool bProvidesOverlapAndGapWidth, bool bProvidesBarConnectors ); diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.src b/chart2/source/controller/dialogs/tp_SeriesToAxis.src index 0d67feb22cee..f307d4750062 100644 --- a/chart2/source/controller/dialogs/tp_SeriesToAxis.src +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.src @@ -29,6 +29,7 @@ TabPage TP_OPTIONS { + HelpID = "chart2:TabPage:TP_OPTIONS"; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 260 , 185 ) ; @@ -42,6 +43,7 @@ TabPage TP_OPTIONS RadioButton RBT_OPT_AXIS_1 { + HelpID = "chart2:RadioButton:TP_OPTIONS:RBT_OPT_AXIS_1"; Pos = MAP_APPFONT ( 12 , 20 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -50,6 +52,7 @@ TabPage TP_OPTIONS RadioButton RBT_OPT_AXIS_2 { + HelpID = "chart2:RadioButton:TP_OPTIONS:RBT_OPT_AXIS_2"; Pos = MAP_APPFONT ( 12 , 34 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -72,6 +75,7 @@ TabPage TP_OPTIONS MetricField MT_OVERLAP { + HelpID = "chart2:MetricField:TP_OPTIONS:MT_OVERLAP"; Border = TRUE ; Pos = MAP_APPFONT ( 63 , 78 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -98,6 +102,7 @@ TabPage TP_OPTIONS MetricField MT_GAP { + HelpID = "chart2:MetricField:TP_OPTIONS:MT_GAP"; Border = TRUE ; Pos = MAP_APPFONT ( 63 , 62 ) ; Size = MAP_APPFONT ( 40 , 12 ) ; @@ -117,6 +122,7 @@ TabPage TP_OPTIONS CheckBox CB_CONNECTOR { + HelpID = "chart2:CheckBox:TP_OPTIONS:CB_CONNECTOR"; Pos = MAP_APPFONT ( 12 , 97 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; @@ -125,6 +131,7 @@ TabPage TP_OPTIONS CheckBox CB_BARS_SIDE_BY_SIDE { + HelpID = "chart2:CheckBox:TP_OPTIONS:CB_BARS_SIDE_BY_SIDE"; Pos = MAP_APPFONT ( 12 , 97 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; @@ -147,6 +154,7 @@ TabPage TP_OPTIONS RadioButton RB_DONT_PAINT { + HelpID = "chart2:RadioButton:TP_OPTIONS:RB_DONT_PAINT"; Pos = MAP_APPFONT ( 82 , 127 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -155,6 +163,7 @@ TabPage TP_OPTIONS RadioButton RB_ASSUME_ZERO { + HelpID = "chart2:RadioButton:TP_OPTIONS:RB_ASSUME_ZERO"; Pos = MAP_APPFONT ( 82 , 141 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -163,6 +172,7 @@ TabPage TP_OPTIONS RadioButton RB_CONTINUE_LINE { + HelpID = "chart2:RadioButton:TP_OPTIONS:RB_CONTINUE_LINE"; Pos = MAP_APPFONT ( 82 , 155 ) ; Size = MAP_APPFONT ( 80 , 10 ) ; TabStop = TRUE ; @@ -171,6 +181,7 @@ TabPage TP_OPTIONS CheckBox CB_INCLUDE_HIDDEN_CELLS { + HelpID = "chart2:CheckBox:TP_OPTIONS:CB_INCLUDE_HIDDEN_CELLS"; Pos = MAP_APPFONT ( 12 , 172 ) ; Size = MAP_APPFONT ( 200 , 10 ) ; TabStop = TRUE ; diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx index ecbeb6f6d7b0..8e9e66e30f03 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -59,7 +59,7 @@ SchAlignmentTabPage::SchAlignmentTabPage(Window* pWindow, { FreeResource(); - aCbStacked.EnableTriState( FALSE ); + aCbStacked.EnableTriState( sal_False ); aOrientHlp.AddDependentWindow( aFtRotate, STATE_CHECK ); if( !bWithRotation ) @@ -89,7 +89,7 @@ SfxTabPage* SchAlignmentTabPage::CreateWithoutRotation(Window* pParent, return new SchAlignmentTabPage(pParent, rInAttrs, false); } -BOOL SchAlignmentTabPage::FillItemSet(SfxItemSet& rOutAttrs) +sal_Bool SchAlignmentTabPage::FillItemSet(SfxItemSet& rOutAttrs) { //Since 04/1998 text can be rotated by an arbitrary angle: SCHATTR_TEXT_DEGREES bool bStacked = aOrientHlp.GetStackedState() == STATE_CHECK; @@ -101,7 +101,7 @@ BOOL SchAlignmentTabPage::FillItemSet(SfxItemSet& rOutAttrs) SvxFrameDirection aDirection( aLbTextDirection.GetSelectEntryValue() ); rOutAttrs.Put( SfxInt32Item( EE_PARA_WRITINGDIR, aDirection ) ); - return TRUE; + return sal_True; } void SchAlignmentTabPage::Reset(const SfxItemSet& rInAttrs) @@ -116,7 +116,7 @@ void SchAlignmentTabPage::Reset(const SfxItemSet& rInAttrs) aOrientHlp.SetStackedState( bStacked ? STATE_CHECK : STATE_NOCHECK ); - if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, TRUE, &pItem) == SFX_ITEM_SET) + if( rInAttrs.GetItemState(EE_PARA_WRITINGDIR, sal_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 190bbcaf1d42..87c3e43a914a 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.hxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.hxx @@ -59,7 +59,7 @@ public: static SfxTabPage* Create(Window* pParent, const SfxItemSet& rInAttrs); static SfxTabPage* CreateWithoutRotation(Window* pParent, const SfxItemSet& rInAttrs); - virtual BOOL FillItemSet(SfxItemSet& rOutAttrs); + virtual sal_Bool FillItemSet(SfxItemSet& rOutAttrs); virtual void Reset(const SfxItemSet& rInAttrs); }; diff --git a/chart2/source/controller/dialogs/tp_Trendline.cxx b/chart2/source/controller/dialogs/tp_Trendline.cxx index 97859daa14fc..f64e40f8f5a9 100644 --- a/chart2/source/controller/dialogs/tp_Trendline.cxx +++ b/chart2/source/controller/dialogs/tp_Trendline.cxx @@ -55,7 +55,7 @@ SfxTabPage* TrendlineTabPage::Create( return new TrendlineTabPage( pParent, rOutAttrs ); } -BOOL TrendlineTabPage::FillItemSet( SfxItemSet& rOutAttrs ) +sal_Bool TrendlineTabPage::FillItemSet( SfxItemSet& rOutAttrs ) { return m_aTrendlineResources.FillItemSet( rOutAttrs ); } diff --git a/chart2/source/controller/dialogs/tp_Trendline.hxx b/chart2/source/controller/dialogs/tp_Trendline.hxx index d4d3726c01a2..f2a1ac94b395 100644 --- a/chart2/source/controller/dialogs/tp_Trendline.hxx +++ b/chart2/source/controller/dialogs/tp_Trendline.hxx @@ -44,7 +44,7 @@ public: virtual ~TrendlineTabPage (); static SfxTabPage* Create( Window* pParent, const SfxItemSet& rInAttrs ); - virtual BOOL FillItemSet( SfxItemSet& rOutAttrs ); + virtual sal_Bool FillItemSet( SfxItemSet& rOutAttrs ); virtual void Reset( const SfxItemSet& rInAttrs ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); diff --git a/chart2/source/controller/dialogs/tp_Trendline.src b/chart2/source/controller/dialogs/tp_Trendline.src index f7a3fa33a6d8..1a283844a8d1 100644 --- a/chart2/source/controller/dialogs/tp_Trendline.src +++ b/chart2/source/controller/dialogs/tp_Trendline.src @@ -30,6 +30,7 @@ TabPage TP_TRENDLINE { + HelpID = "chart2:TabPage:TP_TRENDLINE"; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( 260 , 185 ) ; diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.src b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.src index a17f5655e751..473007f1c32b 100644 --- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.src +++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.src @@ -59,6 +59,7 @@ TabPage TP_WIZARD_TITLEANDOBJECTS { + HelpID = "chart2:TabPage:TP_WIZARD_TITLEANDOBJECTS"; Hide = TRUE ; SVLook = TRUE ; Size = MAP_APPFONT ( CHART_WIZARD_PAGEWIDTH , CHART_WIZARD_PAGEHEIGHT ) ; |