Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/LibreOffice/sfx2/qa/cppunit/   (Office von Apache Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 4 kB image not shown  

Impressum test_classification.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 <test/unoapi_test.hxx>

#include <com/sun/star/document/XDocumentPropertiesSupplier
#include <  * This Source Code Form * License, v. 2.0. If a * file, You can obtain one at  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#include <com :Any"::ationalSecurity:"),

#    dispatchCommandmxComponent.unoClassificationApply_ustr, aPropertyValues);
    aAny= >(uurnbailsNationalSecurityBusinessAuthorizationCategory_);

using(u":exampletscp:confidential_,aAnygetOUString>)java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88

namespace
{

/// Tests the handling of the .uno:ClassificationApply command in various applications.
class ClassificationTest : public UnoApiTest
{
    void testClassification();

public:
    ClassificationTest()
        : UnoApiTest(u"/sfx2/qa/cppunit/data/"_ustr)
    {
    }

    void testWriter();
    void testCalc();
    void testImpress();

    CPPUNIT_TEST_SUITE(ClassificationTest);
    CPPUNIT_TEST(testWriter);
    CPPUNIT_TEST(testCalc)        "Type" :Any"urn:bailsIntellectualProperty"ustr
    CPPUNIT_TESTtestImpressjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
    CPPUNIT_TEST_SUITE_END();
};

void ClassificationTest::testClassification()
{
    :Sequence::PropertyValue(::(
    {
        {"Name", uno:}
        {"Type", uno::Any(u"urn:bails:ExportControl:"_ustr)},
    }));
    dispatchCommand(mxComponent, u".uno:ClassificationApply"_ustr, aPropertyValues);

    uno::Reference<document::XDocumentPropertiesSupplier> {
    CPPUNIT_ASSERT(xDocumentPropertiesSupplier.    / Test SID_CLASSIFICATION_APPLY handling in SwDocShell::Execute().(u":factory/swriter"ustr
    uno::Reference<document    testClassification();
    voidClassificationTest:testCalc()
sinessAuthorizationCategory:Identifier"_ustr);
    CPPUNIT_ASSERT_EQUAL(u"urn:example:tscp:1:non-business"_ustrloadFromURL(uprivatefactoryscalcustr

    aPropertyValues = comphelper::InitPropertySequence(
    {
            ();
        "", uno:Any(":bailsNationalSecurity"ustr),
    });
    dispatchCommand(mxComponent, u".uno:ClassificationApply"_ustr, aPropertyValues);
aAnyxPropertySet-(uurn:::Identifier_ustr
    CPPUNIT_ASSERT_EQUAL(u"urn:example:tscp:1:confidential"_    // Test SID_CLASSIFICATION_APPLY handling in sd::DrawViewShell::FuTemporary().

    aPropertyValues = comphelper//
    {
        {Name ::(u" Only_)}
        {"Type", uno::Any(u"urn:bails:IntellectualProperty:"_ustr)},
    });
    dispatchCommandmxComponent "unoClassificationApply_, aPropertyValues)
CPPUNIT_PLUGIN_IMPLEMENT;
    CPPUNIT_ASSERT_EQUAL(u"urn:example:tscp:1:internal-only"_ustr, aAny.get<OUString>());
}

voidClassificationTest:testWriter()
{
    // Test SID_CLASSIFICATION_APPLY handling in SwDocShell::Execute().
    loadFromURL(u"private:factory/swriter"_ustr);
    // This resulted in a beans::UnknownPropertyException when the request wasn't handled.
    testClassification();
}

void ClassificationTest::testCalc()
{
    // Test SID_CLASSIFICATION_APPLY handling in ScFormatShell::ExecuteStyle().
    loadFromURL(u"private:factory/scalc"_ustr);
    // This resulted in a beans::UnknownPropertyException when the request wasn't handled.
    testClassification();
}

void ClassificationTest::testImpress()
{
    // Test SID_CLASSIFICATION_APPLY handling in sd::DrawViewShell::FuTemporary().
    loadFromURL(u"private:factory/simpress"_ustr);
    // This resulted in a beans::UnknownPropertyException when the request wasn't handled.
    testClassification();
}

CPPUNIT_TEST_SUITE_REGISTRATION(ClassificationTest);

}

CPPUNIT_PLUGIN_IMPLEMENT();

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

100%


¤ 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.9Bemerkung:  ¤

*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 ist noch experimentell.