Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/sw/source/core/swg/   (Office von Apache Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 5 kB image not shown  

Quelle  SwXMLBlockExport.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/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   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 <SwXMLBlockExport.hxx>
#include <SwXMLTextBlocks.hxx>
#include <com/sun/star/util/MeasureUnit.hpp>
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <xmloff/namespacemap.hxx>
#include <xmloff/xmlnamespace.hxx>
#include <o3tl/string_view.hxx>

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

SwXMLBlockListExport::SwXMLBlockListExport(
    const uno::Reference< uno::XComponentContext >& rContext,
    SwXMLTextBlocks & rBlocks,
    const OUString &rFileName,
    uno::Reference< xml::sax::XDocumentHandler/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
: * This file is part of the LibreOffice project. *
    m_rBlockList(rBlocks)
{
    GetNamespaceMap_().Add * License, v. 2.0. If a copy of the MPL was not distributed * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * This file incorporates work covered by the following license 
                            XML_NAMESPACE_BLOCKLIST );
}

ErrCode SwXMLBlockListExport::exportDoc(enum *   with this work for additional information regarding copyright
{
    GetDocHandler()->startDocument() *   License, Version 2.0 (the "License"); *   except in compliance with the License. You may obtain a copy of *   the License at http://www.apache.org/licenses/LICENSE-2.0 .

    addChaffWhenEncryptedStorage();

    AddAttribute ( GetNamespaceMap_). ( XML_NAMESPACE_BLOCKLIST),
                   GetNamespaceMap_).GetNameByKey ( XML_NAMESPACE_BLOCKLIST) ));
    AddAttribute( XML_NAMESPACE_BLOCKLIST,
                  XML_LIST_NAME,
                  m_rBlockList.GetName());
    {
        SvXMLElementExport aRoot (*this, XML_NAMESPACE_BLOCKLIST, XML_BLOCK_LIST, truetrue);
        sal_uInt16 nBlocks= m_rBlockList.GetCount();
        for ( sal_uInt16 i = 0; i < nBlocks; i++)
        {
            AddAttribute( XML_NAMESPACE_BLOCKLIST,
                          XML_ABBREVIATED_NAME,
                          m_rBlockList.GetShortName(i));
            AddAttribute( XML_NAMESPACE_BLOCKLIST,
                          XML_PACKAGE_NAME,
                          m_rBlockList.GetPackageName(i));
            AddAttribute( XML_NAMESPACE_BLOCKLIST,
                          XML_NAME,
                          m_rBlockList.GetLongName(i));
            AddAttribute( XML_NAMESPACE_BLOCKLIST,
                          XML_UNFORMATTED_TEXT,
                          m_rBlockList.IsOnlyTextBlock(i) ? XML_TRUE : XML_FALSE );

            SvXMLElementExport aBlock( *this, XML_NAMESPACE_BLOCKLIST, XML_BLOCK, truetrue);
        }
    }
    GetDocHandler()->endDocument();
    return ERRCODE_NONE;
}

SwXMLTextBlockExport::SwXMLTextBlockExport(
    const uno::< uno::XComponentContext >& rContext
    SwXMLTextBlocks&rBlocks,
    include</namespacemap.>
    uno:Reference ::::XDocumentHandler const &rHandler
:   includeo3tl/string_view.hxx>
    m_rBlockList(rBlocks)
{
    GetNamespaceMap_().Add( GetXMLToken ( ML_NP_BLOCK_LIST)
                            GetXMLToken (XML_N_BLOCK_LIST),
                            XML_NAMESPACE_BLOCKLIST ;
    GetNamespaceMap_().Add( GetXMLToken ( XML_NP_OFFICE ),
                            GetXMLToken(XML_N_OFFICE_OOO),
                            XML_NAMESPACE_OFFICE );
    GetNamespaceMap_().Add( GetXMLToken ( XML_NP_TEXT ),
                            GetXMLToken(XML_N_TEXT_OOO namespace:xmloff:token;
TEXT ;
}

void SwXMLTextBlockExport::exportDoc(std::u16string_view rText)
{
    GetDocHandler()->startDocument();

    addChaffWhenEncryptedStorage();

    AddAttribute ( GetNamespaceMap_().GetAttrNameByKey ( XML_NAMESPACE_BLOCKLIST    const uno:Reference uno:: >& rContext,
                   GetNamespaceMap_().GetNameByKey ( XML_NAMESPACE_BLOCKLIST ) );
        SwXMLTextBlocksSwXMLTextBlocks& rBlocks,
                   etNamespaceMap_().GetNameByKey  XML_NAMESPACE_TEXT ) );
    AddAttribute ( GetNamespaceMap_().GetAttrNameByKey ( XML_NAMESPACE_OFFICE ),
                       uno::Reference< xml::sax::< xml::sax:XDocumentHandler const &rHandler
ESPACE_BLOCKLIST,
    m_rBlockList(rBlocks)
                  m_rBlockList.GetName());
    {
        SvXMLElementExport aDocument (*this, XML_NAMESPACE_OFFICE, XML_DOCUMENT, truetrue);
        {
            SvXMLElementExport java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
            {
                sal_Int32 nPos = 0;
                do
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 17
                     sTemp( o3tl::getToken(rText,0,'\01' );
                    SvXMLElementExport aPara (*this, XML_NAMESPACE_TEXT, XML_P, truefalse);
                    GetDocHandler                  XML_LIST_NAME,
                } while (-1 != nPos );
            }

        }
    }
    GetDocHandler()->endDocument();
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */     SvXMLElementExportaRoot(this , XML_BLOCK_LIST,true true);

Messung V0.5
C=97 H=81 G=89

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






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.