LCOV - code coverage report
Current view: top level - sd/source/ui/sidebar - NavigatorWrapper.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 1 20 5.0 %
Date: 2014-11-03 Functions: 2 9 22.2 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include "NavigatorWrapper.hxx"
      21             : #include "navigatr.hrc"
      22             : #include "ViewShellBase.hxx"
      23             : 
      24             : #include <sfx2/sidebar/Theme.hxx>
      25             : 
      26             : #include <boost/bind.hpp>
      27             : 
      28             : namespace sd { namespace sidebar {
      29             : 
      30           0 : NavigatorWrapper::NavigatorWrapper (
      31             :     vcl::Window* pParent,
      32             :     sd::ViewShellBase& rViewShellBase,
      33             :     SfxBindings* pBindings)
      34             :     : Control(pParent, 0),
      35             :       mrViewShellBase(rViewShellBase),
      36             :       maNavigator(
      37             :         this,
      38             :         NULL,
      39             :         SdResId(FLT_NAVIGATOR),
      40             :         pBindings,
      41           0 :         ::boost::bind(&NavigatorWrapper::UpdateNavigator, this))
      42             : {
      43             :     maNavigator.SetPosSizePixel(
      44             :         Point(0,0),
      45           0 :         GetSizePixel());
      46           0 :     maNavigator.SetBackground(sfx2::sidebar::Theme::GetWallpaper(sfx2::sidebar::Theme::Paint_PanelBackground));
      47           0 :     maNavigator.Show();
      48           0 : }
      49             : 
      50           0 : NavigatorWrapper::~NavigatorWrapper (void)
      51             : {
      52           0 : }
      53             : 
      54           0 : void NavigatorWrapper::Resize (void)
      55             : {
      56           0 :     maNavigator.SetSizePixel(GetSizePixel());
      57           0 : }
      58             : 
      59           0 : css::ui::LayoutSize NavigatorWrapper::GetHeightForWidth (const sal_Int32 nWidth)
      60             : {
      61             :     (void)nWidth;
      62             : 
      63           0 :     return css::ui::LayoutSize(-1,-1,-1);
      64             : }
      65             : 
      66           0 : void NavigatorWrapper::UpdateNavigator (void)
      67             : {
      68           0 :     maNavigator.InitTreeLB(mrViewShellBase.GetDocument());
      69           0 : }
      70             : 
      71           0 : void NavigatorWrapper::GetFocus (void)
      72             : {
      73           0 :     maNavigator.GrabFocus();
      74           0 : }
      75             : 
      76         114 : } } // end of namespace sd::sidebar
      77             : 
      78             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10