summaryrefslogtreecommitdiff
path: root/chart2/source/controller
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-06 12:19:57 +0200
committerNoel Grandin <noel@peralex.com>2016-04-11 08:26:01 +0200
commite5dd156a44625865684b5dfa90a95108259deb50 (patch)
treebb0da749c95d7fb1929f2c7d8757a53e73720807 /chart2/source/controller
parent4cbcec9ed4c51277b00c155a5fa097880c0dee4b (diff)
loplugin:constantparam
Change-Id: Ie690088d7a7d568703afd22f544628fc8012a7e1
Diffstat (limited to 'chart2/source/controller')
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx8
-rw-r--r--chart2/source/controller/dialogs/DialogModel.hxx3
-rw-r--r--chart2/source/controller/dialogs/dlg_CreationWizard.cxx26
-rw-r--r--chart2/source/controller/inc/dlg_CreationWizard.hxx6
4 files changed, 9 insertions, 34 deletions
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index a6d8dcffd589..4cb14c46dd0a 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -737,8 +737,7 @@ void DialogModel::setData(
xInterpreter->interpretDataSource(
xDataSource, rArguments,
comphelper::containerToSequence( aSeriesToReUse )),
- aSeriesToReUse,
- true /* bSetStyles */);
+ aSeriesToReUse);
ThreeDHelper::setScheme( xDiagram, e3DScheme );
}
@@ -784,8 +783,7 @@ sal_Int32 DialogModel::GetRoleIndexForSorting( const OUString & rInternalRoleStr
void DialogModel::applyInterpretedData(
const InterpretedData & rNewData,
- const ::std::vector< Reference< XDataSeries > > & rSeriesToReUse,
- bool bSetStyles )
+ const ::std::vector< Reference< XDataSeries > > & rSeriesToReUse )
{
if( ! m_xChartDocument.is())
return;
@@ -795,7 +793,7 @@ void DialogModel::applyInterpretedData(
if( xDiagram.is())
{
// styles
- if( bSetStyles && m_xTemplate.is() )
+ if( m_xTemplate.is() )
{
sal_Int32 nGroup = 0;
sal_Int32 nSeriesCounter = 0;
diff --git a/chart2/source/controller/dialogs/DialogModel.hxx b/chart2/source/controller/dialogs/DialogModel.hxx
index 45980a14936f..a863b614779d 100644
--- a/chart2/source/controller/dialogs/DialogModel.hxx
+++ b/chart2/source/controller/dialogs/DialogModel.hxx
@@ -164,8 +164,7 @@ private:
private:
void applyInterpretedData(
const css::chart2::InterpretedData & rNewData,
- const ::std::vector< css::uno::Reference< css::chart2::XDataSeries > > & rSeriesToReUse,
- bool bSetStyles );
+ const ::std::vector< css::uno::Reference< css::chart2::XDataSeries > > & rSeriesToReUse );
sal_Int32 countSeries() const;
diff --git a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
index 6915191b81aa..63e9a710f5c7 100644
--- a/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
+++ b/chart2/source/controller/dialogs/dlg_CreationWizard.cxx
@@ -45,23 +45,14 @@ using namespace ::com::sun::star;
#define STATE_OBJECTS 3
#define STATE_LAST STATE_OBJECTS
-namespace
-{
- const sal_Int32 nPageCount = 4;
-}
-
CreationWizard::CreationWizard( vcl::Window* pParent, const uno::Reference< frame::XModel >& xChartModel
- , const uno::Reference< uno::XComponentContext >& xContext
- , sal_Int32 nOnePageOnlyIndex )
+ , const uno::Reference< uno::XComponentContext >& xContext )
: svt::RoadmapWizard( pParent,
- (nOnePageOnlyIndex >= 0 && nOnePageOnlyIndex < nPageCount)
- ? WizardButtonFlags::HELP | WizardButtonFlags::CANCEL | WizardButtonFlags::FINISH
- : WizardButtonFlags::HELP | WizardButtonFlags::CANCEL | WizardButtonFlags::PREVIOUS | WizardButtonFlags::NEXT | WizardButtonFlags::FINISH
+ WizardButtonFlags::HELP | WizardButtonFlags::CANCEL | WizardButtonFlags::PREVIOUS | WizardButtonFlags::NEXT | WizardButtonFlags::FINISH
)
, m_xChartModel(xChartModel,uno::UNO_QUERY)
, m_xCC( xContext )
, m_bIsClosable(true)
- , m_nOnePageOnlyIndex(nOnePageOnlyIndex)
, m_pTemplateProvider(nullptr)
, m_nFirstState(STATE_FIRST)
, m_nLastState(STATE_LAST)
@@ -71,13 +62,7 @@ CreationWizard::CreationWizard( vcl::Window* pParent, const uno::Reference< fram
m_pDialogModel.reset( new DialogModel( m_xChartModel, m_xCC ));
defaultButton( WizardButtonFlags::FINISH );
- if( m_nOnePageOnlyIndex < 0 || m_nOnePageOnlyIndex >= nPageCount )
- {
- m_nOnePageOnlyIndex = -1;
- this->setTitleBase(SCH_RESSTR(STR_DLG_CHART_WIZARD));
- }
- else
- this->setTitleBase(OUString());
+ this->setTitleBase(SCH_RESSTR(STR_DLG_CHART_WIZARD));
declarePath( PATH_FULL
, STATE_CHARTTYPE
@@ -109,15 +94,12 @@ CreationWizard::CreationWizard( vcl::Window* pParent, const uno::Reference< fram
VclPtr<TabPage> CreationWizard::createPage(WizardState nState)
{
VclPtr<svt::OWizardPage> pRet;
- if(m_nOnePageOnlyIndex!=-1 && m_nOnePageOnlyIndex!=nState)
- return pRet;
- bool bDoLiveUpdate = m_nOnePageOnlyIndex == -1;
switch( nState )
{
case STATE_CHARTTYPE:
{
m_aTimerTriggeredControllerLock.startTimer();
- VclPtrInstance<ChartTypeTabPage> pChartTypeTabPage(this,m_xChartModel,bDoLiveUpdate);
+ VclPtrInstance<ChartTypeTabPage> pChartTypeTabPage(this,m_xChartModel,true/*bDoLiveUpdate*/);
pRet = pChartTypeTabPage;
m_pTemplateProvider = pChartTypeTabPage;
if (m_pDialogModel)
diff --git a/chart2/source/controller/inc/dlg_CreationWizard.hxx b/chart2/source/controller/inc/dlg_CreationWizard.hxx
index 18b2904b91e2..eb2ed7373590 100644
--- a/chart2/source/controller/inc/dlg_CreationWizard.hxx
+++ b/chart2/source/controller/inc/dlg_CreationWizard.hxx
@@ -42,10 +42,7 @@ class CreationWizard : public svt::RoadmapWizard, public TabPageNotifiable
public:
CreationWizard( vcl::Window* pParent,
const css::uno::Reference< css::frame::XModel >& xChartModel
- , const css::uno::Reference< css::uno::XComponentContext >& xContext
- // if nOnePageOnlyIndex is an index of an exsisting page starting with 0
- // then only this page is displayed without next/previous and roadmap
- , sal_Int32 nOnePageOnlyIndex=-1 );
+ , const css::uno::Reference< css::uno::XComponentContext >& xContext );
CreationWizard() = delete;
@@ -68,7 +65,6 @@ private:
css::uno::Reference< css::chart2::XChartDocument > m_xChartModel;
css::uno::Reference< css::uno::XComponentContext> m_xCC;
bool m_bIsClosable;
- sal_Int32 m_nOnePageOnlyIndex;//if nOnePageOnlyIndex is an index of an exsisting page starting with 0, then only this page is displayed without next/previous and roadmap
ChartTypeTemplateProvider* m_pTemplateProvider;
std::unique_ptr<DialogModel> m_pDialogModel;