LibreOffice Module xmloff (master) 1
XMLTextFrameContext.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 <memory>
23
24#include <com/sun/star/text/TextContentAnchorType.hpp>
25#include <xmloff/xmlictxt.hxx>
27
28namespace com::sun::star {
29 namespace text { class XTextCursor; class XTextContent; }
30}
31
33
35{
37
40
41 std::unique_ptr<XMLTextFrameContextHyperlink_Impl> m_pHyperlink;
42 // Implement Title/Description Elements UI (#i73249#)
43 OUString m_sTitle;
44 OUString m_sDesc;
45
46 css::text::TextContentAnchorType m_eDefaultAnchorType;
47
48 /* The <draw:name> can longer be used to distinguish Writer graphic/text box
49 objects and Draw graphic/text box objects.
50 The new distinguish attribute is the parent style of the automatic style
51 of the object. All Draw objects have an automatic style without a parent style.
52 (#i51726#)
53 */
56
57 bool CreateIfNotThere( css::uno::Reference < css::beans::XPropertySet >& rPropSet );
58
59protected:
61 void removeGraphicFromImportContext(const SvXMLImportContext& rContext) override;
62 OUString getGraphicPackageURLFromImportContext(const SvXMLImportContext& rContext) const override;
63 css::uno::Reference<css::graphic::XGraphic> getGraphicFromImportContext(const SvXMLImportContext& rContext) const override;
64
65public:
66
67
69 const css::uno::Reference<
70 css::xml::sax::XFastAttributeList > & xAttrList,
71 css::text::TextContentAnchorType eDfltAnchorType );
72
73 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
74
75 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
76 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
77
78 void SetHyperlink( const OUString& rHRef,
79 const OUString& rName,
80 const OUString& rTargetFrameName,
81 bool bMap );
82
83 css::text::TextContentAnchorType GetAnchorType() const;
84
85 css::uno::Reference < css::text::XTextContent > GetTextContent() const;
86
87 // Frame "to character": anchor moves from first to last char after saving (#i33242#)
88 css::uno::Reference < css::drawing::XShape > GetShape() const;
89};
90
91
92/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class deliberately does not support XWeak, to improve performance when loading large documents.
Definition: xmlictxt.hxx:48
friend class SvXMLImport
Definition: xmlictxt.hxx:49
rtl::Reference< sax_fastparser::FastAttributeList > m_xAttrList
css::text::TextContentAnchorType GetAnchorType() const
css::uno::Reference< css::text::XTextContent > GetTextContent() const
css::text::TextContentAnchorType m_eDefaultAnchorType
std::unique_ptr< XMLTextFrameContextHyperlink_Impl > m_pHyperlink
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
OUString getGraphicPackageURLFromImportContext(const SvXMLImportContext &rContext) const override
void SetHyperlink(const OUString &rHRef, const OUString &rName, const OUString &rTargetFrameName, bool bMap)
css::uno::Reference< css::graphic::XGraphic > getGraphicFromImportContext(const SvXMLImportContext &rContext) const override
XMLTextFrameContext(SvXMLImport &rImport, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, css::text::TextContentAnchorType eDfltAnchorType)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
bool CreateIfNotThere(css::uno::Reference< css::beans::XPropertySet > &rPropSet)
SvXMLImportContextRef m_xImplContext
css::uno::Reference< css::drawing::XShape > GetShape() const
void removeGraphicFromImportContext(const SvXMLImportContext &rContext) override
helper to get the created xShape instance, needs to be overridden
SvXMLImportContextRef m_xReplImplContext
def text(shape, orig_st)