[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

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

New commits:
commit 1e41300a9552f90b3d75d5ffadd31ae42a28d249
Author: Caolán McNamara 
AuthorDate: Tue Sep 15 16:36:17 2020 +0100
Commit: Xisco Fauli 
CommitDate: Wed Sep 23 18:12:14 2020 +0200

ofz#25684 keep ParseCMAP within legal area

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

ofz#25696 OOM

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

ofz#25774 keep ParseCMAP within legal area

Change-Id: Ic68fadd3d63631cbccda76e7679d95bb89452d25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103017
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit f8474367449a1b6b54918d2753e3a36798761839)

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)

Missing include

(for std::max, since f8474367449a1b6b54918d2753e3a36798761839 "ofz#25774 
keep
ParseCMAP within legal area")

Change-Id: I873c788577e9ec3bd54d9e637d2cf86be7c1f6e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103089
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 8cc52b0573c64cf5eb62ebe3098cd964c437)

ofz#25855 overflow in nTmpOffset

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

Change-Id: Ic52f1686ccf81e6b13d7eb7e74dbd9cb51c8ea01

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/+/103261
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx
index 9c8b54682041..92760875b647 100644
--- a/vcl/source/font/fontcharmap.cxx
+++ b/vcl/source/font/fontcharmap.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
@@ -150,6 +151,10 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 continue;
 
 int nTmpOffset = GetUInt( p+4 );
+
+if (nTmpOffset > nLength - 2 || nTmpOffset < 0)
+continue;
+
 int nTmpFormat = GetUShort( pCmap + nTmpOffset );
 if( nTmpFormat == 12 )  // 32bit code -> glyph map 
format
 nValue += 3;
@@ -179,12 +184,29 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, 
CmapResult& rResult )
 {
 int nSegCountX2 = GetUShort( pCmap + nOffset + 6 );
 nRangeCount = nSegCountX2/2 - 1;
-pCodePairs = new sal_UCS4[ nRangeCount * 2 ];
-pStartGlyphs = new int[ nRangeCount ];
+if (nRangeCount < 0)
+{
+SAL_WARN("vcl.gdi", "negative RangeCount");
+nRangeCount = 0;
+}
+
 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 )
 {
@@ 

[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

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

New commits:
commit 72c1c84e14ffc8127f24930066220e7c7b28a970
Author: Juergen Funk 
AuthorDate: Fri Sep 4 10:53:44 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Thu Sep 10 12:11:11 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/+/102281
Tested-by: Jenkins

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 7d340559806a..1515b8b74264 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -2159,6 +2159,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")
@@ -2176,15 +2185,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()
@@ -2203,11 +2214,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-6-4' - vcl/source

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

New commits:
commit 9921be1f47943781c443927f7c7d94a460f2780b
Author: Jan-Marek Glogowski 
AuthorDate: Tue Jun 30 16:42:35 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Wed Jul 8 02:31:11 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 
(cherry picked from commit f0daeb39aa61cc3435630cf0b9727f6da818de1a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97679
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index df5aadf89243..187ea2512f98 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1352,20 +1352,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-6-4' - vcl/source

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

New commits:
commit eee6441bc9eea847ba4b338baf99ab47913fcd61
Author: Jan-Marek Glogowski 
AuthorDate: Mon Jun 29 07:01:26 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Jul 7 14:14:07 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 8565546ce6a04f6f243f4f60d2693b148dca5a77)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97688
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 77df4fddcacb..df5aadf89243 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2641,13 +2641,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;
 }
@@ -2705,6 +2703,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;
 
@@ -2742,7 +2741,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();
 }
@@ -2768,9 +2767,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-6-4' - vcl/source

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

New commits:
commit c0971961cf11097c787c67b5892d6209f89662e7
Author: Jan-Marek Glogowski 
AuthorDate: Tue Jun 30 16:49:52 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Tue Jul 7 14:13:41 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 
(cherry picked from commit b0315eb69c62f2108983e6a4b2177cf28a2663bf)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97687
Reviewed-by: Thorsten Behrens 

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 3b0d6b5a5f7e..77df4fddcacb 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -2387,27 +2387,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-6-4' - vcl/source

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

