LCOV - code coverage report
Current view: top level - comphelper/source/streaming - basicio.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 72 0.0 %
Date: 2014-04-14 Functions: 0 14 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 <comphelper/basicio.hxx>
      21             : 
      22             : 
      23             : namespace comphelper
      24             : {
      25             : 
      26             : 
      27             : 
      28           0 : const staruno::Reference<stario::XObjectOutputStream>& operator << (
      29             :         const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream,
      30             :         const starawt::FontDescriptor& _rFont)
      31             : {
      32           0 :     _rxOutStream->writeUTF( _rFont.Name );
      33           0 :     _rxOutStream->writeShort( _rFont.Height );
      34           0 :     _rxOutStream->writeShort( _rFont.Width );
      35           0 :     _rxOutStream->writeUTF( _rFont.StyleName );
      36           0 :     _rxOutStream->writeShort( _rFont.Family );
      37           0 :     _rxOutStream->writeShort( _rFont.CharSet );
      38           0 :     _rxOutStream->writeShort( _rFont.Pitch );
      39           0 :     _rxOutStream->writeDouble( _rFont.CharacterWidth );
      40           0 :     _rxOutStream->writeDouble( _rFont.Weight );
      41           0 :     _rxOutStream->writeShort( static_cast< sal_Int16 >(_rFont.Slant) );
      42           0 :     _rxOutStream->writeShort( _rFont.Underline );
      43           0 :     _rxOutStream->writeShort( _rFont.Strikeout );
      44           0 :     _rxOutStream->writeDouble( _rFont.Orientation );
      45           0 :     _rxOutStream->writeBoolean( _rFont.Kerning );
      46           0 :     _rxOutStream->writeBoolean( _rFont.WordLineMode );
      47           0 :     _rxOutStream->writeShort( _rFont.Type );
      48           0 :     return _rxOutStream;
      49             : }
      50             : 
      51             : // FontDescriptor
      52             : 
      53           0 : const staruno::Reference<stario::XObjectInputStream>& operator >> (
      54             :         const staruno::Reference<stario::XObjectInputStream>& _rxInStream,
      55             :         starawt::FontDescriptor& _rFont)
      56             : {
      57             :     // schreiben des Fontdescriptors
      58           0 :     _rFont.Name = _rxInStream->readUTF();
      59           0 :     _rFont.Height = _rxInStream->readShort();
      60           0 :     _rFont.Width = _rxInStream->readShort();
      61           0 :     _rFont.StyleName = _rxInStream->readUTF();
      62           0 :     _rFont.Family = _rxInStream->readShort();
      63           0 :     _rFont.CharSet = _rxInStream->readShort();
      64           0 :     _rFont.Pitch = _rxInStream->readShort();
      65           0 :     _rFont.CharacterWidth = static_cast< float >(_rxInStream->readDouble());
      66           0 :     _rFont.Weight = static_cast< float >(_rxInStream->readDouble());
      67           0 :     _rFont.Slant = (starawt::FontSlant)_rxInStream->readShort();
      68           0 :     _rFont.Underline = _rxInStream->readShort();
      69           0 :     _rFont.Strikeout = _rxInStream->readShort();
      70           0 :     _rFont.Orientation = static_cast< float >(_rxInStream->readDouble());
      71           0 :     _rFont.Kerning = _rxInStream->readBoolean();
      72           0 :     _rFont.WordLineMode = _rxInStream->readBoolean();
      73           0 :     _rFont.Type = _rxInStream->readShort();
      74           0 :     return _rxInStream;
      75             : }
      76             : 
      77             : 
      78           0 : const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, bool& _rVal)
      79             : {
      80           0 :     _rVal = _rxInStream->readBoolean();
      81           0 :     return _rxInStream;
      82             : }
      83             : 
      84             : 
      85           0 : const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, bool _bVal)
      86             : {
      87           0 :     _rxOutStream->writeBoolean(_bVal);
      88           0 :     return _rxOutStream;
      89             : }
      90             : 
      91             : 
      92           0 : const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, OUString& rStr)
      93             : {
      94           0 :     rStr = _rxInStream->readUTF();
      95           0 :     return _rxInStream;
      96             : }
      97             : 
      98             : 
      99           0 : const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, const OUString& rStr)
     100             : {
     101           0 :     _rxOutStream->writeUTF(rStr);
     102           0 :     return _rxOutStream;
     103             : }
     104             : 
     105             : 
     106           0 : const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Int16& _rValue)
     107             : {
     108           0 :     _rValue = _rxInStream->readShort();
     109           0 :     return _rxInStream;
     110             : }
     111             : 
     112             : 
     113           0 : const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Int16 _nValue)
     114             : {
     115           0 :     _rxOutStream->writeShort(_nValue);
     116           0 :     return _rxOutStream;
     117             : }
     118             : 
     119             : 
     120           0 : const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_uInt16& _rValue)
     121             : {
     122           0 :     _rValue = _rxInStream->readShort();
     123           0 :     return _rxInStream;
     124             : }
     125             : 
     126             : 
     127           0 : const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_uInt16 _nValue)
     128             : {
     129           0 :     _rxOutStream->writeShort(_nValue);
     130           0 :     return _rxOutStream;
     131             : }
     132             : 
     133             : 
     134           0 : const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_uInt32& _rValue)
     135             : {
     136           0 :     _rValue = _rxInStream->readLong();
     137           0 :     return _rxInStream;
     138             : }
     139             : 
     140             : 
     141           0 : const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_uInt32 _nValue)
     142             : {
     143           0 :     _rxOutStream->writeLong(_nValue);
     144           0 :     return _rxOutStream;
     145             : }
     146             : 
     147             : 
     148           0 : const staruno::Reference<stario::XObjectInputStream>& operator >> (const staruno::Reference<stario::XObjectInputStream>& _rxInStream, sal_Int32& _rValue)
     149             : {
     150           0 :     _rValue = _rxInStream->readLong();
     151           0 :     return _rxInStream;
     152             : }
     153             : 
     154             : 
     155           0 : const staruno::Reference<stario::XObjectOutputStream>& operator << (const staruno::Reference<stario::XObjectOutputStream>& _rxOutStream, sal_Int32 _nValue)
     156             : {
     157           0 :     _rxOutStream->writeLong(_nValue);
     158           0 :     return _rxOutStream;
     159             : }
     160             : 
     161             : 
     162             : }   // namespace comphelper
     163             : 
     164             : 
     165             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10