LibreOffice Module sc (master)
1
sc
source
filter
inc
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
26
namespace
oox::xls
{
27
28
struct
CommentModel
29
{
30
ScRange
maRange
;
31
RichStringRef
mxText
;
32
sal_Int32
mnAuthorId
;
33
bool
mbAutoFill
;
34
bool
mbAutoScale
;
35
bool
mbColHidden
;
36
bool
mbLocked
;
37
bool
mbRowHidden
;
38
sal_Int32
mnTHA
;
39
sal_Int32
mnTVA
;
40
css::awt::Rectangle
maAnchor
;
41
42
explicit
CommentModel
();
43
};
44
45
class
Comment
final :
public
WorksheetHelper
46
{
47
public
:
48
explicit
Comment
(
const
WorksheetHelper
& rHelper );
49
51
void
importComment
(
const
AttributeList
& rAttribs );
53
void
importCommentPr
(
const
AttributeList
& rAttribs );
55
void
importComment
(
SequenceInputStream
&
rStrm
);
56
58
RichStringRef
const
&
createText
();
59
61
void
finalizeImport
();
62
63
private
:
64
CommentModel
maModel
;
65
};
66
67
typedef
std::shared_ptr< Comment >
CommentRef
;
68
69
class
CommentsBuffer
final :
public
WorksheetHelper
70
{
71
public
:
72
explicit
CommentsBuffer
(
const
WorksheetHelper
& rHelper );
73
75
void
appendAuthor
(
const
OUString& rAuthor );
77
CommentRef
createComment
();
78
80
void
finalizeImport
();
81
82
private
:
83
typedef
RefVector< Comment >
CommentVector
;
84
85
std::vector< OUString >
maAuthors
;
86
CommentVector
maComments
;
87
};
88
89
}
// namespace oox::xls
90
91
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScRange
Definition:
address.hxx:495
oox::AttributeList
oox::RefVector< Comment >
oox::SequenceInputStream
oox::xls::Comment
Definition:
commentsbuffer.hxx:46
oox::xls::Comment::importCommentPr
void importCommentPr(const AttributeList &rAttribs)
Imports a cell comment Properties from the passed attributes of the comment element.
Definition:
commentsbuffer.cxx:123
oox::xls::Comment::finalizeImport
void finalizeImport()
Finalizes the formatted string of the comment.
Definition:
commentsbuffer.cxx:149
oox::xls::Comment::createText
RichStringRef const & createText()
Creates and returns a new rich-string object for the comment text.
Definition:
commentsbuffer.cxx:143
oox::xls::Comment::maModel
CommentModel maModel
Definition:
commentsbuffer.hxx:64
oox::xls::Comment::Comment
Comment(const WorksheetHelper &rHelper)
Definition:
commentsbuffer.cxx:111
oox::xls::Comment::importComment
void importComment(const AttributeList &rAttribs)
Imports a cell comment from the passed attributes of the comment element.
Definition:
commentsbuffer.cxx:116
oox::xls::CommentsBuffer
Definition:
commentsbuffer.hxx:70
oox::xls::CommentsBuffer::CommentVector
RefVector< Comment > CommentVector
Definition:
commentsbuffer.hxx:83
oox::xls::CommentsBuffer::CommentsBuffer
CommentsBuffer(const WorksheetHelper &rHelper)
Definition:
commentsbuffer.cxx:214
oox::xls::CommentsBuffer::appendAuthor
void appendAuthor(const OUString &rAuthor)
Appends a new author to the list of comment authors.
Definition:
commentsbuffer.cxx:219
oox::xls::CommentsBuffer::createComment
CommentRef createComment()
Creates and returns a new comment.
Definition:
commentsbuffer.cxx:224
oox::xls::CommentsBuffer::maComments
CommentVector maComments
Definition:
commentsbuffer.hxx:86
oox::xls::CommentsBuffer::finalizeImport
void finalizeImport()
Finalizes the formatted string of all comments.
Definition:
commentsbuffer.cxx:231
oox::xls::CommentsBuffer::maAuthors
std::vector< OUString > maAuthors
Definition:
commentsbuffer.hxx:85
oox::xls::WorksheetHelper
Definition:
worksheethelper.hxx:166
rStrm
void SvStream & rStrm
oox::xls
Definition:
addressconverter.hxx:31
oox::xls::CommentRef
std::shared_ptr< Comment > CommentRef
Definition:
commentsbuffer.hxx:67
oox::xls::RichStringRef
std::shared_ptr< RichString > RichStringRef
Definition:
richstring.hxx:263
richstring.hxx
oox::xls::CommentModel
Definition:
commentsbuffer.hxx:29
oox::xls::CommentModel::CommentModel
CommentModel()
Anchor parameters.
Definition:
commentsbuffer.cxx:99
oox::xls::CommentModel::mbColHidden
bool mbColHidden
Auto Scale comment text.
Definition:
commentsbuffer.hxx:35
oox::xls::CommentModel::mbLocked
bool mbLocked
Comment cell's Column is Hidden.
Definition:
commentsbuffer.hxx:36
oox::xls::CommentModel::mnTVA
sal_Int32 mnTVA
Horizontal Alignment.
Definition:
commentsbuffer.hxx:39
oox::xls::CommentModel::mxText
RichStringRef mxText
Position of the comment in the worksheet.
Definition:
commentsbuffer.hxx:31
oox::xls::CommentModel::mbAutoScale
bool mbAutoScale
Auto Selection of comment object's fill style.
Definition:
commentsbuffer.hxx:34
oox::xls::CommentModel::maRange
ScRange maRange
Definition:
commentsbuffer.hxx:30
oox::xls::CommentModel::mnAuthorId
sal_Int32 mnAuthorId
Formatted text of the comment (not used in BIFF8).
Definition:
commentsbuffer.hxx:32
oox::xls::CommentModel::mbAutoFill
bool mbAutoFill
Identifier of the comment's author (OOXML and BIFF12 only).
Definition:
commentsbuffer.hxx:33
oox::xls::CommentModel::mbRowHidden
bool mbRowHidden
Comment changes Locked.
Definition:
commentsbuffer.hxx:37
oox::xls::CommentModel::maAnchor
css::awt::Rectangle maAnchor
Vertical Alignment.
Definition:
commentsbuffer.hxx:40
oox::xls::CommentModel::mnTHA
sal_Int32 mnTHA
Comment cell's Row is Hidden.
Definition:
commentsbuffer.hxx:38
worksheethelper.hxx
Generated on Sun Jul 30 2023 04:28:38 for LibreOffice Module sc (master) by
1.9.3