New commits:
commit 9bb3b614300cd8b6572c9fa92fcd92a80d22fdc6
Author: Jan-Marek Glogowski 
AuthorDate: Mon Jun 15 19:45:50 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Jul 6 08:42:13 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 
(cherry picked from commit 1c73b219487b2aa60d888755cf4eca082e6b00c0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97464

diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index d39b50866366..cece38cc9f87 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -84,7 +84,6 @@ struct ImplTabCtrlData
 
 // for the Tab positions
 #define TAB_PAGERECT0x
-#define HAMBURGER_DIM   28
 
 void TabControl::ImplInit( vcl::Window* pParent, WinBits nStyle )
 {
@@ -2198,9 +2197,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();
 }
 
@@ -2307,7 +2306,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;
 
@@ -2375,7 +2375,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-6-4' - vcl/source

2020-07-06 Thread Szymon Kłos (via logerrit)
 vcl/source/control/tabctrl.cxx |8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 20f04a0c85e15aca46e181ac489b11d84d789a8e
Author: Szymon Kłos 
AuthorDate: Sat Apr 25 11:28:58 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Jul 6 08:41:04 2020 +0200

tdf#123292 notebookbar: vertical align for shortcuts toolbar

Change-Id: I2f2ccee9d6c01962d5d8609ea55c0c2bca6b5cb6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92892
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 
(cherry picked from commit 96e5121869e95a8e28788a91ce0dc480e5f10c0b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97463
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 1f32f7de8c1a..d39b50866366 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2368,10 +2368,14 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long 
nWidth )
 
 // position the shortcutbox
 if (m_pShortcuts)
-m_pShortcuts->SetPosPixel(Point(0, 0));
+{
+long nPosY = (m_nHeaderHeight - 
m_pShortcuts->GetSizePixel().getHeight()) / 2;
+m_pShortcuts->SetPosPixel(Point(0, nPosY));
+}
 
+long nPosY = (m_nHeaderHeight - m_pOpenMenu->GetSizePixel().getHeight()) / 
2;
 // position the menu
-m_pOpenMenu->SetPosPixel(Point(nWidth - HAMBURGER_DIM, 0));
+m_pOpenMenu->SetPosPixel(Point(nWidth - HAMBURGER_DIM, 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-6-4' - 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 cd971797acea4611dc51fb0fcc08632f83bd10c1
Author: Ilhan Yesil 
AuthorDate: Wed Jun 10 10:01:00 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Thu Jun 25 00:29:48 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/+/96795

diff --git a/vcl/source/control/roadmap.cxx b/vcl/source/control/roadmap.cxx
index 8d228e629c4b..9dbf0ab17456 100644
--- a/vcl/source/control/roadmap.cxx
+++ b/vcl/source/control/roadmap.cxx
@@ -204,6 +204,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 160724c78ab3..bc84ce616551 100644
--- a/vcl/source/control/roadmapwizard.cxx
+++ b/vcl/source/control/roadmapwizard.cxx
@@ -580,6 +580,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-6-4' - vcl/source

2020-05-15 Thread Miklos Vajna (via logerrit)
 vcl/source/window/paint.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit d6304a7db28f92bbe5cd98648aa133d64c05b5ff
Author: Miklos Vajna 
AuthorDate: Thu May 14 12:31:55 2020 +0200
Commit: Caolán McNamara 
CommitDate: Fri May 15 16:20:01 2020 +0200

tdf#132788 vcl: fix redraw on theme change

Regression from commit f4e0cc1ff145287f80738f070a8c46a64b2f76d1
(tdf#92079 vcl: fix missing image background on dialog from basic,
2019-06-13), the original scenario was about an unexpected change from
bitmap wallpaper to a non-bitmap one.

That means the condition for the above change can be more strict: just
restore the old wallpaper if it's now a non-bitmap one, otherwise leave
it alone. This way the above scenario keeps working and changing themes
again doesn't require a restart of the process.

(cherry picked from commit 52389ed19da6bcfdedef909532913ff3e2ab4afc)

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

diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index a99ae752de45..6e6b8b4bfe6c 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -302,9 +302,11 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion)
 // direct painting
 Wallpaper aBackground = m_pWindow->GetBackground();
 m_pWindow->ApplySettings(*m_pWindow);
-// Restore lost bitmap background.
-if (aBackground.IsBitmap())
+// Restore bitmap background if it was lost.
+if (aBackground.IsBitmap() && 
!m_pWindow->GetBackground().IsBitmap())
+{
 m_pWindow->SetBackground(aBackground);
+}
 m_pWindow->PushPaintHelper(this, *m_pWindow);
 m_pWindow->Paint(*m_pWindow, m_aPaintRect);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-05-15 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 98d3ef152b7655e1aab2023304d4644380d5850c
Author: Caolán McNamara 
AuthorDate: Fri May 15 09:45:19 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri May 15 13:19:53 2020 +0200

tdf#131333 SalMenus propogate to parent their selected id conditionally

Menu::Select depends on its handler returning false to allow propogating a
submens's selected id to its parent menu to become its selected id.

without this, while gen menus already have propogated this to its parent in
MenuFloatingWindow::EndExecute, SalMenus as used under kf5/macOS won't
propogate the selected id

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

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 9bfeb9997041..042008200709 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -930,7 +930,15 @@ public:
 IMPL_LINK_NOARG(SalInstanceMenu, SelectMenuHdl, ::Menu*, bool)
 {
 signal_activate(m_xMenu->GetCurItemIdent());
-return true;
+/* tdf#131333 Menu::Select depends on a false here to allow
+   propogating a submens's selected id to its parent menu to become its
+   selected id.
+
+   without this, while gen menus already have propogated this to its parent
+   in MenuFloatingWindow::EndExecute, SalMenus as used under kf5/macOS
+   won't propogate the selected id
+*/
+return false;
 }
 
 class SalInstanceToolbar : public SalInstanceWidget, public virtual 
weld::Toolbar
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-05-09 Thread Miklos Vajna (via logerrit)
 vcl/source/window/bufferdevice.cxx   |   10 +-
 vcl/source/window/bufferdevice.hxx   |2 ++
 vcl/source/window/menufloatingwindow.cxx |   11 +++
 3 files changed, 18 insertions(+), 5 deletions(-)

New commits:
commit 60400ca7e60bc9314ceda13e0d74b32b7481f020
Author: Miklos Vajna 
AuthorDate: Thu May 7 15:38:49 2020 +0200
Commit: Caolán McNamara 
CommitDate: Sat May 9 22:20:44 2020 +0200

tdf#132267 vcl: fix missing scrollers with non-native rendering

Regression from c04169c586ef1d55b1d0ac469bb4fbd4f50bd08a (tdf#125415 vcl
menu floating window: avoid flicker, 2019-05-21) the problem was that
the clip region was set on the buffer, not on the render context. This
means the original clip was used to determine what gets copied from the
buffer to the screen, so the scroller arrows were not rendered.

(cherry picked from commit a65ec136fbd0dae889b20fba657b40af467fcb27)

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

diff --git a/vcl/source/window/bufferdevice.cxx 
b/vcl/source/window/bufferdevice.cxx
index 0092d1ab97e4..188fbb1acc1c 100644
--- a/vcl/source/window/bufferdevice.cxx
+++ b/vcl/source/window/bufferdevice.cxx
@@ -23,12 +23,20 @@ BufferDevice::BufferDevice(const VclPtr& 
pWindow, vcl::RenderContex
 m_pBuffer->EnableRTL(rRenderContext.IsRTLEnabled());
 }
 
-BufferDevice::~BufferDevice()
+void BufferDevice::Dispose()
 {
+if (m_bDisposed)
+{
+return;
+}
+
 m_rRenderContext.DrawOutDev(Point(0, 0), m_pWindow->GetOutputSizePixel(), 
Point(0, 0),
 m_pWindow->GetOutputSizePixel(), *m_pBuffer);
+m_bDisposed = true;
 }
 
+BufferDevice::~BufferDevice() { Dispose(); }
+
 vcl::RenderContext* BufferDevice::operator->() { return m_pBuffer.get(); }
 
 vcl::RenderContext& BufferDevice::operator*() { return *m_pBuffer; }
diff --git a/vcl/source/window/bufferdevice.hxx 
b/vcl/source/window/bufferdevice.hxx
index 5f2471cd26d9..f785b6bdcbee 100644
--- a/vcl/source/window/bufferdevice.hxx
+++ b/vcl/source/window/bufferdevice.hxx
@@ -21,10 +21,12 @@ class VCL_DLLPUBLIC BufferDevice
 ScopedVclPtr m_pBuffer;
 VclPtr m_pWindow;
 vcl::RenderContext& m_rRenderContext;
+bool m_bDisposed = false;
 
 public:
 BufferDevice(const VclPtr& pWindow, vcl::RenderContext& 
rRenderContext);
 ~BufferDevice();
+void Dispose();
 
 vcl::RenderContext* operator->();
 vcl::RenderContext& operator*();
diff --git a/vcl/source/window/menufloatingwindow.cxx 
b/vcl/source/window/menufloatingwindow.cxx
index b14329f7503c..bfb8831e8d5a 100644
--- a/vcl/source/window/menufloatingwindow.cxx
+++ b/vcl/source/window/menufloatingwindow.cxx
@@ -1205,12 +1205,14 @@ void MenuFloatingWindow::Paint(vcl::RenderContext& 
rRenderContext, const tools::
 if (!pMenu)
 return;
 
+// Set the clip before the buffering starts: rPaintRect may be larger than 
the current clip,
+// this way the buffer -> render context copy happens with this clip.
+rRenderContext.Push(PushFlags::CLIPREGION);
+rRenderContext.SetClipRegion(vcl::Region(rPaintRect));
+
 // Make sure that all actual rendering happens in one go to avoid flicker.
 vcl::BufferDevice pBuffer(this, rRenderContext);
 
-pBuffer->Push(PushFlags::CLIPREGION);
-pBuffer->SetClipRegion(vcl::Region(rPaintRect));
-
 if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, 
ControlPart::Entire))
 {
 pBuffer->SetClipRegion();
@@ -1233,7 +1235,8 @@ void MenuFloatingWindow::Paint(vcl::RenderContext& 
rRenderContext, const tools::
 if (nHighlightedItem != ITEMPOS_INVALID)
 RenderHighlightItem(*pBuffer, nHighlightedItem);
 
-pBuffer->Pop();
+pBuffer.Dispose();
+rRenderContext.Pop();
 }
 
 void MenuFloatingWindow::ImplDrawScroller(vcl::RenderContext& rRenderContext, 
bool bUp)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-05-06 Thread Andreas Heinisch (via logerrit)
 vcl/source/edit/textview.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit d936d5658aba2ab921fe144f5240f42304e1c5ff
Author: Andreas Heinisch 
AuthorDate: Mon May 4 17:41:11 2020 +0200
Commit: Xisco Faulí 
CommitDate: Wed May 6 13:52:33 2020 +0200

tdf#64690 - Extend selection on find/replace

In the Basic code window, extend the selection on the last paragraph
during the search/replace process in order to consider newly inserted
text portions.

Change-Id: I27ad998709ac25cffbef4a354c87d422f97e1b51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93432
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit e7f3731b8d3e930f85e7df0c0e55bbb1aaea191b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93377
Reviewed-by: Xisco Faulí 

diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 2eaa1b2f598c..9d4d46a0839d 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -2204,6 +2204,11 @@ sal_uInt16 TextView::Replace( const 
i18nutil::SearchOptions& rSearchOptions, boo
 nFound++;
 
 TextPaM aNewStart = pTextEngine->ImpInsertText( aSel, 
rSearchOptions.replaceString );
+// tdf#64690 - extend selection to include inserted text portions
+if ( aSel.GetEnd().GetPara() == aSearchSel.GetEnd().GetPara() )
+{
+aSearchSel.GetEnd().GetIndex() += 
rSearchOptions.replaceString.getLength() - 1;
+}
 aSel = aSearchSel;
 aSel.GetStart() = aNewStart;
 bFound = pTextEngine->Search( aSel, rSearchOptions );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-05-06 Thread Justin Luth (via logerrit)
 vcl/source/control/button.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 64d7f805616fd781d87b49156860d96f081a5a45
Author: Justin Luth 
AuthorDate: Tue May 5 21:13:07 2020 +0300
Commit: Caolán McNamara 
CommitDate: Wed May 6 12:22:58 2020 +0200

Revert "tdf#125609c10 vcl/button: enforce only one radio selected on init"

This reverts commit d35171456bc230efdaa9426da1398b2db7fa0df8,
in order to resolve tdf#132581.

Only applying this to LO 6.4 which is nearing stable.
An attempt to find the real problem will be made for 7.0,
but since this reverted commit is really obsolete, it can
easily just be reverted.  (It fixes a situation caused by
a commit that has since been fully reverted. So it should
still be a valid fix, but if it exposes other problems,
it can easily just be removed to cover them up again...)

Change-Id: I0d765ce0cc4ab2b9d282d36a239518d43d6015ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93522
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Caolán McNamara 

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 7d235e6bd4c8..f3fedd972a68 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1821,9 +1821,6 @@ WinBits RadioButton::ImplInitStyle( const vcl::Window* 
pPrevWindow, WinBits nSty
 nStyle &= ~WB_TABSTOP;
 }
 
-if ( IsChecked() && IsRadioCheckEnabled() )
-ImplUncheckAllOther( /*bSetStyle=*/false );
-
 return nStyle;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-04-09 Thread Stephan Bergmann (via logerrit)
 vcl/source/filter/jpeg/Exif.cxx |   16 
 1 file changed, 4 insertions(+), 12 deletions(-)

New commits:
commit e06d4022d98f6a21a0a60d1491e7126f151c
Author: Stephan Bergmann 
AuthorDate: Wed Apr 8 11:56:34 2020 +0200
Commit: Michael Stahl 
CommitDate: Thu Apr 9 10:53:24 2020 +0200

tdf#131969: Fix reading SHORT Orientation value

 "CIPA DC- 
008-Translation-
2012: Exchangeable image file format for digital still cameras: Exif 
Version 2.3"
documents that the Orientation tag 0x0112 expects a count of 1 values of 
type SHORT
(16 bit), and details that values <= 4 bytes are stored in the Value Offset 
field
always using bytes starting from the left of the field.

This is a regression introduced with 
42c0e433aca68c669bc0f55af404b6bae1655fba "Avoid
-fsanitize=misaligned-pointer-use".  That commit had wondered why the 
original code
had used OSL_SWAPWORD instead of OSL_SWAPDWORD when reading and writing such
orientation values.  It turns out that that original code had happened to 
work
correctly when processing either little or big endian data on a little 
endian
machine.  (Though it would have worked incorrectly when processing either 
little or
big endian data on a big endian machine.)  And with
42c0e433aca68c669bc0f55af404b6bae1655fba, the code worked when processing 
little
endian data on a little endian machine, but failed when processing big 
endian data
on a little endian machine, as is the case for tdf#131669 on e.g. x86_64.

(read32 has become unused and is thus removed.)

Change-Id: I7992629048ac44c00ee703c75164f3d094773244
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91881
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit fd5961cb0e2ebc2f5797f76a2b1f9fd52ca4b3ab)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91889
Reviewed-by: Michael Stahl 

diff --git a/vcl/source/filter/jpeg/Exif.cxx b/vcl/source/filter/jpeg/Exif.cxx
index 6dd3bd1b2baa..b0f68a4aed40 100644
--- a/vcl/source/filter/jpeg/Exif.cxx
+++ b/vcl/source/filter/jpeg/Exif.cxx
@@ -169,16 +169,6 @@ void write16(sal_uInt16 value, sal_uInt8 (& data)[2], bool 
littleEndian) {
 }
 }
 
-sal_uInt32 read32(sal_uInt8 const (& data)[4], bool littleEndian) {
-if (littleEndian) {
-return data[0] | (sal_uInt32(data[1]) << 8)
-| (sal_uInt32(data[2]) << 16) | (sal_uInt32(data[3]) << 24);
-} else {
-return data[3] | (sal_uInt32(data[2]) << 8)
-| (sal_uInt32(data[1]) << 16) | (sal_uInt32(data[0]) << 24);
-}
-}
-
 void write32(sal_uInt32 value, sal_uInt8 (& data)[4], bool littleEndian) {
 if (littleEndian) {
 data[0] = value & 0xFF;
@@ -210,11 +200,13 @@ void Exif::processIFD(sal_uInt8* pExifData, sal_uInt16 
aLength, sal_uInt16 aOffs
 {
 write16(3, ifd->type, littleEndian);
 write32(1, ifd->count, littleEndian);
-write32(maOrientation, ifd->offset, littleEndian);
+write16(
+maOrientation, reinterpret_cast(ifd->offset), littleEndian);
 }
 else
 {
-sal_uInt32 nIfdOffset = read32(ifd->offset, littleEndian);
+sal_uInt16 nIfdOffset = read16(
+reinterpret_cast(ifd->offset), 
littleEndian);
 maOrientation = convertToOrientation(nIfdOffset);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-04-08 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 7eb78233b46652f4317aef34a1bac4d084b00e2d
Author: Caolán McNamara 
AuthorDate: Tue Apr 7 11:22:52 2020 +0100
Commit: Michael Stahl 
CommitDate: Wed Apr 8 11:25:05 2020 +0200

Resolves: tdf#131715 don't keep trying the same page if we're already on it

return of false means we didn't change page for some reason, the idea is
that it might be blocked to go to another page, in which case sync with
what page we ended up on, but don't bother with that if the dest page
would be the same as the current page

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

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 72db47b4e4f7..9bfeb9997041 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1933,8 +1933,9 @@ IMPL_LINK_NOARG(SalInstanceAssistant, 
OnRoadmapItemSelected, LinkParamNone*, voi
 {
 if (notify_events_disabled())
 return;
-int nPageIndex(find_id(m_xWizard->GetCurrentRoadmapItemID()));
-if (!signal_jump_page(get_page_ident(nPageIndex)))
+auto nCurItemId = m_xWizard->GetCurrentRoadmapItemID();
+int nPageIndex(find_id(nCurItemId));
+if (!signal_jump_page(get_page_ident(nPageIndex)) && nCurItemId != 
m_xWizard->GetCurLevel())
 m_xWizard->SelectRoadmapItemByID(m_xWizard->GetCurLevel());
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-03-25 Thread Samuel Mehrbrodt (via logerrit)
 vcl/source/window/window2.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dc78bbbdbe5aa3a7304607876231e01f17878eab
Author: Samuel Mehrbrodt 
AuthorDate: Wed Mar 25 14:08:14 2020 +0100
Commit: Xisco Faulí 
CommitDate: Wed Mar 25 17:48:57 2020 +0100

tdf#131280 Fix endless invalidation loop on documents with form controls

Restores a condition which was removed in 
8de98e61fbc96bf523b3dec7e1e52eb7e2d7693e

Change-Id: I68a9f8a362d2ded9975e7c73e2a0533aa5ad9e94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91053
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 4af18ebae9d74b43fcd114d5fa5b145586651bc2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90957
Reviewed-by: Xisco Faulí 

diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 6f32ea52eafd..9183ded20184 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1335,7 +1335,7 @@ void Window::queue_resize(StateChangedType eReason)
 
 if (VclPtr pParent = GetParentWithLOKNotifier())
 {
-if (!pParent->IsInInitShow())
+if (GetParentDialog() && !pParent->IsInInitShow())
 LogicInvalidate(nullptr);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-03-23 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit a3b00e6192f8185eed574aa6782fec0ee42f091f
Author: Caolán McNamara 
AuthorDate: Mon Mar 23 16:42:07 2020 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Mar 24 02:37:15 2020 +0100

tdf#131434 ensure expander icon column is created

which the normal ::insert case does, but the bulk insert omitted

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

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 6b092f4d89cd..72db47b4e4f7 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3591,9 +3591,11 @@ public:
 if (pFixedWidths)
 set_column_fixed_widths(*pFixedWidths);
 
+Image aDummy;
 for (int i = 0; i < nSourceCount; ++i)
 {
 aVclIter.iter = new SvTreeListEntry;
+aVclIter.iter->AddItem(std::make_unique(aDummy, 
aDummy, false));
 m_xTreeView->Insert(aVclIter.iter, nullptr, TREELIST_APPEND);
 func(aVclIter, i);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-03-11 Thread Caolán McNamara (via logerrit)
 vcl/source/edit/vclmedit.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 156f14c6632df104186feeba250abdf7de4a2e30
Author: Caolán McNamara 
AuthorDate: Tue Mar 10 14:18:52 2020 +
Commit: Xisco Faulí 
CommitDate: Wed Mar 11 15:12:05 2020 +0100

Resolves: tdf#131248 a11y crash when closing SQL Edit Query

Change-Id: I39db7b352dd460f46092a054bfa89f5acdda54c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90273
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index e21d5c4c8f57..49b63e9ae3e9 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -1087,6 +1087,9 @@ void VclMultiLineEdit::SetReadOnly( bool bReadOnly )
 
 bool VclMultiLineEdit::IsReadOnly() const
 {
+if (!pImpVclMEdit)  // might be called from within the dtor, when 
pImpVclMEdit == NULL is a valid state
+return true;
+
 return pImpVclMEdit->IsReadOnly();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-03-04 Thread Heiko Tietze (via logerrit)
 vcl/source/window/printdlg.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9c3171d4209f8eceb0152d7d9f70456c5813914e
Author: Heiko Tietze 
AuthorDate: Tue Feb 25 11:58:02 2020 +0100
Commit: Heiko Tietze 
CommitDate: Wed Mar 4 21:17:58 2020 +0100

Resolves tdf#127782 - New Print dialog is too high

Amends Iea41f9cf335b75210de0acf5688fddd5e3dd3dbb

Change-Id: Ic669332245ad9c5ee6366765da8a5bc632dd159c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89423
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
(cherry picked from commit b268715912d4c2034b9b9d38e75446bef7bbb11f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89921

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index b42a1ce41213..7d340559806a 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -147,8 +147,8 @@ void PrintDialog::PrintPreviewWindow::Resize()
 
 void PrintDialog::PrintPreviewWindow::SetDrawingArea(weld::DrawingArea* 
pDrawingArea)
 {
-pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() 
* 55,
-   pDrawingArea->get_text_height() * 40);
+pDrawingArea->set_size_request(pDrawingArea->get_approximate_digit_width() 
* 45,
+   pDrawingArea->get_text_height() * 30);
 CustomWidgetController::SetDrawingArea(pDrawingArea);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-02-27 Thread Noel Grandin (via logerrit)
 vcl/source/gdi/impvect.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2854c7293c45b5e5a86d7b390f8e198d09daec64
Author: Noel Grandin 
AuthorDate: Thu Feb 27 16:26:00 2020 +0200
Commit: Xisco Faulí 
CommitDate: Thu Feb 27 19:33:30 2020 +0100

tdf#130679 Draw: Convert to polygon doesn't work

regression from
commit 1cd32bcf1b92bd53320717626601135623dadd55
Date:   Mon Dec 10 11:28:59 2018 +0200
loplugin:useuniqueptr in vcl

Change-Id: I7753f54822d0249d1fcda97581051d023969fc2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89636
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit dc5be8f6020dd812664af250d03d2a14b9e8a3cb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89584
Reviewed-by: Xisco Faulí 

diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx
index 5ecfb6aedbd1..9f830ccebb7e 100644
--- a/vcl/source/gdi/impvect.cxx
+++ b/vcl/source/gdi/impvect.cxx
@@ -117,7 +117,7 @@ static bool ImplColorSetCmpFnc( const ImplColorSet& lhs, 
const ImplColorSet& rhs
 const sal_uInt8 cLum2 = rhs.maColor.GetLuminance();
 return cLum1 < cLum2;
 }
-return lhs.mbSet < rhs.mbSet;
+return lhs.mbSet > rhs.mbSet;
 }
 
 class ImplPointArray
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-02-25 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 94c9d1e61702e64c03b2261ce1359bf3e459b75a
Author: Caolán McNamara 
AuthorDate: Tue Feb 25 11:45:41 2020 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Feb 25 18:20:35 2020 +0100

tdf#130915 SvTreeList::Move needs to move from lower index to higher

the reverse doesn't work

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

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 48f960f851c0..6b092f4d89cd 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3659,9 +3659,11 @@ public:
 
 virtual void swap(int pos1, int pos2) override
 {
+int min = std::min(pos1, pos2);
+int max = std::max(pos1, pos2);
 SvTreeList* pModel = m_xTreeView->GetModel();
-SvTreeListEntry* pEntry1 = pModel->GetEntry(nullptr, pos1);
-SvTreeListEntry* pEntry2 = pModel->GetEntry(nullptr, pos2);
+SvTreeListEntry* pEntry1 = pModel->GetEntry(nullptr, min);
+SvTreeListEntry* pEntry2 = pModel->GetEntry(nullptr, max);
 pModel->Move(pEntry1, pEntry2);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-02-22 Thread Jan-Marek Glogowski (via logerrit)
 vcl/source/window/window.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit b15f6e3388eb031f2c57d21f0ea109f90e4e3c61
Author: Jan-Marek Glogowski 
AuthorDate: Thu Feb 20 16:42:09 2020 +0100
Commit: Michael Weghorn 
CommitDate: Sat Feb 22 10:02:28 2020 +0100

tdf#130841 resize to client size after SetPosSize

This fixes the hack of the native menu bar with a smaller client
size in relation to the frame geometry.
Eventually this should be replaced by proper mnTopBorder usage,
but this currently isn't working.

Change-Id: Ib5825d9c8f77e463fcb086e0373228fe91d8705a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89202
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit b26ca5b13733b46c2df0787502f885e15b390956)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89144
Reviewed-by: Michael Weghorn 

diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 19e2e105a168..49551be5f901 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2789,6 +2789,10 @@ void Window::setPosSizePixel( long nX, long nY,
 
 pWindow->mpWindowImpl->mpFrame->SetPosSize( nX, nY, nWidth, nHeight, 
nSysFlags );
 
+// Adjust resize with the hack of different client size and frame 
geometries to fix
+// native menu bars. Eventually this should be replaced by proper 
mnTopBorder usage.
+pWindow->mpWindowImpl->mpFrame->GetClientSize(nWidth, nHeight);
+
 // Resize should be called directly. If we haven't
 // set the correct size, we get a second resize from
 // the system with the correct size. This can be happened
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-02-19 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 27badf859389b20d03b96e7459a8110bc48224db
Author: Caolán McNamara 
AuthorDate: Tue Feb 18 13:06:56 2020 +
Commit: Michael Stahl 
CommitDate: Wed Feb 19 10:55:00 2020 +0100

Resolves: tdf#130756 null deref in empty treeview

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

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index e1baf6c61d90..48f960f851c0 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -6035,7 +6035,10 @@ IMPL_LINK(SalInstanceEntryTreeView, KeyPressListener, 
VclWindowEvent&, rEvent, v
 m_pTreeView->disable_notify_events();
 auto& rListBox = m_pTreeView->getTreeView();
 if (!rListBox.FirstSelected())
-rListBox.Select(rListBox.First(), true);
+{
+if (SvTreeListEntry* pEntry = rListBox.First())
+rListBox.Select(pEntry, true);
+}
 else
 rListBox.KeyInput(rKeyEvent);
 m_xEntry->set_text(m_xTreeView->get_selected_text());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-02-12 Thread Stephan Bergmann (via logerrit)
 vcl/source/control/edit.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit d84eaea950f276e7ba0d155cdbed056bcc815255
Author: Stephan Bergmann 
AuthorDate: Tue Feb 11 10:31:18 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 12 09:13:02 2020 +0100

tdf#130555: Prevent negative aSelection.Min()

...which would violate the the preconditions of the later call to 
maText.remove.

When BreakIteratorImpl::previousWord
(i18npool/source/breakiterator/breakiteratorImpl.cxx) is called to e.g. move
back over a single space at the start of the text, at least for an en-US 
locale
it will fall through to the call to BreakIterator_Unicode::previousWord
(i18npool/source/breakiterator/breakiterator_unicode.cxx) at the bottom of 
the
function.  That in turn calls icu::BreakIterator::preceding, which is 
documented
(workdir/UnpackedTarball/icu/source/common/unicode/brkiter.h) to return
icu::BreakIterator::DONE (i.e., -1, see
workdir/UnpackedTarball/icu/source/common/unicode/brkiter.h) in that case, 
which
causes BreakIterator_Unicode::previousWord to return a Boundary with 
startPos ==
endPos == -1.

The documentation of UNO method css.i18n.XBreakIterator::previousWord
(offapi/com/sun/star/i18n/XBreakIterator.idl) is silent about the expected
return value in such a case.  But lets assume that returning such a [-1..-1]
Boundary is as intended, and locally address this case in Edit::ImplDelete,
making aSelection start at the start of the text.

Change-Id: I40e17ba602088e72aa6962cb41dd8e1cdf6e2561
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88431
Tested-by: Jenkins
Reviewed-by: Eike Rathke 
(cherry picked from commit e8f26dc13b65b1a05d948d9c95110c86315e8f20)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88402

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index d76b4464ffcf..8cb0a06594fa 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -61,6 +61,7 @@
 
 #include 
 
+#include 
 #include 
 
 using namespace ::com::sun::star;
@@ -687,10 +688,14 @@ void Edit::ImplDelete( const Selection& rSelection, 
sal_uInt8 nDirection, sal_uI
 {
 i18n::Boundary aBoundary = xBI->getWordBoundary( 
maText.toString(), aSelection.Min(),
 GetSettings().GetLanguageTag().getLocale(), 
i18n::WordType::ANYWORD_IGNOREWHITESPACES, true );
-if ( aBoundary.startPos == aSelection.Min() )
+auto startPos = aBoundary.startPos;
+if ( startPos == aSelection.Min() )
+{
 aBoundary = xBI->previousWord( maText.toString(), 
aSelection.Min(),
 GetSettings().GetLanguageTag().getLocale(), 
i18n::WordType::ANYWORD_IGNOREWHITESPACES );
-aSelection.Min() = aBoundary.startPos;
+startPos = std::max(aBoundary.startPos, sal_Int32(0));
+}
+aSelection.Min() = startPos;
 }
 else if ( nMode == EDIT_DELMODE_RESTOFCONTENT )
{
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-02-07 Thread Caolán McNamara (via logerrit)
 vcl/source/control/wizardmachine.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c852f0e4ac4cee2a1b69ff8b1c5cab6633664098
Author: Caolán McNamara 
AuthorDate: Thu Feb 6 15:52:22 2020 +
Commit: Xisco Faulí 
CommitDate: Fri Feb 7 19:40:45 2020 +0100

tdf#130462 call SetMinOutputSizePixel before SetOutputSizePixel

Change-Id: I04716e91b7c9b5f1e9db1fd175f5dcbe0600bf1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88116
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/vcl/source/control/wizardmachine.cxx 
b/vcl/source/control/wizardmachine.cxx
index 2fced940867e..57890c45a070 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -480,8 +480,8 @@ namespace vcl
 }
 }
 ImplCalcSize( aDlgSize );
-SetOutputSizePixel( aDlgSize );
 SetMinOutputSizePixel( aDlgSize );
+SetOutputSizePixel( aDlgSize );
 }
 
 void RoadmapWizard::StateChanged( StateChangedType nType )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-02-04 Thread Samuel Mehrbrodt (via logerrit)
 vcl/source/control/button.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit a1f07a57e548763c6afd546938caa131a2a22427
Author: Samuel Mehrbrodt 
AuthorDate: Wed Jan 29 16:41:02 2020 +0100
Commit: Thorsten Behrens 
CommitDate: Tue Feb 4 22:17:05 2020 +0100

Place button text in tooltip if it doesn't fit into the button

Seen this happening in custom sidebars (from extensions).
When the text is too long for the button, it will get cut off
and there is no way to view the button text.

Change-Id: I86ce72154e0371bdf24480be41517855dc3ce050
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87692
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit dabb6176407067ef8d46bdde863b087457805c6a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87948
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 53eaa3ff6b0c..7d235e6bd4c8 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -216,6 +216,11 @@ void Button::ImplDrawAlignedImage(OutputDevice* pDev, 
Point& rPos,
 else if (bDrawText && !bDrawImage && !bHasSymbol)
 {
 aOutRect = DrawControlText(*pDev, aOutRect, aText, nTextStyle, 
nullptr, nullptr);
+tools::Rectangle textRect = GetTextRect(
+tools::Rectangle(Point(), Size(0x7fff, 0x7fff)), aText, 
nTextStyle);
+// If the button text doesn't fit into it, put it into a tooltip 
(might happen in sidebar)
+if (GetQuickHelpText().isEmpty() && textRect.getWidth() > 
rSize.getWidth())
+SetQuickHelpText(aText);
 
 ImplSetFocusRect(aOutRect);
 rSize = aOutRect.GetSize();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-02-04 Thread Caolán McNamara (via logerrit)
 vcl/source/control/edit.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 1cff94d109c38cc4c929e9ab69c8d5fbd881ba84
Author: Caolán McNamara 
AuthorDate: Mon Feb 3 15:19:07 2020 +
Commit: Michael Stahl 
CommitDate: Tue Feb 4 11:35:24 2020 +0100

Related: tdf#129933 assert on pasting over selection in edit

when its selected right to left with cursor flashing at the start

format->paragraph->area->color->pick, cursor into hex# edit, end to
cursor at the end, shift + home to select all, right to left, ctrl+c,
ctrl+v, assert

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

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 9e25359bcf19..d76b4464ffcf 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1290,8 +1290,12 @@ void Edit::ImplPaste( uno::Reference< 
datatransfer::clipboard::XClipboard > cons
 uno::Any aData = xDataObj->getTransferData( aFlavor );
 OUString aText;
 aData >>= aText;
-if( ImplTruncateToMaxLen( aText, maSelection.Len() ) )
+
+Selection aSelection(maSelection);
+aSelection.Justify();
+if (ImplTruncateToMaxLen(aText, aSelection.Len()))
 ShowTruncationWarning(GetFrameWeld());
+
 ReplaceSelected( aText );
 }
 catch( const css::uno::Exception& )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-02-03 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/png/pngread.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f7c4be8d8ab59859f32062f4a6401a9cf9001e4d
Author: Caolán McNamara 
AuthorDate: Sat Feb 1 12:17:22 2020 +
Commit: Michael Stahl 
CommitDate: Mon Feb 3 12:24:35 2020 +0100

ofz#20422 reversed condition

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

diff --git a/vcl/source/filter/png/pngread.cxx 
b/vcl/source/filter/png/pngread.cxx
index aa452bf51a01..d8dd57ff11e0 100644
--- a/vcl/source/filter/png/pngread.cxx
+++ b/vcl/source/filter/png/pngread.cxx
@@ -868,7 +868,7 @@ void PNGReaderImpl::ImplGetBackground()
 sal_uInt8 nGreen = ImplScaleColor();
 sal_uInt8 nBlue = ImplScaleColor();
 // ofz#18653 slow and uninteresting
-if (!utl::ConfigManager::IsFuzzing())
+if (utl::ConfigManager::IsFuzzing())
 return;
 mxAcc->Erase(Color(nRed, nGreen, nBlue));
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-01-29 Thread Caolán McNamara (via logerrit)
 vcl/source/window/menuitemlist.cxx |   36 ++--
 1 file changed, 30 insertions(+), 6 deletions(-)

New commits:
commit 3dea3e9b4a6a658a02c2547dcea15e320e62efaf
Author: Caolán McNamara 
AuthorDate: Tue Jan 28 20:20:34 2020 +
Commit: Miklos Vajna 
CommitDate: Wed Jan 29 10:42:26 2020 +0100

Resolves: tdf#130130 Insert menu, multiple hotkey never reaches 3rd item

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

diff --git a/vcl/source/window/menuitemlist.cxx 
b/vcl/source/window/menuitemlist.cxx
index 7e55f0c3ed32..6921e6208118 100644
--- a/vcl/source/window/menuitemlist.cxx
+++ b/vcl/source/window/menuitemlist.cxx
@@ -180,17 +180,29 @@ MenuItemData* MenuItemList::SearchItem(
 nDuplicates = GetItemCount( cSelectChar );  // return number of duplicates
 if( nDuplicates )
 {
+MenuItemData* pFirstMatch = nullptr;
+size_t nFirstPos(0);
 for ( rPos = 0; rPos < nListCount; rPos++)
 {
 MenuItemData* pData = maItemList[ rPos ].get();
 if ( pData->bEnabled && rI18nHelper.MatchMnemonic( pData->aText, 
cSelectChar ) )
 {
-if( nDuplicates > 1 && rPos == nCurrentPos )
-continue;   // select next entry with the same mnemonic
-else
+if (nDuplicates == 1)
 return pData;
+if (rPos > nCurrentPos)
+return pData;   // select next entry with the same mnemonic
+if (!pFirstMatch)   // stash the first match for use if 
nothing follows nCurrentPos
+{
+pFirstMatch = pData;
+nFirstPos = rPos;
+}
 }
 }
+if (pFirstMatch)
+{
+rPos = nFirstPos;
+return pFirstMatch;
+}
 }
 
 // nothing found, try keycode instead
@@ -202,6 +214,8 @@ MenuItemData* MenuItemList::SearchItem(
 if( aKeyCode.GetCode() >= KEY_A && aKeyCode.GetCode() <= KEY_Z )
 ascii = sal::static_int_cast('A' + (aKeyCode.GetCode() - 
KEY_A));
 
+MenuItemData* pFirstMatch = nullptr;
+size_t nFirstPos(0);
 for ( rPos = 0; rPos < nListCount; rPos++)
 {
 MenuItemData* pData = maItemList[ rPos ].get();
@@ -223,14 +237,24 @@ MenuItemData* MenuItemList::SearchItem(
  )
   )
 {
-if( nDuplicates > 1 && rPos == nCurrentPos )
-continue;   // select next entry with the same 
mnemonic
-else
+if (nDuplicates == 1)
 return pData;
+if (rPos > nCurrentPos)
+return pData;   // select next entry with the same 
mnemonic
+if (!pFirstMatch)   // stash the first match for use 
if nothing follows nCurrentPos
+{
+pFirstMatch = pData;
+nFirstPos = rPos;
+}
 }
 }
 }
 }
+if (pFirstMatch)
+{
+rPos = nFirstPos;
+return pFirstMatch;
+}
 }
 
 return nullptr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-01-08 Thread Tomáš Chvátal (via logerrit)
 vcl/source/window/layout.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 95d7d13205c05c2114a6d3bc2c4538246b22f3e0
Author: Tomáš Chvátal 
AuthorDate: Wed Jan 8 13:25:05 2020 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Jan 8 15:40:41 2020 +0100

tdf#129879 Fix wrong order of buttons

Change-Id: I0cb135c5b8298fd7c5579673d0eaff7068a03842
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86426
Tested-by: Jenkins
Reviewed-by: Tomáš Chvátal 
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 981ac621aa60..9c5a36304a21 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -718,8 +718,8 @@ static int getButtonPriority(const OString )
 const OUString  = Application::GetDesktopEnvironment();
 
 if (rEnv.equalsIgnoreAsciiCase("windows") ||
-rEnv.equalsIgnoreAsciiCase("tde") ||
-rEnv.startsWithIgnoreAsciiCase("kde"))
+rEnv.equalsIgnoreAsciiCase("lxqt") ||
+rEnv.startsWithIgnoreAsciiCase("plasma"))
 {
 pOrder = [0];
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2020-01-07 Thread Jim Raykowski (via logerrit)
 vcl/source/window/taskpanelist.cxx |   24 +++-
 1 file changed, 7 insertions(+), 17 deletions(-)

New commits:
commit e9d591bbf166162c39865718ceab7a9b976676ce
Author: Jim Raykowski 
AuthorDate: Sun Nov 24 20:40:46 2019 -0900
Commit: Mike Kaganski 
CommitDate: Tue Jan 7 16:45:43 2020 +0100

tdf#129004 Make shift+F6 cycle order reverse of F6

Change-Id: I52013b4c54ef5e457d9fa19210d08d9c042fed45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/83637
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 
(cherry picked from commit 32b9d07baa0cf6907f14ccb9aa068b51d95eefaa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86342
Reviewed-by: Mike Kaganski 

diff --git a/vcl/source/window/taskpanelist.cxx 
b/vcl/source/window/taskpanelist.cxx
index 1f382b824907..35828b7d1429 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -61,19 +61,6 @@ struct LTRSort
 return ( pos1.X() < pos2.X() );
 }
 };
-struct LTRSortBackward
-{
-bool operator()( const vcl::Window* w2, const vcl::Window* w1 ) const
-{
-Point pos1(ImplTaskPaneListGetPos( w1 ));
-Point pos2(ImplTaskPaneListGetPos( w2 ));
-
-if( pos1.X() == pos2.X() )
-return ( pos1.Y() < pos2.Y() );
-else
-return ( pos1.X() < pos2.X() );
-}
-};
 
 static void ImplTaskPaneListGrabFocus( vcl::Window *pWindow, bool bForward )
 {
@@ -258,10 +245,10 @@ vcl::Window* TaskPaneList::FindNextSplitter( vcl::Window 
*pWindow )
 // returns first valid item (regardless of type) if pWindow==0, otherwise 
returns next valid float
 vcl::Window* TaskPaneList::FindNextFloat( vcl::Window *pWindow, bool bForward )
 {
-if( bForward )
-::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() );
-else
-::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), 
LTRSortBackward() );
+::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() );
+
+if ( !bForward )
+::std::reverse( mTaskPanes.begin(), mTaskPanes.end() );
 
 auto p = mTaskPanes.begin();
 if( pWindow )
@@ -285,6 +272,9 @@ vcl::Window* TaskPaneList::FindNextFloat( vcl::Window 
*pWindow, bool bForward )
 ++p;
 }
 
+if ( !bForward )
+::std::reverse( mTaskPanes.begin(), mTaskPanes.end() );
+
 return pWindow;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2019-12-27 Thread Arnaud Versini (via logerrit)
 vcl/source/control/edit.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit b0b7a38bd0ae6261ceeea20b31523070bf66b806
Author: Arnaud Versini 
AuthorDate: Sun Dec 8 11:42:35 2019 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Dec 27 20:56:03 2019 +0100

tdf#83248: Use the right text color when printing fields

Change-Id: I81167207a35d524660b9a1d6740cfce551489c4a
Reviewed-on: https://gerrit.libreoffice.org/84707
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
(cherry picked from commit 10d345faa087fa49692f38bb2ece22560f423ba7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85848
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 6eb9e991a38b..b4f3edd6a71a 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -1732,7 +1732,6 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, 
const Size& rSize, DrawF
 Point aPos = pDev->LogicToPixel( rPos );
 Size aSize = pDev->LogicToPixel( rSize );
 vcl::Font aFont = GetDrawPixelFont( pDev );
-OutDevType eOutDevType = pDev->GetOutDevType();
 
 pDev->Push();
 pDev->SetMapMode();
@@ -1759,7 +1758,7 @@ void Edit::Draw( OutputDevice* pDev, const Point& rPos, 
const Size& rSize, DrawF
 }
 
 // Content
-if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) )
+if ( nFlags & DrawFlags::Mono )
 pDev->SetTextColor( COL_BLACK );
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2019-12-27 Thread Samuel Mehrbrodt (via logerrit)
 vcl/source/control/combobox.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3d4c6392071ce3df0b5fdcf45404e6ee781e4cce
Author: Samuel Mehrbrodt 
AuthorDate: Mon Dec 23 11:15:20 2019 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Dec 27 20:49:35 2019 +0100

tdf#129490 Fix enter key in combo box

Follow-up fix for 7de9417d5f65d35227c7f80f6d587c2a56bde4e0

Change-Id: I0b05f11b79d5fcd4e4823c1e31c087724ebc85f8
Reviewed-on: https://gerrit.libreoffice.org/85748
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 09c0dc8b80b91a4f2e7ad3569a59402ee131eaf4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85834
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 710b4a0bac3e..4b19c42ad5c4 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -745,7 +745,7 @@ bool ComboBox::EventNotify( NotifyEvent& rNEvt )
 
 case KEY_RETURN:
 {
-if (rNEvt.GetWindow() == m_pImpl->m_pSubEdit)
+if ((rNEvt.GetWindow() == m_pImpl->m_pSubEdit) && 
IsInDropDown())
 {
 m_pImpl->m_pImplLB->ProcessKeyInput( aKeyEvt );
 bDone = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2019-12-19 Thread Jim Raykowski (via logerrit)
 vcl/source/window/toolbox.cxx |   22 +++---
 1 file changed, 19 insertions(+), 3 deletions(-)

New commits:
commit a42bc2e56f935bb3caa22bd3f6ff27720939cb29
Author: Jim Raykowski 
AuthorDate: Tue Oct 22 18:24:07 2019 -0800
Commit: Adolfo Jayme Barrientos 
CommitDate: Fri Dec 20 04:28:23 2019 +0100

tdf#127552 Make toolbox highlighting behave as intended

This patch provides intended highlight behavior to my understanding of
comments found in the toolbox source code.

 *only highlight when the focus is not inside a child window of a
toolbox eg, in an edit control
 *do not highlight when focus is in a different toolbox
 *only clear highlight when focus is not in toolbar

Change-Id: Ia18d35c4255ed0940bce5f0c6d9448ed2c85c6fe
Reviewed-on: https://gerrit.libreoffice.org/81356
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 
(cherry picked from commit 800b6f095f95ccfb8a7ba9755292332bf97f97ad)
Reviewed-on: https://gerrit.libreoffice.org/83446
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 7d0f56c9e804..3b0d6b5a5f7e 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3068,8 +3068,24 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
 // eg, in an edit control
 // and do not highlight when focus is in a different toolbox
 bool bDrawHotSpot = true;
-vcl::Window *pWin = Application::GetFocusWindow();
-if( pWin && pWin->ImplGetWindowImpl()->mbToolBox && pWin != this )
+vcl::Window *pFocusWin = Application::GetFocusWindow();
+
+bool bFocusWindowIsAToolBoxChild = false;
+if (pFocusWin)
+{
+vcl::Window *pWin = pFocusWin->GetParent();
+while (pWin)
+{
+if(pWin->ImplGetWindowImpl()->mbToolBox)
+{
+bFocusWindowIsAToolBoxChild = true;
+break;
+}
+pWin = pWin->GetParent();
+}
+}
+
+if( bFocusWindowIsAToolBoxChild || (pFocusWin && 
pFocusWin->ImplGetWindowImpl()->mbToolBox && pFocusWin != this) )
 bDrawHotSpot = false;
 
 if ( mbSelection && bDrawHotSpot )
@@ -3204,7 +3220,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
 
 // only clear highlight when focus is not in toolbar
 bool bMenuButtonHit = mpData->maMenubuttonItem.maRect.IsInside( 
aMousePos ) && ImplHasClippedItems();
-if ( bClearHigh || bMenuButtonHit )
+if ( !HasFocus() && (bClearHigh || bMenuButtonHit) )
 {
 if ( !bMenuButtonHit && mpData->mbMenubuttonSelected )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2019-12-17 Thread Noel Grandin (via logerrit)
 vcl/source/outdev/text.cxx |   12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 580f2b93a9c754743341e5e2f40084bceb8a1680
Author: Noel Grandin 
AuthorDate: Tue Dec 17 12:54:56 2019 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Dec 17 23:52:02 2019 +0100

tdf#112989 reduce export to PDF time

reduces the time from 33s to 24s for me

Change-Id: Ia70e1c4220ebedf0b686ed76c5704efa551591fe
Reviewed-on: https://gerrit.libreoffice.org/85281
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 11c0effe3def917ec2002a30dbbcca1c5758ffa9)
Reviewed-on: https://gerrit.libreoffice.org/85302
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 3c69069929a8..0bb1d36fd35e 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -48,6 +48,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define TEXT_DRAW_ELLIPSIS  (DrawTextFlags::EndEllipsis | 
DrawTextFlags::PathEllipsis | DrawTextFlags::NewsEllipsis)
 
@@ -1189,7 +1190,7 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( 
OUString& rStr,
 const sal_Unicode* pBase = rStr.getStr();
 const sal_Unicode* pStr = pBase + nMinIndex;
 const sal_Unicode* pEnd = pBase + nEndIndex;
-OUStringBuffer sTmpStr(rStr);
+boost::optional xTmpStr;
 for( ; pStr < pEnd; ++pStr )
 {
 // TODO: are there non-digit localizations?
@@ -1198,11 +1199,16 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( 
OUString& rStr,
 // translate characters to local preference
 sal_UCS4 cChar = GetLocalizedChar( *pStr, meTextLanguage );
 if( cChar != *pStr )
+{
+if (!xTmpStr)
+xTmpStr = OUStringBuffer(rStr);
 // TODO: are the localized digit surrogates?
-sTmpStr[pStr - pBase] = cChar;
+(*xTmpStr)[pStr - pBase] = cChar;
+}
 }
 }
-rStr = sTmpStr.makeStringAndClear();
+if (xTmpStr)
+rStr = (*xTmpStr).makeStringAndClear();
 }
 
 // right align for RTL text, DRAWPOS_REVERSED, RTL window style
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2019-12-15 Thread Caolán McNamara (via logerrit)
 vcl/source/edit/vclmedit.cxx  |2 +-
 vcl/source/window/aboutdialog.cxx |8 
 2 files changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 8de197a982f6b588ee65ab5e2f4bdb879e73e51f
Author: Caolán McNamara 
AuthorDate: Fri Dec 13 15:58:57 2019 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Dec 16 07:21:04 2019 +0100

tdf#127148 select-all on tabbing into version box in help->about

and allow select-all in readonly multiline edits too.

Arguably this might be a universal settings, but just enable it
for the about dialog for now.

Change-Id: Ic2e64fe26593adf4ae630d1be1a7b196a5a0216c
Reviewed-on: https://gerrit.libreoffice.org/85128
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 0225f79d487e..e21d5c4c8f57 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -852,7 +852,7 @@ void TextWindow::GetFocus()
 if ( !mbActivePopup )
 {
 bool bGotoCursor = !mpExtTextView->IsReadOnly();
-if ( mbFocusSelectionHide && IsReallyVisible() && 
!mpExtTextView->IsReadOnly()
+if ( mbFocusSelectionHide && IsReallyVisible()
 && ( mbSelectOnTab &&
 (!mbInMBDown || ( 
GetSettings().GetStyleSettings().GetSelectionOptions() & 
SelectionOptions::Focus ) )) )
 {
diff --git a/vcl/source/window/aboutdialog.cxx 
b/vcl/source/window/aboutdialog.cxx
index 879c94d2910f..882b47b09790 100644
--- a/vcl/source/window/aboutdialog.cxx
+++ b/vcl/source/window/aboutdialog.cxx
@@ -29,6 +29,14 @@ AboutDialog::AboutDialog(vcl::Window* pParent, WinBits 
nStyle, Dialog::InitFlag
 m_xBuilder->get(m_xCopyrightText, "copyright");
 m_xBuilder->get(m_xBuildIdLink, "buildIdLink");
 
+// tdf#127148 so tabbing into the widget will auto select-all
+AllSettings aSettings = m_xVersion->GetSettings();
+StyleSettings aStyleSettings = aSettings.GetStyleSettings();
+aStyleSettings.SetSelectionOptions(aStyleSettings.GetSelectionOptions()
+   | SelectionOptions::Focus);
+aSettings.SetStyleSettings(aStyleSettings);
+m_xVersion->SetSettings(aSettings, true);
+
 #ifndef MACOSX
 m_xVersion->RequestDoubleBuffering(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-6-4' - vcl/source

2019-12-12 Thread Gabor Kelemen (via logerrit)
 vcl/source/window/printdlg.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 8659c42c4a016722cf6418e6ff1cd34bc5bdf88e
Author: Gabor Kelemen 
AuthorDate: Tue Dec 10 23:24:29 2019 +0100
Commit: Xisco Faulí 
CommitDate: Thu Dec 12 17:47:50 2019 +0100

tdf#123076 Get paper size for print preview

Initialize from current paper size which can be different from A4

Change-Id: Iae5e33d79c0783a32dad8635a66cc3fbe83dc568
Reviewed-on: https://gerrit.libreoffice.org/84920
Tested-by: Jenkins
Tested-by: Xisco Faulí 
Reviewed-by: László Németh 
(cherry picked from commit 562c30d5ad142fcdc77be6125fdac6d48b782fd7)
Reviewed-on: https://gerrit.libreoffice.org/85053
Reviewed-by: Xisco Faulí 

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index c50fb512dd92..b42a1ce41213 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -890,6 +890,8 @@ void PrintDialog::preparePreview( bool i_bMayUseCache )
 {
 VclPtr aPrt( maPController->getPrinter() );
 Size aCurPageSize = aPrt->PixelToLogic( aPrt->GetPaperSizePixel(), 
MapMode( MapUnit::Map100thMM ) );
+// tdf#123076 Get paper size for the preview top label
+mePaper = aPrt->GetPaper();
 GDIMetaFile aMtf;
 
 // page range may have changed depending on options
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2019-12-12 Thread Samuel Mehrbrodt (via logerrit)
 vcl/source/treelist/svimpbox.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9ed66c205d57093dccafa3d16fba7ddd0a109ba6
Author: Samuel Mehrbrodt 
AuthorDate: Tue Dec 10 18:08:14 2019 +0100
Commit: Caolán McNamara 
CommitDate: Thu Dec 12 17:40:01 2019 +0100

tdf#128824 Keep multiselection in style list on right click

Change-Id: I196f8c7d3a1a0b3267498f6cde55069ba3a60523
Reviewed-on: https://gerrit.libreoffice.org/84882
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 13966121b49369950f2c214f3ab109fbad0386ad)
Reviewed-on: https://gerrit.libreoffice.org/84947
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index e2dca323dd26..75b482ecaa0b 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -2071,7 +2071,8 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
 return;
 // Inplace-Editing?
 }
-if ( m_aSelEng.GetSelectionMode() != SelectionMode::NONE )
+if ( m_aSelEng.GetSelectionMode() != SelectionMode::NONE
+ && !rMEvt.IsRight() ) // tdf#128824
 m_aSelEng.SelMouseButtonDown( rMEvt );
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2019-12-09 Thread Kelemen Gábor (via logerrit)
 vcl/source/window/printdlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9b7e992b72c56e830e59af9fd512f257d75b0491
Author: Kelemen Gábor 
AuthorDate: Fri Dec 6 14:33:20 2019 +0100
Commit: Xisco Faulí 
CommitDate: Mon Dec 9 12:33:41 2019 +0100

tdf#122706 Fix built-in HID on Print dialogs Help button

to open the general Print page.

Change-Id: I1ffee4a9d72bb6a4840dec3800a397a878ed2eca
Reviewed-on: https://gerrit.libreoffice.org/84628
Tested-by: Jenkins
Reviewed-by: Katarina Behrens 
(cherry picked from commit 46a07f2042a812fc552e26736183c7d06fe6aa35)
Reviewed-on: https://gerrit.libreoffice.org/84735
Reviewed-by: Xisco Faulí 

diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 4a7105a777c9..c50fb512dd92 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -1778,7 +1778,7 @@ IMPL_LINK(PrintDialog, ClickHdl, weld::Button&, rButton, 
void)
 Help* pHelp = Application::GetHelp();
 if( pHelp )
 {
-pHelp->Start("vcl/ui/printdialog", mxOKButton.get());
+pHelp->Start("vcl/ui/printdialog/PrintDialog", mxOKButton.get());
 }
 }
 else if (  == mxPreviewBox.get() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2019-12-06 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 0db098ec9d5a7743f8595114f6a72c92121acc22
Author: Caolán McNamara 
AuthorDate: Thu Dec 5 16:54:21 2019 +
Commit: Caolán McNamara 
CommitDate: Fri Dec 6 09:52:40 2019 +0100

handle unsetting Image

Change-Id: If4a3ab94c268caeebdc42c664c568aa9004c50ad
Reviewed-on: https://gerrit.libreoffice.org/84580
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index d340fad0f6c1..e1baf6c61d90 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3033,7 +3033,10 @@ public:
 
 virtual void set_image(VirtualDevice* pDevice) override
 {
-m_xImage->SetImage(createImage(*pDevice));
+if (pDevice)
+m_xImage->SetImage(createImage(*pDevice));
+else
+m_xImage->SetImage(::Image());
 }
 
 virtual void set_image(const css::uno::Reference& 
rImage) override
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-12-02 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |   14 ++
 vcl/unx/gtk3/gtk3gtkinst.cxx  |   24 
 2 files changed, 38 insertions(+)

New commits:
commit d4c22030d7c83de6f1835cdb5d891c2d563c34fd
Author: Caolán McNamara 
AuthorDate: Mon Dec 2 12:56:43 2019 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 2 21:17:59 2019 +0100

tdf#129068 try dialog content area help before dialog itself

we already check current notebook page before the dialog, now
check the content area before the dialog

Change-Id: Ieedb5727ddec6d24adc6e70144977b5c3063c0fd
Reviewed-on: https://gerrit.libreoffice.org/84247
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index fa8777493cb1..de9b7a8040e2 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -6461,6 +6461,20 @@ void SalInstanceWindow::help()
 OString sPageId = m_pBuilder->get_current_page_help_id();
 if (!sPageId.isEmpty())
 sHelpId = sPageId;
+else
+{
+// tdf#129068 likewise the help for the wrapping dialog is less
+// helpful than the help for the content area could be
+vcl::Window *pContentArea = nullptr;
+if (::Dialog* pDialog = 
dynamic_cast<::Dialog*>(m_xWindow.get()))
+pContentArea = pDialog->get_content_area();
+if (pContentArea)
+{
+vcl::Window* pContentWidget = 
pContentArea->GetWindow(GetWindowType::LastChild);
+if (pContentWidget)
+sHelpId = pContentWidget->GetHelpId();
+}
+}
 }
 pHelp->Start(OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), 
pSource);
 }
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 2b101adaabde..643502e6368f 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -13012,6 +13012,30 @@ void GtkInstanceWindow::help()
 OString sPageId = m_pBuilder->get_current_page_help_id();
 if (!sPageId.isEmpty())
 sHelpId = sPageId;
+else
+{
+// tdf#129068 likewise the help for the wrapping dialog is less
+// helpful than the help for the content area could be
+GtkContainer* pContainer = nullptr;
+if (GTK_IS_DIALOG(m_pWindow))
+pContainer = 
GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(m_pWindow)));
+else if (GTK_IS_ASSISTANT(m_pWindow))
+{
+GtkAssistant* pAssistant = GTK_ASSISTANT(m_pWindow);
+pContainer = 
GTK_CONTAINER(gtk_assistant_get_nth_page(pAssistant, 
gtk_assistant_get_current_page(pAssistant)));
+}
+if (pContainer)
+{
+GList* pChildren = gtk_container_get_children(pContainer);
+GList* pChild = g_list_first(pChildren);
+if (pChild)
+{
+GtkWidget* pContentWidget = 
static_cast(pChild->data);
+sHelpId = ::get_help_id(pContentWidget);
+}
+g_list_free(pChildren);
+}
+}
 }
 pHelp->Start(OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), 
pSource);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2019-11-28 Thread Jan-Marek Glogowski (via logerrit)
 vcl/source/outdev/clipping.cxx |3 ++-
 vcl/source/outdev/gradient.cxx |   15 ---
 2 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit eacfff3748b56507c24d52dc4979ee75ee164dd1
Author: Jan-Marek Glogowski 
AuthorDate: Tue Nov 26 03:38:01 2019 +
Commit: Xisco Faulí 
CommitDate: Thu Nov 28 11:03:12 2019 +0100

tdf#128337 clip the metafile Gradient drawing

This basically reverts the patches for tdf#125670. Instead this
just checks the mpGraphics in InitClipRegion() before using it,
to prevent the crash from the tdf#125670 bug report.

Additionally it drops the early mbOutputClipped return, as the
output device doesn't matter for the metafile drawing and the
preview of the tdf#125670 bugdoc and the Impress full screen
view otherwise don't show the gradients.

This patch works for me in the following tested scenarios:
1. Bugdoc tdf#125670 doesn't crash
2. Bugdoc tdf#125670 draws gradients in Impress full screen
3. Correct thumbnail pictures for both bug documents

With all these side effects, I have no idea, if this is finally
the correct fix and doesn't break anything else...

Change-Id: I8c48210d4255e50339710fc14819d15686417c9c
Reviewed-on: https://gerrit.libreoffice.org/83722
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit e021901b6c4f60735512c8d36b625be4f8edfd77)
Reviewed-on: https://gerrit.libreoffice.org/83951
Reviewed-by: Xisco Faulí 

diff --git a/vcl/source/outdev/clipping.cxx b/vcl/source/outdev/clipping.cxx
index 416dc3be6595..1c6e4551c102 100644
--- a/vcl/source/outdev/clipping.cxx
+++ b/vcl/source/outdev/clipping.cxx
@@ -170,7 +170,8 @@ void OutputDevice::InitClipRegion()
 {
 if ( mbClipRegionSet )
 {
-mpGraphics->ResetClipRegion();
+if (mpGraphics)
+mpGraphics->ResetClipRegion();
 mbClipRegionSet = false;
 }
 
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 7fc37b31c9ab..2e8406714daf 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -50,6 +50,10 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& 
rPolyPoly,
 {
 assert(!is_double_buffered_window());
 
+if (mbInitClipRegion)
+InitClipRegion();
+// don't return on mbOutputClipped here, as we may need to draw the 
clipped metafile, even if the output is clipped
+
 if ( rPolyPoly.Count() && rPolyPoly[ 0 ].GetSize() )
 {
 if ( mnDrawMode & ( DrawModeFlags::BlackGradient | 
DrawModeFlags::WhiteGradient | DrawModeFlags::SettingsGradient) )
@@ -94,20 +98,17 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& 
rPolyPoly,
 if( !mpGraphics && !AcquireGraphics() )
 return;
 
-if( mbInitClipRegion )
-InitClipRegion();
-
-if (mbOutputClipped)
-return;
-
 // secure clip region
 Push( PushFlags::CLIPREGION );
 IntersectClipRegion( aBoundRect );
 
+if (mbInitClipRegion)
+InitClipRegion();
+
 // try to draw gradient natively
 bDrawn = mpGraphics->DrawGradient( aClixPolyPoly, aGradient );
 
-if (!bDrawn)
+if (!bDrawn && !mbOutputClipped)
 {
 // draw gradients without border
 if( mbLineColor || mbInitLineColor )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2019-11-27 Thread Caolán McNamara (via logerrit)
 vcl/source/control/wizardmachine.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit c8b79a31317877265b449b4d0dc5663dfcae5ce3
Author: Caolán McNamara 
AuthorDate: Wed Nov 27 11:24:27 2019 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 27 20:23:17 2019 +0100

tdf#129042 set a min size for the wizard dialogs

Change-Id: I81264f98d122c81cf0c6e865bfbac81ea9fe8126
Reviewed-on: https://gerrit.libreoffice.org/83894
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/control/wizardmachine.cxx 
b/vcl/source/control/wizardmachine.cxx
index cbcea92343ad..c61b46ec24e9 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -471,6 +471,7 @@ namespace vcl
 }
 ImplCalcSize( aDlgSize );
 SetOutputSizePixel( aDlgSize );
+SetMinOutputSizePixel( aDlgSize );
 }
 
 void RoadmapWizard::StateChanged( StateChangedType nType )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2019-11-26 Thread Caolán McNamara (via logerrit)
 vcl/source/app/salvtables.cxx |   11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 055751130b8095985feda2b612ecfa7b1ad86c13
Author: Caolán McNamara 
AuthorDate: Tue Nov 26 09:46:56 2019 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 26 15:37:10 2019 +0100

Resolves: tdf#129021 dummy entry in multicolumn lists not working properly

Change-Id: I94afa3a29e0ce52cd8d17fab358d5737881814fa
Reviewed-on: https://gerrit.libreoffice.org/83744
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 327853bba1d1..30ac908a128c 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3369,6 +3369,11 @@ private:
 DECL_LINK(CompareHdl, const SvSortData&, sal_Int32);
 DECL_LINK(PopupMenuHdl, const CommandEvent&, bool);
 
+bool IsDummyEntry(SvTreeListEntry* pEntry) const
+{
+return m_xTreeView->GetEntryText(pEntry).trim() == "";
+}
+
 public:
 SalInstanceTreeView(SvTabListBox* pTreeView, SalInstanceBuilder* pBuilder, 
bool bTakeOwnership)
 : SalInstanceContainer(pTreeView, pBuilder, bTakeOwnership)
@@ -4135,7 +4140,7 @@ public:
 {
 SalInstanceTreeIter& rVclIter = 
static_cast(rIter);
 rVclIter.iter = m_xTreeView->Next(rVclIter.iter);
-if (rVclIter.iter && m_xTreeView->GetEntryText(rVclIter.iter) == 
"")
+if (rVclIter.iter && IsDummyEntry(rVclIter.iter))
 return iter_next(rVclIter);
 return rVclIter.iter != nullptr;
 }
@@ -4148,7 +4153,7 @@ public:
 if (bRet)
 {
 //on-demand dummy entry doesn't count
-return m_xTreeView->GetEntryText(rVclIter.iter) != "";
+return !IsDummyEntry(rVclIter.iter);
 }
 return bRet;
 }
@@ -4656,7 +4661,7 @@ IMPL_LINK_NOARG(SalInstanceTreeView, ExpandingHdl, 
SvTreeListBox*, bool)
 {
 auto pChild = m_xTreeView->FirstChild(pEntry);
 assert(pChild);
-if (m_xTreeView->GetEntryText(pChild) == "")
+if (IsDummyEntry(pChild))
 {
 m_xTreeView->RemoveEntry(pChild);
 bPlaceHolder = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2019-11-20 Thread Caolán McNamara (via logerrit)
 vcl/source/control/wizardmachine.cxx |6 +-
 vcl/source/window/builder.cxx|   10 ++
 vcl/unx/gtk3/gtk3gtkinst.cxx |   29 +++--
 3 files changed, 34 insertions(+), 11 deletions(-)

New commits:
commit a7cbedbcbeccf0c75760e39e7b88f41f350cd691
Author: Caolán McNamara 
AuthorDate: Wed Nov 20 12:40:10 2019 +
Commit: Caolán McNamara 
CommitDate: Wed Nov 20 21:42:43 2019 +0100

hide help buttons when LibreOfficeKit::isActive and local help unavailable

Change-Id: Ia263f9f7c78dbf48143678fc2f577402fb1ce998
Reviewed-on: https://gerrit.libreoffice.org/83323
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/control/wizardmachine.cxx 
b/vcl/source/control/wizardmachine.cxx
index cb73add6300f..cbcea92343ad 100644
--- a/vcl/source/control/wizardmachine.cxx
+++ b/vcl/source/control/wizardmachine.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -937,9 +939,11 @@ namespace vcl
 {
 m_pImpl->sTitleBase = m_xAssistant->get_title();
 
+const bool bHideHelp = comphelper::LibreOfficeKit::isActive() &&
+officecfg::Office::Common::Help::HelpRootURL::get().isEmpty();
 // create the buttons according to the wizard button flags
 // the help button
-if (nButtonFlags & WizardButtonFlags::HELP)
+if (nButtonFlags & WizardButtonFlags::HELP && !bHideHelp)
 m_xHelp->show();
 else
 m_xHelp->hide();
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 39ac93e3c820..5663a2e09989 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -13,7 +13,9 @@
 #include 
 #include 
 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -795,6 +797,14 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const 
OUString& sUIDir, const OUStr
 SAL_WARN_IF(nButtons && !bHasDefButton, "vcl.layout", "No default 
button defined in " << sUIFile);
 }
 #endif
+
+const bool bHideHelp = comphelper::LibreOfficeKit::isActive() &&
+officecfg::Office::Common::Help::HelpRootURL::get().isEmpty();
+if (bHideHelp)
+{
+if (vcl::Window *pHelpButton = get("help"))
+pHelpButton->Hide();
+}
 }
 
 VclBuilder::~VclBuilder()
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 398a194230b6..064322e9cae9 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -49,6 +49,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -12317,6 +12318,9 @@ private:
 
 void postprocess_widget(GtkWidget* pWidget)
 {
+const bool bHideHelp = comphelper::LibreOfficeKit::isActive() &&
+officecfg::Office::Common::Help::HelpRootURL::get().isEmpty();
+
 //fixup icons
 //wanted: better way to do this, e.g. make gtk use gio for
 //loading from a filename and provide gio protocol handler
@@ -12368,16 +12372,21 @@ private:
 //set helpids
 const gchar* pStr = gtk_buildable_get_name(GTK_BUILDABLE(pWidget));
 size_t nLen = pStr ? strlen(pStr) : 0;
-if (!nLen)
-return;
-OString sHelpId = m_aUtf8HelpRoot + OString(pStr, nLen);
-set_help_id(pWidget, sHelpId);
-//hook up for extended help
-const ImplSVData* pSVData = ImplGetSVData();
-if (pSVData->maHelpData.mbBalloonHelp && !GTK_IS_DIALOG(pWidget) && 
!GTK_IS_ASSISTANT(pWidget))
-{
-gtk_widget_set_has_tooltip(pWidget, true);
-g_signal_connect(pWidget, "query-tooltip", 
G_CALLBACK(signalTooltipQuery), nullptr);
+if (nLen)
+{
+OString sBuildableName(pStr, nLen);
+OString sHelpId = m_aUtf8HelpRoot + sBuildableName;
+set_help_id(pWidget, sHelpId);
+//hook up for extended help
+const ImplSVData* pSVData = ImplGetSVData();
+if (pSVData->maHelpData.mbBalloonHelp && !GTK_IS_DIALOG(pWidget) 
&& !GTK_IS_ASSISTANT(pWidget))
+{
+gtk_widget_set_has_tooltip(pWidget, true);
+g_signal_connect(pWidget, "query-tooltip", 
G_CALLBACK(signalTooltipQuery), nullptr);
+}
+
+if (bHideHelp && sBuildableName == "help")
+gtk_widget_hide(pWidget);
 }
 
 // expand placeholder and collect potentially missing mnemonics
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2019-11-15 Thread Jan-Marek Glogowski (via logerrit)
 vcl/source/gdi/pdfwriter.cxx  |1 +
 vcl/source/gdi/pdfwriter_impl.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit f4a2bc0da65695d9744e8b4be20a09c03fb196e0
Author: Jan-Marek Glogowski 
AuthorDate: Wed Nov 13 03:45:38 2019 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Fri Nov 15 12:33:04 2019 +0100

tdf#128434 really free the VclPtr

This fixes the major reference cycle introduced by my commit
b85ff98383942360901b8242cf77366782400426 ("Change PDFWriterImpl
into an OutputDevice"), and adds the missing disposeAndClear()
call.

Maybe it would be better to add a ScopedVclPtr in the PDFWriter
class and revert all the other VclPtr users back
to the original PDFWriterImpl*. The PDFWriter code really
doesn't need any of the special VclPtr handling.

Change-Id: Ia64fb207ad274d9323e350022f6b8af35c44e9f5
Reviewed-on: https://gerrit.libreoffice.org/82562
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit 4dd87ccdab80eb094cede538e3d742148df3880a)
Reviewed-on: https://gerrit.libreoffice.org/82660

diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx
index 4e5a3c14e6a8..9a418917cf26 100644
--- a/vcl/source/gdi/pdfwriter.cxx
+++ b/vcl/source/gdi/pdfwriter.cxx
@@ -34,6 +34,7 @@ PDFWriter::PDFWriter( const PDFWriter::PDFWriterContext& 
rContext, const css::un
 
 PDFWriter::~PDFWriter()
 {
+xImplementation.disposeAndClear();
 }
 
 OutputDevice* PDFWriter::GetReferenceDevice()
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index a63a2152e6b7..83d5c75bc912 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1418,6 +1418,7 @@ void PDFWriterImpl::dispose()
 {
 if( m_aCipher )
 rtl_cipher_destroyARCFOUR( m_aCipher );
+m_aPages.clear();
 VirtualDevice::dispose();
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - vcl/source

2019-11-14 Thread Justin Luth (via logerrit)
 vcl/source/control/button.cxx |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 464b42af4055870322a1af65eaf590683b4776e7
Author: Justin Luth 
AuthorDate: Sat Jul 6 07:27:16 2019 +0300
Commit: Caolán McNamara 
CommitDate: Thu Nov 14 16:08:36 2019 +0100

Revert "tdf#108687 vcl: always enable tabstop on radio buttons"

This reverts LO 6.2 commit f2cd1c3c7cce2699d1341f726fc90cf30b52612c
because it most recently caused regressions tdf#128749
and tdf#128625.

There are places where radio-groups are not properly defined,
and things are a big mess.
-about 4 levels of radio buttons are created.
-the last level does not do grouping properly.
-the tab order is defined too early, before all
 the controls are fully made.
-this code is repeated for EVERY control added.

Already reverted in 6.2, 6.3 and 6.5, this also reverts
6.4 because after looking again I don't see any way
out of this, short of rewriting all of the old code.

Reviewed-on: https://gerrit.libreoffice.org/75157
Tested-by: Jenkins
Reviewed-by: Justin Luth 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
(cherry picked from commit 4109dfff009f017e8994ea0a57119e79291ca2c8)

Change-Id: Ic62fd7bb50e67647703cba3796f6d11ffb797eb5
Reviewed-on: https://gerrit.libreoffice.org/82523
Reviewed-by: Justin Luth 
Tested-by: Justin Luth 
(cherry picked from commit bce68bef088f1adb59ff199b2fc44f676d64e749)
Reviewed-on: https://gerrit.libreoffice.org/82671
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 4c6f535669e3..6eb27669f306 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1809,7 +1809,12 @@ WinBits RadioButton::ImplInitStyle( const vcl::Window* 
pPrevWindow, WinBits nSty
  (!pPrevWindow || (pPrevWindow->GetType() != WindowType::RADIOBUTTON)) 
)
 nStyle |= WB_GROUP;
 if ( !(nStyle & WB_NOTABSTOP) )
-nStyle |= WB_TABSTOP;
+{
+if ( IsChecked() )
+nStyle |= WB_TABSTOP;
+else
+nStyle &= ~WB_TABSTOP;
+}
 
 if ( IsChecked() && IsRadioCheckEnabled() )
 ImplUncheckAllOther( /*bSetStyle=*/false );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits