LibreOffice Module sc (master) 1
commentsbuffer.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 "richstring.hxx"
23#include "worksheethelper.hxx"
24#include <com/sun/star/awt/Rectangle.hpp>
25
26namespace oox::xls {
27
29{
32 sal_Int32 mnAuthorId;
36 bool mbLocked;
38 sal_Int32 mnTHA;
39 sal_Int32 mnTVA;
40 css::awt::Rectangle maAnchor;
41
42 explicit CommentModel();
43};
44
45class Comment final : public WorksheetHelper
46{
47public:
48 explicit Comment( const WorksheetHelper& rHelper );
49
51 void importComment( const AttributeList& rAttribs );
53 void importCommentPr( const AttributeList& rAttribs );
56
58 RichStringRef const & createText();
59
61 void finalizeImport();
62
63private:
65};
66
67typedef std::shared_ptr< Comment > CommentRef;
68
69class CommentsBuffer final : public WorksheetHelper
70{
71public:
72 explicit CommentsBuffer( const WorksheetHelper& rHelper );
73
75 void appendAuthor( const OUString& rAuthor );
78
80 void finalizeImport();
81
82private:
84
85 std::vector< OUString > maAuthors;
87};
88
89} // namespace oox::xls
90
91/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void importCommentPr(const AttributeList &rAttribs)
Imports a cell comment Properties from the passed attributes of the comment element.
void finalizeImport()
Finalizes the formatted string of the comment.
RichStringRef const & createText()
Creates and returns a new rich-string object for the comment text.
CommentModel maModel
Comment(const WorksheetHelper &rHelper)
void importComment(const AttributeList &rAttribs)
Imports a cell comment from the passed attributes of the comment element.
RefVector< Comment > CommentVector
CommentsBuffer(const WorksheetHelper &rHelper)
void appendAuthor(const OUString &rAuthor)
Appends a new author to the list of comment authors.
CommentRef createComment()
Creates and returns a new comment.
void finalizeImport()
Finalizes the formatted string of all comments.
std::vector< OUString > maAuthors
void SvStream & rStrm
std::shared_ptr< Comment > CommentRef
std::shared_ptr< RichString > RichStringRef
Definition: richstring.hxx:263
CommentModel()
Anchor parameters.
bool mbColHidden
Auto Scale comment text.
bool mbLocked
Comment cell's Column is Hidden.
sal_Int32 mnTVA
Horizontal Alignment.
RichStringRef mxText
Position of the comment in the worksheet.
bool mbAutoScale
Auto Selection of comment object's fill style.
sal_Int32 mnAuthorId
Formatted text of the comment (not used in BIFF8).
bool mbAutoFill
Identifier of the comment's author (OOXML and BIFF12 only).
bool mbRowHidden
Comment changes Locked.
css::awt::Rectangle maAnchor
Vertical Alignment.
sal_Int32 mnTHA
Comment cell's Row is Hidden.