1*9e0e4191SAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
3*9e0e4191SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*9e0e4191SAndrew Rist * or more contributor license agreements. See the NOTICE file
5*9e0e4191SAndrew Rist * distributed with this work for additional information
6*9e0e4191SAndrew Rist * regarding copyright ownership. The ASF licenses this file
7*9e0e4191SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*9e0e4191SAndrew Rist * "License"); you may not use this file except in compliance
9*9e0e4191SAndrew Rist * with the License. You may obtain a copy of the License at
10*9e0e4191SAndrew Rist *
11*9e0e4191SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
12*9e0e4191SAndrew Rist *
13*9e0e4191SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*9e0e4191SAndrew Rist * software distributed under the License is distributed on an
15*9e0e4191SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*9e0e4191SAndrew Rist * KIND, either express or implied. See the License for the
17*9e0e4191SAndrew Rist * specific language governing permissions and limitations
18*9e0e4191SAndrew Rist * under the License.
19*9e0e4191SAndrew Rist *
20*9e0e4191SAndrew Rist *************************************************************/
21*9e0e4191SAndrew Rist
22*9e0e4191SAndrew Rist
23cdf0e10cSrcweir #include "precompiled_reportdesign.hxx"
24cdf0e10cSrcweir #include "ReportRuler.hxx"
25cdf0e10cSrcweir #include "ReportSection.hxx"
26cdf0e10cSrcweir #include "ReportWindow.hxx"
27cdf0e10cSrcweir namespace rptui
28cdf0e10cSrcweir {
29cdf0e10cSrcweir using namespace ::com::sun::star;
DBG_NAME(rpt_OReportRuler)30cdf0e10cSrcweir DBG_NAME( rpt_OReportRuler )
31cdf0e10cSrcweir OReportRuler::OReportRuler(Window* _pParent,OReportWindow* _pReportWindow,const uno::Reference< report::XSection >& _xSection)
32cdf0e10cSrcweir :Window(_pParent)
33cdf0e10cSrcweir ,m_pParent(_pReportWindow)
34cdf0e10cSrcweir {
35cdf0e10cSrcweir DBG_CTOR( rpt_OReportRuler,NULL);
36cdf0e10cSrcweir SetMapMode( MapMode( MAP_100TH_MM ) );
37cdf0e10cSrcweir
38cdf0e10cSrcweir Show();
39cdf0e10cSrcweir }
40cdf0e10cSrcweir //------------------------------------------------------------------------------
~OReportRuler()41cdf0e10cSrcweir OReportRuler::~OReportRuler()
42cdf0e10cSrcweir {
43cdf0e10cSrcweir DBG_DTOR( rpt_OReportRuler,NULL);
44cdf0e10cSrcweir delete m_pSection;
45cdf0e10cSrcweir }
46cdf0e10cSrcweir //------------------------------------------------------------------------------
Resize()47cdf0e10cSrcweir void OReportRuler::Resize()
48cdf0e10cSrcweir {
49cdf0e10cSrcweir m_pSection->SetPosSizePixel(Point(0,0),GetOutputSize());
50cdf0e10cSrcweir }
51cdf0e10cSrcweir //------------------------------------------------------------------------------
SetGridVisible(sal_Bool _bVisible)52cdf0e10cSrcweir void OReportRuler::SetGridVisible(sal_Bool _bVisible)
53cdf0e10cSrcweir {
54cdf0e10cSrcweir m_pSection->SetGridVisible( _bVisible );
55cdf0e10cSrcweir }
56cdf0e10cSrcweir //------------------------------------------------------------------------------
57cdf0e10cSrcweir //==============================================================================
58cdf0e10cSrcweir } // rptui
59cdf0e10cSrcweir //==============================================================================
60