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 #ifndef INCLUDED_SC_SOURCE_FILTER_INC_COMMENTSBUFFER_HXX
21 #define INCLUDED_SC_SOURCE_FILTER_INC_COMMENTSBUFFER_HXX
22 
23 #include "richstring.hxx"
24 #include "worksheethelper.hxx"
25 #include <com/sun/star/awt/Rectangle.hpp>
26 
27 namespace oox::xls {
28 
30 {
33  sal_Int32 mnAuthorId;
34  bool mbAutoFill;
35  bool mbAutoScale;
36  bool mbColHidden;
37  bool mbLocked;
38  bool mbRowHidden;
39  sal_Int32 mnTHA;
40  sal_Int32 mnTVA;
41  css::awt::Rectangle maAnchor;
42 
43  explicit CommentModel();
44 };
45 
46 class Comment : public WorksheetHelper
47 {
48 public:
49  explicit Comment( const WorksheetHelper& rHelper );
50 
52  void importComment( const AttributeList& rAttribs );
54  void importCommentPr( const AttributeList& rAttribs );
57 
59  RichStringRef const & createText();
60 
62  void finalizeImport();
63 
64 private:
66 };
67 
68 typedef std::shared_ptr< Comment > CommentRef;
69 
71 {
72 public:
73  explicit CommentsBuffer( const WorksheetHelper& rHelper );
74 
76  void appendAuthor( const OUString& rAuthor );
78  CommentRef createComment();
79 
81  void finalizeImport();
82 
83 private:
85 
86  std::vector< OUString > maAuthors;
87  CommentVector maComments;
88 };
89 
90 } // namespace oox::xls
91 
92 #endif
93 
94 /* 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.
bool mbColHidden
Auto Scale comment text.
RefVector< Comment > CommentVector
void appendAuthor(const OUString &rAuthor)
Appends a new author to the list of comment authors.
bool mbLocked
Comment cell's Column is Hidden.
std::vector< OUString > maAuthors
void importComment(const AttributeList &rAttribs)
Imports a cell comment from the passed attributes of the comment element.
void finalizeImport()
Finalizes the formatted string of all comments.
std::shared_ptr< RichString > RichStringRef
Definition: richstring.hxx:261
sal_Int32 mnTVA
Horizontal Alignment.
css::awt::Rectangle maAnchor
Vertical Alignment.
sal_Int32 mnAuthorId
Formatted text of the comment (not used in BIFF8).
bool mbAutoScale
Auto Selection of comment object's fill style.
bool mbAutoFill
Identifier of the comment's author (OOXML and BIFF12 only).
CommentsBuffer(const WorksheetHelper &rHelper)
CommentModel maModel
CommentRef createComment()
Creates and returns a new comment.
void finalizeImport()
Finalizes the formatted string of the comment.
RichStringRef const & createText()
Creates and returns a new rich-string object for the comment text.
std::shared_ptr< Comment > CommentRef
sal_Int32 mnTHA
Comment cell's Row is Hidden.
Comment(const WorksheetHelper &rHelper)
RichStringRef mxText
Position of the comment in the worksheet.
bool mbRowHidden
Comment changes Locked.
void SvStream & rStrm
CommentModel()
Anchor parameters.