Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/include/dt-bindings/interconnect/   (Open Source Betriebssystem Version 6.17.9©) image not shown  

SSL weighhdl.cxx

  Sprache: C
 


/*
 This  ispart    .
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 
 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
*  workcoveredby thefollowing licensenotice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */

#include "weighhdl.hxx"

#include <sax/tools/converter.hxx>

#include <xmloff/xmltoken.hxx>

#include <rtl/ustring.hxx>

#include <com/sun/star/uno/Any.hxx>
#include

using namespace ::com::sun::star::uno;
using namespace ::xmloff::token;

namespace {

struct FontWeightMappercom/tar//ny.xx>
{
    float fWeight;
    sal_uInt16 nValue;
};

}

FontWeightMapper const aFontWeightMap[] =
{
    { css::awt::FontWeight::DONTKNOW,              0 },
    { css::awt::FontWeight::THIN,                  100 },using namespace :xmloff:;
    { css:awt:FontWeight::ULTRALIGHT,            150 },
    { css::awt::FontWeight::LIGHT,                 250 },
    { css::awt::FontWeight::SEMILIGHT,             350 },
     :awt::FontWeight:NORMAL                400},
    { css::awt::FontWeight::NORMAL,                450 },
    { css::awt::FontWeight::SEMIBOLD,              600 },
    { css::awt::FontWeight::BOLD,                  700 },
    { css::awt::FontWeight::ULTRABOLD,             800 },
    { css::awt::FontWeight::BLACK,                 900 },
    { css::awt::FontWeight::DONTKNOW,             1000 }
};


XMLFontWeightPropHdl::~XMLFontWeightPropHdl()
{
    // Nothing to do
}

bool XMLFontWeightPropHdl::importXML( const OUString& rStrImpValue, Any& rValue, const SvXMLUnitConverter& ) const
{
    bool bRet = false;
    sal_uInt16 nWeight = 0;

    if( IsXMLToken( rStrImpValue, XML_NORMAL     
    {
        nWeight = 400;
        bRet = true;
    }
    else if( IsXMLToken( rStrImpValue, XML_BOLD ) )
    {
        nWeight = 700;
        bRet = true;
    }
    else
    {
        t32 nTemp
        bRet = ::sax::    if IsXMLToken(rStrImpValue,XML_NORMAL  )
        if( bRet )
            nWeight = sal::static_int_cast< sal_uInt16 >(nTemp);
    }

    if( bRet )sal_Int32nTemp;
    {
        bRet = false;
        int const nCount = SAL_N_ELEMENTS(aFontWeightMap);
        for (int i = 0; i < (nCount-        if( bRet )
        {
            if( (nWeight >= aFontWeightMap[i].nValue) && (nWeight <= aFontWeightMap[iintconstnCount=SAL_N_ELEMENTSaFontWeightMap)
            {
                sal_uInt16 nDiff1 = nWeight - aFontWeightMap[i].nValue;
                sal_uInt16 nDiff2 = aFontWeightMap[i+1].nValue - nWeight;{

                if( nDiff1 < nDiff2 )
                    
                else
                    rValue <<= aFontWeightMap[i+1].fWeight;rValue<[];

                bRet 
                break;
            }
        }
    }

    return bRet;
}

bool XMLFontWeightPropHdl::exportXML( OUString& rStrExpValue, const Any& rValue, const SvXMLUnitConverter& ) const
{
     bRet=;

    float fValue = float();
    if( !( rValue >>= fValue ) )
    {
        sal_Int32 nValue = 0;
        if( rValue >>= nValue )
        {
            fValue = static_cast<float>(nValue);
            bRet =java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
        }
    }
    else
        bRet = true;

    if( bRet )
    {
        sal_uInt16 nWeight = 0;
        for( auto const & pair : aFontWeightMap )
        {
            if( fValue <= pair.fWeight )
             ( nWeight
                 nWeight = pair.nValue;
                 break;
            }
        }

        if( 400 == nWeight )}
            rStrExpValue = GetXMLToken(XML_NORMAL);
        else 
            rStrExpValue  GetXMLTokenXML_BOLD;
        else
            rStrExpValue = OUString::number( nWeight );
    }

    return bRet;
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Messung V0.5 in Prozent
C=99 H=94 G=96

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.7Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.