[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2021-04-12 Thread Julien Nabet (via logerrit)
 vcl/source/bitmap/BitmapSepiaFilter.cxx|2 +-
 vcl/source/bitmap/BitmapSolarizeFilter.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 923db64220c69e819a58e0c256ac83bd3df1946a
Author: Julien Nabet 
AuthorDate: Sat Apr 10 19:09:41 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Apr 12 14:04:37 2021 +0200

Related tdf#117750: fix "Solarization" and "Aging"

For solarization, regression from:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=c38485279cd36da96ac81107d567ea4e779b2b96
author  Chris Sherlock  2018-04-20 20:27:41 
+1000
committer   Tomaž Vajngerl2018-04-22 05:33:11 
+0200
commit  c38485279cd36da96ac81107d567ea4e779b2b96 (patch)
treead9843a17f87271f9e0cf89643e2e6c3ee8a8de1
parent  bcbf767bcfc024e2be839e0c0886f942dd068e4f (diff)
vcl: ImplSolarize() to BitmapSolarizeFilter

For aging, regression from:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=1ab12471f3a69c4d502e6271e84ddf8a981f507f
author  Chris Sherlock  2018-04-20 20:32:23 
+1000
committer   Tomaž Vajngerl2018-04-22 05:33:39 
+0200
commit  1ab12471f3a69c4d502e6271e84ddf8a981f507f (patch)
tree6652276229ad1c3ffca48f7a31e1b77d2ea04b07
parent  c38485279cd36da96ac81107d567ea4e779b2b96 (diff)
vcl: ImplSepia -> BitmapSepiaFilter

Change-Id: I4f350aa8b494caf55c9c810ac7fa9ed8db349725
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113926
(cherry picked from commit f3151e62bcc7cb66313df70a2ec8eed8ca8f2c88)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113858
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit d41693f2eb48fce3d808f1719bbd60f2d2041203)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113868
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/bitmap/BitmapSepiaFilter.cxx 
b/vcl/source/bitmap/BitmapSepiaFilter.cxx
index 5123bf13075c..5d5408e246bd 100644
--- a/vcl/source/bitmap/BitmapSepiaFilter.cxx
+++ b/vcl/source/bitmap/BitmapSepiaFilter.cxx
@@ -103,7 +103,7 @@ BitmapEx BitmapSepiaFilter::execute(BitmapEx const& 
rBitmapEx) const
 }
 
 if (bRet)
-return rBitmapEx;
+return BitmapEx(aBitmap);
 
 return BitmapEx();
 }
diff --git a/vcl/source/bitmap/BitmapSolarizeFilter.cxx 
b/vcl/source/bitmap/BitmapSolarizeFilter.cxx
index bd7518b4cabf..5850fb8ad931 100644
--- a/vcl/source/bitmap/BitmapSolarizeFilter.cxx
+++ b/vcl/source/bitmap/BitmapSolarizeFilter.cxx
@@ -63,7 +63,7 @@ BitmapEx BitmapSolarizeFilter::execute(BitmapEx const& 
rBitmapEx) const
 }
 
 if (bRet)
-return rBitmapEx;
+return BitmapEx(aBitmap);
 
 return BitmapEx();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2021-04-12 Thread Julien Nabet (via logerrit)
 vcl/source/bitmap/BitmapSmoothenFilter.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cec82db4e6fbc0fd7ea1fa032461baaf327b0b16
Author: Julien Nabet 
AuthorDate: Sat Apr 10 19:30:23 2021 +0200
Commit: Xisco Fauli 
CommitDate: Mon Apr 12 14:04:21 2021 +0200

Related tdf#117750: fix UnsharpenFilter

Change-Id: I372bb6baae747adb3b2d2a2b8fd39d1631b074ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113927
(cherry picked from commit 3d32e6a6ccfae56f379cb1dec6dcadf9aa8fa85f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113859
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 8a75c591ef0cb017c58a7f068d1ae6571f87bd90)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113867
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/bitmap/BitmapSmoothenFilter.cxx 
b/vcl/source/bitmap/BitmapSmoothenFilter.cxx
index 67cea0cb3dfa..e9c135f8ec59 100644
--- a/vcl/source/bitmap/BitmapSmoothenFilter.cxx
+++ b/vcl/source/bitmap/BitmapSmoothenFilter.cxx
@@ -24,7 +24,7 @@ BitmapEx BitmapSmoothenFilter::execute(BitmapEx const& 
rBitmapEx) const
 bRet = BitmapFilter::Filter(aBitmapEx, 
BitmapSeparableUnsharpenFilter(mfRadius));
 
 if (bRet)
-return rBitmapEx;
+return aBitmapEx;
 
 return BitmapEx();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2021-03-22 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |   18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 2c3ec008b349b7fe046758c51152e451372ff89d
Author: Caolán McNamara 
AuthorDate: Mon Mar 22 15:46:53 2021 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Mar 22 22:08:08 2021 +0100

tdf#141166 widget with id "tabcontrol" might not be a TabControl

it might be a VerticalTabControl or any other type

