LibreOffice Module sc (master) 1
externallinkfragment.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#pragma once
21
22#include "excelhandlers.hxx"
24
25namespace oox::xls {
26
33{
34public:
36 WorkbookFragmentBase& rFragment,
37 const css::uno::Reference< css::sheet::XExternalSheetCache >& rxSheetCache );
38
39protected:
40 virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
41 virtual void onCharacters( const OUString& rChars ) override;
42
43 virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm ) override;
44
45private:
47 void importCell( const AttributeList& rAttribs );
48
59
61 void setCellValue( const css::uno::Any& rValue );
62
63private:
64 css::uno::Reference< css::sheet::XExternalSheetCache >
67 sal_Int32 mnCurrType;
68};
69
71{
72public:
73 explicit ExternalLinkFragment(
74 const WorkbookHelper& rHelper,
75 const OUString& rFragmentPath,
76 ExternalLink& rExtLink );
77
78protected:
79 virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) override;
80 virtual void onCharacters( const OUString& rChars ) override;
81 virtual void onEndElement() override;
82
83 virtual ::oox::core::ContextHandlerRef onCreateRecordContext( sal_Int32 nRecId, SequenceInputStream& rStrm ) override;
84
85 virtual const ::oox::core::RecordInfo* getRecordInfos() const override;
86
87private:
89
90private:
93 OUString maResultValue;
94 sal_Int32 mnResultType;
95};
96
97} // namespace oox::xls
98
99/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void onCharacters(const OUString &rChars) override
ExternalLinkFragment(const WorkbookHelper &rHelper, const OUString &rFragmentPath, ExternalLink &rExtLink)
virtual const ::oox::core::RecordInfo * getRecordInfos() const override
virtual void onEndElement() override
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
virtual ::oox::core::ContextHandlerRef onCreateRecordContext(sal_Int32 nRecId, SequenceInputStream &rStrm) override
::oox::core::ContextHandlerRef createSheetDataContext(sal_Int32 nSheetId)
This class implements importing the sheetData element in external sheets.
void setCellValue(const css::uno::Any &rValue)
Sets the passed cell value to the current position in the sheet cache.
void importExtCellBool(SequenceInputStream &rStrm)
Imports the EXTCELL_BOOL from the passed stream.
void importExtCellBlank(SequenceInputStream &rStrm)
Imports the EXTCELL_BLANK from the passed stream.
void importExtCellDouble(SequenceInputStream &rStrm)
Imports the EXTCELL_DOUBLE from the passed stream.
sal_Int32 mnCurrType
Position of current cell.
void importExtCellError(SequenceInputStream &rStrm)
Imports the EXTCELL_ERROR from the passed stream.
virtual ::oox::core::ContextHandlerRef onCreateContext(sal_Int32 nElement, const AttributeList &rAttribs) override
void importCell(const AttributeList &rAttribs)
Imports cell settings from a c element.
virtual void onCharacters(const OUString &rChars) override
css::uno::Reference< css::sheet::XExternalSheetCache > mxSheetCache
ExternalSheetDataContext(WorkbookFragmentBase &rFragment, const css::uno::Reference< css::sheet::XExternalSheetCache > &rxSheetCache)
virtual ::oox::core::ContextHandlerRef onCreateRecordContext(sal_Int32 nRecId, SequenceInputStream &rStrm) override
void importExtCellString(SequenceInputStream &rStrm)
Imports the EXTCELL_STRING from the passed stream.
ScAddress maCurrPos
The sheet cache used to store external cell values.
Context handler derived from the WorkbookHelper helper class.
Fragment handler derived from the WorkbookHelper helper class.
Helper class to provide access to global workbook data.
void SvStream & rStrm
std::shared_ptr< ExternalName > ExternalNameRef