LibreOffice Module sfx2 (master) 1
doctemplateslocal.hxx
Go to the documentation of this file.
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#ifndef INCLUDED_SFX2_SOURCE_DOC_DOCTEMPLATESLOCAL_HXX
21#define INCLUDED_SFX2_SOURCE_DOC_DOCTEMPLATESLOCAL_HXX
22
23#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
24#include <com/sun/star/beans/StringPair.hpp>
25#include <com/sun/star/io/XInputStream.hpp>
26#include <com/sun/star/io/XOutputStream.hpp>
27#include <com/sun/star/uno/XComponentContext.hpp>
29#include <vector>
30
31
32class DocTemplLocaleHelper : public cppu::WeakImplHelper < css::xml::sax::XDocumentHandler >
33{
34 std::vector< css::beans::StringPair > m_aResultSeq;
35 std::vector< OUString > m_aElementsSeq; // stack of elements being parsed
36
38 std::vector< css::beans::StringPair > const & GetParsingResult() const;
39
41 static std::vector< css::beans::StringPair > ReadLocalizationSequence_Impl( const css::uno::Reference< css::io::XInputStream >& xInStream, const OUString& aStringID, const css::uno::Reference< css::uno::XComponentContext >& xContext );
42
43public:
44 virtual ~DocTemplLocaleHelper() override;
45
46 // returns sequence of pairs ( GroupName, GroupUIName )
48 static
49 std::vector< css::beans::StringPair >
51 const css::uno::Reference< css::io::XInputStream >& xInStream,
52 const css::uno::Reference< css::uno::XComponentContext >& xContext );
53
54 // writes sequence of elements ( GroupName, GroupUIName )
56 static
58 const css::uno::Reference< css::io::XOutputStream >& xOutStream,
59 const std::vector< css::beans::StringPair >& aSequence,
60 const css::uno::Reference< css::uno::XComponentContext >& xContext );
61
62 static OUString GetStandardGroupString();
63 static std::vector<OUString> GetBuiltInGroupNames();
64
65 // XDocumentHandler
66 virtual void SAL_CALL startDocument() override;
67 virtual void SAL_CALL endDocument() override;
68 virtual void SAL_CALL startElement( const OUString& aName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttribs ) override;
69 virtual void SAL_CALL endElement( const OUString& aName ) override;
70 virtual void SAL_CALL characters( const OUString& aChars ) override;
71 virtual void SAL_CALL ignorableWhitespace( const OUString& aWhitespaces ) override;
72 virtual void SAL_CALL processingInstruction( const OUString& aTarget, const OUString& aData ) override;
73 virtual void SAL_CALL setDocumentLocator( const css::uno::Reference< css::xml::sax::XLocator >& xLocator ) override;
74};
75
76#endif
77
78/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::vector< css::beans::StringPair > m_aResultSeq
std::vector< OUString > m_aElementsSeq
virtual void SAL_CALL startElement(const OUString &aName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttribs) override
virtual void SAL_CALL endElement(const OUString &aName) override
static std::vector< css::beans::StringPair > ReadGroupLocalizationSequence(const css::uno::Reference< css::io::XInputStream > &xInStream, const css::uno::Reference< css::uno::XComponentContext > &xContext)
virtual void SAL_CALL characters(const OUString &aChars) override
virtual void SAL_CALL processingInstruction(const OUString &aTarget, const OUString &aData) override
static std::vector< css::beans::StringPair > ReadLocalizationSequence_Impl(const css::uno::Reference< css::io::XInputStream > &xInStream, const OUString &aStringID, const css::uno::Reference< css::uno::XComponentContext > &xContext)
std::vector< css::beans::StringPair > const & GetParsingResult() const
virtual void SAL_CALL ignorableWhitespace(const OUString &aWhitespaces) override
static std::vector< OUString > GetBuiltInGroupNames()
virtual void SAL_CALL endDocument() override
virtual void SAL_CALL startDocument() override
static void WriteGroupLocalizationSequence(const css::uno::Reference< css::io::XOutputStream > &xOutStream, const std::vector< css::beans::StringPair > &aSequence, const css::uno::Reference< css::uno::XComponentContext > &xContext)
virtual void SAL_CALL setDocumentLocator(const css::uno::Reference< css::xml::sax::XLocator > &xLocator) override
static OUString GetStandardGroupString()
virtual ~DocTemplLocaleHelper() override
DdeData aData
Definition: lnkbase2.cxx:82