[Libreoffice-commits] core.git: cppu/source

2021-06-18 Thread Christophe JAILLET (via logerrit)
 cppu/source/typelib/typelib.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 6317f8cc83ec92b8700785ab67c4c66ed1aa8fb2
Author: Christophe JAILLET 
AuthorDate: Fri Jun 18 00:00:40 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jun 18 11:03:47 2021 +0200

Re-add a removed mutex

In commit b33fbd55d630, many getMutex() have been replaced by an equivalent
maMutex.
Only in place, the use of a mutex have been simply removed.

Restore it as done in all the other places

Signed-off-by: Christophe JAILLET 
Change-Id: Id85e74e166ec57dd37f8913f8ecf19e2b6465f8f
---
This patch is completely speculative. The removal of this mutex was maybe
done on purpose.
This only looks spurious to me.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117402
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx
index 7c392e147c89..26875778c22b 100644
--- a/cppu/source/typelib/typelib.cxx
+++ b/cppu/source/typelib/typelib.cxx
@@ -2289,6 +2289,7 @@ extern "C" void SAL_CALL typelib_setCacheSize( sal_Int32 
nNewSize )
 return;
 
 TypeDescriptor_Init_Impl  = Init::get();
+MutexGuard aGuard( rInit.maMutex );
 if (nNewSize < nCacheSize)
 {
 while (static_cast(rInit.maCache.size()) != nNewSize)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source

2021-03-21 Thread Christophe JAILLET (via logerrit)
 cui/source/dialogs/QrCodeGenDialog.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 407f6c757af01ea71eb8a86b41c27d12573f51e6
Author: Christophe JAILLET 
AuthorDate: Sun Mar 21 09:32:05 2021 +0100
Commit: Mike Kaganski 
CommitDate: Sun Mar 21 12:43:23 2021 +0100

Fix GenerateQRCode when ENABLE_ZXING is not defined

Since commit 562d7767f987, 'GenerateQRCode()' returns a OString, not a
OUString.

Fix the case where ENABLE_ZXING is not defined.

Signed-off-by: Christophe JAILLET 
Change-Id: I29d9c559401b49caceb8a8941bbe9962b489e3f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112830
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx 
b/cui/source/dialogs/QrCodeGenDialog.cxx
index 2502f626572f..d4ac05e965f0 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -141,7 +141,7 @@ OString GenerateQRCode(const OUString& aQRText, tools::Long 
aQRECC, int aQRBorde
 (void)aQRText;
 (void)aQRECC;
 (void)aQRBorder;
-return OUString();
+return OString();
 #endif
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sfx2/source

2020-11-10 Thread Christophe JAILLET (via logerrit)
 sfx2/source/control/thumbnailview.cxx |9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 9378be4825e63a3eed740403281246de26e7006d
Author: Christophe JAILLET 
AuthorDate: Tue Nov 10 08:01:29 2020 +0100
Commit: Noel Grandin 
CommitDate: Tue Nov 10 09:26:39 2020 +0100

Small code clean-up

DrawItem already checks if isVisible(), so there is no need to check it
twice.

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

diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index 82a6670e3e4a..ad813a172432 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -719,8 +719,7 @@ bool ThumbnailView::KeyInput( const KeyEvent& rKEvt )
 
 pCurItem->setSelection(!pCurItem->isSelected());
 
-if (pCurItem->isVisible())
-DrawItem(pCurItem);
+DrawItem(pCurItem);
 
 maItemStateHdl.Call(pCurItem);
 }
@@ -834,8 +833,7 @@ bool ThumbnailView::MouseButtonDown( const MouseEvent& 
rMEvt )
 {
 pCurItem->setSelection(false);
 
-if (pCurItem->isVisible())
-DrawItem(pCurItem);
+DrawItem(pCurItem);
 
 maItemStateHdl.Call(pCurItem);
 }
@@ -857,8 +855,7 @@ bool ThumbnailView::MouseButtonDown( const MouseEvent& 
rMEvt )
 {
 pCurItem->setSelection(true);
 
-if (pCurItem->isVisible())
-DrawItem(pCurItem);
+DrawItem(pCurItem);
 
 maItemStateHdl.Call(pCurItem);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source

2019-10-28 Thread Christophe JAILLET (via logerrit)
 cui/source/dialogs/tipofthedaydlg.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 0615f3bc125d2d02d11d336e1d0b1c204c91f432
Author: Christophe JAILLET 
AuthorDate: Tue Aug 20 21:21:44 2019 +0200
Commit: Heiko Tietze 
CommitDate: Mon Oct 28 08:33:55 2019 +0100

Improve the way %PRODUCTVERSION is expanded in 'tipoftheday'

Expand %PRODUCTVERSION in a much cleaner way.
Follow up to commit 0ed7f9dab2ec03e168f2013e57c21637f7700736

Change-Id: If3d03cba19f89849c930d6dc3f1e07a65115e4e0
Signed-off-by: Christophe JAILLET 
Reviewed-on: https://gerrit.libreoffice.org/77862
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Tested-by: Heiko Tietze 

diff --git a/cui/source/dialogs/tipofthedaydlg.cxx 
b/cui/source/dialogs/tipofthedaydlg.cxx
index 9d6630d7e5a7..8f82f6841293 100644
--- a/cui/source/dialogs/tipofthedaydlg.cxx
+++ b/cui/source/dialogs/tipofthedaydlg.cxx
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 TipOfTheDayDialog::TipOfTheDayDialog(weld::Window* pParent)
@@ -88,8 +89,8 @@ void TipOfTheDayDialog::UpdateTip()
 }
 else if (aLink.startsWith("http"))
 {
-aText = CuiResId(aLink.toUtf8().getStr());
-
+// Links may have some %PRODUCTVERSION which need to be expanded
+aText = Translate::ExpandVariables(aLink);
 sal_Int32 aPos = aText.indexOf("%LANGUAGENAME");
 if (aPos != -1)
 {
@@ -98,8 +99,8 @@ void TipOfTheDayDialog::UpdateTip()
 aLang = 
LanguageTag(utl::ConfigManager::getUILocale()).getBcp47();
 aText = aText.replaceAt(aPos, 13, aLang);
 }
-
 m_pLink->set_uri(aText);
+
 m_pLink->set_label(CuiResId(STR_MORE_LINK));
 m_pLink->set_visible(true);
 m_pLink->connect_clicked(Link());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: cui/inc cui/source

2019-08-20 Thread Christophe JAILLET (via logerrit)
 cui/inc/tipoftheday.hrc   |   82 +-
 cui/source/dialogs/tipofthedaydlg.cxx |2 
 2 files changed, 42 insertions(+), 42 deletions(-)

New commits:
commit 0ed7f9dab2ec03e168f2013e57c21637f7700736
Author: Christophe JAILLET 
AuthorDate: Fri Jul 19 19:33:26 2019 +0200
Commit: Julien Nabet 
CommitDate: Tue Aug 20 08:01:06 2019 +0200

Fix libreoffice version for links in tipoftheday

tipoftheday.hrc has some URL with fixed LibreOffice version (6.0 and 6.2)
Use %PRODUCTVERSION instead and perform the convertion to the correct
version at run-time.

Note, this can have the drawback to point to dead links if a newer
version of the online doc removes a page or changes its path.

'en-US' could also certainly be handled the same way.

Finaly the 'uiResId(aLink.toUtf8().getStr()' to get it converted is
certainly a hack that should be implemented in a better way.

So consider this patch as a PoC :)

Change-Id: Ibdcaedde631f1a243e0ec54cdec6c488c04b8f29
Signed-off-by: Christophe JAILLET 
Reviewed-on: https://gerrit.libreoffice.org/75971
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/cui/inc/tipoftheday.hrc b/cui/inc/tipoftheday.hrc
index 903f7411bd3f..9ad4e3fcd88b 100644
--- a/cui/inc/tipoftheday.hrc
+++ b/cui/inc/tipoftheday.hrc
@@ -43,48 +43,48 @@
 
 const std::tuple TIPOFTHEDAY_STRINGARRAY[] =
 {
- { NC_("RID_CUI_TIPOFTHEDAY", "%PRODUCTNAME can open and save files stored 
on remote servers per CMIS."), "fps/ui/remotefilesdialog/RemoteFilesDialog", 
""}, 
//https://help.libreoffice.org/6.2/en-US/text/shared/guide/cmis-remote-files.html
- { NC_("RID_CUI_TIPOFTHEDAY", "Tools > AutoCorrect > AutoCorrect Options… 
> Replace provides a list of common substitutions. Take a look and complete 
with your own replacements."), "cui/ui/acoroptionspage/AutocorrectOptionsPage", 
"tipoftheday_w.png"}, 
//https://help.libreoffice.org/6.2/en-US/text/shared/01/06040100.html
- { NC_("RID_CUI_TIPOFTHEDAY", "Writer can handle styles conditionally: 
paragraph styles that have different properties depending on the context."), 
"modules/swriter/ui/conditionpage/ConditionPage", "tipoftheday_w.png"}, 
//https://help.libreoffice.org/6.2/en-US/text/swriter/01/05130100.html
- { NC_("RID_CUI_TIPOFTHEDAY", "With File > Versions you can store multiple 
versions of the document in the same file. You can also open, delete, and 
compare previous versions."), "sfx/ui/versionsofdialog/VersionsOfDialog", ""}, 
//https://help.libreoffice.org/6.2/en-US/text/shared/01/0119.html
- { NC_("RID_CUI_TIPOFTHEDAY", "You can create an illustration index from 
object names, not only from captions."), 
"cui/ui/objectnamedialog/ObjectNameDialog", "tipoftheday_w.png"}, 
//https://help.libreoffice.org/6.2/en-US/text/shared/01/0519.html
- { NC_("RID_CUI_TIPOFTHEDAY", "To temporarily starts with a fresh user 
profile or to restore a non-working %PRODUCTNAME instance start Help > Restart 
in Safe Mode."), "svx/ui/safemodedialog/SafeModeDialog", ""}, 
//https://help.libreoffice.org/6.2/en-US/text/shared/01/profile_safe_mode.html
- { NC_("RID_CUI_TIPOFTHEDAY", "Change the basic fonts for the predefined 
template or current document per Tools > Options > %PRODUCTNAME Writer > Basic 
Fonts."), "modules/swriter/ui/optfonttabpage/OptFontTabPage", 
"tipoftheday_w.png"}, 
//https://help.libreoffice.org/6.2/en-US/text/shared/optionen/01040300.html
- { NC_("RID_CUI_TIPOFTHEDAY", "Define texts that you often use as 
AutoText. You will be able to insert them by their name, shortcut or toolbar in 
any Writer document."), "modules/swriter/ui/autotext/AutoTextDialog", 
"tipoftheday_w.png"}, 
//https://help.libreoffice.org/6.2/en-US/text/swriter/guide/autotext.html
- { NC_("RID_CUI_TIPOFTHEDAY", "%PRODUCTNAME can automatically add a 
numbered caption when you insert objects. See Tools > Options > %PRODUCTNAME 
Writer > AutoCaption."), "modules/swriter/ui/optcaptionpage/OptCaptionPage", 
"tipoftheday_w.png"}, 
//https://help.libreoffice.org/6.2/en-US/text/shared/optionen/01041100.html
- { NC_("RID_CUI_TIPOFTHEDAY", "You can sort paragraphs or table rows 
alphabetically or numerically per Tools > Sort."), 
"modules/swriter/ui/sortdialog/SortDialog", "tipoftheday_w.png"}, 
//https://help.libreoffice.org/6.2/en-US/text/swriter/01/0610.html
- { NC_("RID_CUI_TIPOFTHEDAY", "Use Sections in %PRODUCTNAME Writer to 
protect part of a text, show/hide text, reuse parts from other documents, use 
different column layout."), "modules/swriter/ui/sectionpage/SectionPage", 
"tipoftheday_w.png"}, 
//https://help.libreoffice.org/6.2/en-US/text/swriter/01/04020100.html
- { NC_("RID_CUI_TIPOFTHEDAY", "Use Sheet > Fill Cells > Random Number to 
generate a random series based on various distributions."), 
"modules/scalc/ui/randomnumbergenerator/RandomNumberGeneratorDialog", 
"tipoftheday_c.png"}, 

[Libreoffice-commits] core.git: sfx2/source

2019-07-14 Thread Christophe JAILLET (via logerrit)
 sfx2/source/dialog/filtergrouping.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit c816d9daff3bc7e90d9d3523c5756434bfa01414
Author: Christophe JAILLET 
AuthorDate: Sun Jul 14 10:48:31 2019 +0200
Commit: Noel Grandin 
CommitDate: Sun Jul 14 20:44:23 2019 +0200

Simplify OUString concatenation

Change-Id: I584d400791b3f7ee419f620255e65d9ea7d5145a
Reviewed-on: https://gerrit.libreoffice.org/75570
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sfx2/source/dialog/filtergrouping.cxx 
b/sfx2/source/dialog/filtergrouping.cxx
index 5a5660f7e550..d8a65266a061 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -1152,9 +1152,7 @@ namespace sfx2
 // show '*' in extensions only when opening a document
 sExt = sExt.replaceAll("*", "");
 }
-sRet += " (";
-sRet += sExt;
-sRet += ")";
+sRet += " (" + sExt + ")";
 }
 _rFileDlgImpl.addFilterPair( _rDisplayText, sRet );
 return sRet;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sfx2/source

2019-07-11 Thread Christophe JAILLET (via logerrit)
 sfx2/source/control/thumbnailview.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 4a45d35aa2b921183ad5633af8b8725b6c5ffe8f
Author: Christophe JAILLET 
AuthorDate: Wed Jul 10 22:52:44 2019 +0200
Commit: Noel Grandin 
CommitDate: Thu Jul 11 09:30:32 2019 +0200

Fix a typo in a comment

Fix a typo (s/these/this) and merge some comment lines that are split
for no reason.
Wording is still not perfect, but is better :)

Change-Id: If97b648fb5645f4ec1ecb0c0208467c9eee430b4
Reviewed-on: https://gerrit.libreoffice.org/75383
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index 29245fc02dff..ecee30d0295e 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -331,8 +331,7 @@ void ThumbnailView::CalculateItemPositions (bool 
bScrollBarUsed)
 size_t nLastItem = nFirstItem + (mnVisLines + 1) * mnCols;
 
 // If want also draw parts of items in the last line,
-// then we add one more line if parts of these line are
-// visible
+// then we add one more line if parts of this line are visible
 
 size_t nCurCount = 0;
 for ( size_t i = 0; i < nItemCount; i++ )
@@ -1485,8 +1484,7 @@ void SfxThumbnailView::CalculateItemPositions(bool 
bScrollBarUsed)
 size_t nLastItem = nFirstItem + (mnVisLines + 1) * mnCols;
 
 // If want also draw parts of items in the last line,
-// then we add one more line if parts of these line are
-// visible
+// then we add one more line if parts of this line are visible
 
 size_t nCurCount = 0;
 for ( size_t i = 0; i < nItemCount; i++ )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: sfx2/source

2019-07-11 Thread Christophe JAILLET (via logerrit)
 sfx2/source/control/thumbnailview.cxx |   15 ---
 1 file changed, 4 insertions(+), 11 deletions(-)

New commits:
commit fc4245e6d69829fb5acd335a01005f666c9dd21f
Author: Christophe JAILLET 
AuthorDate: Wed Jul 10 22:31:46 2019 +0200
Commit: Noel Grandin 
CommitDate: Thu Jul 11 09:30:13 2019 +0200

Simplify ThumbnailView::CalculateItemPositions()

There is no need to call 'setPosSizePixel()' twice, once at the beginning
of the function just to set the width (in case of changed settings) and
once at the end of the function to set the position and the size.
The size obviously includes the width.

Change-Id: Ie1806fe21eb28af12f1c77ac1494bb970575eff9
Reviewed-on: https://gerrit.libreoffice.org/75382
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sfx2/source/control/thumbnailview.cxx 
b/sfx2/source/control/thumbnailview.cxx
index f9cbbae6027a..29245fc02dff 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -245,6 +245,7 @@ void ThumbnailView::CalculateItemPositions (bool 
bScrollBarUsed)
 size_t  nItemCount = mFilteredItemList.size();
 WinBits nStyle = GetStyle();
 VclPtr  pDelScrBar;
+longnScrBarWidth = 0;
 
 // consider the scrolling
 if ( nStyle & WB_VSCROLL )
@@ -254,12 +255,9 @@ void ThumbnailView::CalculateItemPositions (bool 
bScrollBarUsed)
 mpScrBar = VclPtr::Create( this, WB_VSCROLL | WB_DRAG );
 mpScrBar->SetScrollHdl( LINK( this, ThumbnailView, ImplScrollHdl ) 
);
 }
-else
-{
-// adapt the width because of the changed settings
-long nScrBarWidth = 
GetSettings().GetStyleSettings().GetScrollBarSize();
-mpScrBar->setPosSizePixel( 0, 0, nScrBarWidth, 0, 
PosSizeFlags::Width );
-}
+
+// adapt the width because of the changed settings
+nScrBarWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
 }
 else
 {
@@ -279,11 +277,6 @@ void ThumbnailView::CalculateItemPositions (bool 
bScrollBarUsed)
 else
 nScrollRatio = 0;
 
-// calculate ScrollBar width
-long nScrBarWidth = 0;
-if ( mpScrBar )
-nScrBarWidth = mpScrBar->GetSizePixel().Width();
-
 // calculate maximum number of visible columns
 mnCols = static_cast((aWinSize.Width()-nScrBarWidth) / 
mnItemWidth);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits