LibreOffice Module sc (master) 1
|
#include <postit.hxx>
Static Public Member Functions | |
static rtl::Reference< SdrCaptionObj > | CreateTempCaption (ScDocument &rDoc, const ScAddress &rPos, SdrPage &rDrawPage, std::u16string_view rUserText, const tools::Rectangle &rVisRect, bool bTailFront) |
Creates and returns a caption object for a temporary caption. More... | |
static ScPostIt * | CreateNoteFromCaption (ScDocument &rDoc, const ScAddress &rPos, SdrCaptionObj *pCaption, bool bHasStyle) |
Creates a cell note using the passed caption drawing object. More... | |
static ScPostIt * | CreateNoteFromObjectData (ScDocument &rDoc, const ScAddress &rPos, SfxItemSet &&oItemSet, const OUString &rStyleName, const OutlinerParaObject &rOutlinerObj, const tools::Rectangle &rCaptionRect, bool bShown) |
Creates a cell note based on the passed caption object data. More... | |
static ScPostIt * | CreateNoteFromString (ScDocument &rDoc, const ScAddress &rPos, const OUString &rNoteText, bool bShown, bool bAlwaysCreateCaption, sal_uInt32 nPostItId=0) |
Creates a cell note based on the passed string and inserts it into the document. More... | |
Definition at line 175 of file postit.hxx.
|
static |
Creates a cell note using the passed caption drawing object.
This function is used in import filters to reuse the imported drawing object as note caption object.
pCaption | The drawing object for the cell note. This object MUST be inserted into the document at the correct drawing page already. The underlying ScPostIt::ScNoteData::ScCaptionPtr takes managing ownership of the pointer. |
bHasStyle | Is there a drawing style set for the note. |
Definition at line 905 of file postit.cxx.
References ScPostIt::AutoStamp(), SfxStyleSheetBasePool::Find(), ScDocument::GetStyleSheetPool(), ScNoteData::mxCaption, ScResId(), SDRATTR_SHADOW(), and ScDocument::SetNote().
Referenced by ScXMLTableRowCellContext::SetAnnotation().
|
static |
Creates a cell note based on the passed caption object data.
This function is used in import filters to use an existing imported item set and outliner object to create a note caption object. For performance reasons, it is possible to specify that the caption drawing object for the cell note is not created yet but the note caches the passed data needed to create the caption object on demand (see parameter bAlwaysCreateCaption).
pItemSet | Pointer to an item set on heap memory containing all formatting attributes of the caption object. This function takes ownership of the passed item set. |
rStyleName | Drawing style associated with the caption object. |
rOutlinerObj | An outliner object containing (formatted) text for the caption object. |
rCaptionRect | The absolute position and size of the caption object. The rectangle may be empty, in this case the default position and size is used. |
Definition at line 932 of file postit.cxx.
References ScPostIt::AutoStamp(), ScDrawLayer::GetCellRect(), tools::Rectangle::GetSize(), tools::Rectangle::IsEmpty(), ScDocument::IsNegativePage(), tools::Rectangle::Left(), ScCaptionInitData::maCaptionOffset, ScCaptionInitData::maCaptionSize, ScCaptionInitData::maStyleName, ScCaptionInitData::mbDefaultPosSize, ScCaptionInitData::moItemSet, ScNoteData::mxInitData, ScCaptionInitData::mxOutlinerObj, ScStyleNameConversion::ProgrammaticToDisplayName(), tools::Rectangle::Right(), ScDocument::SetNote(), Point::setX(), Point::setY(), ScAddress::Tab(), and tools::Rectangle::Top().
Referenced by XclImpNoteObj::DoPreProcessSdrObj(), and ScXMLTableRowCellContext::SetAnnotation().
|
static |
Creates a cell note based on the passed string and inserts it into the document.
rNoteText | The text used to create the note caption object. Must not be empty. |
bAlwaysCreateCaption | If sal_True is passed, the caption drawing object will be created immediately. If sal_False is passed, the caption drawing object will not be created if the note is not visible (bShown = sal_False), but the cell note will cache the passed data. MUST be set to sal_False outside of import filter implementations! |
Definition at line 965 of file postit.cxx.
References ScPostIt::AutoStamp(), ScCaptionInitData::maSimpleText, ScCaptionInitData::maStyleName, ScCaptionInitData::mbDefaultPosSize, ScNoteData::mxInitData, ScResId(), and ScDocument::SetNote().
Referenced by ScDocFunc::ImportNote(), OP_Note123(), XclImpSheetDrawing::ReadNote3(), ScDocFunc::ReplaceNote(), and ScXMLTableRowCellContext::SetAnnotation().
|
static |
Creates and returns a caption object for a temporary caption.
Definition at line 832 of file postit.cxx.
References aBuffer, tools::Rectangle::Bottom(), SfxStyleSheetBasePool::Find(), ScPostIt::GetAuthor(), ScPostIt::GetDate(), SdrObject::GetMergedItemSet(), ScDocument::GetNote(), ScPostIt::GetOrCreateCaption(), SdrTextObj::GetOutlinerParaObject(), SdrObject::GetStyleSheet(), ScDocument::GetStyleSheetPool(), tools::Rectangle::GetWidth(), SdrObjList::InsertObject(), ScPostIt::IsCaptionShown(), lcl_FormatAndInsertAuthorAndDatepara(), tools::Rectangle::Left(), makeSdrTextAutoGrowHeightItem(), makeSdrTextAutoGrowWidthItem(), makeSdrTextMaxFrameWidthItem(), makeSdrTextMinFrameWidthItem(), tools::Rectangle::Right(), ScResId(), and tools::Rectangle::Top().
Referenced by IMPL_LINK_NOARG().