LCOV - code coverage report
Current view: top level - svx/inc/svx - sdtakitm.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 4 75.0 %
Date: 2012-08-25 Functions: 5 6 83.3 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : #ifndef SDTAKITM_HXX
      29                 :            : #define SDTAKITM_HXX
      30                 :            : 
      31                 :            : #include <svl/eitem.hxx>
      32                 :            : #include <svx/svddef.hxx>
      33                 :            : #include "svx/svxdllapi.h"
      34                 :            : 
      35                 :            : //------------------------------
      36                 :            : // class SdrTextAniKindItem
      37                 :            : //------------------------------
      38                 :            : 
      39                 :            : enum SdrTextAniKind {SDRTEXTANI_NONE,
      40                 :            :                      SDRTEXTANI_BLINK,
      41                 :            :                      SDRTEXTANI_SCROLL,
      42                 :            :                      SDRTEXTANI_ALTERNATE,
      43                 :            :                      SDRTEXTANI_SLIDE};
      44                 :            : 
      45                 :            : // - SDRTEXTANI_BLINK:
      46                 :            : //   Just blink.  Direction and Amount don't effect things.
      47                 :            : //   Frequency delay: 0 = 0.5Hz (Delay = 250).
      48                 :            : //   Count = number of blinks. (0 = forever)
      49                 :            : //   start inside: sal_False = begin with the blinker off, sal_True  = begin with the blinker on
      50                 :            : //   stop inside: sal_False = end with the blinker off, sal_True = end with the blinker on
      51                 :            : //                (Only if count! = 0)
      52                 :            : // - SDRTEXTANI_SCROLL:
      53                 :            : //   Text just scrolls all the way through, and starts over when it is done.
      54                 :            : //
      55                 :            : //   Delay in ms: (except delay = 0 means 50ms (20Hz) default)
      56                 :            : //   Count = number of passes (0 = go forever)
      57                 :            : //   Direction: the direction to scroll
      58                 :            : //   StartInside: sal_False = on the first pass, scroll the text in (not initially visible)
      59                 :            : //                sal_True = on the first pass, the left part of the text is already visible
      60                 :            : //                           in the scroll area before starting.
      61                 :            : //   StopInside: sal_False = on the last pass, scroll the text all the way out.
      62                 :            : //                sal_True = on the last pass, keep the right part of the text visible.
      63                 :            : //                (Only if count! = 0)
      64                 :            : //   Amount: Step size in logical units. Negative values = use Pixels instead
      65                 :            : //           of logical units. If Amount = 0, then default to 1 Pixel.
      66                 :            : // - SDRTEXTANI_ALTERNATE:
      67                 :            : //   Like SDRTEXTANI_SCROLL, except don't scroll until all of the text is out,
      68                 :            : //        but just until the last part is visible.  Then, change direction and
      69                 :            : //        scroll the text the other way.
      70                 :            : //   Count = number of passes (number of direction changes minus 1)
      71                 :            : //        If count = 1, this is the same as SDRTEXTANI_SCROLL
      72                 :            : //   Direction = the starting direction.
      73                 :            : //   All Other Parameters: just like SDRTEXTANI_SCROLL
      74                 :            : // - SDRTEXTANI_SLIDE:
      75                 :            : //   Text will slide in to the original position.
      76                 :            : //   -> same as SCROLL with StartInside = sal_False, StopInside = sal_True
      77                 :            : //   and Count = 1 (Count = 0 is interpreted as count = 1).
      78                 :            : //   For each count > 1, the text, will be slid out backwards
      79                 :            : //   (much like ALTERNATE) and then slid back in again.
      80                 :            : //   StopInside is not evaluated, because inside is always stopped.
      81                 :            : //   StartInside is not evaluated, because outside is always started.
      82                 :            : //   All other parameters are like SDRTEXTANI_SCROLL
      83                 :            : // StartInside, StopInside: When sal_True, the starting / final position
      84                 :            : //   of the text depends on the anchor of the drawing object.  This
      85                 :            : //   corresponds to the position of the text in normal Paint (without scrolling).
      86                 :            : 
      87         [ -  + ]:       7318 : class SVX_DLLPUBLIC SdrTextAniKindItem: public SfxEnumItem {
      88                 :            : public:
      89                 :            :     TYPEINFO();
      90                 :       3512 :     SdrTextAniKindItem(SdrTextAniKind eKind=SDRTEXTANI_NONE): SfxEnumItem(SDRATTR_TEXT_ANIKIND,(sal_uInt16)eKind) {}
      91                 :          0 :     SdrTextAniKindItem(SvStream& rIn)                       : SfxEnumItem(SDRATTR_TEXT_ANIKIND,rIn)  {}
      92                 :            :     virtual SfxPoolItem*      Clone(SfxItemPool* pPool=NULL) const;
      93                 :            :     virtual SfxPoolItem*      Create(SvStream& rIn, sal_uInt16 nVer) const;
      94                 :            :     virtual sal_uInt16            GetValueCount() const; // { return 5; }
      95                 :    1154528 :             SdrTextAniKind GetValue() const      { return (SdrTextAniKind)SfxEnumItem::GetValue(); }
      96                 :            : 
      97                 :            :     virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
      98                 :            :     virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
      99                 :            : 
     100                 :            :     virtual rtl::OUString GetValueTextByPos(sal_uInt16 nPos) const;
     101                 :            :     virtual SfxItemPresentation GetPresentation(SfxItemPresentation ePres, SfxMapUnit eCoreMetric, SfxMapUnit ePresMetric, String& rText, const IntlWrapper * = 0) const;
     102                 :            : };
     103                 :            : 
     104                 :            : #endif
     105                 :            : 
     106                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10