core.git: Branch 'distro/collabora/co-24.04' - editeng/source include/editeng sd/qa sd/source svx/source

2024-04-15 Thread Tomaž Vajngerl (via logerrit)
 editeng/source/editeng/editeng.cxx  |   28 ++---
 editeng/source/editeng/impedit.hxx  |   41 
 editeng/source/editeng/impedit2.cxx |4 -
 editeng/source/editeng/impedit3.cxx |   57 
 editeng/source/editeng/impedit4.cxx |   12 +++--
 editeng/source/outliner/outlin2.cxx |   15 +++
 editeng/source/outliner/outliner.cxx|   14 ++
 include/editeng/editdata.hxx|   16 +++
 include/editeng/editeng.hxx |8 +--
 include/editeng/outliner.hxx|9 +++-
 sd/qa/unit/TextFittingTest.cxx  |   12 ++---
 sd/source/ui/view/drtxtob.cxx   |2 
 svx/source/svdraw/svdotext.cxx  |   24 ---
 svx/source/svdraw/svdotextdecomposition.cxx |4 +
 svx/source/svdraw/svdoutl.cxx   |2 
 15 files changed, 115 insertions(+), 133 deletions(-)

New commits:
commit 0b816d1eeb877699018f1bddc22003c6309020e6
Author: Tomaž Vajngerl 
AuthorDate: Mon Apr 1 20:12:09 2024 +0900
Commit: Miklos Vajna 
CommitDate: Mon Apr 15 09:20:18 2024 +0200

editeng: combine scaling parameters into ScalingParameters struct

This makes dealing with scaling parameters much clearer and it
improves readability.

Change-Id: I327b6530ef5587972cc0075390704754a33563a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165632
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 4bdbf0f898e8642b0a34195537d1516cc8eee819)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165712
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/editeng/source/editeng/editeng.cxx 
b/editeng/source/editeng/editeng.cxx
index 260e8dfb5038..35d025c45021 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2265,35 +2265,19 @@ bool EditEngine::HasText( const SvxSearchItem& 
rSearchItem )
 return pImpEditEngine->HasText( rSearchItem );
 }
 
-void EditEngine::setGlobalScale(double fFontScaleX, double fFontScaleY, double 
fSpacingScaleX, double fSpacingScaleY)
+ScalingParameters EditEngine::getScalingParameters() const
 {
-pImpEditEngine->setScale(fFontScaleX, fFontScaleY, fSpacingScaleX, 
fSpacingScaleY);
+return pImpEditEngine->getScalingParameters();
 }
 
-void EditEngine::getGlobalSpacingScale(double& rX, double& rY) const
+void EditEngine::resetScalingParameters()
 {
-pImpEditEngine->getSpacingScale(rX, rY);
+pImpEditEngine->resetScalingParameters();
 }
 
-basegfx::B2DTuple EditEngine::getGlobalSpacingScale() const
+void EditEngine::setScalingParameters(ScalingParameters const& 
rScalingParameters)
 {
-double x = 0.0;
-double y = 0.0;
-pImpEditEngine->getSpacingScale(x, y);
-return {x, y};
-}
-
-void EditEngine::getGlobalFontScale(double& rX, double& rY) const
-{
-pImpEditEngine->getFontScale(rX, rY);
-}
-
-basegfx::B2DTuple EditEngine::getGlobalFontScale() const
-{
-double x = 0.0;
-double y = 0.0;
-pImpEditEngine->getFontScale(x, y);
-return {x, y};
+pImpEditEngine->setScalingParameters(rScalingParameters);
 }
 
 void EditEngine::setRoundFontSizeToPt(bool bRound) const
diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index 0aabebe2ab46..34d57e8e9747 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -530,10 +530,7 @@ private:
 
 Color   maBackgroundColor;
 
-double mfFontScaleX;
-double mfFontScaleY;
-double mfSpacingScaleX;
-double mfSpacingScaleY;
+ScalingParameters maScalingParameters;
 bool mbRoundToNearestPt;
 
 CharCompressType mnAsianCompressionMode;
@@ -739,34 +736,34 @@ private:
 
 double scaleXSpacingValue(tools::Long nXValue) const
 {
-if (!maStatus.DoStretch() || mfSpacingScaleX == 100.0)
+if (!maStatus.DoStretch() || maScalingParameters.fSpacingX == 100.0)
 return nXValue;
 
-return double(nXValue) * mfSpacingScaleX / 100.0;
+return double(nXValue) * (maScalingParameters.fSpacingX / 100.0);
 }
 
 double scaleYSpacingValue(sal_uInt16 nYValue) const
 {
-if (!maStatus.DoStretch() || mfSpacingScaleY == 100.0)
+if (!maStatus.DoStretch() || maScalingParameters.fSpacingY == 100.0)
 return nYValue;
 
-return double(nYValue) * mfSpacingScaleY / 100.0;
+return double(nYValue) * (maScalingParameters.fSpacingY / 100.0);
 }
 
