include/editeng/editeng.hxx | 40 +++++++++++++++++++-------------------- include/editeng/editengdllapi.h | 1 include/editeng/outliner.hxx | 14 ++++++------- include/editeng/splwrap.hxx | 2 - include/editeng/unoviwou.hxx | 2 - sd/source/filter/html/htmlex.cxx | 4 --- 6 files changed, 30 insertions(+), 33 deletions(-)
New commits: commit a6cb747bab83c363d9683e19a71b2f18e37a5838 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Mar 7 16:13:03 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Mar 13 17:22:58 2024 +0100 no need to use strlen here we know the size of the buffer Change-Id: I20c99cd55e8af842dd8e70d8ec39550fd8e7c7f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164770 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 07126c6c59bf..5582a415c1d0 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -378,9 +378,7 @@ OUString StringToHTMLString( std::u16string_view rString ) { SvMemoryStream aMemStm; HTMLOutFuncs::Out_String( aMemStm, rString ); - aMemStm.WriteChar( char(0) ); - sal_Int32 nLength = strlen(static_cast<char const *>(aMemStm.GetData())); - return OUString( static_cast<char const *>(aMemStm.GetData()), nLength, RTL_TEXTENCODING_UTF8 ); + return OUString( static_cast<char const *>(aMemStm.GetData()), aMemStm.GetSize(), RTL_TEXTENCODING_UTF8 ); } // converts a paragraph of the outliner to html commit 4a2f9d488326fcbaa2cda4ebe66e060a3c3e3350 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Wed Mar 13 14:10:01 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Wed Mar 13 17:22:47 2024 +0100 EDITENG_DLLPRIVATE is unnecessary just use SAL_DLLPRIVATE Change-Id: I6040c505bcd9382432fa6de2a184b26a6ccc22c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164771 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx index f5e43927aaeb..1af292fb51f8 100644 --- a/include/editeng/editeng.hxx +++ b/include/editeng/editeng.hxx @@ -159,44 +159,44 @@ public: const OUString& rBaseURL, const EditPaM& rPaM, bool bUseSpecial, SotClipboardFormatId format = SotClipboardFormatId::NONE); - EDITENG_DLLPRIVATE ImpEditEngine& getImpl() const; + SAL_DLLPRIVATE ImpEditEngine& getImpl() const; private: std::unique_ptr<ImpEditEngine> mpImpEditEngine; EditEngine( const EditEngine& ) = delete; EditEngine& operator=( const EditEngine& ) = delete; - EDITENG_DLLPRIVATE bool PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView, vcl::Window const * pFrameWin ); + SAL_DLLPRIVATE bool PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView, vcl::Window const * pFrameWin ); - EDITENG_DLLPRIVATE void CheckIdleFormatter(); - EDITENG_DLLPRIVATE bool IsIdleFormatterActive() const; - EDITENG_DLLPRIVATE ParaPortion* FindParaPortion(ContentNode const * pNode); - EDITENG_DLLPRIVATE const ParaPortion* FindParaPortion(ContentNode const * pNode) const; - EDITENG_DLLPRIVATE const ParaPortion* GetPrevVisPortion(const ParaPortion* pCurPortion) const; + SAL_DLLPRIVATE void CheckIdleFormatter(); + SAL_DLLPRIVATE bool IsIdleFormatterActive() const; + SAL_DLLPRIVATE ParaPortion* FindParaPortion(ContentNode const * pNode); + SAL_DLLPRIVATE const ParaPortion* FindParaPortion(ContentNode const * pNode) const; + SAL_DLLPRIVATE const ParaPortion* GetPrevVisPortion(const ParaPortion* pCurPortion) const; - EDITENG_DLLPRIVATE css::uno::Reference<css::datatransfer::XTransferable> + SAL_DLLPRIVATE css::uno::Reference<css::datatransfer::XTransferable> CreateTransferable(const EditSelection& rSelection); - EDITENG_DLLPRIVATE EditPaM EndOfWord(const EditPaM& rPaM); + SAL_DLLPRIVATE EditPaM EndOfWord(const EditPaM& rPaM); - EDITENG_DLLPRIVATE EditPaM GetPaM(const Point& aDocPos, bool bSmart = true); + SAL_DLLPRIVATE EditPaM GetPaM(const Point& aDocPos, bool bSmart = true); - EDITENG_DLLPRIVATE EditSelection SelectWord( + SAL_DLLPRIVATE EditSelection SelectWord( const EditSelection& rCurSelection, sal_Int16 nWordType = css::i18n::WordType::ANYWORD_IGNOREWHITESPACES); - EDITENG_DLLPRIVATE tools::Long GetXPos(ParaPortion const& rParaPortion, EditLine const& rLine, sal_Int32 nIndex, bool bPreferPortionStart = false) const; + SAL_DLLPRIVATE tools::Long GetXPos(ParaPortion const& rParaPortion, EditLine const& rLine, sal_Int32 nIndex, bool bPreferPortionStart = false) const; - EDITENG_DLLPRIVATE Range GetLineXPosStartEnd(ParaPortion const& rParaPortion, EditLine const& rLine) const; + SAL_DLLPRIVATE Range GetLineXPosStartEnd(ParaPortion const& rParaPortion, EditLine const& rLine) const; - EDITENG_DLLPRIVATE InternalEditStatus& GetInternalEditStatus(); + SAL_DLLPRIVATE InternalEditStatus& GetInternalEditStatus(); - EDITENG_DLLPRIVATE void HandleBeginPasteOrDrop(PasteOrDropInfos& rInfos); - EDITENG_DLLPRIVATE void HandleEndPasteOrDrop(PasteOrDropInfos& rInfos); - EDITENG_DLLPRIVATE bool HasText() const; - EDITENG_DLLPRIVATE const EditSelectionEngine& GetSelectionEngine() const; - EDITENG_DLLPRIVATE void SetInSelectionMode(bool b); - EDITENG_DLLPRIVATE void ensureDocumentFormatted() const; + SAL_DLLPRIVATE void HandleBeginPasteOrDrop(PasteOrDropInfos& rInfos); + SAL_DLLPRIVATE void HandleEndPasteOrDrop(PasteOrDropInfos& rInfos); + SAL_DLLPRIVATE bool HasText() const; + SAL_DLLPRIVATE const EditSelectionEngine& GetSelectionEngine() const; + SAL_DLLPRIVATE void SetInSelectionMode(bool b); + SAL_DLLPRIVATE void ensureDocumentFormatted() const; public: EditEngine(SfxItemPool* pItemPool); diff --git a/include/editeng/editengdllapi.h b/include/editeng/editengdllapi.h index 5d77e453e0d9..24490ff87871 100644 --- a/include/editeng/editengdllapi.h +++ b/include/editeng/editengdllapi.h @@ -27,7 +27,6 @@ #else #define EDITENG_DLLPUBLIC SAL_DLLPUBLIC_IMPORT #endif -#define EDITENG_DLLPRIVATE SAL_DLLPRIVATE #endif diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 23158264d54b..012e5208159c 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -192,15 +192,15 @@ class EDITENG_DLLPUBLIC OutlinerView final Outside = 3 // Outside OutputArea }; - EDITENG_DLLPRIVATE void ImplExpandOrCollaps( sal_Int32 nStartPara, sal_Int32 nEndPara, bool bExpand ); + SAL_DLLPRIVATE void ImplExpandOrCollaps( sal_Int32 nStartPara, sal_Int32 nEndPara, bool bExpand ); - EDITENG_DLLPRIVATE sal_Int32 ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget); - EDITENG_DLLPRIVATE void ImpToggleExpand( Paragraph const * pParentPara ); - EDITENG_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( bool bIncludeHiddenChildren ); + SAL_DLLPRIVATE sal_Int32 ImpCheckMousePos( const Point& rPosPixel, MouseTarget& reTarget); + SAL_DLLPRIVATE void ImpToggleExpand( Paragraph const * pParentPara ); + SAL_DLLPRIVATE ParaRange ImpGetSelectedParagraphs( bool bIncludeHiddenChildren ); - EDITENG_DLLPRIVATE sal_Int32 ImpInitPaste( sal_Int32& rStart ); - EDITENG_DLLPRIVATE void ImpPasted( sal_Int32 nStart, sal_Int32 nPrevParaCount, sal_Int32 nSize); - EDITENG_DLLPRIVATE sal_Int32 ImpCalcSelectedPages( bool bIncludeFirstSelected ); + SAL_DLLPRIVATE sal_Int32 ImpInitPaste( sal_Int32& rStart ); + SAL_DLLPRIVATE void ImpPasted( sal_Int32 nStart, sal_Int32 nPrevParaCount, sal_Int32 nSize); + SAL_DLLPRIVATE sal_Int32 ImpCalcSelectedPages( bool bIncludeFirstSelected ); Link<LinkParamNone*,void> aEndCutPasteLink; diff --git a/include/editeng/splwrap.hxx b/include/editeng/splwrap.hxx index 8f8ea9c8f4be..eff70df19dbc 100644 --- a/include/editeng/splwrap.hxx +++ b/include/editeng/splwrap.hxx @@ -63,7 +63,7 @@ private: bool bAllRight : 1; // Record wrong words in the dedicated // dictionary and do not start the dialog. - EDITENG_DLLPRIVATE bool SpellNext(); // select next area + SAL_DLLPRIVATE bool SpellNext(); // select next area bool FindSpellError(); // Check for errors (over areas) SvxSpellWrapper(SvxSpellWrapper const &) = delete; diff --git a/include/editeng/unoviwou.hxx b/include/editeng/unoviwou.hxx index 674bec8cf003..88ee056295d7 100644 --- a/include/editeng/unoviwou.hxx +++ b/include/editeng/unoviwou.hxx @@ -32,7 +32,7 @@ private: OutlinerView& mrOutlinerView; Point maTextShapeTopLeft; - EDITENG_DLLPRIVATE Point GetTextOffset() const; + SAL_DLLPRIVATE Point GetTextOffset() const; public: explicit SvxDrawOutlinerViewForwarder( OutlinerView& rOutl );