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>
34#include <document.hxx>
88 return sal_Int16(css::style::ParagraphAdjust_LEFT);
90 return sal_Int16(css::style::ParagraphAdjust_RIGHT);
92 return sal_Int16(css::style::ParagraphAdjust_CENTER);
94 return sal_Int16(css::style::ParagraphAdjust_BLOCK);
152 "Comment::finalizeImport - comment anchor should be a single cell" );
160 ScDocShell* pDocShell = xAnnos->GetDocShell();
165 Reference< XShape > xAnnoShape( pCaption->
getUnoShape() );
167 Reference< css::beans::XMultiPropertySet > xAnnoShapeMultiPropSet(xAnnoShape, UNO_QUERY_THROW);
170 xAnnoShapeMultiPropSet->setPropertyValues(
171 Sequence<OUString> {
"TextFitToSize",
"MoveProtect",
"TextHorizontalAdjust",
"TextVerticalAdjust" },
185 pVmlNoteShape->convertFormatting( xAnnoShape );
187 bVisible = pVmlNoteShape->getTypeModel().mbVisible;
190 const ::oox::vml::ClientData* xClientData = pVmlNoteShape->getClientData();
191 xAnnoShapeMultiPropSet->setPropertyValues(
192 Sequence<OUString> {
"TextVerticalAdjust",
"ParaAdjust" },
200 Reference< XText > xAnnoText( xAnnoShape, UNO_QUERY_THROW );
201 Reference< css::document::XActionLockable > xAnnoLock( xAnnoShape, UNO_QUERY_THROW );
202 xAnnoLock->addActionLock();
204 xAnnoLock->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.