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>
37 #include <docfunc.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(), UNO_QUERY_THROW );
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(
200 Reference< XText > xAnnoText( xAnnoShape, UNO_QUERY_THROW );
223 CommentRef xComment = std::make_shared<Comment>( *this );
232 bool bWasLocked = pModel->
isLocked();
233 pModel->setLock(
true);
235 pModel->setLock(bWasLocked);
virtual css::uno::Reference< css::sheet::XSheetAnnotations > SAL_CALL getAnnotations() override
OptValue< bool > getBool(sal_Int32 nAttrToken) const
OptValue< sal_Int32 > getInteger(sal_Int32 nAttrToken) const
A 2D cell range address struct for binary filters.
ScDocument & getScDocument()
SC_DLLPUBLIC bool ShowNote(const ScAddress &rPos, bool bShow)
OptValue< OUString > getString(sal_Int32 nAttrToken) const
SC_DLLPUBLIC ScPostIt * ImportNote(const ScAddress &rPos, const OUString &rNoteText)
static bool convertToCellRangeUnchecked(ScRange &orRange, const OUString &rString, sal_Int16 nSheet)
Converts the passed string to a cell range address, without checking any sheet limits.
void forEachMem(FuncType pFunc) const
std::shared_ptr< RichString > RichStringRef
virtual css::uno::Reference< css::uno::XInterface > getUnoShape()
Additional class containing cell annotation data.
static sal_Int32 lcl_ToVertAlign(sal_Int32 nAlign)
static sal_Int16 lcl_ToParaAlign(sal_Int32 nAlign)
SC_DLLPUBLIC ScDrawLayer * GetDrawLayer()
#define DBG_UNHANDLED_EXCEPTION(...)
std::shared_ptr< Comment > CommentRef
SdrCaptionObj * GetOrCreateCaption(const ScAddress &rPos) const
Returns the caption object of this note.
const css::uno::Reference< css::sheet::XSpreadsheet > & getSheet() const
Returns the XSpreadsheet interface of the current sheet.
SCTAB getSheetIndex() const
Returns the index of the current sheet.
static sal_Int32 lcl_ToHorizAlign(sal_Int32 nAlign)
VmlDrawing & getVmlDrawing() const
Returns the VML drawing page for this sheet (OOXML/BIFF12 only).
OptValue< sal_Int32 > getToken(sal_Int32 nAttrToken) const
AddressConverter & getAddressConverter() const
Returns the converter for string to cell address/range conversion.