LCOV - code coverage report
Current view: top level - sd/source/ui/dlg - layeroptionsdlg.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 26 0.0 %
Date: 2014-04-14 Functions: 0 4 0.0 %
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             : 
      21             : #include <svl/itemset.hxx>
      22             : #include <vcl/layout.hxx>
      23             : 
      24             : #include "strings.hrc"
      25             : #include "sdattr.hxx"
      26             : #include "sdresid.hxx"
      27             : #include "layeroptionsdlg.hxx"
      28             : 
      29           0 : SdInsertLayerDlg::SdInsertLayerDlg( Window* pWindow, const SfxItemSet& rInAttrs,
      30             :     bool bDeletable, const OUString& rStr )
      31             :     : ModalDialog(pWindow, "InsertLayerDialog", "modules/sdraw/ui/insertlayer.ui")
      32           0 :     , mrOutAttrs(rInAttrs)
      33             : {
      34           0 :     SetText(rStr);
      35             : 
      36           0 :     get(m_pEdtName, "name");
      37           0 :     get(m_pEdtTitle, "title");
      38           0 :     get(m_pEdtDesc, "textview");
      39           0 :     get(m_pCbxVisible, "visible");
      40           0 :     get(m_pCbxPrintable, "printable");
      41           0 :     get(m_pCbxLocked, "locked");
      42             : 
      43           0 :     m_pEdtName->SetText( ( ( const SdAttrLayerName& ) mrOutAttrs.Get( ATTR_LAYER_NAME ) ).GetValue() );
      44           0 :     m_pEdtTitle->SetText( ( ( const SdAttrLayerTitle& ) mrOutAttrs.Get( ATTR_LAYER_TITLE ) ).GetValue() );
      45           0 :     m_pEdtDesc->SetText( ( ( const SdAttrLayerDesc& ) mrOutAttrs.Get( ATTR_LAYER_DESC ) ).GetValue() );
      46           0 :     m_pEdtDesc->set_height_request(4 * m_pEdtDesc->GetTextHeight());
      47           0 :     m_pCbxVisible->Check( ( ( const SdAttrLayerVisible& ) mrOutAttrs.Get( ATTR_LAYER_VISIBLE ) ).GetValue() );
      48           0 :     m_pCbxPrintable->Check( ( ( const SdAttrLayerPrintable& ) mrOutAttrs.Get( ATTR_LAYER_PRINTABLE ) ).GetValue() );
      49           0 :     m_pCbxLocked->Check( ( ( const SdAttrLayerLocked& ) mrOutAttrs.Get( ATTR_LAYER_LOCKED ) ).GetValue() );
      50             : 
      51           0 :     get<VclContainer>("nameframe")->Enable(bDeletable);
      52           0 : }
      53             : 
      54           0 : void SdInsertLayerDlg::GetAttr( SfxItemSet& rAttrs )
      55             : {
      56           0 :     rAttrs.Put( SdAttrLayerName( m_pEdtName->GetText() ) );
      57           0 :     rAttrs.Put( SdAttrLayerTitle( m_pEdtTitle->GetText() ) );
      58           0 :     rAttrs.Put( SdAttrLayerDesc( m_pEdtDesc->GetText() ) );
      59           0 :     rAttrs.Put( SdAttrLayerVisible( m_pCbxVisible->IsChecked() ) );
      60           0 :     rAttrs.Put( SdAttrLayerPrintable( m_pCbxPrintable->IsChecked() ) );
      61           0 :     rAttrs.Put( SdAttrLayerLocked( m_pCbxLocked->IsChecked() ) );
      62           0 : }
      63             : 
      64             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10