summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@edx.srv.br>2013-12-28 01:38:37 -0200
committerCaolán McNamara <caolanm@redhat.com>2013-12-28 08:44:59 +0000
commite6a87e17b207351963759925b7e9242edab70007 (patch)
tree33311f3ec9655d9a4bf70bfa8b4db146be704939
parent5be7ec4193b892e5643ff5f3f2e6755319569190 (diff)
Convert insert error bars dialog to widget UI
Change-Id: Ie2fbcb0bacb968a784698908c8cc62f73a80cf32 Reviewed-on: https://gerrit.libreoffice.org/7219 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--chart2/AllLangResTarget_chartcontroller.mk1
-rw-r--r--chart2/UIConfig_chart2.mk1
-rw-r--r--chart2/source/controller/dialogs/ResourceIds.hrc1
-rw-r--r--chart2/source/controller/dialogs/Strings.src10
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx17
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertErrorBars.hrc25
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertErrorBars.src36
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar.cxx691
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar_tmpl.hrc222
-rw-r--r--chart2/source/controller/inc/HelpIds.hrc17
-rw-r--r--chart2/source/controller/inc/dlg_InsertErrorBars.hxx8
-rw-r--r--chart2/source/controller/inc/res_ErrorBar.hxx104
-rw-r--r--chart2/source/controller/main/ChartController_Insert.cxx2
-rw-r--r--chart2/source/inc/Strings.hrc2
-rw-r--r--chart2/uiconfig/ui/dlg_InsertErrorBars.ui658
-rw-r--r--chart2/uiconfig/ui/tp_ErrorBars.ui5
16 files changed, 685 insertions, 1115 deletions
diff --git a/chart2/AllLangResTarget_chartcontroller.mk b/chart2/AllLangResTarget_chartcontroller.mk
index 2bac70802169..f2e229b8475a 100644
--- a/chart2/AllLangResTarget_chartcontroller.mk
+++ b/chart2/AllLangResTarget_chartcontroller.mk
@@ -46,7 +46,6 @@ $(eval $(call gb_SrsTarget_add_nonlocalizable_files,chart2/res,\
chart2/source/controller/dialogs/Bitmaps.src \
chart2/source/controller/dialogs/dlg_ChartType.src \
chart2/source/controller/dialogs/dlg_CreationWizard.src \
- chart2/source/controller/dialogs/dlg_InsertErrorBars.src \
chart2/source/controller/dialogs/tp_PointGeometry.src \
chart2/source/controller/menus/ShapeContextMenu.src \
chart2/source/controller/menus/ShapeEditContextMenu.src \
diff --git a/chart2/UIConfig_chart2.mk b/chart2/UIConfig_chart2.mk
index ed55b984fec9..3606207f51c0 100644
--- a/chart2/UIConfig_chart2.mk
+++ b/chart2/UIConfig_chart2.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/schart,\
chart2/uiconfig/ui/3dviewdialog \
chart2/uiconfig/ui/attributedialog \
chart2/uiconfig/ui/dlg_DataLabel \
+ chart2/uiconfig/ui/dlg_InsertErrorBars \
chart2/uiconfig/ui/insertaxisdlg \
chart2/uiconfig/ui/insertgriddlg \
chart2/uiconfig/ui/inserttitledlg \
diff --git a/chart2/source/controller/dialogs/ResourceIds.hrc b/chart2/source/controller/dialogs/ResourceIds.hrc
index 10effe188762..d78f5da15aef 100644
--- a/chart2/source/controller/dialogs/ResourceIds.hrc
+++ b/chart2/source/controller/dialogs/ResourceIds.hrc
@@ -31,7 +31,6 @@
#define DLG_DATA_DESCR 836
#define DLG_LEGEND 835
#define DLG_SPLINE_PROPERTIES 904
-#define DLG_DATA_YERRORBAR 842
#define DLG_SHAPE_FONT 921
#define DLG_SHAPE_PARAGRAPH 922
diff --git a/chart2/source/controller/dialogs/Strings.src b/chart2/source/controller/dialogs/Strings.src
index 5705867ff78a..f03ce30259c7 100644
--- a/chart2/source/controller/dialogs/Strings.src
+++ b/chart2/source/controller/dialogs/Strings.src
@@ -586,16 +586,6 @@ String STR_DATA_SELECT_RANGE_FOR_DATALABELS
{
Text [ en-US ] = "Select Range for data labels" ;
};
-//TODO: ohallot: String inserted into tp_ErrorBars.ui
-String STR_DATA_SELECT_RANGE_FOR_POSITIVE_ERRORBARS
-{
- Text [ en-US ] = "Select Range for Positive Error Bars" ;
-};
-//TODO: ohallot: String inserted into tp_ErrorBars.ui
-String STR_DATA_SELECT_RANGE_FOR_NEGATIVE_ERRORBARS
-{
- Text [ en-US ] = "Select Range for Negative Error Bars" ;
-};
String STR_DATA_EDITOR_INCORRECT_INPUT
{
diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
index bb8b513afcf0..47e00d25df1a 100644
--- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
@@ -18,11 +18,8 @@
*/
#include "dlg_InsertErrorBars.hxx"
-#include "dlg_InsertErrorBars.hrc"
#include "res_ErrorBar.hxx"
-#include "ResourceIds.hrc"
#include "ResId.hxx"
-#include "Strings.hrc"
#include "chartview/ExplicitValueProvider.hxx"
#include "ChartModelHelper.hxx"
#include "ObjectIdentifier.hxx"
@@ -43,18 +40,16 @@ namespace chart
InsertErrorBarsDialog::InsertErrorBarsDialog(
Window* pParent, const SfxItemSet& rMyAttrs,
const uno::Reference< chart2::XChartDocument > & xChartDocument,
- oldErrorBarResources::tErrorBarType eType /* = ErrorBarResources::ERROR_BAR_Y */ ) :
- ModalDialog( pParent, SchResId( DLG_DATA_YERRORBAR )),
+ ErrorBarResources::tErrorBarType eType /* = ErrorBarResources::ERROR_BAR_Y */ ) :
+ ModalDialog( pParent
+ ,"dlg_InsertErrorBars"
+ ,"modules/schart/ui/dlg_InsertErrorBars.ui"),
rInAttrs( rMyAttrs ),
- aBtnOK( this, SchResId( BTN_OK )),
- aBtnCancel( this, SchResId( BTN_CANCEL )),
- aBtnHelp( this, SchResId( BTN_HELP )),
- m_apErrorBarResources( new oldErrorBarResources(
+ m_apErrorBarResources( new ErrorBarResources(
this, this, rInAttrs,
/* bNoneAvailable = */ true, eType ))
{
- FreeResource();
- ObjectType objType = eType == oldErrorBarResources::ERROR_BAR_Y ? OBJECTTYPE_DATA_ERRORS_Y : OBJECTTYPE_DATA_ERRORS_X;
+ ObjectType objType = eType == ErrorBarResources::ERROR_BAR_Y ? OBJECTTYPE_DATA_ERRORS_Y : OBJECTTYPE_DATA_ERRORS_X;
this->SetText( ObjectNameProvider::getName_ObjectForAllSeries(objType) );
diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.hrc b/chart2/source/controller/dialogs/dlg_InsertErrorBars.hrc
deleted file mode 100644
index fd728a0f3cf0..000000000000
--- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.hrc
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#include "ResourceIds.hrc"
-
-#define BTN_OK 1
-#define BTN_CANCEL 1
-#define BTN_HELP 1
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.src b/chart2/source/controller/dialogs/dlg_InsertErrorBars.src
deleted file mode 100644
index c2efab3d80c2..000000000000
--- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.src
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "dlg_InsertErrorBars.hrc"
-#include "HelpIds.hrc"
-#include "CommonResources.hrc"
-#include "res_ErrorBar.hrc"
-
-ModalDialog DLG_DATA_YERRORBAR
-{
- HelpID = "chart2:ModalDialog:DLG_DATA_YERRORBAR";
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 300 , 156 ) ;
- Moveable = TRUE ;
- BUTTONS_OK_CANCEL_HELP_STACKED( 244 )
- RESOURCE_ERRORBARS( 244 - 6, 14 )
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index e622fb903046..07d6770dee9a 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -18,9 +18,7 @@
*/
#include "res_ErrorBar.hxx"
-#include "res_ErrorBar_IDs.hrc"
#include "ResId.hxx"
-#include "Strings.hrc"
#include "Bitmaps.hrc"
#include "RangeSelectionHelper.hxx"
// for RANGE_SELECTION_INVALID_RANGE_BACKGROUND_COLOR
@@ -31,6 +29,11 @@
#include <vcl/dialog.hxx>
#include <svl/stritem.hxx>
+#define CHART_LB_FUNCTION_STD_ERROR 0
+#define CHART_LB_FUNCTION_STD_DEV 1
+#define CHART_LB_FUNCTION_VARIANCE 2
+#define CHART_LB_FUNCTION_ERROR_MARGIN 3
+
using namespace ::com::sun::star;
namespace
@@ -76,7 +79,7 @@ sal_uInt16 lcl_getLbEntryPosByErrorKind( SvxChartKindError eErrorKind )
namespace chart
{
-ErrorBarResources::ErrorBarResources( SfxTabPage* pParent, Dialog * pParentDialog,
+ErrorBarResources::ErrorBarResources( VclBuilderContainer* pParent, Dialog * pParentDialog,
const SfxItemSet& rInAttrs, bool bNoneAvailable,
tErrorBarType eType /* = ERROR_BAR_Y */ ) :
m_eErrorKind( CHERROR_NONE ),
@@ -122,7 +125,6 @@ ErrorBarResources::ErrorBarResources( SfxTabPage* pParent, Dialog * pParentDialo
pParent->get(m_pFiPositive, "FI_POSITIVE");
pParent->get(m_pFiNegative, "FI_NEGATIVE");
-//TODO: ohallot: Remove these strings from .src files
pParent->get(m_pUIStringPos, "STR_DATA_SELECT_RANGE_FOR_POSITIVE_ERRORBARS");
pParent->get(m_pUIStringNeg, "STR_DATA_SELECT_RANGE_FOR_NEGATIVE_ERRORBARS");
pParent->get(m_pUIStringRbRange, "STR_CONTROLTEXT_ERROR_BARS_FROM_DATA");
@@ -692,11 +694,11 @@ void ErrorBarResources::listeningFinished(
m_apRangeSelectionHelper->stopRangeListening();
// change edit field
- if( m_pParentWindow )
- {
- m_pParentWindow->ToTop();
- m_pParentWindow->GrabFocus();
- }
+// if( m_pParentWindow )
+// {
+// m_pParentWindow->ToTop();
+// m_pParentWindow->GrabFocus();
+// }
if( m_pCurrentRangeChoosingField )
{
@@ -741,677 +743,6 @@ bool ErrorBarResources::isRangeFieldContentValid( Edit & rEdit )
return bIsValid;
}
-oldErrorBarResources::oldErrorBarResources( Window* pParent, Dialog * pParentDialog,
- const SfxItemSet& rInAttrs, bool bNoneAvailable,
- tErrorBarType eType /* = ERROR_BAR_Y */ ) :
-
- m_aFlErrorCategory( pParent, SchResId( FL_ERROR )),
- m_aRbNone( pParent, SchResId( RB_NONE )),
- m_aRbConst( pParent, SchResId( RB_CONST )),
- m_aRbPercent( pParent, SchResId( RB_PERCENT )),
- m_aRbFunction( pParent, SchResId( RB_FUNCTION )),
- m_aRbRange( pParent, SchResId( RB_RANGE )),
- m_aLbFunction( pParent, SchResId( LB_FUNCTION )),
-
- m_aFlParameters( pParent, SchResId( FL_PARAMETERS )),
- m_aFtPositive( pParent, SchResId( FT_POSITIVE )),
- m_aMfPositive( pParent, SchResId( MF_POSITIVE )),
- m_aEdRangePositive( pParent, SchResId( ED_RANGE_POSITIVE )),
- m_aIbRangePositive( pParent, SchResId( IB_RANGE_POSITIVE )),
- m_aFtNegative( pParent, SchResId( FT_NEGATIVE )),
- m_aMfNegative( pParent, SchResId( MF_NEGATIVE )),
- m_aEdRangeNegative( pParent, SchResId( ED_RANGE_NEGATIVE )),
- m_aIbRangeNegative( pParent, SchResId( IB_RANGE_NEGATIVE )),
- m_aCbSyncPosNeg( pParent, SchResId( CB_SYN_POS_NEG )),
-
- m_aFlIndicate( pParent, SchResId( FL_INDICATE )),
- m_aRbBoth( pParent, SchResId( RB_BOTH )),
- m_aRbPositive( pParent, SchResId( RB_POSITIVE )),
- m_aRbNegative( pParent, SchResId( RB_NEGATIVE )),
- m_aFiBoth( pParent, SchResId( FI_BOTH )),
- m_aFiPositive( pParent, SchResId( FI_POSITIVE )),
- m_aFiNegative( pParent, SchResId( FI_NEGATIVE )),
-
- m_eErrorKind( CHERROR_NONE ),
- m_eIndicate( CHINDICATE_BOTH ),
- m_bErrorKindUnique( true ),
- m_bIndicatorUnique( true ),
- m_bPlusUnique( true ),
- m_bMinusUnique( true ),
- m_bRangePosUnique( true ),
- m_bRangeNegUnique( true ),
- m_bNoneAvailable( bNoneAvailable ),
- m_eErrorBarType( eType ),
- m_nConstDecimalDigits( 1 ),
- m_nConstSpinSize( 1 ),
- m_pParentWindow( pParent ),
- m_pParentDialog( pParentDialog ),
- m_pCurrentRangeChoosingField( 0 ),
- m_bHasInternalDataProvider( true ),
- m_bDisableDataTableDialog( false )
-{
- if( m_bNoneAvailable )
- m_aRbNone.SetClickHdl( LINK( this, oldErrorBarResources, CategoryChosen ));
- else
- m_aRbNone.Hide();
-
- m_aRbConst.SetClickHdl( LINK( this, oldErrorBarResources, CategoryChosen ));
- m_aRbPercent.SetClickHdl( LINK( this, oldErrorBarResources, CategoryChosen ));
- m_aRbFunction.SetClickHdl( LINK( this, oldErrorBarResources, CategoryChosen ));
- m_aRbRange.SetClickHdl( LINK( this, oldErrorBarResources, CategoryChosen ));
- m_aLbFunction.SetSelectHdl( LINK( this, oldErrorBarResources, CategoryChosen ));
-
- m_aCbSyncPosNeg.Check( sal_False );
- m_aCbSyncPosNeg.SetToggleHdl( LINK( this, oldErrorBarResources, SynchronizePosAndNeg ));
-
- m_aMfPositive.SetModifyHdl( LINK( this, oldErrorBarResources, PosValueChanged ));
- m_aEdRangePositive.SetModifyHdl( LINK( this, oldErrorBarResources, RangeChanged ));
- m_aEdRangeNegative.SetModifyHdl( LINK( this, oldErrorBarResources, RangeChanged ));
-
- m_aRbPositive.SetClickHdl( LINK( this, oldErrorBarResources, IndicatorChanged ));
- m_aRbNegative.SetClickHdl( LINK( this, oldErrorBarResources, IndicatorChanged ));
- m_aRbBoth.SetClickHdl( LINK( this, oldErrorBarResources, IndicatorChanged ));
-
- m_aIbRangePositive.SetClickHdl( LINK( this, oldErrorBarResources, ChooseRange ));
- m_aIbRangeNegative.SetClickHdl( LINK( this, oldErrorBarResources, ChooseRange ));
- m_aIbRangePositive.SetQuickHelpText(SCH_RESSTR(STR_TIP_SELECT_RANGE));
- m_aIbRangeNegative.SetQuickHelpText(SCH_RESSTR(STR_TIP_SELECT_RANGE));
-
- FillValueSets();
- Reset( rInAttrs );
-}
-
-oldErrorBarResources::~oldErrorBarResources()
-{
-}
-
-void oldErrorBarResources::SetErrorBarType( tErrorBarType eNewType )
-{
- if( m_eErrorBarType != eNewType )
- {
- m_eErrorBarType = eNewType;
- FillValueSets();
- }
-}
-
-void oldErrorBarResources::SetChartDocumentForRangeChoosing(
- const uno::Reference< chart2::XChartDocument > & xChartDocument )
-{
- if( xChartDocument.is())
- {
- m_bHasInternalDataProvider = xChartDocument->hasInternalDataProvider();
- uno::Reference< beans::XPropertySet > xProps( xChartDocument, uno::UNO_QUERY );
- if ( xProps.is() )
- {
- try
- {
- xProps->getPropertyValue( "DisableDataTableDialog" ) >>= m_bDisableDataTableDialog;
- }
- catch( const uno::Exception& e )
- {
- ASSERT_EXCEPTION( e );
- }
- }
- }
- m_apRangeSelectionHelper.reset( new RangeSelectionHelper( xChartDocument ));
-
- // has internal data provider => rename "cell range" to "from data"
- OSL_ASSERT( m_apRangeSelectionHelper.get());
- if( m_bHasInternalDataProvider )
- {
- m_aRbRange.SetText(SCH_RESSTR(STR_CONTROLTEXT_ERROR_BARS_FROM_DATA));
- }
-
- if( m_aRbRange.IsChecked())
- {
- isRangeFieldContentValid( m_aEdRangePositive );
- isRangeFieldContentValid( m_aEdRangeNegative );
- }
-}
-
-void oldErrorBarResources::SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth )
-{
- if( fMinorStepWidth < 0 )
- fMinorStepWidth = -fMinorStepWidth;
-
- sal_Int32 nExponent = static_cast< sal_Int32 >( ::rtl::math::approxFloor( log10( fMinorStepWidth )));
- if( nExponent <= 0 )
- {
- // one digit precision more
- m_nConstDecimalDigits = static_cast< sal_uInt16 >( (-nExponent) + 1 );
- m_nConstSpinSize = 10;
- }
- else
- {
- m_nConstDecimalDigits = 0;
- m_nConstSpinSize = static_cast< sal_Int64 >( pow( 10.0, (int)nExponent ));
- }
-}
-
-void oldErrorBarResources::UpdateControlStates()
-{
- // function
- bool bIsFunction = m_aRbFunction.IsChecked();
- m_aLbFunction.Enable( bIsFunction );
-
- // range buttons
- m_aRbRange.Enable( !m_bHasInternalDataProvider || !m_bDisableDataTableDialog );
- bool bShowRange = ( m_aRbRange.IsChecked());
- bool bCanChooseRange =
- ( bShowRange &&
- m_apRangeSelectionHelper.get() &&
- m_apRangeSelectionHelper->hasRangeSelection());
-
- m_aMfPositive.Show( ! bShowRange );
- m_aMfNegative.Show( ! bShowRange );
-
- // use range but without range chooser => hide controls
- m_aEdRangePositive.Show( bShowRange && ! m_bHasInternalDataProvider );
- m_aIbRangePositive.Show( bCanChooseRange );
- m_aEdRangeNegative.Show( bShowRange && ! m_bHasInternalDataProvider );
- m_aIbRangeNegative.Show( bCanChooseRange );
-
- bool bShowPosNegAndSync = ! (bShowRange && m_bHasInternalDataProvider);
- m_aFtPositive.Show( bShowPosNegAndSync );
- m_aFtNegative.Show( bShowPosNegAndSync );
- m_aCbSyncPosNeg.Show( bShowPosNegAndSync );
- m_aFlParameters.Show( bShowPosNegAndSync );
-
- // unit for metric fields
- bool bIsErrorMargin(
- ( m_aRbFunction.IsChecked()) &&
- ( m_aLbFunction.GetSelectEntryPos() == CHART_LB_FUNCTION_ERROR_MARGIN ));
- bool bIsPercentage( m_aRbPercent.IsChecked() || bIsErrorMargin );
- OUString aCustomUnit;
-
- if( bIsPercentage )
- {
- aCustomUnit = " %";
- m_aMfPositive.SetDecimalDigits( 1 );
- m_aMfPositive.SetSpinSize( 10 );
- m_aMfNegative.SetDecimalDigits( 1 );
- m_aMfNegative.SetSpinSize( 10 );
- }
- else
- {
- m_aMfPositive.SetDecimalDigits( m_nConstDecimalDigits );
- m_aMfPositive.SetSpinSize( m_nConstSpinSize );
- m_aMfNegative.SetDecimalDigits( m_nConstDecimalDigits );
- m_aMfNegative.SetSpinSize( m_nConstSpinSize );
- }
- m_aMfPositive.SetCustomUnitText( aCustomUnit );
- m_aMfNegative.SetCustomUnitText( aCustomUnit );
-
- // positive and negative value fields
- bool bPosEnabled = ( m_aRbPositive.IsChecked() || m_aRbBoth.IsChecked());
- bool bNegEnabled = ( m_aRbNegative.IsChecked() || m_aRbBoth.IsChecked());
- if( !( bPosEnabled || bNegEnabled ))
- {
- // all three controls are not checked -> ambiguous state
- bPosEnabled = true;
- bNegEnabled = true;
- }
-
- // functions with only one parameter
- bool bOneParameterCategory =
- bIsErrorMargin || m_aRbPercent.IsChecked();
- if( bOneParameterCategory )
- {
- m_aCbSyncPosNeg.Check();
- }
-
- if( m_aCbSyncPosNeg.IsChecked())
- {
- bPosEnabled = true;
- bNegEnabled = false;
- }
-
- // all functions except error margin take no arguments
- if( m_aRbFunction.IsChecked() &&
- ( m_aLbFunction.GetSelectEntryPos() != CHART_LB_FUNCTION_ERROR_MARGIN ))
- {
- bPosEnabled = false;
- bNegEnabled = false;
- }
-
- // enable/disable pos/neg fields
- m_aFtPositive.Enable( bPosEnabled );
- m_aFtNegative.Enable( bNegEnabled );
- if( bShowRange )
- {
- m_aEdRangePositive.Enable( bPosEnabled );
- m_aIbRangePositive.Enable( bPosEnabled );
- m_aEdRangeNegative.Enable( bNegEnabled );
- m_aIbRangeNegative.Enable( bNegEnabled );
- }
- else
- {
- m_aMfPositive.Enable( bPosEnabled );
- m_aMfNegative.Enable( bNegEnabled );
- }
-
- m_aCbSyncPosNeg.Enable(
- !bOneParameterCategory &&
- ( bPosEnabled || bNegEnabled ));
-
- // mark invalid entries in the range fields
- if( bShowRange && ! m_bHasInternalDataProvider )
- {
- isRangeFieldContentValid( m_aEdRangePositive );
- isRangeFieldContentValid( m_aEdRangeNegative );
- }
-}
-
-IMPL_LINK( oldErrorBarResources, CategoryChosen, void *, )
-{
- m_bErrorKindUnique = true;
- SvxChartKindError eOldError = m_eErrorKind;
-
- if( m_aRbNone.IsChecked())
- m_eErrorKind = CHERROR_NONE;
- else if( m_aRbConst.IsChecked())
- m_eErrorKind = CHERROR_CONST;
- else if( m_aRbPercent.IsChecked())
- m_eErrorKind = CHERROR_PERCENT;
- else if( m_aRbRange.IsChecked())
- m_eErrorKind = CHERROR_RANGE;
- else if( m_aRbFunction.IsChecked())
- {
- if( m_aLbFunction.GetSelectEntryCount() == 1 )
- {
- switch( m_aLbFunction.GetSelectEntryPos())
- {
- case CHART_LB_FUNCTION_STD_ERROR:
- m_eErrorKind = CHERROR_STDERROR; break;
- case CHART_LB_FUNCTION_STD_DEV:
- m_eErrorKind = CHERROR_SIGMA; break;
- case CHART_LB_FUNCTION_VARIANCE:
- m_eErrorKind = CHERROR_VARIANT; break;
- case CHART_LB_FUNCTION_ERROR_MARGIN:
- m_eErrorKind = CHERROR_BIGERROR; break;
- default:
- m_bErrorKindUnique = false;
- }
- }
- else
- m_bErrorKindUnique = false;
- }
- else
- {
- OSL_FAIL( "Unknown category chosen" );
- m_bErrorKindUnique = false;
- }
-
- // changed to range
- if( m_eErrorKind == CHERROR_RANGE &&
- eOldError != CHERROR_RANGE )
- {
- m_aCbSyncPosNeg.Check(
- (!m_aEdRangePositive.GetText().isEmpty()) &&
- m_aEdRangePositive.GetText() == m_aEdRangeNegative.GetText());
- }
- // changed from range
- else if( m_eErrorKind != CHERROR_RANGE &&
- eOldError == CHERROR_RANGE )
- {
- m_aCbSyncPosNeg.Check(
- m_aMfPositive.GetValue() == m_aMfNegative.GetValue());
- }
-
- UpdateControlStates();
- return 0;
-}
-
-IMPL_LINK_NOARG(oldErrorBarResources, SynchronizePosAndNeg)
-{
- UpdateControlStates();
- PosValueChanged( 0 );
- return 0;
-}
-
-IMPL_LINK_NOARG(oldErrorBarResources, PosValueChanged)
-{
- if( m_aCbSyncPosNeg.IsChecked())
- {
- if( m_aRbRange.IsChecked())
- {
- m_aEdRangeNegative.SetText( m_aEdRangePositive.GetText());
- m_bRangeNegUnique = m_bRangePosUnique;
- }
- else
- m_aMfNegative.SetValue( m_aMfPositive.GetValue());
- }
-
- return 0;
-}
-
-IMPL_LINK_NOARG(oldErrorBarResources, IndicatorChanged)
-{
- m_bIndicatorUnique = true;
- if( m_aRbBoth.IsChecked())
- m_eIndicate = CHINDICATE_BOTH;
- else if( m_aRbPositive.IsChecked())
- m_eIndicate = CHINDICATE_UP;
- else if( m_aRbNegative.IsChecked())
- m_eIndicate = CHINDICATE_DOWN;
- else
- m_bIndicatorUnique = false;
-
- UpdateControlStates();
- return 0;
-}
-
-IMPL_LINK( oldErrorBarResources, ChooseRange, RangeSelectionButton *, pButton )
-{
- OSL_ASSERT( m_apRangeSelectionHelper.get());
- if( ! m_apRangeSelectionHelper.get())
- return 0;
- OSL_ASSERT( m_pCurrentRangeChoosingField == 0 );
-
- OUString aUIString;
- if( pButton == &m_aIbRangePositive )
- {
- m_pCurrentRangeChoosingField = &m_aEdRangePositive;
- aUIString = SCH_RESSTR( STR_DATA_SELECT_RANGE_FOR_POSITIVE_ERRORBARS );
- }
- else
- {
- m_pCurrentRangeChoosingField = &m_aEdRangeNegative;
- aUIString = SCH_RESSTR( STR_DATA_SELECT_RANGE_FOR_NEGATIVE_ERRORBARS );
- }
-
- assert( m_pParentDialog );
- if( m_pParentDialog )
- {
- lcl_enableRangeChoosing( true, m_pParentDialog );
- m_apRangeSelectionHelper->chooseRange(
- m_pCurrentRangeChoosingField->GetText(),
- aUIString, *this );
- }
- else
- m_pCurrentRangeChoosingField = 0;
-
- return 0;
-}
-
-IMPL_LINK( oldErrorBarResources, RangeChanged, Edit *, pEdit )
-{
- if( pEdit == & m_aEdRangePositive )
- {
- m_bRangePosUnique = true;
- PosValueChanged( 0 );
- }
- else
- {
- m_bRangeNegUnique = true;
- }
-
- isRangeFieldContentValid( *pEdit );
-
- return 0;
-}
-
-void oldErrorBarResources::Reset(const SfxItemSet& rInAttrs)
-{
- const SfxPoolItem *pPoolItem = NULL;
- SfxItemState aState = SFX_ITEM_UNKNOWN;
-
- // category
- m_eErrorKind = CHERROR_NONE;
- aState = rInAttrs.GetItemState( SCHATTR_STAT_KIND_ERROR, sal_True, &pPoolItem );
- m_bErrorKindUnique = ( aState != SFX_ITEM_DONTCARE );
-
- if( aState == SFX_ITEM_SET )
- m_eErrorKind = ((const SvxChartKindErrorItem*) pPoolItem)->GetValue();
-
- m_aLbFunction.SelectEntryPos( lcl_getLbEntryPosByErrorKind( m_eErrorKind ));
-
- if( m_bErrorKindUnique )
- {
- switch( m_eErrorKind )
- {
- case CHERROR_NONE:
- m_aRbNone.Check();
- break;
- case CHERROR_PERCENT:
- m_aRbPercent.Check();
- break;
- case CHERROR_CONST:
- m_aRbConst.Check();
- break;
- case CHERROR_STDERROR:
- case CHERROR_VARIANT:
- case CHERROR_SIGMA:
- case CHERROR_BIGERROR:
- m_aRbFunction.Check();
- break;
- case CHERROR_RANGE:
- m_aRbRange.Check();
- break;
- }
- }
- else
- {
- 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, sal_True, &pPoolItem );
- m_bPlusUnique = ( aState != SFX_ITEM_DONTCARE );
- double fPlusValue = 0.0;
- if( aState == SFX_ITEM_SET )
- {
- fPlusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue();
- sal_Int32 nPlusValue = static_cast< sal_Int32 >( fPlusValue * pow(10.0,m_aMfPositive.GetDecimalDigits()) );
- m_aMfPositive.SetValue( nPlusValue );
- }
-
- aState = rInAttrs.GetItemState( SCHATTR_STAT_CONSTMINUS, sal_True, &pPoolItem );
- m_bMinusUnique = ( aState != SFX_ITEM_DONTCARE );
- if( aState == SFX_ITEM_SET )
- {
- double fMinusValue = ((const SvxDoubleItem*) pPoolItem)->GetValue();
- sal_Int32 nMinusValue = static_cast< sal_Int32 >( fMinusValue * pow(10.0,m_aMfNegative.GetDecimalDigits()) );
- m_aMfNegative.SetValue( nMinusValue );
-
- if( m_eErrorKind != CHERROR_RANGE &&
- fPlusValue == fMinusValue )
- m_aCbSyncPosNeg.Check();
- }
-
- // indicator
- 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();
-
- if( m_bIndicatorUnique )
- {
- switch( m_eIndicate )
- {
- case CHINDICATE_NONE :
- // no longer used, use both as default
- m_eIndicate = CHINDICATE_BOTH;
- // fall-through intended to BOTH
- case CHINDICATE_BOTH :
- m_aRbBoth.Check(); break;
- case CHINDICATE_UP :
- m_aRbPositive.Check(); break;
- case CHINDICATE_DOWN :
- m_aRbNegative.Check(); break;
- }
- }
- else
- {
- m_aRbBoth.Check( sal_False );
- m_aRbPositive.Check( sal_False );
- m_aRbNegative.Check( sal_False );
- }
-
- // ranges
- aState = rInAttrs.GetItemState( SCHATTR_STAT_RANGE_POS, sal_True, &pPoolItem );
- m_bRangePosUnique = ( aState != SFX_ITEM_DONTCARE );
- if( aState == SFX_ITEM_SET )
- {
- OUString sRangePositive = (static_cast< const SfxStringItem * >( pPoolItem ))->GetValue();
- m_aEdRangePositive.SetText( sRangePositive );
- }
-
- aState = rInAttrs.GetItemState( SCHATTR_STAT_RANGE_NEG, sal_True, &pPoolItem );
- m_bRangeNegUnique = ( aState != SFX_ITEM_DONTCARE );
- if( aState == SFX_ITEM_SET )
- {
- OUString sRangeNegative = (static_cast< const SfxStringItem * >( pPoolItem ))->GetValue();
- m_aEdRangeNegative.SetText( sRangeNegative );
- if( m_eErrorKind == CHERROR_RANGE &&
- !sRangeNegative.isEmpty() &&
- sRangeNegative == m_aEdRangePositive.GetText() )
- m_aCbSyncPosNeg.Check();
- }
-
- UpdateControlStates();
-}
-
-sal_Bool oldErrorBarResources::FillItemSet(SfxItemSet& rOutAttrs) const
-{
- if( m_bErrorKindUnique )
- rOutAttrs.Put( SvxChartKindErrorItem( m_eErrorKind, SCHATTR_STAT_KIND_ERROR ));
- if( m_bIndicatorUnique )
- rOutAttrs.Put( SvxChartIndicateItem( m_eIndicate, SCHATTR_STAT_INDICATE ));
-
- if( m_bErrorKindUnique )
- {
- if( m_eErrorKind == CHERROR_RANGE )
- {
- OUString aPosRange;
- OUString aNegRange;
- if( m_bHasInternalDataProvider )
- {
- // the strings aPosRange/aNegRange have to be set to a non-empty
- // arbitrary string to generate error-bar sequences
- aPosRange = "x";
- aNegRange = aPosRange;
- }
- else
- {
- aPosRange = m_aEdRangePositive.GetText();
- if( m_aCbSyncPosNeg.IsChecked())
- aNegRange = aPosRange;
- else
- aNegRange = m_aEdRangeNegative.GetText();
- }
-
- if( m_bRangePosUnique )
- rOutAttrs.Put( SfxStringItem( SCHATTR_STAT_RANGE_POS, aPosRange ));
- if( m_bRangeNegUnique )
- rOutAttrs.Put( SfxStringItem( SCHATTR_STAT_RANGE_NEG, aNegRange ));
- }
- else if( m_eErrorKind == CHERROR_CONST ||
- m_eErrorKind == CHERROR_PERCENT ||
- m_eErrorKind == CHERROR_BIGERROR )
- {
- double fPosValue = static_cast< double >( m_aMfPositive.GetValue()) /
- pow( 10.0, m_aMfPositive.GetDecimalDigits());
- double fNegValue = 0.0;
-
- if( m_aCbSyncPosNeg.IsChecked())
- fNegValue = fPosValue;
- else
- fNegValue = static_cast< double >( m_aMfNegative.GetValue()) /
- pow( 10.0, m_aMfNegative.GetDecimalDigits());
-
- rOutAttrs.Put( SvxDoubleItem( fPosValue, SCHATTR_STAT_CONSTPLUS ));
- rOutAttrs.Put( SvxDoubleItem( fNegValue, SCHATTR_STAT_CONSTMINUS ));
- }
- }
-
- rOutAttrs.Put( SfxBoolItem( SCHATTR_STAT_ERRORBAR_TYPE , m_eErrorBarType == ERROR_BAR_Y ));
-
- return sal_True;
-}
-
-void oldErrorBarResources::FillValueSets()
-{
- if( m_eErrorBarType == ERROR_BAR_Y )
- {
- m_aFiNegative.SetImage( Image( SchResId( BMP_INDICATE_DOWN ) ) );
- m_aFiPositive.SetImage( Image( SchResId( BMP_INDICATE_UP ) ) );
- m_aFiBoth.SetImage( Image( SchResId( BMP_INDICATE_BOTH_VERTI ) ) );
- }
- else if( m_eErrorBarType == ERROR_BAR_X )
- {
- m_aFiNegative.SetImage( Image( SchResId( BMP_INDICATE_LEFT ) ) );
- m_aFiPositive.SetImage( Image( SchResId( BMP_INDICATE_RIGHT ) ) );
- m_aFiBoth.SetImage( Image( SchResId( BMP_INDICATE_BOTH_HORI ) ) );
- }
-}
-
-void oldErrorBarResources::listeningFinished(
- const OUString & rNewRange )
-{
- OSL_ASSERT( m_apRangeSelectionHelper.get());
- if( ! m_apRangeSelectionHelper.get())
- return;
-
- // rNewRange becomes invalid after removing the listener
- OUString aRange( rNewRange );
-
- // stop listening
- m_apRangeSelectionHelper->stopRangeListening();
-
- // change edit field
- if( m_pParentWindow )
- {
- m_pParentWindow->ToTop();
- m_pParentWindow->GrabFocus();
- }
-
- if( m_pCurrentRangeChoosingField )
- {
- m_pCurrentRangeChoosingField->SetText( aRange );
- m_pCurrentRangeChoosingField->GrabFocus();
- PosValueChanged( 0 );
- }
-
- m_pCurrentRangeChoosingField = 0;
-
- UpdateControlStates();
- OSL_ASSERT( m_pParentDialog );
- if( m_pParentDialog )
- lcl_enableRangeChoosing( false, m_pParentDialog );
-}
-
-void oldErrorBarResources::disposingRangeSelection()
-{
- OSL_ASSERT( m_apRangeSelectionHelper.get());
- if( m_apRangeSelectionHelper.get())
- m_apRangeSelectionHelper->stopRangeListening( false );
-}
-
-bool oldErrorBarResources::isRangeFieldContentValid( Edit & rEdit )
-{
- OUString aRange( rEdit.GetText());
- bool bIsValid = ( aRange.isEmpty() ) ||
- ( m_apRangeSelectionHelper.get() &&
- m_apRangeSelectionHelper->verifyCellRange( aRange ));
-
- if( bIsValid || !rEdit.IsEnabled())
- {
- rEdit.SetControlForeground();
- rEdit.SetControlBackground();
- }
- else
- {
- rEdit.SetControlBackground( RANGE_SELECTION_INVALID_RANGE_BACKGROUND_COLOR );
- rEdit.SetControlForeground( RANGE_SELECTION_INVALID_RANGE_FOREGROUND_COLOR );
- }
-
- return bIsValid;
-}
-
} //namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/dialogs/res_ErrorBar_tmpl.hrc b/chart2/source/controller/dialogs/res_ErrorBar_tmpl.hrc
deleted file mode 100644
index fc859f4c546d..000000000000
--- a/chart2/source/controller/dialogs/res_ErrorBar_tmpl.hrc
+++ /dev/null
@@ -1,222 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef _CHART2_RESOURCE_ERRORBARS_HXX
-#define _CHART2_RESOURCE_ERRORBARS_HXX
-
-#include "res_ErrorBar_IDs.hrc"
-#define WORKAROUND \
-StringList [ en-US ] = \
- { \
- < "Standard Error" ; CHART_LB_FUNCTION_STD_ERROR ; >; \
- < "Standard Deviation" ; CHART_LB_FUNCTION_STD_DEV ; >; \
- < "Variance" ; CHART_LB_FUNCTION_VARIANCE ; >; \
- < "Error Margin" ; CHART_LB_FUNCTION_ERROR_MARGIN ; >; \
- };
-
-
-#define RESOURCE_ERRORBARS(availablewidth, yoffset) \
-FixedLine FL_ERROR \
-{ \
- Pos = MAP_APPFONT ( 6 , 6 ) ; \
- Size = MAP_APPFONT ( 116 , 8 ) ; \
- Text [ en-US ] = "Error Category" ; \
-}; \
-RadioButton RB_NONE \
-{ \
- HelpID = HID_SCH_STATISTIK_NO_ERROR; \
- Pos = MAP_APPFONT ( 12 , 20 ) ; \
- Size = MAP_APPFONT ( 110 , 10 ) ; \
- Text [ en-US ] = "~None" ; \
- TabStop = TRUE ; \
-}; \
-RadioButton RB_CONST \
-{ \
- HelpID = HID_SCH_STATISTIK_CONSTERROR; \
- Pos = MAP_APPFONT ( 12 , 20 + yoffset ) ; \
- Size = MAP_APPFONT ( 110 , 10 ) ; \
- Text [ en-US ] = "~Constant Value" ; \
- TabStop = TRUE ; \
-}; \
-RadioButton RB_PERCENT \
-{ \
- HelpID = HID_SCH_STATISTIK_PERCENT; \
- Pos = MAP_APPFONT ( 12 , 34 + yoffset ) ; \
- Size = MAP_APPFONT ( 110 , 10 ) ; \
- Text [ en-US ] = "~Percentage" ; \
- TabStop = TRUE ; \
-}; \
-RadioButton RB_FUNCTION \
-{ \
- HelpID = HID_SCH_STATISTIK_FUNCTION; \
- Pos = MAP_APPFONT ( 12 , 48 + yoffset ) ; \
- Size = MAP_APPFONT ( 12 , 10 ) ; \
- Text [ en-US ] = "" ; \
- TabStop = TRUE ; \
-}; \
-RadioButton RB_RANGE \
-{ \
- HelpID = HID_SCH_STATISTIK_RANGE; \
- Pos = MAP_APPFONT( 12, 62 + yoffset ) ; \
- Size = MAP_APPFONT( 110, 10 ) ; \
- Text [ en-US ] = "Cell ~Range" ; \
- TabStop = TRUE ; \
-}; \
-ListBox LB_FUNCTION \
-{ \
- HelpID = HID_SCH_STATISTIK_FUNCTION_LB; \
- Pos = MAP_APPFONT ( 22 , 46 + yoffset ) ; \
- Size = MAP_APPFONT ( 94 , 59 ) ; \
- DropDown = TRUE; \
- Border = TRUE; \
- WORKAROUND\
-}; \
-FixedLine FL_PARAMETERS \
-{ \
- Pos = MAP_APPFONT ( 6 , 82 + yoffset ) ; \
- Size = MAP_APPFONT ( availablewidth - 12, 8 ) ; \
- Text [ en-US ] = "Parameters" ; \
-}; \
-FixedText FT_POSITIVE \
-{ \
- Pos = MAP_APPFONT ( 12 , 94 + yoffset ) ; \
- Size = MAP_APPFONT ( 46 , 8 ) ; \
- Text [ en-US ] = "P~ositive (+)"; \
-}; \
-MetricField MF_POSITIVE \
-{ \
- HelpID = HID_SCH_STATISTIK_POSITIVE_VALUE; \
- Border = TRUE ; \
- Pos = MAP_APPFONT ( 60 , 92 + yoffset ) ; \
- Size = MAP_APPFONT ( 56 , 12 ) ; \
- TabStop = TRUE ; \
- Repeat = TRUE ; \
- Spin = TRUE ; \
- Minimum = 0 ; \
- StrictFormat = TRUE ; \
- Unit = FUNIT_CUSTOM ; \
- SpinSize = 100 ; \
- DecimalDigits = 2 ; \
-}; \
-Edit ED_RANGE_POSITIVE \
-{ \
- HelpID = HID_SCH_STATISTIK_POSITIVE_RANGE; \
- Border = TRUE ; \
- Hide = TRUE; \
- Pos = MAP_APPFONT ( 60 , 92 + yoffset ) ; \
- Size = MAP_APPFONT ( 90 , 12 ) ; \
-}; \
-ImageButton IB_RANGE_POSITIVE \
-{ \
- HelpID = HID_SCH_STATISTIK_POSITIVE_RANGE_CHOOSER; \
- Hide = TRUE; \
- Pos = MAP_APPFONT ( 152 , 91 + yoffset ) ; \
- Size = MAP_APPFONT ( 14 , 14 ) ; \
- TabStop = TRUE ; \
-}; \
-FixedText FT_NEGATIVE \
-{ \
- Pos = MAP_APPFONT ( 12 , 110 + yoffset ) ; \
- Size = MAP_APPFONT ( 46 , 8 ) ; \
- Text [ en-US ] = "~Negative (-)"; \
-}; \
-MetricField MF_NEGATIVE \
-{ \
- HelpID = HID_SCH_STATISTIK_NEGATIVE_VALUE; \
- Border = TRUE ; \
- Pos = MAP_APPFONT ( 60 , 108 + yoffset ) ; \
- Size = MAP_APPFONT ( 56 , 12 ) ; \
- TabStop = TRUE ; \
- Repeat = TRUE ; \
- Spin = TRUE ; \
- Minimum = 0 ; \
- StrictFormat = TRUE ; \
- Unit = FUNIT_CUSTOM ; \
- SpinSize = 100 ; \
- DecimalDigits = 2 ; \
-}; \
-Edit ED_RANGE_NEGATIVE \
-{ \
- HelpID = HID_SCH_STATISTIK_NEGATIVE_RANGE; \
- Border = TRUE ; \
- Hide = TRUE; \
- Pos = MAP_APPFONT ( 60 , 108 + yoffset ) ; \
- Size = MAP_APPFONT ( 90 , 12 ) ; \
-}; \
-ImageButton IB_RANGE_NEGATIVE \
-{ \
- HelpID = HID_SCH_STATISTIK_NEGATIVE_RANGE_CHOOSER; \
- Hide = TRUE; \
- Pos = MAP_APPFONT ( 152 , 107 + yoffset ) ; \
- Size = MAP_APPFONT ( 14 , 14 ) ; \
- TabStop = TRUE ; \
-}; \
-CheckBox CB_SYN_POS_NEG \
-{ \
- HelpID = HID_SCH_STATISTIK_SAME_FOR_BOTH; \
- Pos = MAP_APPFONT ( 12 , 126 + yoffset ); \
- Size = MAP_APPFONT ( availablewidth - 12 , 10 ); \
- TabStop = TRUE; \
- Text[ en-US ] = "Same value for both"; \
-}; \
-FixedLine FL_INDICATE \
-{ \
- Pos = MAP_APPFONT ( 130 , 6 ) ; \
- Size = MAP_APPFONT ( availablewidth - 136 , 8 ) ; \
- Text [ en-US ] = "Error Indicator" ; \
-}; \
-RadioButton RB_BOTH \
-{ \
- HelpID = HID_SCH_STATISTIK_SHOW_BOTH; \
- Pos = MAP_APPFONT ( 154 , 22 ); \
- Size = MAP_APPFONT ( 90 , 10 ); \
- Text[ en-US ] = "Positive ~and Negative"; \
-}; \
-RadioButton RB_POSITIVE \
-{ \
- HelpID = HID_SCH_STATISTIK_SHOW_POSITIVE; \
- Pos = MAP_APPFONT ( 154 , 43 ); \
- Size = MAP_APPFONT ( 90 , 10 ); \
- Text[ en-US ] = "Pos~itive"; \
-}; \
-RadioButton RB_NEGATIVE \
-{ \
- HelpID = HID_SCH_STATISTIK_SHOW_NEGATIVE; \
- Pos = MAP_APPFONT ( 154 , 64 ); \
- Size = MAP_APPFONT ( 90 , 10 ); \
- Text[ en-US ] = "Ne~gative"; \
-}; \
-FixedImage FI_BOTH \
-{ \
- Pos = MAP_APPFONT ( 134 , 18 ); \
- Size = MAP_APPFONT ( 18 , 18 ); \
-}; \
-FixedImage FI_POSITIVE \
-{ \
- Pos = MAP_APPFONT ( 134 , 39 ); \
- Size = MAP_APPFONT ( 18 , 18 ); \
-}; \
-FixedImage FI_NEGATIVE \
-{ \
- Pos = MAP_APPFONT ( 134 , 60 ); \
- Size = MAP_APPFONT ( 18 , 18 ); \
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/HelpIds.hrc b/chart2/source/controller/inc/HelpIds.hrc
index 7f75c2edbef1..5b9be0c0ad3e 100644
--- a/chart2/source/controller/inc/HelpIds.hrc
+++ b/chart2/source/controller/inc/HelpIds.hrc
@@ -53,28 +53,11 @@
#define HID_SCH_LEGEND_POS_BOTTOM "CHART2_HID_SCH_LEGEND_POS_BOTTOM"
#define HID_SCH_STATISTIK_MEANVALUE "CHART2_HID_SCH_STATISTIK_MEANVALUE"
-#define HID_SCH_STATISTIK_NO_ERROR "CHART2_HID_SCH_STATISTIK_NO_ERROR"
-#define HID_SCH_STATISTIK_PERCENT "CHART2_HID_SCH_STATISTIK_PERCENT"
-#define HID_SCH_STATISTIK_CONSTERROR "CHART2_HID_SCH_STATISTIK_CONSTERROR"
#define HID_SCH_WIZARD_ROADMAP "CHART2_HID_SCH_WIZARD_ROADMAP"
#define HID_SCH_LEGEND_SHOW "CHART2_HID_SCH_LEGEND_SHOW"
#define HID_SCH_DATA_SERIES_LABEL "CHART2_HID_SCH_DATA_SERIES_LABEL"
-#define HID_SCH_STATISTIK_FUNCTION "CHART2_HID_SCH_STATISTIK_FUNCTION"
-#define HID_SCH_STATISTIK_RANGE "CHART2_HID_SCH_STATISTIK_RANGE"
-#define HID_SCH_STATISTIK_FUNCTION_LB "CHART2_HID_SCH_STATISTIK_FUNCTION_LB"
-#define HID_SCH_STATISTIK_POSITIVE_VALUE "CHART2_HID_SCH_STATISTIK_POSITIVE_VALUE"
-#define HID_SCH_STATISTIK_POSITIVE_RANGE "CHART2_HID_SCH_STATISTIK_POSITIVE_RANGE"
-#define HID_SCH_STATISTIK_POSITIVE_RANGE_CHOOSER "CHART2_HID_SCH_STATISTIK_POSITIVE_RANGE_CHOOSER"
-#define HID_SCH_STATISTIK_NEGATIVE_VALUE "CHART2_HID_SCH_STATISTIK_NEGATIVE_VALUE"
-#define HID_SCH_STATISTIK_NEGATIVE_RANGE "CHART2_HID_SCH_STATISTIK_NEGATIVE_RANGE"
-#define HID_SCH_STATISTIK_NEGATIVE_RANGE_CHOOSER "CHART2_HID_SCH_STATISTIK_NEGATIVE_RANGE_CHOOSER"
-#define HID_SCH_STATISTIK_SAME_FOR_BOTH "CHART2_HID_SCH_STATISTIK_SAME_FOR_BOTH"
-#define HID_SCH_STATISTIK_SHOW_BOTH "CHART2_HID_SCH_STATISTIK_SHOW_BOTH"
-#define HID_SCH_STATISTIK_SHOW_POSITIVE "CHART2_HID_SCH_STATISTIK_SHOW_POSITIVE"
-#define HID_SCH_STATISTIK_SHOW_NEGATIVE "CHART2_HID_SCH_STATISTIK_SHOW_NEGATIVE"
-
#define HID_DIAGRAM_TYPE "CHART2_HID_DIAGRAM_TYPE"
#define HID_DIAGRAM_DATA "CHART2_HID_DIAGRAM_DATA"
#define HID_INSERT_STATISTICS "CHART2_HID_INSERT_STATISTICS"
diff --git a/chart2/source/controller/inc/dlg_InsertErrorBars.hxx b/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
index 862b27919079..c8dcc1ae9fa5 100644
--- a/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
+++ b/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
@@ -36,7 +36,7 @@ public:
InsertErrorBarsDialog( Window* pParent, const SfxItemSet& rMyAttrs,
const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartDocument > & xChartDocument,
- oldErrorBarResources::tErrorBarType eType );
+ ErrorBarResources::tErrorBarType eType );
virtual ~InsertErrorBarsDialog();
void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
@@ -54,11 +54,7 @@ public:
private:
const SfxItemSet & rInAttrs;
- OKButton aBtnOK;
- CancelButton aBtnCancel;
- HelpButton aBtnHelp;
-
- boost::scoped_ptr< oldErrorBarResources > m_apErrorBarResources;
+ boost::scoped_ptr< ErrorBarResources > m_apErrorBarResources;
};
} //namespace chart
diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx
index c568560ebde6..650b9c873d70 100644
--- a/chart2/source/controller/inc/res_ErrorBar.hxx
+++ b/chart2/source/controller/inc/res_ErrorBar.hxx
@@ -20,7 +20,6 @@
#define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_RES_ERRORBAR_HXX
#include <vcl/button.hxx>
-// #include <vcl/dialog.hxx>
#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
#include <vcl/field.hxx>
@@ -30,7 +29,7 @@
#include "chartview/ChartSfxItemIds.hxx"
#include "RangeSelectionButton.hxx"
#include "RangeSelectionListener.hxx"
-#include "RangeEdit.hxx"
+
#include <com/sun/star/chart2/XChartDocument.hpp>
@@ -53,7 +52,7 @@ public:
};
ErrorBarResources(
- SfxTabPage* pParent, Dialog* pParentDialog, const SfxItemSet& rInAttrs, bool bNoneAvailable, chart::ErrorBarResources::tErrorBarType eType = ERROR_BAR_Y );
+ VclBuilderContainer* pParent, Dialog* pParentDialog, const SfxItemSet& rInAttrs, bool bNoneAvailable, chart::ErrorBarResources::tErrorBarType eType = ERROR_BAR_Y );
virtual ~ErrorBarResources();
void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
@@ -72,7 +71,6 @@ public:
private:
// category
-// FixedLine m_pFlErrorCategory;
RadioButton* m_pRbNone;
RadioButton* m_pRbConst;
RadioButton* m_pRbPercent;
@@ -93,7 +91,6 @@ private:
CheckBox* m_pCbSyncPosNeg;
// indicator
-// FixedLine* m_pFlIndicate;
RadioButton* m_pRbBoth;
RadioButton* m_pRbPositive;
RadioButton* m_pRbNegative;
@@ -121,7 +118,7 @@ private:
sal_uInt16 m_nConstDecimalDigits;
sal_Int64 m_nConstSpinSize;
- SfxTabPage* m_pParentWindow;
+ VclBuilderContainer* m_pParentWindow;
Dialog * m_pParentDialog;
boost::scoped_ptr< RangeSelectionHelper > m_apRangeSelectionHelper;
Edit * m_pCurrentRangeChoosingField;
@@ -139,101 +136,6 @@ private:
bool isRangeFieldContentValid( Edit & rEdit );
};
-class oldErrorBarResources : public RangeSelectionListenerParent
-{
-public:
- enum tErrorBarType
- {
- ERROR_BAR_X,
- ERROR_BAR_Y
- };
-
- oldErrorBarResources(
- Window* pParent, Dialog * pParentDialog, const SfxItemSet& rInAttrst,
- bool bNoneAvailable,
- tErrorBarType eType = ERROR_BAR_Y );
- virtual ~oldErrorBarResources();
-
- void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
- void SetErrorBarType( tErrorBarType eNewType );
- void SetChartDocumentForRangeChoosing(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XChartDocument > & xChartDocument );
- void Reset(const SfxItemSet& rInAttrs);
- sal_Bool FillItemSet(SfxItemSet& rOutAttrs) const;
-
- void FillValueSets();
-
- // ____ RangeSelectionListenerParent ____
- virtual void listeningFinished( const OUString & rNewRange );
- virtual void disposingRangeSelection();
-
-private:
- // category
- FixedLine m_aFlErrorCategory;
- RadioButton m_aRbNone;
- RadioButton m_aRbConst;
- RadioButton m_aRbPercent;
- RadioButton m_aRbFunction;
- RadioButton m_aRbRange;
- ListBox m_aLbFunction;
-
- // parameters
- FixedLine m_aFlParameters;
- FixedText m_aFtPositive;
- MetricField m_aMfPositive;
- RangeEdit m_aEdRangePositive;
- RangeSelectionButton m_aIbRangePositive;
- FixedText m_aFtNegative;
- MetricField m_aMfNegative;
- RangeEdit m_aEdRangeNegative;
- RangeSelectionButton m_aIbRangeNegative;
- CheckBox m_aCbSyncPosNeg;
-
- // indicator
- FixedLine m_aFlIndicate;
- RadioButton m_aRbBoth;
- RadioButton m_aRbPositive;
- RadioButton m_aRbNegative;
- FixedImage m_aFiBoth;
- FixedImage m_aFiPositive;
- FixedImage m_aFiNegative;
-
- SvxChartKindError m_eErrorKind;
- SvxChartIndicate m_eIndicate;
-
- bool m_bErrorKindUnique;
- bool m_bIndicatorUnique;
- bool m_bPlusUnique;
- bool m_bMinusUnique;
- bool m_bRangePosUnique;
- bool m_bRangeNegUnique;
-
- bool m_bNoneAvailable;
-
- tErrorBarType m_eErrorBarType;
- sal_uInt16 m_nConstDecimalDigits;
- sal_Int64 m_nConstSpinSize;
-
- Window * m_pParentWindow;
- Dialog * m_pParentDialog;
- ::std::auto_ptr< RangeSelectionHelper >
- m_apRangeSelectionHelper;
- Edit * m_pCurrentRangeChoosingField;
- bool m_bHasInternalDataProvider;
- bool m_bDisableDataTableDialog;
-
- DECL_LINK( CategoryChosen, void * );
- DECL_LINK( SynchronizePosAndNeg, void * );
- DECL_LINK( PosValueChanged, void * );
- DECL_LINK( IndicatorChanged, void * );
- DECL_LINK( ChooseRange, RangeSelectionButton * );
- DECL_LINK( RangeChanged, Edit * );
-
- void UpdateControlStates();
- bool isRangeFieldContentValid( Edit & rEdit );
-};
-
} //namespace chart
#endif
diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx
index db3aa6d80507..034b32678e94 100644
--- a/chart2/source/controller/main/ChartController_Insert.cxx
+++ b/chart2/source/controller/main/ChartController_Insert.cxx
@@ -496,7 +496,7 @@ void ChartController::executeDispatch_InsertErrorBars( bool bYError )
InsertErrorBarsDialog aDlg(
m_pChartWindow, aItemSet,
uno::Reference< chart2::XChartDocument >( getModel(), uno::UNO_QUERY ),
- bYError ? oldErrorBarResources::ERROR_BAR_Y : oldErrorBarResources::ERROR_BAR_X);
+ bYError ? ErrorBarResources::ERROR_BAR_Y : ErrorBarResources::ERROR_BAR_X);
aDlg.SetAxisMinorStepWidthForErrorBarDecimals(
InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals( getModel(), m_xChartView, OUString() ) );
diff --git a/chart2/source/inc/Strings.hrc b/chart2/source/inc/Strings.hrc
index fd6e687acf25..c0e1435bac37 100644
--- a/chart2/source/inc/Strings.hrc
+++ b/chart2/source/inc/Strings.hrc
@@ -134,8 +134,6 @@
#define STR_DATA_SELECT_RANGE_FOR_SERIES (RID_APP_START + 252)
#define STR_DATA_SELECT_RANGE_FOR_CATEGORIES (RID_APP_START + 253)
#define STR_DATA_SELECT_RANGE_FOR_DATALABELS (RID_APP_START + 195)
-#define STR_DATA_SELECT_RANGE_FOR_POSITIVE_ERRORBARS (RID_APP_START + 21)
-#define STR_DATA_SELECT_RANGE_FOR_NEGATIVE_ERRORBARS (RID_APP_START + 267)
//-----------------------------------------------------------------------------
//chart objects
diff --git a/chart2/uiconfig/ui/dlg_InsertErrorBars.ui b/chart2/uiconfig/ui/dlg_InsertErrorBars.ui
new file mode 100644
index 000000000000..90137a04de24
--- /dev/null
+++ b/chart2/uiconfig/ui/dlg_InsertErrorBars.ui
@@ -0,0 +1,658 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkAdjustment" id="adjustmentPOS_NEG">
+ <property name="upper">100</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkDialog" id="dlg_InsertErrorBars">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Legend</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="tp_ErrorBars">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkBox" id="box2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkFrame" id="FL_ERROR">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="RB_NONE">
+ <property name="label" translatable="yes">_None</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">RB_CONST</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="RB_CONST">
+ <property name="label" translatable="yes">_Constant Value</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">RB_PERCENT</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="RB_PERCENT">
+ <property name="label" translatable="yes">_Percentage</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">RB_FUNCTION</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="RB_FUNCTION">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">RB_RANGE</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="LB_FUNCTION">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">liststoreFUNCTION</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="RB_RANGE">
+ <property name="label" translatable="yes">Cell _Range</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">RB_NONE</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Error Category</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkRadioButton" id="RB_BOTH">
+ <property name="label" translatable="yes">Positive _and Negative</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">RB_POSITIVE</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="RB_POSITIVE">
+ <property name="label" translatable="yes">Pos_itive</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">RB_NEGATIVE</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="RB_NEGATIVE">
+ <property name="label" translatable="yes">Ne_gative</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">RB_BOTH</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="FI_BOTH">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-missing-image</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="FI_POSITIVE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-missing-image</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="FI_NEGATIVE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-missing-image</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Error Indicator</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="framePARAMETERS">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="box5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkBox" id="boxPOSITIVE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="FT_POSITIVE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">P_ositive (+)</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">MF_POSITIVE:0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="MF_POSITIVE:0">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="ED_RANGE_POSITIVE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="IB_RANGE_POSITIVE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Select data range</property>
+ <property name="image">imageRANGE_SELECT_POSITIVE</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="boxNEGATIVE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="FT_NEGATIVE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Negative (-)</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">MF_NEGATIVE:0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="MF_NEGATIVE:0">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="ED_RANGE_NEGATIVE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="invisible_char">•</property>
+ <property name="invisible_char_set">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="IB_RANGE_NEGATIVE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip_text" translatable="yes">Select data range</property>
+ <property name="image">imageRANGE_SELECT_NEG</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="CB_SYN_POS_NEG">
+ <property name="label" translatable="yes">Same value for both</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Parameters</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="STR_DATA_SELECT_RANGE_FOR_POSITIVE_ERRORBARS">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Select Range for Positive Error Bars</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="STR_DATA_SELECT_RANGE_FOR_NEGATIVE_ERRORBARS">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Select Range for Negative Error Bars</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="STR_CONTROLTEXT_ERROR_BARS_FROM_DATA">
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">From Data Table</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkImage" id="imageRANGE_SELECT_NEG">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">chart2/res/selectrange.png</property>
+ </object>
+ <object class="GtkImage" id="imageRANGE_SELECT_POSITIVE">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="pixbuf">chart2/res/selectrange.png</property>
+ </object>
+ <object class="GtkListStore" id="liststoreFUNCTION">
+ <columns>
+ <!-- column-name gchararray1 -->
+ <column type="gchararray"/>
+ <!-- column-name guint1 -->
+ <column type="guint"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Standard Error</col>
+ <col id="1">0</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Standard Deviation</col>
+ <col id="1">1</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Variance</col>
+ <col id="1">2</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Error Margin</col>
+ <col id="1">3</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="FT_POSITIVE"/>
+ <widget name="FT_NEGATIVE"/>
+ <widget name="FT_NEGATIVE"/>
+ <widget name="FT_POSITIVE"/>
+ </widgets>
+ </object>
+</interface>
diff --git a/chart2/uiconfig/ui/tp_ErrorBars.ui b/chart2/uiconfig/ui/tp_ErrorBars.ui
index 9f9243fc26a2..9e1d058056ae 100644
--- a/chart2/uiconfig/ui/tp_ErrorBars.ui
+++ b/chart2/uiconfig/ui/tp_ErrorBars.ui
@@ -6,12 +6,12 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
- <object class="GtkImage" id="imageRANGE_SELECT_POSITIVE">
+ <object class="GtkImage" id="imageRANGE_SELECT_NEG">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">chart2/res/selectrange.png</property>
</object>
- <object class="GtkImage" id="imageRANGE_SELECT_NEG">
+ <object class="GtkImage" id="imageRANGE_SELECT_POSITIVE">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="pixbuf">chart2/res/selectrange.png</property>
@@ -416,6 +416,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Select data range</property>
<property name="image">imageRANGE_SELECT_POSITIVE</property>
</object>
<packing>