1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "tp_ErrorBars.hxx"
22 #include "ResourceIds.hrc"
23 #include "TabPageNotifiable.hxx"
24 #include <vcl/settings.hxx>
26 using namespace ::com::sun::star
;
31 ErrorBarsTabPage::ErrorBarsTabPage( vcl::Window
* pParent
, const SfxItemSet
& rInAttrs
) :
34 ,"modules/schart/ui/tp_ErrorBars.ui"
38 // the parent is the tab control, of which the parent is the dialog
39 pParent
->GetParentDialog(),
40 rInAttrs
, /* bNoneAvailable = */ false )
44 VclPtr
<SfxTabPage
> ErrorBarsTabPage::Create(
45 vcl::Window
* pParent
, const SfxItemSet
* rOutAttrs
)
47 return VclPtr
<ErrorBarsTabPage
>::Create( pParent
, *rOutAttrs
);
50 bool ErrorBarsTabPage::FillItemSet( SfxItemSet
* rOutAttrs
)
52 return m_aErrorBarResources
.FillItemSet( *rOutAttrs
);
55 void ErrorBarsTabPage::Reset( const SfxItemSet
* rInAttrs
)
57 m_aErrorBarResources
.Reset( *rInAttrs
);
60 void ErrorBarsTabPage::DataChanged( const DataChangedEvent
& rDCEvt
)
62 SfxTabPage::DataChanged( rDCEvt
);
64 if ( (rDCEvt
.GetType() == DataChangedEventType::SETTINGS
) && (rDCEvt
.GetFlags() & AllSettingsFlags::STYLE
) )
65 m_aErrorBarResources
.FillValueSets();
68 void ErrorBarsTabPage::SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth
)
70 m_aErrorBarResources
.SetAxisMinorStepWidthForErrorBarDecimals( fMinorStepWidth
);
73 void ErrorBarsTabPage::SetErrorBarType( ErrorBarResources::tErrorBarType eNewType
)
75 m_aErrorBarResources
.SetErrorBarType( eNewType
);
78 void ErrorBarsTabPage::SetChartDocumentForRangeChoosing(
79 const uno::Reference
< chart2::XChartDocument
> & xChartDocument
)
81 m_aErrorBarResources
.SetChartDocumentForRangeChoosing( xChartDocument
);
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */