[Libreoffice-commits] core.git: basctl/source basic/source binaryurp/source

2023-11-18 Thread Julien Nabet (via logerrit)
 basctl/source/dlged/dlgedobj.cxx   |2 +-
 basic/source/classes/sb.cxx|2 +-
 binaryurp/source/bridgefactory.cxx |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit c05595d2420b92a428b45cfaf65a3adf88fd8bed
Author: Julien Nabet 
AuthorDate: Sat Nov 18 12:41:05 2023 +0100
Commit: Julien Nabet 
CommitDate: Sat Nov 18 18:38:01 2023 +0100

c++20: use std::erase instead of std::removed followed by erase (part 1)

Change-Id: I8d038fc37a4de25bdeff2e2cc55775e3981240b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159610
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index a3c2b396f791..5b87393e51bc 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -1288,7 +1288,7 @@ void DlgEdForm::AddChild( DlgEdObj* pDlgEdObj )
 
 void DlgEdForm::RemoveChild( DlgEdObj* pDlgEdObj )
 {
-pChildren.erase( std::remove( pChildren.begin() , pChildren.end() , 
pDlgEdObj ) );
+std::erase(pChildren, pDlgEdObj);
 }
 
 void DlgEdForm::PositionAndSizeChange( const beans::PropertyChangeEvent& evt )
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index eeef54222647..8187e6126651 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -1074,7 +1074,7 @@ void StarBASIC::Remove( SbxVariable* pVar )
 {
 // #87540 Can be last reference!
 SbModuleRef xVar = pModule;
-pModules.erase(std::remove(pModules.begin(), pModules.end(), xVar));
+std::erase(pModules, xVar);
 pVar->SetParent( nullptr );
 EndListening( pVar->GetBroadcaster() );
 }
diff --git a/binaryurp/source/bridgefactory.cxx 
b/binaryurp/source/bridgefactory.cxx
index 835c264a9d92..cd43fe592b0e 100644
--- a/binaryurp/source/bridgefactory.cxx
+++ b/binaryurp/source/bridgefactory.cxx
@@ -49,7 +49,7 @@ void BridgeFactory::removeBridge(
 osl::MutexGuard g(m_aMutex);
 if (n.isEmpty())
 {
-unnamed_.erase(std::remove(unnamed_.begin(), unnamed_.end(), bridge), 
unnamed_.end());
+std::erase(unnamed_, bridge);
 }
 else
 {


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

2023-10-19 Thread Stephan Bergmann (via logerrit)
 basctl/source/basicide/baside2.cxx |2 +-
 basctl/source/basicide/baside3.cxx |2 +-
 basctl/source/basicide/basides1.cxx|   12 ++--
 basctl/source/basicide/basidesh.cxx|4 ++--
 basctl/source/basicide/bastypes.cxx|2 +-
 basctl/source/basicide/localizationmgr.cxx |8 
 basctl/source/dlged/dlged.cxx  |4 ++--
 basctl/source/dlged/propbrw.cxx|2 +-
 8 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 8c230395bc374a2be4e9bb341a10f9e8f8cf467e
Author: Stephan Bergmann 
AuthorDate: Thu Oct 19 10:30:03 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Oct 19 15:29:04 2023 +0200

Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: basctl

Change-Id: I771d90376e3497cd28abeda2c8c794c049a80d84
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158143
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 60d25cf74128..b01e5c238a6c 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -95,7 +95,7 @@ short const ValidWindow = 0x1234;
 #if defined(OW) || defined(MTF)
 char const FilterMask_All[] = "*";
 #else
-constexpr OUStringLiteral FilterMask_All = u"*.*";
+constexpr OUString FilterMask_All = u"*.*"_ustr;
 #endif
 
 } // end anonymous namespace
diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index f8197a49d909..4b5d13fb6ecf 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -72,7 +72,7 @@ using namespace ::com::sun::star::ui::dialogs;
 #ifdef _WIN32
 OUStringLiteral const FilterMask_All = u"*.*";
 #else
-constexpr OUStringLiteral FilterMask_All = u"*";
+constexpr OUString FilterMask_All = u"*"_ustr;
 #endif
 
 DialogWindow::DialogWindow(DialogWindowLayout* pParent, ScriptDocument const& 
rDocument,
diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index 66820cd21881..9ef9f75e3f40 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -1342,12 +1342,12 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool 
bUpdateTabBar, bool bRemembe
 
 void Shell::ManageToolbars()
 {
-static constexpr OUStringLiteral aMacroBarResName = 
u"private:resource/toolbar/macrobar";
-static constexpr OUStringLiteral aDialogBarResName = 
u"private:resource/toolbar/dialogbar";
-static constexpr OUStringLiteral aInsertControlsBarResName
-= u"private:resource/toolbar/insertcontrolsbar";
-static constexpr OUStringLiteral aFormControlsBarResName
-= u"private:resource/toolbar/formcontrolsbar";
+static constexpr OUString aMacroBarResName = 
u"private:resource/toolbar/macrobar"_ustr;
+static constexpr OUString aDialogBarResName = 
u"private:resource/toolbar/dialogbar"_ustr;
+static constexpr OUString aInsertControlsBarResName
+= u"private:resource/toolbar/insertcontrolsbar"_ustr;
+static constexpr OUString aFormControlsBarResName
+= u"private:resource/toolbar/formcontrolsbar"_ustr;
 
 if( !pCurWin )
 return;
diff --git a/basctl/source/basicide/basidesh.cxx 
b/basctl/source/basicide/basidesh.cxx
index 73d27e2eea34..d23da94d268f 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -77,8 +77,8 @@
 
 namespace basctl
 {
-constexpr OUStringLiteral BASIC_IDE_EDITOR_WINDOW = u"BasicIDEEditorWindow";
-constexpr OUStringLiteral BASIC_IDE_CURRENT_ZOOM = u"CurrentZoom";
+constexpr OUString BASIC_IDE_EDITOR_WINDOW = u"BasicIDEEditorWindow"_ustr;
+constexpr OUString BASIC_IDE_CURRENT_ZOOM = u"CurrentZoom"_ustr;
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star;
diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index bbd71ad08ce0..8c523e2bdb04 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -54,7 +54,7 @@ namespace basctl
 {
 
 // ID used for the read-only infobar
-constexpr OUStringLiteral BASIC_IDE_READONLY_INFOBAR = u"readonly";
+constexpr OUString BASIC_IDE_READONLY_INFOBAR = u"readonly"_ustr;
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star;
diff --git a/basctl/source/basicide/localizationmgr.cxx 
b/basctl/source/basicide/localizationmgr.cxx
index 22e44c09c6aa..68d2f63622f7 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -53,9 +53,9 @@ using namespace ::com::sun::star::resource;
 namespace
 {
 
-constexpr OUStringLiteral aDot(u".");
-constexpr OUStringLiteral aEsc(u"&");
-constexpr OUStringLiteral aSemi(u";");
+constexpr OUString aDot(u"."_ustr);
+constexpr OUString aEsc(u"&"_ustr);
+constexpr OUString aSemi(u";"_ustr);
 
 } // namespace
 
@@ -80,7 +80,7 @@ bool LocalizationMgr::isLibraryLocalized ()
 
 

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

2023-10-18 Thread Hossein (via logerrit)
 basctl/source/basicide/brkdlg.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit e94cbd7dbf4a8c82f17522806a9011c89bf20865
Author: Hossein 
AuthorDate: Wed Oct 18 10:29:22 2023 +0200
Commit: Hossein 
CommitDate: Wed Oct 18 17:41:52 2023 +0200

Remove obsolete comments in basctl

First comment was last updated with USHORT -> sal_uInt16 in
a2242be9c3551310027b341db53164ebd78bc6c8 but with the newer commit
68ec95b3f80408ae50897b043eed69a07d084df9 there is no remaining sal_uInt16
left, and thus the comment is no longer relevant.

Second comment was added in 1fac87f84723a3d6e7e13c091e39b09e0dea1aa5,
but with changes in 444c242c51e6b049598359ea6cf98e34f611838b it is no
longer relevant.

Third comment was also last updated with USHORT -> sal_uInt16 in
a2242be9c3551310027b341db53164ebd78bc6c8 but with the newer commit
444c242c51e6b049598359ea6cf98e34f611838b it is no longer relevant.

Change-Id: I9ed383f15a5b403740c0b8bcdd153d04bb1a2b0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158111
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/basctl/source/basicide/brkdlg.cxx 
b/basctl/source/basicide/brkdlg.cxx
index 37ba1dbb60ae..48522d11ac37 100644
--- a/basctl/source/basicide/brkdlg.cxx
+++ b/basctl/source/basicide/brkdlg.cxx
@@ -28,15 +28,11 @@
 
 namespace basctl
 {
-// FIXME  Why does BreakPointDialog allow only sal_uInt16 for break-point line
-// numbers, whereas BreakPoint supports sal_uLong?
-
 namespace
 {
 bool lcl_ParseText(OUString const& rText, size_t& rLineNr)
 {
-// aText should look like "# n" where
-// n > 0 && n < std::numeric_limits< sal_uInt16 >::max().
+// aText should look like "# n" where n > 0
 // All spaces are ignored, so there can even be spaces within the
 // number n.  (Maybe it would be better to ignore all whitespace instead
 // of just spaces.)
@@ -48,7 +44,6 @@ bool lcl_ParseText(OUString const& rText, size_t& rLineNr)
 return false;
 if (cFirst == '#')
 aText = aText.copy(1);
-// XXX Assumes that sal_uInt16 is contained within sal_Int32:
 sal_Int32 n = aText.toInt32();
 if (n <= 0)
 return false;


[Libreoffice-commits] core.git: basctl/source basic/qa basic/source comphelper/source cui/source editeng/source include/basic include/comphelper include/sfx2 include/svtools include/vcl sc/inc sc/sour

2023-10-03 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside2.cxx  |4 
 basic/qa/cppunit/basictest.cxx  |2 
 basic/qa/cppunit/basictest.hxx  |4 
 basic/qa/cppunit/test_compiler_checks.cxx   |4 
 basic/source/basmgr/basmgr.cxx  |   38 ++--
 basic/source/classes/sb.cxx |   16 -
 basic/source/inc/sbintern.hxx   |2 
 comphelper/source/misc/errcode.cxx  |  257 ++--
 cui/source/options/optdict.cxx  |2 
 editeng/source/misc/splwrap.cxx |4 
 include/basic/basmgr.hxx|6 
 include/basic/sbstar.hxx|5 
 include/comphelper/errcode.hxx  |  126 +++--
 include/sfx2/app.hxx|2 
 include/sfx2/docfile.hxx|   12 -
 include/sfx2/objsh.hxx  |8 
 include/sfx2/sfxbasemodel.hxx   |3 
 include/svtools/ehdl.hxx|4 
 include/vcl/errinf.hxx  |  106 ---
 sc/inc/xmlwrap.hxx  |4 
 sc/source/filter/xml/xmlwrap.cxx|   18 -
 sc/source/ui/docshell/docsh.cxx |6 
 sc/source/ui/docshell/docsh4.cxx|2 
 sc/source/ui/docshell/docsh8.cxx|8 
 sc/source/ui/inc/docsh.hxx  |2 
 sc/source/ui/miscdlgs/instbdlg.cxx  |2 
 sc/source/ui/miscdlgs/linkarea.cxx  |4 
 sd/source/filter/xml/sdxmlwrp.cxx   |   16 -
 sd/source/ui/app/sdmod1.cxx |2 
 sd/source/ui/func/fuinsert.cxx  |3 
 sd/source/ui/view/viewshe2.cxx  |2 
 sfx2/source/appl/app.cxx|4 
 sfx2/source/appl/appopen.cxx|4 
 sfx2/source/doc/DocumentMetadataAccess.cxx  |4 
 sfx2/source/doc/SfxDocumentMetaData.cxx |4 
 sfx2/source/doc/docfile.cxx |   25 +-
 sfx2/source/doc/new.cxx |2 
 sfx2/source/doc/objmisc.cxx |   12 -
 sfx2/source/doc/objserv.cxx |   13 -
 sfx2/source/doc/objstor.cxx |8 
 sfx2/source/doc/sfxbasemodel.cxx|   35 +--
 sfx2/source/inc/objshimp.hxx|2 
 sfx2/source/view/viewfrm.cxx|2 
 svtools/source/misc/ehdl.cxx|   32 +--
 sw/inc/docsh.hxx|2 
 sw/inc/shellio.hxx  |   24 +-
 sw/qa/extras/txtimport/txtimport.cxx|4 
 sw/qa/extras/uiwriter/uiwriter.cxx  |2 
 sw/source/core/swg/SwXMLTextBlocks.cxx  |2 
 sw/source/core/unocore/unocrsrhelper.cxx|2 
 sw/source/core/unocore/unostyle.cxx |2 
 sw/source/filter/ascii/parasc.cxx   |2 
 sw/source/filter/basflt/shellio.cxx |8 
 sw/source/filter/docx/swdocxreader.cxx  |2 
 sw/source/filter/docx/swdocxreader.hxx  |2 
 sw/source/filter/html/swhtml.cxx|6 
 sw/source/filter/inc/fltini.hxx |4 
 sw/source/filter/rtf/swparrtf.cxx   |8 
 sw/source/filter/writer/writer.cxx  |   18 -
 sw/source/filter/ww8/wrtww8.cxx |8 
 sw/source/filter/ww8/wrtww8.hxx |6 
 sw/source/filter/ww8/ww8par.cxx |2 
 sw/source/filter/ww8/ww8par.hxx |2 
 sw/source/filter/xml/swxml.cxx  |   16 -
 sw/source/filter/xml/wrtxml.cxx |   12 -
 sw/source/filter/xml/wrtxml.hxx |8 
 sw/source/uibase/app/docsh.cxx  |   12 -
 sw/source/uibase/app/docsh2.cxx |8 
 sw/source/uibase/app/docshini.cxx   |4 
 sw/source/uibase/misc/glosdoc.cxx   |5 
 sw/source/uibase/shells/translatehelper.cxx |4 
 sw/source/uibase/uiview/srcview.cxx |2 
 sw/source/uibase/uiview/view2.cxx   |2 
 sw/source/uibase/uiview/viewling.cxx|2 
 uui/source/iahndl.cxx   |2 
 vcl/qa/cppunit/errorhandler.cxx |   15 -
 vcl/source/window/errinf.cxx|  135 +-
 77 files changed, 522 insertions(+), 632 deletions(-)

New commits:
commit d9e322d60f65ff20631dab87baa5a2c7c71daaa2
Author: Noel Grandin 
AuthorDate: Sat Sep 30 20:47:46 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Oct 3 10:12:41 2023 +0200

replace ErrorInfo with simpler mechanism

Instead of returning ErrCode class everywhere, return a new
class ErrrCodeMsg, which combines an ErrCode with the other
parameters that are used to control the error reporting.

I do not change everything that uses ErrCode here, I started
from SfxBaseController/SfxMedium and worked outwards.

This change serves two purposes

(1) Replace the extremely whacky ErrorInfo mechanism we were
using to smuggle information into the error handler reporting
mechanism with a very 

[Libreoffice-commits] core.git: basctl/source include/sfx2 sc/source sfx2/source svx/source sw/source

2023-09-29 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside2.cxx |4 +-
 include/sfx2/docfile.hxx   |2 -
 sc/source/filter/html/htmlexp.cxx  |2 -
 sc/source/ui/docshell/docsh.cxx|   10 +++
 sc/source/ui/docshell/externalrefmgr.cxx   |2 -
 sc/source/ui/docshell/tablink.cxx  |   10 +++
 sfx2/source/appl/appopen.cxx   |2 -
 sfx2/source/doc/DocumentMetadataAccess.cxx |2 -
 sfx2/source/doc/SfxDocumentMetaData.cxx|2 -
 sfx2/source/doc/docfile.cxx|   40 ++---
 sfx2/source/doc/objstor.cxx|   12 
 sfx2/source/doc/sfxbasemodel.cxx   |2 -
 svx/source/core/graphichelper.cxx  |4 +-
 svx/source/xoutdev/_xoutbmp.cxx|6 ++--
 sw/source/filter/writer/writer.cxx |2 -
 sw/source/uibase/app/docsh2.cxx|2 -
 16 files changed, 52 insertions(+), 52 deletions(-)

New commits:
commit ed774e9fb5fe33ac93699e6f1f6773f7c63deef5
Author: Noel Grandin 
AuthorDate: Thu Sep 28 19:46:04 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 29 08:02:55 2023 +0200

rename SfxMedium::GetError -> GetErrorIgnoreWarning

to distinguish it from the very similar GetErrorCode()

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

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index ef80ae5b017c..bb6f0bb1f876 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -442,7 +442,7 @@ void ModulWindow::LoadBasic()
 GetEditorWindow().PaintImmediately();
 GetEditorWindow().ForceSyntaxTimeout();
 GetEditorWindow().DestroyProgress();
-ErrCode nError = aMedium.GetError();
+ErrCode nError = aMedium.GetErrorIgnoreWarning();
 if ( nError )
 ErrorHandler::HandleError( nError );
 }
@@ -484,7 +484,7 @@ void ModulWindow::SaveBasicSource()
 GetEditEngine()->Write( *pStream );
 aMedium.Commit();
 LeaveWait();
-ErrCode nError = aMedium.GetError();
+ErrCode nError = aMedium.GetErrorIgnoreWarning();
 if ( nError )
 ErrorHandler::HandleError( nError );
 }
diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx
index 2af13be14a0a..0b1c417247f5 100644
--- a/include/sfx2/docfile.hxx
+++ b/include/sfx2/docfile.hxx
@@ -144,7 +144,7 @@ public:
 voidSetDoneLink( const Link& rLink );
 
 ErrCode GetErrorCode() const;
-ErrCode GetError() const
+ErrCode GetErrorIgnoreWarning() const
 { return GetErrorCode().IgnoreWarning(); }
 ErrCode GetWarningError() const;
 ErrCode const & GetLastStorageCreationState() const;
diff --git a/sc/source/filter/html/htmlexp.cxx 
b/sc/source/filter/html/htmlexp.cxx
index 150a4ef66dd8..9ef9c555da91 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -1377,7 +1377,7 @@ void ScHTMLExport::CopyLocalFileToINet( OUString& rFileNm,
 aMedium.Close();
 aMedium.Commit();
 
-bRet = ERRCODE_NONE == aMedium.GetError();
+bRet = ERRCODE_NONE == aMedium.GetErrorIgnoreWarning();
 
 if( bRet )
 {
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 2b568c5d8d54..32c7aa03022f 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -651,11 +651,11 @@ bool ScDocShell::Load( SfxMedium& rMedium )
 }
 }
 
-if (!bRet && !rMedium.GetError())
+if (!bRet && !rMedium.GetErrorIgnoreWarning())
 rMedium.SetError(SVSTREAM_FILEFORMAT_ERROR);
 
-if (rMedium.GetError())
-SetError(rMedium.GetError());
+if (rMedium.GetErrorIgnoreWarning())
+SetError(rMedium.GetErrorIgnoreWarning());
 
 InitItems();
 CalcOutputFactor();
@@ -2580,7 +2580,7 @@ bool ScDocShell::ConvertTo( SfxMedium  )
 bRet = true;
 
 if (m_pDocument->GetTableCount() > 1)
-if (!rMed.GetError())
+if (!rMed.GetErrorIgnoreWarning())
 rMed.SetError(SCWARN_EXPORT_ASCII);
 }
 }
@@ -2679,7 +2679,7 @@ bool ScDocShell::ConvertTo( SfxMedium  )
 bRet = true;
 
 if (m_pDocument->GetTableCount() > 1)
-if (!rMed.GetError())
+if (!rMed.GetErrorIgnoreWarning())
 rMed.SetError(SCWARN_EXPORT_ASCII);
 }
 }
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx 
b/sc/source/ui/docshell/externalrefmgr.cxx
index 8e1f8e40ed55..523bd746cb84 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2591,7 +2591,7 @@ SfxObjectShellRef 

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

2023-08-30 Thread Noel Grandin (via logerrit)
 basctl/source/accessibility/accessibledialogwindow.cxx |   50 +
 basctl/source/inc/accessibledialogwindow.hxx   |6 +-
 2 files changed, 19 insertions(+), 37 deletions(-)

New commits:
commit b58aeda083b245bd12b31f53c0fb1717af188cc4
Author: Noel Grandin 
AuthorDate: Wed Aug 30 13:55:05 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 30 21:36:17 2023 +0200

use concrete type for ChildDescriptor::mxAccessible

avoid some unnecessary casting

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

diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx 
b/basctl/source/accessibility/accessibledialogwindow.cxx
index 71a41aa6848a..9b17f3cf4caa 100644
--- a/basctl/source/accessibility/accessibledialogwindow.cxx
+++ b/basctl/source/accessibility/accessibledialogwindow.cxx
@@ -120,13 +120,8 @@ void AccessibleDialogWindow::UpdateFocused()
 {
 for (const ChildDescriptor & i : m_aAccessibleChildren)
 {
-Reference< XAccessible > xChild( i.rxAccessible );
-if ( xChild.is() )
-{
-AccessibleDialogControlShape* pShape = static_cast< 
AccessibleDialogControlShape* >( xChild.get() );
-if ( pShape )
-pShape->SetFocused( pShape->IsFocused() );
-}
+if ( i.mxAccessible )
+i.mxAccessible->SetFocused( i.mxAccessible->IsFocused() );
 }
 }
 
@@ -137,13 +132,8 @@ void AccessibleDialogWindow::UpdateSelected()
 
 for (const ChildDescriptor & i : m_aAccessibleChildren)
 {
-Reference< XAccessible > xChild( i.rxAccessible );
-if ( xChild.is() )
-{
-AccessibleDialogControlShape* pShape = static_cast< 
AccessibleDialogControlShape* >( xChild.get() );
-if ( pShape )
-pShape->SetSelected( pShape->IsSelected() );
-}
+if ( i.mxAccessible )
+i.mxAccessible->SetSelected( i.mxAccessible->IsSelected() );
 }
 }
 
@@ -152,13 +142,8 @@ void AccessibleDialogWindow::UpdateBounds()
 {
 for (const ChildDescriptor & i : m_aAccessibleChildren)
 {
-Reference< XAccessible > xChild( i.rxAccessible );
-if ( xChild.is() )
-{
-AccessibleDialogControlShape* pShape = static_cast< 
AccessibleDialogControlShape* >( xChild.get() );
-if ( pShape )
-pShape->SetBounds( pShape->GetBounds() );
-}
+if ( i.mxAccessible )
+i.mxAccessible->SetBounds( i.mxAccessible->GetBounds() );
 }
 }
 
@@ -244,7 +229,7 @@ void AccessibleDialogWindow::RemoveChild( const 
ChildDescriptor& rDesc )
 return;
 
 // get the accessible of the removed child
-Reference< XAccessible > xChild( aIter->rxAccessible );
+rtl::Reference< AccessibleDialogControlShape > xChild( aIter->mxAccessible 
);
 
 // remove entry from child list
 m_aAccessibleChildren.erase( aIter );
@@ -253,12 +238,11 @@ void AccessibleDialogWindow::RemoveChild( const 
ChildDescriptor& rDesc )
 if ( xChild.is() )
 {
 Any aOldValue, aNewValue;
-aOldValue <<= xChild;
+aOldValue <<= uno::Reference(xChild);
 NotifyAccessibleEvent( AccessibleEventId::CHILD, aOldValue, aNewValue 
);
 
-Reference< XComponent > xComponent( xChild, UNO_QUERY );
-if ( xComponent.is() )
-xComponent->dispose();
+if ( xChild )
+xChild->dispose();
 }
 }
 
@@ -380,9 +364,8 @@ void AccessibleDialogWindow::ProcessWindowEvent( const 
VclWindowEvent& rVclWindo
 // dispose all children
 for (const ChildDescriptor & i : m_aAccessibleChildren)
 {
-Reference< XComponent > xComponent( i.rxAccessible, 
UNO_QUERY );
-if ( xComponent.is() )
-xComponent->dispose();
+if ( i.mxAccessible )
+i.mxAccessible->dispose();
 }
 m_aAccessibleChildren.clear();
 }
@@ -514,9 +497,8 @@ void AccessibleDialogWindow::disposing()
 // dispose all children
 for (const ChildDescriptor & i : m_aAccessibleChildren)
 {
-Reference< XComponent > xComponent( i.rxAccessible, UNO_QUERY );
-if ( xComponent.is() )
-xComponent->dispose();
+if ( i.mxAccessible )
+i.mxAccessible->dispose();
 }
 m_aAccessibleChildren.clear();
 }
@@ -559,7 +541,7 @@ Reference< XAccessible > 
AccessibleDialogWindow::getAccessibleChild( sal_Int64 i
 if ( i < 0 || i >= getAccessibleChildCount() )
 throw IndexOutOfBoundsException();
 
-Reference< XAccessible > xChild = m_aAccessibleChildren[i].rxAccessible;
+rtl::Reference< AccessibleDialogControlShape > xChild = 
m_aAccessibleChildren[i].mxAccessible;
 if ( !xChild.is() )
 {

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

2023-08-21 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/doceventnotifier.cxx |   28 +---
 1 file changed, 17 insertions(+), 11 deletions(-)

New commits:
commit ab38a8d13de0b14b3c389ef27152aac958033401
Author: Noel Grandin 
AuthorDate: Mon Aug 21 09:49:02 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Aug 21 14:04:43 2023 +0200

tdf#156721 Crash if cursor in Basic IDE is in a macro from a document..

.. and that document is closed

regression from
commit f3e127217d8daa443b8eda52ac4810e375cc7d63
Author: Noel Grandin 
Date:   Tue May 9 15:21:20 2023 +0200
use comphelper::WeakComponentImplHelper in
DocumentEventNotifier::Impl

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

diff --git a/basctl/source/basicide/doceventnotifier.cxx 
b/basctl/source/basicide/doceventnotifier.cxx
index 81bb50be3919..254c719bb5cc 100644
--- a/basctl/source/basicide/doceventnotifier.cxx
+++ b/basctl/source/basicide/doceventnotifier.cxx
@@ -148,20 +148,26 @@ namespace basctl
 if ( !_rEvent.EventName.equalsAscii( aEvent.pEventName ) )
 continue;
 
+// Listener implementations require that we hold the mutex, but to 
avoid lock ordering issues,
+// we need to take the solar mutex before we take our own mutex.
+aGuard.unlock();
+
+// Listener implements require that we hold the solar mutex.
+SolarMutexGuard aSolarGuard;
+
+// Take the lock again, so we can check our local fields.
+aGuard.lock();
+if ( impl_isDisposed_nothrow(aGuard) )
+// somebody took the chance to dispose us -> bail out
+return;
+DocumentEventListener* pListener = m_pListener;
 ScriptDocument aDocument( xDocument );
-{
-// the listener implementations usually require the 
SolarMutex, so lock it here.
-// But ensure the proper order of locking the solar and the 
own mutex
-aGuard.unlock();
-SolarMutexGuard aSolarGuard;
-std::unique_lock aGuard2( m_aMutex );
+// We cannot call the listener while holding our mutex because the 
listener
+// call might trigger an event which call back into us.
+aGuard.unlock();
 
-if ( impl_isDisposed_nothrow(aGuard2) )
-// somebody took the chance to dispose us -> bail out
-return;
+(pListener->*aEvent.listenerMethod)( aDocument );
 
-(m_pListener->*aEvent.listenerMethod)( aDocument );
-}
 break;
 }
 }


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

2023-05-24 Thread Andrea Gelmini (via logerrit)
 basctl/source/basicide/baside2b.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit f128fc5dbb34c75cbd5fca326e1ad7cce1f485bd
Author: Andrea Gelmini 
AuthorDate: Wed May 24 13:52:58 2023 +0200
Commit: Julien Nabet 
CommitDate: Wed May 24 15:02:38 2023 +0200

Remove triplicated include

Change-Id: I345a6e87ebf27188e9bdfe82ee364c2363b48efd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152197
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index cf7e7388dd52..f1c1a7303878 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -63,12 +63,10 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include "textwindowpeer.hxx"
 #include "uiobject.hxx"
 #include 


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

2023-05-12 Thread Supriyo Paul (via logerrit)
 basctl/source/basicide/localizationmgr.cxx |   64 +++--
 1 file changed, 17 insertions(+), 47 deletions(-)

New commits:
commit e08c910f9ee520ce00fe99d6dab9988138996ee3
Author: Supriyo Paul 
AuthorDate: Thu Mar 2 20:17:30 2023 +0530
Commit: Hossein 
CommitDate: Sat May 13 00:54:00 2023 +0200

tdf#145538: traditional for loops to range-based for loops

changes traditional for to ranged based for in localizationmgr.cxx
goal: better readability for programmers

Change-Id: Ifde48037b27a794a9cdc3b1183f825651896cafb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148127
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/basctl/source/basicide/localizationmgr.cxx 
b/basctl/source/basicide/localizationmgr.cxx
index ef3a1ed9ff90..22e44c09c6aa 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -926,15 +926,10 @@ void LocalizationMgr::renameStringResourceIDs( const 
ScriptDocument& rDocument,
 xDummyStringResolver, RENAME_DIALOG_IDS );
 
 // Handle all controls
-Sequence< OUString > aNames = xDialogModel->getElementNames();
-const OUString* pNames = aNames.getConstArray();
-sal_Int32 nCtrls = aNames.getLength();
-for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
-{
-OUString aCtrlName( pNames[i] );
-Any aCtrl = xDialogModel->getByName( aCtrlName );
+for(const auto& rCtrlName : xDialogModel->getElementNames()) {
+Any aCtrl = xDialogModel->getByName( rCtrlName );
 implHandleControlResourceProperties( aCtrl, aDlgName,
-aCtrlName, xStringResourceManager,
+rCtrlName, xStringResourceManager,
 xDummyStringResolver, RENAME_DIALOG_IDS );
 }
 }
@@ -957,15 +952,10 @@ void LocalizationMgr::removeResourceForDialog( const 
ScriptDocument& rDocument,
 xDummyStringResolver, REMOVE_IDS_FROM_RESOURCE );
 
 // Handle all controls
-Sequence< OUString > aNames = xDialogModel->getElementNames();
-const OUString* pNames = aNames.getConstArray();
-sal_Int32 nCtrls = aNames.getLength();
-for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
-{
-OUString aCtrlName( pNames[i] );
-Any aCtrl = xDialogModel->getByName( aCtrlName );
+for(const auto& rCtrlName : xDialogModel->getElementNames()) {
+Any aCtrl = xDialogModel->getByName( rCtrlName );
 implHandleControlResourceProperties( aCtrl, aDlgName,
-aCtrlName, xStringResourceManager,
+rCtrlName, xStringResourceManager,
 xDummyStringResolver, REMOVE_IDS_FROM_RESOURCE );
 }
 }
@@ -985,15 +975,10 @@ void LocalizationMgr::resetResourceForDialog( const 
Reference< container::XNameC
 aDummyName, xStringResourceManager, xDummyStringResolver, RESET_IDS );
 
 // Handle all controls
-Sequence< OUString > aNames = xDialogModel->getElementNames();
-const OUString* pNames = aNames.getConstArray();
-sal_Int32 nCtrls = aNames.getLength();
-for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
-{
-OUString aCtrlName( pNames[i] );
-Any aCtrl = xDialogModel->getByName( aCtrlName );
+for(const auto& rCtrlName : xDialogModel->getElementNames()){
+Any aCtrl = xDialogModel->getByName( rCtrlName );
 implHandleControlResourceProperties( aCtrl, aDummyName,
-aCtrlName, xStringResourceManager, xDummyStringResolver, RESET_IDS 
);
+rCtrlName, xStringResourceManager, xDummyStringResolver, RESET_IDS 
);
 }
 }
 
@@ -1012,15 +997,10 @@ void LocalizationMgr::setResourceIDsForDialog( const 
Reference< container::XName
 aDummyName, xStringResourceManager, xDummyStringResolver, SET_IDS );
 
 // Handle all controls
-Sequence< OUString > aNames = xDialogModel->getElementNames();
-const OUString* pNames = aNames.getConstArray();
-sal_Int32 nCtrls = aNames.getLength();
-for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
-{
-OUString aCtrlName( pNames[i] );
-Any aCtrl = xDialogModel->getByName( aCtrlName );
+for(const auto& rCtrlName : xDialogModel->getElementNames()) {
+Any aCtrl = xDialogModel->getByName( rCtrlName );
 implHandleControlResourceProperties( aCtrl, aDummyName,
-aCtrlName, xStringResourceManager, xDummyStringResolver, SET_IDS );
+rCtrlName, xStringResourceManager, xDummyStringResolver, SET_IDS );
 }
 }
 
@@ -1066,15 +1046,10 @@ void LocalizationMgr::copyResourceForDroppedDialog( 
const Reference< container::
 std::u16string_view(), xStringResourceManager, xSourceStringResolver, 
MOVE_RESOURCES );
 
 // Handle all controls
-Sequence< OUString > aNames = xDialogModel->getElementNames();
-const OUString* pNames = aNames.getConstArray();
-sal_Int32 nCtrls = aNames.getLength();
-for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
-{
-OUString aCtrlName( pNames[i] );
-Any aCtrl = 

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

2023-05-10 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/doceventnotifier.cxx |   58 ++--
 1 file changed, 29 insertions(+), 29 deletions(-)

New commits:
commit f3e127217d8daa443b8eda52ac4810e375cc7d63
Author: Noel Grandin 
AuthorDate: Tue May 9 15:21:20 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed May 10 13:28:09 2023 +0200

use comphelper::WeakComponentImplHelper in DocumentEventNotifier::Impl

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

diff --git a/basctl/source/basicide/doceventnotifier.cxx 
b/basctl/source/basicide/doceventnotifier.cxx
index d98598e8a3f3..81bb50be3919 100644
--- a/basctl/source/basicide/doceventnotifier.cxx
+++ b/basctl/source/basicide/doceventnotifier.cxx
@@ -24,13 +24,10 @@
 
 #include 
 
+#include 
 #include 
-
 #include 
 
-#include 
-#include 
-
 namespace basctl
 {
 
@@ -47,7 +44,7 @@ namespace basctl
 
 // DocumentEventNotifier::Impl
 
-typedef ::cppu::WeakComponentImplHelper<   XDocumentEventListener
+typedef ::comphelper::WeakComponentImplHelper<   XDocumentEventListener
>   DocumentEventNotifier_Impl_Base;
 
 namespace {
@@ -62,8 +59,7 @@ namespace basctl
 
 /** impl class for DocumentEventNotifier
 */
-class DocumentEventNotifier::Impl   :public ::cppu::BaseMutex
-,public DocumentEventNotifier_Impl_Base
+class DocumentEventNotifier::Impl : public DocumentEventNotifier_Impl_Base
 {
 public:
 // noncopyable
@@ -79,18 +75,18 @@ namespace basctl
 // XEventListener
 virtual void SAL_CALL disposing( const css::lang::EventObject& Event ) 
override;
 
-// ComponentHelper
-virtual void SAL_CALL disposing() override;
+// WeakComponentImplHelper
+virtual void disposing(std::unique_lock&) override;
 
 private:
 /// determines whether the instance is already disposed
-boolimpl_isDisposed_nothrow() const { return m_pListener == 
nullptr; }
+boolimpl_isDisposed_nothrow(std::unique_lock& 
/*rGuard*/) const { return m_pListener == nullptr; }
 
 /// disposes the instance
-voidimpl_dispose_nothrow();
+voidimpl_dispose_nothrow(std::unique_lock& rGuard);
 
 /// registers or revokes the instance as listener at the global event 
broadcaster
-voidimpl_listenerAction_nothrow( ListenerAction _eAction );
+voidimpl_listenerAction_nothrow( std::unique_lock& 
rGuard, ListenerAction _eAction );
 
 private:
 DocumentEventListener*  m_pListener;
@@ -98,18 +94,19 @@ namespace basctl
 };
 
 DocumentEventNotifier::Impl::Impl (DocumentEventListener& rListener, 
Reference const& rxDocument) :
-DocumentEventNotifier_Impl_Base(m_aMutex),
 m_pListener(),
 m_xModel(rxDocument)
 {
+std::unique_lock aGuard(m_aMutex);
 osl_atomic_increment( _refCount );
-impl_listenerAction_nothrow( RegisterListener );
+impl_listenerAction_nothrow( aGuard, RegisterListener );
 osl_atomic_decrement( _refCount );
 }
 
 DocumentEventNotifier::Impl::~Impl ()
 {
-if ( !impl_isDisposed_nothrow() )
+std::unique_lock aGuard(m_aMutex);
+if ( !impl_isDisposed_nothrow(aGuard) )
 {
 acquire();
 dispose();
@@ -118,10 +115,10 @@ namespace basctl
 
 void SAL_CALL DocumentEventNotifier::Impl::documentEventOccured( const 
DocumentEvent& _rEvent )
 {
-::osl::ClearableMutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
-OSL_PRECOND( !impl_isDisposed_nothrow(), 
"DocumentEventNotifier::Impl::notifyEvent: disposed, but still getting events?" 
);
-if ( impl_isDisposed_nothrow() )
+OSL_PRECOND( !impl_isDisposed_nothrow(aGuard), 
"DocumentEventNotifier::Impl::notifyEvent: disposed, but still getting events?" 
);
+if ( impl_isDisposed_nothrow(aGuard) )
 return;
 
 Reference< XModel > xDocument( _rEvent.Source, UNO_QUERY );
@@ -155,11 +152,11 @@ namespace basctl
 {
 // the listener implementations usually require the 
SolarMutex, so lock it here.
 // But ensure the proper order of locking the solar and the 
own mutex
-aGuard.clear();
+aGuard.unlock();
 SolarMutexGuard aSolarGuard;
-::osl::MutexGuard aGuard2( m_aMutex );
+std::unique_lock aGuard2( m_aMutex );
 
-if ( impl_isDisposed_nothrow() )
+if ( impl_isDisposed_nothrow(aGuard2) )
 // somebody took the chance to dispose us -> bail out
 return;
 
@@ -172,25 +169,25 @@ namespace basctl
 void SAL_CALL DocumentEventNotifier::Impl::disposing( const 

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

2023-05-02 Thread Aman Jha (via logerrit)
 basctl/source/basicide/baside2b.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 53c641702a280be8b80976301f3427b41d2e0b74
Author: Aman Jha 
AuthorDate: Mon Jan 9 19:34:40 2023 +0530
Commit: Ilmari Lauhakangas 
CommitDate: Tue May 2 12:30:27 2023 +0200

tdf#114441 Convert sal_uLong to better integer types

* Use tools::Long for nY as it stores calculations with result values
  that can be sometimes negative
* Cast nLine to sal_uInt16 as rModulWindow.ToggleBreakPoint() takes
  parameter of type sal_uInt16

Change-Id: Ibfdee40f37714406ee0f089c9a87f8b9a650e492
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145210
Tested-by: Jenkins
Reviewed-by: Hossein 
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index a82cf2ae4e4b..cf7e7388dd52 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1476,7 +1476,7 @@ void BreakPointWindow::ShowMarker(vcl::RenderContext& 
rRenderContext)
 aMarkerOff.setX( (aOutSz.Width() - aMarkerSz.Width()) / 2 );
 aMarkerOff.setY( (nLineHeight - aMarkerSz.Height()) / 2 );
 
-sal_uLong nY = nMarkerPos * nLineHeight - nCurYOffset;
+tools::Long nY = nMarkerPos * nLineHeight - nCurYOffset;
 Point aPos(0, nY);
 aPos += aMarkerOff;
 
@@ -1531,7 +1531,7 @@ void BreakPointWindow::MouseButtonDown( const MouseEvent& 
rMEvt )
 {
 tools::Long nYPos = aMousePos.Y() + nCurYOffset;
 tools::Long nLine = nYPos / nLineHeight + 1;
-rModulWindow.ToggleBreakPoint( static_cast(nLine) );
+rModulWindow.ToggleBreakPoint( static_cast(nLine) );
 Invalidate();
 }
 }


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

2023-04-29 Thread Mike Kaganski (via logerrit)
 basctl/source/basicide/baside3.cxx |6 --
 1 file changed, 6 deletions(-)

New commits:
commit c395fc2ba51bf71bd70fcfa51c9fadb83ae24913
Author: Mike Kaganski 
AuthorDate: Sat Apr 29 14:39:15 2023 +0200
Commit: Mike Kaganski 
CommitDate: Sat Apr 29 21:32:11 2023 +0200

These are not applicable to FILEOPEN_SIMPLE

Change-Id: Id2668a6b30f7062e42ec60b3664b9a7490feccd1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151128
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index 0e51f00be348..f8197a49d909 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -791,12 +791,6 @@ bool implImportDialog(weld::Window* pWin, const 
ScriptDocument& rDocument, const
 aDlg.SetContext(sfx2::FileDialogHelper::BasicImportDialog);
 Reference xFP = aDlg.GetFilePicker();
 
-Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
-xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, 
false);
-Any aValue;
-aValue <<= true;
-xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 
0, aValue);
-
 OUString aDialogStr(IDEResId(RID_STR_STDDIALOGNAME));
 xFP->appendFilter( aDialogStr, "*.xdl" );
 xFP->appendFilter( IDEResId(RID_STR_FILTER_ALLFILES), FilterMask_All );


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

2023-04-29 Thread Mike Kaganski (via logerrit)
 basctl/source/basicide/baside2.cxx |8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 5d56733bbc283f5927d83bc3151a05fc477c31b1
Author: Mike Kaganski 
AuthorDate: Sat Apr 29 14:24:56 2023 +0200
Commit: Mike Kaganski 
CommitDate: Sat Apr 29 15:12:08 2023 +0200

Simplify a bit

Change-Id: I5b39a16479a69c0683d8e04497ad24421112751c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151126
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 5384eb70fa89..ef80ae5b017c 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -457,16 +457,12 @@ void ModulWindow::LoadBasic()
 
 void ModulWindow::SaveBasicSource()
 {
-sfx2::FileDialogHelper 
aDlg(ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD,
+sfx2::FileDialogHelper 
aDlg(ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
 FileDialogFlags::NONE, this->GetFrameWeld());
 aDlg.SetContext(sfx2::FileDialogHelper::BasicExportSource);
 const Reference& xFP = aDlg.GetFilePicker();
 
-Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
-xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, 
false);
-Any aValue;
-aValue <<= true;
-xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 
0, aValue);
+
xFP.queryThrow()->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION,
 0, Any(true));
 
 xFP->appendFilter( "BASIC", "*.bas" );
 xFP->appendFilter( IDEResId(RID_STR_FILTER_ALLFILES), FilterMask_All );


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

2023-04-29 Thread Mike Kaganski (via logerrit)
 basctl/source/basicide/baside3.cxx |  160 +++--
 1 file changed, 68 insertions(+), 92 deletions(-)

New commits:
commit 90ac25f12cecd5850607096acf4d97f29baaa710
Author: Mike Kaganski 
AuthorDate: Sat Apr 29 14:24:43 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sat Apr 29 14:30:27 2023 +0200

Simplify a bit

Change-Id: Id768a3e10eb593af84bdea423ddfd090df33eef2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151182
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index 61bbbc056956..0e51f00be348 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -601,18 +601,12 @@ void DialogWindow::UpdateBrowser()
 
 void DialogWindow::SaveDialog()
 {
-Reference 
xContext(::comphelper::getProcessComponentContext());
-sfx2::FileDialogHelper 
aDlg(ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD,
+sfx2::FileDialogHelper 
aDlg(ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
 FileDialogFlags::NONE, this->GetFrameWeld());
 aDlg.SetContext(sfx2::FileDialogHelper::BasicExportDialog);
 Reference xFP = aDlg.GetFilePicker();
 
-Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
-xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, 
false);
-Any aValue;
-aValue <<= true;
-xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 
0, aValue);
-
+
xFP.queryThrow()->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION,
 0, Any(true));
 xFP->setDefaultName( GetName() );
 
 OUString aDialogStr(IDEResId(RID_STR_STDDIALOGNAME));
@@ -625,11 +619,7 @@ void DialogWindow::SaveDialog()
 
 OUString aSelectedFileURL = xFP->getSelectedFiles()[0];
 
-// export dialog model to xml
-Reference< container::XNameContainer > xDialogModel = GetDialog();
-Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( 
xDialogModel, xContext, GetDocument().isDocument() ? 
GetDocument().getDocument() : Reference< frame::XModel >() );
-Reference< XInputStream > xInput( xISP->createInputStream() );
-
+Reference 
xContext(comphelper::getProcessComponentContext());
 Reference< XSimpleFileAccess3 > xSFI( SimpleFileAccess::create(xContext) );
 
 Reference< XOutputStream > xOutput;
@@ -642,108 +632,94 @@ void DialogWindow::SaveDialog()
 catch(const Exception& )
 {}
 
-if( xOutput.is() )
+if (!xOutput)
 {
-Sequence< sal_Int8 > bytes;
-sal_Int32 nRead = xInput->readBytes( bytes, xInput->available() );
-for (;;)
-{
-if( nRead )
-xOutput->writeBytes( bytes );
+std::unique_ptr 
xBox(Application::CreateMessageDialog(GetFrameWeld(),
+  VclMessageType::Warning, 
VclButtonsType::Ok, IDEResId(RID_STR_COULDNTWRITE)));
+xBox->run();
+return;
+}
 
-nRead = xInput->readBytes( bytes, 1024 );
-if (! nRead)
-break;
-}
+// export dialog model to xml
+auto xInput(xmlscript::exportDialogModel(GetDialog(), xContext, 
GetDocument().getDocumentOrNull())->createInputStream());
 
-// With resource?
-Reference< beans::XPropertySet > xDialogModelPropSet( xDialogModel, 
UNO_QUERY );
-Reference< resource::XStringResourceResolver > xStringResourceResolver;
-if( xDialogModelPropSet.is() )
-{
-try
-{
-Any aResourceResolver = xDialogModelPropSet->getPropertyValue( 
"ResourceResolver" );
-aResourceResolver >>= xStringResourceResolver;
-}
-catch(const beans::UnknownPropertyException& )
-{}
-}
+for (Sequence bytes; xInput->readBytes(bytes, 
xInput->available());)
+xOutput->writeBytes(bytes);
 
-bool bResource = false;
-if( xStringResourceResolver.is() )
+// With resource?
+Reference< resource::XStringResourceResolver > xStringResourceResolver;
+if (auto xDialogModelPropSet = GetDialog().query())
+{
+try
 {
-Sequence< lang::Locale > aLocaleSeq = 
xStringResourceResolver->getLocales();
-if( aLocaleSeq.hasElements() )
-bResource = true;
+Any aResourceResolver = xDialogModelPropSet->getPropertyValue( 
"ResourceResolver" );
+aResourceResolver >>= xStringResourceResolver;
 }
+catch(const beans::UnknownPropertyException& )
+{}
+}
 
-if( bResource )
+Sequence aLocaleSeq;
+if (xStringResourceResolver)
+aLocaleSeq = xStringResourceResolver->getLocales();
+if (aLocaleSeq.hasElements())
+{
+INetURLObject aURLObj(aSelectedFileURL);
+aURLObj.removeExtension();
+

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

2023-04-29 Thread Mike Kaganski (via logerrit)
 basctl/source/basicide/baside3.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 5f303eaaeac23813e9809c87bce406ea5c52ee14
Author: Mike Kaganski 
AuthorDate: Sat Apr 29 14:19:00 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sat Apr 29 14:23:50 2023 +0200

tdf#155077: use the selected URL when writing languages

Regression after commit 9a55b97e980bbf2a0ce12841f6168f1f7545ac96
(tdf#40068 Remember last directory for basic/dialog import/export,
2021-07-14).

Change-Id: I6ddb88cbe8a08128c451169de7e9ed4597dc4356
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151181
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index 85a3a7d026e6..61bbbc056956 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -623,7 +623,7 @@ void DialogWindow::SaveDialog()
 if( aDlg.Execute() != ERRCODE_NONE )
 return;
 
-Sequence< OUString > aPaths = xFP->getSelectedFiles();
+OUString aSelectedFileURL = xFP->getSelectedFiles()[0];
 
 // export dialog model to xml
 Reference< container::XNameContainer > xDialogModel = GetDialog();
@@ -635,9 +635,9 @@ void DialogWindow::SaveDialog()
 Reference< XOutputStream > xOutput;
 try
 {
-if( xSFI->exists( aPaths[0] ) )
-xSFI->kill( aPaths[0] );
-xOutput = xSFI->openFileWrite( aPaths[0] );
+if( xSFI->exists(aSelectedFileURL) )
+xSFI->kill(aSelectedFileURL);
+xOutput = xSFI->openFileWrite(aSelectedFileURL);
 }
 catch(const Exception& )
 {}
@@ -680,7 +680,7 @@ void DialogWindow::SaveDialog()
 
 if( bResource )
 {
-INetURLObject aURLObj(u"");
+INetURLObject aURLObj(aSelectedFileURL);
 aURLObj.removeExtension();
 OUString aDialogName( aURLObj.getName() );
 aURLObj.removeSegment();


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

2023-04-28 Thread Radhey Parekh (via logerrit)
 basctl/source/basicide/baside3.cxx |   77 -
 1 file changed, 25 insertions(+), 52 deletions(-)

New commits:
commit f43c365fdddfaa6095c5392e3044914ad1054652
Author: Radhey Parekh 
AuthorDate: Thu Aug 11 23:06:08 2022 +0530
Commit: Hossein 
CommitDate: Fri Apr 28 21:52:00 2023 +0200

tdf#145538 Use range based for loops

Change-Id: I6a393526d96fc5c7bee88fc03fc254dbdbe975cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138157
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index 4e51cd4ed760..85a3a7d026e6 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -694,20 +694,17 @@ void DialogWindow::SaveDialog()
 Sequence< OUString > aContentSeq = xSFI->getFolderContents( 
aURL, false );
 
 OUString aDialogName_ = aDialogName + "_" ;
-sal_Int32 nCount = aContentSeq.getLength();
-const OUString* pFiles = aContentSeq.getConstArray();
-for( int i = 0 ; i < nCount ; i++ )
+for( const OUString& rCompleteName : aContentSeq )
 {
-OUString aCompleteName = pFiles[i];
 OUString aPureName;
 OUString aExtension;
-sal_Int32 iDot = aCompleteName.lastIndexOf( '.' );
-sal_Int32 iSlash = aCompleteName.lastIndexOf( '/' );
+sal_Int32 iDot = rCompleteName.lastIndexOf( '.' );
+sal_Int32 iSlash = rCompleteName.lastIndexOf( '/' );
 if( iDot != -1 )
 {
 sal_Int32 iCopyFrom = (iSlash != -1) ? iSlash + 1 : 0;
-aPureName = aCompleteName.copy( iCopyFrom, 
iDot-iCopyFrom );
-aExtension = aCompleteName.copy( iDot + 1 );
+aPureName = rCompleteName.copy( iCopyFrom, 
iDot-iCopyFrom );
+aExtension = rCompleteName.copy( iDot + 1 );
 }
 
 if( aExtension == "properties" || aExtension == "default" )
@@ -716,7 +713,7 @@ void DialogWindow::SaveDialog()
 {
 try
 {
-xSFI->kill( aCompleteName );
+xSFI->kill( rCompleteName );
 }
 catch(const uno::Exception& )
 {}
@@ -731,11 +728,8 @@ void DialogWindow::SaveDialog()
 
 // Add locales
 Sequence< lang::Locale > aLocaleSeq = 
xStringResourceResolver->getLocales();
-const lang::Locale* pLocales = aLocaleSeq.getConstArray();
-sal_Int32 nLocaleCount = aLocaleSeq.getLength();
-for( sal_Int32 iLocale = 0 ; iLocale < nLocaleCount ; iLocale++ )
+for( const lang::Locale& rLocale : aLocaleSeq )
 {
-const lang::Locale& rLocale = pLocales[ iLocale ];
 xStringResourceWithLocation->newLocale( rLocale );
 }
 
@@ -758,32 +752,15 @@ static std::vector< lang::Locale > 
implGetLanguagesOnlyContainedInFirstSeq
 {
 std::vector< lang::Locale > avRet;
 
-const lang::Locale* pFirst = aFirstSeq.getConstArray();
-const lang::Locale* pSecond = aSecondSeq.getConstArray();
-sal_Int32 nFirstCount = aFirstSeq.getLength();
-sal_Int32 nSecondCount = aSecondSeq.getLength();
-
-for( sal_Int32 iFirst = 0 ; iFirst < nFirstCount ; iFirst++ )
-{
-const lang::Locale& rFirstLocale = pFirst[ iFirst ];
-
-bool bAlsoContainedInSecondSeq = false;
-for( sal_Int32 iSecond = 0 ; iSecond < nSecondCount ; iSecond++ )
-{
-const lang::Locale& rSecondLocale = pSecond[ iSecond ];
-
-bool bMatch = localesAreEqual( rFirstLocale, rSecondLocale );
-if( bMatch )
-{
-bAlsoContainedInSecondSeq = true;
-break;
-}
-}
-
-if( !bAlsoContainedInSecondSeq )
-avRet.push_back( rFirstLocale );
-}
-
+std::copy_if(aFirstSeq.begin(), aFirstSeq.end(),
+std::back_inserter(avRet),
+[](const lang::Locale& rFirstLocale) {
+return std::none_of(
+aSecondSeq.begin(), aSecondSeq.end(),
+[](const lang::Locale& rSecondLocale) {
+return localesAreEqual(rFirstLocale, 
rSecondLocale);
+});
+});
 return avRet;
 }
 
@@ -991,15 +968,13 @@ bool implImportDialog(weld::Window* pWin, const 
ScriptDocument& rDocument, const
 {
 // Check if import default belongs to only import 
languages and use it then

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

2023-04-19 Thread Caolán McNamara (via logerrit)
 basctl/source/dlged/dlgedobj.cxx |   21 +
 1 file changed, 13 insertions(+), 8 deletions(-)

New commits:
commit 8550aff56cec3fbe3a4b8c753d6869d0ad94f702
Author: Caolán McNamara 
AuthorDate: Wed Apr 19 09:35:41 2023 +0100
Commit: Caolán McNamara 
CommitDate: Wed Apr 19 13:52:23 2023 +0200

Resolves: tdf#104011 add a default CellRange argument in dialog editor

so the form combo box can be added without exception, likely either a 
problem
from:

commit 9cff030fa15f89fa1009fbb3827ab11c43c20b04
Date:   Mon Dec 5 09:56:17 2011 +

add some form control support for basic dialogs

or:

commit c0d6bc75b223e9e477ef3669f7dc4abec703ecf6
Date:   Fri Jun 5 14:52:44 2015 +0100

Resolves: tdf#90361 CellValueBinding/CellRangeListSource need 
WithArguments

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

diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx
index 3e06307941da..1f4421d5ca43 100644
--- a/basctl/source/dlged/dlgedobj.cxx
+++ b/basctl/source/dlged/dlgedobj.cxx
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1673,17 +1674,21 @@ void DlgEdObj::MakeDataAware( const Reference< 
frame::XModel >& xModel )
 if ( !xFac.is() )
 return;
 
-css::table::CellAddress aApiAddress;
-
-//tdf#90361 CellValueBinding and CellRangeListSource are unusable
+//tdf#90361 and tdf#104011 CellValueBinding and CellRangeListSource are 
unusable
 //without being initialized, so use createInstanceWithArguments with a
-//dummy BoundCell instead of createInstance. This at least results in
+//dummy BoundCell and CellRange instead of createInstance. This at least 
results in
 //the dialog editor not falling.
-css::beans::NamedValue aValue;
-aValue.Name = "BoundCell";
-aValue.Value <<= aApiAddress;
+css::beans::NamedValue aCellValue;
+aCellValue.Name = "BoundCell";
+css::table::CellAddress aCellAddress;
+aCellValue.Value <<= aCellAddress;
+
+css::beans::NamedValue aCellRange;
+aCellRange.Name = "CellRange";
+css::table::CellRangeAddress aRangeAddress;
+aCellRange.Value <<= aRangeAddress;
 
-Sequence< Any > aArgs{ Any(aValue) };
+Sequence< Any > aArgs{ Any(aCellValue), Any(aCellRange) };
 
 if ( xBindable.is() )
 {


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

2023-04-19 Thread Xisco Fauli (via logerrit)
 basctl/source/basicide/baside2b.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7ec4e29ec5d7063b9e9a9e9ea6c1e18579c48218
Author: Xisco Fauli 
AuthorDate: Wed Apr 19 10:31:52 2023 +0200
Commit: Xisco Fauli 
CommitDate: Wed Apr 19 12:57:52 2023 +0200

basctl: fix crash in EditorWindow::Command

GetWheelData returns nullptr if  mnCommand != CommandEventId::Wheel

Change-Id: I57b30cc137b2f56e4295d49d0163ad95323201ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150598
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 4819de623900..a82cf2ae4e4b 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -505,7 +505,7 @@ void EditorWindow::Command( const CommandEvent& rCEvt )
 const CommandWheelData* pData = rCEvt.GetWheelData();
 
 // Check if it is a Ctrl+Wheel zoom command
-if (pData->IsMod1())
+if (pData && pData->IsMod1())
 {
 const sal_uInt16 nOldZoom = GetCurrentZoom();
 sal_uInt16 nNewZoom;


[Libreoffice-commits] core.git: basctl/source compilerplugins/clang extensions/source

2023-04-12 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/localizationmgr.cxx   |5 +++--
 compilerplugins/clang/stringview.cxx |2 +-
 compilerplugins/clang/stringviewparam.cxx|3 ++-
 extensions/source/propctrlr/formcomponenthandler.cxx |6 +++---
 4 files changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 9f463511fb8712312c94211e34a0fbcd70069108
Author: Noel Grandin 
AuthorDate: Tue Apr 11 11:18:24 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Apr 12 10:49:50 2023 +0200

loplugin:stringview and stringviewparam, whitelist equalsAsciiL

since we have a o3tl::equalsAscii that can handle that

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

diff --git a/basctl/source/basicide/localizationmgr.cxx 
b/basctl/source/basicide/localizationmgr.cxx
index 17371bed2968..ef3a1ed9ff90 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace basctl
 {
@@ -107,7 +108,7 @@ void LocalizationMgr::handleTranslationbar ()
 // TODO: -> export from toolkit
 
 
-static bool isLanguageDependentProperty( const OUString& aName )
+static bool isLanguageDependentProperty( std::u16string_view aName )
 {
 static struct Prop
 {
@@ -126,7 +127,7 @@ static bool isLanguageDependentProperty( const OUString& 
aName )
 };
 
 for (Prop const* pProp = vProp; pProp->sName; ++pProp)
-if (aName.equalsAsciiL(pProp->sName, pProp->nNameLength))
+if (o3tl::equalsAscii(aName, std::string_view(pProp->sName, 
pProp->nNameLength)))
 return true;
 return false;
 }
diff --git a/compilerplugins/clang/stringview.cxx 
b/compilerplugins/clang/stringview.cxx
index 4978c802c55b..b5d533b115cb 100644
--- a/compilerplugins/clang/stringview.cxx
+++ b/compilerplugins/clang/stringview.cxx
@@ -365,7 +365,7 @@ bool StringView::VisitCXXMemberCallExpr(CXXMemberCallExpr 
const* expr)
 {
 auto const dc = loplugin::DeclCheck(expr->getMethodDecl());
 if (dc.Function("toInt32") || dc.Function("toUInt32") || 
dc.Function("toInt64")
-|| dc.Function("toDouble") || dc.Function("equalsAscii")
+|| dc.Function("toDouble") || dc.Function("equalsAscii") || 
dc.Function("equalsAsciiL")
 || dc.Function("equalsIgnoreAsciiCase") || 
dc.Function("compareToIgnoreAsciiCase")
 || dc.Function("matchIgnoreAsciiCase") || dc.Function("trim")
 || dc.Function("startsWith") || dc.Function("endsWith") || 
dc.Function("match"))
diff --git a/compilerplugins/clang/stringviewparam.cxx 
b/compilerplugins/clang/stringviewparam.cxx
index eed439d0adf3..1540f03291c3 100644
--- a/compilerplugins/clang/stringviewparam.cxx
+++ b/compilerplugins/clang/stringviewparam.cxx
@@ -141,7 +141,8 @@ DeclRefExpr const* 
relevantCXXMemberCallExpr(CXXMemberCallExpr const* expr)
 || n == "indexOf" || n == "lastIndexOf" || n == "compareTo" || n 
== "match"
 || n == "trim" || n == "toInt32" || n == "toUInt32" || n == 
"toInt64" || n == "toDouble"
 || n == "equalsIgnoreAsciiCase" || n == "compareToIgnoreAsciiCase" 
|| n == "getToken"
-|| n == "copy" || n == "equalsAscii" || n == 
"matchIgnoreAsciiCase")
+|| n == "copy" || n == "equalsAscii" || n == "equalsAsciiL"
+|| n == "matchIgnoreAsciiCase")
 {
 good = true;
 }
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx 
b/extensions/source/propctrlr/formcomponenthandler.cxx
index 9385d0bdc5af..730bc2c71f8f 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -192,14 +192,14 @@ namespace pcr
 
 namespace
 {
-bool lcl_isLanguageDependentProperty( const OUString& aName )
+bool lcl_isLanguageDependentProperty( std::u16string_view aName )
 {
 bool bRet = false;
 
 const LanguageDependentProp* pLangDepProp = aLanguageDependentProp;
 while( pLangDepProp->pPropName != nullptr )
 {
-if( aName.equalsAsciiL( pLangDepProp->pPropName, 
pLangDepProp->nPropNameLength ))
+if( o3tl::equalsAscii( aName, 
std::string_view(pLangDepProp->pPropName, pLangDepProp->nPropNameLength) ))
 {
 bRet = true;
 break;
@@ -210,7 +210,7 @@ namespace pcr
 }
 
 Reference< resource::XStringResourceResolver > 
lcl_getStringResourceResolverForProperty
-( const Reference< XPropertySet >& _xComponent, const OUString& 
_rPropertyName,
+( const Reference< XPropertySet >& _xComponent, 
std::u16string_view _rPropertyName,
   const Any& _rPropertyValue )
 {
 Reference< 

[Libreoffice-commits] core.git: basctl/source basegfx/source basic/source bridges/source

2023-03-24 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/uiobject.cxx  |3 -
 basegfx/source/polygon/b2dsvgpolypolygon.cxx |6 +--
 basic/source/basmgr/basmgr.cxx   |6 +--
 basic/source/classes/sbunoobj.cxx|   51 +--
 basic/source/sbx/sbxscan.cxx |3 -
 bridges/source/jni_uno/jni_info.cxx  |9 +---
 bridges/source/jni_uno/jni_uno2java.cxx  |3 -
 7 files changed, 29 insertions(+), 52 deletions(-)

New commits:
commit c76fb95d45f0240ee00f831a88e8a52bf3faacbc
Author: Noel Grandin 
AuthorDate: Fri Mar 24 09:29:24 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Mar 24 09:50:49 2023 +

loplugin:stringadd in b*

after my patch to merge the bufferadd loplugin into stringadd

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

diff --git a/basctl/source/basicide/uiobject.cxx 
b/basctl/source/basicide/uiobject.cxx
index 80807d3a40a6..b875b1eceda7 100644
--- a/basctl/source/basicide/uiobject.cxx
+++ b/basctl/source/basicide/uiobject.cxx
@@ -28,8 +28,7 @@ StringMap EditorWindowUIObject::get_state()
 OUStringBuffer aRes;
 for (i = 0, nParas = pEditEngine->GetParagraphCount(); i < nParas; ++i)
 {
-aRes.append(pEditEngine->GetText(i));
-aRes.append("\n");
+aRes.append(pEditEngine->GetText(i) + "\n");
 }
 
 aMap["Text"] = aRes.makeStringAndClear();
diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx 
b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index aa0fedb2ddf2..6bb34614c6ae 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -704,9 +704,9 @@ namespace basegfx::utils
 aResult.append(' ');
 }
 
-aResult.append(aPoint.getX());
-aResult.append(',');
-aResult.append(aPoint.getY());
+aResult.append(OUString::number(aPoint.getX())
++ ","
++ OUString::number(aPoint.getY()));
 }
 
 return aResult.makeStringAndClear();
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 72776dd08153..c00221f27a12 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1540,9 +1540,9 @@ ErrCode BasicManager::ExecuteMacro( OUString const& 
i_fullyQualifiedName, std::u
 sal_Int32 nPos {0};
 for (;;)
 {
-aBuff.append( "\"" );
-aBuff.append( o3tl::getToken(sArgs2, 0, ',', nPos) );
-aBuff.append( "\"" );
+aBuff.append( OUString::Concat("\"")
++ o3tl::getToken(sArgs2, 0, ',', nPos)
++ "\"" );
 if (nPos<0)
 break;
 aBuff.append( "," );
diff --git a/basic/source/classes/sbunoobj.cxx 
b/basic/source/classes/sbunoobj.cxx
index 71ef915e942a..36feb923a6de 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -1605,9 +1605,7 @@ static OUString getDbgObjectName(SbUnoObject& rUnoObj)
 {
 aRet.append( "\n" );
 }
-aRet.append( "\"" );
-aRet.append( aName );
-aRet.append( "\":" );
+aRet.append( "\"" + aName + "\":" );
 return aRet.makeStringAndClear();
 }
 
@@ -1739,16 +1737,16 @@ static OUString 
Impl_GetSupportedInterfaces(SbUnoObject& rUnoObj)
 auto x = o3tl::tryAccess>(aToInspectObj);
 if( !x )
 {
-aRet.append( ID_DBG_SUPPORTEDINTERFACES );
-aRet.append( " not available.\n(TypeClass is not 
TypeClass_INTERFACE)\n" );
+aRet.append( ID_DBG_SUPPORTEDINTERFACES
++ " not available.\n(TypeClass is not TypeClass_INTERFACE)\n" );
 }
 else
 {
 Reference< XTypeProvider > xTypeProvider( *x, UNO_QUERY );
 
-aRet.append( "Supported interfaces by object " );
-aRet.append(getDbgObjectName(rUnoObj));
-aRet.append( "\n" );
+aRet.append( "Supported interfaces by object "
++ getDbgObjectName(rUnoObj)
++ "\n" );
 if( xTypeProvider.is() )
 {
 // get the interfaces of the implementation
@@ -1769,9 +1767,9 @@ static OUString Impl_GetSupportedInterfaces(SbUnoObject& 
rUnoObj)
 typelib_TypeDescription * pTD = nullptr;
 rType.getDescription(  );
 
-aRet.append( "*** ERROR: No IdlClass for type \"" );
-aRet.append( pTD->pTypeName );
-aRet.append( "\"\n*** Please check type library\n" );
+aRet.append( OUString::Concat("*** ERROR: No IdlClass for 
type \"")
++ OUString::unacquired(>pTypeName)
++ "\"\n*** Please check type library\n" );
 }

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

2023-03-18 Thread Andrea Gelmini (via logerrit)
 basctl/source/basicide/moduldl2.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3086565a02ec85ff43be641bd2b7b1a499bb4968
Author: Andrea Gelmini 
AuthorDate: Sat Mar 18 02:08:07 2023 +0100
Commit: Julien Nabet 
CommitDate: Sat Mar 18 08:07:47 2023 +

Fix typo

Change-Id: Ibaed9abff12438789841e3560416198d52d7647f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149075
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/basctl/source/basicide/moduldl2.cxx 
b/basctl/source/basicide/moduldl2.cxx
index 2b21a6f6ba64..f66f8cfd0e23 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1322,7 +1322,7 @@ void createLibImpl(weld::Window* pWin, const 
ScriptDocument& rDocument,
 
 // tdf#151741 - store all libraries to the file system, otherwise 
they
 // cannot be renamed/moved since the 
SfxLibraryContainer::renameLibrary
-// moves the foldes/files on the file system
+// moves the folders/files on the file system
 Reference xModLibContainer(
 rDocument.getLibraryContainer(E_SCRIPTS), UNO_QUERY);
 Reference xDlgLibContainer(


[Libreoffice-commits] core.git: basctl/source basic/source

2023-03-17 Thread Andreas Heinisch (via logerrit)
 basctl/source/basicide/moduldl2.cxx |   16 
 basic/source/uno/namecont.cxx   |   20 ++--
 2 files changed, 30 insertions(+), 6 deletions(-)

New commits:
commit 928957ee04c57a20bab42223b81f55a714b62d9c
Author: Andreas Heinisch 
AuthorDate: Wed Mar 8 17:03:35 2023 +0100
Commit: Andreas Heinisch 
CommitDate: Fri Mar 17 14:22:44 2023 +

tdf#151741 - BASIC Organizer: fill various URLs for libraries

Otherwise, libraries cannot be renamed in the BASIC organizer.

Change-Id: I6c78cdee12f8d6128acf68e889fca463ed782477
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148483
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/basctl/source/basicide/moduldl2.cxx 
b/basctl/source/basicide/moduldl2.cxx
index 12650fc8f66a..2b21a6f6ba64 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1320,6 +1320,22 @@ void createLibImpl(weld::Window* pWin, const 
ScriptDocument& rDocument,
 if ( !rDocument.createModule( aLibName, aModName, true, 
sModuleCode ) )
 throw Exception("could not create module " + aModName, 
nullptr);
 
+// tdf#151741 - store all libraries to the file system, otherwise 
they
+// cannot be renamed/moved since the 
SfxLibraryContainer::renameLibrary
+// moves the foldes/files on the file system
+Reference xModLibContainer(
+rDocument.getLibraryContainer(E_SCRIPTS), UNO_QUERY);
+Reference xDlgLibContainer(
+rDocument.getLibraryContainer(E_DIALOGS), UNO_QUERY);
+Reference 
xModPersLibContainer(xModLibContainer,
+   
 UNO_QUERY);
+if (xModPersLibContainer.is())
+xModPersLibContainer->storeLibraries();
+Reference 
xDlgPersLibContainer(xDlgLibContainer,
+   
 UNO_QUERY);
+if (xDlgPersLibContainer.is())
+xDlgPersLibContainer->storeLibraries();
+
 SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, 
aModName, TYPE_MODULE );
 if (SfxDispatcher* pDispatcher = GetDispatcher())
 pDispatcher->ExecuteList(SID_BASICIDE_SBXINSERTED,
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 7716649ee5fa..ca8beee5e74e 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -2146,6 +2146,9 @@ Reference< XNameContainer > SAL_CALL 
SfxLibraryContainer::createLibrary( const O
 pNewLib->maLibElementFileExtension = maLibElementFileExtension;
 
 createVariableURL( pNewLib->maUnexpandedStorageURL, Name, maInfoFileName, 
true );
+// tdf#151741 - fill various storage URLs for the newly created library
+checkStorageURL(pNewLib->maUnexpandedStorageURL, pNewLib->maLibInfoFileURL,
+pNewLib->maStorageURL, pNewLib->maUnexpandedStorageURL);
 
 Reference< XNameAccess > xNameAccess( pNewLib );
 Any aElement;
@@ -2491,10 +2494,6 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const 
OUString& Name, const OU
 }
 loadLibrary( Name );
 
-// Remove from container
-maNameContainer->removeByName( Name );
-maModifiable.setModified( true );
-
 // Rename library folder, but not for linked libraries
 bool bMovedSuccessful = true;
 
@@ -2505,6 +2504,14 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const 
OUString& Name, const OU
 bMovedSuccessful = false;
 
 OUString aLibDirPath = pImplLib->maStorageURL;
+// tdf#151741 - fill various storage URLs for the library
+// These URLs should not be empty for newly created libraries after
+// the change in SfxLibraryContainer::createLibrary.
+if (aLibDirPath.isEmpty())
+{
+checkStorageURL(pImplLib->maUnexpandedStorageURL, 
pImplLib->maLibInfoFileURL,
+pImplLib->maStorageURL, 
pImplLib->maUnexpandedStorageURL);
+}
 
 INetURLObject aDestInetObj( o3tl::getToken(maLibraryPath, 1, ';'));
 aDestInetObj.insertName( NewName, true, INetURLObject::LAST_SEGMENT,
@@ -2581,12 +2588,13 @@ void SAL_CALL SfxLibraryContainer::renameLibrary( const 
OUString& Name, const OU
 
 bMovedSuccessful = true;
 pImplLib->implSetModified( true );
+// Remove old library from container
+maNameContainer->removeByName( Name );
+maModifiable.setModified( true );
 }
 }
 catch(const Exception& )
 {
-// Restore old library
-maNameContainer->insertByName( Name, aLibAny ) ;
 }
 }
 


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

2023-03-11 Thread gokulakrishnan-shankar (via logerrit)
 basctl/source/basicide/baside2.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 20a5e38ee279022b7e6fbc32d2d259738244c0fd
Author: gokulakrishnan-shankar 
AuthorDate: Thu Feb 16 12:58:31 2023 +0530
Commit: Andreas Heinisch 
CommitDate: Sat Mar 11 11:25:19 2023 +

tdf#145538 Refactor to use range-based for-loops

Replaced an existing for-loop (that used indexes to iterate over an array) 
with a range-based for-loop for better readability

Change-Id: I0cb112e6a41d38158deb99fb27f2b8b7f8852339
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147145
Reviewed-by: Andreas Heinisch 
Tested-by: Andreas Heinisch 

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 1df230f9bd92..12a78d9b65f4 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1591,10 +1591,10 @@ void ModulWindowLayout::SyntaxColors::NewConfig (bool 
bFirst)
 }
 
 bool bChanged = false;
-for (unsigned i = 0; i != std::size(vIds); ++i)
+for (const auto& vId: vIds)
 {
-Color const aColor = aConfig.GetColorValue(vIds[i].eEntry).nColor;
-Color& rMyColor = aColors[vIds[i].eTokenType];
+Color const aColor = aConfig.GetColorValue(vId.eEntry).nColor;
+Color& rMyColor = aColors[vId.eTokenType];
 if (bFirst || aColor != rMyColor)
 {
 rMyColor = aColor;


[Libreoffice-commits] core.git: basctl/source vcl/qt5

2023-03-02 Thread Michael Weghorn (via logerrit)
 basctl/source/basicide/baside2b.cxx |4 +++-
 basctl/source/basicide/linenumberwindow.cxx |4 +++-
 vcl/qt5/QtGraphics_Controls.cxx |1 -
 3 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 699a1745f30cc0e89d59c6fc6ea742da5ff0ccea
Author: Michael Weghorn 
AuthorDate: Thu Mar 2 12:56:13 2023 +0100
Commit: Michael Weghorn 
CommitDate: Thu Mar 2 16:27:33 2023 +

tdf#152073 tdf#153895 basicide: Set bg color for border win

As described in the original commit to address tdf#152073
("Glitch rendering line numbers in Basic IDE editor (kf5 only)"),
the fact that the KDE Breeze style's frame border is partly
transparent was causing artifacts in the Basic IDE:

commit 6f4b8b7cfe2907b7da46eec6951a0e09b836a6de
Author: Michael Weghorn 
Date:   Tue Jan 31 16:08:53 2023 +0100

tdf#152073 qt: Draw background when drawing frame

For native drawing of a frame (border), use
the window background color as default color.

As mentioned in commit f39f21d92ec83c3a5062f29dd26214fc83012c06
("tdf#138010 (IV) VclScrolledWindow: Use actual border width"),
the Qt/KDE Breeze style uses a frame width of 2, with the
actual 1 pixel border being surrounded by a 1 pixel
padding/margin.

Transparent background did not ensure that the 1 pixel
padding/margin is repainted and could thus result
in artifacts from what was painted to that location
previously (s. the Basic IDE editor example from
tdf#152073).

[...]

However, there are cases when a transparent background
is actually wanted, like in the print dialog (tdf#153895).

Therefore, revert the original commit mentioned above
and explicitly set a background color for the border windows
of the involved windows in the Basic IDE instead, which is
in line with the alternative already mentioned in the above commit
("An alternative might be to explicitly draw the
background further up the call stack, [...]."), but enables
transparency in the qt5/qt6/kf5-specific drawing for
the frame again.

Change-Id: Ifb4deb80c6ae245ec630a4fdc23f675e5587836c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148117
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index d941a653dc8b..d24955ea3788 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -252,7 +252,9 @@ EditorWindow::EditorWindow (vcl::Window* pParent, 
ModulWindow* pModulWindow) :
 pCodeCompleteWnd(VclPtr::Create(this))
 {
 set_id("EditorWindow");
-
SetBackground(Wallpaper(rModulWindow.GetLayout().GetSyntaxBackgroundColor()));
+const Wallpaper 
aBackground(rModulWindow.GetLayout().GetSyntaxBackgroundColor());
+SetBackground(aBackground);
+GetWindow(GetWindowType::Border)->SetBackground(aBackground);
 SetPointer( PointerStyle::Text );
 SetHelpId( HID_BASICIDE_EDITORWINDOW );
 
diff --git a/basctl/source/basicide/linenumberwindow.cxx 
b/basctl/source/basicide/linenumberwindow.cxx
index 9f5e85c72102..18420199e2a9 100644
--- a/basctl/source/basicide/linenumberwindow.cxx
+++ b/basctl/source/basicide/linenumberwindow.cxx
@@ -21,7 +21,9 @@ LineNumberWindow::LineNumberWindow(vcl::Window* pParent, 
ModulWindow* pModulWind
 , m_pModulWindow(pModulWindow)
 , m_nCurYOffset(0)
 {
-
SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetWindowColor()));
+const Wallpaper 
aBackground(GetSettings().GetStyleSettings().GetWindowColor());
+SetBackground(aBackground);
+GetWindow(GetWindowType::Border)->SetBackground(aBackground);
 m_FontColor = GetSettings().GetStyleSettings().GetWindowTextColor();
 m_nBaseWidth = GetTextWidth("8");
 m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2;
diff --git a/vcl/qt5/QtGraphics_Controls.cxx b/vcl/qt5/QtGraphics_Controls.cxx
index 4bb4df1e6e66..d3ebf5e34bf4 100644
--- a/vcl/qt5/QtGraphics_Controls.cxx
+++ b/vcl/qt5/QtGraphics_Controls.cxx
@@ -287,7 +287,6 @@ bool QtGraphics_Controls::drawNativeControl(ControlType 
type, ControlPart part,
 break;
 }
 [[fallthrough]]; // QPalette::Window
-case ControlType::Frame:
 case ControlType::Menubar:
 case ControlType::WindowBackground:
 
m_image->fill(QApplication::palette().color(QPalette::Window).rgb());


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

2023-02-28 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/documentenumeration.cxx |   20 
 basctl/source/basicide/documentenumeration.hxx |4 ++--
 2 files changed, 6 insertions(+), 18 deletions(-)

New commits:
commit 822cc9e941bf4fcf99ad1214096deea5d0997802
Author: Noel Grandin 
AuthorDate: Tue Feb 28 10:08:48 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Feb 28 11:41:12 2023 +

flatten basctl::docs::DocumentEnumeration

no need to use pimpl pattern here

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

diff --git a/basctl/source/basicide/documentenumeration.cxx 
b/basctl/source/basicide/documentenumeration.cxx
index 59a85d6a9859..d71e02139e02 100644
--- a/basctl/source/basicide/documentenumeration.cxx
+++ b/basctl/source/basicide/documentenumeration.cxx
@@ -48,22 +48,10 @@ namespace basctl::docs {
 
 namespace FrameSearchFlag = ::com::sun::star::frame::FrameSearchFlag;
 
-// DocumentEnumeration_Data
-struct DocumentEnumeration_Data
-{
-Reference< css::uno::XComponentContext > aContext;
-const IDocumentDescriptorFilter*pFilter;
-
-DocumentEnumeration_Data( Reference< css::uno::XComponentContext > 
const & _rContext, const IDocumentDescriptorFilter* _pFilter )
-:aContext( _rContext )
-,pFilter( _pFilter )
-{
-}
-};
-
 // DocumentEnumeration
 DocumentEnumeration::DocumentEnumeration( Reference< 
css::uno::XComponentContext > const & _rContext, const 
IDocumentDescriptorFilter* _pFilter )
-:m_pData( new DocumentEnumeration_Data( _rContext, _pFilter ) )
+: m_xContext( _rContext )
+, m_pFilter( _pFilter )
 {
 }
 
@@ -152,11 +140,11 @@ namespace basctl::docs {
 
 try
 {
-const Reference< XDesktop2 > xDesktop = Desktop::create( 
m_pData->aContext );
+const Reference< XDesktop2 > xDesktop = Desktop::create( 
m_xContext );
 const Reference< XFrames > xFrames( xDesktop->getFrames(), 
UNO_SET_THROW );
 const Sequence< Reference< XFrame > > aFrames( 
xFrames->queryFrames( FrameSearchFlag::ALL ) );
 
-lcl_getDocuments_nothrow( aFrames, _out_rDocuments, 
m_pData->pFilter );
+lcl_getDocuments_nothrow( aFrames, _out_rDocuments, m_pFilter );
 }
 catch( const Exception& )
 {
diff --git a/basctl/source/basicide/documentenumeration.hxx 
b/basctl/source/basicide/documentenumeration.hxx
index 084a4aa0cf09..dfd4d2e8172f 100644
--- a/basctl/source/basicide/documentenumeration.hxx
+++ b/basctl/source/basicide/documentenumeration.hxx
@@ -51,7 +51,6 @@ namespace basctl::docs {
 };
 
 
-struct DocumentEnumeration_Data;
 /** is a helper class for enumerating documents in OOo
 
 If you need a list of all open documents in OOo, this is little bit of
@@ -81,7 +80,8 @@ namespace basctl::docs {
 ) const;
 
 private:
-std::unique_ptr< DocumentEnumeration_Data > m_pData;
+css::uno::Reference< css::uno::XComponentContext > m_xContext;
+const IDocumentDescriptorFilter* m_pFilter;
 };
 
 


[Libreoffice-commits] core.git: basctl/source desktop/qa desktop/source include/sfx2 sc/qa sc/source sd/qa sd/source sfx2/source starmath/inc starmath/source svx/qa svx/source sw/qa sw/source vbahelpe

2023-02-16 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/baside2.cxx|6 
 basctl/source/basicide/baside2b.cxx   |4 
 basctl/source/basicide/baside3.cxx|2 
 basctl/source/basicide/basides1.cxx   |   33 ++---
 basctl/source/basicide/basides2.cxx   |   13 -
 basctl/source/basicide/basides3.cxx   |2 
 basctl/source/basicide/basidesh.cxx   |   17 +-
 basctl/source/basicide/basobj3.cxx|   14 +-
 basctl/source/basicide/bastypes.cxx   |4 
 basctl/source/basicide/localizationmgr.cxx|2 
 basctl/source/basicide/moduldl2.cxx   |8 -
 desktop/qa/desktop_lib/test_desktop_lib.cxx   |   22 +--
 desktop/source/lib/init.cxx   |6 
 include/sfx2/lokhelper.hxx|2 
 include/sfx2/viewsh.hxx   |   39 ++---
 sc/qa/unit/scshapetest.cxx|6 
 sc/qa/unit/tiledrendering/tiledrendering.cxx  |   58 
 sc/source/core/data/global.cxx|2 
 sc/source/ui/Accessibility/AccessibleDocument.cxx |   17 +-
 sc/source/ui/app/inputhdl.cxx |8 -
 sc/source/ui/app/inputwin.cxx |4 
 sc/source/ui/dbgui/validate.cxx   |   12 -
 sc/source/ui/docshell/datastream.cxx  |2 
 sc/source/ui/docshell/docsh.cxx   |2 
 sc/source/ui/docshell/docsh4.cxx  |4 
 sc/source/ui/drawfunc/drawsh.cxx  |4 
 sc/source/ui/drawfunc/drawsh2.cxx |4 
 sc/source/ui/drawfunc/drawsh5.cxx |6 
 sc/source/ui/drawfunc/drtxtob.cxx |   14 +-
 sc/source/ui/drawfunc/drtxtob2.cxx|8 -
 sc/source/ui/drawfunc/fudraw.cxx  |2 
 sc/source/ui/drawfunc/fuins1.cxx  |2 
 sc/source/ui/drawfunc/fuins2.cxx  |4 
 sc/source/ui/drawfunc/fusel.cxx   |2 
 sc/source/ui/drawfunc/futext.cxx  |   10 -
 sc/source/ui/inc/ChildWindowWrapper.hxx   |2 
 sc/source/ui/miscdlgs/acredlin.cxx|   12 -
 sc/source/ui/navipi/content.cxx   |2 
 sc/source/ui/unoobj/dispuno.cxx   |9 -
 sc/source/ui/unoobj/docuno.cxx|6 
 sc/source/ui/unoobj/viewuno.cxx   |   20 +--
 sc/source/ui/vba/excelvbahelper.cxx   |2 
 sc/source/ui/vba/vbawindow.cxx|8 -
 sc/source/ui/vba/vbaworksheets.cxx|2 
 sc/source/ui/view/cellsh.cxx  |2 
 sc/source/ui/view/cellsh1.cxx |  118 +-
 sc/source/ui/view/cellsh2.cxx |  109 
 sc/source/ui/view/cellsh3.cxx |   32 ++--
 sc/source/ui/view/drawvie3.cxx|2 
 sc/source/ui/view/drawview.cxx|   49 +++
 sc/source/ui/view/editsh.cxx  |8 -
 sc/source/ui/view/formatsh.cxx|6 
 sc/source/ui/view/gridwin.cxx |   33 ++---
 sc/source/ui/view/preview.cxx |2 
 sc/source/ui/view/prevwsh.cxx |   32 ++--
 sc/source/ui/view/reffact.cxx |6 
 sc/source/ui/view/spelleng.cxx|6 
 sc/source/ui/view/tabcont.cxx |6 
 sc/source/ui/view/tabview.cxx |   27 +---
 sc/source/ui/view/tabview3.cxx|   37 ++---
 sc/source/ui/view/tabview5.cxx|   15 --
 sc/source/ui/view/tabvwsh2.cxx|   10 -
 sc/source/ui/view/tabvwsh3.cxx|   28 ++--
 sc/source/ui/view/tabvwsh4.cxx|   64 -
 sc/source/ui/view/tabvwsh5.cxx|2 
 sc/source/ui/view/tabvwsh9.cxx|   20 +--
 sc/source/ui/view/tabvwsha.cxx|   18 +-
 sc/source/ui/view/tabvwshb.cxx|   16 +-
 sc/source/ui/view/tabvwshc.cxx|8 -
 sc/source/ui/view/tabvwshd.cxx|6 
 sc/source/ui/view/tabvwshf.cxx|4 
 sc/source/ui/view/viewdata.cxx|6 
 sc/source/ui/view/viewutil.cxx|4 
 sd/qa/unit/tiledrendering/tiledrendering.cxx  |   28 ++--
 sd/source/ui/docshell/docshell.cxx|8 -
 sd/source/ui/framework/factories/BasicViewFactory.cxx |4 
 sd/source/ui/framework/factories/ChildWindowPane.cxx  |   37 ++---
 

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

2023-02-15 Thread Gabor Kelemen (via logerrit)
 basctl/source/basicide/unomodel.cxx  |1 
 chart2/source/model/template/BubbleDataInterpreter.cxx   |   11 -
 chart2/source/model/template/ColumnLineDataInterpreter.cxx   |1 
 chart2/source/model/template/DataInterpreter.cxx |7 -
 chart2/source/model/template/StockDataInterpreter.cxx|1 
 chart2/source/model/template/XYDataInterpreter.cxx   |9 -
 chart2/source/tools/DiagramHelper.cxx|3 
 chart2/source/tools/InternalData.cxx |   31 ++--
 chart2/source/tools/InternalDataProvider.cxx |   75 +--
 chart2/source/tools/RelativeSizeHelper.cxx   |7 -
 connectivity/source/drivers/firebird/Indexes.cxx |3 
 connectivity/source/drivers/firebird/Statement.cxx   |1 
 connectivity/source/drivers/firebird/StatementCommonBase.cxx |1 
 cppu/source/threadpool/threadident.cxx   |1 
 cppu/source/threadpool/threadpool.cxx|5 
 15 files changed, 71 insertions(+), 86 deletions(-)

New commits:
commit c95597ac428f6515df232a07e82af75f4e0e242a
Author: Gabor Kelemen 
AuthorDate: Tue Feb 14 21:43:43 2023 +0100
Commit: Gabor Kelemen 
CommitDate: Wed Feb 15 18:37:59 2023 +

Drop 'using namespace ::std' in dirs b* c*

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

diff --git a/basctl/source/basicide/unomodel.cxx 
b/basctl/source/basicide/unomodel.cxx
index 4a9ee759f060..5d3946b426c6 100644
--- a/basctl/source/basicide/unomodel.cxx
+++ b/basctl/source/basicide/unomodel.cxx
@@ -33,7 +33,6 @@ namespace basctl
 {
 
 using namespace ::cppu;
-using namespace ::std;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
diff --git a/chart2/source/model/template/BubbleDataInterpreter.cxx 
b/chart2/source/model/template/BubbleDataInterpreter.cxx
index fdcc35667e41..bb468fd9723d 100644
--- a/chart2/source/model/template/BubbleDataInterpreter.cxx
+++ b/chart2/source/model/template/BubbleDataInterpreter.cxx
@@ -30,7 +30,6 @@
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
-using namespace ::std;
 
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Sequence;
@@ -58,8 +57,8 @@ InterpretedData BubbleDataInterpreter::interpretDataSource(
 std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aData 
= DataInterpreter::getDataSequences(xSource);
 
 uno::Reference< chart2::data::XLabeledDataSequence > xValuesX;
-vector< uno::Reference< chart2::data::XLabeledDataSequence > > 
aYValuesVector;
-vector< uno::Reference< chart2::data::XLabeledDataSequence > > 
aSizeValuesVector;
+std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > 
aYValuesVector;
+std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > 
aSizeValuesVector;
 
 uno::Reference< chart2::data::XLabeledDataSequence > xCategories;
 bool bHasCategories = HasCategories( aArguments, aData );
@@ -119,7 +118,7 @@ InterpretedData BubbleDataInterpreter::interpretDataSource(
 
 // create DataSeries
 std::size_t nSeriesIndex = 0;
-vector< rtl::Reference< DataSeries > > aSeriesVec;
+std::vector< rtl::Reference< DataSeries > > aSeriesVec;
 aSeriesVec.reserve( aSizeValuesVector.size());
 
 Reference< data::XLabeledDataSequence > xClonedXValues = xValuesX;
@@ -127,7 +126,7 @@ InterpretedData BubbleDataInterpreter::interpretDataSource(
 
 for( size_t nN = 0; nN < aSizeValuesVector.size(); ++nN, ++nSeriesIndex )
 {
-vector< uno::Reference< chart2::data::XLabeledDataSequence > > 
aNewData;
+std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > 
aNewData;
 if( xValuesX.is() )
 {
 if( nN > 0 && xCloneableX.is() )
@@ -177,7 +176,7 @@ InterpretedData 
BubbleDataInterpreter::reinterpretDataSeries(
 ! xValuesY.is() ||
 ! xValuesSize.is() )
 {
-vector< uno::Reference< chart2::data::XLabeledDataSequence > > 
aValueSeqVec(
+std::vector< uno::Reference< 
chart2::data::XLabeledDataSequence > > aValueSeqVec(
 DataSeriesHelper::getAllDataSequencesByRole(
 aSeries[i]->getDataSequences2(), "values" ));
 if( xValuesX.is())
diff --git a/chart2/source/model/template/ColumnLineDataInterpreter.cxx 
b/chart2/source/model/template/ColumnLineDataInterpreter.cxx
index 15ce4adce6fc..5cce30cd97a0 100644
--- a/chart2/source/model/template/ColumnLineDataInterpreter.cxx
+++ b/chart2/source/model/template/ColumnLineDataInterpreter.cxx
@@ -25,7 +25,6 @@
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::chart2;
-using namespace 

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

2023-02-12 Thread Mike Kaganski (via logerrit)
 basctl/source/basicide/scriptdocument.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 9fa9a510f9a391979a1f5f25ae1b5f4392db7692
Author: Mike Kaganski 
AuthorDate: Mon Feb 13 08:54:27 2023 +0300
Commit: Mike Kaganski 
CommitDate: Mon Feb 13 06:51:34 2023 +

Use startsWithIgnoreAsciiCase with last argument to simplify

Change-Id: Ifa1261ed76ec078a60fcdbd4ce806abe23e4c056
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146850
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/basctl/source/basicide/scriptdocument.cxx 
b/basctl/source/basicide/scriptdocument.cxx
index 4136ced4c18e..c435d7a57da7 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -928,10 +928,9 @@ namespace basctl
 }
 else if ( aScheme.equalsIgnoreAsciiCase("vnd.sun.star.pkg") )
 {
-OUString aAuthority = xUriRef->getAuthority();
-if ( aAuthority.matchIgnoreAsciiCase("vnd.sun.star.expand:") )
+OUString aDecodedURL = xUriRef->getAuthority();
+if 
(aDecodedURL.startsWithIgnoreAsciiCase("vnd.sun.star.expand:", ))
 {
-OUString aDecodedURL( aAuthority.copy( sizeof ( 
"vnd.sun.star.expand:" ) - 1 ) );
 aDecodedURL = ::rtl::Uri::decode( aDecodedURL, 
rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
 Reference< XMacroExpander > xMacroExpander = 
theMacroExpander::get(xContext);
 aFileURL = xMacroExpander->expandMacros( aDecodedURL );


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

2023-02-08 Thread Stephan Bergmann (via logerrit)
 basctl/source/basicide/scriptdocument.cxx |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit a82c783a28b147963486c492184768be6be37da0
Author: Stephan Bergmann 
AuthorDate: Wed Feb 8 19:53:28 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 8 20:11:36 2023 +

Adapt to macOS Resources vs. share naming

On macOS, "Tools - Macros - Organize Macros - Basic... - Macro From:"
erroneously listed all the per-application modules ("Access2Base", "Depot",
"Euro", ...) under "My Macros" instead of "Application Macros".

Change-Id: Ic997ab30d9205d8402136ea381745c08ce555623
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146673
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/basctl/source/basicide/scriptdocument.cxx 
b/basctl/source/basicide/scriptdocument.cxx
index 71a2c765339c..4136ced4c18e 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -52,6 +52,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 #include 
@@ -945,9 +946,9 @@ namespace basctl
 OSL_VERIFY( aFileItem.getFileStatus( aFileStatus ) == 
::osl::FileBase::E_None );
 OUString aCanonicalFileURL( aFileStatus.getFileURL() );
 
-if( aCanonicalFileURL.indexOf( "share/basic" ) >= 0 ||
-aCanonicalFileURL.indexOf( "share/uno_packages" ) >= 0 ||
-aCanonicalFileURL.indexOf( "share/extensions" ) >= 0 )
+if( aCanonicalFileURL.indexOf( LIBO_SHARE_FOLDER "/basic" ) >= 
0 ||
+aCanonicalFileURL.indexOf( LIBO_SHARE_FOLDER 
"/uno_packages" ) >= 0 ||
+aCanonicalFileURL.indexOf( LIBO_SHARE_FOLDER "/extensions" 
) >= 0 )
 bIsShared = true;
 }
 }


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

2023-02-08 Thread Rafael Lima (via logerrit)
 basctl/source/basicide/basidesh.cxx |   12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 9ebba1d99457a1049c2f61ba15cd4c99a68d74e7
Author: Rafael Lima 
AuthorDate: Wed Jan 11 20:21:29 2023 +
Commit: Rafael Lima 
CommitDate: Wed Feb 8 11:46:34 2023 +

tdf#147488 BASIC: Create empty module when an empty library is selected

If the Standard library is empty (has no modules), when the Basic IDE is 
opened it shows only a black screen with nothing.

This patch makes it so that when the Standard library has no modules, a 
generic module is created and shown.

Change-Id: I26dbe41b4244492a21649ab08c5fc2df24ca12a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145309
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins

diff --git a/basctl/source/basicide/basidesh.cxx 
b/basctl/source/basicide/basidesh.cxx
index eb3d6996c191..ae61007c7bf8 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -628,6 +628,9 @@ void Shell::UpdateWindows()
 {
 // remove all windows that may not be displayed
 bool bChangeCurWindow = pCurWin == nullptr;
+// stores the total number of modules and dialogs visible
+sal_uInt16 nTotalTabs = 0;
+
 if ( !m_aCurLibName.isEmpty() )
 {
 std::vector > aDeleteVec;
@@ -704,6 +707,7 @@ void Shell::UpdateWindows()
 Sequence< OUString > aModNames( 
doc.getObjectNames( E_SCRIPTS, aLibName ) );
 sal_Int32 nModCount = aModNames.getLength();
 const OUString* pModNames = 
aModNames.getConstArray();
+nTotalTabs += nModCount;
 
 for ( sal_Int32 j = 0 ; j < nModCount ; j++ )
 {
@@ -733,6 +737,7 @@ void Shell::UpdateWindows()
 Sequence< OUString > aDlgNames = 
doc.getObjectNames( E_DIALOGS, aLibName );
 sal_Int32 nDlgCount = aDlgNames.getLength();
 const OUString* pDlgNames = 
aDlgNames.getConstArray();
+nTotalTabs += nDlgCount;
 
 for ( sal_Int32 j = 0 ; j < nDlgCount ; j++ )
 {
@@ -761,7 +766,12 @@ void Shell::UpdateWindows()
 
 if ( bChangeCurWindow )
 {
-if ( !pNextActiveWindow )
+if ( nTotalTabs == 0 )
+{
+// If no tabs are opened, create a generic module and make it 
visible
+pNextActiveWindow = CreateBasWin( m_aCurDocument, m_aCurLibName, 
OUString() );
+}
+else if ( !pNextActiveWindow )
 {
 pNextActiveWindow = FindApplicationWindow().get();
 }


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

2023-02-08 Thread Stephan Bergmann (via logerrit)
 basctl/source/basicide/baside2.cxx |7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 6f91ab6de9ce169ca489f4574b119e06ef6db9dc
Author: Stephan Bergmann 
AuthorDate: Wed Feb 8 09:22:20 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Feb 8 09:18:41 2023 +

Avoid SolarMutexReleaser

UITest_writer_macro_tests occasionally failed with

> ==3730889==ERROR: AddressSanitizer: heap-use-after-free on address 
0x60d00057d080 at pc 0x7f75353d933c bp 0x7ffcedf8de90 sp 0x7ffcedf8de88
> READ of size 8 at 0x60d00057d080 thread T0
>  #0 in basctl::ModulWindow::GetState(SfxItemSet&) at 
basctl/source/basicide/baside2.cxx:1088:22
>  #1 in basctl::Shell::GetState(SfxItemSet&) at 
basctl/source/basicide/basides1.cxx:1160:18
>  #2 in SfxStubbasctl_ShellGetState(SfxShell*, SfxItemSet&) at 
workdir/SdiTarget/basctl/sdi/basslots.hxx:164:1
>  #3 in SfxDispatcher::FillState_(SfxSlotServer const&, SfxItemSet&, 
SfxSlot const*) at sfx2/source/control/dispatch.cxx:1658:9
>  #4 in SfxBindings::Update_Impl(SfxStateCache&) at 
sfx2/source/control/bindings.cxx:260:22
>  #5 in SfxBindings::NextJob_Impl(Timer const*) at 
sfx2/source/control/bindings.cxx:1275:17
>  #6 in SfxBindings::NextJob(Timer*) at 
sfx2/source/control/bindings.cxx:1220:5
>  #7 in SfxBindings::LinkStubNextJob(void*, Timer*) at 
sfx2/source/control/bindings.cxx:1218:1
>  #8 in Link::Call(Timer*) const at 
include/tools/link.hxx:111:45
>  #9 in Timer::Invoke() at vcl/source/app/timer.cxx:75:21
>  #10 in Scheduler::CallbackTaskScheduling() at 
vcl/source/app/scheduler.cxx:481:20
>  #11 in SalTimer::CallCallback() at vcl/inc/saltimer.hxx:54:13
>  #12 in SvpSalInstance::CheckTimeout(bool) at 
vcl/headless/svpinst.cxx:161:53
>  #13 in SvpSalInstance::ImplYield(bool, bool) at 
vcl/headless/svpinst.cxx:399:17
>  #14 in SvpSalInstance::DoYield(bool, bool) at 
vcl/headless/svpinst.cxx:471:21
>  #15 in ImplYield(bool, bool) at vcl/source/app/svapp.cxx:475:48
>  #16 in Application::Yield() at vcl/source/app/svapp.cxx:559:5
>  #17 in Application::Execute() at vcl/source/app/svapp.cxx:453:13
>  #18 in desktop::Desktop::Main() at desktop/source/app/app.cxx:1604:13
>  #19 in ImplSVMain() at vcl/source/app/svmain.cxx:203:35
>  #20 in SVMain() at vcl/source/app/svmain.cxx:235:12
>  #21 in soffice_main at desktop/source/app/sofficemain.cxx:94:12
>  #22 in sal_main at desktop/source/app/main.c:51:15
>  #23 in main at desktop/source/app/main.c:49:1
>
> 0x60d00057d080 is located 0 bytes inside of 144-byte region 
[0x60d00057d080,0x60d00057d110)
> freed by thread T20 here:
>  #0 in operator delete(void*, unsigned long) at 
/home/sbergman/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:164:3
>  #1 in basctl::ModulWindow::~ModulWindow() at 
basctl/source/basicide/baside2.cxx:235:1
>  #2 in VclReferenceBase::release() const at 
include/vcl/vclreferencebase.hxx:43:13
>  #3 in rtl::Reference::~Reference() at 
include/rtl/ref.hxx:129:22
>  #4 in VclPtr::disposeAndClear() at 
include/vcl/vclptr.hxx:209:5
>  #5 in basctl::Shell::~Shell() at 
basctl/source/basicide/basidesh.cxx:246:23
>  #6 in basctl::Shell::~Shell() at 
basctl/source/basicide/basidesh.cxx:228:1
>  #7 in SfxViewFrame::ReleaseObjectShell_Impl() at 
sfx2/source/view/viewfrm.cxx:1114:9
>  #8 in SfxViewFrame::~SfxViewFrame() at 
sfx2/source/view/viewfrm.cxx:1905:5
>  #9 in SfxViewFrame::Close() at sfx2/source/view/viewfrm.cxx:1166:5
>  #10 in SfxFrame::DoClose_Impl() at sfx2/source/view/frame.cxx:138:37
>  #11 in SfxBaseController::dispose() at 
sfx2/source/view/sfxbasecontroller.cxx:931:28
>  #12 in (anonymous 
namespace)::XFrameImpl::setComponent(com::sun::star::uno::Reference
 const&, com::sun::star::uno::Reference 
const&) at framework/source/services/frame.cxx:1493:33
>  #13 in (anonymous namespace)::XFrameImpl::close(unsigned char) at 
framework/source/services/frame.cxx:1704:12
>  #14 in SfxFrame::DoClose() at sfx2/source/view/frame.cxx:104:29
>  #15 in SfxViewFrame::Notify(SfxBroadcaster&, SfxHint const&) at 
sfx2/source/view/viewfrm.cxx:1703:28
>  #16 in SfxBroadcaster::Broadcast(SfxHint const&) at 
svl/source/notify/SfxBroadcaster.cxx:40:24
>  #17 in (anonymous 
namespace)::SfxModelListener_Impl::notifyClosing(com::sun::star::lang::EventObject
 const&) at sfx2/source/doc/objxtor.cxx:145:12
>  #18 in SfxBaseModel::close(unsigned char) at 
sfx2/source/doc/sfxbasemodel.cxx:1487:76
>  #19 in SfxBaseModel::dispose() at sfx2/source/doc/sfxbasemodel.cxx:725:13
>  #20 in gcc3::callVirtualMethod(void*, unsigned int, void*, 
_typelib_TypeDescriptionReference*, bool, unsigned long*, unsigned int, 
unsigned long*, double*) at 
bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx:77:5
>  #21 in 

[Libreoffice-commits] core.git: basctl/source include/sfx2 sc/source sd/source sfx2/source starmath/inc starmath/source sw/inc sw/source

2023-02-01 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/basdoc.cxx   |2 +-
 basctl/source/basicide/basdoc.hxx   |2 +-
 include/sfx2/objsh.hxx  |8 +---
 sc/source/ui/docshell/docsh4.cxx|2 +-
 sc/source/ui/inc/docsh.hxx  |2 +-
 sd/source/ui/docshell/docshel2.cxx  |2 +-
 sd/source/ui/inc/DrawDocShell.hxx   |2 +-
 sfx2/source/doc/objembed.cxx|   12 ++--
 starmath/inc/document.hxx   |3 ++-
 starmath/source/document.cxx|3 ++-
 sw/inc/docsh.hxx|2 +-
 sw/inc/viewsh.hxx   |3 ++-
 sw/source/core/doc/notxtfrm.cxx |2 +-
 sw/source/core/txtnode/fntcache.cxx |   13 -
 sw/source/core/view/viewimp.cxx |2 +-
 sw/source/core/view/vprint.cxx  |5 -
 sw/source/uibase/app/docsh.cxx  |4 ++--
 sw/source/uibase/utlui/unotools.cxx |3 ++-
 18 files changed, 42 insertions(+), 30 deletions(-)

New commits:
commit 0eaad910442a1bbb0c6a89a8887322ea3d6906e0
Author: Caolán McNamara 
AuthorDate: Mon Jan 9 12:47:57 2023 +
Commit: Caolán McNamara 
CommitDate: Wed Feb 1 19:31:49 2023 +

Resolves: tdf#152845 AutoText preview not readable in high contrast mode

if its a high contrast mode with white text on black background.  Reuse
isOutputToWindow to distinguish between the case we are outputting to
screen but not using a vcl::Window (and want to use the appropiate color
for autocolor) vs the cases we are printing or exporting to pdf and not
using a vcl::Window where the color should be black.

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

diff --git a/basctl/source/basicide/basdoc.cxx 
b/basctl/source/basicide/basdoc.cxx
index 83a3f1781630..ffd22b9063c7 100644
--- a/basctl/source/basicide/basdoc.cxx
+++ b/basctl/source/basicide/basdoc.cxx
@@ -82,7 +82,7 @@ void DocShell::FillClass( SvGlobalName*, 
SotClipboardFormatId*, OUString*, sal_I
 DBG_ASSERT( !bTemplate, "No template for Basic" );
 }
 
-void DocShell::Draw( OutputDevice *, const JobSetup &, sal_uInt16 )
+void DocShell::Draw( OutputDevice *, const JobSetup &, sal_uInt16, bool )
 {}
 
 } // namespace basctl
diff --git a/basctl/source/basicide/basdoc.hxx 
b/basctl/source/basicide/basdoc.hxx
index d5b3aabcf961..bb847a0a9b1a 100644
--- a/basctl/source/basicide/basdoc.hxx
+++ b/basctl/source/basicide/basdoc.hxx
@@ -34,7 +34,7 @@ class DocShell: public SfxObjectShell
 
 protected:
 virtual voidDraw( OutputDevice *, const JobSetup & rSetup,
-  sal_uInt16 nAspect ) override;
+  sal_uInt16 nAspect, bool bOutputForScreen ) override;
 virtual voidFillClass( SvGlobalName * pClassName,
SotClipboardFormatId * pFormat,
OUString * pFullTypeName,
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index b64fa61389bf..e3a5b4a022f1 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -650,9 +650,10 @@ public:
 voidDoDraw( OutputDevice *, const Point & rObjPos,
 const Size & rSize,
 const JobSetup & rSetup,
-sal_uInt16 nAspect = ASPECT_CONTENT );
+sal_uInt16 nAspect = ASPECT_CONTENT,
+bool bOutputForScreen = false );
 virtual voidDraw( OutputDevice *, const JobSetup & rSetup,
-  sal_uInt16 nAspect ) = 0;
+  sal_uInt16 nAspect, bool bOutputForScreen ) = 0;
 
 
 virtual voidFillClass( SvGlobalName * pClassName,
@@ -717,7 +718,8 @@ public:
 const Fraction & rScaleX,
 const Fraction & rScaleY,
 const JobSetup & rSetup,
-sal_uInt16 nAspect );
+sal_uInt16 nAspect,
+bool bOutputForScreen );
 
 // Shell Interface
 SAL_DLLPRIVATE void ExecFile_Impl(SfxRequest &);
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index a57a40e9be8b..3ef4dba632d8 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -2174,7 +2174,7 @@ void ScDocShell::GetState( SfxItemSet  )
 }
 }
 
-void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, 
sal_uInt16 nAspect )
+void ScDocShell::Draw( OutputDevice* pDev, const JobSetup & /* rSetup */, 
sal_uInt16 nAspect, bool /*bOutputToWindow*/ )
 {
 
 SCTAB nVisTab = m_pDocument->GetVisibleTab();
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index edf0cbc1c1b0..6df3ebc010e9 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ 

[Libreoffice-commits] core.git: basctl/source chart2/source cui/source include/svx reportdesign/source sc/source sd/source svx/source sw/source

2023-01-30 Thread Tomaž Vajngerl (via logerrit)
 basctl/source/dlged/dlged.cxx  |2 
 basctl/source/dlged/propbrw.cxx|6 -
 chart2/source/controller/drawinglayer/DrawViewWrapper.cxx  |8 -
 chart2/source/controller/main/DrawCommandDispatch.cxx  |2 
 chart2/source/controller/main/ShapeController.cxx  |6 -
 cui/source/tabpages/tpbitmap.cxx   |4 
 cui/source/tabpages/transfrm.cxx   |   22 +--
 include/svx/svdedtv.hxx|   37 +-
 include/svx/svdpntv.hxx|8 -
 reportdesign/source/ui/report/ReportSection.cxx|4 
 reportdesign/source/ui/report/ViewsWindow.cxx  |8 -
 reportdesign/source/ui/report/propbrw.cxx  |6 -
 sc/source/ui/app/drwtrans.cxx  |   10 -
 sc/source/ui/drawfunc/drawsh2.cxx  |4 
 sc/source/ui/drawfunc/drawsh4.cxx  |2 
 sc/source/ui/drawfunc/drtxtob.cxx  |   10 -
 sc/source/ui/drawfunc/drtxtob2.cxx |6 -
 sc/source/ui/drawfunc/fuconuno.cxx |4 
 sc/source/ui/drawfunc/fuins1.cxx   |2 
 sc/source/ui/navipi/content.cxx|2 
 sc/source/ui/unoobj/docuno.cxx |2 
 sc/source/ui/unoobj/viewuno.cxx|6 -
 sc/source/ui/view/drawvie4.cxx |4 
 sc/source/ui/view/drawview.cxx |   26 ++--
 sc/source/ui/view/gridwin4.cxx |2 
 sc/source/ui/view/gridwin5.cxx |2 
 sc/source/ui/view/printfun.cxx |2 
 sc/source/ui/view/tabview5.cxx |4 
 sc/source/ui/view/tabvwsh2.cxx |   20 +--
 sc/source/ui/view/tabvwshb.cxx |   14 +-
 sc/source/ui/view/tabvwshg.cxx |4 
 sc/source/ui/view/viewfun3.cxx |2 
 sc/source/ui/view/viewfun7.cxx |   18 +--
 sd/source/core/drawdoc3.cxx|2 
 sd/source/ui/accessibility/AccessibleOutlineEditSource.cxx |8 -
 sd/source/ui/app/optsitem.cxx  |2 
 sd/source/ui/app/sdxfer.cxx|3 
 sd/source/ui/func/fuolbull.cxx |2 
 sd/source/ui/func/fuprlout.cxx |2 
 sd/source/ui/table/TableDesignPane.cxx |2 
 sd/source/ui/tools/PreviewRenderer.cxx |2 
 sd/source/ui/view/drbezob.cxx  |2 
 sd/source/ui/view/drviews1.cxx |6 -
 sd/source/ui/view/drviews7.cxx |   10 -
 sd/source/ui/view/drviewsg.cxx |4 
 sd/source/ui/view/frmview.cxx  |   12 +-
 sd/source/ui/view/sdview.cxx   |   28 ++---
 sd/source/ui/view/sdview3.cxx  |8 -
 sd/source/ui/view/sdview4.cxx  |2 
 svx/source/dialog/graphctl.cxx |2 
 svx/source/engine3d/view3d.cxx |   12 +-
 svx/source/engine3d/view3d1.cxx|   14 +-
 svx/source/form/fmshell.cxx|2 
 svx/source/form/fmshimp.cxx|5 
 svx/source/form/fmview.cxx |4 
 svx/source/gallery2/galtheme.cxx   |2 
 svx/source/sidebar/possize/PosSizePropertyPanel.cxx|   14 +-
 svx/source/svdraw/sdrpagewindow.cxx|4 
 svx/source/svdraw/svdcrtv.cxx  |   15 +-
 svx/source/svdraw/svddrgmt.cxx |   26 ++--
 svx/source/svdraw/svddrgv.cxx  |4 
 svx/source/svdraw/svdedtv.cxx  |   56 +-
 svx/source/svdraw/svdedtv1.cxx |   48 
 svx/source/svdraw/svdedtv2.cxx |   72 ++---
 svx/source/svdraw/svdedxv.cxx  |   66 +--
 svx/source/svdraw/svdglev.cxx  |   18 +--
 svx/source/svdraw/svdmrkv.cxx  |   12 +-
 svx/source/svdraw/svdpagv.cxx  |2 
 svx/source/svdraw/svdpntv.cxx  |   12 --
 svx/source/svdraw/svdpoev.cxx  |   22 +--
 svx/source/svdraw/svdview.cxx  |   10 -
 svx/source/svdraw/svdxcgv.cxx  |   

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

2023-01-28 Thread Stephan Bergmann (via logerrit)
 basctl/source/accessibility/accessibledialogwindow.cxx |   12 --
 basctl/source/inc/accessibledialogwindow.hxx   |   20 +
 2 files changed, 6 insertions(+), 26 deletions(-)

New commits:
commit c527721a031fdbb16e2978dd6c5c41dd2d70f9d6
Author: Stephan Bergmann 
AuthorDate: Fri Jan 27 13:39:01 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Jan 28 14:04:37 2023 +

Use ImplInheritanceHelper in AccessibleDialogWindow

Change-Id: I3f453f49ff2c2bde6bbedf44bf934c5016d655d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146269
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx 
b/basctl/source/accessibility/accessibledialogwindow.cxx
index 2145f2546ea2..08e40ff76c41 100644
--- a/basctl/source/accessibility/accessibledialogwindow.cxx
+++ b/basctl/source/accessibility/accessibledialogwindow.cxx
@@ -493,18 +493,6 @@ void AccessibleDialogWindow::Notify( SfxBroadcaster&, 
const SfxHint& rHint )
 }
 
 
-// XInterface
-
-
-IMPLEMENT_FORWARD_XINTERFACE2( AccessibleDialogWindow, 
OAccessibleExtendedComponentHelper, AccessibleDialogWindow_BASE )
-
-
-// XTypeProvider
-
-
-IMPLEMENT_FORWARD_XTYPEPROVIDER2( AccessibleDialogWindow, 
OAccessibleExtendedComponentHelper, AccessibleDialogWindow_BASE )
-
-
 // XComponent
 
 
diff --git a/basctl/source/inc/accessibledialogwindow.hxx 
b/basctl/source/inc/accessibledialogwindow.hxx
index dffd8ea8f550..0ef2bf1e5034 100644
--- a/basctl/source/inc/accessibledialogwindow.hxx
+++ b/basctl/source/inc/accessibledialogwindow.hxx
@@ -22,7 +22,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -40,13 +40,11 @@ class DlgEdObj;
 
 
 
-typedef ::cppu::ImplHelper3 <
-css::accessibility::XAccessible,
-css::accessibility::XAccessibleSelection,
-css::lang::XServiceInfo > AccessibleDialogWindow_BASE;
-
-class AccessibleDialogWindow final : public 
comphelper::OAccessibleExtendedComponentHelper,
-public AccessibleDialogWindow_BASE,
+class AccessibleDialogWindow final : public cppu::ImplInheritanceHelper<
+ 
comphelper::OAccessibleExtendedComponentHelper,
+ css::accessibility::XAccessible,
+ 
css::accessibility::XAccessibleSelection,
+ css::lang::XServiceInfo>,
 public SfxListener
 {
 private:
@@ -99,12 +97,6 @@ public:
 // SfxListener
 virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
 
-// XInterface
-DECLARE_XINTERFACE()
-
-// XTypeProvider
-DECLARE_XTYPEPROVIDER()
-
 // XServiceInfo
 virtual OUString SAL_CALL getImplementationName() override;
 virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) 
override;


[Libreoffice-commits] core.git: basctl/source cui/source cui/uiconfig include/svtools officecfg/registry svtools/source

2023-01-24 Thread Rafael Lima (via logerrit)
 basctl/source/basicide/baside2.cxx |2 
 cui/source/options/optcolor.cxx|1 
 cui/uiconfig/ui/colorconfigwin.ui  |   65 -
 include/svtools/colorcfg.hxx   |1 
 officecfg/registry/data/org/openoffice/Office/UI.xcu   |   10 ++
 officecfg/registry/schema/org/openoffice/Office/UI.xcs |   10 ++
 svtools/source/config/colorcfg.cxx |2 
 7 files changed, 74 insertions(+), 17 deletions(-)

New commits:
commit 413bd0a96b010feb10dc3d76efa266ea082de006
Author: Rafael Lima 
AuthorDate: Tue Jan 17 19:47:45 2023 +
Commit: Rafael Lima 
CommitDate: Tue Jan 24 15:37:10 2023 +

tdf#153076 Make Basic editor background color independent from document 
color

This patch creates a separate color configuration entry for the background 
of the Basic Editor (svtools::BASICEDITOR). This allows the user to set the 
color of the Basic Editor independently from the color used as document 
background.

Currently the color used is DOCCOLOR, which means that if the user wants to 
use a different color in the Basic Editor, they must change the document color 
as well. However, the user may want to use f.i. a dark background in the Basic 
editor while maintaining a white color for documents, which is currently not 
possible.

By default, both color schemes "LibreOffice" and "LibreOffice Dark" use the 
same color for DOCCOLOR and BASICEDITOR to replicate the existing behavior. But 
now, if the user wants to use a different color for the Basic Editor, than it's 
possible to change it without affecting the color of documents.

Change-Id: I2f33b1ccb497d7e22faab7fa48cb96841785ce99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145590
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 3c184850d76b..31fee2eeccb4 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1564,7 +1564,7 @@ void ModulWindowLayout::SyntaxColors::NewConfig (bool 
bFirst)
 { TokenType::Keywords,svtools::BASICKEYWORD },
 };
 
-Color aDocColor = aConfig.GetColorValue(svtools::DOCCOLOR).nColor;
+Color aDocColor = aConfig.GetColorValue(svtools::BASICEDITOR).nColor;
 if (bFirst || aDocColor != m_aBackgroundColor)
 {
 m_aBackgroundColor = aDocColor;
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 70345fc5e40f..3c66f4ba49d5 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -140,6 +140,7 @@ const vEntryInfo[] =
 
 { Group_Draw,IDS(drawgrid) },
 
+{ Group_Basic,   IDS(basiceditor) },
 { Group_Basic,   IDS(basicid) },
 { Group_Basic,   IDS(basiccomment) },
 { Group_Basic,   IDS(basicnumber) },
diff --git a/cui/uiconfig/ui/colorconfigwin.ui 
b/cui/uiconfig/ui/colorconfigwin.ui
index 824628763b04..3094a66d0c59 100644
--- a/cui/uiconfig/ui/colorconfigwin.ui
+++ b/cui/uiconfig/ui/colorconfigwin.ui
@@ -1390,7 +1390,7 @@
 0
 none
 
-  
+  
   
 True
 False
@@ -1414,7 +1414,7 @@
   
   
 1
-0
+1
   
 
 
@@ -1429,7 +1429,7 @@
   
   
 0
-0
+1
   
 
 
@@ -1447,7 +1447,7 @@
   
   
 1
-1
+2
   
 
 
@@ -1462,7 +1462,7 @@
   
   
 0
-1
+2
   
 
 
@@ -1480,7 +1480,7 @@
   
   
 1
-2
+3
   
 
 
@@ -1495,7 +1495,7 @@
   
   
 0
-2
+3
   
 
 
@@ -1513,7 +1513,7 @@
   
   
 1
-3
+4
   
 
 
@@ -1528,7 +1528,7 @@
   
   
 0
-3
+4
   
 
 
@@ -1546,7 +1546,7 @@
   
   
 1
-4
+5
   
 
 
@@ -1554,14 +1554,14 @@
 True
 False
 start
-end
+center
 Operator
 True
 basicop_lb
   
   
 0
-4
+5
   
 
   

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

2023-01-16 Thread Andrea Gelmini (via logerrit)
 basctl/source/basicide/baside2b.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0857ba551bdb1a9db450682eba07f59849a7eddb
Author: Andrea Gelmini 
AuthorDate: Mon Jan 16 13:45:07 2023 +0100
Commit: Julien Nabet 
CommitDate: Mon Jan 16 13:34:19 2023 +

Fix typo

Change-Id: I01c9a76fd9abca9611748e4e9f575eeb5a45f0dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145570
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index e5de6abb4306..2601b5f987c1 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -630,7 +630,7 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt )
 if ( rKEvt.GetKeyCode().GetGroup() == KEYGROUP_ALPHA ||
  rKEvt.GetKeyCode().GetGroup() == KEYGROUP_NUM )
 {
-// If the module is read-only, warn that it cannont be edited
+// If the module is read-only, warn that it can't be edited
 if ( rModulWindow.IsReadOnly() )
 rModulWindow.ShowReadOnlyInfoBar();
 }


[Libreoffice-commits] core.git: basctl/source dbaccess/source forms/source include/svx include/toolkit sc/source sd/source starmath/source svx/source sw/source toolkit/source

2023-01-13 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/basicrenderable.cxx |2 +-
 dbaccess/source/ui/browser/brwview.cxx |2 +-
 dbaccess/source/ui/browser/sbagrid.cxx |2 --
 dbaccess/source/ui/inc/sbagrid.hxx |2 --
 dbaccess/source/ui/uno/ColumnControl.cxx   |2 +-
 forms/source/richtext/richtextcontrol.cxx  |2 +-
 forms/source/solar/component/navbarcontrol.cxx |2 +-
 include/svx/fmgridif.hxx   |3 ---
 include/toolkit/awt/vclxdevice.hxx |5 -
 include/toolkit/awt/vclxwindow.hxx |3 ---
 sc/source/ui/unoobj/docuno.cxx |2 +-
 sd/source/ui/unoidl/unomodel.cxx   |2 +-
 sd/source/ui/view/DocumentRenderer.cxx |2 +-
 starmath/source/unomodel.cxx   |2 +-
 svx/source/fmcomp/fmgridif.cxx |8 +++-
 sw/source/core/view/printdata.cxx  |2 +-
 sw/source/uibase/uno/unotxdoc.cxx  |2 +-
 toolkit/source/awt/vclxdevice.cxx  |3 ---
 toolkit/source/awt/vclxgraphics.cxx|2 +-
 toolkit/source/awt/vclxtoolkit.cxx |2 +-
 toolkit/source/awt/vclxwindow.cxx  |4 
 toolkit/source/controls/stdtabcontroller.cxx   |2 +-
 toolkit/source/hatchwindow/hatchwindow.cxx |2 +-
 toolkit/source/helper/unowrapper.cxx   |2 +-
 toolkit/source/helper/vclunohelper.cxx |   10 +-
 25 files changed, 24 insertions(+), 48 deletions(-)

New commits:
commit 172aedbc51e4bd972bef3f94d562e09ee7bc8355
Author: Noel Grandin 
AuthorDate: Thu Jan 12 13:48:24 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 13 12:53:27 2023 +

XUnoTunnel->dynamic_cast in VCLXDevice

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

diff --git a/basctl/source/basicide/basicrenderable.cxx 
b/basctl/source/basicide/basicrenderable.cxx
index 79e381399703..648f234cbdb0 100644
--- a/basctl/source/basicide/basicrenderable.cxx
+++ b/basctl/source/basicide/basicrenderable.cxx
@@ -88,7 +88,7 @@ VclPtr< Printer > Renderable::getPrinter() const
 
 if( aValue >>= xRenderDevice )
 {
-VCLXDevice* pDevice = 
comphelper::getFromUnoTunnel(xRenderDevice);
+VCLXDevice* pDevice = dynamic_cast(xRenderDevice.get());
 VclPtr< OutputDevice > pOut = pDevice ? pDevice->GetOutputDevice() : 
VclPtr< OutputDevice >();
 pPrinter = dynamic_cast(pOut.get());
 }
diff --git a/dbaccess/source/ui/browser/brwview.cxx 
b/dbaccess/source/ui/browser/brwview.cxx
index 9d6d3c95d67d..3bfb7eac9a2d 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -251,7 +251,7 @@ SbaGridControl* UnoDataBrowserView::getVclControl() const
 Reference< css::awt::XWindowPeer >  xPeer = m_xGrid->getPeer();
 if ( xPeer.is() )
 {
-SbaXGridPeer* pPeer = 
comphelper::getFromUnoTunnel(xPeer);
+SbaXGridPeer* pPeer = dynamic_cast(xPeer.get());
 UnoDataBrowserView* pTHIS = 
const_cast(this);
 if ( pPeer )
 {
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx 
b/dbaccess/source/ui/browser/sbagrid.cxx
index c3b52a9cfcc5..9db34b530119 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -462,8 +462,6 @@ Sequence< Type > SAL_CALL SbaXGridPeer::getTypes()
 Sequence { cppu::UnoType::get() });
 }
 
-UNO3_GETIMPLEMENTATION2_IMPL(SbaXGridPeer, FmXGridPeer);
-
 VclPtr SbaXGridPeer::imp_CreateControl(vcl::Window* pParent, 
WinBits nStyle)
 {
 return VclPtr::Create( m_xContext, pParent, this, nStyle);
diff --git a/dbaccess/source/ui/inc/sbagrid.hxx 
b/dbaccess/source/ui/inc/sbagrid.hxx
index 0d22f6dceec1..5dbffa6717a2 100644
--- a/dbaccess/source/ui/inc/sbagrid.hxx
+++ b/dbaccess/source/ui/inc/sbagrid.hxx
@@ -107,8 +107,6 @@ namespace dbaui
 
 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() 
override;
 
-UNO3_GETIMPLEMENTATION_DECL(SbaXGridPeer)
-
 // css::frame::XDispatch
 virtual void SAL_CALL dispatch(const css::util::URL& aURL, const 
css::uno::Sequence< css::beans::PropertyValue >& aArgs) override;
 virtual void SAL_CALL addStatusListener(const css::uno::Reference< 
css::frame::XStatusListener > & xControl, const css::util::URL& aURL) override;
diff --git a/dbaccess/source/ui/uno/ColumnControl.cxx 
b/dbaccess/source/ui/uno/ColumnControl.cxx
index 9295b9954333..e7cde998d323 100644
--- a/dbaccess/source/ui/uno/ColumnControl.cxx
+++ b/dbaccess/source/ui/uno/ColumnControl.cxx
@@ -77,7 +77,7 @@ void SAL_CALL OColumnControl::createPeer(const Reference< 
XToolkit >& /*rToolkit
 vcl::Window* pParentWin = nullptr;
 if (rParentPeer.is())
 {
-VCLXWindow* pParent = 

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

2023-01-09 Thread Rafael Lima (via logerrit)
 basctl/source/dlged/dlged.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9c6aa7f2918819af670c6d6ed25645c725c91667
Author: Rafael Lima 
AuthorDate: Tue Dec 20 13:37:53 2022 +
Commit: Rafael Lima 
CommitDate: Mon Jan 9 11:53:59 2023 +

tdf#152531 Fix background color of Dialog Editor in dark mode

Change-Id: I7006ff472dae5ce8d4b52c108f742c3c6d9b0b61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144603
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 306555489df5..77ed2e8042db 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -550,8 +550,9 @@ void DlgEditor::Paint(vcl::RenderContext& rRenderContext, 
const tools::Rectangle
 // #i79128# ...and use correct OutDev for that
 if (pTargetPaintWindow)
 {
+Color maBackColor = 
rRenderContext.GetSettings().GetStyleSettings().GetLightColor();
 OutputDevice& rTargetOutDev = 
pTargetPaintWindow->GetTargetOutputDevice();
-rTargetOutDev.DrawWallpaper(aPaintRect, Wallpaper(COL_WHITE));
+rTargetOutDev.DrawWallpaper(aPaintRect, Wallpaper(maBackColor));
 }
 
 // do paint (unbuffered) and mark repaint end


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

2022-12-21 Thread Rafael Lima (via logerrit)
 basctl/source/basicide/baside3.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 3c70cfc93bf196503a59188ac0d7b93f8c1fe4af
Author: Rafael Lima 
AuthorDate: Sat Dec 17 12:05:42 2022 +
Commit: Rafael Lima 
CommitDate: Wed Dec 21 19:20:12 2022 +

tdf#152617 Fix color of controls in the Dialog Editor

While editing dialogs in the Basic IDE the background of controls as 
labels, radio buttons and checkboxes is wrong. They're black in dark themes and 
white in light themes.

The correct color should be FaceColor to make it have the same backround as 
the window.

Change-Id: If436b0034dd7a665fc779e0df793703562adb5a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144363
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index 2b3bbe3d8733..33528679b2fd 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -1234,7 +1234,7 @@ void DialogWindow::InitSettings()
 SetTextColor( rStyleSettings.GetFieldTextColor() );
 SetTextFillColor();
 
-SetBackground( rStyleSettings.GetFieldColor() );
+SetBackground(rStyleSettings.GetFaceColor());
 }
 
 css::uno::Reference< css::accessibility::XAccessible > 
DialogWindow::CreateAccessible()
@@ -1246,6 +1246,7 @@ OString DialogWindow::GetHid () const
 {
 return HID_BASICIDE_DIALOGWINDOW;
 }
+
 ItemType DialogWindow::GetType () const
 {
 return TYPE_DIALOG;


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

2022-12-12 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/basides1.cxx |4 -
 basctl/source/basicide/basobj2.cxx  |9 ++--
 basctl/source/basicide/macrodlg.cxx |2 
 basctl/source/basicide/moduldlg.cxx |   21 -
 basctl/source/basicide/moduldlg.hxx |6 ++
 basctl/source/inc/basobj.hxx|3 -
 include/sfx2/app.hxx|5 +-
 include/sfx2/strings.hrc|5 +-
 include/sfx2/viewfrm.hxx|3 +
 sfx2/sdi/sfx.sdi|2 
 sfx2/source/appl/app.cxx|   10 ++--
 sfx2/source/appl/appserv.cxx|   17 +--
 sfx2/source/view/viewfrm.cxx|   81 +++-
 13 files changed, 143 insertions(+), 25 deletions(-)

New commits:
commit 6691816fe86ef7d193fee3632c2d56debfff3fa9
Author: Caolán McNamara 
AuthorDate: Fri Dec 9 17:12:47 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 12 16:00:04 2022 +

tdf#152266 add an infobar with indicators for macro-like content in doc

Show "macros" and "events" for now if we know that are present so
they can be investigated by the user. There are other things which
could potentially be added in the future.

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

diff --git a/basctl/source/basicide/basides1.cxx 
b/basctl/source/basicide/basides1.cxx
index fd0fb7acccff..430b795e162d 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -340,10 +340,10 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
 if ( rReq.GetArgs() )
 {
 const SfxUInt16Item  = 
rReq.GetArgs()->Get(SID_BASICIDE_ARG_TABID );
-Organize(rReq.GetFrameWeld(), rTabId.GetValue());
+Organize(rReq.GetFrameWeld(), nullptr, rTabId.GetValue());
 }
 else
-Organize(rReq.GetFrameWeld(), 0);
+Organize(rReq.GetFrameWeld(), nullptr, 0);
 }
 break;
 case SID_BASICIDE_CHOOSEMACRO:
diff --git a/basctl/source/basicide/basobj2.cxx 
b/basctl/source/basicide/basobj2.cxx
index d145d14fb634..708b1ce035d2 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -62,18 +62,19 @@ extern "C" {
 
 return pScriptURL;
 }
-SAL_DLLPUBLIC_EXPORT void basicide_macro_organizer(void *pParent, 
sal_Int16 nTabId)
+SAL_DLLPUBLIC_EXPORT void basicide_macro_organizer(void *pParent, void* 
pDocFrame_AsXFrame, sal_Int16 nTabId)
 {
 SAL_INFO("basctl.basicide","in basicide_macro_organizer");
-basctl::Organize(static_cast(pParent), nTabId);
+Reference< frame::XFrame > aDocFrame( static_cast< frame::XFrame* >( 
pDocFrame_AsXFrame ) );
+basctl::Organize(static_cast(pParent), aDocFrame, 
nTabId);
 }
 }
 
-void Organize(weld::Window* pParent, sal_Int16 tabId)
+void Organize(weld::Window* pParent, const 
css::uno::Reference& xDocFrame, sal_Int16 tabId)
 {
 EnsureIde();
 
-auto xDlg(std::make_shared(pParent, tabId));
+auto xDlg(std::make_shared(pParent, xDocFrame, tabId));
 weld::DialogController::runAsync(xDlg, [](int) {});
 }
 
diff --git a/basctl/source/basicide/macrodlg.cxx 
b/basctl/source/basicide/macrodlg.cxx
index db424becb2e9..b1097b9ad8c8 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -742,7 +742,7 @@ IMPL_LINK(MacroChooser, ButtonHdl, weld::Button&, rButton, 
void)
 StoreMacroDescription();
 
 m_xBasicBox->get_selected(m_xBasicBoxIter.get());
-auto xDlg(std::make_shared(m_xDialog.get(), 0));
+auto xDlg(std::make_shared(m_xDialog.get(), nullptr, 
0));
 weld::DialogController::runAsync(xDlg, [this](sal_Int32 nRet) {
 if (nRet == RET_OK) // not only closed
 {
diff --git a/basctl/source/basicide/moduldlg.cxx 
b/basctl/source/basicide/moduldlg.cxx
index 25250526d285..617d80e7f033 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -182,8 +183,24 @@ void Shell::CopyDialogResources(
 io_xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, 
rDestDoc.isDocument() ? rDestDoc.getDocument() : Reference< frame::XModel >() );
 }
 
+void OrganizeDialog::SetCurrentEntry(const 
css::uno::Reference& xDocFrame)
+{
+if (!xDocFrame)
+return;
+Reference xController(xDocFrame->getController());
+if (!xController)
+return;
+Reference xModel(xController->getModel());
+if (!xModel)
+return;
+ScriptDocument aScriptDocument(xModel);
+EntryDescriptor aDesc(aScriptDocument, LIBRARY_LOCATION_DOCUMENT, 
OUString(), OUString(), OUString(), OBJ_TYPE_DOCUMENT);
+m_xModulePage->SetCurrentEntry(aDesc);
+

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

2022-12-10 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/macrodlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c86f1315ea3203e8557843d02c222969524a9ca7
Author: Caolán McNamara 
AuthorDate: Fri Dec 9 21:02:44 2022 +
Commit: Caolán McNamara 
CommitDate: Sat Dec 10 10:06:03 2022 +

be a little more explicit that we want the Accel config here

its all handled the same way at the moment, but this is page we want
here

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

diff --git a/basctl/source/basicide/macrodlg.cxx 
b/basctl/source/basicide/macrodlg.cxx
index 1c8fe9aec84d..db424becb2e9 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -718,7 +718,7 @@ IMPL_LINK(MacroChooser, ButtonHdl, weld::Button&, rButton, 
void)
 if (m_xDocumentFrame.is())
 aInternalSet.Put(SfxUnoFrameItem(SID_FILLFRAME, m_xDocumentFrame));
 
-SfxRequest aRequest(SID_CONFIG, SfxCallMode::SYNCHRON, Args, 
aInternalSet);
+SfxRequest aRequest(SID_CONFIGACCEL, SfxCallMode::SYNCHRON, Args, 
aInternalSet);
 aRequest.AppendItem( aItem );
 SfxGetpApp()->ExecuteSlot( aRequest );
 }


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

2022-12-08 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside2.hxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 44db6349aa9f6155c1b0a7c6d3c1041b85f4c746
Author: Noel Grandin 
AuthorDate: Thu Dec 8 11:29:00 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Dec 8 09:52:20 2022 +

fix build

mid-air collision between
commit 7243f7c706ceb49d6b3e4dfb8ff72ab43c65dd86
Author: Noel Grandin 
Date:   Wed Dec 7 14:08:45 2022 +0200
loplugin:unusedmethods
and
commit be6024a2d4fc11c908aeb29b58ce33f851dab6bc
Author: Rafael Lima 
Date:   Mon Dec 5 11:33:32 2022 +
tdf#152078 Enable Ctrl+Wheel zoom in Basic code editor

Change-Id: I155fc7fc5977f7346a44e93237f9b09f6fa86464
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143808
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index 19cfeed2b110..9a8700aecf3a 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -156,6 +156,7 @@ public:
 voidUpdateSyntaxHighlighting ();
 
 voidSetEditorZoomLevel(sal_uInt16 nNewZoomLevel);
+sal_uInt16  GetCurrentZoom() { return nCurrentZoomLevel; }
 
 boolGetProcedureName(std::u16string_view rLine, OUString& 
rProcType, OUString& rProcName) const;
 


[Libreoffice-commits] core.git: basctl/source compilerplugins/clang sdext/Library_PresentationMinimizer.mk sdext/source vcl/inc vcl/unx

2022-12-07 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside2.hxx |1 
 compilerplugins/clang/unusedmethods.results|  434 ++---
 compilerplugins/clang/unusedmethods.unused-returns.results |   34 -
 sdext/Library_PresentationMinimizer.mk |1 
 sdext/source/minimizer/impoptimizer.cxx|5 
 sdext/source/minimizer/informationdialog.cxx   |1 
 sdext/source/minimizer/informationdialog.hxx   |1 
 sdext/source/minimizer/optimizerdialog.hxx |1 
 sdext/source/minimizer/unodialog.cxx   |  309 -
 sdext/source/minimizer/unodialog.hxx   |  118 ---
 vcl/inc/unx/fontmanager.hxx|   14 
 vcl/inc/unx/freetype_glyphcache.hxx|2 
 vcl/unx/generic/glyphs/freetype_glyphcache.cxx |   43 -
 13 files changed, 245 insertions(+), 719 deletions(-)

New commits:
commit 7243f7c706ceb49d6b3e4dfb8ff72ab43c65dd86
Author: Noel Grandin 
AuthorDate: Wed Dec 7 14:08:45 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Dec 7 17:17:33 2022 +

loplugin:unusedmethods

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

diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index 9a8700aecf3a..19cfeed2b110 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -156,7 +156,6 @@ public:
 voidUpdateSyntaxHighlighting ();
 
 voidSetEditorZoomLevel(sal_uInt16 nNewZoomLevel);
-sal_uInt16  GetCurrentZoom() { return nCurrentZoomLevel; }
 
 boolGetProcedureName(std::u16string_view rLine, OUString& 
rProcType, OUString& rProcName) const;
 
diff --git a/compilerplugins/clang/unusedmethods.results 
b/compilerplugins/clang/unusedmethods.results
index c0390652a5e2..1c4f2a4119dd 100644
--- a/compilerplugins/clang/unusedmethods.results
+++ b/compilerplugins/clang/unusedmethods.results
@@ -1,3 +1,5 @@
+basctl/source/basicide/baside2.hxx:159
+unsigned short basctl::EditorWindow::GetCurrentZoom()
 basegfx/source/range/b2drangeclipper.cxx:686
 type-parameter-?-? basegfx::(anonymous 
namespace)::eraseFromList(type-parameter-?-? &,const type-parameter-?-? &)
 basic/source/inc/buffer.hxx:40
@@ -126,16 +128,18 @@ dbaccess/source/ui/inc/FieldControls.hxx:68
 rtl::OUString dbaui::OPropNumericEditCtrl::get_text() const
 dbaccess/source/ui/inc/FieldControls.hxx:73
 void dbaui::OPropNumericEditCtrl::set_min(int)
-dbaccess/source/ui/inc/indexcollection.hxx:52
+dbaccess/source/ui/inc/indexcollection.hxx:51
 __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator >, 
std::vector, struct std::random_access_iterator_tag> 
dbaui::OIndexCollection::begin() const
-dbaccess/source/ui/inc/indexcollection.hxx:56
+dbaccess/source/ui/inc/indexcollection.hxx:55
 __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator >, 
std::vector, struct std::random_access_iterator_tag> 
dbaui::OIndexCollection::end() const
-dbaccess/source/ui/inc/indexcollection.hxx:61
+dbaccess/source/ui/inc/indexcollection.hxx:60
 __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator >, 
std::vector, struct std::random_access_iterator_tag> 
dbaui::OIndexCollection::find(const rtl::OUString &) const
-dbaccess/source/ui/inc/indexcollection.hxx:63
+dbaccess/source/ui/inc/indexcollection.hxx:62
 __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator >, 
std::vector, struct std::random_access_iterator_tag> 
dbaui::OIndexCollection::findOriginal(const rtl::OUString &) const
 dbaccess/source/ui/inc/unodatbr.hxx:316
 _Bool dbaui::SbaTableQueryBrowser::implCopyObject(ODataClipboard &,const 
weld::TreeIter &,int)
+desktop/inc/lib/init.hxx:142
+ desktop::CallbackFlushHandler::CallbackData::CallbackData(const 
tools::Rectangle *,int)
 desktop/source/lib/lokclipboard.hxx:95
  LOKClipboardFactory::LOKClipboardFactory()
 drawinglayer/inc/texture/texture.hxx:39
@@ -158,9 +162,9 @@ drawinglayer/source/tools/emfpstringformat.hxx:99
 _Bool emfplushelper::EMFPStringFormat::NoClip() const
 drawinglayer/source/tools/emfpstringformat.hxx:100
 _Bool emfplushelper::EMFPStringFormat::BypassGDI() const
-editeng/inc/editdoc.hxx:525
+editeng/inc/editdoc.hxx:547
 _Bool EditLine::IsInvalid() const
-editeng/inc/editdoc.hxx:526
+editeng/inc/editdoc.hxx:548
 _Bool EditLine::IsValid() const
 editeng/inc/edtspell.hxx:103
 __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator 
>, std::vector, struct 
std::random_access_iterator_tag> WrongList::begin() const
@@ -396,10 +400,8 @@ include/basic/codecompletecache.hxx:82
 std::basic_ostream & operator<<(std::basic_ostream &,const 
CodeCompleteDataCache &)
 include/basic/sbxvar.hxx:138
 struct SbxValues * SbxValue::data()

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

2022-12-05 Thread Rafael Lima (via logerrit)
 basctl/source/basicide/baside2.cxx  |3 -
 basctl/source/basicide/baside2.hxx  |3 +
 basctl/source/basicide/baside2b.cxx |   76 ++--
 basctl/source/basicide/baside3.cxx  |2 
 basctl/source/basicide/basides1.cxx |   17 ++--
 basctl/source/basicide/basidesh.cxx |   10 
 basctl/source/basicide/bastypes.cxx |   30 ++
 basctl/source/inc/basidesh.hxx  |1 
 basctl/source/inc/bastypes.hxx  |5 +-
 9 files changed, 90 insertions(+), 57 deletions(-)

New commits:
commit affd2a9511fc0af7cad7e9679c17607540065d7e
Author: Rafael Lima 
AuthorDate: Sat Dec 3 18:13:54 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Dec 5 09:28:06 2022 +

tdf#86568 Move the scrollbar to the EditWindow in Basic IDE

Currently, the Basic IDE has a shared horizontal scrollbar used both for 
the code editor window and the dialog editor window.

However, the problem is that this causes the horizontal scrollbar to be 
placed at an unintuitive place when the code editor is being used. To avoid 
this problem the code editor already has its own vertical scrollbar.

This patch creates a separate horizontal scrollbar for the code editor 
window and places it underneath the editor window to make it clearer what this 
scrollbar is meant to scroll.

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

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 1eb4b9027b7b..9452ef2162e5 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -255,9 +255,6 @@ void ModulWindow::GetFocus()
 
 void ModulWindow::DoInit()
 {
-if (GetVScrollBar())
-GetVScrollBar()->Hide();
-GetHScrollBar()->Show();
 GetEditorWindow().InitScrollBars();
 }
 
diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index 969f823b91a1..9a8700aecf3a 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -259,6 +259,7 @@ private:
 VclPtr aLineNumberWindow;
 VclPtr aEdtWindow;
 VclPtraEWVScrollBar;
+VclPtraEWHScrollBar;
 
 virtual void DataChanged(DataChangedEvent const & rDCEvt) override;
 
@@ -273,6 +274,7 @@ public:
 LineNumberWindow&   GetLineNumberWindow() { return *aLineNumberWindow; }
 EditorWindow&   GetEdtWindow()  { return *aEdtWindow; }
 ScrollAdaptor&  GetEWVScrollBar()   { return *aEWVScrollBar; }
+ScrollAdaptor&  GetEWHScrollBar()   { return *aEWHScrollBar; }
 
 void SetLineNumberDisplay(bool b);
 };
@@ -366,6 +368,7 @@ public:
 BreakPointWindow&   GetBreakPointWindow()   { return 
m_aXEditorWindow->GetBrkWindow(); }
 LineNumberWindow&   GetLineNumberWindow()   { return 
m_aXEditorWindow->GetLineNumberWindow(); }
 ScrollAdaptor&  GetEditVScrollBar() { return 
m_aXEditorWindow->GetEWVScrollBar(); }
+ScrollAdaptor&  GetEditHScrollBar() { return 
m_aXEditorWindow->GetEWHScrollBar(); }
 ExtTextEngine*  GetEditEngine() { return 
GetEditorWindow().GetEditEngine(); }
 TextView*   GetEditView()   { return 
GetEditorWindow().GetEditView(); }
 BreakPointList& GetBreakPoints(){ return 
GetBreakPointWindow().GetBreakPoints(); }
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 89edcec40f32..e0dfe9f38ee5 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -499,7 +499,7 @@ void EditorWindow::Command( const CommandEvent& rCEvt )
  ( rCEvt.GetCommand() == CommandEventId::StartAutoScroll ) ||
  ( rCEvt.GetCommand() == CommandEventId::AutoScroll ) )
 {
-HandleScrollCommand( rCEvt, rModulWindow.GetHScrollBar(), 
() );
+HandleScrollCommand( rCEvt, (), 
() );
 } else if ( rCEvt.GetCommand() == CommandEventId::ContextMenu ) {
 SfxDispatcher* pDispatcher = GetDispatcher();
 if ( pDispatcher )
@@ -1082,9 +1082,8 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint )
 TextHint const& rTextHint = *pTextHint;
 if( rTextHint.GetId() == SfxHintId::TextViewScrolled )
 {
-if ( rModulWindow.GetHScrollBar() )
-rModulWindow.GetHScrollBar()->SetThumbPos( 
pEditView->GetStartDocPos().X() );
 rModulWindow.GetEditVScrollBar().SetThumbPos( 
pEditView->GetStartDocPos().Y() );
+rModulWindow.GetEditHScrollBar().SetThumbPos( 
pEditView->GetStartDocPos().X() );
 rModulWindow.GetBreakPointWindow().DoScroll
 ( rModulWindow.GetBreakPointWindow().GetCurYOffset() - 
pEditView->GetStartDocPos().Y() );
 rModulWindow.GetLineNumberWindow().DoScroll
@@ -1106,15 +1105,13 @@ void EditorWindow::Notify( 

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

2022-11-21 Thread Julien Nabet (via logerrit)
 basctl/source/basicide/ObjectCatalog.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit aa29d9f8b141cbb513769dd8b14435f9164a5654
Author: Julien Nabet 
AuthorDate: Mon Nov 21 22:43:04 2022 +0100
Commit: Noel Grandin 
CommitDate: Tue Nov 22 05:41:36 2022 +0100

tdf#152154: Crash when Object Catalog undocked and BASIC IDE closed

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

diff --git a/basctl/source/basicide/ObjectCatalog.cxx 
b/basctl/source/basicide/ObjectCatalog.cxx
index 89b3f4e2b824..13069ed46621 100644
--- a/basctl/source/basicide/ObjectCatalog.cxx
+++ b/basctl/source/basicide/ObjectCatalog.cxx
@@ -67,7 +67,9 @@ void ObjectCatalog::ToggleFloatingMode()
 DockingWindow::ToggleFloatingMode();
 
 bool const bFloating = IsFloatingMode();
-m_xTitle->set_visible(!bFloating);
+// tdf#152154: m_xTitle will be null during disposing
+if (m_xTitle)
+m_xTitle->set_visible(!bFloating);
 }
 
 void ObjectCatalog::SetCurrentEntry(BaseWindow* pCurWin)


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

2022-10-16 Thread PoonamShokeen (via logerrit)
 basctl/source/basicide/baside2b.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 42d7cd1abca095d5166a7f4355f1cfc0f822961b
Author: PoonamShokeen 
AuthorDate: Fri Oct 7 12:12:41 2022 -0500
Commit: Ilmari Lauhakangas 
CommitDate: Sun Oct 16 09:19:41 2022 +0200

tdf#114441 Convert use of sal_uLong to sal_uInt32

Change-Id: I1443d1548fc191b057ce073e77f5f4f244086675
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141264
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 249a636fdee7..2f768ed3077c 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -234,7 +234,7 @@ public:
 }
 
 private:
-sal_uLong nCurState;
+sal_uInt32 nCurState;
 };
 
 EditorWindow::EditorWindow (vcl::Window* pParent, ModulWindow* pModulWindow) :


[Libreoffice-commits] core.git: basctl/source bin/find-can-be-private-symbols.functions.results dbaccess/source extensions/source forms/source include/vcl reportdesign/source sc/source sd/source sfx2/

2022-09-19 Thread Samuel Mehrbrodt (via logerrit)
 basctl/source/basicide/bastypes.cxx  |2 
 bin/find-can-be-private-symbols.functions.results|2 
 dbaccess/source/ui/app/AppView.cxx   |2 
 dbaccess/source/ui/browser/brwview.cxx   |2 
 dbaccess/source/ui/browser/dataview.cxx  |8 -
 dbaccess/source/ui/control/RelationControl.cxx   |4 
 dbaccess/source/ui/control/TableGrantCtrl.cxx|4 
 dbaccess/source/ui/querydesign/JoinTableView.cxx |6 
 dbaccess/source/ui/querydesign/QueryDesignView.cxx   |2 
 dbaccess/source/ui/querydesign/TableWindow.cxx   |4 
 dbaccess/source/ui/querydesign/querycontainerwindow.cxx  |2 
 dbaccess/source/ui/relationdesign/RelationDesignView.cxx |2 
 dbaccess/source/ui/tabledesign/TEditControl.cxx  |2 
 dbaccess/source/ui/tabledesign/TableDesignView.cxx   |2 
 extensions/source/bibliography/bibcont.cxx   |2 
 extensions/source/bibliography/toolbar.cxx   |4 
 forms/source/richtext/richtextvclcontrol.cxx |4 
 include/vcl/event.hxx|   14 -
 reportdesign/source/ui/report/DesignView.cxx |2 
 sc/source/ui/view/gridwin.cxx|8 -
 sd/source/ui/view/viewshel.cxx   |2 
 sfx2/source/appl/newhelp.cxx |   10 -
 sfx2/source/dialog/backingwindow.cxx |2 
 sfx2/source/dialog/dockwin.cxx   |6 
 sfx2/source/dialog/partwnd.cxx   |2 
 sfx2/source/notebookbar/NotebookbarTabControl.cxx|2 
 sfx2/source/sidebar/SidebarDockingWindow.cxx |8 -
 sfx2/source/sidebar/SidebarToolBox.cxx   |2 
 sfx2/source/sidebar/TabBar.cxx   |6 
 sfx2/source/view/frame2.cxx  |   12 -
 sfx2/source/view/userinputinterception.cxx   |   14 -
 svtools/source/brwbox/editbrowsebox.cxx  |6 
 svtools/source/control/tabbar.cxx|2 
 svx/source/fmcomp/gridctrl.cxx   |2 
 svx/source/tbxctrls/colrctrl.cxx |2 
 toolkit/source/controls/table/tabledatawindow.cxx|2 
 toolkit/source/hatchwindow/ipwin.cxx |4 
 vcl/inc/window.h |6 
 vcl/osx/salinst.cxx  |2 
 vcl/source/app/svapp.cxx |6 
 vcl/source/control/InterimItemWindow.cxx |4 
 vcl/source/control/button.cxx|6 
 vcl/source/control/combobox.cxx  |8 -
 vcl/source/control/ctrl.cxx  |4 
 vcl/source/control/field.cxx |   30 ++--
 vcl/source/control/field2.cxx|   36 ++---
 vcl/source/control/fmtfield.cxx  |8 -
 vcl/source/control/imp_listbox.cxx   |6 
 vcl/source/control/listbox.cxx   |6 
 vcl/source/control/longcurr.cxx  |4 
 vcl/source/control/notebookbar.cxx   |2 
 vcl/source/control/roadmap.cxx   |2 
 vcl/source/control/scrbar.cxx|2 
 vcl/source/control/spinbtn.cxx   |2 
 vcl/source/control/spinfld.cxx   |6 
 vcl/source/control/tabctrl.cxx   |4 
 vcl/source/control/wizardmachine.cxx |2 
 vcl/source/edit/vclmedit.cxx |4 
 vcl/source/window/dialog.cxx |4 
 vcl/source/window/dlgctrl.cxx|8 -
 vcl/source/window/dockwin.cxx|4 
 vcl/source/window/event.cxx  |   34 ++--
 vcl/source/window/floatwin.cxx   |2 
 vcl/source/window/layout.cxx |2 
 vcl/source/window/mouse.cxx  |   12 -
 vcl/source/window/scrwnd.cxx |2 
 vcl/source/window/splitwin.cxx   |2 
 vcl/source/window/syswin.cxx |6 
 vcl/source/window/toolbox.cxx|6 
 vcl/source/window/window.cxx |   10 -
 vcl/source/window/winproc.cxx|  108 +++
 vcl/win/window/salframe.cxx  |2 
 72 files changed, 257 insertions(+), 257 deletions(-)

New commits:
commit 467085bfb0f595a094389c2de159589372d36d1e
Author: Samuel Mehrbrodt 
AuthorDate: Thu Sep 15 10:19:45 2022 +0200
Commit: 

[Libreoffice-commits] core.git: basctl/source include/sfx2 sc/source sd/source sfx2/source svx/source sw/inc sw/source

2022-09-02 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/basides2.cxx |2 +-
 basctl/source/inc/basidesh.hxx  |2 +-
 include/sfx2/viewsh.hxx |3 ++-
 sc/source/ui/inc/tabvwsh.hxx|2 +-
 sc/source/ui/view/tabvwshe.cxx  |4 ++--
 sd/source/ui/inc/ViewShellBase.hxx  |2 +-
 sd/source/ui/view/ViewShellBase.cxx |2 +-
 sfx2/source/view/viewsh.cxx |3 ++-
 svx/source/dialog/fntctrl.cxx   |2 +-
 sw/inc/view.hxx |2 +-
 sw/source/uibase/uiview/view.cxx|2 +-
 11 files changed, 14 insertions(+), 12 deletions(-)

New commits:
commit b24eceb5178fda17fcc4b20c5286e8d27c5ae474
Author: Noel Grandin 
AuthorDate: Thu Sep 1 16:29:15 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 2 10:58:04 2022 +0200

tdf#150712 limit the dialog to only a sample of the data

instead of the entire area, which makes the dialog pretty much
instantaneous

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

diff --git a/basctl/source/basicide/basides2.cxx 
b/basctl/source/basicide/basides2.cxx
index fedebcb1d98b..ca219f4c9059 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -56,7 +56,7 @@ bool Shell::HasSelection( bool /* bText */ ) const
 return false;
 }
 
-OUString Shell::GetSelectionText( bool bWholeWord )
+OUString Shell::GetSelectionText( bool bWholeWord, bool /*bOnlyASample*/ )
 {
 OUString aText;
 if (ModulWindow* pMCurWin = dynamic_cast(pCurWin.get()))
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index ef1378580c10..3df158ed01e5 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -168,7 +168,7 @@ public:
 // virtual sal_uInt16   Print( SfxProgress , sal_Bool 
bIsAPI, PrintDialog *pPrintDialog = 0 );
 virtual SfxPrinter* GetPrinter( bool bCreate = false ) override;
 virtual sal_uInt16  SetPrinter( SfxPrinter *pNewPrinter, 
SfxPrinterChangeFlags nDiffFlags = SFX_PRINTER_ALL ) override;
-virtual OUStringGetSelectionText( bool bCompleteWords = false ) 
override;
+virtual OUStringGetSelectionText( bool bCompleteWords = false, 
bool bOnlyASample = false ) override;
 virtual boolHasSelection( bool bText = true ) const override;
 
 voidGetState( SfxItemSet& );
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 28b4c190cdc8..523534f5d1e1 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -226,9 +226,10 @@ public:
  * Initialize is called after the frame has been loaded and the controller
  * has been set.  By the time this is called the document has been fully
  * imported.
+ * @param bOnlyASample used by some dialogs to avoid constructing monster 
strings e.g. in calc
  */
 virtual boolPrepareClose( bool bUI = true );
-virtual OUStringGetSelectionText( bool bCompleteWords = false 
);
+virtual OUStringGetSelectionText( bool bCompleteWords = false, 
bool bOnlyASample = false );
 virtual boolHasSelection( bool bText = true ) const;
 virtual SdrView*GetDrawView() const;
 
diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 91acb19d39a3..d1a7e5ef89d6 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -201,7 +201,7 @@ protected:
 
 virtual voidQueryObjAreaPixel( tools::Rectangle& rRect ) const 
override;
 
-virtual OUString GetSelectionText( bool bWholeWord = false ) override;
+virtual OUString GetSelectionText( bool bWholeWord = false, bool 
bOnlyASample = false ) override;
 virtual bool HasSelection( bool bText = true ) const override;
 
 virtual voidWriteUserData(OUString &, bool bBrowse = false) override;
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index d32500b74800..7089c17aa7a2 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -39,7 +39,7 @@
 #include 
 #include 
 
-OUString ScTabViewShell::GetSelectionText( bool bWholeWord )
+OUString ScTabViewShell::GetSelectionText( bool bWholeWord, bool bOnlyASample )
 {
 OUString aStrSelection;
 
@@ -54,7 +54,7 @@ OUString ScTabViewShell::GetSelectionText( bool bWholeWord )
 if ( GetViewData().GetSimpleArea( aRange ) == SC_MARK_SIMPLE )
 {
 ScDocument& rDoc = GetViewData().GetDocument();
-if ( bInFormatDialog && aRange.aStart.Row() != aRange.aEnd.Row() )
+if ( (bOnlyASample || bInFormatDialog) && aRange.aStart.Row() != 
aRange.aEnd.Row() )
 {
 // limit range to one data row
 // (only when  the call comes from a format dialog)
diff --git a/sd/source/ui/inc/ViewShellBase.hxx 

[Libreoffice-commits] core.git: basctl/source chart2/source compilerplugins/clang cui/source filter/source framework/source include/filter include/svx include/unotools reportdesign/inc reportdesign/so

2022-08-29 Thread Noel Grandin (via logerrit)
 basctl/source/dlged/dlged.cxx |   30 
 basctl/source/dlged/dlgedfac.cxx  |   20 
 basctl/source/dlged/dlgedobj.cxx  |   10 
 basctl/source/inc/dlged.hxx   |2 
 basctl/source/inc/dlgedfac.hxx|2 
 basctl/source/inc/dlgedobj.hxx|8 
 chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx  |1 
 chart2/source/controller/drawinglayer/ViewElementListProvider.cxx |   10 
 chart2/source/controller/main/ChartController_Tools.cxx   |6 
 chart2/source/controller/main/DrawCommandDispatch.cxx |   18 
 chart2/source/controller/main/DrawCommandDispatch.hxx |3 
 chart2/source/view/main/ChartView.cxx |3 
 chart2/source/view/main/ShapeFactory.cxx  |4 
 compilerplugins/clang/refcounting.cxx |   13 
 compilerplugins/clang/test/refcounting.cxx|   17 
 compilerplugins/clang/weakobject.cxx  |1 
 cui/source/tabpages/tpline.cxx|   32 
 cui/source/tabpages/tplneend.cxx  |6 
 filter/source/msfilter/escherex.cxx   |4 
 filter/source/msfilter/msdffimp.cxx   |  119 +-
 filter/source/msfilter/svdfppt.cxx|  101 +-
 filter/source/svg/svgexport.cxx   |4 
 filter/source/svg/svgfilter.cxx   |8 
 framework/source/fwe/helper/undomanagerhelper.cxx |2 
 include/filter/msfilter/msdffimp.hxx  |   19 
 include/filter/msfilter/svdfppt.hxx   |   14 
 include/svx/EnhancedCustomShape2d.hxx |8 
 include/svx/compressgraphicdialog.hxx |2 
 include/svx/connctrl.hxx  |2 
 include/svx/cube3d.hxx|4 
 include/svx/dlgctl3d.hxx  |   10 
 include/svx/dlgctrl.hxx   |   12 
 include/svx/extedit.hxx   |6 
 include/svx/fmdpage.hxx   |2 
 include/svx/fmobjfac.hxx  |4 
 include/svx/fmpage.hxx|2 
 include/svx/fmview.hxx|   10 
 include/svx/fontworkgallery.hxx   |4 
 include/svx/lathe3d.hxx   |6 
 include/svx/measctrl.hxx  |2 
 include/svx/obj3d.hxx |6 
 include/svx/objfac3d.hxx  |4 
 include/svx/scene3d.hxx   |   10 
 include/svx/sdr/table/tablecontroller.hxx |8 
 include/svx/selectioncontroller.hxx   |3 
 include/svx/sphere3d.hxx  |4 
 include/svx/svdcrtv.hxx   |4 
 include/svx/svddrgmt.hxx  |4 
 include/svx/svdedtv.hxx   |2 
 include/svx/svdedxv.hxx   |5 
 include/svx/svdetc.hxx|4 
 include/svx/svdmodel.hxx  |7 
 include/svx/svdoashp.hxx  |   10 
 include/svx/svdobj.hxx|   59 -
 include/svx/svdocapt.hxx  |4 
 include/svx/svdocirc.hxx  |4 
 include/svx/svdoedge.hxx  |6 
 include/svx/svdograf.hxx  |6 
 include/svx/svdogrp.hxx   |9 
 include/svx/svdomeas.hxx  |8 
 include/svx/svdomedia.hxx |2 
 include/svx/svdoole2.hxx  |8 
 include/svx/svdopage.hxx  |2 
 include/svx/svdopath.hxx  |6 
 include/svx/svdorect.hxx  |4 
 include/svx/svdotable.hxx |2 
 include/svx/svdotext.hxx   

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

2022-08-18 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/moduldlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 67224d9ea094ac3db7bf9f8dd77bc1245ca5eb85
Author: Caolán McNamara 
AuthorDate: Thu Aug 18 09:12:55 2022 +0100
Commit: Caolán McNamara 
CommitDate: Thu Aug 18 11:38:36 2022 +0200

cid#1500394 Explicit null dereferenced

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

diff --git a/basctl/source/basicide/moduldlg.cxx 
b/basctl/source/basicide/moduldlg.cxx
index dc46c7db0677..a6ce17179f50 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -397,7 +397,7 @@ private:
 // get source shell, library name and module/dialog name
 std::unique_ptr xSelected(m_rTreeView.make_iterator());
 if (!m_rTreeView.get_selected(xSelected.get()))
-xSelected.reset();
+return;
 EntryDescriptor aSourceDesc = 
m_rTreeView.GetEntryDescriptor(xSelected.get());
 const ScriptDocument& rSourceDoc( aSourceDesc.GetDocument() );
 const OUString& aSourceLibName( aSourceDesc.GetLibName() );


[Libreoffice-commits] core.git: basctl/source vcl/source

2022-08-07 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/iderdll.cxx  |1 -
 basctl/source/basicide/macrodlg.cxx |7 ---
 vcl/source/app/salvtables.cxx   |2 --
 vcl/source/treelist/treelist.cxx|6 --
 4 files changed, 16 deletions(-)

New commits:
commit 6e2bd11251afbe64f9889ede36b28b00f47aaff5
Author: Caolán McNamara 
AuthorDate: Sun Aug 7 12:49:11 2022 +0100
Commit: Caolán McNamara 
CommitDate: Sun Aug 7 15:40:29 2022 +0200

tdf#150291 Revert "Fix crash when no valid EntryDescriptor found"

This reverts commit 499ecbf3a36990c29dc7e1fb9b0ecb1d297c2848 because
it causes the dialog not to start with the default selected macro
auto-expanded like it used to. Possibly the other fix for tdf#150291
solves the original problem.

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

diff --git a/basctl/source/basicide/iderdll.cxx 
b/basctl/source/basicide/iderdll.cxx
index 8e8a3dc3e114..022045050e9a 100644
--- a/basctl/source/basicide/iderdll.cxx
+++ b/basctl/source/basicide/iderdll.cxx
@@ -145,7 +145,6 @@ ExtraData* Dll::GetExtraData ()
 
 
 ExtraData::ExtraData () :
-m_aLastEntryDesc(EntryDescriptor()),
 bChoosingMacro(false),
 bShellInCriticalSection(false)
 {
diff --git a/basctl/source/basicide/macrodlg.cxx 
b/basctl/source/basicide/macrodlg.cxx
index a9d3fd0f037c..2cc12fb053d9 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -154,13 +154,6 @@ void MacroChooser::RestoreMacroDescription()
 aDesc = pData->GetLastEntryDescriptor();
 }
 
-// No valid EntryDescriptor found
-if (aDesc.GetMethodName().isEmpty())
-{
-m_xMacroNameEdit->select_region(0, 0);
-return;
-}
-
 m_xBasicBox->SetCurrentEntry(aDesc);
 BasicSelectHdl(m_xBasicBox->get_widget());
 
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 1cc12d47a12c..02394ac9176c 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -4900,8 +4900,6 @@ void SalInstanceTreeView::set_text(const weld::TreeIter& 
rIter, const OUString&
 OUString SalInstanceTreeView::get_id(const weld::TreeIter& rIter) const
 {
 const SalInstanceTreeIter& rVclIter = static_cast(rIter);
-if (!rVclIter.iter)
-return OUString();
 const OUString* pStr = static_cast(rVclIter.iter->GetUserData());
 if (pStr)
 return *pStr;
diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx
index fc81fa2eaa0c..8f51e343fd98 100644
--- a/vcl/source/treelist/treelist.cxx
+++ b/vcl/source/treelist/treelist.cxx
@@ -102,8 +102,6 @@ bool SvTreeList::IsEntryVisible( const SvListView* pView, 
SvTreeListEntry* pEntr
 
 sal_uInt16 SvTreeList::GetDepth( const SvTreeListEntry* pEntry ) const
 {
-if (!pEntry)
-return 0;
 DBG_ASSERT(pEntry && pEntry!=pRootItem.get(),"GetDepth:Bad Entry");
 sal_uInt16 nDepth = 0;
 while( pEntry && pEntry->pParent != pRootItem.get() )
@@ -1504,8 +1502,6 @@ SvTreeListEntries& SvTreeList::GetChildList( 
SvTreeListEntry* pParent )
 
 const SvTreeListEntry* SvTreeList::GetParent( const SvTreeListEntry* pEntry ) 
const
 {
-if (!pEntry)
-return nullptr;
 const SvTreeListEntry* pParent = pEntry->pParent;
 if (pParent == pRootItem.get())
 pParent = nullptr;
@@ -1514,8 +1510,6 @@ const SvTreeListEntry* SvTreeList::GetParent( const 
SvTreeListEntry* pEntry ) co
 
 SvTreeListEntry* SvTreeList::GetParent( SvTreeListEntry* pEntry )
 {
-if (!pEntry)
-return nullptr;
 SvTreeListEntry* pParent = pEntry->pParent;
 if (pParent == pRootItem.get())
 pParent = nullptr;


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

2022-08-07 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/macrodlg.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 42a32f375a2641e6e82ee685efa3573c0dcaf001
Author: Caolán McNamara 
AuthorDate: Sun Aug 7 12:34:00 2022 +0100
Commit: Caolán McNamara 
CommitDate: Sun Aug 7 15:37:14 2022 +0200

tdf#150291 crash on macro organizer with no macro selected

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

diff --git a/basctl/source/basicide/macrodlg.cxx 
b/basctl/source/basicide/macrodlg.cxx
index 03613c96c914..a9d3fd0f037c 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -122,7 +122,8 @@ MacroChooser::~MacroChooser()
 
 void MacroChooser::StoreMacroDescription()
 {
-m_xBasicBox->get_selected(m_xBasicBoxIter.get());
+if (!m_xBasicBox->get_selected(m_xBasicBoxIter.get()))
+return;
 EntryDescriptor aDesc = 
m_xBasicBox->GetEntryDescriptor(m_xBasicBoxIter.get());
 OUString aMethodName;
 if (m_xMacroBox->get_selected(m_xMacroBoxIter.get()))


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

2022-08-06 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/bastypes.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit de5135060d01b650b7258c02e847e916ae9541fd
Author: Caolán McNamara 
AuthorDate: Sat Aug 6 12:13:29 2022 +0100
Commit: Caolán McNamara 
CommitDate: Sat Aug 6 15:25:52 2022 +0200

cid#1507764 Unintended comparison to logical negation

missing - from ->

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

diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index 1790c4b5444f..5411b73336bb 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -72,7 +72,7 @@ BaseWindow::~BaseWindow()
 
 void BaseWindow::dispose()
 {
-if (pShellVScrollBar && !pShellVScrollBar>isDisposed())
+if (pShellVScrollBar && !pShellVScrollBar->isDisposed())
 pShellVScrollBar->SetScrollHdl( Link() );
 if (pShellHScrollBar && !pShellHScrollBar->isDisposed())
 pShellHScrollBar->SetScrollHdl( Link() );


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

2022-08-05 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/baside2.cxx  |2 -
 basctl/source/basicide/baside2.hxx  |   11 +
 basctl/source/basicide/baside2b.cxx |9 +++
 basctl/source/basicide/baside3.cxx  |2 -
 basctl/source/basicide/basidesh.cxx |4 +--
 basctl/source/basicide/bastypes.cxx |   41 +---
 basctl/source/dlged/dlged.cxx   |6 -
 basctl/source/dlged/dlgedfunc.cxx   |8 +++
 basctl/source/dlged/dlgedview.cxx   |2 -
 basctl/source/inc/baside3.hxx   |2 -
 basctl/source/inc/basidesh.hxx  |5 ++--
 basctl/source/inc/bastypes.hxx  |   16 +++---
 basctl/source/inc/dlged.hxx |   12 +-
 13 files changed, 59 insertions(+), 61 deletions(-)

New commits:
commit 5ae01ffa70549b1a4d9f166d0528a8d04a5dc858
Author: Caolán McNamara 
AuthorDate: Fri Aug 5 11:37:48 2022 +0100
Commit: Caolán McNamara 
CommitDate: Fri Aug 5 17:05:04 2022 +0200

tdf#117388 use native scrollbar under gtk in basic editor

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

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index e75bb32a6478..1eb4b9027b7b 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1164,7 +1164,7 @@ void ModulWindow::GetState( SfxItemSet  )
 }
 }
 
-void ModulWindow::DoScroll( ScrollBar* pCurScrollBar )
+void ModulWindow::DoScroll( Scrollable* pCurScrollBar )
 {
 if ( ( pCurScrollBar == GetHScrollBar() ) && GetEditView() )
 {
diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index bf84323a3200..38ca2aec6ea7 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -32,6 +32,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
@@ -253,12 +254,12 @@ private:
 VclPtr aBrkWindow;
 VclPtr aLineNumberWindow;
 VclPtr aEdtWindow;
-VclPtraEWVScrollBar;
+VclPtraEWVScrollBar;
 
 virtual void DataChanged(DataChangedEvent const & rDCEvt) override;
 
 virtual voidResize() override;
-DECL_LINK( ScrollHdl, ScrollBar*, void );
+DECL_LINK(ScrollHdl, weld::Scrollbar&, void);
 
 public:
 explicit ComplexEditorWindow( ModulWindow* pParent );
@@ -267,7 +268,7 @@ public:
 BreakPointWindow&   GetBrkWindow()  { return *aBrkWindow; }
 LineNumberWindow&   GetLineNumberWindow() { return *aLineNumberWindow; }
 EditorWindow&   GetEdtWindow()  { return *aEdtWindow; }
-ScrollBar&  GetEWVScrollBar()   { return *aEWVScrollBar; }
+ScrollAdaptor&  GetEWVScrollBar()   { return *aEWVScrollBar; }
 
 void SetLineNumberDisplay(bool b);
 };
@@ -294,7 +295,7 @@ protected:
 virtual voidGetFocus() override;
 virtual voidPaint( vcl::RenderContext& rRenderContext, const 
tools::Rectangle& ) override;
 virtual voidDoInit() override;
-virtual voidDoScroll( ScrollBar* pCurScrollBar ) override;
+virtual voidDoScroll(Scrollable* pCurScrollBar) override;
 
 public:
 ModulWindow( ModulWindowLayout* pParent, const ScriptDocument& rDocument, 
const OUString& aLibName, const OUString& aName, OUString aModule );
@@ -360,7 +361,7 @@ public:
 EditorWindow&   GetEditorWindow()   { return 
m_aXEditorWindow->GetEdtWindow(); }
 BreakPointWindow&   GetBreakPointWindow()   { return 
m_aXEditorWindow->GetBrkWindow(); }
 LineNumberWindow&   GetLineNumberWindow()   { return 
m_aXEditorWindow->GetLineNumberWindow(); }
-ScrollBar&  GetEditVScrollBar() { return 
m_aXEditorWindow->GetEWVScrollBar(); }
+ScrollAdaptor&  GetEditVScrollBar() { return 
m_aXEditorWindow->GetEWVScrollBar(); }
 ExtTextEngine*  GetEditEngine() { return 
GetEditorWindow().GetEditEngine(); }
 TextView*   GetEditView()   { return 
GetEditorWindow().GetEditView(); }
 BreakPointList& GetBreakPoints(){ return 
GetBreakPointWindow().GetBreakPoints(); }
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index fbda4447191e..249a636fdee7 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1940,7 +1940,7 @@ ComplexEditorWindow::ComplexEditorWindow( ModulWindow* 
pParent ) :
 aBrkWindow(VclPtr::Create(this, pParent)),
 aLineNumberWindow(VclPtr::Create(this, pParent)),
 aEdtWindow(VclPtr::Create(this, pParent)),
-aEWVScrollBar( VclPtr::Create(this, WB_VSCROLL | WB_DRAG) )
+aEWVScrollBar( VclPtr::Create(this, false) )
 {
 aEdtWindow->Show();
 aBrkWindow->Show();
@@ -1995,17 +1995,16 @@ void ComplexEditorWindow::Resize()
 aEWVScrollBar->SetPosSizePixel( Point( aOutSz.Width() - DWBORDER - 
nSBWidth, DWBORDER ), Size( nSBWidth, aSz.Height() ) );
 }
 

[Libreoffice-commits] core.git: basctl/source vcl/source

2022-06-21 Thread Samuel Mehrbrodt (via logerrit)
 basctl/source/basicide/iderdll.cxx  |1 +
 basctl/source/basicide/macrodlg.cxx |7 +++
 vcl/source/app/salvtables.cxx   |2 ++
 vcl/source/treelist/treelist.cxx|6 ++
 4 files changed, 16 insertions(+)

New commits:
commit 499ecbf3a36990c29dc7e1fb9b0ecb1d297c2848
Author: Samuel Mehrbrodt 
AuthorDate: Mon Jun 20 10:27:26 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Jun 21 11:33:16 2022 +0200

Fix crash when no valid EntryDescriptor found

When opening macro run dlg, the last selected entry is displayed again.
When no entry was found, a crash occured in some situations
(GetLastEntryDescriptor() returned garbage).

Initialize m_aLastEntryDesc properly, and make sure the method returns
when no last selected macro was found.

Also fix some nullptr crashes which occurred during UITests

Change-Id: I7bd1a0b8824725f9935876ae26d8222410a3bc25
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136140
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/basctl/source/basicide/iderdll.cxx 
b/basctl/source/basicide/iderdll.cxx
index 022045050e9a..8e8a3dc3e114 100644
--- a/basctl/source/basicide/iderdll.cxx
+++ b/basctl/source/basicide/iderdll.cxx
@@ -145,6 +145,7 @@ ExtraData* Dll::GetExtraData ()
 
 
 ExtraData::ExtraData () :
+m_aLastEntryDesc(EntryDescriptor()),
 bChoosingMacro(false),
 bShellInCriticalSection(false)
 {
diff --git a/basctl/source/basicide/macrodlg.cxx 
b/basctl/source/basicide/macrodlg.cxx
index dbeaf396f3f3..03613c96c914 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -153,6 +153,13 @@ void MacroChooser::RestoreMacroDescription()
 aDesc = pData->GetLastEntryDescriptor();
 }
 
+// No valid EntryDescriptor found
+if (aDesc.GetMethodName().isEmpty())
+{
+m_xMacroNameEdit->select_region(0, 0);
+return;
+}
+
 m_xBasicBox->SetCurrentEntry(aDesc);
 BasicSelectHdl(m_xBasicBox->get_widget());
 
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index f548fe152b4f..b6db52c8b87d 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -4765,6 +4765,8 @@ void SalInstanceTreeView::set_text(const weld::TreeIter& 
rIter, const OUString&
 OUString SalInstanceTreeView::get_id(const weld::TreeIter& rIter) const
 {
 const SalInstanceTreeIter& rVclIter = static_cast(rIter);
+if (!rVclIter.iter)
+return OUString();
 const OUString* pStr = static_cast(rVclIter.iter->GetUserData());
 if (pStr)
 return *pStr;
diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx
index 8f51e343fd98..fc81fa2eaa0c 100644
--- a/vcl/source/treelist/treelist.cxx
+++ b/vcl/source/treelist/treelist.cxx
@@ -102,6 +102,8 @@ bool SvTreeList::IsEntryVisible( const SvListView* pView, 
SvTreeListEntry* pEntr
 
 sal_uInt16 SvTreeList::GetDepth( const SvTreeListEntry* pEntry ) const
 {
+if (!pEntry)
+return 0;
 DBG_ASSERT(pEntry && pEntry!=pRootItem.get(),"GetDepth:Bad Entry");
 sal_uInt16 nDepth = 0;
 while( pEntry && pEntry->pParent != pRootItem.get() )
@@ -1502,6 +1504,8 @@ SvTreeListEntries& SvTreeList::GetChildList( 
SvTreeListEntry* pParent )
 
 const SvTreeListEntry* SvTreeList::GetParent( const SvTreeListEntry* pEntry ) 
const
 {
+if (!pEntry)
+return nullptr;
 const SvTreeListEntry* pParent = pEntry->pParent;
 if (pParent == pRootItem.get())
 pParent = nullptr;
@@ -1510,6 +1514,8 @@ const SvTreeListEntry* SvTreeList::GetParent( const 
SvTreeListEntry* pEntry ) co
 
 SvTreeListEntry* SvTreeList::GetParent( SvTreeListEntry* pEntry )
 {
+if (!pEntry)
+return nullptr;
 SvTreeListEntry* pParent = pEntry->pParent;
 if (pParent == pRootItem.get())
 pParent = nullptr;


[Libreoffice-commits] core.git: basctl/source basic/source bridges/source

2022-06-21 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside2.cxx  |2 +-
 basic/source/runtime/runtime.cxx|2 +-
 basic/source/sbx/sbxcurr.cxx|2 +-
 bridges/source/jni_uno/jni_info.cxx |   10 ++
 4 files changed, 5 insertions(+), 11 deletions(-)

New commits:
commit 7c9d99a5cb2702e478f719bfa8167952293c2793
Author: Noel Grandin 
AuthorDate: Tue Jun 21 08:46:18 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Jun 21 10:10:36 2022 +0200

elide some makeStringAndClear() calls

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

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index f73c70ef751a..e75bb32a6478 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -183,7 +183,7 @@ void lcl_ConvertTabsToSpaces( OUString& rLine )
 OUStringBuffer aBlanker;
 string::padToLength(aBlanker, ( 4 - ( nPos % 4 ) ), ' ');
 aResult.remove( nPos, 1 );
-aResult.insert( nPos, aBlanker.makeStringAndClear() );
+aResult.insert( nPos, aBlanker );
 nMax = aResult.getLength();
 }
 ++nPos;
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index f5792fe33dba..93104da1a153 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -2745,7 +2745,7 @@ void SbiRuntime::StepPRINTF()   // print TOS in field
 }
 s.append(s1);
 comphelper::string::padToLength(s, 14, ' ');
-pIosys->Write( s.makeStringAndClear() );
+pIosys->Write( s );
 Error( pIosys->GetError() );
 }
 
diff --git a/basic/source/sbx/sbxcurr.cxx b/basic/source/sbx/sbxcurr.cxx
index ad558f2284c1..54b00102dd49 100644
--- a/basic/source/sbx/sbxcurr.cxx
+++ b/basic/source/sbx/sbxcurr.cxx
@@ -148,7 +148,7 @@ static sal_Int64 ImpStringToCurrency( std::u16string_view 
rStr )
 nFractDigit--;
 }
 
-sal_Int64 result = sNormalisedNumString.makeStringAndClear().toInt64();
+sal_Int64 result = o3tl::toInt64(sNormalisedNumString);
 
 if ( bRoundUp )
 ++result;
diff --git a/bridges/source/jni_uno/jni_info.cxx 
b/bridges/source/jni_uno/jni_info.cxx
index 81ad9323de48..434322f3003c 100644
--- a/bridges/source/jni_uno/jni_info.cxx
+++ b/bridges/source/jni_uno/jni_info.cxx
@@ -172,12 +172,9 @@ JNI_interface_type_info::JNI_interface_type_info(
 sig_buf.append( "()" );
 sig_buf.append( type_sig );
 OString method_signature( sig_buf.makeStringAndClear() );
-OUStringBuffer name_buf( 3 + member_name.getLength() );
-name_buf.append( "get" );
-name_buf.append( member_name );
 OString method_name(
 OUStringToOString(
-name_buf.makeStringAndClear(),
+rtl::OUStringConcatenation("get" + member_name),
 RTL_TEXTENCODING_JAVA_UTF8 ) );
 m_methods[ nMethodIndex ] = jni->GetMethodID(
 static_cast(jo_class.get()), 
method_name.getStr(),
@@ -193,11 +190,8 @@ JNI_interface_type_info::JNI_interface_type_info(
 sig_buf.append( type_sig );
 sig_buf.append( ")V" );
 method_signature = sig_buf.makeStringAndClear();
-name_buf.ensureCapacity( 3 + member_name.getLength() );
-name_buf.append( "set" );
-name_buf.append( member_name );
 method_name = OUStringToOString(
-name_buf.makeStringAndClear(),
+rtl::OUStringConcatenation("set" + member_name),
 RTL_TEXTENCODING_JAVA_UTF8 );
 m_methods[ nMethodIndex ] = jni->GetMethodID(
 static_cast(jo_class.get()), 
method_name.getStr(),


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

2022-06-06 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside2.cxx |5 +--
 basctl/source/basicide/baside2.hxx |2 -
 basctl/source/basicide/baside2b.cxx|5 +--
 basctl/source/basicide/bastype2.cxx|   45 ++---
 basctl/source/basicide/bastypes.cxx|   17 +-
 basctl/source/basicide/localizationmgr.cxx |9 +++--
 basctl/source/basicide/sbxitem.cxx |   29 +-
 basctl/source/dlged/dlgedfac.cxx   |3 +
 basctl/source/dlged/managelang.cxx |9 +++--
 basctl/source/inc/bastype2.hxx |   22 +++---
 basctl/source/inc/bastypes.hxx |6 +--
 basctl/source/inc/dlgedfac.hxx |2 -
 basctl/source/inc/localizationmgr.hxx  |2 -
 basctl/source/inc/managelang.hxx   |9 +++--
 basctl/source/inc/sbxitem.hxx  |4 +-
 15 files changed, 89 insertions(+), 80 deletions(-)

New commits:
commit 81b3cd44e160f4e600e4cb01410d540b32710c96
Author: Noel Grandin 
AuthorDate: Mon Jun 6 11:22:39 2022 +0200
Commit: Noel Grandin 
CommitDate: Mon Jun 6 13:16:12 2022 +0200

clang-tidy modernize-pass-by-value in basctl

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

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 215ed0be3393..f73c70ef751a 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -56,6 +56,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -193,12 +194,12 @@ void lcl_ConvertTabsToSpaces( OUString& rLine )
 } // namespace
 
 ModulWindow::ModulWindow (ModulWindowLayout* pParent, ScriptDocument const& 
rDocument,
-  const OUString& aLibName, const OUString& aName, 
OUString const & aModule)
+  const OUString& aLibName, const OUString& aName, 
OUString aModule)
 : BaseWindow(pParent, rDocument, aLibName, aName)
 , m_rLayout(*pParent)
 , m_nValid(ValidWindow)
 , m_aXEditorWindow(VclPtr::Create(this))
-, m_aModule(aModule)
+, m_aModule(std::move(aModule))
 {
 m_aXEditorWindow->Show();
 SetBackground();
diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index 2c9822610d64..bf84323a3200 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -297,7 +297,7 @@ protected:
 virtual voidDoScroll( ScrollBar* pCurScrollBar ) override;
 
 public:
-ModulWindow( ModulWindowLayout* pParent, const ScriptDocument& rDocument, 
const OUString& aLibName, const OUString& aName, OUString const & aModule );
+ModulWindow( ModulWindowLayout* pParent, const ScriptDocument& rDocument, 
const OUString& aLibName, const OUString& aName, OUString aModule );
 
 virtual ~ModulWindow() override;
 virtual voiddispose() override;
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 0315894b7d88..df8196570653 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -46,6 +46,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -1586,8 +1587,8 @@ struct WatchItem
 
 WatchItem*  mpArrayParentItem;
 
-explicit WatchItem (OUString const& rName):
-maName(rName),
+explicit WatchItem (OUString aName):
+maName(std::move(aName)),
 nDimLevel(0),
 nDimCount(0),
 mpArrayParentItem(nullptr)
diff --git a/basctl/source/basicide/bastype2.cxx 
b/basctl/source/basicide/bastype2.cxx
index d027c7dc6d2b..6f6eaa26d9ee 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace basctl
 {
@@ -87,12 +88,12 @@ Entry::~Entry()
 { }
 
 DocumentEntry::DocumentEntry (
-ScriptDocument const& rDocument,
+ScriptDocument aDocument,
 LibraryLocation eLocation,
 EntryType eType
 ) :
 Entry(eType),
-m_aDocument(rDocument),
+m_aDocument(std::move(aDocument)),
 m_eLocation(eLocation)
 {
 OSL_ENSURE( m_aDocument.isValid(), "DocumentEntry::DocumentEntry: illegal 
document!" );
@@ -104,10 +105,10 @@ DocumentEntry::~DocumentEntry()
 LibEntry::LibEntry (
 ScriptDocument const& rDocument,
 LibraryLocation eLocation,
-OUString const& rLibName
+OUString aLibName
 ) :
 DocumentEntry(rDocument, eLocation, OBJ_TYPE_LIBRARY),
-m_aLibName(rLibName)
+m_aLibName(std::move(aLibName))
 { }
 
 LibEntry::~LibEntry()
@@ -120,38 +121,38 @@ EntryDescriptor::EntryDescriptor () :
 { }
 
 EntryDescriptor::EntryDescriptor (
-ScriptDocument const& rDocument,
+ScriptDocument aDocument,
 LibraryLocation eLocation,
-OUString const& rLibName,
-OUString const& rLibSubName,

[Libreoffice-commits] core.git: basctl/source comphelper/source sc/source

2022-06-01 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/basobj2.cxx  |4 +-
 comphelper/source/property/ChainablePropertySet.cxx |   16 
 comphelper/source/property/MasterPropertySet.cxx|   36 ++--
 sc/source/ui/docshell/docfunc.cxx   |4 +-
 4 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit 49b9401465730b1151917bffcbc0ad1f0622fcee
Author: Noel Grandin 
AuthorDate: Wed Jun 1 11:14:19 2022 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 1 18:11:49 2022 +0200

no need to allocate guards on the heap

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

diff --git a/basctl/source/basicide/basobj2.cxx 
b/basctl/source/basicide/basobj2.cxx
index 28c1acdb383f..8a656bf08d7c 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -216,9 +216,9 @@ namespace
 
 // in case this is a document-local macro, try to protect the 
document's Undo Manager from
 // flawed scripts
-std::unique_ptr< ::framework::DocumentUndoGuard > pUndoGuard;
+std::optional< ::framework::DocumentUndoGuard > pUndoGuard;
 if ( pData->aDocument.isDocument() )
-pUndoGuard.reset( new ::framework::DocumentUndoGuard( 
pData->aDocument.getDocument() ) );
+pUndoGuard.emplace( pData->aDocument.getDocument() );
 
 RunMethod( pData->xMethod.get() );
 }
diff --git a/comphelper/source/property/ChainablePropertySet.cxx 
b/comphelper/source/property/ChainablePropertySet.cxx
index 65a53e62479f..7c9caa17582a 100644
--- a/comphelper/source/property/ChainablePropertySet.cxx
+++ b/comphelper/source/property/ChainablePropertySet.cxx
@@ -51,9 +51,9 @@ Reference< XPropertySetInfo > SAL_CALL 
ChainablePropertySet::getPropertySetInfo(
 void SAL_CALL ChainablePropertySet::setPropertyValue( const OUString& 
rPropertyName, const Any& rValue )
 {
 // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
+std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
 if (mpMutex)
-xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) );
+xMutexGuard.emplace( mpMutex );
 
 PropertyInfoHash::const_iterator aIter = mxInfo->maMap.find ( 
rPropertyName );
 
@@ -68,9 +68,9 @@ void SAL_CALL ChainablePropertySet::setPropertyValue( const 
OUString& rPropertyN
 Any SAL_CALL ChainablePropertySet::getPropertyValue( const OUString& 
rPropertyName )
 {
 // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
+std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
 if (mpMutex)
-xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) );
+xMutexGuard.emplace( mpMutex );
 
 PropertyInfoHash::const_iterator aIter = mxInfo->maMap.find ( 
rPropertyName );
 
@@ -109,9 +109,9 @@ void SAL_CALL 
ChainablePropertySet::removeVetoableChangeListener( const OUString
 void SAL_CALL ChainablePropertySet::setPropertyValues(const Sequence< OUString 
>& rPropertyNames, const Sequence< Any >& rValues)
 {
 // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
+std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
 if (mpMutex)
-xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) );
+xMutexGuard.emplace( mpMutex );
 
 const sal_Int32 nCount = rPropertyNames.getLength();
 
@@ -142,9 +142,9 @@ void SAL_CALL ChainablePropertySet::setPropertyValues(const 
Sequence< OUString >
 Sequence< Any > SAL_CALL ChainablePropertySet::getPropertyValues(const 
Sequence< OUString >& rPropertyNames)
 {
 // acquire mutex in c-tor and releases it in the d-tor (exception safe!).
-std::unique_ptr< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
+std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
 if (mpMutex)
-xMutexGuard.reset( new osl::Guard< comphelper::SolarMutex >(mpMutex) );
+xMutexGuard.emplace( mpMutex );
 
 const sal_Int32 nCount = rPropertyNames.getLength();
 
diff --git a/comphelper/source/property/MasterPropertySet.cxx 
b/comphelper/source/property/MasterPropertySet.cxx
index 3f6f0119dbb6..51fdd4deb620 100644
--- a/comphelper/source/property/MasterPropertySet.cxx
+++ b/comphelper/source/property/MasterPropertySet.cxx
@@ -32,12 +32,12 @@ namespace {
 
 class AutoOGuardArray
 {
-std::vector >>  
maGuardArray;
+std::vector >>  
maGuardArray;
 
 public:
 explicit AutoOGuardArray( sal_Int32 nNumElements );
 
-std::unique_ptr< osl::Guard< comphelper::SolarMutex > > &  operator[] ( 
sal_Int32 i ) { return 

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

2022-05-17 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/moduldlg.cxx |   48 +---
 1 file changed, 29 insertions(+), 19 deletions(-)

New commits:
commit 517a39c3201ff5a2a258402ca5de6ae9d9c41196
Author: Caolán McNamara 
AuthorDate: Tue May 17 16:28:20 2022 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 17 20:50:05 2022 +0200

Resolves: tdf#145722 don't propose MOVE from AcceptDrop if not asked for 
MOVE

announce to dnd that tree supports COPY and MOVE, but on accepting a drop
return MOVE only if that's something the AcceptDrop has set as desirable.

a) makes ctrl+dnd to select 'copy' work for gtk, including gtk on wayland
b) makes gen correctly draw its copy dnd icon.

git show -w

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

diff --git a/basctl/source/basicide/moduldlg.cxx 
b/basctl/source/basicide/moduldlg.cxx
index 3d5ead6d0259..dc46c7db0677 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -246,6 +246,10 @@ private:
 if (!pSource)
 return DND_ACTION_NONE;
 
+// tdf#145722 only return a DND_ACTION_MOVE possibility if that
+// is requested as an option
+const bool bCheckForMove = rEvt.mnAction & DND_ACTION_MOVE;
+
 sal_Int8 nMode = DND_ACTION_NONE;
 
 std::unique_ptr xEntry(pSource->make_iterator());
@@ -255,28 +259,31 @@ private:
 if (nDepth >= 2)
 {
 nMode = DND_ACTION_COPY;
-EntryDescriptor aDesc = 
m_rTreeView.GetEntryDescriptor(xEntry.get());
-const ScriptDocument& aDocument( aDesc.GetDocument() );
-const OUString& aLibName( aDesc.GetLibName() );
-// allow MOVE mode only for libraries, which are not readonly
-Reference< script::XLibraryContainer2 > xModLibContainer( 
aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
-Reference< script::XLibraryContainer2 > xDlgLibContainer( 
aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
-if ( !( ( xModLibContainer.is() && 
xModLibContainer->hasByName( aLibName ) && xModLibContainer->isLibraryReadOnly( 
aLibName ) ) ||
-( xDlgLibContainer.is() && 
xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( 
aLibName ) ) ) )
+if (bCheckForMove)
 {
-// Only allow copy for localized libraries
-bool bAllowMove = true;
-if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( 
aLibName ) )
+EntryDescriptor aDesc = 
m_rTreeView.GetEntryDescriptor(xEntry.get());
+const ScriptDocument& aDocument( aDesc.GetDocument() );
+const OUString& aLibName( aDesc.GetLibName() );
+// allow MOVE mode only for libraries, which are not 
readonly
+Reference< script::XLibraryContainer2 > xModLibContainer( 
aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
+Reference< script::XLibraryContainer2 > xDlgLibContainer( 
aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
+if ( !( ( xModLibContainer.is() && 
xModLibContainer->hasByName( aLibName ) && xModLibContainer->isLibraryReadOnly( 
aLibName ) ) ||
+( xDlgLibContainer.is() && 
xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( 
aLibName ) ) ) )
 {
-// Get StringResourceManager
-Reference< container::XNameContainer > xDialogLib( 
aDocument.getLibrary( E_DIALOGS, aLibName, true ) );
-Reference< XStringResourceManager > xSourceMgr =
-
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
-if( xSourceMgr.is() )
-bAllowMove = ( 
xSourceMgr->getLocales().getLength() == 0 );
+// Only allow copy for localized libraries
+bool bAllowMove = true;
+if ( xDlgLibContainer.is() && 
xDlgLibContainer->hasByName( aLibName ) )
+{
+// Get StringResourceManager
+Reference< container::XNameContainer > xDialogLib( 
aDocument.getLibrary( E_DIALOGS, aLibName, true ) );
+Reference< XStringResourceManager > xSourceMgr =
+
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
+if( xSourceMgr.is() )
+bAllowMove = ( 
xSourceMgr->getLocales().getLength() == 0 );
+}
+

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

2022-05-17 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/moduldlg.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit ba257c8443e3b66f73737895f68e57b7cd1c7cb2
Author: Caolán McNamara 
AuthorDate: Tue May 17 15:56:17 2022 +0100
Commit: Caolán McNamara 
CommitDate: Tue May 17 20:49:37 2022 +0200

Related: tdf#145722 need to clone userdata if we copy a module/dialog

otherwise we double-free it, so do what TreeListBox::CloneEntry used to
before it was dropped as unused at

commit 4a72d6f474b105cdaa7a570b1f199475cc64bb14
Date:   Tue Feb 11 13:50:50 2020 +

drop newly unused TreeListBox

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

diff --git a/basctl/source/basicide/moduldlg.cxx 
b/basctl/source/basicide/moduldlg.cxx
index 114a9e2062fa..3d5ead6d0259 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -496,6 +496,13 @@ private:
 
 OUString sText(m_rTreeView.get_text(*xSelected));
 OUString sId(m_rTreeView.get_id(*xSelected));
+/// if copying then clone the userdata
+if (Entry* pEntry = bMove ? nullptr : weld::fromId(sId))
+{
+assert(pEntry->GetType() != OBJ_TYPE_DOCUMENT);
+std::unique_ptr 
xNewUserData(std::make_unique(*pEntry));
+sId = weld::toId(xNewUserData.release());
+}
 std::unique_ptr xRet(m_rTreeView.make_iterator());
 m_rTreeView.get_widget().insert(xNewParent.get(), nNewChildPos, 
, , nullptr, nullptr, false, xRet.get());
 if (eType == OBJ_TYPE_MODULE)


[Libreoffice-commits] core.git: basctl/source basic/source binaryurp/source canvas/workben chart2/source comphelper/source connectivity/source cppcanvas/source cppuhelper/qa cppuhelper/source cui/sour

2022-05-09 Thread Pragat Pandya (via logerrit)
 basctl/source/dlged/propbrw.cxx   |2 
 basic/source/comp/token.cxx   |2 
 basic/source/sbx/sbxscan.cxx  |2 
 binaryurp/source/bridge.cxx   |2 
 canvas/workben/canvasdemo.cxx |2 
 chart2/source/tools/ConfigColorScheme.cxx |2 
 comphelper/source/misc/base64.cxx |4 
 comphelper/source/misc/graphicmimetype.cxx|2 
 comphelper/source/misc/syntaxhighlight.cxx|4 
 connectivity/source/commontools/TDatabaseMetaDataBase.cxx |2 
 connectivity/source/drivers/ado/Awrapado.cxx  |   24 +--
 connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx  |2 
 connectivity/source/drivers/jdbc/DatabaseMetaData.cxx |2 
 connectivity/source/drivers/postgresql/pq_statics.cxx |   32 ++--
 connectivity/source/parse/sqlnode.cxx |2 
 cppcanvas/source/mtfrenderer/implrenderer.cxx |2 
 cppuhelper/qa/unourl/cppu_unourl.cxx  |   18 +-
 cppuhelper/source/bootstrap.cxx   |4 
 cui/source/customize/acccfg.cxx   |2 
 cui/source/options/optcolor.cxx   |2 
 cui/source/options/optgenrl.cxx   |2 
 cui/source/options/treeopt.cxx|   24 +--
 cui/source/tabpages/border.cxx|4 
 cui/source/tabpages/chardlg.cxx   |4 
 cui/source/tabpages/numfmt.cxx|2 
 cui/source/tabpages/page.cxx  |4 
 cui/source/tabpages/swpossizetabpage.cxx  |   96 +++---
 27 files changed, 125 insertions(+), 125 deletions(-)

New commits:
commit 6abc09926c9b55a445b906303f56c6ec7fdeabf9
Author: Pragat Pandya 
AuthorDate: Sun May 8 23:56:45 2022 +0530
Commit: Bartosz Kosiorek 
CommitDate: Mon May 9 20:42:03 2022 +0200

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

Change-Id: I54257e87da0cd66da59d820c7960c3e4b020fda3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134027
Reviewed-by: Bartosz Kosiorek 
Tested-by: Jenkins

diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index 4a8481249640..d7ab2ee633ef 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -137,7 +137,7 @@ void PropBrw::ImplReCreateController()
 ::cppu::ContextEntry_Init( "ContextDocument", Any( 
m_xContextDocument ) )
 };
 Reference< XComponentContext > xInspectorContext(
-::cppu::createComponentContext( aHandlerContextInfo, 
SAL_N_ELEMENTS( aHandlerContextInfo ), xOwnContext ) );
+::cppu::createComponentContext( aHandlerContextInfo, std::size( 
aHandlerContextInfo ), xOwnContext ) );
 
 // create a property browser controller
 Reference< XMultiComponentFactory > xFactory( 
xInspectorContext->getServiceManager(), UNO_SET_THROW );
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index 9be47bf41ba1..a060b3fd9318 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -377,7 +377,7 @@ SbiToken SbiTokenizer::Next()
 }
 // valid token?
 short lb = 0;
-short ub = SAL_N_ELEMENTS(aTokTable_Basic)-1;
+short ub = std::size(aTokTable_Basic)-1;
 short delta;
 do
 {
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 82080df4a62a..ec2783b1b837 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -600,7 +600,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt 
) const
  sal_Unicode aBuf[2];
  aBuf[0] = '0';
  aBuf[1] = '0' + nMin;
- rRes = OUString(aBuf, SAL_N_ELEMENTS(aBuf));
+ rRes = OUString(aBuf, std::size(aBuf));
 }
 else
 {
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 050ebec7403c..d06e7d29f31a 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -991,7 +991,7 @@ void Bridge::makeReleaseCall(
 // its own:
 static auto const tid = [] {
 static sal_Int8 const id[] = {'r', 'e', 'l', 'e', 'a', 's', 'e', 
'h', 'a', 'c', 'k'};
-return rtl::ByteSequence(id, SAL_N_ELEMENTS(id));
+return rtl::ByteSequence(id, std::size(id));
 }();
 sendRequest(
 tid, oid, type,
diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx
index 031068adf9e9..431f9cee04a1 100644
--- a/canvas/workben/canvasdemo.cxx
+++ b/canvas/workben/canvasdemo.cxx
@@ -208,7 +208,7 @@ class DemoRenderer
 {
 const 

[Libreoffice-commits] core.git: basctl/source chart2/source compilerplugins/clang connectivity/source cui/source dbaccess/source extensions/source framework/source oox/source sc/source sfx2/source sta

2022-05-05 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside2.cxx|1 
 chart2/source/controller/drawinglayer/ViewElementListProvider.cxx |4 
 chart2/source/model/template/NetChartTypeTemplate.cxx |3 
 compilerplugins/clang/unusedvariableplus.cxx  |   45 
++
 connectivity/source/parse/sqliterator.cxx |1 
 cui/source/dialogs/toolbarmodedlg.cxx |8 -
 dbaccess/source/ui/control/sqledit.cxx|1 
 extensions/source/bibliography/general.cxx|3 
 framework/source/layoutmanager/toolbarlayoutmanager.cxx   |1 
 framework/source/loadenv/loadenv.cxx  |6 -
 oox/source/drawingml/shape.cxx|1 
 oox/source/ppt/slidepersist.cxx   |1 
 sc/source/ui/vba/vbarange.cxx |1 
 sfx2/source/view/viewfrm.cxx  |2 
 starmath/source/view.cxx  |1 
 svx/source/core/graphichelper.cxx |1 
 sw/source/core/docnode/section.cxx|1 
 ucb/source/ucp/webdav-curl/DAVSessionFactory.cxx  |7 -
 vcl/source/bitmap/bitmap.cxx  |1 
 vcl/source/gdi/impglyphitem.cxx   |3 
 vcl/source/window/winproc.cxx |3 
 vcl/unx/gtk3/gtkframe.cxx |2 
 xmlsecurity/source/helper/xsecctl.cxx |1 
 23 files changed, 30 insertions(+), 68 deletions(-)

New commits:
commit 9e57e164844e67faaf2b0424181c2df29e871992
Author: Noel Grandin 
AuthorDate: Thu May 5 09:59:06 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu May 5 17:35:08 2022 +0200

loplugin:unusedvariableplus

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

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index eecf917d6035..215ed0be3393 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -459,7 +459,6 @@ void ModulWindow::LoadBasic()
 
 void ModulWindow::SaveBasicSource()
 {
-Reference< uno::XComponentContext > xContext( 
::comphelper::getProcessComponentContext() );
 sfx2::FileDialogHelper 
aDlg(ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD,
 FileDialogFlags::NONE, this->GetFrameWeld());
 aDlg.SetContext(sfx2::FileDialogHelper::BasicExportSource);
diff --git a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx 
b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
index 77099c9444fe..ef7eba88eb65 100644
--- a/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
+++ b/chart2/source/controller/drawinglayer/ViewElementListProvider.cxx
@@ -110,10 +110,6 @@ SdrObjList* ViewElementListProvider::GetSymbolList() const
 {
 //@todo use mutex
 
-//get shape factory
-uno::Reference xShapeFactory(
-m_pDrawModelWrapper->getShapeFactory());
-
 //get hidden draw page (target):
 rtl::Reference xTarget = 
m_pDrawModelWrapper->getHiddenDrawPage();
 
diff --git a/chart2/source/model/template/NetChartTypeTemplate.cxx 
b/chart2/source/model/template/NetChartTypeTemplate.cxx
index 5632ac648f07..7f120315bead 100644
--- a/chart2/source/model/template/NetChartTypeTemplate.cxx
+++ b/chart2/source/model/template/NetChartTypeTemplate.cxx
@@ -88,9 +88,6 @@ bool NetChartTypeTemplate::matchesTemplate(
 {
 bool bResult = ChartTypeTemplate::matchesTemplate( xDiagram, 
bAdaptProperties );
 
-rtl::Reference< ChartType > xChartType =
-DiagramHelper::getChartTypeByIndex( xDiagram, 0 );
-
 if( bResult )
 {
 //filled net chart?:
diff --git a/compilerplugins/clang/unusedvariableplus.cxx 
b/compilerplugins/clang/unusedvariableplus.cxx
index af33ad9d2223..e8a8385bb3cd 100644
--- a/compilerplugins/clang/unusedvariableplus.cxx
+++ b/compilerplugins/clang/unusedvariableplus.cxx
@@ -107,6 +107,8 @@ public:
 return true;
 if (var->isExceptionVariable()) // not interesting
 return true;
+if (isa(var))
+return true;
 
 auto type = var->getType().getCanonicalType().getUnqualifiedType();
 auto typeName = type.getAsString();
@@ -125,10 +127,10 @@ public:
 "BoolResetter",
 "boost::io::basic_ios_all_saver >",
 "BorderLinesGuard",
+"BorderTest",
 "BroadcastRecalcOnRefMoveGuard",
 "CacheLockGuard",
 "cc_reset",
-

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

2022-05-04 Thread Stephan Bergmann (via logerrit)
 basctl/source/dlged/dlged.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3db0b7549e198ac0719ff52bff38a3d79e212083
Author: Stephan Bergmann 
AuthorDate: Wed May 4 22:33:52 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Thu May 5 07:13:20 2022 +0200

Just use Any ctor instead of makeAny in basctl

Change-Id: I4bd58031623dea1243193aaa60f6ca5bb0f7d562
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133849
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 69ffb81f3579..81fa3f14e837 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -789,7 +789,7 @@ void DlgEditor::Copy()
 Sequence< Any > aSeqData
 {
 aNoResourceDialogModelBytesAny,
-makeAny(aCombinedData)
+Any(aCombinedData)
 };
 
 pTrans = new DlgEdTransferableImpl( m_ClipboardDataFlavorsResource, 
aSeqData );
@@ -797,7 +797,7 @@ void DlgEditor::Copy()
 else
 {
 // No resource, support only old format
-pTrans = new DlgEdTransferableImpl( m_ClipboardDataFlavors , { 
makeAny(DialogModelBytes) } );
+pTrans = new DlgEdTransferableImpl( m_ClipboardDataFlavors , { 
Any(DialogModelBytes) } );
 }
 SolarMutexReleaser aReleaser;
 xClipboard->setContents( pTrans , pTrans );


[Libreoffice-commits] core.git: basctl/source basic/source chart2/source connectivity/source cpputools/source cui/source dbaccess/source desktop/source editeng/source extensions/source forms/source fr

2022-05-01 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside2b.cxx   |7 -
 basic/source/comp/codegen.cxx |   15 +--
 basic/source/comp/scanner.cxx |5 -
 basic/source/runtime/methods.cxx  |   18 +--
 chart2/source/controller/main/ChartController_Window.cxx  |5 -
 connectivity/source/drivers/firebird/PreparedStatement.cxx|2 
 connectivity/source/parse/sqlbison.y  |7 -
 cpputools/source/unoexe/unoexe.cxx|6 -
 cui/source/dialogs/AdditionsDialog.cxx|4 
 cui/source/dialogs/hyphen.cxx |8 -
 cui/source/options/cfgchart.cxx   |   15 +--
 dbaccess/source/filter/hsqldb/createparser.cxx|7 -
 dbaccess/source/filter/hsqldb/parseschema.cxx |   11 +-
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx   |2 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |8 -
 desktop/source/deployment/registry/component/dp_component.cxx |6 -
 desktop/source/deployment/registry/help/dp_help.cxx   |   10 +-
 desktop/source/migration/migration.cxx|4 
 desktop/source/migration/services/basicmigration.cxx  |2 
 desktop/source/migration/services/wordbookmigration.cxx   |2 
 editeng/source/editeng/impedit3.cxx   |4 
 editeng/source/misc/svxacorr.cxx  |6 -
 extensions/source/propctrlr/eventhandler.cxx  |6 -
 forms/source/richtext/richtextcontrol.cxx |4 
 framework/source/jobs/jobdata.cxx |2 
 framework/source/services/autorecovery.cxx|5 -
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |   17 +--
 framework/source/uiconfiguration/uiconfigurationmanager.cxx   |   17 +--
 framework/source/uielement/recentfilesmenucontroller.cxx  |9 +
 framework/source/uielement/toolbarmanager.cxx |5 -
 i18npool/source/nativenumber/nativenumbersupplier.cxx |2 
 linguistic/source/misc.cxx|7 -
 lotuswordpro/source/filter/lwpfribmark.cxx|4 
 lotuswordpro/source/filter/lwpmarker.cxx  |   18 +--
 package/source/zippackage/ZipPackage.cxx  |   11 +-
 reportdesign/source/core/misc/conditionalexpression.cxx   |   32 +++---
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx   |6 -
 sax/source/fastparser/fastparser.cxx  |5 -
 sc/source/core/tool/address.cxx   |2 
 sc/source/core/tool/reffind.cxx   |2 
 sc/source/filter/excel/xecontent.cxx  |4 
 sc/source/filter/excel/xltools.cxx|5 -
 sc/source/filter/xml/xmldrani.cxx |9 +
 sc/source/filter/xml/xmlsorti.cxx |8 -
 sd/source/core/stlsheet.cxx   |4 
 sd/source/ui/dlg/unchss.cxx   |2 
 sd/source/ui/func/futempl.cxx |5 -
 sd/source/ui/unoidl/unomodel.cxx  |   37 
+++
 sd/source/ui/unoidl/unoobj.cxx|8 -
 sd/source/ui/unoidl/unopage.cxx   |   12 +-
 sd/source/ui/view/sdview2.cxx |2 
 sdext/source/presenter/PresenterController.cxx|2 
 sfx2/source/view/classificationhelper.cxx |4 
 starmath/source/mathml/import.cxx |5 -
 stoc/source/javavm/javavm.cxx |2 
 svgio/source/svgreader/svgtools.cxx   |   13 +-
 svx/source/svdraw/svdotxat.cxx|5 -
 svx/source/unodraw/unomod.cxx |   33 +++---
 svx/source/unodraw/unoprov.cxx|   10 +-
 sw/source/core/access/accpara.cxx |8 -
 sw/source/core/bastyp/calc.cxx|   12 +-
 sw/source/core/doc/DocumentLinksAdministrationManager.cxx |   10 +-
 sw/source/core/table/swtable.cxx  |   11 +-
 sw/source/core/tox/txmsrt.cxx |6 -
 sw/source/core/txtnode/ndtxt.cxx  |4 
 sw/source/core/unocore/unochart.cxx  

[Libreoffice-commits] core.git: basctl/source comphelper/qa comphelper/source include/comphelper

2022-04-28 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside2.hxx  |2 
 basctl/source/basicide/baside2b.cxx |9 +-
 comphelper/qa/unit/syntaxhighlighttest.cxx  |   10 +-
 comphelper/source/misc/accessibletexthelper.cxx |   40 +-
 comphelper/source/misc/docpasswordhelper.cxx|8 +-
 comphelper/source/misc/storagehelper.cxx|4 -
 comphelper/source/misc/syntaxhighlight.cxx  |   88 +---
 comphelper/source/misc/xmlsechelper.cxx |   43 ++-
 include/comphelper/accessibletexthelper.hxx |6 -
 include/comphelper/docpasswordhelper.hxx|2 
 include/comphelper/storagehelper.hxx|2 
 include/comphelper/syntaxhighlight.hxx  |2 
 include/comphelper/xmlsechelper.hxx |5 -
 13 files changed, 117 insertions(+), 104 deletions(-)

New commits:
commit b1148c31ed2786396f0b018a988fce8288f1797d
Author: Noel Grandin 
AuthorDate: Wed Apr 27 16:47:53 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Apr 28 13:40:36 2022 +0200

use more string_view in comphelper

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

diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index f43ee79d2c4f..2c9822610d64 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -153,7 +153,7 @@ public:
 voidChangeFontColor( Color aColor );
 voidUpdateSyntaxHighlighting ();
 
-boolGetProcedureName(OUString const & rLine, OUString& 
rProcType, OUString& rProcName) const;
+boolGetProcedureName(std::u16string_view rLine, OUString& 
rProcType, OUString& rProcName) const;
 
 FactoryFunction GetUITestFactory() const override;
 };
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 262f9e49a248..c080ea325807 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -811,7 +812,7 @@ void EditorWindow::HandleProcedureCompletion()
 }
 }
 
-bool EditorWindow::GetProcedureName(OUString const & rLine, OUString& 
rProcType, OUString& rProcName) const
+bool EditorWindow::GetProcedureName(std::u16string_view rLine, OUString& 
rProcType, OUString& rProcName) const
 {
 std::vector aPortions;
 aHighlighter.getHighlightPortions(rLine, aPortions);
@@ -824,10 +825,10 @@ bool EditorWindow::GetProcedureName(OUString const & 
rLine, OUString& rProcType,
 
 for (auto const& portion : aPortions)
 {
-OUString sTokStr = rLine.copy(portion.nBegin, portion.nEnd - 
portion.nBegin);
+std::u16string_view sTokStr = rLine.substr(portion.nBegin, 
portion.nEnd - portion.nBegin);
 
-if( portion.tokenType == TokenType::Keywords && ( 
sTokStr.equalsIgnoreAsciiCase("sub")
-|| sTokStr.equalsIgnoreAsciiCase("function")) )
+if( portion.tokenType == TokenType::Keywords && ( 
o3tl::equalsIgnoreAsciiCase(sTokStr, u"sub")
+|| o3tl::equalsIgnoreAsciiCase(sTokStr, u"function")) )
 {
 rProcType = sTokStr;
 bFoundType = true;
diff --git a/comphelper/qa/unit/syntaxhighlighttest.cxx 
b/comphelper/qa/unit/syntaxhighlighttest.cxx
index c28941339085..eab382b85a65 100644
--- a/comphelper/qa/unit/syntaxhighlighttest.cxx
+++ b/comphelper/qa/unit/syntaxhighlighttest.cxx
@@ -38,7 +38,7 @@ public:
 
 void SyntaxHighlightTest::testBasicString() {
 std::vector ps;
-
SyntaxHighlighter(HighlighterLanguage::Basic).getHighlightPortions("\"foo\"", 
ps);
+
SyntaxHighlighter(HighlighterLanguage::Basic).getHighlightPortions(u"\"foo\"", 
ps);
 CPPUNIT_ASSERT_EQUAL(
 static_cast::size_type>(1), ps.size());
 CPPUNIT_ASSERT_EQUAL(sal_Int32(0), ps[0].nBegin);
@@ -48,7 +48,7 @@ void SyntaxHighlightTest::testBasicString() {
 
 void SyntaxHighlightTest::testBasicComment() {
 std::vector ps;
-SyntaxHighlighter(HighlighterLanguage::Basic).getHighlightPortions("' 
foo", ps);
+SyntaxHighlighter(HighlighterLanguage::Basic).getHighlightPortions(u"' 
foo", ps);
 CPPUNIT_ASSERT_EQUAL(
 static_cast::size_type>(1), ps.size());
 CPPUNIT_ASSERT_EQUAL(sal_Int32(0), ps[0].nBegin);
@@ -58,7 +58,7 @@ void SyntaxHighlightTest::testBasicComment() {
 
 void SyntaxHighlightTest::testBasicCommentNewline() {
 std::vector ps;
-SyntaxHighlighter(HighlighterLanguage::Basic).getHighlightPortions("' 
foo\n", ps);
+SyntaxHighlighter(HighlighterLanguage::Basic).getHighlightPortions(u"' 
foo\n", ps);
 CPPUNIT_ASSERT_EQUAL(
 static_cast::size_type>(2), ps.size());
 CPPUNIT_ASSERT_EQUAL(sal_Int32(0), ps[0].nBegin);
@@ -71,7 +71,7 @@ void SyntaxHighlightTest::testBasicCommentNewline() {
 
 void 

[Libreoffice-commits] core.git: basctl/source basic/inc basic/source chart2/source comphelper/source compilerplugins/clang configmgr/source connectivity/source cppuhelper/source cppu/source cui/source

2022-04-13 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/moduldl2.cxx   |7 -
 basic/inc/sbxform.hxx |2 
 basic/source/classes/sbunoobj.cxx |4 
 basic/source/inc/sbunoobj.hxx |7 -
 basic/source/sbx/sbxform.cxx  |   21 ++--
 basic/source/sbx/sbxscan.cxx  |5 
 chart2/source/inc/ObjectIdentifier.hxx|2 
 chart2/source/tools/ObjectIdentifier.cxx  |   34 +++---
 comphelper/source/misc/storagehelper.cxx  |9 -
 compilerplugins/clang/stringviewparam.cxx |3 
 configmgr/source/components.cxx   |5 
 configmgr/source/components.hxx   |2 
 connectivity/source/drivers/mysqlc/mysqlc_general.cxx |   55 ++
 connectivity/source/drivers/mysqlc/mysqlc_general.hxx |2 
 connectivity/source/drivers/mysqlc/mysqlc_resultset.cxx   |8 -
 connectivity/source/drivers/postgresql/pq_xcolumns.cxx|4 
 cppu/source/uno/EnvStack.cxx  |   13 +-
 cppu/source/uno/cascade_mapping.cxx   |   13 +-
 cppuhelper/source/servicemanager.cxx  |5 
 cppuhelper/source/servicemanager.hxx  |2 
 cppuhelper/source/typemanager.cxx |5 
 cppuhelper/source/typemanager.hxx |2 
 cui/source/dialogs/cuifmsearch.cxx|7 -
 cui/source/dialogs/multipat.cxx   |   13 +-
 cui/source/inc/cuifmsearch.hxx|2 
 cui/source/inc/multipat.hxx   |4 
 cui/source/inc/optpath.hxx|2 
 cui/source/options/optaboutconfig.cxx |5 
 cui/source/options/optaboutconfig.hxx |2 
 cui/source/options/optpath.cxx|   10 -
 dbaccess/source/core/api/KeySet.cxx   |2 
 dbaccess/source/core/api/KeySet.hxx   |2 
 dbaccess/source/core/dataaccess/documentcontainer.cxx |6 -
 dbaccess/source/core/misc/dsntypes.cxx|4 
 dbaccess/source/ui/app/AppDetailPageHelper.cxx|   13 +-
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx   |4 
 dbaccess/source/ui/dlg/TextConnectionHelper.hxx   |2 
 dbaccess/source/ui/inc/TableWindowListBox.hxx |2 
 dbaccess/source/ui/inc/UITools.hxx|2 
 dbaccess/source/ui/misc/UITools.cxx   |   66 ++--
 dbaccess/source/ui/querydesign/TableWindowListBox.cxx |5 
 dbaccess/source/ui/tabledesign/TEditControl.cxx   |2 
 dbaccess/source/ui/tabledesign/TEditControl.hxx   |2 
 desktop/source/deployment/registry/dp_registry.cxx|4 
 desktop/source/lib/init.cxx   |6 -
 extensions/source/propctrlr/standardcontrol.cxx   |5 
 extensions/source/propctrlr/stringrepresentation.cxx  |   11 +-
 filter/source/config/cache/filtercache.cxx|5 
 filter/source/config/cache/filtercache.hxx|2 
 filter/source/config/cache/querytokenizer.cxx |   11 +-
 filter/source/config/cache/querytokenizer.hxx |2 
 filter/source/svg/svgfontexport.cxx   |5 
 filter/source/svg/svgfontexport.hxx   |2 
 forms/source/xforms/convert.cxx   |4 
 forms/source/xforms/submission/replace.cxx|   11 +-
 forms/source/xforms/submission/submission.hxx |2 
 framework/inc/dispatch/closedispatcher.hxx|4 
 framework/inc/services/layoutmanager.hxx  |2 
 framework/inc/uielement/menubarmerger.hxx |6 -
 framework/inc/uielement/statusbarmerger.hxx   |2 
 framework/inc/uielement/toolbarmerger.hxx |4 
 framework/source/accelerators/keymapping.cxx  |7 -
 framework/source/accelerators/storageholder.cxx   |5 
 framework/source/dispatch/closedispatcher.cxx |9 -
 framework/source/dispatch/dispatchinformationprovider.cxx |2 
 framework/source/fwe/classes/sfxhelperfunctions.cxx   |4 
 framework/source/inc/accelerators/keymapping.hxx  |2 
 framework/source/inc/accelerators/storageholder.hxx   |2 
 framework/source/layoutmanager/helpers.cxx|   27 ++---
 framework/source/layoutmanager/helpers.hxx|6 -
 framework/source/layoutmanager/layoutmanager.cxx  |   25 ++--
 framework/source/services/pathsettings.cxx|7 -
 framework/source/uielement/menubarmerger.cxx  |   11 +-
 

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

2022-04-12 Thread Samuel Mehrbrodt (via logerrit)
 basctl/source/basicide/baside3.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 618d40799d25474c48d984ce1d52b0f08f220958
Author: Samuel Mehrbrodt 
AuthorDate: Fri Apr 8 15:59:11 2022 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Tue Apr 12 08:56:12 2022 +0200

tdf#147876 Fix crash when cancelling Dialog import dlg

Regression from 9a55b97e980bbf2a0ce12841f6168f1f7545ac96

Change-Id: I3fc35981a0cb81e5b59236ec3b07450aec10541a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132737
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index 6e20187055c9..492541001c1c 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -851,7 +851,7 @@ bool implImportDialog(weld::Window* pWin, const 
ScriptDocument& rDocument, const
 xFP->appendFilter( IDEResId(RID_STR_FILTER_ALLFILES), FilterMask_All );
 xFP->setCurrentFilter( aDialogStr );
 
-if( aDlg.Execute() != ERRCODE_NONE )
+if( aDlg.Execute() == ERRCODE_NONE )
 {
 Sequence< OUString > aPaths = xFP->getSelectedFiles();
 


[Libreoffice-commits] core.git: basctl/source basic/source codemaker/source compilerplugins/clang configmgr/source connectivity/source cui/source dbaccess/source filter/source framework/inc framework/

2022-04-02 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside2b.cxx |   18 
 basctl/source/inc/bastypes.hxx  |2 -
 basic/source/sbx/sbxscan.cxx|2 -
 codemaker/source/cppumaker/dumputils.cxx|   14 +-
 codemaker/source/cppumaker/dumputils.hxx|5 ++-
 compilerplugins/clang/stringviewparam.cxx   |3 +-
 configmgr/source/data.cxx   |8 ++---
 configmgr/source/data.hxx   |2 -
 configmgr/source/xmldata.cxx|4 +-
 configmgr/source/xmldata.hxx|4 +-
 connectivity/source/commontools/CommonTools.cxx |8 ++---
 connectivity/source/drivers/dbase/DTable.cxx|2 -
 cui/source/customize/macropg.cxx|6 ++--
 dbaccess/source/filter/hsqldb/createparser.cxx  |   15 +++---
 dbaccess/source/sdbtools/connection/objectnames.cxx |   16 +--
 dbaccess/source/ui/control/SqlNameEdit.cxx  |4 +-
 dbaccess/source/ui/inc/WColumnSelect.hxx|4 +-
 dbaccess/source/ui/inc/WCopyTable.hxx   |2 -
 dbaccess/source/ui/misc/WColumnSelect.cxx   |4 +-
 dbaccess/source/ui/misc/WCopyTable.cxx  |2 -
 filter/source/xmlfilterdetect/filterdetect.cxx  |6 ++--
 filter/source/xsltdialog/xmlfiltertestdialog.cxx|4 +-
 framework/inc/addonmenu.hxx |2 -
 framework/inc/uielement/menubarmerger.hxx   |2 -
 framework/inc/uielement/toolbarmerger.hxx   |2 -
 framework/source/fwe/classes/addonmenu.cxx  |7 ++---
 framework/source/inc/loadenv/targethelper.hxx   |2 -
 framework/source/loadenv/targethelper.cxx   |6 ++--
 framework/source/uielement/menubarmerger.cxx|4 +-
 framework/source/uielement/toolbarmerger.cxx|4 +-
 framework/source/uifactory/addonstoolbarfactory.cxx |7 ++---
 include/connectivity/dbtools.hxx|4 +-
 include/oox/dump/dumperbase.hxx |2 -
 include/sfx2/docfile.hxx|2 -
 include/sfx2/filedlghelper.hxx  |2 -
 include/unotools/tempfile.hxx   |2 -
 include/vcl/toolkit/field.hxx   |6 ++--
 l10ntools/source/localize.cxx   |   10 +++
 l10ntools/source/propmerge.cxx  |6 ++--
 l10ntools/source/treemerge.cxx  |6 ++--
 linguistic/source/dicimp.cxx|8 ++---
 linguistic/source/dlistimp.cxx  |6 ++--
 oox/source/dump/dumperbase.cxx  |6 ++--
 registry/source/regimpl.cxx |   14 +-
 registry/source/regimpl.hxx |2 -
 sc/inc/stringutil.hxx   |2 -
 sc/source/core/tool/stringutil.cxx  |   10 +--
 sc/source/ui/app/inputhdl.cxx   |4 +-
 sc/source/ui/docshell/docsh.cxx |2 -
 sc/source/ui/unoobj/exceldetect.cxx |4 +-
 sd/qa/unit/HtmlExportTest.cxx   |2 -
 sd/source/ui/dlg/TemplateScanner.cxx|   12 
 sfx2/source/appl/sfxhelp.cxx|2 -
 sfx2/source/dialog/filedlghelper.cxx|8 ++---
 sfx2/source/doc/docfile.cxx |6 ++--
 sfx2/source/doc/guisaveas.cxx   |4 +-
 starmath/source/edit.cxx|4 +-
 svx/source/sidebar/inspector/InspectorTextPanel.cxx |   12 +---
 sw/qa/core/uwriter.cxx  |2 -
 sw/source/filter/html/wrthtml.cxx   |6 ++--
 sw/source/filter/html/wrthtml.hxx   |2 -
 sw/source/ui/dbui/mmlayoutpage.cxx  |2 -
 sw/source/uibase/misc/glosdoc.cxx   |2 -
 sw/source/uibase/uno/unomailmerge.cxx   |2 -
 ucb/source/ucp/webdav-curl/CurlUri.cxx  |4 +-
 ucb/source/ucp/webdav-curl/CurlUri.hxx  |2 -
 ucbhelper/source/client/proxydecider.cxx|6 ++--
 unoidl/source/legacyprovider.cxx|4 +-
 unoidl/source/unoidl-check.cxx  |8 ++---
 unotools/source/ucbhelper/tempfile.cxx  |   10 +++
 vcl/source/control/field2.cxx   |   28 ++--
 xmloff/source/chart/SchXMLTableContext.cxx  |6 ++--
 xmloff/source/core/xmlmultiimagehelper.cxx  |8 ++---
 73 files changed, 204 insertions(+), 207 deletions(-)

New commits:
commit 1927b51993fb68907a75765676179b08ab195196
Author: Noel Grandin 
AuthorDate: Fri Apr 1 17:42:34 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat Apr 2 13:31:19 2022 +0200

loplugin:stringviewparam 

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

2022-03-18 Thread VaibhavMalik4187 (via logerrit)
 basctl/source/basicide/baside2.hxx  |   10 +-
 basctl/source/basicide/baside2b.cxx |   10 +-
 cui/source/tabpages/numfmt.cxx  |8 
 3 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit f433d9cf8be6507f0299492794da9ed5d749a6ad
Author: VaibhavMalik4187 
AuthorDate: Wed Mar 16 15:50:01 2022 +0530
Commit: Hossein 
CommitDate: Fri Mar 18 21:06:56 2022 +0100

tdf#114441 Convert sal_uLong to other types

Change-Id: I5651788dad4386aa325e20fa8bbfc0908dbfa629
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128767
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index 8d07cd81ddc1..f43ee79d2c4f 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -94,7 +94,7 @@ private:
 
 virtual voidNotify( SfxBroadcaster& rBC, const SfxHint& rHint ) 
override;
 
-voidImpDoHighlight( sal_uLong nLineOff );
+voidImpDoHighlight( sal_uInt32 nLineOff );
 voidImplSetFont();
 
 boolbHighlighting;
@@ -104,7 +104,7 @@ private:
 virtual css::uno::Reference< css::awt::XWindowPeer > 
GetComponentInterface(bool bCreate = true) override;
 CodeCompleteDataCache aCodeCompleteCache;
 VclPtr pCodeCompleteWnd;
-OUString GetActualSubName( sal_uLong nLine ); // gets the actual 
subroutine name according to line number
+OUString GetActualSubName( sal_uInt32 nLine ); // gets the actual 
subroutine name according to line number
 void SetupAndShowCodeCompleteWnd(const std::vector< OUString >& 
aEntryVect, TextSelection aSel );
 void HandleAutoCorrect();
 void HandleAutoCloseParen();
@@ -123,7 +123,7 @@ private:
 virtual voidLoseFocus() override;
 virtual voidRequestHelp( const HelpEvent& rHEvt ) override;
 
-voidDoSyntaxHighlight( sal_uLong nPara );
+voidDoSyntaxHighlight( sal_uInt32 nPara );
 OUStringGetWordAtCursor();
 boolImpCanModify();
 
@@ -138,8 +138,8 @@ public:
 voidCreateProgress( const OUString& rText, sal_uInt32 nRange );
 voidDestroyProgress();
 
-voidParagraphInsertedDeleted( sal_uLong nNewPara, bool 
bInserted );
-voidDoDelayedSyntaxHighlight( sal_uLong nPara );
+voidParagraphInsertedDeleted( sal_uInt32 nNewPara, bool 
bInserted );
+voidDoDelayedSyntaxHighlight( sal_uInt32 nPara );
 
 voidCreateEditEngine();
 voidSetScrollBarRanges();
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 00c5dce2f185..e15ccc3ef3ed 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1141,7 +1141,7 @@ void EditorWindow::Notify( SfxBroadcaster& /*rBC*/, const 
SfxHint& rHint )
 }
 }
 
-OUString EditorWindow::GetActualSubName( sal_uLong nLine )
+OUString EditorWindow::GetActualSubName( sal_uInt32 nLine )
 {
 SbxArrayRef pMethods = rModulWindow.GetSbModule()->GetMethods();
 for (sal_uInt32 i = 0; i < pMethods->Count(); i++)
@@ -1195,7 +1195,7 @@ void EditorWindow::InitScrollBars()
 }
 }
 
-void EditorWindow::ImpDoHighlight( sal_uLong nLine )
+void EditorWindow::ImpDoHighlight( sal_uInt32 nLine )
 {
 if ( !bDoSyntaxHighlight )
 return;
@@ -1259,7 +1259,7 @@ void EditorWindow::ImplSetFont()
 }
 }
 
-void EditorWindow::DoSyntaxHighlight( sal_uLong nPara )
+void EditorWindow::DoSyntaxHighlight( sal_uInt32 nPara )
 {
 // because of the DelayedSyntaxHighlight it's possible
 // that this line does not exist anymore!
@@ -1272,7 +1272,7 @@ void EditorWindow::DoSyntaxHighlight( sal_uLong nPara )
 }
 }
 
-void EditorWindow::DoDelayedSyntaxHighlight( sal_uLong nPara )
+void EditorWindow::DoDelayedSyntaxHighlight( sal_uInt32 nPara )
 {
 // line is only added to list, processed in TimerHdl
 // => don't manipulate breaks while EditEngine is formatting
@@ -1314,7 +1314,7 @@ IMPL_LINK_NOARG(EditorWindow, SyntaxTimerHdl, Timer *, 
void)
 bHighlighting = false;
 }
 
-void EditorWindow::ParagraphInsertedDeleted( sal_uLong nPara, bool bInserted )
+void EditorWindow::ParagraphInsertedDeleted( sal_uInt32 nPara, bool bInserted )
 {
 if ( pProgress )
 pProgress->StepProgress();
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 5ef4f7c96b96..63dc3828bb7b 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1281,10 +1281,10 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, 
weld::Button&, rIB, void)
 
 bool SvxNumberFormatTabPage::Click_Impl(const weld::Button& rIB)
 {
-sal_uLong   nReturn = 0;
-constexpr sal_uLong nReturnChanged  = 0x1;  // THE boolean return value
-constexpr sal_uLong nReturnAdded= 0x2;  // temp: format added
-constexpr 

[Libreoffice-commits] core.git: basctl/source basegfx/source basic/source compilerplugins/clang dbaccess/source desktop/source drawinglayer/source editeng/source filter/source hwpfilter/source include

2022-03-11 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/docsignature.cxx   |4 
 basctl/source/inc/docsignature.hxx|1 
 basegfx/source/curve/b2dcubicbezier.cxx   |2 
 basic/source/runtime/dllmgr-none.cxx  |2 
 basic/source/runtime/dllmgr.hxx   |2 
 basic/source/sbx/sbxdec.cxx   |4 
 basic/source/sbx/sbxdec.hxx   |2 
 compilerplugins/clang/trivialdestructor.cxx   |  133 
++
 dbaccess/source/ui/querydesign/TableFieldInfo.cxx |2 
 dbaccess/source/ui/querydesign/TableFieldInfo.hxx |1 
 desktop/source/app/cmdlineargs.cxx|2 
 desktop/source/app/cmdlineargs.hxx|1 
 drawinglayer/source/attribute/sdrglowattribute.cxx|2 
 editeng/source/editeng/eertfpar.cxx   |4 
 filter/source/msfilter/svdfppt.cxx|5 
 hwpfilter/source/htags.cxx|4 
 hwpfilter/source/htags.h  |3 
 include/basegfx/curve/b2dcubicbezier.hxx  |1 
 include/drawinglayer/attribute/sdrglowattribute.hxx   |2 
 include/editeng/editdata.hxx  |1 
 include/filter/msfilter/svdfppt.hxx   |1 
 include/jvmaccess/unovirtualmachine.hxx   |2 
 include/jvmaccess/virtualmachine.hxx  |2 
 include/oox/drawingml/chart/modelbase.hxx |1 
 include/svl/itemiter.hxx  |1 
 include/svx/colorwindow.hxx   |1 
 include/svx/dlgctl3d.hxx  |1 
 include/svx/fmobjfac.hxx  |1 
 include/svx/objfac3d.hxx  |1 
 include/svx/svdview.hxx   |1 
 include/vcl/GraphicNativeMetadata.hxx |1 
 include/vcl/GraphicNativeTransform.hxx|1 
 include/vcl/cvtgrf.hxx|1 
 include/vcl/mtfxmldump.hxx|1 
 include/vcl/toolkit/treelistbox.hxx   |1 
 include/xmloff/DashStyle.hxx  |2 
 include/xmloff/GradientStyle.hxx  |2 
 include/xmloff/HatchStyle.hxx |2 
 include/xmloff/MarkerStyle.hxx|2 
 include/xmloff/xmlnume.hxx|1 
 jvmaccess/source/unovirtualmachine.cxx|2 
 jvmaccess/source/virtualmachine.cxx   |3 
 jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx  |5 
 jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx  |1 
 lotuswordpro/inc/lwpdropcapmgr.hxx|1 
 lotuswordpro/source/filter/lwpdivopts.cxx |5 
 lotuswordpro/source/filter/lwpdivopts.hxx |2 
 lotuswordpro/source/filter/lwpdropcapmgr.cxx  |2 
 lotuswordpro/source/filter/lwpframelayout.cxx |2 
 lotuswordpro/source/filter/lwpframelayout.hxx |1 
 lotuswordpro/source/filter/lwplaypiece.cxx|9 
 lotuswordpro/source/filter/lwplaypiece.hxx|3 
 lotuswordpro/source/filter/lwpsdwfileloader.cxx   |2 
 lotuswordpro/source/filter/lwpsdwfileloader.hxx   |1 
 lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx |4 
 lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx |1 
 oox/inc/drawingml/chart/plotareamodel.hxx |2 
 oox/inc/drawingml/chart/seriesmodel.hxx   |1 
 oox/inc/drawingml/chart/titlemodel.hxx|1 
 oox/source/drawingml/chart/modelbase.cxx  |4 
 oox/source/drawingml/chart/plotareamodel.cxx  |8 
 oox/source/drawingml/chart/seriesmodel.cxx|4 
 oox/source/drawingml/chart/titlemodel.cxx |4 
 package/inc/CRC32.hxx |1 
 package/source/zipapi/CRC32.cxx   |3 
 sc/inc/compressedarray.hxx|1 
 sc/inc/dpoutputgeometry.hxx  

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

2022-02-23 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/moduldlg.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit e68faf60e59ad82fa23a0fb18bf80847788589a7
Author: Caolán McNamara 
AuthorDate: Wed Feb 23 10:41:42 2022 +
Commit: Caolán McNamara 
CommitDate: Wed Feb 23 13:51:20 2022 +0100

cid#1500494 Explicit null dereferenced

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

diff --git a/basctl/source/basicide/moduldlg.cxx 
b/basctl/source/basicide/moduldlg.cxx
index baa9faae255a..114a9e2062fa 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -843,6 +843,8 @@ void ObjectPage::DeleteCurrent()
 if (!m_xBasicBox->get_cursor(xCurEntry.get()))
 xCurEntry.reset();
 DBG_ASSERT( xCurEntry, "No current entry!" );
+if (!xCurEntry)
+return;
 EntryDescriptor aDesc( m_xBasicBox->GetEntryDescriptor( xCurEntry.get() ) 
);
 const ScriptDocument& aDocument( aDesc.GetDocument() );
 DBG_ASSERT( aDocument.isAlive(), "ObjectPage::DeleteCurrent: no document!" 
);


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

2022-02-23 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/baside2b.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 9e4825beb82ee68642eca5031ad57fc55d384256
Author: Caolán McNamara 
AuthorDate: Wed Feb 23 10:32:53 2022 +
Commit: Caolán McNamara 
CommitDate: Wed Feb 23 13:50:27 2022 +0100

cid#1500613 Dereference after null check

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

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index eb038f69d86f..00c5dce2f185 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -467,8 +467,9 @@ void EditorWindow::MouseButtonUp( const MouseEvent  )
 void EditorWindow::MouseButtonDown( const MouseEvent  )
 {
 GrabFocus();
-if ( pEditView )
-pEditView->MouseButtonDown( rEvt );
+if (!pEditView)
+return;
+pEditView->MouseButtonDown(rEvt);
 if( pCodeCompleteWnd->IsVisible() )
 {
 if (pEditView->GetSelection() != pCodeCompleteWnd->GetTextSelection())


[Libreoffice-commits] core.git: basctl/source basegfx/source basic/qa basic/source binaryurp/qa chart2/qa chart2/source codemaker/source

2022-02-06 Thread VaibhavMalik4187 (via logerrit)
 basctl/source/basicide/baside2.cxx   |2 +-
 basegfx/source/polygon/b2dpolypolygontools.cxx   |2 +-
 basic/qa/cppunit/test_vba.cxx|4 ++--
 basic/source/runtime/methods.cxx |2 +-
 basic/source/runtime/methods1.cxx|   14 +++---
 binaryurp/qa/test-cache.cxx  |2 +-
 chart2/qa/extras/chart2export.cxx|2 +-
 chart2/source/controller/dialogs/res_BarGeometry.cxx |2 +-
 chart2/source/controller/dialogs/res_DataLabel.cxx   |2 +-
 codemaker/source/cppumaker/cpputype.cxx  |   10 --
 10 files changed, 20 insertions(+), 22 deletions(-)

New commits:
commit 8b327cd86d71d71d2f5f883321e5d53e3b42ed4e
Author: VaibhavMalik4187 
AuthorDate: Fri Feb 4 17:36:52 2022 +0530
Commit: Hossein 
CommitDate: Sun Feb 6 21:38:32 2022 +0100

tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macro

Change-Id: I4f5258ca5b37e9b1b4237c5d29e4a9e5362fa855
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129116
Reviewed-by: Arkadiy Illarionov 
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 52769276bacb..eecf917d6035 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1584,7 +1584,7 @@ void ModulWindowLayout::SyntaxColors::NewConfig (bool 
bFirst)
 }
 
 bool bChanged = false;
-for (unsigned i = 0; i != SAL_N_ELEMENTS(vIds); ++i)
+for (unsigned i = 0; i != std::size(vIds); ++i)
 {
 Color const aColor = aConfig.GetColorValue(vIds[i].eEntry).nColor;
 Color& rMyColor = aColors[vIds[i].eTokenType];
diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx 
b/basegfx/source/polygon/b2dpolypolygontools.cxx
index 74cdf23241d3..b49de907d45c 100644
--- a/basegfx/source/polygon/b2dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolypolygontools.cxx
@@ -514,7 +514,7 @@ namespace basegfx::utils
 }
 
 B2DPolygon aCurrSegment;
-const size_t sliceSize=SAL_N_ELEMENTS(numbers)/12;
+const size_t sliceSize=std::size(numbers)/12;
 const int* pCurrSegment=numbers + nNumber*sliceSize;
 for( size_t i=0; i(eType) & 0x0FFF;
-const size_t nTypeNameCount = SAL_N_ELEMENTS( pTypeNames );
+const size_t nTypeNameCount = std::size( pTypeNames );
 if ( nPos >= nTypeNameCount )
 {
 nPos = nTypeNameCount - 1;
diff --git a/basic/source/runtime/methods1.cxx 
b/basic/source/runtime/methods1.cxx
index 16104540ba96..31943cde2b80 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -1807,13 +1807,13 @@ static IntervalInfo const * getIntervalInfo( const 
OUString& rStringCode )
 { INTERVAL_N,"n",1.0 /  1440.0, true  }, // Minute
 { INTERVAL_S,"s",1.0 / 86400.0, true  }  // Second
 };
-for( std::size_t i = 0; i != SAL_N_ELEMENTS(aIntervalTable); ++i )
-{
-if( rStringCode.equalsIgnoreAsciiCaseAscii(
-aIntervalTable[i].mStringCode ) )
-{
-return [i];
-}
+auto const pred = [](const IntervalInfo ) {
+return 
rStringCode.equalsIgnoreAsciiCaseAscii(aInterval.mStringCode);
+};
+
+auto intervalIter = std::find_if(std::begin(aIntervalTable), 
std::end(aIntervalTable), pred);
+if(intervalIter != std::end(aIntervalTable)) {
+return intervalIter;
 }
 return nullptr;
 }
diff --git a/binaryurp/qa/test-cache.cxx b/binaryurp/qa/test-cache.cxx
index 989b103e2e90..c024f1f711d6 100644
--- a/binaryurp/qa/test-cache.cxx
+++ b/binaryurp/qa/test-cache.cxx
@@ -39,7 +39,7 @@ private:
 // cf. jurt/test/com/sun/star/lib/uno/protocols/urp/Cache_Test.java:
 void Test::testNothingLostFromLruList() {
 int a[8];
-for (int i = 0; i != int(SAL_N_ELEMENTS(a)); ++i) {
+for (int i = 0; i != int(std::size(a)); ++i) {
 for (int j = 0; j != i; ++j) {
 a[j] = 0;
 }
diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
index a5c2e20cc58c..bca7897025a0 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -932,7 +932,7 @@ void Chart2ExportTest::testDataLabelBordersDOCX()
 { 2, css::drawing::LineStyle_SOLID, 0x00FF }  // solid red
 };
 
-for (size_t i = 0; i < SAL_N_ELEMENTS(aDataPoints); ++i)
+for (size_t i = 0; i < std::size(aDataPoints); ++i)
 {
 xPropSet = 
xDataSeries->getDataPointByIndex(aDataPoints[i].mnIndex);
 CPPUNIT_ASSERT(xPropSet.is());
diff --git a/chart2/source/controller/dialogs/res_BarGeometry.cxx 
b/chart2/source/controller/dialogs/res_BarGeometry.cxx
index 182d391aac33..97befbe1f8f5 100644
--- 

[Libreoffice-commits] core.git: basctl/source cui/source dbaccess/source extensions/source fpicker/source sc/source svx/source sw/source

2022-02-04 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/bastype3.cxx   |6 ++--
 basctl/source/basicide/moduldlg.cxx   |2 -
 cui/source/inc/cfg.hxx|2 -
 dbaccess/source/ui/browser/dsEntriesNoExp.cxx |2 -
 dbaccess/source/ui/browser/dsbrowserDnD.cxx   |2 -
 dbaccess/source/ui/control/dbtreelistbox.cxx  |4 +-
 dbaccess/source/ui/querydesign/QTableWindow.cxx   |4 +-
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |2 -
 extensions/source/propctrlr/selectlabeldialog.cxx |2 -
 fpicker/source/office/iodlgimp.hxx|2 -
 sc/source/core/tool/orcusxml.cxx  |2 -
 svx/source/dialog/ctredlin.cxx|8 ++---
 svx/source/dialog/docrecovery.cxx |8 ++---
 svx/source/form/filtnav.cxx   |   26 +-
 sw/source/ui/misc/glossary.cxx|8 ++---
 15 files changed, 40 insertions(+), 40 deletions(-)

New commits:
commit d5a43d2c0ce695a87b3ccd322c11b1d28400f2da
Author: Caolán McNamara 
AuthorDate: Fri Feb 4 14:10:50 2022 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 4 16:43:44 2022 +0100

use some more add toId/fromId

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

diff --git a/basctl/source/basicide/bastype3.cxx 
b/basctl/source/basicide/bastype3.cxx
index edf4c5bae04a..43f1b970209e 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -156,7 +156,7 @@ SbxVariable* SbTreeListBox::FindVariable(const 
weld::TreeIter* pEntry)
 do
 {
 sal_uInt16 nDepth = m_xControl->get_iter_depth(*xIter);
-Entry* pBE = 
reinterpret_cast(m_xControl->get_id(*xIter).toInt64());
+Entry* pBE = weld::fromId(m_xControl->get_id(*xIter));
 switch (nDepth)
 {
 case 4:
@@ -257,7 +257,7 @@ EntryDescriptor SbTreeListBox::GetEntryDescriptor(const 
weld::TreeIter* pEntry)
 do
 {
 sal_uInt16 nDepth = m_xControl->get_iter_depth(*xIter);
-Entry* pBE = 
reinterpret_cast(m_xControl->get_id(*xIter).toInt64());
+Entry* pBE = weld::fromId(m_xControl->get_id(*xIter));
 switch (nDepth)
 {
 case 4:
@@ -421,7 +421,7 @@ bool SbTreeListBox::FindRootEntry( const ScriptDocument& 
rDocument, LibraryLocat
 bool bValidIter = m_xControl->get_iter_first(rIter);
 while (bValidIter)
 {
-DocumentEntry* pBDEntry = 
reinterpret_cast(m_xControl->get_id(rIter).toInt64());
+DocumentEntry* pBDEntry = 
weld::fromId(m_xControl->get_id(rIter));
 if (pBDEntry && pBDEntry->GetDocument() == rDocument && 
pBDEntry->GetLocation() == eLocation)
 return true;
 bValidIter = m_xControl->iter_next_sibling(rIter);
diff --git a/basctl/source/basicide/moduldlg.cxx 
b/basctl/source/basicide/moduldlg.cxx
index 2e3c8c2530d1..baa9faae255a 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -685,7 +685,7 @@ IMPL_LINK(ObjectPage, ButtonHdl, weld::Button&, rButton, 
void)
 std::unique_ptr 
xParentEntry(m_xBasicBox->make_iterator(xCurEntry.get()));
 if (m_xBasicBox->iter_parent(*xParentEntry))
 {
-DocumentEntry* pDocumentEntry = 
reinterpret_cast(m_xBasicBox->get_id(*xParentEntry).toInt64());
+DocumentEntry* pDocumentEntry = 
weld::fromId(m_xBasicBox->get_id(*xParentEntry));
 if (pDocumentEntry)
 aDocument = pDocumentEntry->GetDocument();
 }
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 361e801d723c..7adc9c026185 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -496,7 +496,7 @@ public:
 
 SvxConfigEntry* GetTopLevelSelection()
 {
-return 
reinterpret_cast(m_xTopLevelListBox->get_active_id().toInt64());
+return 
weld::fromId(m_xTopLevelListBox->get_active_id());
 }
 
 /** identifies the module in the given frame. If the frame is , a 
default
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx 
b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
index debc3fa51a67..b31261df1b4e 100644
--- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
+++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
@@ -56,7 +56,7 @@ OUString SbaTableQueryBrowser::GetEntryText(const 
weld::TreeIter& rEntry) const
 SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType(const 
weld::TreeIter& rEntry) const
 {
 const weld::TreeView& rTreeView = m_pTreeView->GetWidget();
-DBTreeListUserData* pEntryData = 
reinterpret_cast(rTreeView.get_id(rEntry).toUInt64());
+DBTreeListUserData* pEntryData = 
weld::fromId(rTreeView.get_id(rEntry));
 return pEntryData ? pEntryData->eType : 

[Libreoffice-commits] core.git: basctl/source chart2/source cui/source dbaccess/source desktop/source extensions/source filter/source formula/source fpicker/source include/vcl reportdesign/source sc/s

2022-02-04 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/IDEComboBox.cxx|   14 
 basctl/source/basicide/baside2b.cxx   |   24 -
 basctl/source/basicide/bastype2.cxx   |8 
 basctl/source/basicide/moduldl2.cxx   |6 
 basctl/source/dlged/managelang.cxx|8 
 chart2/source/controller/dialogs/tp_DataSource.cxx|   30 -
 cui/source/customize/CommandCategoryListBox.cxx   |   43 -
 cui/source/customize/SvxMenuConfigPage.cxx|   19 
 cui/source/customize/SvxToolbarConfigPage.cxx |   57 +-
 cui/source/customize/acccfg.cxx   |   30 -
 cui/source/customize/cfg.cxx  |   38 -
 cui/source/customize/cfgutil.cxx  |   43 -
 cui/source/dialogs/cuicharmap.cxx |4 
 cui/source/dialogs/hldocntp.cxx   |   10 
 cui/source/dialogs/hlmarkwn.cxx   |   10 
 cui/source/dialogs/linkdlg.cxx|   20 
 cui/source/dialogs/scriptdlg.cxx  |   18 
 cui/source/options/dbregister.cxx |   12 
 cui/source/options/optaboutconfig.cxx |   12 
 cui/source/options/optgdlg.cxx|6 
 cui/source/options/optlingu.cxx   |   34 -
 cui/source/options/optpath.cxx|   14 
 cui/source/options/optsave.cxx|2 
 cui/source/options/treeopt.cxx|   34 -
 cui/source/tabpages/autocdlg.cxx  |   36 -
 cui/source/tabpages/swpossizetabpage.cxx  |   20 
 dbaccess/source/ui/app/AppDetailView.cxx  |8 
 dbaccess/source/ui/browser/unodatbr.cxx   |   76 
+--
 dbaccess/source/ui/misc/WColumnSelect.cxx |   14 
 dbaccess/source/ui/misc/WNameMatch.cxx|8 
 dbaccess/source/ui/misc/WTypeSelect.cxx   |   16 
 dbaccess/source/ui/querydesign/TableWindow.cxx|6 
 desktop/source/deployment/gui/dp_gui_updatedialog.cxx |   13 
 extensions/source/propctrlr/selectlabeldialog.cxx |2 
 extensions/source/propctrlr/taborder.cxx  |4 
 filter/source/xsltdialog/xmlfiltersettingsdialog.cxx  |   14 
 formula/source/ui/dlg/funcpage.cxx|   14 
 formula/source/ui/dlg/structpg.cxx|6 
 fpicker/source/office/fileview.cxx|   28 -
 fpicker/source/office/iodlgimp.cxx|2 
 include/vcl/weld.hxx  |   10 
 reportdesign/source/ui/dlg/AddField.cxx   |8 
 reportdesign/source/ui/dlg/Navigator.cxx  |   14 
 sc/source/filter/orcus/xmlcontext.cxx |2 
 sc/source/ui/cctrl/checklistmenu.cxx  |6 
 sc/source/ui/dbgui/PivotLayoutTreeList.cxx|9 
 sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx|4 
 sc/source/ui/dbgui/PivotLayoutTreeListData.cxx|   14 
 sc/source/ui/dbgui/PivotLayoutTreeListLabel.cxx   |2 
 sc/source/ui/formdlg/dwfunctr.cxx |8 
 sc/source/ui/miscdlgs/acredlin.cxx|   46 -
 sc/source/ui/miscdlgs/conflictsdlg.cxx|8 
 sc/source/ui/miscdlgs/mvtabdlg.cxx|4 
 sc/source/ui/miscdlgs/solveroptions.cxx   |8 
 sd/source/ui/animations/CustomAnimationList.cxx   |   34 -
 sd/source/ui/animations/CustomAnimationPane.cxx   |   16 
 sd/source/ui/dlg/custsdlg.cxx |8 
 sd/source/ui/dlg/sdtreelb.cxx |   10 
 sfx2/source/appl/newhelp.cxx  |   36 -
 sfx2/source/devtools/DocumentModelTreeHandler.cxx |   16 
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx   |   12 
 sfx2/source/dialog/versdlg.cxx|   10 
 sfx2/source/doc/autoredactdialog.cxx  |   13 
 

[Libreoffice-commits] core.git: basctl/source cui/source dbaccess/source extensions/source include/vcl vcl/inc vcl/source vcl/unx

2022-01-24 Thread Caolán McNamara (via logerrit)
 basctl/source/basicide/brkdlg.cxx  |6 --
 cui/source/dialogs/hangulhanjadlg.cxx  |3 -
 dbaccess/source/ui/dlg/paramdialog.cxx |   10 ---
 dbaccess/source/ui/misc/WCopyTable.cxx |4 -
 extensions/source/dbpilots/groupboxwiz.cxx |   14 +++-
 include/vcl/weld.hxx   |   11 ++-
 vcl/inc/salvtables.hxx |   16 ++---
 vcl/source/app/salvtables.cxx  |   84 -
 vcl/source/control/wizardmachine.cxx   |   14 +---
 vcl/unx/gtk3/gtkinst.cxx   |   84 ++---
 10 files changed, 136 insertions(+), 110 deletions(-)

New commits:
commit e2ff4206d60df486bf02931ce69c47857de6b04e
Author: Caolán McNamara 
AuthorDate: Mon Jan 24 11:11:05 2022 +
Commit: Caolán McNamara 
CommitDate: Mon Jan 24 15:56:59 2022 +0100

gtk4: adapt to window_[g|s]et_default_widget

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

diff --git a/basctl/source/basicide/brkdlg.cxx 
b/basctl/source/basicide/brkdlg.cxx
index 6a79d0e1da54..37ba1dbb60ae 100644
--- a/basctl/source/basicide/brkdlg.cxx
+++ b/basctl/source/basicide/brkdlg.cxx
@@ -125,16 +125,14 @@ void BreakPointDialog::CheckButtons()
 m_xNewButton->set_sensitive(true);
 m_xOKButton->set_sensitive(false);
 m_xDelButton->set_sensitive(false);
-m_xDelButton->set_has_default(false);
-m_xNewButton->set_has_default(true);
+m_xDialog->change_default_widget(m_xDelButton.get(), 
m_xNewButton.get());
 }
 else
 {
 m_xNewButton->set_sensitive(false);
 m_xOKButton->set_sensitive(true);
 m_xDelButton->set_sensitive(true);
-m_xNewButton->set_has_default(false);
-m_xDelButton->set_has_default(true);
+m_xDialog->change_default_widget(m_xNewButton.get(), 
m_xDelButton.get());
 }
 }
 
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx 
b/cui/source/dialogs/hangulhanjadlg.cxx
index cb1778329974..fb25df938e17 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -622,8 +622,7 @@ namespace svx
 pNewDefButton = m_xFind.get();
 }
 
-pOldDefButton->set_has_default(false);
-pNewDefButton->set_has_default(true);
+m_xDialog->change_default_widget(pOldDefButton, pNewDefButton);
 }
 
 OUString HangulHanjaConversionDialog::GetCurrentSuggestion( ) const
diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx 
b/dbaccess/source/ui/dlg/paramdialog.cxx
index 12f96d186f78..de3347682ed3 100644
--- a/dbaccess/source/ui/dlg/paramdialog.cxx
+++ b/dbaccess/source/ui/dlg/paramdialog.cxx
@@ -124,15 +124,10 @@ namespace dbaui
 OnEntrySelected();
 
 if (m_xAllParams->n_children() == 1)
-{
 m_xTravelNext->set_sensitive(false);
-}
 
 if (m_xAllParams->n_children() > 1)
-{
-m_xOKBtn->set_has_default(false);
-m_xTravelNext->set_has_default(true);
-}
+m_xDialog->change_default_widget(m_xOKBtn.get(), 
m_xTravelNext.get());
 }
 
 m_xParam->grab_focus();
@@ -322,8 +317,7 @@ namespace dbaui
 if (!bVisited)
 {
 // yes, there isn't another one -> change the "default button"
-m_xTravelNext->set_has_default(false);
-m_xOKBtn->set_has_default(true);
+m_xDialog->change_default_widget(m_xTravelNext.get(), 
m_xOKBtn.get());
 }
 }
 
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx 
b/dbaccess/source/ui/misc/WCopyTable.cxx
index 03458111fc73..a4f04f1aa037 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -651,9 +651,9 @@ void OCopyTableWizard::construct()
 
 if (!m_vDestColumns.empty())
 // source is a html or rtf table
-m_xNextPage->set_has_default(true);
+m_xAssistant->change_default_widget(nullptr, m_xNextPage.get());
 else
-m_xFinish->set_has_default(true);
+m_xAssistant->change_default_widget(nullptr, m_xFinish.get());
 
 m_pTypeInfo = std::make_shared();
 m_pTypeInfo->aUIName = m_sTypeNames.getToken(TYPE_OTHER, ';');
diff --git a/extensions/source/dbpilots/groupboxwiz.cxx 
b/extensions/source/dbpilots/groupboxwiz.cxx
index ead0e4a4e48e..a093d9154b22 100644
--- a/extensions/source/dbpilots/groupboxwiz.cxx
+++ b/extensions/source/dbpilots/groupboxwiz.cxx
@@ -280,17 +280,21 @@ namespace dbp
 m_xMoveLeft->set_sensitive(bSelectedSome);
 m_xMoveRight->set_sensitive(bUnfinishedInput);
 
-getDialog()->enableButtons(WizardButtonFlags::NEXT, bHaveSome);
+OControlWizard* pDialogController = getDialog();
+
+pDialogController->enableButtons(WizardButtonFlags::NEXT, bHaveSome);
+
+ 

[Libreoffice-commits] core.git: basctl/source basegfx/source UnoControls/source

2022-01-18 Thread VaibhavMalik4187 (via logerrit)
 UnoControls/source/base/basecontrol.cxx|   14 +++---
 UnoControls/source/inc/progressbar.hxx |   24 +---
 UnoControls/source/inc/statusindicator.hxx |   14 +++---
 basctl/source/inc/bastypes.hxx |4 ++--
 basctl/source/inc/dlged.hxx|5 ++---
 basegfx/source/workbench/bezierclip.hxx|2 +-
 6 files changed, 32 insertions(+), 31 deletions(-)

New commits:
commit 40bab1e31c7865f8c45883b8e4b684c0134b9191
Author: VaibhavMalik4187 
AuthorDate: Tue Jan 18 19:26:35 2022 +0530
Commit: Hossein 
CommitDate: Wed Jan 19 06:55:12 2022 +0100

tdf#145614 Convert #define to enum or constexpr

Change-Id: Ib6694ec77c275c9a604abfa7d87df6ab262449b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128250
Tested-by: Hossein 
Reviewed-by: Hossein 

diff --git a/UnoControls/source/base/basecontrol.cxx 
b/UnoControls/source/base/basecontrol.cxx
index da80678307b7..c2e2f23b12b0 100644
--- a/UnoControls/source/base/basecontrol.cxx
+++ b/UnoControls/source/base/basecontrol.cxx
@@ -38,13 +38,13 @@ using namespace ::com::sun::star::awt;
 
 namespace unocontrols {
 
-#define DEFAULT_X   0
-#define DEFAULT_Y   0
-#define DEFAULT_WIDTH   100
-#define DEFAULT_HEIGHT  100
-#define DEFAULT_VISIBLE false
-#define DEFAULT_INDESIGNMODEfalse
-#define DEFAULT_ENABLE  true
+constexpr sal_Int32 DEFAULT_X = 0;
+constexpr sal_Int32 DEFAULT_Y = 0;
+constexpr sal_Int32 DEFAULT_WIDTH = 100;
+constexpr sal_Int32 DEFAULT_HEIGHT = 100;
+constexpr bool DEFAULT_VISIBLE = false;
+constexpr bool DEFAULT_INDESIGNMODE = false;
+constexpr bool DEFAULT_ENABLE = true;
 
 //  construct/destruct
 
diff --git a/UnoControls/source/inc/progressbar.hxx 
b/UnoControls/source/inc/progressbar.hxx
index dca88b90c4b4..d31758b1cff9 100644
--- a/UnoControls/source/inc/progressbar.hxx
+++ b/UnoControls/source/inc/progressbar.hxx
@@ -21,23 +21,25 @@
 
 #include 
 
+#include 
+
 #include 
 
 #include 
 
 namespace unocontrols {
 
-#define PROGRESSBAR_FREESPACE   4
-#define PROGRESSBAR_DEFAULT_HORIZONTAL  true
-#define PROGRESSBAR_DEFAULT_BLOCKDIMENSION  Size(1,1)
-#define PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR Color( 0xC0, 0xC0, 0xC0 ) // 
lightgray
-#define PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR Color( 0x00, 0x00, 0x80 ) // blue
-#define PROGRESSBAR_DEFAULT_MINRANGEINT_MIN
-#define PROGRESSBAR_DEFAULT_MAXRANGEINT_MAX
-#define PROGRESSBAR_DEFAULT_BLOCKVALUE  1
-#define PROGRESSBAR_DEFAULT_VALUE   PROGRESSBAR_DEFAULT_MINRANGE
-#define PROGRESSBAR_LINECOLOR_BRIGHTsal_Int32(Color( 0xFF, 0xFF, 0xFF 
)) // white
-#define PROGRESSBAR_LINECOLOR_SHADOWsal_Int32(Color( 0x00, 0x00, 0x00 
)) // black
+#define PROGRESSBAR_DEFAULT_BLOCKDIMENSION Size(1,1)
+constexpr Color PROGRESSBAR_DEFAULT_FOREGROUNDCOLOR = COL_BLUE;
+constexpr Color PROGRESSBAR_DEFAULT_BACKGROUNDCOLOR = COL_LIGHTGRAY;
+constexpr bool PROGRESSBAR_DEFAULT_HORIZONTAL = true;
+constexpr auto PROGRESSBAR_FREESPACE = 4;
+constexpr auto PROGRESSBAR_DEFAULT_MINRANGE = INT_MIN;
+constexpr auto PROGRESSBAR_DEFAULT_MAXRANGE = INT_MAX;
+constexpr auto PROGRESSBAR_DEFAULT_VALUE = INT_MIN;
+constexpr auto PROGRESSBAR_DEFAULT_BLOCKVALUE = 1;
+constexpr sal_Int32 PROGRESSBAR_LINECOLOR_BRIGHT = sal_Int32(COL_WHITE);
+constexpr sal_Int32 PROGRESSBAR_LINECOLOR_SHADOW = sal_Int32(COL_BLACK);
 
 class ProgressBar final : public css::awt::XControlModel
 , public css::awt::XProgressBar
diff --git a/UnoControls/source/inc/statusindicator.hxx 
b/UnoControls/source/inc/statusindicator.hxx
index e1930e9da808..34bce92bee85 100644
--- a/UnoControls/source/inc/statusindicator.hxx
+++ b/UnoControls/source/inc/statusindicator.hxx
@@ -22,7 +22,7 @@
 #include 
 #include 
 #include 
-
+#include 
 #include 
 
 namespace com::sun::star::awt { class XControlModel; }
@@ -35,12 +35,12 @@ namespace unocontrols {
 
 class ProgressBar;
 
-#define STATUSINDICATOR_FREEBORDER  5  
 // border around and between the controls
-#define STATUSINDICATOR_BACKGROUNDCOLOR sal_Int32(Color( 0xC0, 0xC0, 
0xC0 ))  // lightgray
-#define STATUSINDICATOR_LINECOLOR_BRIGHTsal_Int32(Color( 0xFF, 0xFF, 
0xFF ))  // white
-#define STATUSINDICATOR_LINECOLOR_SHADOWsal_Int32(Color( 0x00, 0x00, 
0x00 ))  // black
-#define STATUSINDICATOR_DEFAULT_WIDTH   300
-#define STATUSINDICATOR_DEFAULT_HEIGHT  25
+constexpr auto  STATUSINDICATOR_FREEBORDER = 5; // border around and between 
the controls
+constexpr auto STATUSINDICATOR_DEFAULT_WIDTH = 300;
+constexpr auto STATUSINDICATOR_DEFAULT_HEIGHT = 25;
+constexpr sal_Int32 STATUSINDICATOR_BACKGROUNDCOLOR = sal_Int32(COL_LIGHTGRAY);
+constexpr sal_Int32 

[Libreoffice-commits] core.git: basctl/source chart2/source cui/source filter/source include/filter include/svx oox/source reportdesign/inc reportdesign/source sc/inc sc/qa sc/source sd/inc sd/qa sd/s

2022-01-07 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside3.cxx   |   68 ++--
 basctl/source/dlged/dlged.cxx|2 
 basctl/source/dlged/dlgedfac.cxx |   72 ++--
 basctl/source/dlged/dlgedobj.cxx |   48 +--
 chart2/source/controller/main/ChartController_Tools.cxx  |6 
 chart2/source/controller/main/ChartController_Window.cxx |   18 -
 chart2/source/controller/main/DrawCommandDispatch.cxx|   22 -
 chart2/source/controller/main/ShapeController.cxx|2 
 chart2/source/view/main/ShapeFactory.cxx |   48 +--
 chart2/source/view/main/VButton.cxx  |2 
 cui/source/tabpages/swpossizetabpage.cxx |2 
 cui/source/tabpages/tabline.cxx  |   12 
 cui/source/tabpages/textanim.cxx |2 
 cui/source/tabpages/textattr.cxx |   14 
 cui/source/tabpages/transfrm.cxx |2 
 filter/source/msfilter/msdffimp.cxx  |   45 +-
 filter/source/msfilter/svdfppt.cxx   |   20 -
 include/filter/msfilter/msdffimp.hxx |2 
 include/svx/fmtools.hxx  |4 
 include/svx/sidebar/SelectionAnalyzer.hxx|   13 
 include/svx/svdedxv.hxx  |2 
 include/svx/svdobjkind.hxx   |  219 +++---
 include/svx/svdopath.hxx |8 
 include/svx/svdotext.hxx |8 
 include/svx/unoapi.hxx   |3 
 include/svx/unopage.hxx  |2 
 include/svx/unoprov.hxx  |   15 
 include/svx/unoshape.hxx |4 
 oox/source/export/drawingml.cxx  |2 
 reportdesign/inc/RptDef.hxx  |2 
 reportdesign/source/core/sdr/ReportDrawPage.cxx  |4 
 reportdesign/source/core/sdr/RptObject.cxx   |   52 +--
 reportdesign/source/ui/inc/DesignView.hxx|2 
 reportdesign/source/ui/inc/ReportController.hxx  |2 
 reportdesign/source/ui/inc/ReportSection.hxx |2 
 reportdesign/source/ui/inc/ReportWindow.hxx  |2 
 reportdesign/source/ui/inc/ScrollHelper.hxx  |2 
 reportdesign/source/ui/inc/ViewsWindow.hxx   |2 
 reportdesign/source/ui/misc/UITools.cxx  |2 
 reportdesign/source/ui/report/DesignView.cxx |6 
 reportdesign/source/ui/report/ReportController.cxx   |   58 +--
 reportdesign/source/ui/report/ReportSection.cxx  |4 
 reportdesign/source/ui/report/ReportWindow.cxx   |2 
 reportdesign/source/ui/report/ScrollHelper.cxx   |2 
 reportdesign/source/ui/report/ViewsWindow.cxx|2 
 reportdesign/source/ui/report/dlgedfac.cxx   |   28 -
 reportdesign/source/ui/report/dlgedfunc.cxx  |   12 
 sc/inc/drwlayer.hxx  |3 
 sc/qa/unit/helper/qahelper.cxx   |2 
 sc/qa/unit/scshapetest.cxx   |6 
 sc/qa/unit/ucalc.cxx |2 
 sc/source/core/data/documen5.cxx |   14 
 sc/source/core/data/documen9.cxx |4 
 sc/source/core/data/drwlayer.cxx |   28 -
 sc/source/core/tool/charthelper.cxx  |   14 
 sc/source/core/tool/detfunc.cxx  |4 
 sc/source/filter/excel/xeescher.cxx  |2 
 sc/source/filter/excel/xiescher.cxx  |4 
 sc/source/filter/html/htmlexp2.cxx   |4 
 sc/source/filter/xcl97/xcl97esc.cxx  |   14 
 sc/source/filter/xcl97/xcl97rec.cxx  |6 
 sc/source/filter/xml/xmlexprt.cxx|2 
 sc/source/ui/app/client.cxx  |2 
 sc/source/ui/app/drwtrans.cxx|   10 
 sc/source/ui/app/seltrans.cxx|6 
 sc/source/ui/drawfunc/drawsh.cxx |2 
 sc/source/ui/drawfunc/drawsh2.cxx|   22 -
 sc/source/ui/drawfunc/drawsh5.cxx|8 
 sc/source/ui/drawfunc/fuconarc.cxx   |8 
 sc/source/ui/drawfunc/fuconcustomshape.cxx   |2 
 sc/source/ui/drawfunc/fuconpol.cxx   |   14 
 sc/source/ui/drawfunc/fuconrec.cxx   |   14 
 sc/source/ui/drawfunc/fuconuno.cxx   |2 
 sc/source/ui/drawfunc/fupoor.cxx |8 
 sc/source/ui/drawfunc/fusel.cxx  |4 
 

[Libreoffice-commits] core.git: basctl/source chart2/source comphelper/source dbaccess/source desktop/source filter/source i18npool/source i18nutil/source linguistic/source sc/source sfx2/source svl/s

2021-12-26 Thread Mike Kaganski (via logerrit)
 basctl/source/basicide/baside2b.cxx   |8 +--
 chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx  |2 
 chart2/source/tools/PolynomialRegressionCurveCalculator.cxx   |2 
 comphelper/source/misc/docpasswordhelper.cxx  |2 
 dbaccess/source/core/api/OptimisticSet.cxx|   14 +++---
 dbaccess/source/core/recovery/settingsimport.cxx  |4 -
 desktop/source/app/crashreport.cxx|2 
 desktop/source/migration/migration.cxx|2 
 filter/source/xsltfilter/OleHandler.cxx   |4 -
 i18npool/source/characterclassification/cclass_unicode_parser.cxx |2 
 i18nutil/source/utility/unicode.cxx   |2 
 linguistic/source/hyphdsp.cxx |   23 
+++---
 sc/source/core/tool/calcconfig.cxx|2 
 sc/source/filter/dif/difimp.cxx   |5 --
 sc/source/filter/html/htmlimp.cxx |7 +--
 sc/source/ui/docshell/docfunc.cxx |2 
 sc/source/ui/view/editsh.cxx  |5 +-
 sfx2/source/control/emojicontrol.cxx  |6 +-
 sfx2/source/control/emojiviewitem.cxx |6 +-
 svl/source/numbers/zforlist.cxx   |4 -
 svl/source/numbers/zformat.cxx|2 
 sw/source/core/crsr/crstrvl.cxx   |2 
 tools/source/fsys/urlobj.cxx  |4 -
 vcl/source/control/edit.cxx   |   10 ++--
 vcl/source/control/field2.cxx |   12 +++--
 xmloff/source/draw/ximpcustomshape.cxx|2 
 xmloff/source/style/xmlnumfi.cxx  |5 --
 27 files changed, 69 insertions(+), 72 deletions(-)

New commits:
commit a23a7eea5cfcdc50d09be248828cb1e6293e5ebb
Author: Mike Kaganski 
AuthorDate: Sun Dec 26 10:03:40 2021 +0100
Commit: Mike Kaganski 
CommitDate: Sun Dec 26 20:36:26 2021 +0100

Avoid OUStringBuffer::toString where possible

Change-Id: I99abbe97a48b2077e28d6221fb70036e5e412657
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127479
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 54be8d956b64..9671d149ca2b 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2591,7 +2591,7 @@ void CodeCompleteWindow::SetMatchingEntries()
 for (sal_Int32 i = 0, nEntryCount = m_xListBox->n_children(); i< 
nEntryCount; ++i)
 {
 OUString sEntry = m_xListBox->get_text(i);
-if (sEntry.startsWithIgnoreAsciiCase(aFuncBuffer.toString()))
+if (sEntry.startsWithIgnoreAsciiCase(aFuncBuffer))
 {
 m_xListBox->select(i);
 break;
@@ -2657,8 +2657,8 @@ bool CodeCompleteWindow::HandleKeyInput( const KeyEvent& 
rKeyEvt )
 for (sal_Int32 i = nInd; i != nEntryCount; ++i)
 {
 OUString sEntry = m_xListBox->get_text(i);
-if( sEntry.startsWithIgnoreAsciiCase( 
aFuncBuffer.toString() )
-&& (aFuncBuffer.toString() != sTypedText) && 
(i != nInd) )
+if( sEntry.startsWithIgnoreAsciiCase( aFuncBuffer )
+&& (std::u16string_view(aFuncBuffer) != 
sTypedText) && (i != nInd) )
 {
 m_xListBox->select(i);
 bFound = true;
@@ -2688,7 +2688,7 @@ bool CodeCompleteWindow::HandleKeyInput( const KeyEvent& 
rKeyEvt )
 OUString aTabInsertedStr( 
GetParentEditView()->GetSelected() );
 GetParentEditView()->SetSelection( aSel );
 
-if( !aTabInsertedStr.isEmpty() && aTabInsertedStr != 
aFuncBuffer.toString() )
+if( !aTabInsertedStr.isEmpty() && aTabInsertedStr != 
std::u16string_view(aFuncBuffer) )
 {
 aFuncBuffer = aTabInsertedStr;
 }
diff --git a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx 
b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
index 58b0a66da1d1..ffd1808dfd22 100644
--- a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
@@ -175,7 +175,7 @@ OUString 
LogarithmicRegressionCurveCalculator::ImplGetRepresentation(
 addStringToEquation( aBuf, nLineLength, aTmpBuf, pFormulaMaxWidth );
 }
 
-  

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

2021-12-19 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside2.hxx  |3 ++-
 basctl/source/basicide/baside2b.cxx |6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit a5e270ba999050b97c7ff50339dd649547057d54
Author: Noel Grandin 
AuthorDate: Fri Dec 17 18:51:36 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Dec 19 12:53:48 2021 +0100

osl::Mutex->std::mutex in EditorWindow

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

diff --git a/basctl/source/basicide/baside2.hxx 
b/basctl/source/basicide/baside2.hxx
index e59c148bc3b5..8d07cd81ddc1 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -20,6 +20,7 @@
 #pragma once
 
 #include 
+#include 
 #include 
 #include "breakpoint.hxx"
 #include "linenumberwindow.hxx"
@@ -73,7 +74,7 @@ private:
 ModulWindow& rModulWindow;
 
 rtl::Reference< ChangesListener > listener_;
-osl::Mutexmutex_;
+std::mutexmutex_;
 css::uno::Reference< css::beans::XMultiPropertySet >
   notifier_;
 
diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 9da55fa318a8..54be8d956b64 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -202,7 +202,7 @@ private:
 
 virtual void SAL_CALL disposing(lang::EventObject const &) override
 {
-osl::MutexGuard g(editor_.mutex_);
+std::unique_lock g(editor_.mutex_);
 editor_.notifier_.clear();
 }
 
@@ -255,7 +255,7 @@ EditorWindow::EditorWindow (vcl::Window* pParent, 
ModulWindow* pModulWindow) :
 officecfg::Office::Common::Font::SourceViewFont::get(),
 UNO_QUERY_THROW);
 {
-osl::MutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 notifier_ = n;
 }
 const Sequence aPropertyNames{"FontHeight", "FontName"};
@@ -278,7 +278,7 @@ void EditorWindow::dispose()
 
 Reference< beans::XMultiPropertySet > n;
 {
-osl::MutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 n = notifier_;
 }
 if (n.is()) {


[Libreoffice-commits] core.git: basctl/source chart2/source extensions/source include/comphelper include/o3tl include/xmloff sc/source sd/qa sd/source sfx2/source

2021-12-06 Thread Stephan Bergmann (via logerrit)
 basctl/source/basicide/macrodlg.cxx|2 +-
 chart2/source/controller/sidebar/ChartColorWrapper.cxx |1 +
 extensions/source/bibliography/general.cxx |1 +
 include/comphelper/scopeguard.hxx  |4 +++-
 include/o3tl/deleter.hxx   |   11 +--
 include/xmloff/xmlictxt.hxx|1 +
 sc/source/core/data/table2.cxx |1 +
 sc/source/core/tool/autoform.cxx   |1 +
 sc/source/filter/excel/xepivotxml.cxx  |1 +
 sc/source/filter/html/htmlpars.cxx |1 +
 sc/source/ui/view/gridwin.cxx  |1 +
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |1 +
 sd/source/ui/dlg/sdtreelb.cxx  |1 +
 sfx2/source/appl/workwin.cxx   |2 +-
 14 files changed, 16 insertions(+), 13 deletions(-)

New commits:
commit 0a710c5c4475b593428c6d90e791ef2ccc880062
Author: Stephan Bergmann 
AuthorDate: Mon Dec 6 09:55:45 2021 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Dec 6 14:25:41 2021 +0100

cid#1494595,1494597: Silence UNCAUGHT_EXCEPT

...after aa5ee0085c7d8b8713f4dbed0009b38b9fabb281 "Stop swallowing 
exceptions in
~ScopeGuard" had dropped the catch blocks from ~ScopeGuard to make it 
usable in
Library_salhelper in 0c1c300ed7ce168755ae945822eb7a1c610cfa25 "Rather use
ScopeGuard to prevent catch and rethrow".  But using the original
suppress_fun_call_w_exception, which used css::uno::Exception, would have 
caused
the same circular-dependency issue again that
aa5ee0085c7d8b8713f4dbed0009b38b9fabb281 had solved, so drop the use of
css::uno::Exception (and SAL_WARN, which triggered a number of missing 
#include
) also from suppress_fun_call_w_exception.  After all, that was
__COVERITY__-only code that wasn't meant to be actually run, so it shouldn't
matter if we just catch everything and silently terminate.

Change-Id: If28a214709e4636e1c23a49f2d95d87c91492f14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126404
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/basctl/source/basicide/macrodlg.cxx 
b/basctl/source/basicide/macrodlg.cxx
index 511abf83591e..dbeaf396f3f3 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -31,7 +31,7 @@
 #include 
 #include 
 #include 
-
+#include 
 #include 
 #include 
 #include 
diff --git a/chart2/source/controller/sidebar/ChartColorWrapper.cxx 
b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
index 613407a827e7..9340ed1c2028 100644
--- a/chart2/source/controller/sidebar/ChartColorWrapper.cxx
+++ b/chart2/source/controller/sidebar/ChartColorWrapper.cxx
@@ -27,6 +27,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
diff --git a/extensions/source/bibliography/general.cxx 
b/extensions/source/bibliography/general.cxx
index 5fd46955c54a..4307d9f206d2 100644
--- a/extensions/source/bibliography/general.cxx
+++ b/extensions/source/bibliography/general.cxx
@@ -29,6 +29,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/include/comphelper/scopeguard.hxx 
b/include/comphelper/scopeguard.hxx
index 72ae4a699d16..95832c505bf2 100644
--- a/include/comphelper/scopeguard.hxx
+++ b/include/comphelper/scopeguard.hxx
@@ -24,6 +24,8 @@
 
 #include 
 
+#include 
+
 // For some reason, Android buildbot issues -Werror like this:
 //   In file included from
 //   
/home/android/lo/master-android-arm/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx:50:
@@ -60,7 +62,7 @@ public:
 {
 if (m_bDismissed)
 return;
-m_func();
+suppress_fun_call_w_exception(m_func());
 }
 
 /** Dismisses the scope guard, i.e. the function won't
diff --git a/include/o3tl/deleter.hxx b/include/o3tl/deleter.hxx
index ed8b1a583094..96f9b4b49274 100644
--- a/include/o3tl/deleter.hxx
+++ b/include/o3tl/deleter.hxx
@@ -14,9 +14,6 @@
 
 #include 
 
-#include 
-#include 
-
 #if defined(__COVERITY__)
 #define suppress_fun_call_w_exception(expr)
\
 do 
\
@@ -25,14 +22,8 @@
 {  
\
 expr;  
\
 }  
\
-catch (const css::uno::Exception& ex)  
\
-{  
\
-SAL_WARN("vcl.app", "Fatal exception: " << exceptionToString(ex)); 
   

[Libreoffice-commits] core.git: basctl/source basic/source chart2/source comphelper/source connectivity/source cui/source dbaccess/source editeng/inc editeng/qa editeng/source extensions/source forms/

2021-11-23 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside2b.cxx  |6 -
 basic/source/runtime/runtime.cxx |2 
 chart2/source/inc/CommonConverters.hxx   |2 
 chart2/source/tools/CommonConverters.cxx |2 
 comphelper/source/misc/logging.cxx   |2 
 comphelper/source/misc/string.cxx|2 
 connectivity/source/commontools/DateConversion.cxx   |2 
 connectivity/source/commontools/dbtools2.cxx |4 
 connectivity/source/commontools/predicateinput.cxx   |2 
 connectivity/source/drivers/dbase/DTable.cxx |2 
 connectivity/source/drivers/firebird/Tables.cxx  |2 
 connectivity/source/drivers/firebird/Util.cxx|2 
 connectivity/source/drivers/flat/ETable.cxx  |2 
 connectivity/source/drivers/hsqldb/HTable.cxx|2 
 connectivity/source/drivers/mysql_jdbc/YTable.cxx|2 
 connectivity/source/drivers/mysql_jdbc/YTables.cxx   |2 
 connectivity/source/parse/sqlnode.cxx|8 -
 connectivity/source/resource/sharedresources.cxx |2 
 cui/source/customize/cfg.cxx |4 
 cui/source/dialogs/about.cxx |2 
 cui/source/dialogs/hyphen.cxx|4 
 cui/source/dialogs/scriptdlg.cxx |   12 +-
 cui/source/tabpages/numfmt.cxx   |6 -
 dbaccess/source/filter/hsqldb/utils.cxx  |2 
 dbaccess/source/ui/dlg/dbwizsetup.cxx|2 
 dbaccess/source/ui/querydesign/QueryDesignView.cxx   |6 -
 editeng/inc/editdoc.hxx  |2 
 editeng/qa/unit/core-test.cxx|2 
 editeng/source/editeng/editdoc.cxx   |8 -
 editeng/source/editeng/eehtml.cxx|2 
 editeng/source/editeng/impedit2.cxx  |6 -
 extensions/source/abpilot/abpfinalpage.cxx   |2 
 forms/source/component/Edit.cxx  |2 
 formula/source/core/api/FormulaCompiler.cxx  |   10 +-
 framework/source/uielement/fontmenucontroller.cxx|2 
 i18npool/source/inputchecker/inputsequencechecker.cxx|2 
 i18npool/source/inputchecker/inputsequencechecker_hi.cxx |2 
 i18npool/source/inputchecker/inputsequencechecker_th.cxx |   10 +-
 include/comphelper/string.hxx|2 
 include/rtl/string.h |5 +
 include/rtl/string.hxx   |   12 ++
 include/rtl/ustring.h|5 +
 include/rtl/ustring.hxx  |   12 ++
 oox/source/drawingml/chart/chartconverter.cxx|2 
 oox/source/ole/vbaexport.cxx |2 
 reportdesign/source/core/api/Group.cxx   |4 
 reportdesign/source/core/api/ReportDefinition.cxx|   10 +-
 reportdesign/source/core/api/Section.cxx |4 
 reportdesign/source/core/api/Tools.cxx   |2 
 reportdesign/source/core/inc/Tools.hxx   |2 
 reportdesign/source/filter/xml/xmlExport.cxx |2 
 reportdesign/source/filter/xml/xmlGroup.cxx  |2 
 reportdesign/source/ui/dlg/Formula.cxx   |2 
 sal/rtl/bootstrap.cxx|2 
 sal/rtl/string.cxx   |   36 +++
 sal/rtl/strtmpl.hxx  |   74 +++
 sal/rtl/ustring.cxx  |7 +
 sal/util/sal.map |6 +
 sc/qa/unit/subsequent_export_test2.cxx   |4 
 sc/source/core/data/global2.cxx  |2 
 sc/source/core/tool/address.cxx  |2 
 sc/source/core/tool/compiler.cxx |6 -
 sc/source/core/tool/interpr1.cxx |   10 +-
 sc/source/core/tool/rangenam.cxx |2 
 sc/source/core/tool/rangeutl.cxx |2 
 sc/source/filter/dif/difexp.cxx  |2 
 sc/source/filter/excel/xecontent.cxx |4 
 sc/source/filter/excel/xicontent.cxx |2 
 sc/source/filter/excel/xiescher.cxx  |2 
 sc/source/filter/ftools/ftools.cxx   |4 
 sc/source/filter/oox/formulabase.cxx |2 
 sc/source/filter/oox/worksheetbuffer.cxx |2 
 sc/source/filter/oox/worksheethelper.cxx |2 
 sc/source/ui/Accessibility/AccessibleCell.cxx|   12 +-
 sc/source/ui/app/inputhdl.cxx|4 

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

2021-11-17 Thread Heiko Tietze (via logerrit)
 basctl/source/basicide/linenumberwindow.cxx |4 +++-
 basctl/source/basicide/linenumberwindow.hxx |1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f0334d62da608e140073e8831fdbbd0b5e4b1e39
Author: Heiko Tietze 
AuthorDate: Wed Nov 17 15:38:02 2021 +0100
Commit: Heiko Tietze 
CommitDate: Thu Nov 18 07:02:26 2021 +0100

Resolves tdf#143462 - Fixes black row number on dark backgroud in Basic IDE

Using WindowColor for background and WindowTextColor for font color now

Change-Id: Ie7bcb66d43673722ac882ac3cd59c7d9106f3020
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125403
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/basctl/source/basicide/linenumberwindow.cxx 
b/basctl/source/basicide/linenumberwindow.cxx
index be9fe3752045..7dcbff0ddd7f 100644
--- a/basctl/source/basicide/linenumberwindow.cxx
+++ b/basctl/source/basicide/linenumberwindow.cxx
@@ -21,7 +21,8 @@ LineNumberWindow::LineNumberWindow(vcl::Window* pParent, 
ModulWindow* pModulWind
 , m_pModulWindow(pModulWindow)
 , m_nCurYOffset(0)
 {
-SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetFieldColor()));
+
SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetWindowColor()));
+m_FontColor = GetSettings().GetStyleSettings().GetWindowTextColor();
 m_nBaseWidth = GetTextWidth("8");
 m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2;
 }
@@ -78,6 +79,7 @@ void LineNumberWindow::Paint(vcl::RenderContext& 
rRenderContext, const tools::Re
 }
 
 sal_Int64 y = (nStartLine - 1) * static_cast(nLineHeight);
+rRenderContext.SetTextColor(m_FontColor);
 for (sal_uInt32 n = nStartLine; n <= nEndLine; ++n, y += nLineHeight)
 rRenderContext.DrawText(Point(0, y - m_nCurYOffset), 
OUString::number(n));
 }
diff --git a/basctl/source/basicide/linenumberwindow.hxx 
b/basctl/source/basicide/linenumberwindow.hxx
index 14305116ef10..a2e457f71103 100644
--- a/basctl/source/basicide/linenumberwindow.hxx
+++ b/basctl/source/basicide/linenumberwindow.hxx
@@ -22,6 +22,7 @@ private:
 int m_nWidth;
 tools::Long m_nCurYOffset;
 int m_nBaseWidth;
+Color m_FontColor;
 virtual void DataChanged(DataChangedEvent const& rDCEvt) override;
 
 protected:


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

2021-11-03 Thread Noel Grandin (via logerrit)
 basctl/source/inc/IDEComboBox.hxx   |   14 --
 basctl/source/inc/ObjectCatalog.hxx |2 +-
 basctl/source/inc/baside3.hxx   |   17 -
 basctl/source/inc/basidectrlr.hxx   |4 ++--
 basctl/source/inc/basidesh.hxx  |2 +-
 basctl/source/inc/bastype2.hxx  |7 ---
 basctl/source/inc/bastypes.hxx  |3 ++-
 basctl/source/inc/dlged.hxx |4 ++--
 basctl/source/inc/dlgedfunc.hxx |4 ++--
 basctl/source/inc/dlgedlist.hxx |4 ++--
 basctl/source/inc/dlgedmod.hxx  |2 +-
 basctl/source/inc/dlgedobj.hxx  |6 +-
 basctl/source/inc/dlgedview.hxx |4 ++--
 basctl/source/inc/managelang.hxx|4 ++--
 basctl/source/inc/sbxitem.hxx   |2 +-
 15 files changed, 47 insertions(+), 32 deletions(-)

New commits:
commit b64efd7b291cfb231ab511ec80db2d12b30ac05d
Author: Noel Grandin 
AuthorDate: Wed Nov 3 13:49:58 2021 +0100
Commit: Noel Grandin 
CommitDate: Wed Nov 3 20:06:23 2021 +0100

Revert "loplugin:finalclasses"

This reverts commit 9ce9011230a97f3fe4fcd2f8d761781c4300772b.

Reason for revert: see comments in 
https://gerrit.libreoffice.org/c/core/+/124632

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

diff --git a/basctl/source/inc/IDEComboBox.hxx 
b/basctl/source/inc/IDEComboBox.hxx
index 5c5fdfc8385b..a5e7008a42e9 100644
--- a/basctl/source/inc/IDEComboBox.hxx
+++ b/basctl/source/inc/IDEComboBox.hxx
@@ -33,7 +33,7 @@ namespace basctl
  *
  * @see LibBox Class
  */
-class LibBoxControl final : public SfxToolBoxControl
+class LibBoxControl : public SfxToolBoxControl
 {
 public:
 /*!
@@ -121,7 +121,7 @@ public:
  *
  * @see LibBoxControl Class
  */
-class LibBox final : public DocListenerBox
+class LibBox : public DocListenerBox
 {
 public:
 /// @param pParent
@@ -136,10 +136,11 @@ public:
  */
 void Update(const SfxStringItem* pItem);
 
-private:
+protected:
 /// Called for setting language when user selects a language in ComboBox
 virtual void Select() override;
 
+private:
 static void ReleaseFocus();
 
 /*!
@@ -177,7 +178,7 @@ private:
  *
  * @see LanguageBox Class
  */
-class LanguageBoxControl final : public SfxToolBoxControl
+class LanguageBoxControl : public SfxToolBoxControl
 {
 public:
 /*! Macro for registering two methods
@@ -220,7 +221,7 @@ public:
  *
  * @see LanguageBoxControl Class
  */
-class LanguageBox final : public DocListenerBox
+class LanguageBox : public DocListenerBox
 {
 public:
 /*!
@@ -237,7 +238,7 @@ public:
  */
 void Update(const SfxStringItem* pItem);
 
-private:
+protected:
 /// Called for setting language when user selects a language in ComboBox
 virtual void Select() override;
 
@@ -249,6 +250,7 @@ private:
  */
 virtual bool HandleKeyInput(const KeyEvent& rKEvt) override;
 
+private:
 /// Delete all languages from ComboBox
 void ClearBox();
 /// Switch interface of dialog to selected language
diff --git a/basctl/source/inc/ObjectCatalog.hxx 
b/basctl/source/inc/ObjectCatalog.hxx
index 8ea0cd023b67..a5b63eef424a 100644
--- a/basctl/source/inc/ObjectCatalog.hxx
+++ b/basctl/source/inc/ObjectCatalog.hxx
@@ -33,7 +33,7 @@ namespace basctl
  *  in a tree structure which allows user to quickly select the necessary
  *  macro in BasicIDE.
  */
-class ObjectCatalog final : public DockingWindow
+class ObjectCatalog : public DockingWindow
 {
 public:
 explicit ObjectCatalog(vcl::Window* pParent);
diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx
index 3eef27cd2f63..f5d367182d0a 100644
--- a/basctl/source/inc/baside3.hxx
+++ b/basctl/source/inc/baside3.hxx
@@ -45,13 +45,15 @@ class ObjectCatalog;
 
 bool implImportDialog(weld::Window* pWin, const ScriptDocument& rDocument, 
const OUString& rLibName);
 
-class DialogWindow final : public BaseWindow
+class DialogWindow: public BaseWindow
 {
+private:
 DialogWindowLayout& m_rLayout;
 std::unique_ptr m_pEditor;
 std::unique_ptr m_pUndoMgr; // never nullptr
 sal_uInt16  m_nControlSlotId;
 
+protected:
 virtual voidPaint(vcl::RenderContext& rRenderContext, const 
tools::Rectangle& rRect) override;
 virtual voidResize() override;
 virtual voiddispose() override;
@@ -112,32 +114,37 @@ public:
 
 // DialogWindowLayout
 
-class DialogWindowLayout final : public Layout
+class DialogWindowLayout : public Layout
 {
 public:
 DialogWindowLayout (vcl::Window* pParent, ObjectCatalog&);
 virtual ~DialogWindowLayout() override;
 virtual void dispose() override;
+public:
 void ShowPropertyBrowser ();
 void UpdatePropertyBrowser ();
 void DisablePropertyBrowser ();
+public:
 // Layout:
 virtual void Activating (BaseWindow&) override;
 virtual void Deactivating () override;
 virtual void 

[Libreoffice-commits] core.git: basctl/source chart2/source

2021-11-03 Thread Natalia Gavrilova (via logerrit)
 basctl/source/basicide/moduldl2.cxx|2 +-
 basctl/source/basicide/moduldlg.hxx|2 +-
 chart2/source/controller/dialogs/res_DataLabel.cxx |6 +++---
 chart2/source/controller/dialogs/res_DataLabel.hxx |4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 0a059912bae4e3bc0b2640efb4e163d79f54a5d7
Author: Natalia Gavrilova 
AuthorDate: Mon Oct 11 08:42:18 2021 +0300
Commit: Michael Stahl 
CommitDate: Wed Nov 3 10:07:48 2021 +0100

tdf#114441 Convert use of sal_uLong to sal_uInt32, int

* Changed moduldlg.hxx, moduldl2.cxx
* Changed res_DataLabel.hxx, res_DataLabel.cxx

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

diff --git a/basctl/source/basicide/moduldl2.cxx 
b/basctl/source/basicide/moduldl2.cxx
index 7be53296159a..6c183c33035e 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1226,7 +1226,7 @@ void LibPage::SetCurLib()
 m_xLibBox->set_cursor(nEntry_);
 }
 
-void LibPage::ImpInsertLibEntry( const OUString& rLibName, sal_uLong nPos )
+void LibPage::ImpInsertLibEntry( const OUString& rLibName, int nPos )
 {
 // check, if library is password protected
 bool bProtected = false;
diff --git a/basctl/source/basicide/moduldlg.hxx 
b/basctl/source/basicide/moduldlg.hxx
index b7fb13d8901e..63be9953a290 100644
--- a/basctl/source/basicide/moduldlg.hxx
+++ b/basctl/source/basicide/moduldlg.hxx
@@ -189,7 +189,7 @@ class LibPage final : public OrganizePage
 voidFillListBox();
 voidInsertListBoxEntry( const ScriptDocument& rDocument, 
LibraryLocation eLocation );
 voidSetCurLib();
-voidImpInsertLibEntry( const OUString& rLibName, sal_uLong 
nPos );
+voidImpInsertLibEntry( const OUString& rLibName, int nPos 
);
 
 public:
 explicit LibPage(weld::Container* pParent, OrganizeDialog* pDialog);
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx 
b/chart2/source/controller/dialogs/res_DataLabel.cxx
index 841b75d2f9ef..6bba918d6937 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -46,7 +46,7 @@ namespace
 
 const std::u16string_view our_aLBEntryMap[] = {u" ", u", ", u"; ", u"\n", u". 
"};
 
-bool lcl_ReadNumberFormatFromItemSet( const SfxItemSet& rSet, sal_uInt16 
nValueWhich, sal_uInt16 nSourceFormatWhich, sal_uLong& rnFormatKeyOut, bool& 
rbSourceFormatOut, bool& rbSourceFormatMixedStateOut )
+bool lcl_ReadNumberFormatFromItemSet( const SfxItemSet& rSet, sal_uInt16 
nValueWhich, sal_uInt16 nSourceFormatWhich, sal_uInt32& rnFormatKeyOut, bool& 
rbSourceFormatOut, bool& rbSourceFormatMixedStateOut )
 {
 bool bSet = false;
 const SfxPoolItem *pItem1 = nullptr;
@@ -191,7 +191,7 @@ IMPL_LINK(DataLabelResources, NumberFormatDialogHdl, 
weld::Button&, rButton, voi
 
 bool bPercent = ( == m_xPB_NumberFormatForPercent.get());
 
-sal_uLong& rnFormatKey = bPercent ? m_nNumberFormatForPercent : 
m_nNumberFormatForValue;
+sal_uInt32& rnFormatKey = bPercent ? m_nNumberFormatForPercent : 
m_nNumberFormatForValue;
 bool& rUseSourceFormat = bPercent ? m_bSourceFormatForPercent : 
m_bSourceFormatForValue;
 bool& rbMixedState = bPercent ? m_bPercentFormatMixedState : 
m_bNumberFormatMixedState;
 bool& rbSourceMixedState = bPercent ? m_bPercentSourceMixedState : 
m_bSourceFormatMixedState;
@@ -210,7 +210,7 @@ IMPL_LINK(DataLabelResources, NumberFormatDialogHdl, 
weld::Button&, rButton, voi
 if( pResult )
 {
 bool bOldSource = rUseSourceFormat;
-sal_uLong nOldFormat = rnFormatKey;
+sal_uInt32 nOldFormat = rnFormatKey;
 bool bOldMixedState = rbMixedState || rbSourceMixedState;
 
 rbMixedState = !lcl_ReadNumberFormatFromItemSet( *pResult, 
SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_SOURCE, rnFormatKey, 
rUseSourceFormat, rbSourceMixedState );
diff --git a/chart2/source/controller/dialogs/res_DataLabel.hxx 
b/chart2/source/controller/dialogs/res_DataLabel.hxx
index 094291dc9a23..56115b2a779c 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.hxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.hxx
@@ -47,8 +47,8 @@ private:
 SvNumberFormatter*  m_pNumberFormatter;
 boolm_bNumberFormatMixedState;
 boolm_bPercentFormatMixedState;
-sal_uLong   m_nNumberFormatForValue;
-sal_uLong   m_nNumberFormatForPercent;
+sal_uInt32  m_nNumberFormatForValue;
+sal_uInt32  m_nNumberFormatForPercent;
 
 boolm_bSourceFormatMixedState;
 boolm_bPercentSourceMixedState;


[Libreoffice-commits] core.git: basctl/source basic/source

2021-10-27 Thread Andreas Heinisch (via logerrit)
 basctl/source/basicide/baside2b.cxx |6 +-
 basic/source/runtime/runtime.cxx|   15 ---
 2 files changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 7d27e4b0257a8a927d3b59edcd549ff9103cbaa9
Author: Andreas Heinisch 
AuthorDate: Tue Oct 26 21:03:41 2021 +0200
Commit: Andreas Heinisch 
CommitDate: Wed Oct 27 09:29:34 2021 +0200

tdf#57308 - Basic IDE: Watching of a variable does not work

Watching a variable which returns a value from a function always shows
"out of scope" in the watch window of the Basic IDE. In order to resolve
this issue, the name of the variable being watched will be searched also
in the current method instance.

Change-Id: I5ff6ce22067e11d74275eeb82da814da1eebe3db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124239
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 5457ebcce376..d998193cc2a5 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2373,7 +2373,7 @@ void WatchWindow::UpdateWatches(bool bBasicStopped)
 eEnableChildren = TRISTATE_TRUE;
 }
 
-if (SbxVariable const* pVar = IsSbxVariable(pSBX))
+if (SbxVariable* pVar = dynamic_cast(pSBX))
 {
 // extra treatment of arrays
 SbxDataType eType = pVar->GetType();
@@ -2486,7 +2486,11 @@ void WatchWindow::UpdateWatches(bool bBasicStopped)
 {
 aWatchStr += aStrStr;
 }
+// tdf#57308 - avoid a second call to retrieve the data
+const SbxFlagBits nFlags = pVar->GetFlags();
+pVar->SetFlag(SbxFlagBits::NoBroadcast);
 aWatchStr += pVar->GetOUString();
+pVar->SetFlags(nFlags);
 if( bString )
 {
 aWatchStr += aStrStr;
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 2d7b988d7647..11699093e022 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -3754,11 +3754,20 @@ SbxBase* SbiRuntime::FindElementExtern( const OUString& 
rName )
 }
 if ( !pElem && pMeth )
 {
-// for statics, set the method's name in front
-OUString aMethName = pMeth->GetName() + ":" + rName;
-pElem = pMod->Find(aMethName, SbxClassType::DontCare);
+const OUString aMethName = pMeth->GetName();
+// tdf#57308 - check if the name is the current method instance
+if (pMeth->GetName() == rName)
+{
+pElem = pMeth;
+}
+else
+{
+// for statics, set the method's name in front
+pElem = pMod->Find(aMethName + ":" + rName, 
SbxClassType::DontCare);
+}
 }
 
+
 // search in parameter list
 if( !pElem && pMeth )
 {


[Libreoffice-commits] core.git: basctl/source basic/source

2021-10-26 Thread Andreas Heinisch (via logerrit)
 basctl/source/basicide/baside2b.cxx |2 +-
 basic/source/runtime/runtime.cxx|   14 +++---
 2 files changed, 4 insertions(+), 12 deletions(-)

New commits:
commit 514e83a0a548e61753b1238f55ee929c3c799eed
Author: Andreas Heinisch 
AuthorDate: Tue Oct 26 07:10:29 2021 +0200
Commit: Andreas Heinisch 
CommitDate: Tue Oct 26 08:05:27 2021 +0200

Revert "tdf#57308 - Basic IDE: Watching of a variable does not work"

This reverts commit f9ce4b2d04b58843d7986acd9382864b0b30d617.

Reason for revert: Cast to SbxVsriable instead of SbxMethod causes the code 
to start over

Change-Id: I8f00f8f13faef8cb8c6db4e8c2a096a921f8714b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124187
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index f320e7014c74..5457ebcce376 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2373,7 +2373,7 @@ void WatchWindow::UpdateWatches(bool bBasicStopped)
 eEnableChildren = TRISTATE_TRUE;
 }
 
-if (SbxVariable const* pVar = dynamic_cast(pSBX))
+if (SbxVariable const* pVar = IsSbxVariable(pSBX))
 {
 // extra treatment of arrays
 SbxDataType eType = pVar->GetType();
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index b6e64fbb3c35..2d7b988d7647 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -3754,17 +3754,9 @@ SbxBase* SbiRuntime::FindElementExtern( const OUString& 
rName )
 }
 if ( !pElem && pMeth )
 {
-const OUString aMethName = pMeth->GetName();
-// tdf#57308 - check if the name is the current method instance
-if (pMeth->GetName() == rName)
-{
-pElem = pMeth;
-}
-else
-{
-// for statics, set the method's name in front
-pElem = pMod->Find(aMethName + ":" + rName, 
SbxClassType::DontCare);
-}
+// for statics, set the method's name in front
+OUString aMethName = pMeth->GetName() + ":" + rName;
+pElem = pMod->Find(aMethName, SbxClassType::DontCare);
 }
 
 // search in parameter list


[Libreoffice-commits] core.git: basctl/source basic/source

2021-10-25 Thread Andreas Heinisch (via logerrit)
 basctl/source/basicide/baside2b.cxx |2 +-
 basic/source/runtime/runtime.cxx|   14 +++---
 2 files changed, 12 insertions(+), 4 deletions(-)

New commits:
commit f9ce4b2d04b58843d7986acd9382864b0b30d617
Author: Andreas Heinisch 
AuthorDate: Fri Oct 22 20:00:01 2021 +0200
Commit: Andreas Heinisch 
CommitDate: Mon Oct 25 13:22:09 2021 +0200

tdf#57308 - Basic IDE: Watching of a variable does not work

Watching a variable which returns a value from a function always shows
"out of scope" in the watch window of the Basic IDE. In order to resolve
this issue, the name of the variable being watched will be searched also
in the current method instance.

Change-Id: Id383e03925956056931d199fe86d1b352cf8e4eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124075
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 5457ebcce376..f320e7014c74 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2373,7 +2373,7 @@ void WatchWindow::UpdateWatches(bool bBasicStopped)
 eEnableChildren = TRISTATE_TRUE;
 }
 
-if (SbxVariable const* pVar = IsSbxVariable(pSBX))
+if (SbxVariable const* pVar = dynamic_cast(pSBX))
 {
 // extra treatment of arrays
 SbxDataType eType = pVar->GetType();
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 2d7b988d7647..b6e64fbb3c35 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -3754,9 +3754,17 @@ SbxBase* SbiRuntime::FindElementExtern( const OUString& 
rName )
 }
 if ( !pElem && pMeth )
 {
-// for statics, set the method's name in front
-OUString aMethName = pMeth->GetName() + ":" + rName;
-pElem = pMod->Find(aMethName, SbxClassType::DontCare);
+const OUString aMethName = pMeth->GetName();
+// tdf#57308 - check if the name is the current method instance
+if (pMeth->GetName() == rName)
+{
+pElem = pMeth;
+}
+else
+{
+// for statics, set the method's name in front
+pElem = pMod->Find(aMethName + ":" + rName, 
SbxClassType::DontCare);
+}
 }
 
 // search in parameter list


[Libreoffice-commits] core.git: basctl/source extensions/source framework/source include/vcl sfx2/source sw/source vcl/inc vcl/jsdialog vcl/source vcl/unx

2021-10-22 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/bastypes.cxx |2 -
 extensions/source/propctrlr/handlerhelper.cxx   |2 -
 extensions/source/propctrlr/propcontroller.cxx  |4 +-
 framework/source/uielement/toolbarwrapper.cxx   |2 -
 include/vcl/svapp.hxx   |4 +-
 sfx2/source/appl/newhelp.cxx|2 -
 sfx2/source/dialog/StyleList.cxx|2 -
 sfx2/source/dialog/dockwin.cxx  |2 -
 sw/source/core/crsr/DateFormFieldButton.cxx |4 +-
 sw/source/core/crsr/DropDownFormFieldButton.cxx |4 +-
 vcl/inc/jsdialog/jsdialogbuilder.hxx|   25 ---
 vcl/inc/salinst.hxx |4 +-
 vcl/inc/unx/gtk/gtkinst.hxx |4 +-
 vcl/jsdialog/jsdialogbuilder.cxx|   38 
 vcl/source/app/salvtables.cxx   |   14 +---
 vcl/source/control/InterimItemWindow.cxx|4 +-
 vcl/source/window/builder.cxx   |4 +-
 vcl/source/window/printdlg.cxx  |2 -
 vcl/unx/gtk3/gtkinst.cxx|8 ++---
 19 files changed, 67 insertions(+), 64 deletions(-)

New commits:
commit 426be29029ffec9a721f83d65d0d320455ff9503
Author: Noel Grandin 
AuthorDate: Fri Oct 22 10:36:14 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 22 12:05:19 2021 +0200

return weld::Builder by unique_ptr

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

diff --git a/basctl/source/basicide/bastypes.cxx 
b/basctl/source/basicide/bastypes.cxx
index 82e43490b28c..e0ad3daceca5 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -261,10 +261,10 @@ WinBits const DockingWindow::StyleBits =
 
 DockingWindow::DockingWindow(vcl::Window* pParent, const OUString& 
rUIXMLDescription, const OString& rID)
 : ResizableDockingWindow(pParent)
+, m_xBuilder(Application::CreateInterimBuilder(m_xBox.get(), 
rUIXMLDescription, true))
 , pLayout(nullptr)
 , nShowCount(0)
 {
-m_xBuilder.reset(Application::CreateInterimBuilder(m_xBox.get(), 
rUIXMLDescription, true));
 m_xContainer = m_xBuilder->weld_container(rID);
 }
 
diff --git a/extensions/source/propctrlr/handlerhelper.cxx 
b/extensions/source/propctrlr/handlerhelper.cxx
index 5897840b7e4e..1f274def355f 100644
--- a/extensions/source/propctrlr/handlerhelper.cxx
+++ b/extensions/source/propctrlr/handlerhelper.cxx
@@ -292,7 +292,7 @@ namespace pcr
 {
 Reference xWindow(rContext->getValueByName("BuilderParent"), 
UNO_QUERY_THROW);
 weld::TransportAsXWindow& rTunnel = 
dynamic_cast(*xWindow);
-return 
std::unique_ptr(Application::CreateBuilder(rTunnel.getWidget(), 
rUIFile));
+return Application::CreateBuilder(rTunnel.getWidget(), rUIFile);
 }
 
 void PropertyHandlerHelper::setBuilderParent(const 
css::uno::Reference& rContext, weld::Widget* 
pParent)
diff --git a/extensions/source/propctrlr/propcontroller.cxx 
b/extensions/source/propctrlr/propcontroller.cxx
index 6f73dd80a437..4fd878441f90 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -340,14 +340,14 @@ namespace pcr
 
 if (weld::TransportAsXWindow* pTunnel = 
dynamic_cast(xContainerWindow.get()))
 {
-xBuilder.reset(Application::CreateBuilder(pTunnel->getWidget(), 
sUIFile));
+xBuilder = Application::CreateBuilder(pTunnel->getWidget(), 
sUIFile);
 }
 else
 {
 VclPtr pParentWin = 
VCLUnoHelper::GetWindow(xContainerWindow);
 if (!pParentWin)
 throw RuntimeException("The frame is invalid. Unable to 
extract the container window.",*this);
-xBuilder.reset(Application::CreateInterimBuilder(pParentWin, 
sUIFile, true));
+xBuilder = Application::CreateInterimBuilder(pParentWin, sUIFile, 
true);
 }
 
 Construct(xContainerWindow, std::move(xBuilder));
diff --git a/framework/source/uielement/toolbarwrapper.cxx 
b/framework/source/uielement/toolbarwrapper.cxx
index 05e39fc9ccc2..9bf9a4bd714a 100644
--- a/framework/source/uielement/toolbarwrapper.cxx
+++ b/framework/source/uielement/toolbarwrapper.cxx
@@ -154,7 +154,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< 
Any >& aArguments )
 }
 else if (weld::TransportAsXWindow* pTunnel = 
dynamic_cast(xParentWindow.get()))
 {
-m_xBuilder.reset(Application::CreateBuilder(pTunnel->getWidget(), 
"svt/ui/managedtoolbar.ui"));
+m_xBuilder = Application::CreateBuilder(pTunnel->getWidget(), 
"svt/ui/managedtoolbar.ui");
 m_xTopLevel = m_xBuilder->weld_container("toolbarcontainer");
 m_xWeldedToolbar = m_xBuilder->weld_toolbar("managedtoolbar");

[Libreoffice-commits] core.git: basctl/source dbaccess/source extensions/source include/rtl reportdesign/source sal/qa sdext/source sw/source vcl/source writerfilter/source

2021-10-22 Thread Stephan Bergmann (via logerrit)
 basctl/source/basicide/bastype2.cxx|2 +-
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx  |6 --
 extensions/source/propctrlr/selectlabeldialog.cxx  |2 +-
 include/rtl/ustring.hxx|8 +++-
 reportdesign/source/ui/dlg/Navigator.cxx   |3 ++-
 reportdesign/source/ui/misc/RptUndo.cxx|5 +++--
 sal/qa/rtl/strings/test_oustring_stringliterals.cxx|3 ++-
 sdext/source/pdfimport/tree/writertreevisiting.cxx |2 +-
 sw/source/filter/html/htmlftn.cxx  |6 +-
 sw/source/filter/ww8/ww8par3.cxx   |3 ++-
 vcl/source/gdi/pdfwriter_impl.cxx  |3 ++-
 writerfilter/source/dmapper/TablePropertiesHandler.cxx |6 +-
 writerfilter/source/rtftok/rtfdispatchflag.cxx |   12 
 13 files changed, 39 insertions(+), 22 deletions(-)

New commits:
commit df42cb6552b20372f62b5a361709670db80e4ed4
Author: Stephan Bergmann 
AuthorDate: Thu Oct 21 22:03:20 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 22 09:24:54 2021 +0200

Optimize assignment from OUStringLiteral to OUString

...by making the OUString's pData point to the OUStringLiteral, instead of
copying the contained characters.  This is one of the improvements that had 
not
been done as part of e6dfaf9f44f9939abc338c83b3024108431d0f69 "Turn
OUStringLiteral into a consteval'ed, static-refcound rtl_uString":  "To keep
individual commits reasonably manageable, some consumers of OUStringLiteral 
in
rtl/ustrbuf.hxx and rtl/ustring.hxx are left in a somewhat odd state for 
now,
where they don't take advantage of OUStringLiteral's equivalence to 
rtl_uString,
but just keep extracting its contents and copy it elsewhere.  In follow-up
commits, those consumers should be changed appropriately, making them treat
OUStringLiteral like an rtl_uString or dropping the OUStringLiteral 
overload in
favor of an existing (and cheap to use now) OUString overload, etc."  
(Simply
dropping the OUStringLiteral overload was not possible in this case, 
though, as
that would have lead to ambiguities among the various OUString and
std::u16string_view overloads.)

The now-deleted OUStringLiteral rvalue reference overload means that some
existing assignments from ternary-operator OUStringLiteral to OUString no
longer compile and had to be replaced with uses of std::u16string_view.  
Those
had not already been replaced in e6dfaf9f44f9939abc338c83b3024108431d0f69
because they happened to use OUStringLiteral instances of identical length 
N in
both arms of the ternary operator, so did not already start to fail to 
compile
back then.

Change-Id: I328e25b8324d045774e811d20a639f40d6a9a960
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124040
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/basctl/source/basicide/bastype2.cxx 
b/basctl/source/basicide/bastype2.cxx
index eed521ce3fd6..20350b41b9f2 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -245,7 +245,7 @@ void SbTreeListBox::ImpCreateLibEntries(const 
weld::TreeIter& rIter, const Scrip
 if ( ( nMode & BrowseMode::Dialogs ) && !( nMode & 
BrowseMode::Modules ) )
 sId = bLoaded ? std::u16string_view(u"" RID_BMP_DLGLIB) : 
std::u16string_view(u"" RID_BMP_DLGLIBNOTLOADED);
 else
-sId = bLoaded ? OUStringLiteral(u"" RID_BMP_MODLIB) : 
OUStringLiteral(u"" RID_BMP_MODLIBNOTLOADED);
+sId = bLoaded ? std::u16string_view(u"" RID_BMP_MODLIB) : 
std::u16string_view(u"" RID_BMP_MODLIBNOTLOADED);
 std::unique_ptr 
xLibRootEntry(m_xControl->make_iterator());
 bool bLibRootEntry = FindEntry(aLibName, OBJ_TYPE_LIBRARY, 
*xLibRootEntry);
 if (bLibRootEntry)
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx 
b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index f1b4d9563962..235ed9bd1c41 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -918,8 +918,10 @@ bool OSelectionBrowseBox::SaveModified()
 case BROW_VIS_ROW:
 {
 bool bOldValue = 
m_pVisibleCell->GetBox().get_saved_state() != TRISTATE_FALSE;
-strOldCellContents = bOldValue ? OUStringLiteral(u"1") : 
OUStringLiteral(u"0");
-sNewValue  = !bOldValue ? OUStringLiteral(u"1") : 
OUStringLiteral(u"0");
+strOldCellContents
+= bOldValue ? std::u16string_view(u"1") : 
std::u16string_view(u"0");
+sNewValue
+= !bOldValue ? std::u16string_view(u"1") : 
std::u16string_view(u"0");
 }
 

[Libreoffice-commits] core.git: basctl/source basic/source compilerplugins/clang connectivity/source dbaccess/source filter/source hwpfilter/source opencl/source pyuno/source scaddins/source sc/source

2021-10-20 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/moduldl2.cxx |6 
 basic/source/classes/sbxmod.cxx |   12 -
 compilerplugins/clang/indentation.cxx   |   45 +++--
 compilerplugins/clang/test/indentation.cxx  |   10 +
 connectivity/source/drivers/evoab2/NTable.cxx   |6 
 connectivity/source/drivers/jdbc/ContextClassLoader.cxx |   54 +++---
 dbaccess/source/ui/uno/copytablewizard.cxx  |  130 
 filter/source/msfilter/escherex.cxx |4 
 hwpfilter/source/solver.cxx |   10 -
 opencl/source/opencl_device.cxx |2 
 pyuno/source/module/pyuno_util.cxx  |   10 -
 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx|   10 -
 scaddins/source/analysis/bessel.cxx |6 
 sd/source/filter/eppt/pptexanimations.cxx   |   82 +-
 soltools/mkdepend/include.c |   22 +-
 sw/source/core/layout/frmtool.cxx   |   12 -
 sw/source/core/table/swtable.cxx|6 
 sw/source/core/txtnode/thints.cxx   |6 
 sw/source/core/view/viewsh.cxx  |6 
 sw/source/filter/ww8/wrtww8.cxx |8 
 sw/source/uibase/docvw/edtwin.cxx   |   28 +--
 toolkit/source/controls/unocontrols.cxx |   10 -
 vcl/source/treelist/transfer.cxx|6 
 vcl/source/window/winproc.cxx   |   14 -
 writerfilter/source/dmapper/DomainMapper_Impl.cxx   |   60 +++
 xmloff/source/chart/SchXMLPlotAreaContext.cxx   |   68 
 xmlscript/source/xmldlg_imexp/xmldlg_import.cxx |   16 -
 27 files changed, 338 insertions(+), 311 deletions(-)

New commits:
commit 283a9790bffa6536f4c26bd31d85f815bc64dd08
Author: Noel Grandin 
AuthorDate: Wed Oct 20 12:48:09 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Oct 20 15:39:38 2021 +0200

loplugin:indentation check for indent inside block

look for places where the statements inside a block are
not indented

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

diff --git a/basctl/source/basicide/moduldl2.cxx 
b/basctl/source/basicide/moduldl2.cxx
index 17e937ee9513..42bcccebd67b 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -92,9 +92,9 @@ public:
 {
 if ( m_xHandler.is() )
 {
-script::ModuleSizeExceededRequest aModSizeException;
-if ( rRequest->getRequest() >>= aModSizeException )
-m_xHandler->handle( rRequest );
+script::ModuleSizeExceededRequest aModSizeException;
+if ( rRequest->getRequest() >>= aModSizeException )
+m_xHandler->handle( rRequest );
 }
 }
 };
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 7771c0575f61..75c323afe848 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1281,12 +1281,12 @@ void SbModule::RemoveVars()
 {
 for ( const auto& rModuleVariableName: mModuleVariableNames )
 {
-// We don't want a Find being called in a derived class ( e.g.
-// SbUserform because it could trigger say an initialise event
-// which would cause basic to be re-run in the middle of the init ( and 
remember RemoveVars is called from compile and we don't want code to run as 
part of the compile )
-SbxVariableRef p = SbModule::Find( rModuleVariableName, 
SbxClassType::Property );
-if( p.is() )
-Remove( p.get() );
+// We don't want a Find being called in a derived class ( e.g.
+// SbUserform because it could trigger say an initialise event
+// which would cause basic to be re-run in the middle of the init ( 
and remember RemoveVars is called from compile and we don't want code to run as 
part of the compile )
+SbxVariableRef p = SbModule::Find( rModuleVariableName, 
SbxClassType::Property );
+if( p.is() )
+Remove( p.get() );
 }
 }
 
diff --git a/compilerplugins/clang/indentation.cxx 
b/compilerplugins/clang/indentation.cxx
index 345b33a5bd63..2dda32f8174c 100644
--- a/compilerplugins/clang/indentation.cxx
+++ b/compilerplugins/clang/indentation.cxx
@@ -345,8 +345,8 @@ void Indentation::checkCompoundStmtBraces(const Stmt* 
parentStmt, const Compound
 if (invalid1)
 return;
 
-auto startBraceLoc = compat::getBeginLoc(compoundStmt);
-auto endBraceLoc = compat::getEndLoc(compoundStmt);
+auto startBraceLoc = compoundStmt->getLBracLoc();
+auto endBraceLoc = compoundStmt->getRBracLoc();
 unsigned beginColumn = SM.getPresumedColumnNumber(startBraceLoc, 
);
 unsigned beginLine = 

[Libreoffice-commits] core.git: basctl/source basic/qa basic/source

2021-10-17 Thread Julien Nabet (via logerrit)
 basctl/source/dlged/dlged.cxx |   14 +--
 basic/qa/cppunit/test_vba.cxx |8 +
 basic/source/classes/sbxmod.cxx   |   12 +-
 basic/source/runtime/methods1.cxx |  166 +-
 4 files changed, 114 insertions(+), 86 deletions(-)

New commits:
commit cf3971a9414f52b116c1c21f267128ffa67f171b
Author: Julien Nabet 
AuthorDate: Sun Oct 17 13:18:11 2021 +0200
Commit: Julien Nabet 
CommitDate: Sun Oct 17 14:13:10 2021 +0200

Simplify Sequence in b*

Change-Id: I0817d9a35a9c3fc43badb6cc60727de69849b063
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123720
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 34467260c140..203fa9cc44b9 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -763,10 +763,8 @@ void DlgEditor::Copy()
 xStream2->closeInput();
 
 // Old format contains dialog with replaced ids
-Sequence< Any > aSeqData(2);
 Any aNoResourceDialogModelBytesAny;
 aNoResourceDialogModelBytesAny <<= NoResourceDialogModelBytes;
-aSeqData[0] = aNoResourceDialogModelBytesAny;
 
 // New format contains dialog and resource
 Sequence< sal_Int8 > aResData = 
xStringResourcePersistence->exportBinary();
@@ -792,18 +790,18 @@ void DlgEditor::Copy()
 memcpy( pCombinedData + 4, DialogModelBytes.getConstArray(), 
nDialogDataLen );
 memcpy( pCombinedData + nResOffset, aResData.getConstArray(), 
nResDataLen );
 
-aSeqData[1] <<= aCombinedData;
+Sequence< Any > aSeqData
+{
+aNoResourceDialogModelBytesAny,
+makeAny(aCombinedData)
+};
 
 pTrans = new DlgEdTransferableImpl( m_ClipboardDataFlavorsResource, 
aSeqData );
 }
 else
 {
 // No resource, support only old format
-Sequence< Any > aSeqData(1);
-Any aDialogModelBytesAny;
-aDialogModelBytesAny <<= DialogModelBytes;
-aSeqData[0] = aDialogModelBytesAny;
-pTrans = new DlgEdTransferableImpl( m_ClipboardDataFlavors , aSeqData 
);
+pTrans = new DlgEdTransferableImpl( m_ClipboardDataFlavors , { 
makeAny(DialogModelBytes) } );
 }
 SolarMutexReleaser aReleaser;
 xClipboard->setContents( pTrans , pTrans );
diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index 9ea572201a30..e4436632fd84 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -226,13 +226,15 @@ void VBATest::testMiscOLEStuff()
 
 OUString sMacroPathURL = 
m_directories.getURLFromSrc(u"/basic/qa/vba_tests/");
 
-uno::Sequence< uno::Any > aArgs(2);
 // path to test document
 OUString sPath = 
m_directories.getPathFromSrc(u"/basic/qa/vba_tests/data/ADODBdata.xls");
 sPath = sPath.replaceAll( "/", "\\" );
 
-aArgs[ 0 ] <<= sPath;
-aArgs[ 1 ] <<= OUString(o3tl::toU(pODBCDriverName));
+uno::Sequence< uno::Any > aArgs
+{
+makeAny(sPath),
+makeAny(OUString(o3tl::toU(pODBCDriverName)))
+};
 
 for ( sal_uInt32  i=0; icreateDialog( sDialogUrl );
 
 // create vba api object
-uno::Sequence< uno::Any > aArgs(4);
-aArgs[ 0 ] = uno::Any();
-aArgs[ 1 ] <<= m_xDialog;
-aArgs[ 2 ] <<= m_xModel;
-aArgs[ 3 ] <<= GetParent()->GetName();
+uno::Sequence< uno::Any > aArgs
+{
+uno::Any(),
+makeAny(m_xDialog),
+makeAny(m_xModel),
+makeAny(GetParent()->GetName())
+};
 pDocObject = new SbUnoObject( GetName(), uno::Any( 
xVBAFactory->createInstanceWithArguments( "ooo.vba.msforms.UserForm", aArgs  ) 
) );
 
 uno::Reference< lang::XComponent > xComponent( m_xDialog, 
uno::UNO_QUERY_THROW );
diff --git a/basic/source/runtime/methods1.cxx 
b/basic/source/runtime/methods1.cxx
index e750627943d6..8351100c9b62 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -2448,11 +2448,13 @@ void SbRtl_SYD(StarBASIC *, SbxArray & rPar, bool)
 
 // retrieve non-optional params
 
-Sequence< Any > aParams( 4 );
-aParams[0] <<= rPar.Get(1)->GetDouble();
-aParams[1] <<= rPar.Get(2)->GetDouble();
-aParams[2] <<= rPar.Get(3)->GetDouble();
-aParams[3] <<= rPar.Get(4)->GetDouble();
+Sequence< Any > aParams
+{
+makeAny(rPar.Get(1)->GetDouble()),
+makeAny(rPar.Get(2)->GetDouble()),
+makeAny(rPar.Get(3)->GetDouble()),
+makeAny(rPar.Get(4)->GetDouble())
+};
 
 CallFunctionAccessFunction(aParams, "SYD", rPar.Get(0));
 }
@@ -2469,10 +2471,12 @@ void SbRtl_SLN(StarBASIC *, SbxArray & rPar, bool)
 
 // retrieve non-optional params
 
-Sequence< Any > aParams( 3 );
-aParams[0] <<= rPar.Get(1)->GetDouble();
-aParams[1] <<= rPar.Get(2)->GetDouble();
-

[Libreoffice-commits] core.git: basctl/source connectivity/source cui/source dbaccess/source extensions/source filter/source forms/source framework/source include/filter sc/inc sc/source sd/source sfx

2021-10-14 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/basobj2.cxx |   14 +++--
 connectivity/source/drivers/file/FStatement.cxx|5 
 cui/source/customize/SvxNotebookbarConfigPage.cxx  |9 +---
 cui/source/dialogs/cuigaldlg.cxx   |7 --
 dbaccess/source/core/api/TableDeco.cxx |7 +-
 extensions/source/propctrlr/formcomponenthandler.cxx   |6 +
 filter/source/msfilter/escherex.cxx|9 +---
 forms/source/component/ComboBox.cxx|3 --
 forms/source/xforms/binding.cxx|3 --
 framework/source/accelerators/acceleratorconfiguration.cxx |8 +--
 include/filter/msfilter/escherex.hxx   |2 -
 sc/inc/rangelst.hxx|2 +
 sc/source/core/data/column3.cxx|   10 ++---
 sc/source/core/data/documen5.cxx   |4 ---
 sc/source/core/data/dpdimsave.cxx  |4 ---
 sc/source/filter/oox/sheetdatabuffer.cxx   |3 --
 sc/source/ui/unoobj/cellsuno.cxx   |3 --
 sc/source/ui/view/drawvie4.cxx |3 --
 sd/source/filter/pdf/sdpdffilter.cxx   |   10 +
 sfx2/source/dialog/filedlghelper.cxx   |   10 -
 slideshow/source/engine/slide/slideimpl.cxx|3 --
 starmath/source/utility.cxx|3 --
 svx/source/dialog/imapdlg.cxx  |   10 ++---
 svx/source/dialog/imapwnd.cxx  |5 
 sw/source/core/docnode/ndtbl1.cxx  |3 --
 sw/source/filter/ww8/rtfstringbuffer.cxx   |3 --
 tools/source/memtools/multisel.cxx |6 +
 ucb/source/ucp/file/filtask.cxx|4 +--
 vcl/unx/generic/fontmanager/fontmanager.cxx|5 
 xmloff/source/text/txtparae.cxx|6 +
 30 files changed, 51 insertions(+), 119 deletions(-)

New commits:
commit 1f9468fc29874eae5100317282ab8b395904406d
Author: Noel Grandin 
AuthorDate: Thu Oct 14 14:57:54 2021 +0200
Commit: Noel Grandin 
CommitDate: Thu Oct 14 21:28:40 2021 +0200

use std::vector::insert instead of push_back

because it will pre-allocate space and often is optimised to memcpy

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

diff --git a/basctl/source/basicide/basobj2.cxx 
b/basctl/source/basicide/basobj2.cxx
index 9748b24ccd2f..f14535cbd3f1 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -100,21 +100,15 @@ Sequence< OUString > GetMergedLibraryNames( const 
Reference< script::XLibraryCon
 std::vector aLibList;
 if ( xModLibContainer.is() )
 {
-Sequence< OUString > aModLibNames = 
xModLibContainer->getElementNames();
-sal_Int32 nModLibCount = aModLibNames.getLength();
-const OUString* pModLibNames = aModLibNames.getConstArray();
-for ( sal_Int32 i = 0 ; i < nModLibCount ; i++ )
-aLibList.push_back( pModLibNames[ i ] );
+const Sequence< OUString > aModLibNames = 
xModLibContainer->getElementNames();
+aLibList.insert( aLibList.end(), aModLibNames.begin(), 
aModLibNames.end() );
 }
 
 // create a list of dialog library names
 if ( xDlgLibContainer.is() )
 {
-Sequence< OUString > aDlgLibNames = 
xDlgLibContainer->getElementNames();
-sal_Int32 nDlgLibCount = aDlgLibNames.getLength();
-const OUString* pDlgLibNames = aDlgLibNames.getConstArray();
-for ( sal_Int32 i = 0 ; i < nDlgLibCount ; i++ )
-aLibList.push_back( pDlgLibNames[ i ] );
+const Sequence< OUString > aDlgLibNames = 
xDlgLibContainer->getElementNames();
+aLibList.insert( aLibList.end(), aDlgLibNames.begin(), 
aDlgLibNames.end() );
 }
 
 // sort list
diff --git a/connectivity/source/drivers/file/FStatement.cxx 
b/connectivity/source/drivers/file/FStatement.cxx
index 1fde6881de12..e0ea8bc59aef 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -499,10 +499,7 @@ void OStatement_Base::GetAssignValues()
 if (pOptColumnCommalist->count() == 0)
 {
 const Sequence< OUString>& aNames = m_xColNames->getElementNames();
-const OUString* pBegin = aNames.getConstArray();
-const OUString* pEnd = pBegin + aNames.getLength();
-for (; pBegin != pEnd; ++pBegin)
-aColumnNameList.push_back(*pBegin);
+aColumnNameList.insert(aColumnNameList.end(), 

[Libreoffice-commits] core.git: basctl/source chart2/qa chart2/source comphelper/qa comphelper/source connectivity/source cppuhelper/source dbaccess/source desktop/source extensions/source forms/sourc

2021-10-13 Thread Mike Kaganski (via logerrit)
 basctl/source/basicide/scriptdocument.cxx  |5 -
 chart2/qa/extras/chart2import.cxx  |2 
 chart2/qa/extras/charttest.hxx |4 
 chart2/source/controller/dialogs/DialogModel.cxx   |2 
 chart2/source/controller/main/ObjectHierarchy.cxx  |2 
 chart2/source/model/template/ColumnLineChartTypeTemplate.cxx   |2 
 chart2/source/tools/DataSeriesHelper.cxx   |2 
 chart2/source/tools/DataSourceHelper.cxx   |4 
 chart2/source/tools/DiagramHelper.cxx  |4 
 chart2/source/tools/InternalDataProvider.cxx   |   10 --
 chart2/source/tools/UncachedDataSequence.cxx   |4 
 comphelper/qa/unit/base64_test.cxx |   12 +-
 comphelper/source/property/opropertybag.cxx|   21 ++--
 comphelper/source/property/propertycontainerhelper.cxx |   10 +-
 connectivity/source/commontools/ConnectionWrapper.cxx  |3 
 connectivity/source/commontools/dbtools2.cxx   |6 -
 connectivity/source/drivers/jdbc/JStatement.cxx|5 -
 connectivity/source/drivers/odbc/OStatement.cxx|5 -
 connectivity/source/sdbcx/VDescriptor.cxx  |5 -
 cppuhelper/source/factory.cxx  |2 
 dbaccess/source/core/dataaccess/ModelImpl.cxx  |2 
 dbaccess/source/core/dataaccess/connection.cxx |2 
 dbaccess/source/core/dataaccess/databasedocument.cxx   |5 -
 dbaccess/source/core/dataaccess/datasource.cxx |   10 +-
 dbaccess/source/ui/browser/unodatbr.cxx|5 -
 dbaccess/source/ui/misc/UITools.cxx|8 -
 dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx   |5 -
 dbaccess/source/ui/querydesign/querycontroller.cxx |5 -
 desktop/source/lib/init.cxx|4 
 desktop/source/lib/lokclipboard.cxx|4 
 extensions/source/bibliography/formcontrolcontainer.cxx|   17 ++-
 extensions/source/propctrlr/cellbindinghelper.cxx  |   15 +--
 extensions/source/propctrlr/eformshelper.cxx   |6 -
 extensions/source/propctrlr/eventhandler.cxx   |4 
 extensions/source/propctrlr/formcomponenthandler.cxx   |2 
 extensions/source/propctrlr/genericpropertyhandler.cxx |4 
 extensions/source/propctrlr/stringrepresentation.cxx   |3 
 extensions/source/propctrlr/xsdvalidationhelper.cxx|9 +-
 forms/source/component/ListBox.cxx |   14 +--
 forms/source/component/propertybaghelper.cxx   |2 
 forms/source/misc/InterfaceContainer.cxx   |3 
 framework/qa/cppunit/dispatchtest.cxx  |4 
 framework/source/services/autorecovery.cxx |2 
 i18npool/qa/cppunit/test_ordinalsuffix.cxx |   38 
++--
 i18npool/source/transliteration/ignoreIandEfollowedByYa_ja_JP.cxx  |3 
 i18npool/source/transliteration/ignoreIterationMark_ja_JP.cxx  |3 
 i18npool/source/transliteration/ignoreKiKuFollowedBySa_ja_JP.cxx   |3 
 i18npool/source/transliteration/ignoreProlongedSoundMark_ja_JP.cxx |3 
 i18npool/source/transliteration/transliterationImpl.cxx|   34 
++-
 i18npool/source/transliteration/transliteration_OneToOne.cxx   |3 
 i18npool/source/transliteration/transliteration_body.cxx   |5 -
 include/com/sun/star/uno/Sequence.h|   10 ++
 include/com/sun/star/uno/Sequence.hxx  |   24 +
 include/vcl/FilterConfigItem.hxx   |4 
 include/xmloff/XMLEventExport.hxx  |2 
 oox/source/crypto/AgileEngine.cxx  |2 
 oox/source/export/chartexport.cxx  |4 
 oox/source/helper/zipstorage.cxx   |3 
 oox/source/ole/olestorage.cxx  |3 
 reportdesign/source/core/api/ReportDefinition.cxx  |2 
 sc/source/core/data/dptabsrc.cxx   |2 
 sc/source/core/tool/addincol.cxx   |4 
 sc/source/core/tool/rangeseq.cxx   |2 
 sc/source/filter/xml/xmlcvali.cxx  |4 
 sc/source/ui/Accessibility/AccessibleCell.cxx  |5 

[Libreoffice-commits] core.git: basctl/source basegfx/source chart2/source comphelper/source compilerplugins/clang connectivity/source cui/source dbaccess/source extensions/source filter/source includ

2021-09-30 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside2b.cxx |2 -
 basctl/source/basicide/bastype3.cxx |2 -
 basctl/source/basicide/moduldlg.cxx |2 -
 basctl/source/inc/bastype2.hxx  |2 -
 basegfx/source/range/b2drangeclipper.cxx|2 -
 chart2/source/controller/dialogs/dlg_NumberFormat.cxx   |2 -
 chart2/source/controller/dialogs/dlg_NumberFormat.hxx   |2 -
 comphelper/source/misc/anytostring.cxx  |2 -
 compilerplugins/clang/constparams.cxx   |   27 ++--
 compilerplugins/clang/test/constparams.cxx  |   22 +
 connectivity/source/drivers/dbase/DIndex.cxx|2 -
 connectivity/source/inc/dbase/DIndex.hxx|4 +-
 cui/source/dialogs/scriptdlg.cxx|6 +--
 cui/source/inc/numfmt.hxx   |2 -
 cui/source/inc/scriptdlg.hxx|6 +--
 cui/source/options/optcolor.cxx |4 +-
 cui/source/tabpages/numfmt.cxx  |2 -
 dbaccess/source/ui/browser/unodatbr.cxx |6 +--
 dbaccess/source/ui/control/tabletree.cxx|6 +--
 dbaccess/source/ui/inc/tabletree.hxx|6 +--
 dbaccess/source/ui/inc/unodatbr.hxx |6 +--
 extensions/source/propctrlr/selectlabeldialog.cxx   |2 -
 extensions/source/propctrlr/selectlabeldialog.hxx   |2 -
 filter/source/msfilter/svdfppt.cxx  |4 +-
 filter/source/pdf/impdialog.cxx |2 -
 filter/source/pdf/impdialog.hxx |2 -
 include/filter/msfilter/svdfppt.hxx |4 +-
 include/oox/drawingml/shape.hxx |4 +-
 include/sfx2/childwin.hxx   |2 -
 include/sfx2/frame.hxx  |2 -
 include/sfx2/viewsh.hxx |2 -
 include/svx/svdedtv.hxx |2 -
 include/svx/svdpagv.hxx |2 -
 include/svx/svdpntv.hxx |2 -
 include/svx/svdtext.hxx |2 -
 include/vcl/weldutils.hxx   |3 +
 include/vcl/window.hxx  |2 -
 oox/source/drawingml/shape.cxx  |4 +-
 oox/source/export/chartexport.cxx   |2 -
 package/source/xstor/xstorage.cxx   |2 -
 package/source/xstor/xstorage.hxx   |2 -
 reportdesign/source/ui/dlg/Navigator.cxx|4 +-
 sc/source/filter/inc/lotattr.hxx|2 -
 sc/source/filter/lotus/lotattr.cxx  |2 -
 sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx  |2 -
 sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx  |2 -
 sc/source/filter/xml/xmlexprt.cxx   |2 -
 sc/source/filter/xml/xmlexprt.hxx   |2 -
 sc/source/ui/attrdlg/tabpages.cxx   |2 -
 sc/source/ui/docshell/dbdocfun.cxx  |2 -
 sc/source/ui/inc/dbdocfun.hxx   |2 -
 sc/source/ui/inc/tabpages.hxx   |2 -
 sc/source/ui/inc/xmlsourcedlg.hxx   |8 ++--
 sc/source/ui/xmlsource/xmlsourcedlg.cxx |   10 ++---
 sd/source/ui/accessibility/AccessibleViewForwarder.cxx  |2 -
 sd/source/ui/dlg/sdtreelb.cxx   |2 -
 sd/source/ui/inc/AccessibleViewForwarder.hxx|2 -
 sd/source/ui/inc/sdtreelb.hxx   |2 -
 sd/source/ui/inc/slideshow.hxx  |2 -
 sd/source/ui/slideshow/slideshow.cxx|2 -
 sd/source/ui/unoidl/unomodel.cxx|6 +--
 sfx2/source/appl/childwin.cxx   |2 -
 sfx2/source/appl/workwin.cxx|2 -
 sfx2/source/dialog/templdlg.cxx |8 ++--
 sfx2/source/inc/templdgi.hxx|8 ++--
 sfx2/source/inc/workwin.hxx |2 -
 sfx2/source/view/frame2.cxx |2 -
 sfx2/source/view/viewsh.cxx |2 -
 svl/source/crypto/cryptosign.cxx|2 -
 svx/source/svdraw/svdedtv1.cxx  |2 -
 svx/source/svdraw/svdpagv.cxx   |2 -
 svx/source/svdraw/svdpntv.cxx   |2 -
 svx/source/svdraw/svdtext.cxx   |2 -
 sw/inc/PostItMgr.hxx|4 +-
 sw/inc/textboxhelper.hxx

[Libreoffice-commits] core.git: basctl/source basic/source chart2/inc chart2/source cui/source dbaccess/source desktop/source drawinglayer/source editeng/source extensions/source forms/source fpicker/

2021-09-28 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside2b.cxx   |2 
 basctl/source/dlged/dlgedfunc.cxx |2 
 basic/source/runtime/methods1.cxx |2 
 chart2/inc/ChartView.hxx  |2 
 chart2/source/controller/dialogs/DataBrowser.cxx  |3 -
 chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx |1 
 chart2/source/controller/dialogs/tp_3D_SceneGeometry.cxx  |2 
 chart2/source/controller/main/ChartController.cxx |1 
 cui/source/customize/acccfg.cxx   |5 -
 cui/source/customize/cfg.cxx  |3 -
 cui/source/dialogs/AdditionsDialog.cxx|3 -
 cui/source/dialogs/cuigaldlg.cxx  |1 
 cui/source/dialogs/cuigrfflt.cxx  |1 
 cui/source/dialogs/hltpbase.cxx   |1 
 cui/source/tabpages/chardlg.cxx   |2 
 cui/source/tabpages/macroass.cxx  |3 -
 cui/source/tabpages/numpages.cxx  |1 
 dbaccess/source/ui/browser/brwctrlr.cxx   |2 
 dbaccess/source/ui/control/dbtreelistbox.cxx  |1 
 dbaccess/source/ui/control/sqledit.cxx|3 -
 dbaccess/source/ui/dlg/paramdialog.cxx|1 
 dbaccess/source/ui/querydesign/JoinTableView.cxx  |1 
 dbaccess/source/ui/querydesign/QueryTextView.cxx  |2 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx |1 
 dbaccess/source/ui/tabledesign/TEditControl.cxx   |3 -
 desktop/source/app/app.cxx|4 -
 desktop/source/deployment/gui/dp_gui_dialog2.cxx  |4 -
 desktop/source/deployment/gui/license_dialog.cxx  |2 
 drawinglayer/source/processor2d/vclhelperbufferdevice.cxx |3 -
 editeng/source/editeng/impedit2.cxx   |5 -
 editeng/source/editeng/impedit5.cxx   |1 
 extensions/source/bibliography/toolbar.cxx|1 
 forms/source/component/ListBox.cxx|1 
 fpicker/source/office/autocmpledit.cxx|2 
 fpicker/source/office/fileview.cxx|2 
 fpicker/source/office/iodlgimp.cxx|1 
 framework/source/layoutmanager/layoutmanager.cxx  |2 
 framework/source/services/autorecovery.cxx|3 -
 framework/source/uielement/menubarmanager.cxx |2 
 framework/source/uielement/toolbarmanager.cxx |3 -
 include/vcl/dockwin.hxx   |8 +-
 include/vcl/idle.hxx  |2 
 include/vcl/syswin.hxx|   10 ---
 include/vcl/task.hxx  |1 
 include/vcl/timer.hxx |4 -
 linguistic/source/lngsvcmgr.cxx   |1 
 reportdesign/source/ui/report/dlgedfunc.cxx   |1 
 sc/source/core/tool/chartlis.cxx  |3 -
 sc/source/core/tool/chartlock.cxx |2 
 sc/source/core/tool/refreshtimer.cxx  |4 -
 sc/source/filter/oox/workbookfragment.cxx |2 
 sc/source/ui/cctrl/checklistmenu.cxx  |3 -
 sc/source/ui/dbgui/csvtablebox.cxx|1 
 sc/source/ui/dbgui/tpsort.cxx |2 
 sc/source/ui/docshell/datastream.cxx  |1 
 sc/source/ui/docshell/externalrefmgr.cxx  |4 -
 sc/source/ui/drawfunc/fupoor.cxx  |2 
 sc/source/ui/miscdlgs/acredlin.cxx|3 -
 sc/source/ui/miscdlgs/conflictsdlg.cxx|3 -
 sc/source/ui/miscdlgs/dataproviderdlg.cxx |1 
 sc/source/ui/miscdlgs/instbdlg.cxx|1 
 sc/source/ui/navipi/navipi.cxx|1 
 sc/source/ui/view/gridwin.cxx |1 
 sc/source/ui/view/notemark.cxx|1 
 sc/source/ui/view/tabview.cxx |1 
 sd/source/core/CustomAnimationEffect.cxx  |2 
 

[Libreoffice-commits] core.git: basctl/source basegfx/source chart2/source cui/source editeng/source extensions/source oox/source sc/source sdext/source sd/source sfx2/source slideshow/source svx/sour

2021-09-15 Thread Noel Grandin (via logerrit)
 UnoControls/source/base/basecontainercontrol.cxx   |4 ++--
 basctl/source/dlged/dlgedfunc.cxx  |2 +-
 basegfx/source/polygon/b2dpolygontools.cxx |2 +-
 basegfx/source/polygon/b3dpolygontools.cxx |2 +-
 chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx |4 ++--
 chart2/source/view/charttypes/VSeriesPlotter.cxx   |2 +-
 cui/source/dialogs/GraphicTestsDialog.cxx  |2 +-
 editeng/source/editeng/eerdll.cxx  |2 +-
 editeng/source/editeng/impedit3.cxx|2 +-
 extensions/source/propctrlr/propertyeditor.cxx |6 
+++---
 oox/source/export/chartexport.cxx  |2 +-
 oox/source/export/drawingml.cxx|2 +-
 sc/source/core/tool/chartpos.cxx   |2 +-
 sc/source/ui/cctrl/checklistmenu.cxx   |2 +-
 sd/source/core/CustomAnimationEffect.cxx   |2 +-
 sd/source/ui/animations/CustomAnimationList.cxx|2 +-
 sd/source/ui/animations/CustomAnimationPane.cxx|4 ++--
 sd/source/ui/view/drviews4.cxx |2 +-
 sdext/source/presenter/PresenterToolBar.cxx|2 +-
 sfx2/source/control/listview.cxx   |2 +-
 sfx2/source/sidebar/Deck.cxx   |2 +-
 slideshow/source/engine/box2dtools.cxx |2 +-
 svx/source/tbxctrls/StylesPreviewWindow.cxx|2 +-
 svx/source/xml/xmlxtimp.cxx|2 +-
 sw/source/core/doc/docnew.cxx  |2 +-
 sw/source/core/fields/authfld.cxx  |2 +-
 sw/source/core/model/SearchResultLocator.cxx   |2 +-
 vcl/backendtest/GraphicsRenderTests.cxx|2 +-
 vcl/headless/svpgdi.cxx|4 ++--
 vcl/source/app/salvtables.cxx  |2 +-
 vcl/source/control/button.cxx  |2 +-
 vcl/source/control/imivctl1.cxx|2 +-
 vcl/source/gdi/pdfwriter_impl.cxx  |2 +-
 vcl/source/window/dialog.cxx   |2 +-
 vcl/source/window/printdlg.cxx |4 ++--
 vcl/unx/generic/fontmanager/fontconfig.cxx |2 +-
 vcl/unx/gtk3/gtkinst.cxx   |2 +-
 writerfilter/source/dmapper/StyleSheetTable.cxx|4 ++--
 writerfilter/source/rtftok/rtfreferencetable.cxx   |2 +-
 xmloff/source/chart/SchXMLExport.cxx   |4 ++--
 xmloff/source/chart/SchXMLPlotAreaContext.cxx  |2 +-
 xmloff/source/draw/shapeimport.cxx |2 +-
 xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx |2 +-
 xmlsecurity/source/gpg/SecurityEnvironment.cxx |2 +-
 xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx  |2 +-
 45 files changed, 54 insertions(+), 54 deletions(-)

New commits:
commit 3a1a448ac4a04137705ea0aaf0163358fd2e5549
Author: Noel Grandin 
AuthorDate: Wed Sep 15 10:58:18 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 15 12:43:21 2021 +0200

loplugin:constvars

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

diff --git a/UnoControls/source/base/basecontainercontrol.cxx 
b/UnoControls/source/base/basecontainercontrol.cxx
index a440505149ed..a20059d100b8 100644
--- a/UnoControls/source/base/basecontainercontrol.cxx
+++ b/UnoControls/source/base/basecontainercontrol.cxx
@@ -309,7 +309,7 @@ Reference< XControl > SAL_CALL 
BaseContainerControl::getControl ( const OUString
 MutexGuard  aGuard ( Mutex::getGlobalMutex() );
 
 // Search for right control
-for( IMPL_ControlInfo& rSearchControl : maControlInfoList )
+for( const IMPL_ControlInfo& rSearchControl : maControlInfoList )
 {
 if ( rSearchControl.sName == rName )
 {
@@ -336,7 +336,7 @@ Sequence< Reference< XControl > > SAL_CALL 
BaseContainerControl::getControls ()
 Reference< XControl > * pDestination= aDescriptor.getArray 
();
 
 // Copy controls to sequence
-for( IMPL_ControlInfo& rCopyControl : maControlInfoList )
+for( const IMPL_ControlInfo& rCopyControl : maControlInfoList )

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

2021-09-01 Thread Andreas Heinisch (via logerrit)
 basctl/source/basicide/baside2.cxx |   15 +++
 1 file changed, 3 insertions(+), 12 deletions(-)

New commits:
commit c356e5e0530e609a2ae9e8b11fb3c4ed43f966d4
Author: Andreas Heinisch 
AuthorDate: Tue Aug 31 19:59:35 2021 +0200
Commit: Mike Kaganski 
CommitDate: Wed Sep 1 14:08:41 2021 +0200

tdf#139196 - Remove local BOM logic

Change-Id: Ic14d8556ab0f39b6f10619d714e1d8c5ba6c22d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121392
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/basctl/source/basicide/baside2.cxx 
b/basctl/source/basicide/baside2.cxx
index 4e562420ef19..ff14bd6ccdc2 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -190,17 +190,6 @@ void lcl_ConvertTabsToSpaces( OUString& rLine )
 rLine = aResult.makeStringAndClear();
 }
 
-void DetectUTF8BOMCharset(SvStream& pStream)
-{
-sal_uInt8 pBuf[3];
-sal_Int32 nRead = pStream.ReadBytes(pBuf, 3);
-unsigned char const BOM[3] = { 0xEF, 0xBB, 0xBF };
-if (nRead == 3 && memcmp(pBuf, BOM, 3) == 0)
-pStream.SetStreamCharSet(RTL_TEXTENCODING_UTF8);
-else
-pStream.Seek(0);
-}
-
 } // namespace
 
 ModulWindow::ModulWindow (ModulWindowLayout* pParent, ScriptDocument const& 
rDocument,
@@ -447,7 +436,9 @@ void ModulWindow::LoadBasic()
 GetEditorWindow().CreateProgress( IDEResId(RID_STR_GENERATESOURCE), 
nLines*4 );
 GetEditEngine()->SetUpdateMode( false );
 // tdf#139196 - import macros using either default or utf-8 text 
encoding
-DetectUTF8BOMCharset(*pStream);
+pStream->StartReadingUnicodeText(RTL_TEXTENCODING_UTF8);
+if (pStream->Tell() == 3)
+pStream->SetStreamCharSet(RTL_TEXTENCODING_UTF8);
 GetEditView()->Read( *pStream );
 GetEditEngine()->SetUpdateMode( true );
 GetEditorWindow().PaintImmediately();


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

2021-09-01 Thread Noel Grandin (via logerrit)
 basctl/source/dlged/dlgedmod.cxx  |5 +
 cui/source/customize/acccfg.cxx   |3 ---
 cui/source/dialogs/screenshotannotationdlg.cxx|2 --
 cui/source/dialogs/thesdlg.cxx|1 -
 cui/source/options/optaboutconfig.cxx |1 -
 cui/source/options/optgdlg.cxx|1 -
 desktop/source/splash/splash.cxx  |3 +--
 editeng/source/accessibility/AccessibleContextBase.cxx|2 --
 editeng/source/accessibility/AccessibleStaticTextBase.cxx |3 +--
 editeng/source/editeng/editdoc.cxx|5 +
 editeng/source/items/CustomPropertyField.cxx  |3 +--
 editeng/source/items/paraitem.cxx |6 ++
 editeng/source/misc/hangulhanja.cxx   |3 +--
 editeng/source/uno/unoviwou.cxx   |2 +-
 14 files changed, 9 insertions(+), 31 deletions(-)

New commits:
commit eb9d34dadbf78fd09ff39ba46d0e48c6ae9f9940
Author: Noel Grandin 
AuthorDate: Tue Aug 31 14:52:15 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 1 08:54:20 2021 +0200

clang-tidy:readability-redundant-member-init

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

diff --git a/basctl/source/dlged/dlgedmod.cxx b/basctl/source/dlged/dlgedmod.cxx
index 3bc5453ad66f..017e4b16c78f 100644
--- a/basctl/source/dlged/dlgedmod.cxx
+++ b/basctl/source/dlged/dlgedmod.cxx
@@ -22,10 +22,7 @@
 
 namespace basctl
 {
-DlgEdModel::DlgEdModel()
-: SdrModel()
-{
-}
+DlgEdModel::DlgEdModel() {}
 
 DlgEdModel::~DlgEdModel() {}
 
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 2701e7204f34..98f965a6ce9e 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -834,9 +834,6 @@ 
SfxAcceleratorConfigPage::SfxAcceleratorConfigPage(weld::Container* pPage,
 , aFilterAllStr(SfxResId(STR_SFX_FILTERNAME_ALL))
 , aFilterCfgStr(CuiResId(RID_SVXSTR_FILTERNAME_CFG))
 , m_bStylesInfoInitialized(false)
-, m_xGlobal()
-, m_xModule()
-, m_xAct()
 , m_aUpdateDataTimer("UpdateDataTimer")
 , m_xEntriesBox(m_xBuilder->weld_tree_view("shortcuts"))
 , m_xOfficeButton(m_xBuilder->weld_radio_button("office"))
diff --git a/cui/source/dialogs/screenshotannotationdlg.cxx 
b/cui/source/dialogs/screenshotannotationdlg.cxx
index bdae7f003b8d..802453d2206c 100644
--- a/cui/source/dialogs/screenshotannotationdlg.cxx
+++ b/cui/source/dialogs/screenshotannotationdlg.cxx
@@ -200,9 +200,7 @@ ScreenshotAnnotationDlg_Impl::ScreenshotAnnotationDlg_Impl(
 :   mpParentWindow(pParent),
 mrParentDialog(rParentDialog),
 mxVirtualBufferDevice(nullptr),
-maAllChildren(),
 mpHilighted(nullptr),
-maSelected(),
 maPicture(this),
 maSaveAsText(CuiResId(RID_SVXSTR_SAVE_SCREENSHOT_AS))
 {
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index 19580b007616..a9f4883f4c70 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -240,7 +240,6 @@ SvxThesaurusDialog::SvxThesaurusDialog(
 LanguageType nLanguage)
 : SfxDialogController(pParent, "cui/ui/thesaurus.ui", "ThesaurusDialog")
 , m_aModifyIdle("cui SvxThesaurusDialog LookUp Modify")
-, aLookUpText()
 , nLookUpLanguage(LANGUAGE_NONE)
 , m_bWordFound(false)
 , m_xLeftBtn(m_xBuilder->weld_button("left"))
diff --git a/cui/source/options/optaboutconfig.cxx 
b/cui/source/options/optaboutconfig.cxx
index 26e47983f541..39abfbedbadb 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -137,7 +137,6 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage(weld::Window* 
pParent)
 , m_xSearchEdit(m_xBuilder->weld_entry("searchEntry"))
 , m_xPrefBox(m_xBuilder->weld_tree_view("preferences"))
 , m_xScratchIter(m_xPrefBox->make_iterator())
-, m_vectorOfModified()
 , m_bSorted(false)
 {
 m_xPrefBox->set_size_request(m_xPrefBox->get_approximate_digit_width() * 
100,
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index b353325f1b53..7f5ad32fce0b 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -371,7 +371,6 @@ private:
 };
 
 CanvasSettings::CanvasSettings() :
-mxForceFlagNameAccess(),
 mbHWAccelAvailable(false),
 mbHWAccelChecked(false)
 {
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index e61f87041207..2389e14f4d11 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -120,8 +120,7 @@ public:
 };
 
 SplashScreenWindow::SplashScreenWindow(SplashScreen *pSplash)
-: IntroWindow()
-, pSpl( pSplash )
+: pSpl( pSplash )
 , 

[Libreoffice-commits] core.git: basctl/source compilerplugins/clang cui/source drawinglayer/source sd/source sfx2/source

2021-08-20 Thread Noel Grandin (via logerrit)
 basctl/source/basicide/baside3.cxx  |2 
 basctl/source/inc/baside3.hxx   |1 
 compilerplugins/clang/unusedfields.only-used-in-constructor.results |  128 
+++
 compilerplugins/clang/unusedfields.readonly.results |   80 ++--
 compilerplugins/clang/unusedfields.untouched.results|   96 
++---
 compilerplugins/clang/unusedfields.writeonly.results|  172 
+++---
 cui/source/dialogs/tipofthedaydlg.cxx   |6 
 cui/source/inc/tipofthedaydlg.hxx   |1 
 drawinglayer/source/geometry/viewinformation2d.cxx  |7 
 sd/source/ui/dlg/custsdlg.cxx   |   11 
 sd/source/ui/inc/custsdlg.hxx   |1 
 sfx2/source/dialog/StyleList.cxx|   11 
 sfx2/source/dialog/templdlg.cxx |   12 
 sfx2/source/inc/StyleList.hxx   |3 
 sfx2/source/inc/templdgi.hxx|   10 
 15 files changed, 227 insertions(+), 314 deletions(-)

New commits:
commit e367e59e37499d0efca381f0b41df52c7cfc2026
Author: Noel Grandin 
AuthorDate: Fri Aug 20 10:13:13 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Aug 20 11:28:46 2021 +0200

loplugin:unusedfields

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

diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index 12aa15589739..085228971eae 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -682,7 +682,7 @@ void DialogWindow::SaveDialog()
 
 if( bResource )
 {
-INetURLObject aURLObj( m_sCurPath );
+INetURLObject aURLObj("");
 aURLObj.removeExtension();
 OUString aDialogName( aURLObj.getName() );
 aURLObj.removeSegment();
diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx
index 86c37ea20a44..f5d367182d0a 100644
--- a/basctl/source/inc/baside3.hxx
+++ b/basctl/source/inc/baside3.hxx
@@ -51,7 +51,6 @@ private:
 DialogWindowLayout& m_rLayout;
 std::unique_ptr m_pEditor;
 std::unique_ptr m_pUndoMgr; // never nullptr
-OUStringm_sCurPath;
 sal_uInt16  m_nControlSlotId;
 
 protected:
diff --git 
a/compilerplugins/clang/unusedfields.only-used-in-constructor.results 
b/compilerplugins/clang/unusedfields.only-used-in-constructor.results
index 10564c4dece5..62a919d09124 100644
--- a/compilerplugins/clang/unusedfields.only-used-in-constructor.results
+++ b/compilerplugins/clang/unusedfields.only-used-in-constructor.results
@@ -72,7 +72,7 @@ cppcanvas/source/mtfrenderer/textaction.cxx:808
 cppcanvas::internal::(anonymous namespace)::EffectTextAction 
maTextLineInfo const tools::TextLineInfo
 cppcanvas/source/mtfrenderer/textaction.cxx:1643
 cppcanvas::internal::(anonymous namespace)::OutlineAction maTextLineInfo 
const tools::TextLineInfo
-cppu/source/threadpool/threadpool.cxx:365
+cppu/source/threadpool/threadpool.cxx:352
 _uno_ThreadPool dummy sal_Int32
 cppu/source/typelib/typelib.cxx:59
 (anonymous namespace)::AlignSize_Impl nInt16 sal_Int16
@@ -116,15 +116,15 @@ cppu/source/uno/check.cxx:134
 (anonymous namespace)::Char3 c3 char
 cppu/source/uno/check.cxx:258
 (anonymous namespace)::Char4 chars struct (anonymous namespace)::Char3
-cui/source/dialogs/colorpicker.cxx:736
+cui/source/dialogs/colorpicker.cxx:738
 cui::(anonymous namespace)::ColorPickerDialog m_aColorPrevious class 
cui::(anonymous namespace)::ColorPreviewControl
-cui/source/factory/dlgfact.cxx:1408
+cui/source/factory/dlgfact.cxx:1407
 (anonymous namespace)::SvxMacroAssignDialog m_aItems class SfxItemSet
 cui/source/inc/AdditionsDialog.hxx:47
 AdditionInfo sReleaseVersion class rtl::OUString
 cui/source/inc/AdditionsDialog.hxx:84
 AdditionsDialog m_sTag class rtl::OUString
-cui/source/inc/cfgutil.hxx:236
+cui/source/inc/cfgutil.hxx:241
 SvxScriptSelectorDialog m_aStylesInfo struct SfxStylesInfo_Impl
 cui/source/inc/cuitabarea.hxx:223
 SvxAreaTabPage maFixed_ChangeType enum ChangeType
@@ -138,6 +138,8 @@ cui/source/inc/tabstpge.hxx:86
 SvxTabulatorTabPage m_aCenterWin class TabWin_Impl
 cui/source/inc/tabstpge.hxx:87
 SvxTabulatorTabPage m_aDezWin class TabWin_Impl
+cui/source/inc/tipofthedaydlg.hxx:39
+TipOfTheDayDialog m_nDay sal_Int32
 cui/source/options/optcolor.cxx:237
 (anonymous namespace)::ColorConfigWindow_Impl::Entry m_aDefaultColor class 
Color
 dbaccess/source/core/api/RowSet.hxx:107
@@ -162,7 +164,7 @@ dbaccess/source/core/dataaccess/connection.hxx:101
 dbaccess::OConnection m_nInAppend std::atomic
 

  1   2   3   4   5   6   7   >