Change-Id: I9f46f7e64a9be2487d400cc4a066575c0d45c19e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112802
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 758473e5b69c..7a779b297eac 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -6641,9 +6641,21 @@ std::unique_ptr 
SalInstanceBuilder::create_size_group()
 
 OString SalInstanceBuilder::get_current_page_help_id() const
 {
-TabControl* pCtrl = m_xBuilder->get("tabcontrol");
-TabPage* pTabPage = pCtrl ? pCtrl->GetTabPage(pCtrl->GetCurPageId()) : 
nullptr;
-vcl::Window* pTabChild = pTabPage ? 
pTabPage->GetWindow(GetWindowType::FirstChild) : nullptr;
+vcl::Window* pCtrl = m_xBuilder->get("tabcontrol");
+if (!pCtrl)
+return OString();
+VclPtr xTabPage;
+if (pCtrl->GetType() == WindowType::TABCONTROL)
+{
+TabControl* pTabCtrl = static_cast(pCtrl);
+xTabPage = pTabCtrl->GetTabPage(pTabCtrl->GetCurPageId());
+}
+else if (pCtrl->GetType() == WindowType::VERTICALTABCONTROL)
+{
+VerticalTabControl* pTabCtrl = static_cast(pCtrl);
+xTabPage = pTabCtrl->GetPage(pTabCtrl->GetCurPageId());
+}
+vcl::Window* pTabChild = xTabPage ? 
xTabPage->GetWindow(GetWindowType::FirstChild) : nullptr;
 pTabChild = pTabChild ? pTabChild->GetWindow(GetWindowType::FirstChild) : 
nullptr;
 if (pTabChild)
 return pTabChild->GetHelpId();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2021-03-15 Thread Julien Nabet (via logerrit)
 vcl/source/gdi/pdfwriter_impl.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 70c33addf14d7ee9db874c0d653fbd8f035ac96e
Author: Julien Nabet 
AuthorDate: Sun Feb 28 22:23:30 2021 +0100
Commit: Xisco Fauli 
CommitDate: Mon Mar 15 15:37:02 2021 +0100

tdf#127217: Fix buttons in forms not working in Adobe Reader

Regression from 76b5dca9dc0ff60f8f62cbecdee68f8f3b287ceb:
author  Thorsten Behrens   2019-04-09 02:19:14 
+0200
committer   Katarina Behrens   2019-07-03 
14:48:45 +0200
commit  76b5dca9dc0ff60f8f62cbecdee68f8f3b287ceb (patch)
treee778dad33073a228eb61ab62ce5f38e2a26d07ca
parent  1e8a9c19a6f7b82c9e0c481aee0c04c0780f4433 (diff)
tdf#113448 don't export any font for radio buttons

Don't let only color value in m_aDAString since it'll go here:
if( !rWidget.m_aDAString.isEmpty() )
{
if( !rWidget.m_aDRDict.isEmpty() )
{
aLine.append( "/DR<<" );
aLine.append( rWidget.m_aDRDict );
aLine.append( ">>\n" );
}
else
{
aLine.append( "/DR<>>>\n" );
}
aLine.append( "/DA" );
appendLiteralStringEncrypt( rWidget.m_aDAString, 
rWidget.m_nObject, aLine );
aLine.append( "\n" );
if( rWidget.m_nTextStyle & DrawTextFlags::Center )
aLine.append( "/Q 1\n" );
else if( rWidget.m_nTextStyle & DrawTextFlags::Right )
aLine.append( "/Q 2\n" );
}

But if we shouldn't have /DR at all since we don't want fonts for 
radiobutton, it also means
we don't want /DA too.
Indeed at the end of 12.7.3.3 
https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf:
The default appearance string (DA) contains any graphics state or text 
state operators needed to establish the
graphics state parameters, such as text size and colour, for displaying the 
field’s variable text. Only operators
that are allowed within text objects shall occur in this string (see Figure 
9). At a minimum, the string shall
include a Tf (text font) operator along with its two operands, font and 
size. The specified font value shall match
a resource name in the Font entry of the default resource dictionary 
(referenced from the DR entry of the
interactive form dictionary; see Table 218).

Change-Id: Ib350495d7fc5a7a4fba88d710614a0f67a0b1553
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111724
(cherry picked from commit a0d63ee5df921e5f1ac915ada783fdef0dbbb057)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112306
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 375a4fcba0d7..3836d348ab2c 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -3920,9 +3920,6 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( 
PDFWidget& rBox, const P
 
 pop();
 
-OStringBuffer aDA( 256 );
-appendNonStrokingColor( replaceColor( rWidget.TextColor, 
rSettings.GetRadioCheckTextColor() ), aDA );
-rBox.m_aDAString = aDA.makeStringAndClear();
 //to encrypt this (el)
 rBox.m_aMKDict = "/CA";
 //after this assignment, to m_aMKDic cannot be added anything
@@ -3935,6 +3932,7 @@ void PDFWriterImpl::createDefaultRadioButtonAppearance( 
PDFWidget& rBox, const P
 SvMemoryStream* pCheckStream = new SvMemoryStream( 256, 256 );
 
 beginRedirect( pCheckStream, aCheckRect );
+OStringBuffer aDA( 256 );
 aDA.append( "/Tx BMC\nq BT\n" );
 appendNonStrokingColor( replaceColor( rWidget.TextColor, 
rSettings.GetRadioCheckTextColor() ), aDA );
 aDA.append( ' ' );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2021-02-12 Thread Luboš Luňák (via logerrit)
 vcl/source/outdev/bitmap.cxx |   27 +++
 1 file changed, 3 insertions(+), 24 deletions(-)

New commits:
commit 27a4aea50a9efa5c839b0ae2de1f9f14a7782f11
Author: Luboš Luňák 
AuthorDate: Wed Feb 10 17:15:19 2021 +0100
Commit: Caolán McNamara 
CommitDate: Fri Feb 12 21:24:34 2021 +0100

always optimize bitmap transform to translate+scale if possible (tdf#138068)

Commit 828504974d70111e make OutputDevice::DrawTransformedBitmapEx()
always call DrawTransformBitmapExDirect() in preference to explicitly
converting to DrawBitmapEx() if the transformation wanted was at most
translate+scale, in the hopes that these days the backend implementations
work well enough. But it turns out only the Skia backend handles that
without loss of performance. So always do the conversion to DrawBitmapEx()
if possible. It's so simple that it possibly makes sense to always do
this, regardless of the backend.

Change-Id: I6eba68e672334c38433f53980f49400499f5d8e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110716
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
(cherry picked from commit 9d89d98d3349502b56da4bdd6ea287ac4cde9ce5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110781
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index dcb9a6b1d8d0..f8958a8f203a 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1241,28 +1241,6 @@ void OutputDevice::DrawTransformedBitmapEx(
 : nullptr);
 #endif
 
-// MM02 reorganize order: Prefer DrawTransformBitmapExDirect due
-// to this having evolved and is improved on quite some systems.
-// Check for exclusion parameters that may prevent using it
-static bool bAllowPreferDirectPaint(true);
-const bool bInvert(RasterOp::Invert == meRasterOp);
-const bool bBitmapChangedColor(mnDrawMode & (DrawModeFlags::BlackBitmap | 
DrawModeFlags::WhiteBitmap | DrawModeFlags::GrayBitmap ));
-const bool bTryDirectPaint(!bInvert && !bBitmapChangedColor && !bMetafile);
-
-if(bAllowPreferDirectPaint && bTryDirectPaint)
-{
-// tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough 
here, it may
-// be that mnOutOffX/mnOutOffY is used - see AOO bug 75163, mentioned 
at
-// ImplGetDeviceTransformation declaration
-const basegfx::B2DHomMatrix 
aFullTransform(ImplGetDeviceTransformation() * rTransformation);
-
-if(DrawTransformBitmapExDirect(aFullTransform, rBitmapEx))
-{
-// we are done
-return;
-}
-}
-
 // decompose matrix to check rotation and shear
 basegfx::B2DVector aScale, aTranslate;
 double fRotate, fShearX;
@@ -1297,8 +1275,9 @@ void OutputDevice::DrawTransformedBitmapEx(
 return;
 }
 
-// MM02 bAllowPreferDirectPaint may have been false to allow
-// to specify order of executions, so give bTryDirectPaint a call
+const bool bInvert(RasterOp::Invert == meRasterOp);
+const bool bBitmapChangedColor(mnDrawMode & (DrawModeFlags::BlackBitmap | 
DrawModeFlags::WhiteBitmap | DrawModeFlags::GrayBitmap ));
+const bool bTryDirectPaint(!bInvert && !bBitmapChangedColor && !bMetafile);
 if(bTryDirectPaint)
 {
 // tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough 
here, it may
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2021-01-27 Thread Gabor Kelemen (via logerrit)
 vcl/source/window/printdlg.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit c06c59ebdc32edfb22e391eeeb5b4838c6b728e6
Author: Gabor Kelemen 
AuthorDate: Tue Jan 19 19:24:53 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jan 27 20:46:52 2021 +0100

tdf#129180 Fix default paper size in the dropdown

Seems like a few calls to getJobPageSize() are necessary
before the Page size list can get a correct value.

This is why the problem appeared only on opening the dialog
but opening/closing the printers Properties dialog fixed it.

Thanks to Justin Luth for the idea!

Note: for testing, change among paper sizes supported by
the printer, e.g. A4, Legal and Letter.

See also tdf#134646

Change-Id: I792139e274886c1b232ef97a4f1e800e6b32cf71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109655
Tested-by: László Németh 
Reviewed-by: László Németh 
(cherry picked from commit 3c85bf2af5ae2f7b180db8f8abf2d4e997491bb9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109979
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit fdb2b760d9fd3b65ad54bad14a62f3c47374731e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109987

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 6d73b1449d6a..7640da4fcd22 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -622,9 +622,6 @@ PrintDialog::PrintDialog(weld::Window* i_pWindow, const 
std::shared_ptrset_size_request(
 mxScrolledWindow->get_preferred_size().Width() + 
mxScrolledWindow->get_vscroll_width(),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2021-01-27 Thread Jan-Marek Glogowski (via logerrit)
 vcl/source/app/svapp.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 7646c31d6c9f9c5dd0dfc7562df8ce10cac06f30
Author: Jan-Marek Glogowski 
AuthorDate: Tue Jan 26 22:18:16 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jan 27 15:14:52 2021 +0100

Fix crash in ProcessEventsToIdle debug code

... and that code formatting is from clang-format.

Change-Id: Ia73780f5f756a8c3493d27263347190289e4c953
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/10
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 0c7e8ef07fe9ba7ebc95fdeb5f58275decb4f0fc)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109976
Reviewed-by: Michael Stahl 
(cherry picked from commit 9e9abb0263851e691dfe5b245e1dc6df790cb467)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109980
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 720fb32d4eba..ca749a28091e 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -495,8 +495,10 @@ void Scheduler::ProcessEventsToIdle()
 Idle *pIdle = dynamic_cast(pSchedulerData->mpTask);
 if (pIdle && pIdle->IsActive())
 {
-SAL_WARN("vcl.schedule", "Unprocessed Idle: "
- << pIdle << " " << pIdle->GetDebugName());
+SAL_WARN("vcl.schedule",
+ "Unprocessed Idle: "
+ << pIdle << " "
+ << (pIdle->GetDebugName() ? 
pIdle->GetDebugName() : "(nullptr)"));
 }
 }
 pSchedulerData = pSchedulerData->mpNext;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2021-01-26 Thread Caolán McNamara (via logerrit)
 vcl/source/control/button.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8444076007090fc521be256b91d8d8d9180386f6
Author: Caolán McNamara 
AuthorDate: Wed Jan 20 14:26:25 2021 +
Commit: Michael Stahl 
CommitDate: Tue Jan 26 10:53:10 2021 +0100

RadioButton tick in a different place than CheckBox tick

since...

commit 302a00a3190743f5e6d2b61e5b40e493c4744b7e
Date:   Thu Jun 6 17:14:53 2019 +0900

tdf#124947 fix hit area of the radio buttons, size in ios theme

so under gen in tools, options, load/save, microsoft office the radio in
export as: shading is much higher than the create mso lock file
checkmark

Change-Id: Ib057c0725352f6a178df006e92024fedf9b82b79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109684
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index f84bbfb490bf..b84070e8487c 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1996,7 +1996,6 @@ void RadioButton::ImplDraw( OutputDevice* pDev, DrawFlags 
nDrawFlags,
 
 rMouseRect = tools::Rectangle(aPos, aSize);
 rMouseRect.SetLeft(rPos.X());
-rMouseRect.SetTop(rPos.Y());
 
 rStateRect.SetLeft( rPos.X() );
 rStateRect.SetTop( rMouseRect.Top() );
@@ -3011,8 +3010,9 @@ void CheckBox::ImplDraw( OutputDevice* pDev, DrawFlags 
nDrawFlags,
 
 ImplDrawAlignedImage( pDev, aPos, aSize, 1, nTextStyle );
 
-rMouseRect  = tools::Rectangle( aPos, aSize );
+rMouseRect = tools::Rectangle( aPos, aSize );
 rMouseRect.SetLeft( rPos.X() );
+
 rStateRect.SetLeft( rPos.X() );
 rStateRect.SetTop( rMouseRect.Top() );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2021-01-21 Thread Caolán McNamara (via logerrit)
 vcl/source/gdi/bitmap3.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 6d49ac8214b7d084d07469a6ce2414788f8ef9e0
Author: Caolán McNamara 
AuthorDate: Wed Jan 20 09:19:25 2021 +
Commit: Xisco Fauli 
CommitDate: Thu Jan 21 11:17:15 2021 +0100

rhbz#1918152 fix FTBFS

Change-Id: I5c03c810d3b2572b0e58c62293add49bd7025e70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109717
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index ec80b03c6008..8ea5c31bee3e 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
-
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2021-01-18 Thread Caolán McNamara (via logerrit)
 vcl/source/control/button.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 5dd164b100934e8414e2643b8d6d0b07c33a71b3
Author: Caolán McNamara 
AuthorDate: Sun Jan 17 20:20:54 2021 +
Commit: Xisco Fauli 
CommitDate: Mon Jan 18 10:52:19 2021 +0100

Related: rhbz#1889257 spurious debugging output

Change-Id: I5d8f5d5673a59c42c2da90e57aae98654b432da2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109482
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 3ad6fded02d7..f84bbfb490bf 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1537,7 +1537,6 @@ void PushButton::SetState( TriState eState )
 void PushButton::statusChanged(const css::frame::FeatureStateEvent& rEvent)
 {
 Button::statusChanged(rEvent);
-fprintf(stderr, "State is %d\n", rEvent.State.has());
 if (rEvent.State.has())
 SetPressed(rEvent.State.get());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2021-01-17 Thread Julien Nabet (via logerrit)
 vcl/source/gdi/pdfwriter_impl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e819872ebc1f7f005cea3916561dae03c43f8552
Author: Julien Nabet 
AuthorDate: Sat Jan 16 14:32:42 2021 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Jan 17 14:06:45 2021 +0100

tdf#139643: fix missing PDF/UA flag

Regression from:

https://cgit.freedesktop.org/libreoffice/core/commit/vcl/source/gdi/pdfwriter_impl.cxx?id=a795886762a6a4aabd601183598c4e6c819bcb1f
author  Arnaud Versini  2019-09-20 19:01:34 
+0200
committer   Arnaud Versini  2020-02-08 
15:03:07 +0100
commit  a795886762a6a4aabd601183598c4e6c819bcb1f (patch)
tree93a58d738bf27a0c5f75f80dc7e651763916ee5f 
/vcl/source/gdi/pdfwriter_impl.cxx
parent  a2f62a861ba7036e689070c47f72214b1bdd49d4 (diff)
Add minimum support for PDF/A3

here:
 sal_Int32 PDFWriterImpl::emitDocumentMetadata()
 {
-if (!m_bIsPDF_A1 && !m_bIsPDF_A2 && !m_bIsPDF_UA)
+if( !m_bIsPDF_A1 && !m_bIsPDF_A2 && !m_bIsPDF_A3 )

Change-Id: Id4b3b9a74ccf5a5abd9e7149cb09b3475dd4ffee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109400
Reviewed-by: Tomaž Vajngerl 
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Jenkins

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 7e02762d6e36..375a4fcba0d7 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -5135,7 +5135,7 @@ static void lcl_assignMeta(const OUString& aValue, 
OString& aMeta)
 // emits the document metadata
 sal_Int32 PDFWriterImpl::emitDocumentMetadata()
 {
-if( !m_bIsPDF_A1 && !m_bIsPDF_A2 && !m_bIsPDF_A3 )
+if( !m_bIsPDF_A1 && !m_bIsPDF_A2 && !m_bIsPDF_A3 && !m_bIsPDF_UA)
 return 0;
 
 //get the object number for all the destinations
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2021-01-07 Thread Caolán McNamara (via logerrit)
 vcl/source/gdi/jobset.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit f96bb2febcc2f9ee6d188bc072ce3f5f9fa87156
Author: Caolán McNamara 
AuthorDate: Wed Dec 30 21:19:15 2020 +
Commit: Michael Stahl 
CommitDate: Thu Jan 7 11:10:10 2021 +0100

ofz#29113 short read

Change-Id: I107d8abeac419ba4e70a5880054c9195c60464ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108351
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index a861169c9698..71d513aa459a 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -266,6 +266,13 @@ SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& 
rJobSetup )
 if ( nSystem == JOBSET_FILE364_SYSTEM ||
  nSystem == JOBSET_FILE605_SYSTEM )
 {
+if (nRead < sizeof(ImplOldJobSetupData) + 
sizeof(Impl364JobSetupData))
+{
+SAL_WARN("vcl", "Parsing error: " << 
sizeof(ImplOldJobSetupData) + sizeof(Impl364JobSetupData) <<
+ " required, but " << nRead << " available");
+return rIStream;
+}
+
 Impl364JobSetupData* pOldJobData= 
reinterpret_cast(pTempBuf.get() + sizeof( 
ImplOldJobSetupData ));
 sal_uInt16 nOldJobDataSize  = SVBT16ToUInt16( 
pOldJobData->nSize );
 rJobData.SetSystem( SVBT16ToUInt16( pOldJobData->nSystem ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-12-17 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/jpeg/JpegReader.cxx |4 ++--
 vcl/source/filter/jpeg/jpeg.h |2 +-
 vcl/source/filter/jpeg/jpegc.cxx  |3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 8b1efde9272adb2b7e4c438eba63193249216c9c
Author: Caolán McNamara 
AuthorDate: Tue Dec 15 17:35:32 2020 +
Commit: Xisco Fauli 
CommitDate: Thu Dec 17 14:10:32 2020 +0100

tdf#138950 allow up to one short read to not trigger cancelling import

Change-Id: Iedbfc344c311c40244ba2f58c56c62ac47584028
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107794
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/filter/jpeg/JpegReader.cxx 
b/vcl/source/filter/jpeg/JpegReader.cxx
index df7374770463..cbdac58aa3c6 100644
--- a/vcl/source/filter/jpeg/JpegReader.cxx
+++ b/vcl/source/filter/jpeg/JpegReader.cxx
@@ -47,7 +47,7 @@ static void init_source (j_decompress_ptr cinfo)
  * This is correct behavior for reading a series of images from one source.
  */
 source->start_of_file = TRUE;
-source->no_data_available = FALSE;
+source->no_data_available_failures = 0;
 }
 
 }
@@ -86,7 +86,7 @@ static boolean fill_input_buffer (j_decompress_ptr cinfo)
 
 if (!nbytes)
 {
-source->no_data_available = TRUE;
+source->no_data_available_failures++;
 if (source->start_of_file) /* Treat empty input file as fatal 
error */
 {
 ERREXIT(cinfo, JERR_INPUT_EMPTY);
diff --git a/vcl/source/filter/jpeg/jpeg.h b/vcl/source/filter/jpeg/jpeg.h
index 2f951e065934..79ec824ada22 100644
--- a/vcl/source/filter/jpeg/jpeg.h
+++ b/vcl/source/filter/jpeg/jpeg.h
@@ -59,7 +59,7 @@ struct SourceManagerStruct {
 SvStream*   stream; /* source stream */
 JOCTET* buffer; /* start of buffer */
 boolean start_of_file;  /* have we gotten any data yet? */
-boolean no_data_available;
+int no_data_available_failures;
 };
 
 #endif
diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index c1fbb535a8e4..3f6a362f826c 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -267,7 +267,8 @@ static void ReadJPEG(JpegStuff& rContext, JPEGReader* 
pJPEGReader, void* pInputS
 rContext.pCYMKBuffer.resize(nWidth * 4);
 }
 
-for (*pLines = 0; *pLines < nHeight && !source->no_data_available; 
(*pLines)++)
+// tdf#138950 allow up to one short read 
(no_data_available_failures <= 1) to not trigger cancelling import
+for (*pLines = 0; *pLines < nHeight && 
source->no_data_available_failures <= 1; (*pLines)++)
 {
 size_t yIndex = *pLines;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-12-11 Thread Caolán McNamara (via logerrit)
 vcl/source/window/menu.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit c918fad2cbc01e42394ac6ede21366a47532ecc2
Author: Caolán McNamara 
AuthorDate: Fri Dec 11 11:26:19 2020 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Dec 11 17:28:36 2020 +0100

tdf#76644 extended tips not shown for 'gen' menu items

since...

commit d7fe5ab30ca9df722eec33d428baedd258075eac
Date:   Thu Aug 1 11:23:58 2013 +0200

convert vcl/menu.hxx from XubString to OUString (second attempt)

probably currently only useful with HELP_DEBUG=1

Change-Id: I66e94e57e117d4e1d83f132a82377b28d3674d86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107548
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index bcfbdbb37773..f48e1c3f0fbc 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1086,7 +1086,10 @@ OUString Menu::ImplGetHelpText( sal_uInt16 nItemId ) 
const
 {
 MenuItemData* pData = pItemList->GetData( nItemId );
 
-if ( pData && pData->aHelpText.isEmpty() &&
+if (!pData)
+return OUString();
+
+if ( pData->aHelpText.isEmpty() &&
  (( !pData->aHelpId.isEmpty()  ) || ( !pData->aCommandStr.isEmpty() )))
 {
 Help* pHelp = Application::GetHelp();
@@ -1099,7 +1102,7 @@ OUString Menu::ImplGetHelpText( sal_uInt16 nItemId ) const
 }
 }
 
-return OUString();
+return pData->aHelpText;
 }
 
 OUString Menu::GetHelpText( sal_uInt16 nItemId ) const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-11-25 Thread Caolán McNamara (via logerrit)
 vcl/source/control/ivctrl.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 21a0d9db670364e841e06692d3863e4e217f70a0
Author: Caolán McNamara 
AuthorDate: Thu Nov 12 14:46:03 2020 +
Commit: Miklos Vajna 
CommitDate: Wed Nov 25 09:35:53 2020 +0100

tdf#131970 enable tab-cycling between VerticalTabControl members

Related: tdf#131970 icon-switcher should be in single-selection mode

Change-Id: I7d009c2345cc7b3a3c692bb8734d9939ce465db2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105764
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx
index 82e2bbc0c08b..b995ddfded5c 100644
--- a/vcl/source/control/ivctrl.cxx
+++ b/vcl/source/control/ivctrl.cxx
@@ -447,7 +447,9 @@ VerticalTabControl::VerticalTabControl(vcl::Window* pParent)
  WB_ALIGN_LEFT | 
WB_NOHSCROLL))
 , m_xBox(VclPtr::Create(this))
 {
+SetStyle(GetStyle() | WB_DIALOGCONTROL);
 SetType(WindowType::VERTICALTABCONTROL);
+m_xChooser->SetSelectionMode(SelectionMode::Single);
 m_xChooser->SetClickHdl(LINK(this, VerticalTabControl, ChosePageHdl_Impl));
 m_xChooser->set_width_request(110);
 m_xChooser->set_height_request(400);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-11-19 Thread Bartosz Kosiorek (via logerrit)
 vcl/source/gdi/bitmapex.cxx  |1 +
 vcl/source/graphic/UnoGraphicTransformer.cxx |3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 560f8935c3b9d854128d414753f871fa38c6da2a
Author: Bartosz Kosiorek 
AuthorDate: Tue Nov 3 16:48:08 2020 +0100
Commit: Xisco Fauli 
CommitDate: Thu Nov 19 12:41:06 2020 +0100

tdf#113163 OOXML Fix transparency and alpha channel support

In OOXML specification there is a:clrChange tag,
which change color from image, to another colour and transparency:

https://docs.microsoft.com/en-us/openspecs/office_standards/ms-oi29500/5860f816-13d3-4a83-9e63-bcd1e0808404
Unfortunately It was not working correctly.

This patch is resolving that issue

Change-Id: I85e3790f86382dca2c4798346021f480e50db6e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105258
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek 
(cherry picked from commit 4a288c136c66b4dfbb75764602520d48c39fee81)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105990
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index 80c6879af00c..f7e80fd72a4b 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -1558,6 +1558,7 @@ void BitmapEx::setAlphaFrom( sal_uInt8 cIndexFrom, 
sal_Int8 nAlphaTo )
 }
 }
 }
+*this = BitmapEx( GetBitmap(), aAlphaMask );
 }
 
 void BitmapEx::AdjustTransparency(sal_uInt8 cTrans)
diff --git a/vcl/source/graphic/UnoGraphicTransformer.cxx 
b/vcl/source/graphic/UnoGraphicTransformer.cxx
index 2a7f6eef5a42..100e37b29a92 100644
--- a/vcl/source/graphic/UnoGraphicTransformer.cxx
+++ b/vcl/source/graphic/UnoGraphicTransformer.cxx
@@ -54,6 +54,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL 
GraphicTransformer::colorChange(
 
 const sal_uInt8 cIndexFrom = aBmpColorFrom.GetIndex();
 
+//TODO This code convert GdiMetafile(vector graphic) to Bitmap, which 
cause to information lost
 if (aGraphic.GetType() == GraphicType::Bitmap ||
 aGraphic.GetType() == GraphicType::GdiMetafile)
 {
@@ -62,7 +63,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL 
GraphicTransformer::colorChange(
 
 if (aBitmapEx.IsAlpha())
 {
-aBitmapEx.setAlphaFrom( cIndexFrom, nAlphaTo );
+aBitmapEx.setAlphaFrom( cIndexFrom, 0xff - nAlphaTo );
 aBitmapEx.Replace(aColorFrom, aColorTo, nTolerance);
 aReturnGraphic = ::Graphic(aBitmapEx);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-11-17 Thread Caolán McNamara (via logerrit)
 vcl/source/window/printdlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 19d81a0923f0ffb106ae59aaf54659451fe271cc
Author: Caolán McNamara 
AuthorDate: Mon Nov 16 10:31:14 2020 +
Commit: Xisco Fauli 
CommitDate: Tue Nov 17 17:11:42 2020 +0100

tdf#137898 Page count is not reset to 1 in the print preview dialog

Change-Id: Ib7c8695fd3e7156b86f4b4603fbaa5e2319cdc1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105861
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index d0f3c67a6c7f..6d73b1449d6a 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -937,7 +937,7 @@ void PrintDialog::preparePreview( bool i_bMayUseCache )
 mnCurPage = nPages-1;
 if( mnCurPage < 0 )
 mnCurPage = 0;
-
+mxPageEdit->set_text(OUString::number(mnCurPage + 1));
 
 const MapMode aMapMode( MapUnit::Map100thMM );
 if( nPages > 0 )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-11-16 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |   15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 14f7f17d63cc15896b3b502a349640c15c90d08f
Author: Caolán McNamara 
AuthorDate: Mon Nov 9 16:05:43 2020 +
Commit: Miklos Vajna 
CommitDate: Mon Nov 16 09:49:40 2020 +0100

tdf#136962 only do implicit SetUpdateMode optimization if the widget is 
hidden

callers can always opt-in with freeze/thaw for the lesser optimization
available if shown

Change-Id: Ib9317451a3059cc33f70d0c23543d8024bd21ede
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105487
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105515
Reviewed-by: Miklos Vajna 

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index acd296cf3223..d7c93164a676 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3184,7 +3184,9 @@ static SalInstanceTreeView* g_DragSource;
 
 namespace
 {
-class UpdateGuard
+// tdf#131581 if the TreeView is hidden then there are possibly additional
+// optimizations available
+class UpdateGuardIfHidden
 {
 private:
 SvTabListBox& m_rTreeView;
@@ -3192,10 +3194,11 @@ namespace
 bool m_bOrigEnableInvalidate;
 
 public:
-UpdateGuard(SvTabListBox& rTreeView)
+UpdateGuardIfHidden(SvTabListBox& rTreeView)
 : m_rTreeView(rTreeView)
-, m_bOrigUpdate(m_rTreeView.IsUpdateMode())
-// tdf#137432 only do the EnableInvalidate(false) optimization if 
the widget is currently hidden
+// tdf#136962 only do SetUpdateMode(false) optimization if the 
widget is currently hidden
+, m_bOrigUpdate(!m_rTreeView.IsVisible() && 
m_rTreeView.IsUpdateMode())
+// tdf#137432 only do EnableInvalidate(false) optimization if the 
widget is currently hidden
 , m_bOrigEnableInvalidate(!m_rTreeView.IsVisible() && 
m_rTreeView.GetModel()->IsEnableInvalidate())
 {
 if (m_bOrigUpdate)
@@ -3204,7 +3207,7 @@ namespace
 m_rTreeView.GetModel()->EnableInvalidate(false);
 }
 
-~UpdateGuard()
+~UpdateGuardIfHidden()
 {
 if (m_bOrigEnableInvalidate)
 m_rTreeView.GetModel()->EnableInvalidate(true);
@@ -4342,7 +4345,7 @@ public:
 
 virtual void all_foreach(const std::function& func) 
override
 {
-UpdateGuard aGuard(*m_xTreeView);
+UpdateGuardIfHidden aGuard(*m_xTreeView);
 
 SalInstanceTreeIter aVclIter(m_xTreeView->First());
 while (aVclIter.iter)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-10-30 Thread Caolán McNamara (via logerrit)
 vcl/source/bitmap/BitmapTools.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3b92dc64024a6bd4c750dfdc460e9bacf0408b00
Author: Caolán McNamara 
AuthorDate: Wed Oct 28 20:22:59 2020 +
Commit: Michael Stahl 
CommitDate: Fri Oct 30 13:33:00 2020 +0100

ofz#26708: Direct-leak

since...

commit cd8dd48bf89d800c012afb04b16281ed8b261de9
Date:   Tue Aug 21 16:07:55 2018 +0200

tdf#119282 Area tab, Pattern color change

Change-Id: If0c988f7532786a4089edef39929f924d8e2ec2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104953
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/source/bitmap/BitmapTools.cxx 
b/vcl/source/bitmap/BitmapTools.cxx
index f0c5c522b7de..3f02260478d0 100644
--- a/vcl/source/bitmap/BitmapTools.cxx
+++ b/vcl/source/bitmap/BitmapTools.cxx
@@ -987,7 +987,7 @@ void CanvasCairoExtractBitmapData( BitmapEx const & aBmpEx, 
Bitmap & aBitmap, un
 aPalette[1] = BitmapColor(aColorPix);
 
 Bitmap aBitmap(Size(8, 8), 1, );
-BitmapWriteAccess* pContent(aBitmap.AcquireWriteAccess());
+BitmapScopedWriteAccess pContent(aBitmap);
 
 for(sal_uInt16 a(0); a < 8; a++)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source xmlsecurity/source

2020-10-29 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/ipdf/pdfread.cxx   |2 +-
 xmlsecurity/source/pdfio/pdfdocument.cxx |   11 +++
 2 files changed, 8 insertions(+), 5 deletions(-)

New commits:
commit b9e5d5347e5dece693fe56b88570abc07a30a8ba
Author: Caolán McNamara 
AuthorDate: Thu Oct 29 15:45:01 2020 +
Commit: Noel Grandin 
CommitDate: Thu Oct 29 20:01:04 2020 +0100

fix --disable-pdfium build

Change-Id: I580972220bc39abe16288fa62c717e4ab25833d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105015
Tested-by: Jenkins
Tested-by: René Engelhard 
Reviewed-by: René Engelhard 
Reviewed-by: Noel Grandin 

diff --git a/vcl/source/filter/ipdf/pdfread.cxx 
b/vcl/source/filter/ipdf/pdfread.cxx
index 3066c4deba4a..bf11578089e0 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -218,7 +218,7 @@ size_t RenderPDFBitmaps(const void* pBuffer, int nSize, 
std::vector& rBi
 (void)rBitmaps;
 (void)nFirstPage;
 (void)nPages;
-(void)fResolutionDPI;
+(void)pSizeHint;
 return 0;
 #endif // HAVE_FEATURE_PDFIUM
 }
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx 
b/xmlsecurity/source/pdfio/pdfdocument.cxx
index c132d02cc2b0..b229206391f2 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -138,10 +138,10 @@ bool IsCompleteSignature(SvStream& rStream, 
vcl::filter::PDFDocument& rDocument,
 return std::find(rAllEOFs.begin(), rAllEOFs.end(), nFileEnd) != 
rAllEOFs.end();
 }
 
+#if HAVE_FEATURE_PDFIUM
 /// Collects the checksum of each page of one version of the PDF.
 void AnalyizeSignatureStream(SvMemoryStream& rStream, 
std::vector& rPageChecksums)
 {
-#if HAVE_FEATURE_PDFIUM
 auto pPdfium = vcl::pdf::PDFiumLibrary::get();
 vcl::pdf::PDFiumDocument aPdfDocument(
 FPDF_LoadMemDocument(rStream.GetData(), rStream.GetSize(), 
/*password=*/nullptr));
@@ -158,10 +158,8 @@ void AnalyizeSignatureStream(SvMemoryStream& rStream, 
std::vectorgetChecksum();
 rPageChecksums.push_back(nPageChecksum);
 }
-#else
-(void)rStream;
-#endif
 }
+#endif
 
 /**
  * Checks if incremental updates after singing performed valid modifications 
only.
@@ -175,6 +173,7 @@ bool IsValidSignature(SvStream& rStream, 
vcl::filter::PDFObjectElement* pSignatu
 return false;
 }
 
+#if HAVE_FEATURE_PDFIUM
 SvMemoryStream aSignatureStream;
 sal_uInt64 nPos = rStream.Tell();
 rStream.Seek(0);
@@ -196,6 +195,10 @@ bool IsValidSignature(SvStream& rStream, 
vcl::filter::PDFObjectElement* pSignatu
 // Fail if any page looks different after signing and at the end. 
Annotations/commenting doesn't
 // count, though.
 return aSignedPages == aAllPages;
+#else
+(void)rStream;
+return true;
+#endif
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-10-22 Thread Jan-Marek Glogowski (via logerrit)
 vcl/source/control/button.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit c425987e15519a9187fd482502f908b54c8416cb
Author: Jan-Marek Glogowski 
AuthorDate: Wed Oct 21 01:08:01 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Oct 22 21:54:39 2020 +0200

tdf#137660 send some focus event for push buttons

With KDE breeze we don't get any focus indicator for the keyboard
navigation in the start center, with either the kf5 or the gtk3
plugin using breeze. gtk3 with adwaita works fine, because it can
handle the ControlPart::Focus of the push button.

This behaviour was introduced in #i110915#. In the gen plugin
you get a small focus rect inside the button, but kf5 and gtk3
set mbNoFocusRectsForFlatButtons, which was introduced by commit
f485b2881794244409d71ead39715373e734ed04, so there isn't any
indicator left for kf5 for the keyboard focus.

So this sends focus updates for the flat buttons, if the focus
rects are disabled and ControlPart::Focus is not supported, so
kf5 can render a focus indicator.

Change-Id: I1b587a7f9ec55b44369c4c8bc21039fe90aab9ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104582
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 3f7515258e91266f10e5c7bafee2d3d6fa9c91c2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104668
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 048ff2181c25..3ad6fded02d7 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1021,7 +1021,9 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& 
rRenderContext)
 Size aInRectSize(rRenderContext.LogicToPixel(Size(aInRect.GetWidth(), 
aInRect.GetHeight(;
 aControlValue.mbSingleLine = (aInRectSize.Height() < 2 * 
aFontSize.Height());
 
-if ((nState & ControlState::ROLLOVER) || !(GetStyle() & WB_FLATBUTTON))
+if ((nState & ControlState::ROLLOVER) || !(GetStyle() & WB_FLATBUTTON)
+|| (HasFocus() && mpWindowImpl->mbUseNativeFocus
+&& !IsNativeControlSupported(ControlType::Pushbutton, 
ControlPart::Focus)))
 {
 bNativeOK = 
rRenderContext.DrawNativeControl(ControlType::Pushbutton, ControlPart::Entire, 
aCtrlRegion, nState,
  aControlValue, 
OUString() /*PushButton::GetText()*/);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-10-05 Thread Caolán McNamara (via logerrit)
 vcl/source/font/fontcharmap.cxx |   16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 9a6e63efc564372594cd70444e81e411df14c9df
Author: Caolán McNamara 
AuthorDate: Sat Oct 3 21:56:19 2020 +0100
Commit: Michael Stahl 
CommitDate: Mon Oct 5 15:31:56 2020 +0200

ofz#26122 allow NINSIZE input full elements

Change-Id: Ifbde8fc055a91e23db08508a34ce4664d2f1f96f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103802
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx
index c29fd3cdbd22..af85334514aa 100644
--- a/vcl/source/font/fontcharmap.cxx
+++ b/vcl/source/font/fontcharmap.cxx
@@ -332,7 +332,8 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 
 static const int NINSIZE = 64;
 static const int NOUTSIZE = 64;
-charcCharsInp[ NINSIZE ];
+std::vector cCharsInp;
+cCharsInp.reserve(NINSIZE);
 sal_Unicode cCharsOut[ NOUTSIZE ];
 sal_UCS4* pCP = pCodePairs;
 for( int i = 0; i < nRangeCount; ++i )
@@ -343,25 +344,26 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 // input codepoints in 0..SAL_MAX_UINT16 range
 while (cMin < cEnd && cMin <= SAL_MAX_UINT16)
 {
-int j = 0;
-for(; (cMin < cEnd) && (j < NINSIZE); ++cMin )
+for (int j = 0; (cMin < cEnd) && (j < NINSIZE); ++cMin, ++j)
 {
 if( cMin >= 0x0100 )
-cCharsInp[ j++ ] = static_cast(cMin >> 8);
+cCharsInp.push_back(static_cast(cMin >> 8));
 if( (cMin >= 0x0100) || (cMin < 0x00A0)  )
-cCharsInp[ j++ ] = static_cast(cMin);
+cCharsInp.push_back(static_cast(cMin));
 }
 
 sal_uInt32 nCvtInfo;
 sal_Size nSrcCvtBytes;
 int nOutLen = rtl_convertTextToUnicode(
 aConverter, aCvtContext,
-cCharsInp, j, cCharsOut, NOUTSIZE,
+cCharsInp.data(), cCharsInp.size(), cCharsOut, NOUTSIZE,
 RTL_TEXTTOUNICODE_FLAGS_INVALID_IGNORE
 | RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_IGNORE,
 ,  );
 
-for( j = 0; j < nOutLen; ++j )
+cCharsInp.clear();
+
+for (int j = 0; j < nOutLen; ++j)
 aSupportedCodePoints.insert( cCharsOut[j] );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-10-01 Thread Caolán McNamara (via logerrit)
 vcl/source/font/fontcharmap.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ebafb8740b999dc3f508a93526d4f6ef5c3d3446
Author: Caolán McNamara 
AuthorDate: Tue Sep 29 20:59:40 2020 +0100
Commit: Xisco Fauli 
CommitDate: Thu Oct 1 10:33:26 2020 +0200

ofz#25989 cmap parsing

Change-Id: I048e5d88d5926a4afa75afab18db5ca6354e2454
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103656
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx
index 229f4f36789f..c29fd3cdbd22 100644
--- a/vcl/source/font/fontcharmap.cxx
+++ b/vcl/source/font/fontcharmap.cxx
@@ -228,7 +228,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 // update the glyphid-array with the glyphs in this range
 pStartGlyphs[i] = -static_cast(aGlyphIdArray.size());
 const unsigned char* pGlyphIdPtr = pOffsetBase + 2*i + 
nRangeOffset;
-const size_t nRemainingSize = pEndValidArea - pGlyphIdPtr;
+const size_t nRemainingSize = pEndValidArea >= pGlyphIdPtr ? 
pEndValidArea - pGlyphIdPtr : 0;
 const size_t nMaxPossibleRecords = nRemainingSize/2;
 if (nMaxPossibleRecords == 0) {  // no sane font should 
trigger this
 SAL_WARN("vcl.gdi", "More indexes claimed that space 
available in font!");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-09-24 Thread Caolán McNamara (via logerrit)
 vcl/source/font/fontcharmap.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 2cb39ffeec2ff79cecea55ee807328f40bafc5b2
Author: Caolán McNamara 
AuthorDate: Wed Sep 23 10:56:00 2020 +0100
Commit: Noel Grandin 
CommitDate: Thu Sep 24 08:31:02 2020 +0200

ofz#25868 Timeout, encoding conversion only sane in 0..SAL_MAX_UINT16 range

so ignore points outside that range to avoid ludicrous ranges that aren't
possible in the input encoding

Change-Id: Ifb7b9b389d4a31b8820a7da661249223fe1e110c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103191
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx
index fcf0c2c64f52..229f4f36789f 100644
--- a/vcl/source/font/fontcharmap.cxx
+++ b/vcl/source/font/fontcharmap.cxx
@@ -339,7 +339,9 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 {
 sal_UCS4 cMin = *(pCP++);
 sal_UCS4 cEnd = *(pCP++);
-while( cMin < cEnd )
+// ofz#25868 the conversion only makes sense with
+// input codepoints in 0..SAL_MAX_UINT16 range
+while (cMin < cEnd && cMin <= SAL_MAX_UINT16)
 {
 int j = 0;
 for(; (cMin < cEnd) && (j < NINSIZE); ++cMin )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-09-23 Thread Caolán McNamara (via logerrit)
 vcl/source/font/fontcharmap.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 40136386078ae0aac76806719899eb489cde28db
Author: Caolán McNamara 
AuthorDate: Tue Sep 22 16:43:01 2020 +0100
Commit: Michael Stahl 
CommitDate: Wed Sep 23 11:12:06 2020 +0200

ofz#25855 overflow in nTmpOffset

we already know nLength is >= 24 so just move the calc to the other term

Change-Id: Ic52f1686ccf81e6b13d7eb7e74dbd9cb51c8ea01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103186
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx
index 027df3ce6df1..fcf0c2c64f52 100644
--- a/vcl/source/font/fontcharmap.cxx
+++ b/vcl/source/font/fontcharmap.cxx
@@ -151,7 +151,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 
 int nTmpOffset = GetUInt( p+4 );
 
-if (nTmpOffset + 2 > nLength || nTmpOffset < 0)
+if (nTmpOffset > nLength - 2 || nTmpOffset < 0)
 continue;
 
 int nTmpFormat = GetUShort( pCmap + nTmpOffset );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-09-21 Thread Jan-Marek Glogowski (via logerrit)
 vcl/source/font/fontcharmap.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 229aca48befa4bdb52041ce6d0dca16a87b778e4
Author: Jan-Marek Glogowski 
AuthorDate: Sat Sep 19 11:53:27 2020 +0200
Commit: Caolán McNamara 
CommitDate: Mon Sep 21 12:59:45 2020 +0200

Fix crash from broken font CMAP subtable

ParseCMAP crashes on a broken CMAP subtable of a font used by the
bugdoc of tdf#119074, which returns a negative offset (technically
it's large positive offset turning into a wrong negative integer,
which is still out of bounds of the CMAP overall size - you get
the point). This simply ignores that broken subtable, checking for
other existing ones.

Regressed-by: c7482bc2904401e7d975b5721ec861b8589253f9
Change-Id: I95820fe3bb6bd2fe2e0cf9d4c3536abce31fd497
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103033
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 9bf4c5ac49b73cc2a8c89a87ff87238c061a579d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103046
Reviewed-by: Jan-Marek Glogowski 

diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx
index 5e83e19cefb1..027df3ce6df1 100644
--- a/vcl/source/font/fontcharmap.cxx
+++ b/vcl/source/font/fontcharmap.cxx
@@ -151,7 +151,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 
 int nTmpOffset = GetUInt( p+4 );
 
-if (nTmpOffset + 2 > nLength)
+if (nTmpOffset + 2 > nLength || nTmpOffset < 0)
 continue;
 
 int nTmpFormat = GetUShort( pCmap + nTmpOffset );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-09-21 Thread Caolán McNamara (via logerrit)
 vcl/source/font/fontcharmap.cxx |   17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)

New commits:
commit fb733dea0c172c8a692cf66f66c5457591be314a
Author: Caolán McNamara 
AuthorDate: Fri Sep 18 19:33:15 2020 +0100
Commit: Michael Stahl 
CommitDate: Mon Sep 21 12:12:28 2020 +0200

ofz#25774 keep ParseCMAP within legal area

Change-Id: Ic68fadd3d63631cbccda76e7679d95bb89452d25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102944
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx
index 9ba392935c60..5e83e19cefb1 100644
--- a/vcl/source/font/fontcharmap.cxx
+++ b/vcl/source/font/fontcharmap.cxx
@@ -189,12 +189,23 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 nRangeCount = 0;
 }
 
-pCodePairs = new sal_UCS4[ nRangeCount * 2 ];
-pStartGlyphs = new int[ nRangeCount ];
 const unsigned char* pLimitBase = pCmap + nOffset + 14;
 const unsigned char* pBeginBase = pLimitBase + nSegCountX2 + 2;
 const unsigned char* pDeltaBase = pBeginBase + nSegCountX2;
 const unsigned char* pOffsetBase = pDeltaBase + nSegCountX2;
+
+const int nOffsetBaseStart = pOffsetBase - pCmap;
+const int nRemainingLen = nLength - nOffsetBaseStart;
+const int nMaxPossibleRangeOffsets = nRemainingLen / 2;
+if (nRangeCount > nMaxPossibleRangeOffsets)
+{
+SAL_WARN("vcl.gdi", "more range offsets requested then space 
available");
+nRangeCount = std::max(0, nMaxPossibleRangeOffsets);
+}
+
+pCodePairs = new sal_UCS4[ nRangeCount * 2 ];
+pStartGlyphs = new int[ nRangeCount ];
+
 sal_UCS4* pCP = pCodePairs;
 for( int i = 0; i < nRangeCount; ++i )
 {
@@ -254,7 +265,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 if (nRangeCount > nMaxPossiblePairs)
 {
 SAL_WARN("vcl.gdi", "more code pairs requested then space 
available");
-nRangeCount = nMaxPossiblePairs;
+nRangeCount = std::max(0, nMaxPossiblePairs);
 }
 
 pCodePairs = new sal_UCS4[ nRangeCount * 2 ];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-09-16 Thread Caolán McNamara (via logerrit)
 vcl/source/font/fontcharmap.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 62680e9bec0a9a32659e9146e12e13d5fcafc0b4
Author: Caolán McNamara 
AuthorDate: Wed Sep 16 10:16:49 2020 +0100
Commit: Xisco Fauli 
CommitDate: Wed Sep 16 14:02:02 2020 +0200

ofz#25696 OOM

Change-Id: Ia69e9ce1ca0156e960dddb7e0bf98dfd2be2d7cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102759
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx
index f8c95e796b20..7225f385ad56 100644
--- a/vcl/source/font/fontcharmap.cxx
+++ b/vcl/source/font/fontcharmap.cxx
@@ -179,6 +179,12 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 {
 int nSegCountX2 = GetUShort( pCmap + nOffset + 6 );
 nRangeCount = nSegCountX2/2 - 1;
+if (nRangeCount < 0)
+{
+SAL_WARN("vcl.gdi", "negative RangeCount");
+nRangeCount = 0;
+}
+
 pCodePairs = new sal_UCS4[ nRangeCount * 2 ];
 pStartGlyphs = new int[ nRangeCount ];
 const unsigned char* pLimitBase = pCmap + nOffset + 14;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-09-16 Thread Caolán McNamara (via logerrit)
 vcl/source/font/fontcharmap.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 33d63c77c12b949dca9121dd684978d12ae501c1
Author: Caolán McNamara 
AuthorDate: Tue Sep 15 16:36:17 2020 +0100
Commit: Xisco Fauli 
CommitDate: Wed Sep 16 14:02:57 2020 +0200

ofz#25684 keep ParseCMAP within legal area

Change-Id: Iee18b5a9390b79efa67414ea2d229d2816c84e18
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102756
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx
index 7225f385ad56..9ba392935c60 100644
--- a/vcl/source/font/fontcharmap.cxx
+++ b/vcl/source/font/fontcharmap.cxx
@@ -150,6 +150,10 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 continue;
 
 int nTmpOffset = GetUInt( p+4 );
+
+if (nTmpOffset + 2 > nLength)
+continue;
+
 int nTmpFormat = GetUShort( pCmap + nTmpOffset );
 if( nTmpFormat == 12 )  // 32bit code -> glyph map 
format
 nValue += 3;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-09-15 Thread Caolán McNamara (via logerrit)
 vcl/source/app/vclevent.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8abebbba4b3597190d1023cb93c17983d9cb5c99
Author: Caolán McNamara 
AuthorDate: Fri Sep 11 11:36:40 2020 +0100
Commit: Miklos Vajna 
CommitDate: Tue Sep 15 09:55:43 2020 +0200

application level settings-changed event callbacks not triggering

this was originally...

ImplDelData aDel( pWinEvent->GetWindow() );
while ( aIter != aEnd && !aDel.IsDead() )

before

commit 1db7af8bc9febdf72138fac533ec81d6983da729
Date:   Tue Jan 26 22:10:52 2016 +0530

tdf#96888 - Kill internal vcl dog-tags ...

back then if GetWindow was null ImplDelData.IsDead() was
always false

Change-Id: I1e75c27635532afa08ed43bf92bda35b34ae6320
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102423
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx
index b99a56a4fc0c..3dfad4a4ca78 100644
--- a/vcl/source/app/vclevent.cxx
+++ b/vcl/source/app/vclevent.cxx
@@ -50,7 +50,7 @@ void VclEventListeners::Call( VclSimpleEvent& rEvent ) const
 if (VclWindowEvent* pWindowEvent = dynamic_cast())
 {
 VclPtr xWin(pWindowEvent->GetWindow());
-while ( aIter != aEnd && xWin && ! xWin->IsDisposed() )
+while ( aIter != aEnd && (!xWin || !xWin->IsDisposed()) )
 {
 Link  = *aIter;
 // check this hasn't been removed in some re-enterancy scenario 
fdo#47368
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-09-13 Thread Noel Grandin (via logerrit)
 vcl/source/filter/jpeg/JpegWriter.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit b8766a1555fe644fb7dabdfa943e84f6704c9cee
Author: Noel Grandin 
AuthorDate: Sun Sep 13 13:56:49 2020 +0200
Commit: Noel Grandin 
CommitDate: Sun Sep 13 20:44:25 2020 +0200

tdf#132561 fix png export from Draw

fixes a regression from
commit 61e8387fa8ab55a04b95839c7c385c163d6de1cd
tdf#128992 Compressing PNG files with alpha channel get a black 
background

Change-Id: I8a225f76072c49f64393bb4b28c4d92c6e85587e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102548
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit b732e63a0a4b4dcf74995adf7b679d12ecc09db5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102567

diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx 
b/vcl/source/filter/jpeg/JpegWriter.cxx
index bc41530047ed..da0774667545 100644
--- a/vcl/source/filter/jpeg/JpegWriter.cxx
+++ b/vcl/source/filter/jpeg/JpegWriter.cxx
@@ -197,7 +197,14 @@ bool JPEGWriter::Write( const Graphic& rGraphic )
 mxStatusIndicator->start( OUString(), 100 );
 }
 
-Bitmap aGraphicBmp( rGraphic.GetBitmapEx().GetBitmap(COL_WHITE) );
+// This slightly weird logic is here to match the behaviour in 
ImpGraphic::ImplGetBitmap
+// and is necessary to match pre-existing behaviour. We should probably 
pass down the expected
+// background color for alpha from the higher layers.
+Bitmap aGraphicBmp;
+if (rGraphic.GetType() == GraphicType::Bitmap)
+aGraphicBmp = rGraphic.GetBitmapEx().GetBitmap(COL_WHITE);
+else
+aGraphicBmp = rGraphic.GetBitmapEx().GetBitmap();
 
 if ( mbGreys )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-09-09 Thread Juergen Funk (via logerrit)
 vcl/source/window/printdlg.cxx |   24 +---
 1 file changed, 17 insertions(+), 7 deletions(-)

New commits:
commit 9c843ca8659bc06694f44b5641186716d1428de6
Author: Juergen Funk 
AuthorDate: Fri Sep 4 10:53:44 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Wed Sep 9 09:24:48 2020 +0200

tdf#127932 fix wrong page number in print progress

- in ctor, reset start pages to non-inflated value after size
  calculation
- update label, _then_ progress in setProgress()

Change-Id: I66576e339de814922512b68167e6c0a9b1025378
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102031
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 63bf8f042abe3c0f6989f6763d13f5389182b816)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102280
Tested-by: Jenkins

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index ba86b136b413..820d9f9ee7e8 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -2163,6 +2163,15 @@ void PrintDialog::previewLast()
 ActivateHdl(*mxPageEdit);
 }
 
+
+static OUString getNewLabel(const OUString& aLabel, int i_nCurr, int i_nMax)
+{
+OUString aNewText( aLabel.replaceFirst( "%p", OUString::number( i_nCurr ) 
) );
+aNewText = aNewText.replaceFirst( "%n", OUString::number( i_nMax ) );
+
+return aNewText;
+}
+
 // PrintProgressDialog
 PrintProgressDialog::PrintProgressDialog(weld::Window* i_pParent, int i_nMax)
 : GenericDialogController(i_pParent, "vcl/ui/printprogressdialog.ui", 
"PrintProgressDialog")
@@ -2180,15 +2189,17 @@ PrintProgressDialog::PrintProgressDialog(weld::Window* 
i_pParent, int i_nMax)
 
 //just multiply largest value by 10 and take the width of that string as
 //the max size we will want
-OUString aNewText( maStr.replaceFirst( "%p", OUString::number( mnMax * 10 
) ) );
-aNewText = aNewText.replaceFirst( "%n", OUString::number( mnMax * 10 ) );
-mxText->set_label( aNewText );
+mxText->set_label(getNewLabel(maStr, mnMax * 10, mnMax * 10));
 mxText->set_size_request(mxText->get_preferred_size().Width(), -1);
 
 //Pick a useful max width
 mxProgress->set_size_request(mxProgress->get_approximate_digit_width() * 
25, -1);
 
 mxButton->connect_clicked( LINK( this, PrintProgressDialog, ClickHdl ) );
+
+// after this patch f7157f04fab298423e2c4f6a7e5f8e361164b15f, we have seen 
the calc Max string (sometimes) look above
+// now init to the right start vaules
+mxText->set_label(getNewLabel(maStr, mnCur, mnMax));
 }
 
 PrintProgressDialog::~PrintProgressDialog()
@@ -2207,11 +2218,10 @@ void PrintProgressDialog::setProgress( int i_nCurrent )
 if( mnMax < 1 )
 mnMax = 1;
 
-mxProgress->set_percentage(mnCur*100/mnMax);
+mxText->set_label(getNewLabel(maStr, mnCur, mnMax));
 
-OUString aNewText( maStr.replaceFirst( "%p", OUString::number( mnCur ) ) );
-aNewText = aNewText.replaceFirst( "%n", OUString::number( mnMax ) );
-mxText->set_label( aNewText );
+// here view the dialog, with the right label
+mxProgress->set_percentage(mnCur*100/mnMax);
 }
 
 void PrintProgressDialog::tick()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-09-09 Thread Thorsten Wagner (via logerrit)
 vcl/source/control/button.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 6be0a806dcce864fb4d604be68e8b3711fc604d6
Author: Thorsten Wagner 
AuthorDate: Tue Jul 28 00:36:07 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Sep 9 08:26:52 2020 +0200

tdf#134708 Text coloring of buttons within forms amended

Change-Id: I55f91ff626a55ab588ac49a085070c0d9f919e68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99564
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 84b2849512bdb19597739d9515dd55e2d3ba9504)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101857
Reviewed-by: Thorsten Wagner 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 7e0a1bfa81fa..048ff2181c25 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -752,6 +752,13 @@ void PushButton::ImplDrawPushButtonContent(OutputDevice 
*pDev, DrawFlags nDrawFl
 if (nDrawFlags & DrawFlags::Mono)
 aColor = COL_BLACK;
 
+// Custom foreground color is reasonable on stock controls only. Stock 
controls are used if a custom background has been set
+// (and thus no native controls are able to be used) or no native controls 
are available.
+
+else if (IsControlForeground()
+ && (IsControlBackground() || 
!IsNativeControlSupported(ControlType::Pushbutton, ControlPart::Entire)))
+aColor = GetControlForeground();
+
 // Button types with possibly different text coloring are flat buttons and 
regular buttons. Regular buttons may be action
 // buttons and may have an additional default status. Moreover all buttons 
may have an additional pressed and rollover
 // (highlight) status. Pressed buttons are always in rollover status.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-09-01 Thread Caolán McNamara (via logerrit)
 vcl/source/control/edit.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 3cc9def811f4bac32342175f3fda9f10dcde80bb
Author: Caolán McNamara 
AuthorDate: Mon Aug 31 20:33:35 2020 +0100
Commit: Miklos Vajna 
CommitDate: Tue Sep 1 13:42:03 2020 +0200

check if Edit was disposed while insert special character was still open

seen when testing renaming tabs in basic IDE

Change-Id: Id0a5d7ae54f789f04701ac7dd9c18608704238d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101769
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 000b660ca04a..c259853edb88 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2015,11 +2015,14 @@ void Edit::Command( const CommandEvent& rCEvt )
 else if (sCommand == "specialchar" && pImplFncGetSpecialChars)
 {
 OUString aChars = pImplFncGetSpecialChars(GetFrameWeld(), 
GetFont());
-SetSelection( aSaveSel );
-if (!aChars.isEmpty())
+if (!IsDisposed()) // destroyed while the insert special character 
dialog was still open
 {
-ImplInsertText( aChars );
-ImplModified();
+SetSelection( aSaveSel );
+if (!aChars.isEmpty())
+{
+ImplInsertText( aChars );
+ImplModified();
+}
 }
 }
 pPopup.clear();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-09-01 Thread Julien Nabet (via logerrit)
 vcl/source/gdi/vectorgraphicdata.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit d2fb499310414cb2b8f635b9b7798177b60ab347
Author: Julien Nabet 
AuthorDate: Wed Aug 26 11:23:34 2020 +0200
Commit: Caolán McNamara 
CommitDate: Tue Sep 1 09:51:47 2020 +0200

tdf#136127: crash when adding protected PDF file on Photo Album

See https://bugs.documentfoundation.org/attachment.cgi?id=164704

Change-Id: I1c5713446f2af0a08873f0ea57afbfb34f9623be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101393
Tested-by: Jenkins
commit f115a7e047e5f1b6067667adc50d60499cc3e27e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101675
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/gdi/vectorgraphicdata.cxx 
b/vcl/source/gdi/vectorgraphicdata.cxx
index 99e51f65cc71..7ef8c922f64d 100644
--- a/vcl/source/gdi/vectorgraphicdata.cxx
+++ b/vcl/source/gdi/vectorgraphicdata.cxx
@@ -151,7 +151,8 @@ void VectorGraphicData::ensurePdfReplacement()
 if (mnPageIndex >= 0)
 nUsePageIndex = mnPageIndex;
 vcl::RenderPDFBitmaps(maVectorGraphicDataArray.getConstArray(), 
maVectorGraphicDataArray.getLength(), aBitmaps, nUsePageIndex, 1/*, 
fResolutionDPI*/);
-maReplacement = aBitmaps[0];
+if (!aBitmaps.empty())
+maReplacement = aBitmaps[0];
 }
 
 void VectorGraphicData::ensureReplacement()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-08-24 Thread Mike Kaganski (via logerrit)
 vcl/source/outdev/transparent.cxx |   14 ++
 1 file changed, 2 insertions(+), 12 deletions(-)

New commits:
commit 3e4510c06d7561b5b72146b999c8053cba3917bc
Author: Mike Kaganski 
AuthorDate: Mon Aug 24 07:56:46 2020 +0300
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Aug 24 10:33:42 2020 +0200

Don't apply transparency twice when drawing to mpAlphaVDev

We pass fTransparency to mpAlphaVDev->DrawTransparent; using adjusted
fill/line color is wrong. The correct COL_BLACK/COL_TRANSPARENT were
already set in mpAlphaVDev when SetFillColor/SetLineColor were called
to the virtual device.

Wrong implementation from commit 9c621ee8ea41a1c53bfeca49827290826785973e.

Change-Id: Ic858ede1ba793ac00f831a3960f748ad20ccb70a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101262
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 1f5ac5b08fd8c1ddadc5f38595a487db2895957e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101159
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/outdev/transparent.cxx 
b/vcl/source/outdev/transparent.cxx
index 717e9584162a..56e4f2d039f8 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -248,6 +248,8 @@ void OutputDevice::DrawTransparent(
 
 // create ObjectToDevice transformation
 const basegfx::B2DHomMatrix 
aFullTransform(ImplGetDeviceTransformation() * rObjectTransform);
+// TODO: this must not drop transparency for mpAlphaVDev case, but 
instead use premultiplied
+// aplha... but that requires using premultiplied alpha also for 
already drawn data
 const double fAdjustedTransparency = mpAlphaVDev ? 0 : fTransparency;
 bool bDrawnOk(true);
 
@@ -294,20 +296,8 @@ void OutputDevice::DrawTransparent(
 }
 
 if (mpAlphaVDev)
-{
-const Color aFillCol(mpAlphaVDev->GetFillColor());
-const Color aLineColor(mpAlphaVDev->GetLineColor());
-const auto nGreyScale = static_cast(std::round(255 
* fTransparency));
-const Color aNewColor(nGreyScale, nGreyScale, nGreyScale);
-mpAlphaVDev->SetFillColor(aNewColor);
-mpAlphaVDev->SetLineColor(aNewColor);
-
 mpAlphaVDev->DrawTransparent(rObjectTransform, rB2DPolyPoly, 
fTransparency);
 
-mpAlphaVDev->SetFillColor(aFillCol);
-mpAlphaVDev->SetLineColor(aLineColor);
-}
-
 return;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-08-24 Thread Mike Kaganski (via logerrit)
 vcl/source/outdev/bitmap.cxx |   12 
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit e61590d3445172da25bdec04ce6b7158af565eb6
Author: Mike Kaganski 
AuthorDate: Mon Aug 24 00:13:19 2020 +0300
Commit: Caolán McNamara 
CommitDate: Mon Aug 24 10:07:08 2020 +0200

tdf#136047: fix OutputDevice::DrawTransformBitmapExDirect for ...

transparent bitmap case
This has been broken in commit 9c621ee8ea41a1c53bfeca49827290826785973e,
where transparent bitmap started to override any transparency of vdev
with transparency of its pixels, and not use alpha when drawing RGB when
mpAlphaVDev was present.

Instead, this restores using alpha in RGB output, and blends alpha to
what is already in mpAlphaVDev.

Change-Id: Id82717def4535336450a7118f8bd29a1660c9520
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101254
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 9ff0cd1f6b2200940ac51e580809e2a17c4b9550)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101158
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 83c1843a5300..dcb9a6b1d8d0 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1050,7 +1050,6 @@ bool OutputDevice::DrawTransformBitmapExDirect(
 const basegfx::B2DPoint aTopX(aFullTransform * basegfx::B2DPoint(1.0, 
0.0));
 const basegfx::B2DPoint aTopY(aFullTransform * basegfx::B2DPoint(0.0, 
1.0));
 SalBitmap* pSalSrcBmp = rBitmapEx.GetBitmap().ImplGetSalBitmap().get();
-SalBitmap* pSalAlphaBmp = nullptr;
 Bitmap aAlphaBitmap;
 
 if(rBitmapEx.IsTransparent())
@@ -1063,8 +1062,6 @@ bool OutputDevice::DrawTransformBitmapExDirect(
 {
 aAlphaBitmap = rBitmapEx.GetMask();
 }
-if (!mpAlphaVDev)
-pSalAlphaBmp = aAlphaBitmap.ImplGetSalBitmap().get();
 }
 else if (mpAlphaVDev)
 {
@@ -1072,6 +1069,8 @@ bool OutputDevice::DrawTransformBitmapExDirect(
 aAlphaBitmap.Erase(COL_BLACK);
 }
 
+SalBitmap* pSalAlphaBmp = aAlphaBitmap.ImplGetSalBitmap().get();
+
 bDone = mpGraphics->DrawTransformedBitmap(
 aNull,
 aTopX,
@@ -1081,7 +1080,12 @@ bool OutputDevice::DrawTransformBitmapExDirect(
 this);
 
 if (mpAlphaVDev)
-mpAlphaVDev->DrawTransformBitmapExDirect(aFullTransform, 
BitmapEx(aAlphaBitmap));
+{
+// Merge bitmap alpha to alpha device
+Bitmap aBlack(rBitmapEx.GetSizePixel(), 1);
+aBlack.Erase(COL_BLACK);
+mpAlphaVDev->DrawTransformBitmapExDirect(aFullTransform, 
BitmapEx(aBlack, aAlphaBitmap));
+}
 
 return bDone;
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-08-14 Thread Mike Kaganski (via logerrit)
 vcl/source/outdev/polygon.cxx |   24 
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit 76b93688505c0ab2b0e1876d5461a36d8ea22414
Author: Mike Kaganski 
AuthorDate: Fri Aug 14 02:01:05 2020 +0300
Commit: Caolán McNamara 
CommitDate: Fri Aug 14 15:30:42 2020 +0200

tdf#134968: don't forget to draw on mpAlphaVDev in fallback case

Change-Id: I6ab8cc8907943c3bb7fd717624ea4ac7c9d4fd5e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100711
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 18fd4437077f1e51ae54cfd1a160866cca015c2d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100692
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/outdev/polygon.cxx b/vcl/source/outdev/polygon.cxx
index 77e0564ba16f..e031fb05990c 100644
--- a/vcl/source/outdev/polygon.cxx
+++ b/vcl/source/outdev/polygon.cxx
@@ -290,6 +290,8 @@ void 
OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP
 if( mbInitFillColor )
 InitFillColor();
 
+bool bSuccess(false);
+
 if((mnAntialiasing & AntialiasingFlags::EnableB2dDraw) &&
mpGraphics->supportsOperation(OutDevSupportType::B2DDraw) &&
RasterOp::OverPaint == GetRasterOp() &&
@@ -297,7 +299,7 @@ void 
OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP
 {
 const basegfx::B2DHomMatrix aTransform(ImplGetDeviceTransformation());
 basegfx::B2DPolyPolygon aB2DPolyPolygon(rB2DPolyPoly);
-bool bSuccess(true);
+bSuccess = true;
 
 // ensure closed - maybe assert, hinders buffering
 if(!aB2DPolyPolygon.isClosed())
@@ -335,20 +337,18 @@ void 
OutputDevice::ImplDrawPolyPolygonWithB2DPolyPolygon(const basegfx::B2DPolyP
 break;
 }
 }
+}
 
-if(bSuccess)
-{
-if (mpAlphaVDev)
-
mpAlphaVDev->ImplDrawPolyPolygonWithB2DPolyPolygon(rB2DPolyPoly);
-
-return;
-}
+if (!bSuccess)
+{
+// fallback to old polygon drawing if needed
+const tools::PolyPolygon aToolsPolyPolygon(rB2DPolyPoly);
+const tools::PolyPolygon aPixelPolyPolygon = 
ImplLogicToDevicePixel(aToolsPolyPolygon);
+ImplDrawPolyPolygon(aPixelPolyPolygon.Count(), aPixelPolyPolygon);
 }
 
-// fallback to old polygon drawing if needed
-const tools::PolyPolygon aToolsPolyPolygon( rB2DPolyPoly );
-const tools::PolyPolygon aPixelPolyPolygon = ImplLogicToDevicePixel( 
aToolsPolyPolygon );
-ImplDrawPolyPolygon( aPixelPolyPolygon.Count(), aPixelPolyPolygon );
+if (mpAlphaVDev)
+mpAlphaVDev->ImplDrawPolyPolygonWithB2DPolyPolygon(rB2DPolyPoly);
 }
 
 // #100127# Extracted from OutputDevice::DrawPolyPolygon()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-08-11 Thread Caolán McNamara (via logerrit)
 vcl/source/window/builder.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit f14a738fa8c5579c2ef8cb8387b771e94ea5bdfe
Author: Caolán McNamara 
AuthorDate: Mon Aug 10 15:55:50 2020 +0100
Commit: Xisco Fauli 
CommitDate: Tue Aug 11 10:19:43 2020 +0200

tdf#135495 builder file format has annoyingly escaped into user config

Change-Id: I38882e2c6e1815ac5fd747642c8934e3e4ca3ffb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100361
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index dd57672d8b18..d15d3e668937 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -2123,8 +2123,9 @@ VclPtr VclBuilder::makeObject(vcl::Window 
*pParent, const OString &
 xWindow = xListBox;
 }
 }
-else if (name == "VclOptionalBox")
+else if (name == "VclOptionalBox" || name == "sfxlo-OptionalBox")
 {
+// tdf#135495 fallback sfxlo-OptionalBox to VclOptionalBox as a stopgap
 xWindow = VclPtr::Create(pParent);
 }
 else if (name == "GtkIconView")
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-08-01 Thread Caolán McNamara (via logerrit)
 vcl/source/outdev/bitmap.cxx |   13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 509e34d69cd15dc8532f90e8875f8afbdb2cec60
Author: Caolán McNamara 
AuthorDate: Fri Jul 31 20:58:30 2020 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat Aug 1 19:29:43 2020 +0200

tdf#135325 previews missing content drawn via DrawTransformedBitmapEx

Typically in these OutputDevice methods, the record-to-metafile case the
MetaFile is already written to before the test against mbOutputClipped to
determine that output to the current device would result in no visual output
(due to the output being outside the bounds of the device).

In this case the metafile is written after the test, so we must continue 
past
mbOutputClipped if recording to a metafile. It's typical to record with a
device of nominal size and play back later against something of a totally
different size.

Change-Id: Id1249b10f919165582f7de65b4cdc4d48074abaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99911
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 83b625d828cb..83c1843a5300 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1213,7 +1213,17 @@ void OutputDevice::DrawTransformedBitmapEx(
 if ( mbInitClipRegion )
 InitClipRegion();
 
-if ( mbOutputClipped )
+const bool bMetafile(nullptr != mpMetaFile);
+/*
+   tdf#135325 typically in these OutputDevice methods the in
+   record-to-metafile case MetaFile is already written to before the test
+   against mbOutputClipped to determine that output to the current device
+   would result in no visual output. In this case the metafile is written
+   after the test, so we must continue past mbOutputClipped if recording to
+   a metafile. It's typical to record with a device of nominal size and
+   play back later against something of a totally different size.
+ */
+if (mbOutputClipped && !bMetafile)
 return;
 
 #ifdef DO_TIME_TEST
@@ -1233,7 +1243,6 @@ void OutputDevice::DrawTransformedBitmapEx(
 static bool bAllowPreferDirectPaint(true);
 const bool bInvert(RasterOp::Invert == meRasterOp);
 const bool bBitmapChangedColor(mnDrawMode & (DrawModeFlags::BlackBitmap | 
DrawModeFlags::WhiteBitmap | DrawModeFlags::GrayBitmap ));
-const bool bMetafile(nullptr != mpMetaFile);
 const bool bTryDirectPaint(!bInvert && !bBitmapChangedColor && !bMetafile);
 
 if(bAllowPreferDirectPaint && bTryDirectPaint)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-07-30 Thread Mike Kaganski (via logerrit)
 vcl/source/outdev/transparent.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 5a67b74e40367f160387a8ccebc52874b4f4ddb6
Author: Mike Kaganski 
AuthorDate: Wed Jul 29 16:10:09 2020 +0300
Commit: Caolán McNamara 
CommitDate: Thu Jul 30 12:00:35 2020 +0200

tdf#135264: draw to mpAlphaVDev after DrawTransparentNatively

Otherwise the transparency is lost for the cases where mpAlphaVDev
is used.

Change-Id: Ic7b92cb69727dbe8901695ba496878f0ea381826
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99694
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit f3c67b783a5dcdf874c6109d36fae8f411e885be)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99730
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/outdev/transparent.cxx 
b/vcl/source/outdev/transparent.cxx
index a9e2ae080e8c..717e9584162a 100644
--- a/vcl/source/outdev/transparent.cxx
+++ b/vcl/source/outdev/transparent.cxx
@@ -695,10 +695,9 @@ void OutputDevice::DrawTransparent( const 
tools::PolyPolygon& rPolyPoly,
 
 // try hard to draw it directly, because the emulation layers are slower
 bDrawn = DrawTransparentNatively( rPolyPoly, nTransparencePercent );
-if( bDrawn )
-return;
 
-EmulateDrawTransparent( rPolyPoly, nTransparencePercent );
+if (!bDrawn)
+EmulateDrawTransparent( rPolyPoly, nTransparencePercent );
 
 // #110958# Apply alpha value also to VDev alpha channel
 if( mpAlphaVDev )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-07-16 Thread Caolán McNamara (via logerrit)
 vcl/source/outdev/bitmap.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit d44ddfce0766f57ac7d14978dd9e12813af93ce7
Author: Caolán McNamara 
AuthorDate: Thu Jul 16 11:10:53 2020 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jul 16 16:59:01 2020 +0200

tdf#134841 image totally clipped out

the clip region seems to be out of date, this looks similar to
the problem of

"compared to other public methods of OutputDevice this test was missing ...
one of the goals of the change was to use that method more often, so this 
may
have never been detected before"

where typical setup code was missing

commit 828504974d70111e4a35b31d579cf42fe660a660
Date:   Fri Feb 21 16:58:17 2020 +0100

tdf#130768 speedup huge pixel graphics Cairo

Change-Id: Icd1495f3830b69ae207cad308e821257e3e5e44b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98836
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index ea29dc438119..83b625d828cb 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -1210,6 +1210,12 @@ void OutputDevice::DrawTransformedBitmapEx(
 if ( !mpGraphics && !AcquireGraphics() )
 return;
 
+if ( mbInitClipRegion )
+InitClipRegion();
+
+if ( mbOutputClipped )
+return;
+
 #ifdef DO_TIME_TEST
 // MM02 start time test when some data (not for trivial stuff). Will
 // trigger and show data when leaving this method by destructing helper
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-07-10 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit b66b80485d855767a78e688e9e989ca0b104e0d8
Author: Caolán McNamara 
AuthorDate: Fri Jul 10 12:05:30 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jul 10 15:00:11 2020 +0200

tdf#134601 set entry font as combobox control font to take effect

Change-Id: I8cac0ebcd99fbfcd800074cc0d9acd924659753a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98458
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 930590fb7dc7..ccfe3ac7d542 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5897,6 +5897,7 @@ void SalInstanceComboBoxWithEdit::set_entry_font(const 
vcl::Font& rFont)
 Edit* pEdit = m_xComboBox->GetSubEdit();
 assert(pEdit);
 pEdit->SetPointFont(*pEdit, rFont);
+m_xComboBox->SetControlFont(rFont); // tdf#134601 set it as control font 
to take effect properly
 pEdit->Invalidate();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-07-03 Thread Noel Grandin (via logerrit)
 vcl/source/window/status.cxx |   21 +++--
 1 file changed, 19 insertions(+), 2 deletions(-)

New commits:
commit dccb00809e4d16abf2cf2176151fedaee209e4c6
Author: Noel Grandin 
AuthorDate: Fri Jul 3 12:50:30 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 3 21:59:11 2020 +0200

tdf#131942 no progress bar saving in Calc

regression from
commit a7de363cead5cd0021d2e3df4573d4cbe27df23b.
remove unnecessary Window::Update() calls, which immediately follow
Invalidate

Change-Id: If081f9a54ad7fe528a7885ac796f0ec6a7059872
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96975
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 23e8739b98e1fff3be70159182b20642b70122de)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97806

diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index ce8bba89bbaf..2eeb5ae0fedc 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -504,6 +504,7 @@ void DrawProgress(vcl::Window* pWindow, vcl::RenderContext& 
rRenderContext, cons
 pEraseWindow->Invalidate(aRect, InvalidateFlags::NoChildren
 |
 
InvalidateFlags::NoClipChildren |
 InvalidateFlags::Transparent);
+pEraseWindow->PaintImmediately();
 }
 rRenderContext.Push(PushFlags::CLIPREGION);
 rRenderContext.IntersectClipRegion(rFramePosSize);
@@ -1172,6 +1173,7 @@ void StatusBar::SetItemText( sal_uInt16 nItemId, const 
OUString& rText, int nCha
 {
 tools::Rectangle aRect = ImplGetItemRectPos(nPos);
 Invalidate(aRect);
+PaintImmediately();
 }
 }
 }
@@ -1226,6 +1228,7 @@ void StatusBar::SetItemData( sal_uInt16 nItemId, void* 
pNewData )
 {
 tools::Rectangle aRect = ImplGetItemRectPos(nPos);
 Invalidate(aRect, InvalidateFlags::NoErase);
+PaintImmediately();
 }
 }
 }
@@ -1255,6 +1258,7 @@ void StatusBar::RedrawItem(sal_uInt16 nItemId)
 {
 tools::Rectangle aRect = ImplGetItemRectPos(nPos);
 Invalidate(aRect);
+PaintImmediately();
 }
 }
 
@@ -1329,6 +1333,7 @@ void StatusBar::StartProgressMode( const OUString& rText )
 if ( IsReallyVisible() )
 {
 Invalidate();
+PaintImmediately();
 }
 }
 
@@ -1349,6 +1354,7 @@ void StatusBar::SetProgressValue( sal_uInt16 nNewPercent )
 if ((nTime_ms - mnLastProgressPaint_ms) > 100)
 {
 Invalidate(maPrgsFrameRect);
+PaintImmediately();
 mnLastProgressPaint_ms = nTime_ms;
 }
 }
@@ -1364,6 +1370,7 @@ void StatusBar::EndProgressMode()
 if ( IsReallyVisible() )
 {
 Invalidate();
+PaintImmediately();
 }
 }
 
@@ -1371,8 +1378,17 @@ void StatusBar::SetText(const OUString& rText)
 {
 if ((GetStyle() & WB_RIGHT) && !mbProgressMode && IsReallyVisible() && 
IsUpdateMode())
 {
-Window::SetText(rText);
-Invalidate();
+if (mbFormat)
+{
+Invalidate();
+Window::SetText(rText);
+}
+else
+{
+Invalidate();
+Window::SetText(rText);
+PaintImmediately();
+}
 }
 else if (mbProgressMode)
 {
@@ -1380,6 +1396,7 @@ void StatusBar::SetText(const OUString& rText)
 if (IsReallyVisible())
 {
 Invalidate();
+PaintImmediately();
 }
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-07-01 Thread Jan-Marek Glogowski (via logerrit)
 vcl/source/window/toolbox.cxx |   31 ---
 1 file changed, 16 insertions(+), 15 deletions(-)

New commits:
commit b0315eb69c62f2108983e6a4b2177cf28a2663bf
Author: Jan-Marek Glogowski 
AuthorDate: Tue Jun 30 16:49:52 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jul 2 04:43:28 2020 +0200

tdf#130991 Fit the drop-down arrow into its rect

Looking at the original fixed-size arrow painting code replaced
in commit b62c43d1200e524369d9c7c2bd1dad3044efd672 ("Anti-alias
toolbar button drop-downs."), it  used some fixed values of 5
and 3 to match the arrow box width of 11.

The new code assumes the width is the expected arrow size, minus
a minimal margin to separate the arrow from the button border,
and there is enough height available. Based on these assumptions,
the code now scales, positions and paints the triangle to fill
the available space.

Change-Id: Ied721e494d105106086ef6252e72ae7395eafe08
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97537
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 1cb897a0f65ba066d1e81b62c70c3e46bbdb7ba8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97583
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 02600732c747..935a7e3ae9ec 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2391,27 +2391,28 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& 
rRenderContext, const tool
 rRenderContext.SetFillColor(COL_BLACK);
 }
 
-float fScaleFactor = rRenderContext.GetDPIScaleFactor();
-
 tools::Polygon aPoly(4);
 
-long width = round(rDropDownRect.getHeight()/5.5) * fScaleFactor; // scale 
triangle depending on theme/toolbar height with 7 for gtk, 5 for gen
-long height = round(rDropDownRect.getHeight()/9.5) * fScaleFactor; // 4 
for gtk, 3 for gen
-if (width < 4) width = 4;
-if (height < 3) height = 3;
+// the assumption is, that the width always specifies the size of the 
expected arrow.
+const long nMargin = round(2 * rRenderContext.GetDPIScaleFactor());
+const long nSize = rDropDownRect.getWidth() - 2 * nMargin;
+const long nHalfSize = (nSize + 1) / 2;
+const long x = rDropDownRect.Left() + nMargin + (bRotate ? 
(rDropDownRect.getWidth() - nHalfSize) / 2 : 0);
+const long y = rDropDownRect.Top() + nMargin + (rDropDownRect.getHeight() 
- (bRotate ? nSize : nHalfSize)) / 2;
 
-long x = rDropDownRect.Left() + (rDropDownRect.getWidth() - width)/2;
-long y = rDropDownRect.Top() + (rDropDownRect.getHeight() - height)/2;
-
-long halfwidth = (width+1)>>1;
 aPoly.SetPoint(Point(x, y), 0);
-aPoly.SetPoint(Point(x + halfwidth, y + height), 1);
-aPoly.SetPoint(Point(x + halfwidth*2, y), 2);
+if (bRotate) // >
+{
+aPoly.SetPoint(Point(x, y + nSize), 1);
+aPoly.SetPoint(Point(x + nHalfSize, y + nHalfSize), 2);
+}
+else // v
+{
+aPoly.SetPoint(Point(x + nHalfSize, y + nHalfSize), 1);
+aPoly.SetPoint(Point(x + nSize, y), 2);
+}
 aPoly.SetPoint(Point(x, y), 3);
 
-if (bRotate) // TESTME: harder ...
-aPoly.Rotate(Point(x,y+height/2),2700);
-
 auto aaflags = rRenderContext.GetAntialiasing();
 rRenderContext.SetAntialiasing(AntialiasingFlags::EnableB2dDraw);
 rRenderContext.DrawPolygon( aPoly );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-07-01 Thread Jan-Marek Glogowski (via logerrit)
 vcl/source/window/toolbox.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit f0daeb39aa61cc3435630cf0b9727f6da818de1a
Author: Jan-Marek Glogowski 
AuthorDate: Tue Jun 30 16:42:35 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Jul 1 22:51:34 2020 +0200

tdf#130991 Scale the drop-down arrow size-request

When requesting the size of the drop-down arrow button, the arrow
rect must be scaled, like all other native size requests.

Change-Id: Ic0ccd96e812527c880868d385484655526ebb09b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97536
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist 
(cherry picked from commit ba956e60a868e98d22bc95efd041f423987e7f76)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97576
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 543e1b507c50..02600732c747 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1354,20 +1354,22 @@ static void ImplAddButtonBorder( long , long& 
rHeight, bool bNativeButton
 
 bool ToolBox::ImplCalcItem()
 {
-
 // recalc required ?
 if ( !mbCalc )
 return false;
 
 ImplDisableFlatButtons();
 
+OutputDevice *pDefault = Application::GetDefaultDevice();
+float fScaleFactor = pDefault ? pDefault->GetDPIScaleFactor() : 1.0;
+
 longnDefWidth;
 longnDefHeight;
 longnMaxWidth = 0;
 longnMaxHeight = 0;
 longnMinWidth   = 6;
 longnMinHeight  = 6;
-longnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH;
+longnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH * fScaleFactor;
 #ifdef IOS
 nDropDownArrowWidth *= 3;
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-06-30 Thread Jan-Marek Glogowski (via logerrit)
 vcl/source/window/toolbox.cxx |   18 --
 1 file changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 62b4803b32963f9529e6380f14a5b7d4edb8c4ff
Author: Jan-Marek Glogowski 
AuthorDate: Mon Jun 29 07:01:26 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Jun 30 19:42:40 2020 +0200

tdf#134054 toolbox: respect drop-down arrow rect

When centering the text and icon on the button, the code didn't
take the drop-down arrow rect width into account, resulting in an
overlapped arrow. This is especially visible, if the drop-down
is shown and the button is wrongly highlighted.

There is supposed to be some vertical mode, which I couldn't find
in the GUI, so this just adapts the width in horizontal mode.

Change-Id: I194780dc32db610041ad0ee45a425e1026c7c4e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97358
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit cb71b364fcc21bd7aa25cacb8c24a8cbc9eabd21)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97379
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 8ddb536f7bb4..543e1b507c50 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2642,13 +2642,11 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& 
rRenderContext, ImplToolItems::si
 longnBtnWidth = aBtnSize.Width()-SMALLBUTTON_HSIZE;
 longnBtnHeight = aBtnSize.Height()-SMALLBUTTON_VSIZE;
 SizeaImageSize;
-SizeaTxtSize;
 
-if ( bText )
-{
-aTxtSize.setWidth( GetCtrlTextWidth( pItem->maText ) );
-aTxtSize.setHeight( GetTextHeight() );
-}
+const bool bDropDown = (pItem->mnBits & ToolBoxItemBits::DROPDOWN) == 
ToolBoxItemBits::DROPDOWN;
+tools::Rectangle aDropDownRect;
+if (bDropDown)
+aDropDownRect = pItem->GetDropDownRect(mbHorz);
 
 if ( bImage )
 {
@@ -2678,7 +2676,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& 
rRenderContext, ImplToolItems::si
 }
 else
 {
-nImageOffX += (nBtnWidth-aImageSize.Width())/2;
+nImageOffX += (nBtnWidth-(bDropDown ? aDropDownRect.getWidth() : 
0)+SMALLBUTTON_OFF_NORMAL_X-aImageSize.Width())/2;
 if ( meTextPosition == ToolBoxTextPosition::Right )
 nImageOffY += (nBtnHeight-aImageSize.Height())/2;
 }
@@ -2703,6 +2701,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& 
rRenderContext, ImplToolItems::si
 bool bRotate = false;
 if ( bText )
 {
+const Size aTxtSize(GetCtrlTextWidth(pItem->maText), GetTextHeight());
 long nTextOffX = nOffX;
 long nTextOffY = nOffY;
 
@@ -2740,7 +2739,7 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& 
rRenderContext, ImplToolItems::si
 else
 {
 // center horizontally
-nTextOffX += (nBtnWidth-aTxtSize.Width() - 
TB_IMAGETEXTOFFSET)/2;
+nTextOffX += (nBtnWidth-(bDropDown ? aDropDownRect.getWidth() 
: 0)+SMALLBUTTON_OFF_NORMAL_X-aTxtSize.Width() - TB_IMAGETEXTOFFSET)/2;
 // set vertical position
 nTextOffY += nBtnHeight - aTxtSize.Height();
 }
@@ -2766,9 +2765,8 @@ void ToolBox::ImplDrawItem(vcl::RenderContext& 
rRenderContext, ImplToolItems::si
 }
 
 // paint optional drop down arrow
-if ( pItem->mnBits & ToolBoxItemBits::DROPDOWN )
+if (bDropDown)
 {
-tools::Rectangle aDropDownRect( pItem->GetDropDownRect( mbHorz ) );
 bool bSetColor = true;
 if ( !pItem->mbEnabled || !IsEnabled() )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source vcl/unx

2020-06-30 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |2 +-
 vcl/unx/gtk3/gtk3gtkinst.cxx  |   10 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit db8f2b30fe56bfde46c3dac0dad6661cb7464b4a
Author: Caolán McNamara 
AuthorDate: Mon Jun 29 20:49:22 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jun 30 13:10:39 2020 +0200

tdf#134390 update spin button before processing activate signal

Change-Id: I698c789c9fe79e931547d8b230a4885393f5ff28

and

Related: tdf#134390 allow entry "activate" for gen spinbutton

Change-Id: I3c497586479a08089f167ccb890e79e7b9d1f4bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97459
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit fac0288099ef7acabafa214a47ed0ec342414bae)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97477

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 6a8042ba2b1c..535ac3566cde 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -5151,7 +5151,7 @@ IMPL_LINK_NOARG(SalInstanceSpinButton, ActivateHdl, 
Edit&, bool)
 {
 // tdf#122348 return pressed to end dialog
 signal_value_changed();
-return false;
+return m_aActivateHdl.Call(*this);
 }
 
 IMPL_LINK_NOARG(SalInstanceSpinButton, UpDownHdl, SpinField&, void) { 
signal_value_changed(); }
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 7c968124ad18..2eb237ef5009 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -8661,7 +8661,9 @@ private:
 pThis->signal_activate();
 }
 
-void signal_activate()
+protected:
+
+virtual void signal_activate()
 {
 if (m_aActivateHdl.IsSet())
 {
@@ -11843,6 +11845,12 @@ private:
 return GTK_INPUT_ERROR;
 }
 
+virtual void signal_activate() override
+{
+gtk_spin_button_update(m_pButton);
+GtkInstanceEntry::signal_activate();
+}
+
 double toGtk(int nValue) const
 {
 return static_cast(nValue) / Power10(get_digits());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-06-26 Thread Luboš Luňák (via logerrit)
 vcl/source/outdev/bitmap.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a582e0651587b9ac518f27ee45a51ffb42e63264
Author: Luboš Luňák 
AuthorDate: Wed Jun 24 10:26:38 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Jun 26 11:57:34 2020 +0200

one more BmpConversion::N8BitNoConversion for alpha hack

This was supposed to be included in
2fcfbd73768b69ba58607a054e7f851be2942992.

Change-Id: I79b6f1c953784d3288d3830dbe232630aac392f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96987
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
(cherry picked from commit d502408495e5c27f5690b84e809debcc57da03f7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97002
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 401ebd6a77f2..ea29dc438119 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -482,7 +482,7 @@ BitmapEx OutputDevice::GetBitmapEx( const Point& rSrcPt, 
const Size& rSize ) con
 
 // ensure 8 bit alpha
 if( aAlphaBitmap.GetBitCount() > 8 )
-aAlphaBitmap.Convert( BmpConversion::N8BitGreys );
+aAlphaBitmap.Convert( BmpConversion::N8BitNoConversion );
 
 return BitmapEx(GetBitmap( rSrcPt, rSize ), AlphaMask( aAlphaBitmap ) 
);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-06-25 Thread Luboš Luňák (via logerrit)
 vcl/source/gdi/alpha.cxx |   15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit bdd9c9ab3ec20db4ce83cebbfc2e90bf73e2e7ec
Author: Luboš Luňák 
AuthorDate: Wed Jun 24 10:39:35 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Jun 26 07:56:30 2020 +0200

optimize AlphaMask::BlendWith()

It shows up in profiling in some cases (e.g. tdf#134160).
- If it's 8-bit, simply work on scanlines instead of pixel by pixel.
- The extra precision from using floats doesn't matter and the round()
  costs something (at least with MSVC).

Change-Id: I37bbe31fae03d61946a7382de1fb79cfe2d2ec30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97010
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-by: Luboš Luňák 
(cherry picked from commit a3ef92cfb512ce70c7dc48f7957b40f9f78f5628)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97005
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx
index 1385f803be8d..bc1d54f36c22 100644
--- a/vcl/source/gdi/alpha.cxx
+++ b/vcl/source/gdi/alpha.cxx
@@ -147,15 +147,18 @@ void AlphaMask::BlendWith(const Bitmap& rOther)
 {
 const long nHeight = std::min(pOtherAcc->Height(), pAcc->Height());
 const long nWidth = std::min(pOtherAcc->Width(), pAcc->Width());
-for (long x = 0; x < nWidth; ++x)
+for (long y = 0; y < nHeight; ++y)
 {
-for (long y = 0; y < nHeight; ++y)
+Scanline scanline = pAcc->GetScanline( y );
+ConstScanline otherScanline = pOtherAcc->GetScanline( y );
+for (long x = 0; x < nWidth; ++x)
 {
 // Use sal_uInt16 for following multiplication
-const sal_uInt16 nGrey1 = pOtherAcc->GetPixelIndex(y, x);
-const sal_uInt16 nGrey2 = pAcc->GetPixelIndex(y, x);
-const double fGrey = std::round(nGrey1 + nGrey2 - nGrey1 * 
nGrey2 / 255.0);
-pAcc->SetPixelIndex(y, x, static_cast(fGrey));
+const sal_uInt16 nGrey1 = *scanline;
+const sal_uInt16 nGrey2 = *otherScanline;
+*scanline = static_cast(nGrey1 + nGrey2 - nGrey1 * 
nGrey2 / 255);
+++scanline;
+++otherScanline;
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-06-24 Thread Ilhan Yesil (via logerrit)
 vcl/source/control/roadmap.cxx   |1 +
 vcl/source/control/roadmapwizard.cxx |5 +
 2 files changed, 6 insertions(+)

New commits:
commit a6b26c0e8544675ff2b76a1342d670032d974f60
Author: Ilhan Yesil 
AuthorDate: Wed Jun 10 10:01:00 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Thu Jun 25 00:28:55 2020 +0200

tdf#133859 Wizard service: disable 'Next' button if path has only base item

If the wizard dialog for extensions has only the base item in the first
path, there is no need to proceed to the next page, as there is no one.
This will be checked and if so, the 'Next' button disabled.

In libreoffice versions before 6.4, an ORoadmap class was used in the
wizard. There, if the ORoadmap data are reinitialized, the
InCompleteHyperLabel object must be destroyed first, before it will
be set to nullptr.

Change-Id: I5b4b2e6b3666b58acccace385c622f0a065fc368
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95969
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 54a3daec02f2eeada04efcd7958da4152db4611a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96999

diff --git a/vcl/source/control/roadmap.cxx b/vcl/source/control/roadmap.cxx
index 3b954c156ccf..9f7e6a0e12ef 100644
--- a/vcl/source/control/roadmap.cxx
+++ b/vcl/source/control/roadmap.cxx
@@ -208,6 +208,7 @@ ORoadmap::ORoadmap(vcl::Window* _pParent, WinBits 
_nWinStyle)
 
 void ORoadmap::implInit(vcl::RenderContext& rRenderContext)
 {
+delete m_pImpl->InCompleteHyperLabel;
 m_pImpl->InCompleteHyperLabel = nullptr;
 m_pImpl->setCurItemID(-1);
 m_pImpl->setComplete(true);
diff --git a/vcl/source/control/roadmapwizard.cxx 
b/vcl/source/control/roadmapwizard.cxx
index 3e887ad922b7..d73cc1a18a5b 100644
--- a/vcl/source/control/roadmapwizard.cxx
+++ b/vcl/source/control/roadmapwizard.cxx
@@ -586,6 +586,11 @@ namespace vcl
 {
 // check how many paths are still allowed
 const WizardPath& rActivePath( m_pImpl->aPaths[ 
m_pImpl->nActivePath ] );
+
+// if current path has only the base item, it is not possible to 
proceed without activating another path
+if(rActivePath.size()<=1)
+return false;
+
 sal_Int32 nCurrentStatePathIndex = 
RoadmapWizardImpl::getStateIndexInPath( getCurrentState(), rActivePath );
 
 size_t nPossiblePaths(0);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-06-23 Thread Luboš Luňák (via logerrit)
 vcl/source/gdi/bitmapex.cxx |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 48106f66e4132dcc7a11a5ad18a535768b342dd4
Author: Luboš Luňák 
AuthorDate: Mon Jun 22 16:13:34 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Jun 24 07:37:02 2020 +0200

do not assume SalBitmap is zero-initialized (tdf#134152)

This code apparently expected that bitmaps are initialized with
the first color in the palette, but that's not guaranteed to be
the case (fails at least with Skia and X11 'gen' bitmaps).

Change-Id: Ie4f7412e0a6c4c1110fc5fbb8ab5bed3c96f652f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96864
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
(cherry picked from commit 7f75271f91862f333707aae065f40af4d96a89a9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96873
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index cf46607f14a1..80c6879af00c 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -1035,9 +1035,9 @@ BitmapEx BitmapEx::ModifyBitmapEx(const 
basegfx::BColorModifierStack& rBColorMod
 // clear bitmap with dest color
 if(aChangedBitmap.GetBitCount() <= 8)
 {
-// do NOT use erase; for e.g. 8bit Bitmaps, the nearest 
color to the given
-// erase color is determined and used -> this may be 
different from what is
-// wanted here. Better create a new bitmap with the needed 
color explicitly
+// For e.g. 8bit Bitmaps, the nearest color to the given 
erase color is
+// determined and used -> this may be different from what 
is wanted here.
+// Better create a new bitmap with the needed color 
explicitly.
 Bitmap::ScopedReadAccess xReadAccess(aChangedBitmap);
 OSL_ENSURE(xReadAccess, "Got no Bitmap ReadAccess ?!?");
 
@@ -1051,10 +1051,7 @@ BitmapEx BitmapEx::ModifyBitmapEx(const 
basegfx::BColorModifierStack& rBColorMod
 );
 }
 }
-else
-{
-aChangedBitmap.Erase(Color(pReplace->getBColor()));
-}
+aChangedBitmap.Erase(Color(pReplace->getBColor()));
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-06-17 Thread Caolán McNamara (via logerrit)
 vcl/source/control/imp_listbox.cxx |2 +-
 vcl/source/window/floatwin.cxx |   26 ++
 2 files changed, 23 insertions(+), 5 deletions(-)

New commits:
commit b129ce3852ac5666c7d810cff759a33eab5df60a
Author: Caolán McNamara 
AuthorDate: Tue Jun 16 21:21:17 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 17 10:00:45 2020 +0200

we already have a NoHorzPlacement flag so use that

to indicate we don't want left/right placement

Change-Id: Ibda0d4729b7adc997fd45308ea1cd32674ace92d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96428
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/control/imp_listbox.cxx 
b/vcl/source/control/imp_listbox.cxx
index 795385434d67..f264d68685b5 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -3098,7 +3098,7 @@ void ImplListBoxFloatingWindow::StartFloat( bool 
bStartTracking )
 pGrandparentOutDev->ReMirror( aRect );
 
 // mouse-button right: close the List-Box-Float-win and don't stop the 
handling fdo#84795
-StartPopupMode( aRect, FloatWinPopupFlags::Down | 
FloatWinPopupFlags::AllMouseButtonClose );
+StartPopupMode( aRect, FloatWinPopupFlags::Down | 
FloatWinPopupFlags::NoHorzPlacement | FloatWinPopupFlags::AllMouseButtonClose );
 
 if( nPos != LISTBOX_ENTRY_NOTFOUND )
 mpImplLB->ShowProminentEntry( nPos );
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index a9a3e7163bb2..95f39fba5955 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -288,15 +288,33 @@ Point FloatingWindow::ImplCalcPos(vcl::Window* pWindow,
 {
 nArrangeAry[0]  = FloatWinPopupFlags::Up;
 nArrangeAry[1]  = FloatWinPopupFlags::Down;
-nArrangeAry[2]  = FloatWinPopupFlags::Up;
-nArrangeAttempts = 3;
+if (nFlags & FloatWinPopupFlags::NoHorzPlacement)
+{
+nArrangeAry[2]  = FloatWinPopupFlags::Up;
+nArrangeAttempts = 3;
+}
+else
+{
+nArrangeAry[2]  = FloatWinPopupFlags::Right;
+nArrangeAry[3]  = FloatWinPopupFlags::Left;
+nArrangeAry[4]  = FloatWinPopupFlags::Up;
+}
 }
 else
 {
 nArrangeAry[0]  = FloatWinPopupFlags::Down;
 nArrangeAry[1]  = FloatWinPopupFlags::Up;
-nArrangeAry[2]  = FloatWinPopupFlags::Down;
-nArrangeAttempts = 3;
+if (nFlags & FloatWinPopupFlags::NoHorzPlacement)
+{
+nArrangeAry[2]  = FloatWinPopupFlags::Down;
+nArrangeAttempts = 3;
+}
+else
+{
+nArrangeAry[2]  = FloatWinPopupFlags::Right;
+nArrangeAry[3]  = FloatWinPopupFlags::Left;
+nArrangeAry[4]  = FloatWinPopupFlags::Down;
+}
 }
 
 sal_uInt16 nArrangeIndex = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-06-16 Thread Noel Grandin (via logerrit)
 vcl/source/control/prgsbar.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 33f3f50bd507bd2a2fa6efdfe935be5b7d648f3b
Author: Noel Grandin 
AuthorDate: Sat Jun 13 19:34:28 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Jun 16 11:23:20 2020 +0200

tdf#131942 no progress bar when saving in calc

regression from
commit a7de363cead5cd0021d2e3df4573d4cbe27df23b
remove unnecessary Window::Update() calls, which immediately follow 
Invalidate

Change-Id: I2525acc9da786c0908bde5f8553258382f7cd45c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96261
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit fc617677dedc2ee6f52149bac71195420bc351f3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96288
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx
index a99c84af2d4e..7082042df261 100644
--- a/vcl/source/control/prgsbar.cxx
+++ b/vcl/source/control/prgsbar.cxx
@@ -169,6 +169,7 @@ void ProgressBar::SetValue( sal_uInt16 nNewPercent )
 if ( IsReallyVisible() )
 {
 Invalidate();
+PaintImmediately();
 }
 }
 else if ( mnPercent != nNewPercent )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-06-15 Thread Jan-Marek Glogowski (via logerrit)
 vcl/source/control/tabctrl.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1c73b219487b2aa60d888755cf4eca082e6b00c0
Author: Jan-Marek Glogowski 
AuthorDate: Mon Jun 15 19:45:50 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Jun 16 03:37:17 2020 +0200

tdf#133877 use optimal size for hamburger button

This way it'll properly scale, instead of using the fixed 28 pixel
dimension. This is a hack, which is used a few more times in VCL.
Still this should not be needed, but done automatically.
If there aren't any constraints, just return the optimal size!

Change-Id: I8aa32645ea95cba28d0daf56f0be27c15153b6c9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96390
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit eff34e639055701b1299c07e6cdc0ce07cfc0936)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96411
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 4c7ee7b964d0..6079b5a7678d 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -85,7 +85,6 @@ struct ImplTabCtrlData
 
 // for the Tab positions
 #define TAB_PAGERECT0x
-#define HAMBURGER_DIM   28
 
 void TabControl::ImplInit( vcl::Window* pParent, WinBits nStyle )
 {
@@ -2192,9 +2191,9 @@ 
NotebookbarTabControlBase::NotebookbarTabControlBase(vcl::Window* pParent)
 , eLastContext(vcl::EnumContext::Context::Any)
 {
 m_pOpenMenu = VclPtr::Create( this , WB_CENTER | WB_VCENTER );
-m_pOpenMenu->SetSizePixel(Size(HAMBURGER_DIM, HAMBURGER_DIM));
 m_pOpenMenu->SetClickHdl(LINK(this, NotebookbarTabControlBase, OpenMenu));
 m_pOpenMenu->SetModeImage(Image(StockImage::Yes, 
SV_RESID_BITMAP_NOTEBOOKBAR));
+m_pOpenMenu->SetSizePixel(m_pOpenMenu->GetOptimalSize());
 m_pOpenMenu->Show();
 }
 
@@ -2301,7 +2300,8 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long 
nWidth )
 if (!m_pOpenMenu || m_pOpenMenu->isDisposed())
 return false;
 
-long nMaxWidth = nWidth - HAMBURGER_DIM;
+const long nHamburgerWidth = m_pOpenMenu->GetSizePixel().Width();
+long nMaxWidth = nWidth - nHamburgerWidth;
 long nShortcutsWidth = m_pShortcuts != nullptr ? 
m_pShortcuts->GetSizePixel().getWidth() + 1 : 0;
 long nFullWidth = nShortcutsWidth;
 
@@ -2369,7 +2369,7 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long 
nWidth )
 
 long nPosY = (m_nHeaderHeight - m_pOpenMenu->GetSizePixel().getHeight()) / 
2;
 // position the menu
-m_pOpenMenu->SetPosPixel(Point(nWidth - HAMBURGER_DIM, nPosY));
+m_pOpenMenu->SetPosPixel(Point(nWidth - nHamburgerWidth, nPosY));
 
 return true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-06-09 Thread Caolán McNamara (via logerrit)
 vcl/source/treelist/headbar.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 6250b2bebfc8179e1c618dc79a9b74c8efe06629
Author: Caolán McNamara 
AuthorDate: Tue Jun 9 12:25:26 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jun 9 21:16:46 2020 +0200

tdf#129856 invalidate old internal border if we scroll

and will redraw a new one

Change-Id: I2438af94e54f31c617cc183c61fbaaef31b5601f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95887
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/treelist/headbar.cxx b/vcl/source/treelist/headbar.cxx
index e87790e9dd97..7020c616bb69 100644
--- a/vcl/source/treelist/headbar.cxx
+++ b/vcl/source/treelist/headbar.cxx
@@ -1110,8 +1110,15 @@ void HeaderBar::Clear()
 
 void HeaderBar::SetOffset( long nNewOffset )
 {
+// tdf#129856 (see also #i40393#) invalidate old left and right border 
area if WB_BORDER was set in ImplInit()
+if (mnBorderOff1 && mnBorderOff2)
+{
+Invalidate(tools::Rectangle(0, 0, 1, mnDY));
+Invalidate(tools::Rectangle(mnDX - 1, 0, mnDX, mnDY));
+}
+
 // move area
-tools::Rectangle aRect( 0, mnBorderOff1, mnDX-1, 
mnDY-mnBorderOff1-mnBorderOff2-1 );
+tools::Rectangle aRect( 0, mnBorderOff1, mnDX-1, 
mnDY-mnBorderOff1-mnBorderOff2 );
 long nDelta = mnOffset-nNewOffset;
 mnOffset = nNewOffset;
 Scroll( nDelta, 0, aRect );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-06-09 Thread Caolán McNamara (via logerrit)
 vcl/source/window/cursor.cxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit 802f242500bc3c0e0e47e5b6b7863b620195eac6
Author: Caolán McNamara 
AuthorDate: Mon Jun 8 16:32:02 2020 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jun 9 20:39:33 2020 +0200

tdf#133462 cursor missing in SQL textbox

(and spell checking, calc page format header/footer dialog, etc)

since...

commit c2f8929ed76085bc81f390f90e06bd6781206537
Date:   Wed May 29 23:33:25 2019 -0400

vcl: sfx2: LOK: Support per-view popup windows

I feel this is a mismerge where the point of

commit b9c10ee923308f336a694bbc0212396ed5317b6a
Date:   Wed Apr 3 12:02:13 2019 +0100

weld ClassificationDialog

to allow cursor drawing to a non-Window OutputDevice got clobbered

Change-Id: If693fd0ee83afc6e7f0ddce7b43b8cb6e3327116
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95822
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index fbc2b2ec1d76..9eba6b2f603f 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -47,10 +47,6 @@ static tools::Rectangle ImplCursorInvert(vcl::RenderContext* 
pRenderContext, Imp
 {
 tools::Rectangle aPaintRect;
 
-vcl::Window* pWindow = pData ? pData->mpWindow.get() : nullptr;
-if (!pWindow || pWindow->IsDisposed())
-return aPaintRect;
-
 bool bMapMode = pRenderContext->IsMapModeEnabled();
 pRenderContext->EnableMapMode( false );
 InvertFlags nInvertStyle;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-06-07 Thread Caolán McNamara (via logerrit)
 vcl/source/treelist/svimpbox.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 1e2e4ea8cf8e8b1df8678daaf1ff7b51494838f0
Author: Caolán McNamara 
AuthorDate: Sun Jun 7 20:00:08 2020 +0100
Commit: Caolán McNamara 
CommitDate: Sun Jun 7 21:59:38 2020 +0200

Resolves: tdf#133744 stop processing if DoubleClickHdl consumed event

Change-Id: I69bb7d670b04b082df294d5ea56dfd6e8d6d4fe7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95742
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index d7199eb56f7b..fcd1487e77fb 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -2355,8 +2355,7 @@ bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
 break;
 
 case KEY_RETURN:
-m_pView->DoubleClickHdl();
-bKeyUsed = false;
+bKeyUsed = !m_pView->DoubleClickHdl();
 break;
 
 case KEY_F2:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-06-01 Thread Mike Kaganski (via logerrit)
 vcl/source/treelist/transfer.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 832dda315e83c8ef5f2ecacdecda3e97f6013d8e
Author: Mike Kaganski 
AuthorDate: Sun May 31 17:24:15 2020 +0200
Commit: Mike Kaganski 
CommitDate: Mon Jun 1 09:17:01 2020 +0200

tdf#133527: the code may be called without solar mutex guard

... so make sure to get one before using releaser

Change-Id: Ifd746e4bb4bdb0110d25fe1ff71fa3dfef67c4da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95231
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 54669d9fcc9d51c561108b512717698cff9320af)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95238

diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index 8ff088d05366..eefc22e8ba6c 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -1444,6 +1444,8 @@ Any TransferableDataHelper::GetAny( const DataFlavor& 
rFlavor, const OUString& r
 {
 // tdf#133365: only release solar mutex on Windows
 #ifdef _WIN32
+// tdf#133527: first, make sure that we actually hold 
the mutex
+SolarMutexGuard g;
 // Our own thread may handle the nested 
IDataObject::GetData call,
 // and try to acquire solar mutex
 SolarMutexReleaser r;
@@ -1464,6 +1466,8 @@ Any TransferableDataHelper::GetAny( const DataFlavor& 
rFlavor, const OUString& r
 {
 // tdf#133365: only release solar mutex on Windows
 #ifdef _WIN32
+// tdf#133527: first, make sure that we actually hold the mutex
+SolarMutexGuard g;
 // Our own thread may handle the nested IDataObject::GetData 
call,
 // and try to acquire solar mutex
 SolarMutexReleaser r;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-05-30 Thread Mike Kaganski (via logerrit)
 vcl/source/treelist/transfer.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 06ba0ab749930cf404f0e4a5a1b8abe9be87bce5
Author: Mike Kaganski 
AuthorDate: Fri May 29 10:53:47 2020 +0200
Commit: Mike Kaganski 
CommitDate: Sat May 30 21:53:33 2020 +0200

tdf#133365: only release solar mutex on Windows

Regression after f2561331534459f8aebc57e8615fa5f626521bcb

Change-Id: Id12a81b2ca79edb7ae056b357dcfd1d8f4bb56ef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95088
Tested-by: Jenkins
Tested-by: Xisco Fauli 
Reviewed-by: Jean-Baptiste Faure 
Reviewed-by: Mike Kaganski 
(cherry picked from commit 905f7d881fe90c2cd95c0ffc326bc45328712d3d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95197

diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx
index 965d820e331e..8ff088d05366 100644
--- a/vcl/source/treelist/transfer.cxx
+++ b/vcl/source/treelist/transfer.cxx
@@ -1442,9 +1442,12 @@ Any TransferableDataHelper::GetAny( const DataFlavor& 
rFlavor, const OUString& r
 {
 if( ( nRequestFormat == format.mnSotId ) && 
!rFlavor.MimeType.equalsIgnoreAsciiCase( format.MimeType ) )
 {
+// tdf#133365: only release solar mutex on Windows
+#ifdef _WIN32
 // Our own thread may handle the nested 
IDataObject::GetData call,
 // and try to acquire solar mutex
 SolarMutexReleaser r;
+#endif // _WIN32
 
 if (xTransfer2.is())
 aRet = xTransfer2->getTransferData2(format, 
rDestDoc);
@@ -1459,9 +1462,12 @@ Any TransferableDataHelper::GetAny( const DataFlavor& 
rFlavor, const OUString& r
 
 if( !aRet.hasValue() )
 {
+// tdf#133365: only release solar mutex on Windows
+#ifdef _WIN32
 // Our own thread may handle the nested IDataObject::GetData 
call,
 // and try to acquire solar mutex
 SolarMutexReleaser r;
+#endif // _WIN32
 
 if (xTransfer2.is())
 aRet = xTransfer2->getTransferData2(rFlavor, rDestDoc);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-05-29 Thread Michael Weghorn (via logerrit)
 vcl/source/control/edit.cxx |1 +
 vcl/source/control/spinfld.cxx  |1 +
 vcl/source/window/accessibility.cxx |4 +++-
 vcl/source/window/brdwin.cxx|2 ++
 4 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit b03223b25366c981f40973152afaf9ed404fca76
Author: Michael Weghorn 
AuthorDate: Fri May 29 16:53:59 2020 +0200
Commit: Michael Weghorn 
CommitDate: Fri May 29 22:53:36 2020 +0200

tdf#133498 Make native drawing of FormattedField work (again)

Commit 2a694f9e0e7789b4b3b792a9eedd29366fa10c1c
("lok: fix the window type of the formatted field control",
2020-05-06) had introduced the new 'WindowType::FORMATTEDFIELD'
and sets it for the 'FormattedField' control, instead of using
the previous default value set in the 'SpinField' ctor,
which is 'WindowType::SPINFIELD'.

This commit adds the corresponding 'WindowType::FORMATTEDFIELD'
cases relevant to make native drawing of the control work (again).

Also map the corresponding accessibility roles.

Change-Id: Ied0b0548c03dee3feaf1b6252c81b2a33b68b938
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95156
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit 0ea1d6939b6b8b97b010c9aa3adc94bb892cd5d9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95127

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index fe79d666f68a..000b660ca04a 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -954,6 +954,7 @@ ControlType Edit::ImplGetNativeControlType() const
 case WindowType::LONGCURRENCYFIELD:
 case WindowType::NUMERICFIELD:
 case WindowType::SPINFIELD:
+case WindowType::FORMATTEDFIELD:
 if (pControl->GetStyle() & WB_SPIN)
 nCtrl = ControlType::Spinbox;
 else
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 175c0828a540..a5206cf72a4d 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -177,6 +177,7 @@ void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, 
vcl::Window* pWindow
 case WindowType::LONGCURRENCYFIELD:
 case WindowType::NUMERICFIELD:
 case WindowType::SPINFIELD:
+case WindowType::FORMATTEDFIELD:
 aControl = ControlType::Spinbox;
 break;
 default:
diff --git a/vcl/source/window/accessibility.cxx 
b/vcl/source/window/accessibility.cxx
index ba1cdca98492..ddcfd56aaa73 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -310,7 +310,8 @@ sal_uInt16 Window::getDefaultAccessibleRole() const
 case WindowType::METRICFIELD:
 case WindowType::CURRENCYFIELD:
 case WindowType::LONGCURRENCYFIELD:
-case WindowType::SPINFIELD: nRole = 
accessibility::AccessibleRole::SPIN_BOX; break;
+case WindowType::SPINFIELD:
+case WindowType::FORMATTEDFIELD: nRole = 
accessibility::AccessibleRole::SPIN_BOX; break;
 
 case WindowType::TOOLBOX: nRole = 
accessibility::AccessibleRole::TOOL_BAR; break;
 case WindowType::STATUSBAR: nRole = 
accessibility::AccessibleRole::STATUS_BAR; break;
@@ -410,6 +411,7 @@ OUString Window::getDefaultAccessibleName() const
 case WindowType::DATEFIELD:
 case WindowType::TIMEFIELD:
 case WindowType::SPINFIELD:
+case WindowType::FORMATTEDFIELD:
 
 case WindowType::COMBOBOX:
 case WindowType::LISTBOX:
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index abfcd3ecf5b0..4195cf0bba95 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -470,6 +470,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, 
long nWidth, long nHei
 case WindowType::LONGCURRENCYFIELD:
 case WindowType::NUMERICFIELD:
 case WindowType::SPINFIELD:
+case WindowType::FORMATTEDFIELD:
 case WindowType::CALCINPUTLINE:
 mbNWFBorder = true;
 if (pCtrl->GetStyle() & WB_SPIN)
@@ -611,6 +612,7 @@ void 
ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c
 case WindowType::LONGCURRENCYFIELD:
 case WindowType::NUMERICFIELD:
 case WindowType::SPINFIELD:
+case WindowType::FORMATTEDFIELD:
 case WindowType::CALCINPUTLINE:
 if (pCtrl->GetStyle() & WB_SPIN)
 aCtrlType = ControlType::Spinbox;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-05-28 Thread Caolán McNamara (via logerrit)
 vcl/source/treelist/treelistbox.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 775a205a334659c124c02272edd81a01af69cf47
Author: Caolán McNamara 
AuthorDate: Wed May 27 12:55:25 2020 +0100
Commit: Caolán McNamara 
CommitDate: Thu May 28 15:21:44 2020 +0200

Resolves: tdf#133385 dangling pTargetEntry after remove or clear

Change-Id: Id04b08ea5af1341d548f7bb1e3c3c7f5b7197548
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94955
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/treelist/treelistbox.cxx 
b/vcl/source/treelist/treelistbox.cxx
index d8bc727766b6..bb52e28fe0d4 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -1977,6 +1977,7 @@ void SvTreeListBox::LoseFocus()
 void SvTreeListBox::ModelHasCleared()
 {
 pImpl->m_pCursor = nullptr; // else we crash in GetFocus when editing 
in-place
+pTargetEntry = nullptr;
 pEdCtrl.reset();
 pImpl->Clear();
 nFocusWidth = -1;
@@ -2250,8 +2251,12 @@ void SvTreeListBox::ModelIsRemoving( SvTreeListEntry* 
pEntry )
 
 void SvTreeListBox::ModelHasRemoved( SvTreeListEntry* pEntry  )
 {
-if ( pEntry == pHdlEntry)
+if (pEntry == pHdlEntry)
 pHdlEntry = nullptr;
+
+if (pEntry == pTargetEntry)
+pTargetEntry = nullptr;
+
 pImpl->EntryRemoved();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/source

2020-05-28 Thread Luboš Luňák (via logerrit)
 vcl/source/app/help.cxx |   17 -
 1 file changed, 17 deletions(-)

New commits:
commit 3e78c8b75c2a170b13395e86d6978946a1acbe7c
Author: Luboš Luňák 
AuthorDate: Wed May 27 15:21:25 2020 +0200
Commit: Luboš Luňák 
CommitDate: Thu May 28 14:36:25 2020 +0200

do not explicitly invalidate window under a tooltip (tdf#131419)

It doesn't really make sense, since tooltips are separate windows,
any repaints will be normally handled by the windowing system.
And native (=handled by a specific VCL backend) tooltips do not
do this either.
This avoids an off-by-one error somewhere, seen in tdf#131419.

Change-Id: Ie22dad61d021807aa15efdde7dbb77274460d575
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94976
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 
(cherry picked from commit 17bdb844bba68cd0cb54312bd9ea1037850db5fd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94960

diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 54f0dbbfb4d3..ebe7588c562f 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -518,11 +518,6 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 
nHelpWinStyle, QuickHe
 ((pHelpWin->GetHelpArea() != rHelpArea) && 
aHelpData.mbRequestingHelp);
 if (bUpdate)
 {
-vcl::Window * pWindow = 
pHelpWin->GetParent()->ImplGetFrameWindow();
-tools::Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( 
pWindow ) );
-if( pHelpWin->IsVisible() )
-pWindow->Invalidate( aInvRect );
-
 pHelpWin->SetHelpText( rHelpText );
 // approach mouse position
 ImplSetHelpWindowPos( pHelpWin, nHelpWinStyle, nStyle, 
rScreenPos, rHelpArea );
@@ -564,18 +559,6 @@ void ImplDestroyHelpWindow(ImplSVHelpData& rHelpData, bool 
bUpdateHideTime)
 VclPtr pHelpWin = rHelpData.mpHelpWin;
 if( pHelpWin )
 {
-vcl::Window * pParent = pHelpWin->GetParent();
-if( pParent )
-{
-VclPtr pWindow( pParent->ImplGetFrameWindow() );
-if( pWindow )
-{
-// find out screen area covered by system help window
-tools::Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( 
pWindow ) );
-if( pHelpWin->IsVisible() )
-pWindow->Invalidate( aInvRect );
-}
-}
 rHelpData.mpHelpWin = nullptr;
 rHelpData.mbKeyboardHelp = false;
 pHelpWin->Hide();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits