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