xref: /AOO41X/main/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx (revision cde9e8dc2218e857da4894ecba5c903312256674)
1*cde9e8dcSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*cde9e8dcSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*cde9e8dcSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*cde9e8dcSAndrew Rist  * distributed with this work for additional information
6*cde9e8dcSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*cde9e8dcSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*cde9e8dcSAndrew Rist  * "License"); you may not use this file except in compliance
9*cde9e8dcSAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*cde9e8dcSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*cde9e8dcSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*cde9e8dcSAndrew Rist  * software distributed under the License is distributed on an
15*cde9e8dcSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*cde9e8dcSAndrew Rist  * KIND, either express or implied.  See the License for the
17*cde9e8dcSAndrew Rist  * specific language governing permissions and limitations
18*cde9e8dcSAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*cde9e8dcSAndrew Rist  *************************************************************/
21*cde9e8dcSAndrew Rist 
22*cde9e8dcSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_chart2.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "tp_3D_SceneAppearance.hxx"
28cdf0e10cSrcweir #include "tp_3D_SceneAppearance.hrc"
29cdf0e10cSrcweir #include "ResId.hxx"
30cdf0e10cSrcweir #include "Strings.hrc"
31cdf0e10cSrcweir #include "NoWarningThisInCTOR.hxx"
32cdf0e10cSrcweir #include "ChartModelHelper.hxx"
33cdf0e10cSrcweir #include "ThreeDHelper.hxx"
34cdf0e10cSrcweir #include "macros.hxx"
35cdf0e10cSrcweir #include <rtl/math.hxx>
36cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
37cdf0e10cSrcweir 
38cdf0e10cSrcweir using namespace ::com::sun::star;
39cdf0e10cSrcweir 
40cdf0e10cSrcweir namespace
41cdf0e10cSrcweir {
42cdf0e10cSrcweir 
43cdf0e10cSrcweir struct lcl_ModelProperties
44cdf0e10cSrcweir {
45cdf0e10cSrcweir     drawing::ShadeMode        m_aShadeMode;
46cdf0e10cSrcweir     sal_Int32                 m_nRoundedEdges;
47cdf0e10cSrcweir     sal_Int32                 m_nObjectLines;
48cdf0e10cSrcweir     ::chart::ThreeDLookScheme m_eScheme;
49cdf0e10cSrcweir 
lcl_ModelProperties__anon1762222e0111::lcl_ModelProperties50cdf0e10cSrcweir     lcl_ModelProperties() :
51cdf0e10cSrcweir             m_nRoundedEdges(-1),
52cdf0e10cSrcweir             m_nObjectLines(-1),
53cdf0e10cSrcweir             m_eScheme(::chart::ThreeDLookScheme_Unknown)
54cdf0e10cSrcweir     {}
55cdf0e10cSrcweir };
56cdf0e10cSrcweir 
lcl_getPropertiesFromModel(uno::Reference<frame::XModel> & xModel)57cdf0e10cSrcweir lcl_ModelProperties lcl_getPropertiesFromModel( uno::Reference< frame::XModel > & xModel )
58cdf0e10cSrcweir {
59cdf0e10cSrcweir     lcl_ModelProperties aProps;
60cdf0e10cSrcweir     try
61cdf0e10cSrcweir     {
62cdf0e10cSrcweir         uno::Reference< chart2::XDiagram > xDiagram( ::chart::ChartModelHelper::findDiagram( xModel ) );
63cdf0e10cSrcweir         uno::Reference< beans::XPropertySet > xDiaProp( xDiagram, uno::UNO_QUERY_THROW );
64cdf0e10cSrcweir         xDiaProp->getPropertyValue( C2U("D3DSceneShadeMode")) >>= aProps.m_aShadeMode;
65cdf0e10cSrcweir         ::chart::ThreeDHelper::getRoundedEdgesAndObjectLines( xDiagram, aProps.m_nRoundedEdges, aProps.m_nObjectLines );
66cdf0e10cSrcweir         aProps.m_eScheme = ::chart::ThreeDHelper::detectScheme( xDiagram );
67cdf0e10cSrcweir     }
68cdf0e10cSrcweir     catch( const uno::Exception & ex )
69cdf0e10cSrcweir     {
70cdf0e10cSrcweir         ASSERT_EXCEPTION( ex );
71cdf0e10cSrcweir     }
72cdf0e10cSrcweir     return aProps;
73cdf0e10cSrcweir }
74cdf0e10cSrcweir 
lcl_setShadeModeAtModel(uno::Reference<frame::XModel> & xModel,drawing::ShadeMode aShadeMode)75cdf0e10cSrcweir void lcl_setShadeModeAtModel( uno::Reference< frame::XModel > & xModel, drawing::ShadeMode aShadeMode )
76cdf0e10cSrcweir {
77cdf0e10cSrcweir     try
78cdf0e10cSrcweir     {
79cdf0e10cSrcweir         uno::Reference< beans::XPropertySet > xDiaProp(
80cdf0e10cSrcweir             ::chart::ChartModelHelper::findDiagram( xModel ), uno::UNO_QUERY_THROW );
81cdf0e10cSrcweir         xDiaProp->setPropertyValue( C2U("D3DSceneShadeMode"), uno::makeAny( aShadeMode ));
82cdf0e10cSrcweir     }
83cdf0e10cSrcweir     catch( const uno::Exception & ex )
84cdf0e10cSrcweir     {
85cdf0e10cSrcweir         ASSERT_EXCEPTION( ex );
86cdf0e10cSrcweir     }
87cdf0e10cSrcweir }
88cdf0e10cSrcweir 
89cdf0e10cSrcweir } // anonymous namespace
90cdf0e10cSrcweir 
91cdf0e10cSrcweir //.............................................................................
92cdf0e10cSrcweir namespace chart
93cdf0e10cSrcweir {
94cdf0e10cSrcweir //.............................................................................
95cdf0e10cSrcweir 
96cdf0e10cSrcweir #define POS_3DSCHEME_SIMPLE    0
97cdf0e10cSrcweir #define POS_3DSCHEME_REALISTIC 1
98cdf0e10cSrcweir #define POS_3DSCHEME_CUSTOM 2
99cdf0e10cSrcweir 
ThreeD_SceneAppearance_TabPage(Window * pWindow,const uno::Reference<frame::XModel> & xChartModel,ControllerLockHelper & rControllerLockHelper)100cdf0e10cSrcweir ThreeD_SceneAppearance_TabPage::ThreeD_SceneAppearance_TabPage(
101cdf0e10cSrcweir       Window* pWindow
102cdf0e10cSrcweir     , const uno::Reference< frame::XModel > & xChartModel
103cdf0e10cSrcweir     , ControllerLockHelper & rControllerLockHelper )
104cdf0e10cSrcweir                 : TabPage 	        ( pWindow, SchResId( TP_3D_SCENEAPPEARANCE ) )
105cdf0e10cSrcweir                 , m_xChartModel     ( xChartModel )
106cdf0e10cSrcweir                 , m_aFT_Scheme      ( this, SchResId( FT_SCHEME ) )
107cdf0e10cSrcweir                 , m_aLB_Scheme      ( this, SchResId( LB_SCHEME ) )
108cdf0e10cSrcweir                 , m_aFL_Seperator   ( this, SchResId( FL_SEPERATOR ) )
109cdf0e10cSrcweir                 , m_aCB_Shading	    ( this, SchResId( CB_SHADING ) )
110cdf0e10cSrcweir                 , m_aCB_ObjectLines ( this, SchResId( CB_OBJECTLINES ) )
111cdf0e10cSrcweir                 , m_aCB_RoundedEdge ( this, SchResId( CB_ROUNDEDEDGE ) )
112cdf0e10cSrcweir                 , m_bUpdateOtherControls( true )
113cdf0e10cSrcweir                 , m_bCommitToModel( true )
114cdf0e10cSrcweir                 , m_rControllerLockHelper( rControllerLockHelper )
115cdf0e10cSrcweir {
116cdf0e10cSrcweir 	FreeResource();
117cdf0e10cSrcweir     m_aLB_Scheme.InsertEntry(String(SchResId(STR_3DSCHEME_SIMPLE)),POS_3DSCHEME_SIMPLE);
118cdf0e10cSrcweir     m_aLB_Scheme.InsertEntry(String(SchResId(STR_3DSCHEME_REALISTIC)),POS_3DSCHEME_REALISTIC);
119cdf0e10cSrcweir     m_aLB_Scheme.SetDropDownLineCount(2);
120cdf0e10cSrcweir 
121cdf0e10cSrcweir     m_aLB_Scheme.SetSelectHdl( LINK( this, ThreeD_SceneAppearance_TabPage, SelectSchemeHdl ) );
122cdf0e10cSrcweir 
123cdf0e10cSrcweir     m_aCB_RoundedEdge.SetToggleHdl( LINK( this, ThreeD_SceneAppearance_TabPage, SelectRoundedEdgeOrObjectLines ) );
124cdf0e10cSrcweir     m_aCB_Shading.SetToggleHdl( LINK( this, ThreeD_SceneAppearance_TabPage, SelectShading ) );
125cdf0e10cSrcweir     m_aCB_ObjectLines.SetToggleHdl( LINK( this, ThreeD_SceneAppearance_TabPage, SelectRoundedEdgeOrObjectLines ) );
126cdf0e10cSrcweir 
127cdf0e10cSrcweir     m_aCB_RoundedEdge.EnableTriState( sal_True );
128cdf0e10cSrcweir     m_aCB_Shading.EnableTriState( sal_True );
129cdf0e10cSrcweir     m_aCB_ObjectLines.EnableTriState( sal_True );
130cdf0e10cSrcweir 
131cdf0e10cSrcweir     initControlsFromModel();
132cdf0e10cSrcweir }
133cdf0e10cSrcweir 
~ThreeD_SceneAppearance_TabPage()134cdf0e10cSrcweir ThreeD_SceneAppearance_TabPage::~ThreeD_SceneAppearance_TabPage()
135cdf0e10cSrcweir {}
136cdf0e10cSrcweir 
ActivatePage()137cdf0e10cSrcweir void ThreeD_SceneAppearance_TabPage::ActivatePage()
138cdf0e10cSrcweir {
139cdf0e10cSrcweir     updateScheme();
140cdf0e10cSrcweir }
141cdf0e10cSrcweir 
commitPendingChanges()142cdf0e10cSrcweir void ThreeD_SceneAppearance_TabPage::commitPendingChanges()
143cdf0e10cSrcweir {
144cdf0e10cSrcweir }
145cdf0e10cSrcweir 
applyRoundedEdgeAndObjectLinesToModel()146cdf0e10cSrcweir void ThreeD_SceneAppearance_TabPage::applyRoundedEdgeAndObjectLinesToModel()
147cdf0e10cSrcweir {
148cdf0e10cSrcweir     if(!m_bCommitToModel)
149cdf0e10cSrcweir         return;
150cdf0e10cSrcweir 
151cdf0e10cSrcweir     sal_Int32 nObjectLines = -1;
152cdf0e10cSrcweir 
153cdf0e10cSrcweir     switch( m_aCB_ObjectLines.GetState())
154cdf0e10cSrcweir     {
155cdf0e10cSrcweir         case STATE_NOCHECK:
156cdf0e10cSrcweir             nObjectLines = 0;
157cdf0e10cSrcweir             break;
158cdf0e10cSrcweir         case STATE_CHECK:
159cdf0e10cSrcweir             nObjectLines = 1;
160cdf0e10cSrcweir             break;
161cdf0e10cSrcweir         case STATE_DONTKNOW:
162cdf0e10cSrcweir             nObjectLines = -1;
163cdf0e10cSrcweir             break;
164cdf0e10cSrcweir     }
165cdf0e10cSrcweir 
166cdf0e10cSrcweir     sal_Int32 nCurrentRoundedEdges = -1;
167cdf0e10cSrcweir     switch( m_aCB_RoundedEdge.GetState() )
168cdf0e10cSrcweir     {
169cdf0e10cSrcweir         case STATE_NOCHECK:
170cdf0e10cSrcweir             nCurrentRoundedEdges = 0;
171cdf0e10cSrcweir             break;
172cdf0e10cSrcweir         case STATE_CHECK:
173cdf0e10cSrcweir             nCurrentRoundedEdges = 5;
174cdf0e10cSrcweir             break;
175cdf0e10cSrcweir         case STATE_DONTKNOW:
176cdf0e10cSrcweir             nCurrentRoundedEdges = -1;
177cdf0e10cSrcweir             break;
178cdf0e10cSrcweir     }
179cdf0e10cSrcweir 
180cdf0e10cSrcweir     // /-- locked controllers
181cdf0e10cSrcweir     ControllerLockHelperGuard aGuard( m_rControllerLockHelper );
182cdf0e10cSrcweir     ThreeDHelper::setRoundedEdgesAndObjectLines(
183cdf0e10cSrcweir         ::chart::ChartModelHelper::findDiagram( m_xChartModel ), nCurrentRoundedEdges, nObjectLines );
184cdf0e10cSrcweir     // \-- locked controllers
185cdf0e10cSrcweir }
186cdf0e10cSrcweir 
applyShadeModeToModel()187cdf0e10cSrcweir void ThreeD_SceneAppearance_TabPage::applyShadeModeToModel()
188cdf0e10cSrcweir {
189cdf0e10cSrcweir     if(!m_bCommitToModel)
190cdf0e10cSrcweir         return;
191cdf0e10cSrcweir 
192cdf0e10cSrcweir     drawing::ShadeMode aShadeMode = drawing::ShadeMode_PHONG;
193cdf0e10cSrcweir 
194cdf0e10cSrcweir     switch( m_aCB_Shading.GetState())
195cdf0e10cSrcweir     {
196cdf0e10cSrcweir         case STATE_NOCHECK:
197cdf0e10cSrcweir             aShadeMode = drawing::ShadeMode_FLAT;
198cdf0e10cSrcweir             break;
199cdf0e10cSrcweir         case STATE_CHECK:
200cdf0e10cSrcweir             aShadeMode = drawing::ShadeMode_SMOOTH;
201cdf0e10cSrcweir             break;
202cdf0e10cSrcweir         case STATE_DONTKNOW:
203cdf0e10cSrcweir             // nothing
204cdf0e10cSrcweir             break;
205cdf0e10cSrcweir     }
206cdf0e10cSrcweir 
207cdf0e10cSrcweir     lcl_setShadeModeAtModel( m_xChartModel, aShadeMode );
208cdf0e10cSrcweir }
209cdf0e10cSrcweir 
initControlsFromModel()210cdf0e10cSrcweir void ThreeD_SceneAppearance_TabPage::initControlsFromModel()
211cdf0e10cSrcweir {
212cdf0e10cSrcweir     m_bCommitToModel = false;
213cdf0e10cSrcweir     m_bUpdateOtherControls = false;
214cdf0e10cSrcweir 
215cdf0e10cSrcweir     lcl_ModelProperties aProps( lcl_getPropertiesFromModel( m_xChartModel ));
216cdf0e10cSrcweir 
217cdf0e10cSrcweir     if(aProps.m_aShadeMode == drawing::ShadeMode_FLAT)
218cdf0e10cSrcweir     {
219cdf0e10cSrcweir         m_aCB_Shading.EnableTriState( sal_False );
220cdf0e10cSrcweir         m_aCB_Shading.Check(sal_False);
221cdf0e10cSrcweir     }
222cdf0e10cSrcweir     else if(aProps.m_aShadeMode == drawing::ShadeMode_SMOOTH)
223cdf0e10cSrcweir     {
224cdf0e10cSrcweir         m_aCB_Shading.EnableTriState( sal_False );
225cdf0e10cSrcweir         m_aCB_Shading.Check(sal_True);
226cdf0e10cSrcweir     }
227cdf0e10cSrcweir     else
228cdf0e10cSrcweir     {
229cdf0e10cSrcweir         m_aCB_Shading.EnableTriState( sal_True );
230cdf0e10cSrcweir         m_aCB_Shading.SetState( STATE_DONTKNOW );
231cdf0e10cSrcweir     }
232cdf0e10cSrcweir 
233cdf0e10cSrcweir     if(aProps.m_nObjectLines == 0)
234cdf0e10cSrcweir     {
235cdf0e10cSrcweir         m_aCB_ObjectLines.EnableTriState( sal_False );
236cdf0e10cSrcweir         m_aCB_ObjectLines.Check(sal_False);
237cdf0e10cSrcweir     }
238cdf0e10cSrcweir     else if(aProps.m_nObjectLines==1)
239cdf0e10cSrcweir     {
240cdf0e10cSrcweir         m_aCB_ObjectLines.EnableTriState( sal_False );
241cdf0e10cSrcweir         m_aCB_ObjectLines.Check(sal_True);
242cdf0e10cSrcweir     }
243cdf0e10cSrcweir     else
244cdf0e10cSrcweir     {
245cdf0e10cSrcweir         m_aCB_ObjectLines.EnableTriState( sal_True );
246cdf0e10cSrcweir         m_aCB_ObjectLines.SetState( STATE_DONTKNOW );
247cdf0e10cSrcweir     }
248cdf0e10cSrcweir 
249cdf0e10cSrcweir     if(aProps.m_nRoundedEdges >= 5)
250cdf0e10cSrcweir     {
251cdf0e10cSrcweir         m_aCB_RoundedEdge.EnableTriState( sal_False );
252cdf0e10cSrcweir         m_aCB_RoundedEdge.Check(sal_True);
253cdf0e10cSrcweir     }
254cdf0e10cSrcweir     else if(aProps.m_nRoundedEdges<0)
255cdf0e10cSrcweir     {
256cdf0e10cSrcweir         m_aCB_RoundedEdge.EnableTriState( sal_False );
257cdf0e10cSrcweir         m_aCB_RoundedEdge.SetState( STATE_DONTKNOW );
258cdf0e10cSrcweir     }
259cdf0e10cSrcweir     else
260cdf0e10cSrcweir     {
261cdf0e10cSrcweir         m_aCB_RoundedEdge.EnableTriState( sal_True );
262cdf0e10cSrcweir         m_aCB_RoundedEdge.Check(sal_False);
263cdf0e10cSrcweir     }
264cdf0e10cSrcweir     m_aCB_RoundedEdge.Enable( !m_aCB_ObjectLines.IsChecked() );
265cdf0e10cSrcweir 
266cdf0e10cSrcweir     updateScheme();
267cdf0e10cSrcweir 
268cdf0e10cSrcweir     m_bCommitToModel = true;
269cdf0e10cSrcweir     m_bUpdateOtherControls = true;
270cdf0e10cSrcweir }
271cdf0e10cSrcweir 
updateScheme()272cdf0e10cSrcweir void ThreeD_SceneAppearance_TabPage::updateScheme()
273cdf0e10cSrcweir {
274cdf0e10cSrcweir     lcl_ModelProperties aProps( lcl_getPropertiesFromModel( m_xChartModel ));
275cdf0e10cSrcweir 
276cdf0e10cSrcweir     if( m_aLB_Scheme.GetEntryCount() == (POS_3DSCHEME_CUSTOM+1) )
277cdf0e10cSrcweir     {
278cdf0e10cSrcweir         m_aLB_Scheme.RemoveEntry(POS_3DSCHEME_CUSTOM);
279cdf0e10cSrcweir         m_aLB_Scheme.SetDropDownLineCount(2);
280cdf0e10cSrcweir     }
281cdf0e10cSrcweir     switch( aProps.m_eScheme )
282cdf0e10cSrcweir     {
283cdf0e10cSrcweir         case ThreeDLookScheme_Simple:
284cdf0e10cSrcweir             m_aLB_Scheme.SelectEntryPos( POS_3DSCHEME_SIMPLE );
285cdf0e10cSrcweir             break;
286cdf0e10cSrcweir         case ThreeDLookScheme_Realistic:
287cdf0e10cSrcweir             m_aLB_Scheme.SelectEntryPos( POS_3DSCHEME_REALISTIC );
288cdf0e10cSrcweir             break;
289cdf0e10cSrcweir         case ThreeDLookScheme_Unknown:
290cdf0e10cSrcweir             {
291cdf0e10cSrcweir                 m_aLB_Scheme.InsertEntry(String(SchResId(STR_3DSCHEME_CUSTOM)),POS_3DSCHEME_CUSTOM);
292cdf0e10cSrcweir                 m_aLB_Scheme.SelectEntryPos( POS_3DSCHEME_CUSTOM );
293cdf0e10cSrcweir                 m_aLB_Scheme.SetDropDownLineCount(3);
294cdf0e10cSrcweir             }
295cdf0e10cSrcweir             break;
296cdf0e10cSrcweir     }
297cdf0e10cSrcweir }
298cdf0e10cSrcweir 
IMPL_LINK(ThreeD_SceneAppearance_TabPage,SelectSchemeHdl,void *,EMPTYARG)299cdf0e10cSrcweir IMPL_LINK( ThreeD_SceneAppearance_TabPage, SelectSchemeHdl, void*, EMPTYARG )
300cdf0e10cSrcweir {
301cdf0e10cSrcweir     if( !m_bUpdateOtherControls )
302cdf0e10cSrcweir         return 0;
303cdf0e10cSrcweir 
304cdf0e10cSrcweir     {
305cdf0e10cSrcweir         // /-- locked controllers
306cdf0e10cSrcweir         ControllerLockHelperGuard aGuard( m_rControllerLockHelper );
307cdf0e10cSrcweir 
308cdf0e10cSrcweir         uno::Reference< chart2::XDiagram > xDiagram( ::chart::ChartModelHelper::findDiagram( m_xChartModel ) );
309cdf0e10cSrcweir 
310cdf0e10cSrcweir         if( m_aLB_Scheme.GetSelectEntryPos() == POS_3DSCHEME_REALISTIC )
311cdf0e10cSrcweir             ThreeDHelper::setScheme( xDiagram, ThreeDLookScheme_Realistic );
312cdf0e10cSrcweir         else if( m_aLB_Scheme.GetSelectEntryPos() == POS_3DSCHEME_SIMPLE )
313cdf0e10cSrcweir             ThreeDHelper::setScheme( xDiagram, ThreeDLookScheme_Simple );
314cdf0e10cSrcweir         else
315cdf0e10cSrcweir         {
316cdf0e10cSrcweir             OSL_ENSURE( false, "Invalid Entry selected" );
317cdf0e10cSrcweir         }
318cdf0e10cSrcweir         // \-- locked controllers
319cdf0e10cSrcweir     }
320cdf0e10cSrcweir 
321cdf0e10cSrcweir     // update other controls
322cdf0e10cSrcweir     initControlsFromModel();
323cdf0e10cSrcweir     return 0;
324cdf0e10cSrcweir }
325cdf0e10cSrcweir 
IMPL_LINK(ThreeD_SceneAppearance_TabPage,SelectShading,void *,EMPTYARG)326cdf0e10cSrcweir IMPL_LINK( ThreeD_SceneAppearance_TabPage, SelectShading, void*, EMPTYARG )
327cdf0e10cSrcweir {
328cdf0e10cSrcweir     if( !m_bUpdateOtherControls )
329cdf0e10cSrcweir         return 0;
330cdf0e10cSrcweir 
331cdf0e10cSrcweir     m_aCB_Shading.EnableTriState( sal_False );
332cdf0e10cSrcweir     applyShadeModeToModel();
333cdf0e10cSrcweir     updateScheme();
334cdf0e10cSrcweir     return 0;
335cdf0e10cSrcweir }
IMPL_LINK(ThreeD_SceneAppearance_TabPage,SelectRoundedEdgeOrObjectLines,CheckBox *,pCheckBox)336cdf0e10cSrcweir IMPL_LINK( ThreeD_SceneAppearance_TabPage, SelectRoundedEdgeOrObjectLines, CheckBox*, pCheckBox )
337cdf0e10cSrcweir {
338cdf0e10cSrcweir     if( !m_bUpdateOtherControls )
339cdf0e10cSrcweir         return 0;
340cdf0e10cSrcweir 
341cdf0e10cSrcweir     if( pCheckBox == &m_aCB_ObjectLines )
342cdf0e10cSrcweir     {
343cdf0e10cSrcweir         m_aCB_ObjectLines.EnableTriState( sal_False );
344cdf0e10cSrcweir         m_bUpdateOtherControls = false;
345cdf0e10cSrcweir         m_aCB_RoundedEdge.Enable( !m_aCB_ObjectLines.IsChecked() );
346cdf0e10cSrcweir         if(!m_aCB_RoundedEdge.IsEnabled())
347cdf0e10cSrcweir             m_aCB_RoundedEdge.Check(sal_False);
348cdf0e10cSrcweir         m_bUpdateOtherControls = true;
349cdf0e10cSrcweir     }
350cdf0e10cSrcweir     else
351cdf0e10cSrcweir         m_aCB_RoundedEdge.EnableTriState( sal_False );
352cdf0e10cSrcweir     applyRoundedEdgeAndObjectLinesToModel();
353cdf0e10cSrcweir     updateScheme();
354cdf0e10cSrcweir     return 0;
355cdf0e10cSrcweir }
356cdf0e10cSrcweir 
357cdf0e10cSrcweir //.............................................................................
358cdf0e10cSrcweir } //namespace chart
359cdf0e10cSrcweir //.............................................................................
360