20#include <oox/token/tokens.hxx>
24#include <com/sun/star/beans/XMultiPropertySet.hpp>
25#include <com/sun/star/text/XText.hpp>
26#include <osl/diagnose.h>
35#include <document.hxx>
89 return sal_Int16(css::style::ParagraphAdjust_LEFT);
91 return sal_Int16(css::style::ParagraphAdjust_RIGHT);
93 return sal_Int16(css::style::ParagraphAdjust_CENTER);
95 return sal_Int16(css::style::ParagraphAdjust_BLOCK);
153 "Comment::finalizeImport - comment anchor should be a single cell" );
161 ScDocShell* pDocShell = xAnnos->GetDocShell();
167 assert(xAnnoShape &&
"will not be null");
171 static_cast<SvxShape*
>(xAnnoShape.get())->setPropertyValues(
172 Sequence<OUString> {
"TextFitToSize",
"MoveProtect",
"TextHorizontalAdjust",
"TextVerticalAdjust" },
186 pVmlNoteShape->convertFormatting( xAnnoShape );
188 bVisible = pVmlNoteShape->getTypeModel().mbVisible;
191 const ::oox::vml::ClientData* xClientData = pVmlNoteShape->getClientData();
192 static_cast<SvxShape*
>(xAnnoShape.get())->setPropertyValues(
193 Sequence<OUString> {
"TextVerticalAdjust",
"ParaAdjust" },
201 Reference< XText > xAnnoText( xAnnoShape );
202 xAnnoShape->addActionLock();
204 xAnnoShape->removeActionLock();
226 CommentRef xComment = std::make_shared<Comment>( *
this );
235 bool bWasLocked = pModel->
isLocked();
236 pModel->setLock(
true);
238 pModel->setLock(bWasLocked);
SC_DLLPUBLIC bool ShowNote(const ScAddress &rPos, bool bShow)
SC_DLLPUBLIC ScPostIt * ImportNote(const ScAddress &rPos, const OUString &rNoteText)
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
Additional class containing cell annotation data.
SdrCaptionObj * GetOrCreateCaption(const ScAddress &rPos) const
Returns the caption object of this note.
virtual css::uno::Reference< css::sheet::XSheetAnnotations > SAL_CALL getAnnotations() override
virtual css::uno::Reference< css::drawing::XShape > getUnoShape()
std::optional< sal_Int32 > getInteger(sal_Int32 nAttrToken) const
std::optional< OUString > getString(sal_Int32 nAttrToken) const
std::optional< bool > getBool(sal_Int32 nAttrToken) const
std::optional< sal_Int32 > getToken(sal_Int32 nAttrToken) const
void forEachMem(FuncType pFunc) const
static bool convertToCellRangeUnchecked(ScRange &orRange, std::u16string_view aString, sal_Int16 nSheet)
Converts the passed string to a cell range address, without checking any sheet limits.
const ::oox::vml::ShapeBase * getNoteShape(const ScAddress &rPos) const
Returns the drawing shape for a cell note at the specified position.
AddressConverter & getAddressConverter() const
Returns the converter for string to cell address/range conversion.
VmlDrawing & getVmlDrawing() const
Returns the VML drawing page for this sheet (OOXML/BIFF12 only).
ScDocument & getScDocument()
SCTAB getSheetIndex() const
Returns the index of the current sheet.
const css::uno::Reference< css::sheet::XSpreadsheet > & getSheet() const
Returns the XSpreadsheet interface of the current sheet.
#define DBG_UNHANDLED_EXCEPTION(...)
static sal_Int32 lcl_ToHorizAlign(sal_Int32 nAlign)
std::shared_ptr< Comment > CommentRef
static sal_Int16 lcl_ToParaAlign(sal_Int32 nAlign)
static sal_Int32 lcl_ToVertAlign(sal_Int32 nAlign)
std::shared_ptr< RichString > RichStringRef
A 2D cell range address struct for binary filters.