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