LCOV - code coverage report
Current view: top level - vcl/source/window - keyevent.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 22 0.0 %
Date: 2014-04-14 Functions: 0 3 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 <com/sun/star/awt/KeyEvent.hpp>
      21             : #include <com/sun/star/awt/KeyModifier.hpp>
      22             : #include <tools/debug.hxx>
      23             : #include <vcl/event.hxx>
      24             : 
      25           0 : KeyEvent::KeyEvent (const KeyEvent& rKeyEvent) :
      26             :     maKeyCode (rKeyEvent.maKeyCode),
      27             :     mnRepeat  (rKeyEvent.mnRepeat),
      28           0 :     mnCharCode(rKeyEvent.mnCharCode)
      29           0 : {}
      30             : 
      31           0 : KeyEvent KeyEvent::LogicalTextDirectionality (TextDirectionality eMode) const
      32             : {
      33           0 :     KeyEvent aClone(*this);
      34             : 
      35           0 :     sal_uInt16 nCode = maKeyCode.GetCode();
      36           0 :     sal_uInt16 nMod  = maKeyCode.GetAllModifier();
      37             : 
      38           0 :     switch (eMode)
      39             :     {
      40             :         case TextDirectionality_RightToLeft_TopToBottom:
      41           0 :             switch (nCode)
      42             :             {
      43           0 :                 case KEY_LEFT:  aClone.maKeyCode = KeyCode(KEY_RIGHT, nMod); break;
      44           0 :                 case KEY_RIGHT: aClone.maKeyCode = KeyCode(KEY_LEFT,  nMod); break;
      45             :             }
      46           0 :             break;
      47             : 
      48             :         case TextDirectionality_TopToBottom_RightToLeft:
      49           0 :             switch (nCode)
      50             :             {
      51           0 :                 case KEY_DOWN:  aClone.maKeyCode = KeyCode(KEY_RIGHT, nMod); break;
      52           0 :                 case KEY_UP:    aClone.maKeyCode = KeyCode(KEY_LEFT,  nMod); break;
      53           0 :                 case KEY_LEFT:  aClone.maKeyCode = KeyCode(KEY_DOWN,  nMod); break;
      54           0 :                 case KEY_RIGHT: aClone.maKeyCode = KeyCode(KEY_UP,    nMod); break;
      55             :             }
      56           0 :             break;
      57             : 
      58             :         case TextDirectionality_LeftToRight_TopToBottom:
      59             :             /* do nothing */
      60           0 :             break;
      61             :     }
      62             : 
      63           0 :     return aClone;
      64             : }
      65             : 
      66           0 : const Point&   HelpEvent::GetMousePosPixel() const
      67             : {
      68             :     //DBG_ASSERT( !mbKeyboardActivated, "Keyboard help has no mouse position !");
      69           0 :     return maPos;
      70             : }
      71             : 
      72             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10