[Libreoffice-commits] core.git: editeng/source include/editeng sd/qa sd/source svx/source
editeng/source/editeng/editeng.cxx |4 - editeng/source/editeng/editobj.cxx |6 - editeng/source/editeng/editobj2.hxx | 10 +- editeng/source/editeng/impedit.hxx | 30 +++ editeng/source/editeng/impedit2.cxx |4 - editeng/source/editeng/impedit3.cxx | 41 -- editeng/source/editeng/impedit4.cxx |6 - editeng/source/outliner/outlin2.cxx |7 - editeng/source/outliner/outliner.cxx| 12 +-- include/editeng/editeng.hxx |4 - include/editeng/outliner.hxx|4 - sd/qa/unit/import-tests2.cxx|4 - sd/source/ui/view/drtxtob.cxx |6 - svx/source/svdraw/svdotext.cxx | 110 ++-- svx/source/svdraw/svdotextdecomposition.cxx |2 15 files changed, 139 insertions(+), 111 deletions(-) New commits: commit 4c349be1d74c669e5804c3c43f3f0a3960c88bc5 Author: Tomaž Vajngerl AuthorDate: Mon Oct 31 13:28:27 2022 +0100 Commit: Tomaž Vajngerl CommitDate: Thu Nov 3 07:24:22 2022 +0100 fix rendering of text when "fit to frame" is enabled This changes the nStretchX and nStretchY from sal_uInt16 to double so the text in text boxes is rendered correctly (text should be resized to the same size as the textbox). Change-Id: Ic92d03043af0abe86f1b67ae15522d0176ebb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142064 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 88bc04a9efed..c8a66d0470a4 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -2266,12 +2266,12 @@ bool EditEngine::HasText( const SvxSearchItem& rSearchItem ) return pImpEditEngine->HasText( rSearchItem ); } -void EditEngine::SetGlobalCharStretching( sal_uInt16 nX, sal_uInt16 nY ) +void EditEngine::SetGlobalCharStretching(double nX, double nY) { pImpEditEngine->SetCharStretching( nX, nY ); } -void EditEngine::GetGlobalCharStretching( sal_uInt16& rX, sal_uInt16& rY ) const +void EditEngine::GetGlobalCharStretching(double& rX, double& rY) const { pImpEditEngine->GetCharStretching( rX, rY ); } diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index 6d57c7497c2b..437754d70def 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -71,10 +71,10 @@ void XEditAttribute::SetItem(const SfxPoolItem& rNew) } XParaPortionList::XParaPortionList( -OutputDevice* pRefDev, sal_uInt32 nPW, sal_uInt16 _nStretchX, sal_uInt16 _nStretchY) +OutputDevice* pRefDev, sal_uInt32 nPW, double nStretchX, double nStretchY) : pRefDevPtr(pRefDev) -, nStretchX(_nStretchX) -, nStretchY(_nStretchY) +, mnStretchX(nStretchX) +, mnStretchY(nStretchY) , nPaperWidth(nPW) { } diff --git a/editeng/source/editeng/editobj2.hxx b/editeng/source/editeng/editobj2.hxx index 250341fd4283..86a2e379be20 100644 --- a/editeng/source/editeng/editobj2.hxx +++ b/editeng/source/editeng/editobj2.hxx @@ -94,12 +94,12 @@ class XParaPortionList ListType maList; VclPtr pRefDevPtr; -sal_uInt16 nStretchX; -sal_uInt16 nStretchY; +double mnStretchX; +double mnStretchY; sal_uInt32 nPaperWidth; public: -XParaPortionList(OutputDevice* pRefDev, sal_uInt32 nPW, sal_uInt16 _nStretchX, sal_uInt16 _nStretchY); +XParaPortionList(OutputDevice* pRefDev, sal_uInt32 nPW, double nStretchX, double nStretchY); void push_back(XParaPortion* p); const XParaPortion& operator[](size_t i) const; @@ -108,8 +108,8 @@ public: sal_uInt32 GetPaperWidth() const { return nPaperWidth; } boolRefDevIsVirtual() const {return pRefDevPtr->IsVirtual();} const MapMode& GetRefMapMode() const { return pRefDevPtr->GetMapMode(); } -sal_uInt16 GetStretchX() const { return nStretchX; } -sal_uInt16 GetStretchY() const { return nStretchY; } +double GetStretchX() const { return mnStretchX; } +double GetStretchY() const { return mnStretchY; } }; class ContentInfo diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index b761e3bc4135..f75e71b7f509 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -528,8 +528,8 @@ private: Color maBackgroundColor; -sal_uInt16 nStretchX; -sal_uInt16 nStretchY; +double mnStretchX; +double mnStretchY; CharCompressTypenAsianCompressionMode; @@ -1080,8 +1080,8 @@ public: SvxCellJustifyMethodGetJustifyMethod( sal_Int32 nPara ) const; SvxCellVerJustify GetVerJustification( sal_Int32 nPara ) const; -voidSetCharStretching( sal_uInt16 nX, sal_uInt16 nY ); -inline void
[Libreoffice-commits] core.git: editeng/source include/editeng sd/qa sd/source svx/source
editeng/source/editeng/editeng.cxx |2 - editeng/source/editeng/editview.cxx |8 ++--- editeng/source/outliner/outlvw.cxx |8 ++--- include/editeng/editview.hxx |4 +- include/editeng/outliner.hxx |4 +- sd/qa/unit/tiledrendering/tiledrendering.cxx | 40 ++- sd/source/ui/func/futext.cxx |4 +- svx/source/svdraw/svdedxv.cxx|2 - 8 files changed, 55 insertions(+), 17 deletions(-) New commits: commit 6ea8084487411feea049f57712979fba4ad2fbce Author: Miklos VajnaDate: Wed Jul 20 11:33:10 2016 +0200 sd lok: decouple vcl window focus from cursor visibility The problem was the the blinking cursor was hidden when another vcl window got its focus, so it wasn't possible to edit two shape text in parallel in two windows. The code path is like this: - show cursor, cursor is created: SdrObjEditView::SdrBeginTextEdit() -> OutlinerView::ShowCursor() - show cursor, focus case: sd::FuText::Activate() -> OutlinerView::ShowCursor() - hide cursor, cursor is deleted: SdrObjEditView::SdrEndTextEdit() -> OutlinerView::HideCursor() - hide cursor, focus case: sd::FuText::Deactivate() -> OutlinerView::HideCursor() So add a new optional bool parameter that allows not emitting the LOK_CALLBACK_CURSOR_VISIBLE callback in the focus change case. Also, if we're at it, make sure that painting emits no show/cursor LOK callbacks. Change-Id: I1068a1b1f5cd76fd09b5a79066834bfb0daebc77 Reviewed-on: https://gerrit.libreoffice.org/27335 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index a20f52e..970f6b3 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -1432,7 +1432,7 @@ void EditEngine::SetUpdateMode( bool bUpdate ) { pImpEditEngine->SetUpdateMode( bUpdate ); if ( pImpEditEngine->pActiveView ) -pImpEditEngine->pActiveView->ShowCursor( false, false ); +pImpEditEngine->pActiveView->ShowCursor( false, false, /*bActivate=*/true ); } bool EditEngine::GetUpdateMode() const diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 8dca086..38dac90 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -392,7 +392,7 @@ void EditView::Command( const CommandEvent& rCEvt ) pImpEditView->Command( rCEvt ); } -void EditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) +void EditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bActivate ) { if ( pImpEditView->pEditEngine->HasView( this ) ) { @@ -401,18 +401,18 @@ void EditView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) bGotoCursor = false; pImpEditView->ShowCursor( bGotoCursor, bForceVisCursor ); -if (comphelper::LibreOfficeKit::isActive()) +if (comphelper::LibreOfficeKit::isActive() && !bActivate) { pImpEditView->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(true).getStr()); } } } -void EditView::HideCursor() +void EditView::HideCursor(bool bDeactivate) { pImpEditView->GetCursor()->Hide(); -if (comphelper::LibreOfficeKit::isActive()) +if (comphelper::LibreOfficeKit::isActive() && !bDeactivate) { pImpEditView->libreOfficeKitViewCallback(LOK_CALLBACK_CURSOR_VISIBLE, OString::boolean(false).getStr()); } diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index ea011f2..fb18848 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -1229,14 +1229,14 @@ bool OutlinerView::HasSelection() const return pEditView->HasSelection(); } -void OutlinerView::ShowCursor( bool bGotoCursor ) +void OutlinerView::ShowCursor( bool bGotoCursor, bool bActivate ) { -pEditView->ShowCursor( bGotoCursor ); +pEditView->ShowCursor( bGotoCursor, /*bForceVisCursor=*/true, bActivate ); } -void OutlinerView::HideCursor() +void OutlinerView::HideCursor(bool bDeactivate) { -pEditView->HideCursor(); +pEditView->HideCursor(bDeactivate); } void OutlinerView::SetWindow( vcl::Window* pWin ) diff --git a/include/editeng/editview.hxx b/include/editeng/editview.hxx index f609aa6..b8d16cef 100644 --- a/include/editeng/editview.hxx +++ b/include/editeng/editview.hxx @@ -111,8 +111,8 @@ public: voidInvalidate(); PairScroll( long nHorzScroll, long nVertScroll, ScrollRangeCheck nRangeCheck = ScrollRangeCheck::NoNegative ); -voidShowCursor( bool bGotoCursor = true, bool bForceVisCursor = true ); -voidHideCursor(); +