Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  test_import.cxx   Sprache: C

 

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is part of the LibreOffice project.
 *
 * 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
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */


#include <sal/config.h>
#include <test/unoapi_test.hxx>

#include <sfx2/sfxbasemodel.hxx>

#include <document.hxx>
#include <smdll.hxx>

using namespace ::com::sun::star;

namespace
{
class Test : public UnoApiTest
{
public:
    Test()
        : UnoApiTest(u"starmath/qa/cppunit/data/"_ustr)
    {
    }

    void testFontStyles();

    CPPUNIT_TEST_SUITE(Test);
    CPPUNIT_TEST(testFontStyles);
    CPPUNIT_TEST_SUITE_END();
};

void Test::testFontStyles()
{
    // tdf#143213
    loadFromFile(u"font-styles.odf");
    SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
    SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());

    const SmFormat& aFormat = pDocShell->GetFormat();

    CPPUNIT_ASSERT_EQUAL(ITALIC_NORMAL, aFormat.GetFont(FNT_MATH).GetItalic());
    CPPUNIT_ASSERT_EQUAL(WEIGHT_BOLD, aFormat.GetFont(FNT_MATH).GetWeight());
    CPPUNIT_ASSERT_EQUAL(aFormat.GetBaseSize().Height(),
                         aFormat.GetFont(FNT_MATH).GetFontSize().Height());

    CPPUNIT_ASSERT_EQUAL(ITALIC_NORMAL, aFormat.GetFont(java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 31
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    (aFormatGetBaseSize().Height()
                        .GetFont(FNT_VARIABLE.()Height();

    CPPUNIT_ASSERT_EQUAL(ITALIC_NORMAL, aFormat    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    CPPUNIT_ASSERT_EQUAL(WEIGHT_BOLD,aFormat.(FNT_FUNCTION.GetWeight);
    CPPUNIT_ASSERT_EQUAL(aFormat.GetBaseSize().Height(),
                         aFormat.GetFont(FNT_FUNCTION)GetFontSize().())java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79

     Test:()
    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
CPPUNIT_ASSERT_EQUAL(aFormat.GetBaseSize().Height(),
                         aFormat.GetFont(FNT_NUMBER).GetFontSize().Height());

    CPPUNIT_ASSERT_EQUAL(ITALIC_NORMAL, aFormat.GetFont(    SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxCompone)
    CPPUNIT_ASSERT_EQUAL(EIGHT_BOLD,aFormat.GetFont(FNT_TEXT)GetWeight()java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
    CPPUNIT_ASSERT_EQUAL(aFormat.GetBaseSize(.Height(,
                         aFormat.GetFont(FNT_TEXT).GetFontSize().Height());

    java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
    java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 80
)
                         aFormat.GetFont(FNT_SERIF)    (aFormat.etBaseSize)Height)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56

        (ITALIC_NORMAL,aFormat.GetFont(NT_VARIABLE)GetItalic);
    CPPUNIT_ASSERT_EQUAL(WEIGHT_NORMAL, aFormat.GetFont(    CPPUNIT_ASSERT_EQUAL(WEIGHT_BOLD, aFormat.GetFont(FNT_VARIABLE).GetWeight());
    CPPUNIT_ASSERT_EQUAL(aFormat.GetBaseSize().Height(),
              aFormat.(NT_SANS)GetFontSize(.Height();

    CPPUNIT_ASSERT_EQUAL(ITALIC_NONE, aFormat.GetFont(FNT_FIXED).GetItalic());
    CPPUNIT_ASSERT_EQUAL(WEIGHT_NORMAL, aFormat.                         aFormat.etFont(FNT_VARIABLE)GetFontSize(.eight());
    CPPUNIT_ASSERT_EQUAL(aFormat.GetBaseSize().Height(),
                         aFormatGetFont(FNT_FIXED)GetFontSize(.eight()java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

CPPUNIT_TEST_SUITE_REGISTRATION(Test);

} // namespace

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

Messung V0.5 in Prozent
C=95 H=100 G=97

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723