-double scaleYFontValue(sal_uInt16 nYValue) const
+double scaleXFontValue(tools::Long nXValue) const
 {
-if (!maStatus.DoStretch() || (mfFontScaleY == 100.0))
-return nYValue;
+if (!maStatus.DoStretch() || (maScalingParameters.fFontX == 100.0))
+return nXValue;
 
-return double(nYValue) * mfFontScaleY / 100.0;
+return 

core.git: Branch 'distro/collabora/co-24.04' - editeng/source

2024-03-15 Thread Gülşah Köse (via logerrit)
 editeng/source/outliner/outlvw.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 0aeabaf654428c1d84187ed8a40b37033ed01dcb
Author: Gülşah Köse 
AuthorDate: Thu Mar 14 09:09:51 2024 +0300
Commit: Gülşah Köse 
CommitDate: Fri Mar 15 13:54:56 2024 +0100

tdf#160213 Don't let insert empty line with numbering, end numbering

We applied the writer's empty bullet line policy to impres. Now We don't let
insert empty bullet lines in impress too. Instead we end numbering and start
to write normal paragraph at the same line.

Signed-off-by: Gülşah Köse 
Change-Id: I28042d9db59b5622434da0826f8b760f01ad64f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164799
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 
(cherry picked from commit f3f3ea4cc9c3bec761d095fbfefd6ba8724fcdef)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164828
Tested-by: Jenkins CollaboraOffice 

diff --git a/editeng/source/outliner/outlvw.cxx 
b/editeng/source/outliner/outlvw.cxx
index 136ecd776c26..f3fd835ec1c9 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -189,6 +189,13 @@ bool OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, 
vcl::Window const * pFra
 
 if( !aKeyCode.IsShift() )
 {
+// Don't let insert empty paragraph with numbering. 
Instead end numbering.
+if (pPara->GetDepth() > -1 &&
+pOwner->pEditEngine->GetTextLen( aSel.nEndPara ) 
== 0)
+{
+ToggleBullets();
+return true;
+}
 // ImpGetCursor again???
 if( !bSelection &&
 aSel.nEndPos == 
pOwner->pEditEngine->GetTextLen( aSel.nEndPara ) )


core.git: Branch 'distro/collabora/co-24.04' - editeng/source

2024-01-30 Thread Caolán McNamara (via logerrit)
 editeng/source/misc/acorrcfg.cxx |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 90e1b9b5ef46e6b6a882241484bd74dd7972db03
Author: Caolán McNamara 
AuthorDate: Fri Jan 26 09:44:38 2024 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 30 11:08:31 2024 +0100

LanguageTag ctor can canonicalize against various known tags

so can optimize skipping the _lt_tag_canonicalize path which ends up
using a fairly expensive xmlXPathEval

Change-Id: Ie96f16482d247f3731c1c8eac6d613736b8b289a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162596
Tested-by: Jenkins
Reviewed-by: Eike Rathke 
Reviewed-by: Caolán McNamara 
(cherry picked from commit c225d602e093da9240693d7f67afb9da4806e0e9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162629
Tested-by: Jenkins CollaboraOffice 

diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index 616d75c69600..49e48bb48be1 100644
--- a/editeng/source/misc/acorrcfg.cxx
+++ b/editeng/source/misc/acorrcfg.cxx
@@ -65,13 +65,12 @@ static void scanAutoCorrectDirForLanguageTags( const 
OUString& rURL )
 continue;
 
 const OUString aBcp47( aTitle.copy( 5, 
aTitle.getLength() - 9));
-OUString aCanonicalized;
 // Ignore invalid langtags and canonicalize for good,
 // allow private-use tags.
-if (!LanguageTag::isValidBcp47( aBcp47, 
))
+const LanguageTag aLanguageTag (aBcp47, true);
+if (!aLanguageTag.isValidBcp47())
 continue;
 
-const LanguageTag aLanguageTag( aCanonicalized);
 if (SvtLanguageTable::HasLanguageType( 
aLanguageTag.getLanguageType()))
 continue;
 
@@ -83,7 +82,7 @@ static void scanAutoCorrectDirForLanguageTags( const 
OUString& rURL )
 // other private-use tag (which should not fallback,
 // but avoid).
 if (aLanguageTag.getCountry().isEmpty()
-&& LanguageTag::isValidBcp47( aCanonicalized, 
nullptr,
+&& LanguageTag::isValidBcp47( 
aLanguageTag.getBcp47(), nullptr,
 LanguageTag::PrivateUse::DISALLOW))
 {
 LanguageTag aFallback( aLanguageTag);


core.git: Branch 'distro/collabora/co-24.04' - editeng/source

2024-01-15 Thread Pranam Lashkari (via logerrit)
 editeng/source/uno/unotext.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit a7ef4590e878f6c8014575c417479ab541f8a028
Author: Pranam Lashkari 
AuthorDate: Fri Dec 15 10:10:12 2023 +0530
Commit: Andras Timar 
CommitDate: Mon Jan 15 21:26:00 2024 +0100

Keep selection as after copying the text

This also aligns code with 'else' branch behaviour

problem:
in online when coping a slide with comment,
comment text was never copied in online,
it required document to reload to show it correctly

Change-Id: I6d444c10808ef23f282370b4b305c41eb5043b76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160812
Tested-by: Jenkins CollaboraOffice 
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit db7faa06762ac902ff56ecbab3fff763951146e1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160943
Tested-by: Jenkins

diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index f74d7f67c328..a10fd66fdf9a 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -2217,6 +2217,7 @@ void SvxUnoTextBase::copyText(
 {
 pTextForwarder->CopyText( *pSourceTextForwarder );
 pEditSource->UpdateData();
+SetSelection(pSource->GetSelection());
 }
 }
 else