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
10*cde9e8dcSAndrew Rist *
11*cde9e8dcSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*cde9e8dcSAndrew Rist *
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.
19*cde9e8dcSAndrew Rist *
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 "chartview/DataPointSymbolSupplier.hxx"
28cdf0e10cSrcweir #include "ShapeFactory.hxx"
29cdf0e10cSrcweir #include "macros.hxx"
30cdf0e10cSrcweir
31cdf0e10cSrcweir //.............................................................................
32cdf0e10cSrcweir namespace chart
33cdf0e10cSrcweir {
34cdf0e10cSrcweir //.............................................................................
35cdf0e10cSrcweir using namespace ::com::sun::star;
36cdf0e10cSrcweir //using namespace ::com::sun::star::chart2;
37cdf0e10cSrcweir
create2DSymbolList(uno::Reference<lang::XMultiServiceFactory> xShapeFactory,const uno::Reference<drawing::XShapes> & xTarget,const drawing::Direction3D & rSize)38cdf0e10cSrcweir uno::Reference< drawing::XShapes > DataPointSymbolSupplier::create2DSymbolList(
39cdf0e10cSrcweir uno::Reference< lang::XMultiServiceFactory > xShapeFactory
40cdf0e10cSrcweir , const uno::Reference< drawing::XShapes >& xTarget
41cdf0e10cSrcweir , const drawing::Direction3D& rSize )
42cdf0e10cSrcweir {
43cdf0e10cSrcweir uno::Reference< drawing::XShape > xGroup(
44cdf0e10cSrcweir xShapeFactory->createInstance( C2U(
45cdf0e10cSrcweir "com.sun.star.drawing.GroupShape" ) ), uno::UNO_QUERY );
46cdf0e10cSrcweir if(xTarget.is())
47cdf0e10cSrcweir xTarget->add(xGroup);
48cdf0e10cSrcweir uno::Reference< drawing::XShapes > xGroupShapes =
49cdf0e10cSrcweir uno::Reference<drawing::XShapes>( xGroup, uno::UNO_QUERY );
50cdf0e10cSrcweir
51cdf0e10cSrcweir ShapeFactory aShapeFactory(xShapeFactory);
52cdf0e10cSrcweir drawing::Position3D aPos(0,0,0);
53cdf0e10cSrcweir for(sal_Int32 nS=0;nS<ShapeFactory::getSymbolCount();nS++)
54cdf0e10cSrcweir {
55cdf0e10cSrcweir aShapeFactory.createSymbol2D( xGroupShapes, aPos, rSize, nS );
56cdf0e10cSrcweir }
57cdf0e10cSrcweir return xGroupShapes;
58cdf0e10cSrcweir }
59cdf0e10cSrcweir
60cdf0e10cSrcweir //.............................................................................
61cdf0e10cSrcweir } //namespace chart
62cdf0e10cSrcweir //.............................................................................
63