19e0e4191SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
39e0e4191SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
49e0e4191SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
59e0e4191SAndrew Rist  * distributed with this work for additional information
69e0e4191SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
79e0e4191SAndrew Rist  * to you under the Apache License, Version 2.0 (the
89e0e4191SAndrew Rist  * "License"); you may not use this file except in compliance
99e0e4191SAndrew Rist  * with the License.  You may obtain a copy of the License at
109e0e4191SAndrew Rist  *
119e0e4191SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
129e0e4191SAndrew Rist  *
139e0e4191SAndrew Rist  * Unless required by applicable law or agreed to in writing,
149e0e4191SAndrew Rist  * software distributed under the License is distributed on an
159e0e4191SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
169e0e4191SAndrew Rist  * KIND, either express or implied.  See the License for the
179e0e4191SAndrew Rist  * specific language governing permissions and limitations
189e0e4191SAndrew Rist  * under the License.
199e0e4191SAndrew Rist  *
209e0e4191SAndrew Rist  *************************************************************/
219e0e4191SAndrew Rist 
229e0e4191SAndrew Rist 
23*b63233d8Sdamjan #include "precompiled_rptui.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