LCOV - code coverage report
Current view: top level - svx/source/sidebar/paragraph - ParaLineSpacingPopup.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 19 0.0 %
Date: 2014-04-14 Functions: 0 7 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  * This file is part of the LibreOffice project.
       3             :  *
       4             :  * This Source Code Form is subject to the terms of the Mozilla Public
       5             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       6             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       7             :  *
       8             :  * This file incorporates work covered by the following license notice:
       9             :  *
      10             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      11             :  *   contributor license agreements. See the NOTICE file distributed
      12             :  *   with this work for additional information regarding copyright
      13             :  *   ownership. The ASF licenses this file to you under the Apache
      14             :  *   License, Version 2.0 (the "License"); you may not use this file
      15             :  *   except in compliance with the License. You may obtain a copy of
      16             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      17             :  */
      18             : #include "ParaLineSpacingPopup.hxx"
      19             : #include "ParaLineSpacingControl.hxx"
      20             : #include <boost/bind.hpp>
      21             : #include <unotools/viewoptions.hxx>
      22             : 
      23             : namespace svx { namespace sidebar {
      24             : 
      25           0 : ParaLineSpacingPopup::ParaLineSpacingPopup (
      26             :     Window* pParent,
      27             :     const ::boost::function<PopupControl*(PopupContainer*)>& rControlCreator)
      28             :     : Popup(
      29             :         pParent,
      30             :         rControlCreator,
      31           0 :         OUString( "Paragraph Line Spacing"))
      32             : {
      33           0 :     SetPopupModeEndHandler(::boost::bind(&ParaLineSpacingPopup::PopupModeEndCallback, this));
      34           0 : }
      35             : 
      36             : 
      37             : 
      38             : 
      39           0 : ParaLineSpacingPopup::~ParaLineSpacingPopup (void)
      40             : {
      41           0 : }
      42             : 
      43             : 
      44             : 
      45             : 
      46           0 : void ParaLineSpacingPopup::Rearrange (SfxItemState currSPState,FieldUnit currMetricUnit,SvxLineSpacingItem* currSPItem,const ::sfx2::sidebar::EnumContext currentContext)
      47             : {
      48           0 :     ProvideContainerAndControl();
      49             : 
      50           0 :     ParaLineSpacingControl* pControl = dynamic_cast<ParaLineSpacingControl*>(mpControl.get());
      51           0 :     if (pControl != NULL)
      52           0 :         pControl->Rearrange(currSPState,currMetricUnit, currSPItem,currentContext);
      53           0 : }
      54             : 
      55           0 : void ParaLineSpacingPopup::PopupModeEndCallback (void)
      56             : {
      57           0 :     ProvideContainerAndControl();
      58           0 :     ParaLineSpacingControl* pControl = dynamic_cast<ParaLineSpacingControl*>(mpControl.get());
      59           0 :     if (pControl == NULL)
      60           0 :         return;
      61             : 
      62           0 :     pControl->PopupModeEndCallback();
      63             : 
      64             :     /*if( pControl->GetLastCustomState() == SPACING_CLOSE_BY_CUS_EDIT)
      65             :     {
      66             :         SvtViewOptions aWinOpt( E_WINDOW, SIDEBAR_SPACING_GLOBAL_VALUE );
      67             :         ::com::sun::star::uno::Sequence < ::com::sun::star::beans::NamedValue > aSeq(1);
      68             :         aSeq[0].Name = "Spacing";
      69             :         aSeq[0].Value <<= ::rtl::OUString( String::CreateFromInt32( pControl->GetLastCustomValue() ));
      70             :         aWinOpt.SetUserData( aSeq );
      71             : 
      72             :     }*/
      73             : }
      74             : 
      75             : 
      76           0 : } } // end of namespace svx::sidebar
      77             : 
      78             : 

Generated by: LCOV version 1.10