LCOV - code coverage report
Current view: top level - libreoffice/sd/source/ui/func - unprlout.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 25 0.0 %
Date: 2012-12-27 Functions: 0 11 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             : #include "unprlout.hxx"
      21             : 
      22             : #include "strings.hrc"
      23             : #include "sdpage.hxx"
      24             : #include "drawdoc.hxx"
      25             : #include "sdresid.hxx"
      26             : 
      27             : 
      28           0 : TYPEINIT1(SdPresentationLayoutUndoAction, SdUndoAction);
      29             : 
      30             : 
      31             : 
      32             : /*************************************************************************
      33             : |*
      34             : |* Konstruktor
      35             : |*
      36             : \************************************************************************/
      37             : 
      38           0 : SdPresentationLayoutUndoAction::SdPresentationLayoutUndoAction(
      39             :                             SdDrawDocument* pTheDoc,
      40             :                             String          aTheOldLayoutName,
      41             :                             String          aTheNewLayoutName,
      42             :                             AutoLayout      eTheOldAutoLayout,
      43             :                             AutoLayout      eTheNewAutoLayout,
      44             :                             sal_Bool            bSet,
      45             :                             SdPage*         pThePage):
      46           0 :                       SdUndoAction(pTheDoc)
      47             : {
      48           0 :     aOldLayoutName = aTheOldLayoutName;
      49           0 :     aNewLayoutName = aTheNewLayoutName;
      50           0 :     eOldAutoLayout = eTheOldAutoLayout;
      51           0 :     eNewAutoLayout = eTheNewAutoLayout;
      52           0 :     bSetAutoLayout = bSet;
      53             : 
      54             :     DBG_ASSERT(pThePage, "keine Page gesetzt!");
      55           0 :     pPage = pThePage;
      56           0 :     aComment = String(SdResId(STR_UNDO_SET_PRESLAYOUT));
      57           0 : }
      58             : 
      59             : /*************************************************************************
      60             : |*
      61             : |* Undo()
      62             : |*
      63             : \************************************************************************/
      64             : 
      65           0 : void SdPresentationLayoutUndoAction::Undo()
      66             : {
      67           0 :     pPage->SetPresentationLayout(aOldLayoutName, sal_True, sal_True, sal_True);
      68           0 :     if (bSetAutoLayout)
      69           0 :         pPage->SetAutoLayout(eOldAutoLayout, sal_True);
      70           0 : }
      71             : 
      72             : /*************************************************************************
      73             : |*
      74             : |* Redo()
      75             : |*
      76             : \************************************************************************/
      77             : 
      78           0 : void SdPresentationLayoutUndoAction::Redo()
      79             : {
      80           0 :     pPage->SetPresentationLayout(aNewLayoutName);
      81           0 :     if (bSetAutoLayout)
      82           0 :         pPage->SetAutoLayout(eNewAutoLayout, sal_True);
      83           0 : }
      84             : 
      85             : /*************************************************************************
      86             : |*
      87             : |* Destruktor
      88             : |*
      89             : \************************************************************************/
      90             : 
      91           0 : SdPresentationLayoutUndoAction::~SdPresentationLayoutUndoAction()
      92             : {
      93           0 : }
      94             : 
      95             : /*************************************************************************
      96             : |*
      97             : |* Kommentar liefern
      98             : |*
      99             : \************************************************************************/
     100             : 
     101           0 : rtl::OUString SdPresentationLayoutUndoAction::GetComment() const
     102             : {
     103           0 :     return aComment;
     104             : }
     105             : 
     106             : 
     107             : 
     108             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10