bin/find-can-be-private-symbols.functions.results | 68 ---------- include/linguistic/lngprophelp.hxx | 1 include/oox/helper/binaryoutputstream.hxx | 40 ------ include/svl/itempool.hxx | 7 - include/svx/numinf.hxx | 1 include/tools/json_writer.hxx | 3 include/tools/ref.hxx | 3 include/vcl/texteng.hxx | 146 +++++++++++----------- oox/source/helper/binaryoutputstream.cxx | 50 ------- sc/inc/validat.hxx | 2 sd/source/ui/inc/NotesChildWindow.hxx | 1 svx/source/items/numinf.cxx | 10 - sw/qa/inc/swmodeltestbase.hxx | 2 sw/qa/unit/swmodeltestbase.cxx | 7 - sw/source/uibase/config/cfgitems.cxx | 5 sw/source/uibase/inc/cfgitems.hxx | 2 tools/source/misc/json_writer.cxx | 5 17 files changed, 73 insertions(+), 280 deletions(-)
New commits: commit 144dd13818581e8753c2b0a8707ffe047837f273 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sat Mar 16 19:10:39 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Mar 17 13:06:48 2024 +0100 loplugin:unusedmethods Change-Id: Ib0a72355972662c6b902bca9a527be91fb3e1d17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164930 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/linguistic/lngprophelp.hxx b/include/linguistic/lngprophelp.hxx index 6b06d5cd9628..854c2310a0c7 100644 --- a/include/linguistic/lngprophelp.hxx +++ b/include/linguistic/lngprophelp.hxx @@ -221,7 +221,6 @@ public: void SetTmpPropVals( const css::beans::PropertyValues &rPropVals ); bool IsSpellUpperCase() const; bool IsSpellWithDigits() const; - bool IsSpellCapitalization() const; bool IsSpellClosedCompound() const; bool IsSpellHyphenatedCompound() const; /// @throws css::uno::RuntimeException diff --git a/include/oox/helper/binaryoutputstream.hxx b/include/oox/helper/binaryoutputstream.hxx index 67a7af646c6d..218e27c9f86c 100644 --- a/include/oox/helper/binaryoutputstream.hxx +++ b/include/oox/helper/binaryoutputstream.hxx @@ -159,46 +159,6 @@ private: bool mbAutoClose; ///< True = automatically close stream on destruction. }; - -/** Wraps a StreamDataSequence and provides convenient access functions. - - The binary data in the stream is written in little-endian format. After - construction, the stream points to the beginning of the passed data - sequence. The data sequence is expanded automatically while writing to it. - */ -class SequenceOutputStream final : public BinaryOutputStream -{ -public: - /** Constructs the wrapper object for the passed data sequence. - - @attention - The passed data sequence MUST live at least as long as this stream - wrapper. The data sequence MUST NOT be changed from outside as long - as this stream wrapper is used to write to it. - */ - explicit SequenceOutputStream( StreamDataSequence & rData ); - - /** Writes the passed data sequence. */ - virtual void writeData( const StreamDataSequence& rData, size_t nAtomSize = 1 ) override; - - /** Write nBytes bytes from the (preallocated!) buffer pMem. */ - virtual void writeMemory( const void* pMem, sal_Int32 nBytes, size_t nAtomSize = 1 ) override; - - /** Returns the size of the wrapped data sequence. */ - virtual sal_Int64 size() const override; - /** Returns the current stream position. */ - virtual sal_Int64 tell() const override; - /** Seeks the stream to the passed position. */ - virtual void seek( sal_Int64 nPos ) override; - /** Releases the reference to the data sequence. */ - virtual void close() override; - -private: - StreamDataSequence* mpData; ///< Wrapped data sequence. - sal_Int32 mnPos; ///< Current position in the sequence. -}; - - } // namespace oox #endif diff --git a/include/svl/itempool.hxx b/include/svl/itempool.hxx index 5b4c7c7465db..7c3868ca9996 100644 --- a/include/svl/itempool.hxx +++ b/include/svl/itempool.hxx @@ -209,7 +209,6 @@ public: const WhichRangesContainer& GetMergedIdRanges() const; protected: - static inline void ClearRefCount(SfxPoolItem& rItem); static inline void AddRef(const SfxPoolItem& rItem); static inline sal_uInt32 ReleaseRef(const SfxPoolItem& rItem, sal_uInt32 n = 1); @@ -361,12 +360,6 @@ private: static const sal_uInt16 SFX_WHICH_MAX = 4999; }; -// only the pool may manipulate the reference counts -inline void SfxItemPool::ClearRefCount(SfxPoolItem& rItem) -{ - rItem.SetRefCount(0); -} - // only the pool may manipulate the reference counts inline void SfxItemPool::AddRef(const SfxPoolItem& rItem) { diff --git a/include/svx/numinf.hxx b/include/svx/numinf.hxx index cd36a681a0b8..490b456bb95e 100644 --- a/include/svx/numinf.hxx +++ b/include/svx/numinf.hxx @@ -30,7 +30,6 @@ class SVX_DLLPUBLIC SvxNumberInfoItem final : public SfxPoolItem { public: - SvxNumberInfoItem( const TypedWhichId<SvxNumberInfoItem> nId ); SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const TypedWhichId<SvxNumberInfoItem> nId ); SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, OUString aVal, diff --git a/include/tools/json_writer.hxx b/include/tools/json_writer.hxx index 92d219457789..2977f7f8c231 100644 --- a/include/tools/json_writer.hxx +++ b/include/tools/json_writer.hxx @@ -79,9 +79,6 @@ public: * After this no more document modifications may be written. */ OString finishAndGetAsOString(); - /** returns true if the current JSON data matches the string */ - bool isDataEquals(std::string_view) const; - private: void endNode(char closing); void addCommaBeforeField(); diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx index 3f245bf08e1b..5b8af3fa0c52 100644 --- a/include/tools/ref.hxx +++ b/include/tools/ref.hxx @@ -134,9 +134,6 @@ public: SvRefBase & operator=(const SvRefBase &) { return *this; } - void RestoreNoDelete() - { bNoDelete = 1; } - void AddNextRef() { assert( nRefCount < (1 << 30) && "Do not add refs to dead objects" ); diff --git a/oox/source/helper/binaryoutputstream.cxx b/oox/source/helper/binaryoutputstream.cxx index 50ce7f11ce9e..6e743ffbcc68 100644 --- a/oox/source/helper/binaryoutputstream.cxx +++ b/oox/source/helper/binaryoutputstream.cxx @@ -129,56 +129,6 @@ void BinaryOutputStream::writeCompressedUnicodeArray( const OUString& rString, b writeUnicodeArray( rString ); } -SequenceOutputStream::SequenceOutputStream( StreamDataSequence & rData ) : - BinaryStreamBase( true ), - mpData( &rData ), - mnPos( 0 ) -{ -} - -void SequenceOutputStream::writeData( const StreamDataSequence& rData, size_t nAtomSize ) -{ - if( mpData && rData.hasElements() ) - writeMemory( rData.getConstArray(), rData.getLength(), nAtomSize ); -} - -void SequenceOutputStream::writeMemory( const void* pMem, sal_Int32 nBytes, size_t /*nAtomSize*/ ) -{ - if( mpData && (nBytes > 0) ) - { - if( mpData->getLength() - mnPos < nBytes ) - mpData->realloc( mnPos + nBytes ); - memcpy( mpData->getArray() + mnPos, pMem, static_cast< size_t >( nBytes ) ); - mnPos += nBytes; - } -} - -sal_Int64 SequenceOutputStream::size() const -{ - return mpData ? mpData->getLength() : -1; -} - -sal_Int64 SequenceOutputStream::tell() const -{ - return mpData ? mnPos : -1; -} - -void SequenceOutputStream::seek( sal_Int64 nPos ) -{ - if( mpData ) - { - mnPos = getLimitedValue< sal_Int32, sal_Int64 >( nPos, 0, mpData->getLength() ); - mbEof = mnPos != nPos; - } -} - -void SequenceOutputStream::close() -{ - mpData = nullptr; - mbEof = true; -} - - } // namespace oox /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx index 4e4b178dbd52..4afd9e2ba8f2 100644 --- a/sc/inc/validat.hxx +++ b/sc/inc/validat.hxx @@ -113,8 +113,6 @@ public: { rTitle = aInputTitle; rMsg = aInputMessage; return bShowInput; } SC_DLLPUBLIC bool GetErrMsg( OUString& rTitle, OUString& rMsg, ScValidErrorStyle& rStyle ) const; - bool HasErrMsg() const { return bShowError; } - ScValidationMode GetDataMode() const { return eDataMode; } sal_Int16 GetListType() const { return mnListType; } diff --git a/sd/source/ui/inc/NotesChildWindow.hxx b/sd/source/ui/inc/NotesChildWindow.hxx index 5242595bcb24..fbdb3cc1f6b4 100644 --- a/sd/source/ui/inc/NotesChildWindow.hxx +++ b/sd/source/ui/inc/NotesChildWindow.hxx @@ -62,7 +62,6 @@ public: virtual ~NotesEditWindow() override; void provideNoteText(); - bool HasNotesPlaceholder() { return mpTextObj; } virtual void EditViewScrollStateChange() override; virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override; diff --git a/svx/source/items/numinf.cxx b/svx/source/items/numinf.cxx index a7b834c78658..88176083ec53 100644 --- a/svx/source/items/numinf.cxx +++ b/svx/source/items/numinf.cxx @@ -21,16 +21,6 @@ #include <utility> -SvxNumberInfoItem::SvxNumberInfoItem( const TypedWhichId<SvxNumberInfoItem> nId ) : - SfxPoolItem ( nId ), - pFormatter ( nullptr ), - eValueType ( SvxNumberValueType::Undefined ), - aStringVal ( "" ), - nDoubleVal ( 0 ) -{ -} - - SvxNumberInfoItem::SvxNumberInfoItem( SvNumberFormatter* pNumFormatter, const TypedWhichId<SvxNumberInfoItem> nId ) : SfxPoolItem ( nId ), diff --git a/sw/qa/inc/swmodeltestbase.hxx b/sw/qa/inc/swmodeltestbase.hxx index c553fd9cb985..66568ebac2aa 100644 --- a/sw/qa/inc/swmodeltestbase.hxx +++ b/sw/qa/inc/swmodeltestbase.hxx @@ -287,8 +287,6 @@ protected: */ xmlDocUniquePtr WrapReqifFromTempFile(); - void WrapFromTempFile(SvMemoryStream& rStream); - bool isExported(){ return mbExported; } void emulateTyping(SwXTextDocument& rTextDoc, const std::u16string_view& rStr); diff --git a/sw/qa/unit/swmodeltestbase.cxx b/sw/qa/unit/swmodeltestbase.cxx index e7a3087df3f8..9e149d43b6bc 100644 --- a/sw/qa/unit/swmodeltestbase.cxx +++ b/sw/qa/unit/swmodeltestbase.cxx @@ -549,13 +549,6 @@ xmlDocUniquePtr SwModelTestBase::WrapReqifFromTempFile() return pXmlDoc; } -void SwModelTestBase::WrapFromTempFile(SvMemoryStream& rStream) -{ - SvFileStream aFileStream(maTempFile.GetURL(), StreamMode::READ); - rStream.WriteStream(aFileStream); - rStream.Seek(0); -} - void SwModelTestBase::emulateTyping(SwXTextDocument& rTextDoc, const std::u16string_view& rStr) { for (const char16_t c : rStr) diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx index fc8c0e1c4ddc..5b16a148f845 100644 --- a/sw/source/uibase/config/cfgitems.cxx +++ b/sw/source/uibase/config/cfgitems.cxx @@ -257,11 +257,6 @@ bool SwFmtAidsAutoComplItem::operator==(const SfxPoolItem& rCmp) const return m_bEncloseWithCharactersOn == rItem.m_bEncloseWithCharactersOn; } -void SwFmtAidsAutoComplItem::FillViewOptions(SwViewOption& rVOpt) const -{ - rVOpt.SetEncloseWithCharactersOn(m_bEncloseWithCharactersOn); -} - #ifdef DBG_UTIL SwTestItem* SwTestItem::Clone( SfxItemPool* ) const { diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx index 6ee5ea620cda..26cd004cebb4 100644 --- a/sw/source/uibase/inc/cfgitems.hxx +++ b/sw/source/uibase/inc/cfgitems.hxx @@ -147,8 +147,6 @@ public: virtual SwFmtAidsAutoComplItem* Clone(SfxItemPool* pPool = nullptr) const override; virtual bool operator==(const SfxPoolItem&) const override; - void FillViewOptions(SwViewOption& rVOpt) const; - bool IsEncloseWithCharactersOn() const { return m_bEncloseWithCharactersOn; } void SetEncloseWithCharactersOn(bool bFlag) { m_bEncloseWithCharactersOn = bFlag; } diff --git a/tools/source/misc/json_writer.cxx b/tools/source/misc/json_writer.cxx index 4c674557b033..f5c262573418 100644 --- a/tools/source/misc/json_writer.cxx +++ b/tools/source/misc/json_writer.cxx @@ -357,10 +357,5 @@ OString JsonWriter::finishAndGetAsOString() return mpBuffer; } -bool JsonWriter::isDataEquals(std::string_view s) const -{ - return std::string_view(mpBuffer->buffer, static_cast<size_t>(mPos - mpBuffer->buffer)) == s; -} - } // namespace tools /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ commit e501580dec3ddf3ca55c97a04a3f1a2b1f802eaa Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sat Mar 16 09:46:01 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Mar 17 13:06:38 2024 +0100 reduce symbol visibility in vcl Change-Id: Ibe6154dc5de6251fb39952caa190d53a6fd1fd89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164926 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/bin/find-can-be-private-symbols.functions.results b/bin/find-can-be-private-symbols.functions.results index bb8a0509ff3b..ae54cffd77d5 100644 --- a/bin/find-can-be-private-symbols.functions.results +++ b/bin/find-can-be-private-symbols.functions.results @@ -9884,74 +9884,6 @@ TextAttribFontColor::operator==(TextAttrib const&) const TextAttribFontWeight::Clone() const TextAttribFontWeight::SetFont(vcl::Font&) const TextAttribFontWeight::operator==(TextAttrib const&) const -TextEngine::CalcParaHeight(unsigned int) const -TextEngine::CalcTextHeight() const -TextEngine::CalcTextWidth(unsigned int) -TextEngine::CalcTextWidth(unsigned int, int, int) -TextEngine::CheckIdleFormatter() -TextEngine::ConnectContents(unsigned int) -TextEngine::CreateAndInsertEmptyLine(unsigned int) -TextEngine::CreateLines(unsigned int) -TextEngine::CreateTextPortions(unsigned int, int) -TextEngine::CursorMoved(unsigned int) -TextEngine::Draw(OutputDevice*, Point const&) -TextEngine::FindCharAttrib(TextPaM const&, unsigned short) const -TextEngine::FormatAndUpdate(TextView*) -TextEngine::FormatDoc() -TextEngine::FormatFullDoc() -TextEngine::GetBreakIterator() -TextEngine::GetCharPos(unsigned int, unsigned long, long) -TextEngine::GetEditCursor(TextPaM const&, bool, bool) -TextEngine::GetInvalidYOffsets(unsigned int) -TextEngine::GetText(LineEnd) const -TextEngine::GetTextLen() const -TextEngine::GetTextLen(TextSelection const&) const -TextEngine::GetTextLines(LineEnd) const -TextEngine::GetView(unsigned short) const -TextEngine::GetViewCount() const -TextEngine::IdleFormatAndUpdate(TextView*, unsigned short) -TextEngine::ImpBreakLine(unsigned int, TextLine*, int, long) -TextEngine::ImpCharsInserted(unsigned int, int, int) -TextEngine::ImpCharsRemoved(unsigned int, int, int) -TextEngine::ImpConnectParagraphs(unsigned int, unsigned int) -TextEngine::ImpDeleteText(TextSelection const&) -TextEngine::ImpFindIndex(unsigned int, Point const&) -TextEngine::ImpGetAlign() const -TextEngine::ImpGetLocaleDataWrapper() -TextEngine::ImpGetOutputOffset(unsigned int, TextLine*, int, int) -TextEngine::ImpGetPortionXOffset(unsigned int, TextLine const*, unsigned long) -TextEngine::ImpGetRightToLeft(unsigned int, int) -TextEngine::ImpGetXPos(unsigned int, TextLine*, int, bool) -TextEngine::ImpInitDoc() -TextEngine::ImpInitLayoutMode(OutputDevice*) -TextEngine::ImpInitWritingDirections(unsigned int) -TextEngine::ImpInsertParaBreak(TextPaM const&) -TextEngine::ImpInsertParaBreak(TextSelection const&) -TextEngine::ImpInsertText(TextSelection const&, char16_t, bool) -TextEngine::ImpInsertText(TextSelection const&, rtl::OUString const&) -TextEngine::ImpPaint(OutputDevice*, Point const&, tools::Rectangle const*, TextSelection const*) -TextEngine::ImpParagraphInserted(unsigned int) -TextEngine::ImpParagraphRemoved(unsigned int) -TextEngine::ImpRemoveChars(TextPaM const&, int) -TextEngine::ImpRemoveParagraph(unsigned int) -TextEngine::ImpRemoveText() -TextEngine::InsertContent(std::unique_ptr<TextNode, std::default_delete<TextNode> >, unsigned int) -TextEngine::InsertUndo(std::unique_ptr<TextUndo, std::default_delete<TextUndo> >, bool) -TextEngine::IsSimpleCharInput(KeyEvent const&) -TextEngine::RecalcTextPortion(unsigned int, int, int) -TextEngine::SeekCursor(unsigned int, int, vcl::Font&, OutputDevice*) -TextEngine::SetLeftMargin(unsigned short) -TextEngine::SetLocale(com::sun::star::lang::Locale const&) -TextEngine::SetMaxTextLen(int) -TextEngine::SetRightToLeft(bool) -TextEngine::SetTextAlign(TxtAlign) -TextEngine::SplitContent(unsigned int, int) -TextEngine::SplitTextPortion(unsigned int, int) -TextEngine::TextModified() -TextEngine::UndoActionEnd() -TextEngine::UndoActionStart(unsigned short) -TextEngine::UpdateViews(TextView*) -TextEngine::ValidatePaM(TextPaM&) const TextEngine::ValidateSelection(TextSelection&) const TextListenerMultiplexer::acquire() TextListenerMultiplexer::disposing(com::sun::star::lang::EventObject const&) diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx index 1dbbd5ba1f4d..065561ed8670 100644 --- a/include/vcl/texteng.hxx +++ b/include/vcl/texteng.hxx @@ -123,21 +123,21 @@ class VCL_DLLPUBLIC TextEngine : public SfxBroadcaster bool mbRightToLeft : 1; bool mbHasMultiLineParas : 1; - void CursorMoved( sal_uInt32 nNode ); - void TextModified(); - - void ImpInitDoc(); - void ImpRemoveText(); - TextPaM ImpDeleteText( const TextSelection& rSel ); - TextPaM ImpInsertText( const TextSelection& rSel, sal_Unicode c, bool bOverwrite = false ); - TextPaM ImpInsertText( const TextSelection& rSel, const OUString& rText ); - TextPaM ImpInsertParaBreak( const TextSelection& rTextSelection ); - TextPaM ImpInsertParaBreak( const TextPaM& rPaM ); - void ImpRemoveChars( const TextPaM& rPaM, sal_Int32 nChars ); - TextPaM ImpConnectParagraphs( sal_uInt32 nLeft, sal_uInt32 nRight ); - void ImpRemoveParagraph( sal_uInt32 nPara ); - void ImpInitWritingDirections( sal_uInt32 nPara ); - LocaleDataWrapper* ImpGetLocaleDataWrapper(); + SAL_DLLPRIVATE void CursorMoved( sal_uInt32 nNode ); + SAL_DLLPRIVATE void TextModified(); + + SAL_DLLPRIVATE void ImpInitDoc(); + SAL_DLLPRIVATE void ImpRemoveText(); + SAL_DLLPRIVATE TextPaM ImpDeleteText( const TextSelection& rSel ); + SAL_DLLPRIVATE TextPaM ImpInsertText( const TextSelection& rSel, sal_Unicode c, bool bOverwrite = false ); + SAL_DLLPRIVATE TextPaM ImpInsertText( const TextSelection& rSel, const OUString& rText ); + SAL_DLLPRIVATE TextPaM ImpInsertParaBreak( const TextSelection& rTextSelection ); + SAL_DLLPRIVATE TextPaM ImpInsertParaBreak( const TextPaM& rPaM ); + SAL_DLLPRIVATE void ImpRemoveChars( const TextPaM& rPaM, sal_Int32 nChars ); + SAL_DLLPRIVATE TextPaM ImpConnectParagraphs( sal_uInt32 nLeft, sal_uInt32 nRight ); + SAL_DLLPRIVATE void ImpRemoveParagraph( sal_uInt32 nPara ); + SAL_DLLPRIVATE void ImpInitWritingDirections( sal_uInt32 nPara ); + SAL_DLLPRIVATE LocaleDataWrapper* ImpGetLocaleDataWrapper(); // to remain compatible in the minor release we copy the above ImpInsertText // function and add the extra parameter we need but make sure this function @@ -148,57 +148,57 @@ class VCL_DLLPUBLIC TextEngine : public SfxBroadcaster SAL_DLLPRIVATE bool IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const; // broadcast or adjust selections - void ImpParagraphInserted( sal_uInt32 nPara ); - void ImpParagraphRemoved( sal_uInt32 nPara ); - void ImpCharsRemoved( sal_uInt32 nPara, sal_Int32 nPos, sal_Int32 nChars ); - void ImpCharsInserted( sal_uInt32 nPara, sal_Int32 nPos, sal_Int32 nChars ); + SAL_DLLPRIVATE void ImpParagraphInserted( sal_uInt32 nPara ); + SAL_DLLPRIVATE void ImpParagraphRemoved( sal_uInt32 nPara ); + SAL_DLLPRIVATE void ImpCharsRemoved( sal_uInt32 nPara, sal_Int32 nPos, sal_Int32 nChars ); + SAL_DLLPRIVATE void ImpCharsInserted( sal_uInt32 nPara, sal_Int32 nPos, sal_Int32 nChars ); DECL_DLLPRIVATE_LINK( IdleFormatHdl, Timer *, void ); - void CheckIdleFormatter(); - void IdleFormatAndUpdate( TextView* pCurView, sal_uInt16 nMaxTimerRestarts = 5 ); - - bool CreateLines( sal_uInt32 nPara ); - void CreateAndInsertEmptyLine( sal_uInt32 nPara ); - void ImpBreakLine( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nPortionStart, tools::Long nRemainingWidth ); - std::size_t SplitTextPortion( sal_uInt32 nPara, sal_Int32 nPos ); - void CreateTextPortions( sal_uInt32 nPara, sal_Int32 nStartPos ); - void RecalcTextPortion( sal_uInt32 nPara, sal_Int32 nStartPos, sal_Int32 nNewChars ); - void SeekCursor( sal_uInt32 nNode, sal_Int32 nPos, vcl::Font& rFont, OutputDevice* pOutDev ); - - void FormatDoc(); - void FormatFullDoc(); - void FormatAndUpdate( TextView* pCurView = nullptr ); + SAL_DLLPRIVATE void CheckIdleFormatter(); + SAL_DLLPRIVATE void IdleFormatAndUpdate( TextView* pCurView, sal_uInt16 nMaxTimerRestarts = 5 ); + + SAL_DLLPRIVATE bool CreateLines( sal_uInt32 nPara ); + SAL_DLLPRIVATE void CreateAndInsertEmptyLine( sal_uInt32 nPara ); + SAL_DLLPRIVATE void ImpBreakLine( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nPortionStart, tools::Long nRemainingWidth ); + SAL_DLLPRIVATE std::size_t SplitTextPortion( sal_uInt32 nPara, sal_Int32 nPos ); + SAL_DLLPRIVATE void CreateTextPortions( sal_uInt32 nPara, sal_Int32 nStartPos ); + SAL_DLLPRIVATE void RecalcTextPortion( sal_uInt32 nPara, sal_Int32 nStartPos, sal_Int32 nNewChars ); + SAL_DLLPRIVATE void SeekCursor( sal_uInt32 nNode, sal_Int32 nPos, vcl::Font& rFont, OutputDevice* pOutDev ); + + SAL_DLLPRIVATE void FormatDoc(); + SAL_DLLPRIVATE void FormatFullDoc(); + SAL_DLLPRIVATE void FormatAndUpdate( TextView* pCurView = nullptr ); bool IsFormatting() const { return mbIsFormatting; } - void UpdateViews( TextView* pCurView = nullptr ); + SAL_DLLPRIVATE void UpdateViews( TextView* pCurView = nullptr ); - void ImpPaint( OutputDevice* pOut, const Point& rStartPos, tools::Rectangle const* pPaintArea, TextSelection const* pSelection = nullptr ); + SAL_DLLPRIVATE void ImpPaint( OutputDevice* pOut, const Point& rStartPos, tools::Rectangle const* pPaintArea, TextSelection const* pSelection = nullptr ); bool IsFormatted() const { return mbFormatted; } - sal_Int32 GetCharPos( sal_uInt32 nPara, std::vector<TextLine>::size_type nLine, tools::Long nDocPosX ); - tools::Rectangle GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bPreferPortionStart = false ); - sal_Int32 ImpFindIndex( sal_uInt32 nPortion, const Point& rPosInPara ); - tools::Long ImpGetPortionXOffset( sal_uInt32 nPara, TextLine const * pLine, std::size_t nTextPortion ); - tools::Long ImpGetXPos( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, bool bPreferPortionStart = false ); - tools::Long ImpGetOutputOffset( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, sal_Int32 nIndex2 ); - bool ImpGetRightToLeft( sal_uInt32 nPara, sal_Int32 nPos ); - static void ImpInitLayoutMode( OutputDevice* pOutDev ); - TxtAlign ImpGetAlign() const; - - tools::Long CalcTextHeight() const; - tools::Long CalcParaHeight( sal_uInt32 nParagraph ) const; - tools::Long CalcTextWidth( sal_uInt32 nPara ); - tools::Long CalcTextWidth( sal_uInt32 nPara, sal_Int32 nPortionStart, sal_Int32 nPortionLen); - Range GetInvalidYOffsets( sal_uInt32 nPortion ); + SAL_DLLPRIVATE sal_Int32 GetCharPos( sal_uInt32 nPara, std::vector<TextLine>::size_type nLine, tools::Long nDocPosX ); + SAL_DLLPRIVATE tools::Rectangle GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bPreferPortionStart = false ); + SAL_DLLPRIVATE sal_Int32 ImpFindIndex( sal_uInt32 nPortion, const Point& rPosInPara ); + SAL_DLLPRIVATE tools::Long ImpGetPortionXOffset( sal_uInt32 nPara, TextLine const * pLine, std::size_t nTextPortion ); + SAL_DLLPRIVATE tools::Long ImpGetXPos( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, bool bPreferPortionStart = false ); + SAL_DLLPRIVATE tools::Long ImpGetOutputOffset( sal_uInt32 nPara, TextLine* pLine, sal_Int32 nIndex, sal_Int32 nIndex2 ); + SAL_DLLPRIVATE bool ImpGetRightToLeft( sal_uInt32 nPara, sal_Int32 nPos ); + SAL_DLLPRIVATE static void ImpInitLayoutMode( OutputDevice* pOutDev ); + SAL_DLLPRIVATE TxtAlign ImpGetAlign() const; + + SAL_DLLPRIVATE tools::Long CalcTextHeight() const; + SAL_DLLPRIVATE tools::Long CalcParaHeight( sal_uInt32 nParagraph ) const; + SAL_DLLPRIVATE tools::Long CalcTextWidth( sal_uInt32 nPara ); + SAL_DLLPRIVATE tools::Long CalcTextWidth( sal_uInt32 nPara, sal_Int32 nPortionStart, sal_Int32 nPortionLen); + SAL_DLLPRIVATE Range GetInvalidYOffsets( sal_uInt32 nPortion ); // for Undo/Redo - void InsertContent( std::unique_ptr<TextNode> pNode, sal_uInt32 nPara ); - TextPaM SplitContent( sal_uInt32 nNode, sal_Int32 nSepPos ); - TextPaM ConnectContents( sal_uInt32 nLeftNode ); + SAL_DLLPRIVATE void InsertContent( std::unique_ptr<TextNode> pNode, sal_uInt32 nPara ); + SAL_DLLPRIVATE TextPaM SplitContent( sal_uInt32 nNode, sal_Int32 nSepPos ); + SAL_DLLPRIVATE TextPaM ConnectContents( sal_uInt32 nLeftNode ); // adjust PaM's and selections that were transferred to the API to a valid range - void ValidateSelection( TextSelection& rSel ) const; - void ValidatePaM( TextPaM& rPaM ) const; + SAL_DLLPRIVATE void ValidateSelection( TextSelection& rSel ) const; + SAL_DLLPRIVATE void ValidatePaM( TextPaM& rPaM ) const; public: TextEngine(); @@ -207,30 +207,30 @@ public: TextEngine& operator=( const TextEngine& ) = delete; void SetText( const OUString& rStr ); - OUString GetText( LineEnd aSeparator = LINEEND_LF ) const; + SAL_DLLPRIVATE OUString GetText( LineEnd aSeparator = LINEEND_LF ) const; OUString GetText( const TextSelection& rSel, LineEnd aSeparator = LINEEND_LF ) const; - OUString GetTextLines( LineEnd aSeparator = LINEEND_LF ) const; + SAL_DLLPRIVATE OUString GetTextLines( LineEnd aSeparator = LINEEND_LF ) const; void ReplaceText(const TextSelection& rSel, const OUString& rText); - sal_Int32 GetTextLen() const; - sal_Int32 GetTextLen( const TextSelection& rSel ) const; + SAL_DLLPRIVATE sal_Int32 GetTextLen() const; + SAL_DLLPRIVATE sal_Int32 GetTextLen( const TextSelection& rSel ) const; void SetFont( const vcl::Font& rFont ); const vcl::Font& GetFont() const { return maFont; } - void SetLeftMargin( sal_uInt16 n ); + SAL_DLLPRIVATE void SetLeftMargin( sal_uInt16 n ); void SetUpdateMode( bool bUpdate ); bool GetUpdateMode() const { return mbUpdate; } - sal_uInt16 GetViewCount() const; - TextView* GetView( sal_uInt16 nView ) const; + SAL_DLLPRIVATE sal_uInt16 GetViewCount() const; + SAL_DLLPRIVATE TextView* GetView( sal_uInt16 nView ) const; void InsertView( TextView* pTextView ); void RemoveView( TextView* pTextView ); TextView* GetActiveView() const { return mpActiveView;} void SetActiveView( TextView* pView ); - void SetMaxTextLen( sal_Int32 nLen ); + SAL_DLLPRIVATE void SetMaxTextLen( sal_Int32 nLen ); sal_Int32 GetMaxTextLen() const { return mnMaxTextLen; } void SetMaxTextWidth( tools::Long nWidth ); @@ -250,14 +250,14 @@ public: sal_uInt16 GetLineCount( sal_uInt32 nParagraph ) const; sal_Int32 GetLineLen( sal_uInt32 nParagraph, sal_uInt16 nLine ) const; - void SetRightToLeft( bool bR2L ); + SAL_DLLPRIVATE void SetRightToLeft( bool bR2L ); bool IsRightToLeft() const { return mbRightToLeft; } bool HasUndoManager() const { return mpUndoManager != nullptr; } SfxUndoManager& GetUndoManager(); - void UndoActionStart( sal_uInt16 nId = 0 ); - void UndoActionEnd(); - void InsertUndo( std::unique_ptr<TextUndo> pUndo, bool bTryMerge = false ); + SAL_DLLPRIVATE void UndoActionStart( sal_uInt16 nId = 0 ); + SAL_DLLPRIVATE void UndoActionEnd(); + SAL_DLLPRIVATE void InsertUndo( std::unique_ptr<TextUndo> pUndo, bool bTryMerge = false ); bool IsInUndo() const { return mbIsInUndo; } void SetIsInUndo( bool bInUndo ) { mbIsInUndo = bInUndo; } void ResetUndo(); @@ -277,22 +277,22 @@ public: OUString GetWord( const TextPaM& rCursorPos, TextPaM* pStartOfWord = nullptr, TextPaM* pEndOfWord = nullptr ); const TextAttrib* FindAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const; - const TextCharAttrib* FindCharAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const; + SAL_DLLPRIVATE const TextCharAttrib* FindCharAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const; void RemoveAttribs( sal_uInt32 nPara ); void SetAttrib( const TextAttrib& rAttr, sal_uInt32 nPara, sal_Int32 nStart, sal_Int32 nEnd ); TxtAlign GetTextAlign() const { return meAlign; } - void SetTextAlign( TxtAlign eAlign ); + SAL_DLLPRIVATE void SetTextAlign( TxtAlign eAlign ); - void Draw( OutputDevice* pDev, const Point& rPos ); + SAL_DLLPRIVATE void Draw( OutputDevice* pDev, const Point& rPos ); - void SetLocale( const css::lang::Locale& rLocale ); + SAL_DLLPRIVATE void SetLocale( const css::lang::Locale& rLocale ); css::lang::Locale const & GetLocale(); - css::uno::Reference< css::i18n::XBreakIterator > const & GetBreakIterator(); + SAL_DLLPRIVATE css::uno::Reference< css::i18n::XBreakIterator > const & GetBreakIterator(); static bool DoesKeyChangeText( const KeyEvent& rKeyEvent ); - static bool IsSimpleCharInput( const KeyEvent& rKeyEvent ); + SAL_DLLPRIVATE static bool IsSimpleCharInput( const KeyEvent& rKeyEvent ); const Color& GetTextColor() const { return maTextColor; } };