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

2021-09-11 Thread Mike Kaganski (via logerrit)
 connectivity/source/drivers/file/FDriver.cxx |   17 -
 1 file changed, 4 insertions(+), 13 deletions(-)

New commits:
commit 4a7984960bf7d0af8342b360510c7e4e3d7399cf
Author: Mike Kaganski 
AuthorDate: Sat Sep 11 20:52:59 2021 +0200
Commit: Mike Kaganski 
CommitDate: Sun Sep 12 08:53:00 2021 +0200

Simplify OFileDriver::getDataDefinitionByConnection

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

diff --git a/connectivity/source/drivers/file/FDriver.cxx 
b/connectivity/source/drivers/file/FDriver.cxx
index c5afbd75f7e3..9bd0692bac26 100644
--- a/connectivity/source/drivers/file/FDriver.cxx
+++ b/connectivity/source/drivers/file/FDriver.cxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -171,25 +172,15 @@ Reference< XTablesSupplier > SAL_CALL 
OFileDriver::getDataDefinitionByConnection
 ::osl::MutexGuard aGuard( m_aMutex );
 checkDisposed(ODriver_BASE::rBHelper.bDisposed);
 
-Reference< XTablesSupplier > xTab;
-Reference< css::lang::XUnoTunnel> xTunnel(connection,UNO_QUERY);
-if(xTunnel.is())
+if (OConnection* pSearchConnection = 
comphelper::getUnoTunnelImplementation(connection))
 {
-OConnection* pSearchConnection = reinterpret_cast< OConnection* >( 
xTunnel->getSomething(OConnection::getUnoTunnelId()) );
-OConnection* pConnection = nullptr;
 for (auto const& elem : m_xConnections)
 {
 if (static_cast( Reference< XConnection 
>::query(elem.get()).get() ) == pSearchConnection)
-{
-pConnection = pSearchConnection;
-break;
-}
+return pSearchConnection->createCatalog();
 }
-
-if(pConnection)
-xTab = pConnection->createCatalog();
 }
-return xTab;
+return {};
 }
 
 


[Libreoffice-commits] core.git: include/svx

2021-09-11 Thread Julien Nabet (via logerrit)
 include/svx/fmsrcimp.hxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ef030cd1b1eb6dd41ade808f360305cb53d48106
Author: Julien Nabet 
AuthorDate: Sun Sep 12 08:44:00 2021 +0200
Commit: Julien Nabet 
CommitDate: Sun Sep 12 08:44:34 2021 +0200

Typo STATE_SUCCESSFULL->STATE_SUCCESSFUL

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

diff --git a/include/svx/fmsrcimp.hxx b/include/svx/fmsrcimp.hxx
index 1c9d55829e69..2f21abfc729a 100644
--- a/include/svx/fmsrcimp.hxx
+++ b/include/svx/fmsrcimp.hxx
@@ -59,9 +59,9 @@ struct FmSearchProgress
 // Overflow - only valid in case of STATE_PROGRESS
 boolbOverflow;
 
-// the position of the search cursor - valid in case of STATE_SUCCESSFULL, 
STATE_CANCELED and STATE_NOTHING_FOUND
+// the position of the search cursor - valid in case of STATE_SUCCESSFUL, 
STATE_CANCELED and STATE_NOTHING_FOUND
 css::uno::Any  aBookmark;
-// the field, in which the text was found - valid in case of 
STATE_SUCCESSFULL
+// the field, in which the text was found - valid in case of 
STATE_SUCCESSFUL
 sal_Int32   nFieldIndex;
 };
 


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

2021-09-11 Thread Julien Nabet (via logerrit)
 sc/inc/xmlwrap.hxx|2 +-
 sc/source/filter/xml/xmlwrap.cxx  |6 +++---
 sd/source/filter/xml/sdxmlwrp.cxx |   10 +-
 sd/source/ui/framework/factories/BasicViewFactory.cxx |6 +++---
 svx/source/fmcomp/fmgridcl.cxx|6 +++---
 sw/source/filter/xml/swxml.cxx|   10 +-
 6 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit eb848249f51323089e78a26c1a05b264eaf98c0f
Author: Julien Nabet 
AuthorDate: Sat Sep 11 22:18:04 2021 +0200
Commit: Julien Nabet 
CommitDate: Sun Sep 12 08:42:14 2021 +0200

Typo *Successfull->*Successful

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

diff --git a/sc/inc/xmlwrap.hxx b/sc/inc/xmlwrap.hxx
index 597acaf61949..776f49a2af2f 100644
--- a/sc/inc/xmlwrap.hxx
+++ b/sc/inc/xmlwrap.hxx
@@ -70,7 +70,7 @@ class ScXMLImportWrapper
 css::xml::sax::InputSource& aParserInput,
 const OUString& sComponentName, const OUString& sDocName,
 const css::uno::Sequence& aArgs,
-bool bMustBeSuccessfull);
+bool bMustBeSuccessful);
 
 bool ExportToComponent(const 
css::uno::Reference& xContext,
 const css::uno::Reference& xModel,
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index cb92ebab0ce5..006d33bc0861 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -110,7 +110,7 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const 
uno::Reference& aArgs,
-bool bMustBeSuccessfull)
+bool bMustBeSuccessful)
 {
 uno::Reference < io::XStream > xDocStream;
 if ( !xStorage.is() && pMedium )
@@ -224,14 +224,14 @@ ErrCode ScXMLImportWrapper::ImportFromComponent(const 
uno::Reference& rFilterArguments,
 const OUString& rName,
-bool bMustBeSuccessfull,
+bool bMustBeSuccessful,
 bool bEncrypted )
 {
 DBG_ASSERT(xInputStream.is(), "input stream missing");
@@ -260,14 +260,14 @@ ErrCode ReadThroughComponent(
 if (!rStreamName.isEmpty())
 {
 return *new TwoStringErrorInfo(
-(bMustBeSuccessfull ? ERR_FORMAT_FILE_ROWCOL
+(bMustBeSuccessful ? ERR_FORMAT_FILE_ROWCOL
 : WARN_FORMAT_FILE_ROWCOL),
 rStreamName, sErr,
 DialogMask::ButtonsOk | DialogMask::MessageError );
 }
 else
 {
-DBG_ASSERT( bMustBeSuccessfull, "Warnings are not supported" );
+DBG_ASSERT( bMustBeSuccessful, "Warnings are not supported" );
 return *new StringErrorInfo( ERR_FORMAT_ROWCOL, sErr,
  DialogMask::ButtonsOk | DialogMask::MessageError 
);
 }
@@ -313,7 +313,7 @@ ErrCode ReadThroughComponent(
 const char* pFilterName,
 const Sequence& rFilterArguments,
 const OUString& rName,
-bool bMustBeSuccessfull )
+bool bMustBeSuccessful )
 {
 DBG_ASSERT(xStorage.is(), "Need storage!");
 DBG_ASSERT(nullptr != pStreamName, "Please, please, give me a name!");
@@ -365,7 +365,7 @@ ErrCode ReadThroughComponent(
 return ReadThroughComponent(
 xInputStream, xModelComponent, sStreamName, rxContext,
 pFilterName, rFilterArguments,
-rName, bMustBeSuccessfull, bEncrypted );
+rName, bMustBeSuccessful, bEncrypted );
 }
 catch (const packages::WrongPasswordException&)
 {
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx 
b/sd/source/ui/framework/factories/BasicViewFactory.cxx
index d97c62d06d8e..581260d347c4 100644
--- a/sd/source/ui/framework/factories/BasicViewFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx
@@ -471,15 +471,15 @@ std::shared_ptr 
BasicViewFactory::GetViewFromC
 // remove it from the cache.
 if (pDescriptor != nullptr)
 {
-bool bRelocationSuccessfull (false);
+bool bRelocationSuccessful (false);
 Reference xResource (pDescriptor->mxView, 
UNO_QUERY);
 if (xResource.is() && rxPane.is())
 {
 if (xResource->relocateToAnchor(rxPane))
-bRelocationSuccessfull = true;
+bRelocationSuccessful = true;
 }
 
-if ( ! bRelocationSuccessfull)
+if ( ! bRelocationSuccessful)
 {
 ReleaseView(pDescriptor, true);
 pDescriptor.reset();
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index a3bcd5816214..a64ae20db07d 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1805,7 +1805,7 @@ bool FmGridControl::selectBookmarks(const Sequence< Any 
>& _rBookmarks)
 
 SetNoSelection();
 
-bool bA

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

2021-09-11 Thread Noel Grandin (via logerrit)
 sc/source/core/data/attarray.cxx |   12 
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit d8b765e6c45792bff5717cd0e0d9d42311c33461
Author: Noel Grandin 
AuthorDate: Sat Sep 11 20:39:26 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Sep 12 08:04:02 2021 +0200

tdf#144085 XUsedAreaCursor broken: the methods don't accept formatted cells 
as used

This reverts
commit 61386aa03cd166473a58dbb4be0dd5e0ce82195c.
tdf#79049 speed up OOXML workbook load (3)

which caused this problem

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

diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index 9fac3fd247ae..5116001576ad 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -1957,21 +1957,17 @@ bool ScAttrArray::GetLastVisibleAttr( SCROW& rLastRow, 
SCROW nLastData ) const
 Search( nLastData, nPos );
 while ( nPos < mvData.size() )
 {
-SCROW nAttrStartRow = ( nPos > 0 ) ? ( mvData[nPos-1].nEndRow + 1 ) : 
0;
-if ( nAttrStartRow <= nLastData )
-nAttrStartRow = nLastData + 1;
 // find range of visually equal formats
 SCSIZE nEndPos = nPos;
 while ( nEndPos < mvData.size()-1 &&
 mvData[nEndPos].pPattern->IsVisibleEqual( 
*mvData[nEndPos+1].pPattern))
-{
-if ( (mvData[nEndPos].nEndRow + 1 - nAttrStartRow) >= 
SC_VISATTR_STOP )
-return false; // ignore this range and below
 ++nEndPos;
-}
+SCROW nAttrStartRow = ( nPos > 0 ) ? ( mvData[nPos-1].nEndRow + 1 ) : 
0;
+if ( nAttrStartRow <= nLastData )
+nAttrStartRow = nLastData + 1;
 SCROW nAttrSize = mvData[nEndPos].nEndRow + 1 - nAttrStartRow;
 if ( nAttrSize >= SC_VISATTR_STOP )
-return false; // ignore this range and below
+break;  // while, ignore this range and below
 else if ( mvData[nEndPos].pPattern->IsVisible() )
 {
 rLastRow = mvData[nEndPos].nEndRow;


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

2021-09-11 Thread Mike Kaganski (via logerrit)
 connectivity/source/drivers/firebird/Connection.cxx |   15 +++
 connectivity/source/drivers/firebird/Connection.hxx |5 +
 connectivity/source/drivers/firebird/Driver.cxx |6 --
 3 files changed, 24 insertions(+), 2 deletions(-)

New commits:
commit ccc6c846eb7f6d334d0ab2e6b50c188c434caa19
Author: Mike Kaganski 
AuthorDate: Sat Sep 11 19:21:19 2021 +0200
Commit: Mike Kaganski 
CommitDate: Sun Sep 12 08:02:36 2021 +0200

tdf#117842: use XUnoTunnel to get wrapped connection reliably

XDataDefinitionSupplier::getDataDefinitionByConnection may take
not only direct reference to expected connection type, but also
connectivity::OConnectionWeakWrapper wrapping it.

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

diff --git a/connectivity/source/drivers/firebird/Connection.cxx 
b/connectivity/source/drivers/firebird/Connection.cxx
index 6d38af079d1e..040770fe0e6d 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -44,8 +44,10 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -376,6 +378,19 @@ Reference< XClob> Connection::createClob(ISC_QUAD const * 
pBlobId)
 return xReturn;
 }
 
+//- XUnoTunnel --
+// virtual
+sal_Int64 SAL_CALL Connection::getSomething(const 
css::uno::Sequence& rId)
+{
+return (isUnoTunnelId(rId)) ? 
reinterpret_cast(this) : sal_Int64(0);
+}
+
+// static
+css::uno::Sequence Connection::getUnoTunnelId()
+{
+static const cppu::OImplementationId implId;
+return implId.getImplementationId();
+}
 
 //- XConnection --
 Reference< XStatement > SAL_CALL Connection::createStatement( )
diff --git a/connectivity/source/drivers/firebird/Connection.hxx 
b/connectivity/source/drivers/firebird/Connection.hxx
index eba3b9710952..caf091146ae6 100644
--- a/connectivity/source/drivers/firebird/Connection.hxx
+++ b/connectivity/source/drivers/firebird/Connection.hxx
@@ -33,6 +33,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -45,6 +46,7 @@ namespace connectivity::firebird
 
 typedef ::cppu::WeakComponentImplHelper< 
css::document::XDocumentEventListener,
  css::lang::XServiceInfo,
+ css::lang::XUnoTunnel,
  css::sdbc::XConnection,
  css::sdbc::XWarningsSupplier
> Connection_BASE;
@@ -206,6 +208,9 @@ namespace connectivity::firebird
 
 // XServiceInfo
 DECLARE_SERVICE_INFO();
+// XUnoTunnel
+virtual sal_Int64 SAL_CALL getSomething(const 
css::uno::Sequence& rId) override;
+static css::uno::Sequence getUnoTunnelId();
 // XConnection
 virtual css::uno::Reference< css::sdbc::XStatement > SAL_CALL 
createStatement(  ) override;
 virtual css::uno::Reference< css::sdbc::XPreparedStatement > 
SAL_CALL prepareStatement( const OUString& sql ) override;
diff --git a/connectivity/source/drivers/firebird/Driver.cxx 
b/connectivity/source/drivers/firebird/Driver.cxx
index 857352583c39..fbf29293a31c 100644
--- a/connectivity/source/drivers/firebird/Driver.cxx
+++ b/connectivity/source/drivers/firebird/Driver.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -190,8 +191,9 @@ sal_Int32 SAL_CALL FirebirdDriver::getMinorVersion(  )
 uno::Reference< XTablesSupplier > SAL_CALL 
FirebirdDriver::getDataDefinitionByConnection(
 const uno::Reference< XConnection >& 
rConnection)
 {
-Connection* pConnection = static_cast< Connection* >(rConnection.get());
-return pConnection->createCatalog();
+if (Connection* pConnection = 
comphelper::getUnoTunnelImplementation(rConnection))
+return pConnection->createCatalog();
+return {};
 }
 
 uno::Reference< XTablesSupplier > SAL_CALL 
FirebirdDriver::getDataDefinitionByURL(


[Libreoffice-commits] core.git: wizards/com

2021-09-11 Thread Julien Nabet (via logerrit)
 wizards/com/sun/star/wizards/table/TableWizard.java |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 380550fb478b20deca980e5eefd7a8ce7703263d
Author: Julien Nabet 
AuthorDate: Sat Sep 11 20:42:04 2021 +0200
Commit: Julien Nabet 
CommitDate: Sun Sep 12 07:51:29 2021 +0200

Typo: bIsSuccessfull->bIsSuccessful

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

diff --git a/wizards/com/sun/star/wizards/table/TableWizard.java 
b/wizards/com/sun/star/wizards/table/TableWizard.java
index 282796a3e4ff..67e0f537fe67 100644
--- a/wizards/com/sun/star/wizards/table/TableWizard.java
+++ b/wizards/com/sun/star/wizards/table/TableWizard.java
@@ -232,7 +232,7 @@ public class TableWizard extends DatabaseObjectWizard 
implements XTextListener
 
 private boolean createTable()
 {
-boolean bIsSuccessfull = true;
+boolean bIsSuccessful = true;
 boolean bTableCreated = false;
 String schemaname = curFinalizer.getSchemaName();
 String catalogname = curFinalizer.getCatalogName();
@@ -242,19 +242,19 @@ public class TableWizard extends DatabaseObjectWizard 
implements XTextListener
 if (keyfieldnames != null && keyfieldnames.length > 0)
 {
 boolean bIsAutoIncrement = 
curPrimaryKeyHandler.isAutoIncremented();
-bIsSuccessfull = curTableDescriptor.createTable(catalogname, 
schemaname, tablename, keyfieldnames, bIsAutoIncrement);
+bIsSuccessful = curTableDescriptor.createTable(catalogname, 
schemaname, tablename, keyfieldnames, bIsAutoIncrement);
 bTableCreated = true;
 }
 }
 if (!bTableCreated)
 {
-bIsSuccessfull = curTableDescriptor.createTable(catalogname, 
schemaname, tablename);
+bIsSuccessful = curTableDescriptor.createTable(catalogname, 
schemaname, tablename);
 }
-if ((!bIsSuccessfull) && (curPrimaryKeyHandler.isAutomaticMode()))
+if ((!bIsSuccessful) && (curPrimaryKeyHandler.isAutomaticMode()))
 {
 
curTableDescriptor.dropColumnbyName(curPrimaryKeyHandler.getAutomaticFieldName());
 }
-return bIsSuccessfull;
+return bIsSuccessful;
 }
 
 @Override


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

2021-09-11 Thread Julien Nabet (via logerrit)
 include/sfx2/mailmodelapi.hxx|2 +-
 sfx2/source/dialog/bluthsnd.cxx  |2 +-
 sfx2/source/dialog/mailmodel.cxx |   14 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit f5ba9f5b7bbf74df14e5ed51af43392d6091aba1
Author: Julien Nabet 
AuthorDate: Sat Sep 11 20:39:44 2021 +0200
Commit: Julien Nabet 
CommitDate: Sun Sep 12 07:51:14 2021 +0200

Typo: SAVE_SUCCESSFULL->SAVE_SUCCESSFUL

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

diff --git a/include/sfx2/mailmodelapi.hxx b/include/sfx2/mailmodelapi.hxx
index f701b98972ae..47d5b408659f 100644
--- a/include/sfx2/mailmodelapi.hxx
+++ b/include/sfx2/mailmodelapi.hxx
@@ -43,7 +43,7 @@ class SFX2_DLLPUBLIC SfxMailModel
 protected:
 enum SaveResult
 {
-SAVE_SUCCESSFULL,
+SAVE_SUCCESSFUL,
 SAVE_CANCELLED,
 SAVE_ERROR
 };
diff --git a/sfx2/source/dialog/bluthsnd.cxx b/sfx2/source/dialog/bluthsnd.cxx
index ded98ceb0a1e..0083f0749768 100644
--- a/sfx2/source/dialog/bluthsnd.cxx
+++ b/sfx2/source/dialog/bluthsnd.cxx
@@ -20,7 +20,7 @@ SfxBluetoothModel::SendMailResult 
SfxBluetoothModel::SaveAndSend( const css::uno
 OUString   aFileName;
 
 eSaveResult  = SaveDocumentAsFormat( OUString(), xFrame, OUString(), 
aFileName );
-if( eSaveResult == SAVE_SUCCESSFULL )
+if( eSaveResult == SAVE_SUCCESSFUL )
 {
 maAttachedDocuments.push_back( aFileName );
 return Send();
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 5e5d079fd934..f361d92b858d 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -187,7 +187,7 @@ SfxMailModel::SaveResult 
SfxMailModel::ShowFilterOptionsDialog(
 rArgs[rNumArgs-1].Name = pProp->Name;
 rArgs[rNumArgs-1].Value = pProp->Value;
 }
-eRet = SAVE_SUCCESSFULL;
+eRet = SAVE_SUCCESSFUL;
 }
 else
 {
@@ -541,13 +541,13 @@ SfxMailModel::SaveResult 
SfxMailModel::SaveDocumentAsFormat(
 xSMGR, xModel, 
aFilterName, rType, bModified, nNumArgs, aArgs );
 
 // don't continue on dialog cancel or error
-if ( eShowPDFFilterDialog != SAVE_SUCCESSFULL )
+if ( eShowPDFFilterDialog != SAVE_SUCCESSFUL )
 return eShowPDFFilterDialog;
 }
 
 xStorable->storeToURL( aFileURL, aArgs );
 rFileNamePath = aFileURL;
-eRet = SAVE_SUCCESSFULL;
+eRet = SAVE_SUCCESSFUL;
 
 if( !bSendAsPDF )
 {
@@ -607,7 +607,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
 {
 xStorable->storeToURL( aFileURL, aArgs );
 rFileNamePath = aFileURL;
-eRet = SAVE_SUCCESSFULL;
+eRet = SAVE_SUCCESSFUL;
 }
 catch ( css::io::IOException& )
 {
@@ -649,9 +649,9 @@ SfxMailModel::SendMailResult SfxMailModel::AttachDocument(
 OUString sFileName;
 
 SaveResult eSaveResult = SaveDocumentAsFormat( sAttachmentTitle, 
xFrameOrModel, OUString()/*sDocumentType*/, sFileName );
-if ( eSaveResult == SAVE_SUCCESSFULL &&  !sFileName.isEmpty() )
+if ( eSaveResult == SAVE_SUCCESSFUL &&  !sFileName.isEmpty() )
 maAttachedDocuments.push_back(sFileName);
-return eSaveResult == SAVE_SUCCESSFULL ? SEND_MAIL_OK : SEND_MAIL_ERROR;
+return eSaveResult == SAVE_SUCCESSFUL ? SEND_MAIL_OK : SEND_MAIL_ERROR;
 }
 
 SfxMailModel::SendMailResult SfxMailModel::Send( const css::uno::Reference< 
css::frame::XFrame >& xFrame )
@@ -781,7 +781,7 @@ SfxMailModel::SendMailResult SfxMailModel::SaveAndSend( 
const css::uno::Referenc
 
 eSaveResult = SaveDocumentAsFormat( OUString(), xFrame, rTypeName, 
aFileName );
 
-if ( eSaveResult == SAVE_SUCCESSFULL )
+if ( eSaveResult == SAVE_SUCCESSFUL )
 {
 maAttachedDocuments.push_back( aFileName );
 return Send( xFrame );


Re: Starting contributions for your organization

2021-09-11 Thread Hossein Nourikhah

Hello Manan,

I am Hossein Nourikhah, the Developer Community Architect for The 
Document

Foundation (TDF). You can find me in dev irc by the name hossein.

The best way to begin contribution is to start from the small 
improvements.

When you are able to build the LibreOffice from the source code, you can
do some of these small improvements called EasyHacks:
https://wiki.documentfoundation.org/Development/EasyHacks

I will contact you to schedule a talk, so that I can help you get 
started.


Regards,
Hossein

On 11.09.2021 18:15, Manan Uppadhyay wrote:

Hello sir/ma'am,
I am Manan Uppadhyay, an Electronics undergrad from BITS Pilani, Goa.
I've just entered my second year and am looking to get started with
open source contributions. I am a front end developer and have decent
knowledge of Python, Javascript, C++ and Java.

I would love to contribute to your organization but could you please
tell me how to get started?
Hoping to hear from you soon.

Regards
Manan


--
Hossein Nourikhah, Ph.D.
Developer Community Architect
The Document Foundation (TDF)
Email: hoss...@libreoffice.org
Wiki:  https://wiki.documentfoundation.org/User:Hossein
IRC:   hossein at libreoffice-dev room in LiberaChat Network
   irc://irc.libera.chat/#libreoffice-dev


[Libreoffice-commits] mso-dumper.git: Makefile test/wmf

2021-09-11 Thread Libreoffice Gerrit user
 Makefile   |1 
 test/wmf/pass/TypeDetectionExample.wmf |binary
 test/wmf/pass/beef.wmf |binary
 test/wmf/pass/tdf88163.wmf |binary
 test/wmf/pass/vegetable.wmf|binary
 test/wmf/pass/visio_import_source.wmf  |binary
 test/wmf/test.py   |   46 +
 7 files changed, 47 insertions(+)

New commits:
commit db25622001241fda6f2a1c3a1cdff4bc79c6b65e
Author: Hossein 
AuthorDate: Sun Sep 12 00:31:38 2021 +0200
Commit: Hossein 
CommitDate: Sun Sep 12 00:43:37 2021 +0200

Add test and sample wmf files for wmf-dump.py

Added test.py similar to the test.py for emf files, and samples from the
LibreOffice Core source code and attachments from the Bugzilla. The test
is added to the Makefile, so that it is invoked with 'make check'.

To check:

cd test/wmf && ./test.py

Or simply:

make check

Change-Id: Ia2e819f48eae8cc4efc26411522ba1472bd19da4
Reviewed-on: https://gerrit.libreoffice.org/c/mso-dumper/+/121969
Tested-by: Hossein 
Reviewed-by: Hossein 

diff --git a/Makefile b/Makefile
index 39312bb..a57d4fb 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
 check:
cd test/doc && ./test.py
cd test/emf && ./test.py
+   cd test/wmf && ./test.py
pycodestyle --ignore=E501 msodumper/binarystream.py
pycodestyle --ignore=E501 msodumper/msometa.py
pycodestyle --ignore=E501 doc-dump.py msodumper/doc*.py test/doc/test.py
diff --git a/test/wmf/pass/TypeDetectionExample.wmf 
b/test/wmf/pass/TypeDetectionExample.wmf
new file mode 100644
index 000..7ed7069
Binary files /dev/null and b/test/wmf/pass/TypeDetectionExample.wmf differ
diff --git a/test/wmf/pass/beef.wmf b/test/wmf/pass/beef.wmf
new file mode 100644
index 000..0947521
Binary files /dev/null and b/test/wmf/pass/beef.wmf differ
diff --git a/test/wmf/pass/tdf88163.wmf b/test/wmf/pass/tdf88163.wmf
new file mode 100644
index 000..edcab8a
Binary files /dev/null and b/test/wmf/pass/tdf88163.wmf differ
diff --git a/test/wmf/pass/vegetable.wmf b/test/wmf/pass/vegetable.wmf
new file mode 100644
index 000..364d122
Binary files /dev/null and b/test/wmf/pass/vegetable.wmf differ
diff --git a/test/wmf/pass/visio_import_source.wmf 
b/test/wmf/pass/visio_import_source.wmf
new file mode 100644
index 000..88deac9
Binary files /dev/null and b/test/wmf/pass/visio_import_source.wmf differ
diff --git a/test/wmf/test.py b/test/wmf/test.py
new file mode 100755
index 000..831125e
--- /dev/null
+++ b/test/wmf/test.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python3
+# -*- encoding: UTF-8 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+import sys
+sys.path.append(sys.path[0] + "/../..")
+wmf_dumper = __import__('wmf-dump')
+from xml.etree import ElementTree
+import unittest
+import os
+
+
+class Test(unittest.TestCase):
+def dump(self, name):
+try:
+os.unlink("%s.wmf.xml" % name)
+except OSError:
+pass
+sock = open("%s.wmf.xml" % name, "w")
+saved = sys.stdout
+sys.stdout = sock
+wmf_dumper.main(["wmf-dumper", "%s.wmf" % name])
+sys.stdout = saved
+sock.close()
+tree = ElementTree.parse('%s.wmf.xml' % name)
+self.root = tree.getroot()
+# Make sure everything is dumped - so it can't happen that dump(a) == 
dump(b), but a != b.
+self.assertEqual(0, len(self.root.findall('todo')))
+
+def test_pass(self):
+"""This test just makes sure that all files in the 'pass' directory are
+dumped without problems."""
+
+for dirname, dirnames, filenames in os.walk('pass'):
+for filename in filenames:
+if filename.endswith(".wmf"):
+self.dump(os.path.join(dirname, filename).replace('.wmf', 
''))
+
+if __name__ == '__main__':
+unittest.main()
+
+# vim:set filetype=python shiftwidth=4 softtabstop=4 expandtab:


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

2021-09-11 Thread Mike Kaganski (via logerrit)
 pyuno/source/module/pyuno_adapter.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit b733ccad171e6def8fbdb93f31875dfdea47bdc6
Author: Mike Kaganski 
AuthorDate: Sat Sep 11 19:31:20 2021 +0200
Commit: Mike Kaganski 
CommitDate: Sun Sep 12 00:41:12 2021 +0200

Make this instance of cppu::OImplementationId function-local

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

diff --git a/pyuno/source/module/pyuno_adapter.cxx 
b/pyuno/source/module/pyuno_adapter.cxx
index a8efd4153831..53e012a8e78f 100644
--- a/pyuno/source/module/pyuno_adapter.cxx
+++ b/pyuno/source/module/pyuno_adapter.cxx
@@ -27,6 +27,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
@@ -66,16 +67,15 @@ Adapter::~Adapter()
 mWrappedObject.scratch();
 }
 
-static cppu::OImplementationId g_id( false );
-
 Sequence Adapter::getUnoTunnelId()
 {
+static const cppu::OImplementationId g_id(false);
 return g_id.getImplementationId();
 }
 
 sal_Int64 Adapter::getSomething( const Sequence< sal_Int8 > &id)
 {
-if( id == g_id.getImplementationId() )
+if (isUnoTunnelId(id))
 return reinterpret_cast(this);
 return 0;
 }


[Libreoffice-commits] mso-dumper.git: msodumper/wmfrecord.py

2021-09-11 Thread Libreoffice Gerrit user
 msodumper/wmfrecord.py |   98 -
 1 file changed, 89 insertions(+), 9 deletions(-)

New commits:
commit e4a481e77c913710c0bb3b59b0749e99fdc1470a
Author: Hossein 
AuthorDate: Sat Sep 11 23:59:28 2021 +0200
Commit: Hossein 
CommitDate: Sun Sep 12 00:05:13 2021 +0200

Dump CreateFontIndirect, SetBkMode and SetTextAlign

The dump() methods for CreateFontIndirect (and also Font), SetBkMode
and SetTextAlign are implemented.

Change-Id: Ic15b4cee44f4eb28bef61f21b0ecf2025e03b4fd
Reviewed-on: https://gerrit.libreoffice.org/c/mso-dumper/+/121968
Tested-by: Hossein 
Reviewed-by: Hossein 

diff --git a/msodumper/wmfrecord.py b/msodumper/wmfrecord.py
index feb9d24..cdc0581 100644
--- a/msodumper/wmfrecord.py
+++ b/msodumper/wmfrecord.py
@@ -594,7 +594,7 @@ class WMFStream(BinaryStream):
 # META_EOF
 if type == "META_EOF":
 break
-if self.pos + size * 2 <= self.size:
+if (self.pos + size * 2) <= self.size:
 self.pos += size * 2
 else:
 print('')
@@ -823,12 +823,28 @@ class SetPaletteEntries(WMFRecord):
 
 
 class SetBkMode(WMFRecord):
-def __init__(self, parent):
+"""The SetBkMode record is used to define the background raster operation
+   mix mode (pens, text, hatched brushes, and inside of filled objects
+   with background colors)"""
+def __init__(self, parent, name=None):
 WMFRecord.__init__(self, parent)
+if name:
+self.name = name
+else:
+self.name = "setbkmode"
 
 def dump(self):
-print("")
 pass
+dataPos = self.pos
+print('<%s type="SetBkMode">' % self.name)
+self.printAndSet("RecordSize", self.readuInt32(), hexdump=False)
+self.printAndSet("RecordFunction", self.readuInt16(), hexdump=True)
+self.printAndSet("BkMode", self.readuInt16(), hexdump=False)
+# Check optional reserved value if the size shows that it exists
+if self.RecordSize == 5:
+self.printAndSet("Reserved", self.readuInt16(), hexdump=False)
+print('' % self.name)
+assert self.pos == dataPos + self.RecordSize * 2
 
 
 class SetMapMode(WMFRecord):
@@ -1336,12 +1352,25 @@ class SelectObject(WMFRecord):
 
 
 class SetTextAlign(WMFRecord):
-def __init__(self, parent):
+"""The SetTextAlign record is used to define the text alignment"""
+def __init__(self, parent, name=None):
 WMFRecord.__init__(self, parent)
+if name:
+self.name = name
+else:
+self.name = "settextalign"
 
 def dump(self):
-print("")
-pass
+dataPos = self.pos
+print('<%s type="SetTextAlign">' % self.name)
+self.printAndSet("RecordSize", self.readuInt32(), hexdump=False)
+self.printAndSet("RecordFunction", self.readuInt16(), hexdump=True)
+self.printAndSet("TextAlignmentMode", self.readuInt16(), hexdump=False)
+# Check optional reserved value if the size shows that it exists
+if self.RecordSize == 5:
+self.printAndSet("Reserved", self.readuInt16(), hexdump=False)
+print('' % self.name)
+assert self.pos == dataPos + self.RecordSize * 2
 
 
 class Arc(WMFRecord):
@@ -1453,12 +1482,63 @@ class CreatePenIndirect(WMFRecord):
 
 
 class CreateFontIndirect(WMFRecord):
-def __init__(self, parent):
+"""The CreateFontIndirect record is used to create a font object"""
+def __init__(self, parent, name=None):
 WMFRecord.__init__(self, parent)
+if name:
+self.name = name
+else:
+self.name = "createfontindirect"
 
 def dump(self):
-print("")
-pass
+dataPos = self.pos
+print('<%s type="CreateFontIndirect">' % self.name)
+self.printAndSet("RecordSize", self.readuInt32(), hexdump=False)
+self.printAndSet("RecordFunction", self.readuInt16(), hexdump=True)
+# Check optional reserved value if the size shows that it exists
+if self.RecordSize > 3:
+Font(self, "Font").dump()
+print('' % self.name)
+# RecordSize is described in words, so we should double for bytes
+assert self.pos == dataPos + self.RecordSize * 2
+
+
+class Font(WMFRecord):
+"""The Font object describes a logical font and its attributes"""
+def __init__(self, parent, name=None):
+WMFRecord.__init__(self, parent)
+if name:
+self.name = name
+else:
+self.name = "Font"
+
+def dump(self):
+dataPos = self.pos
+print('<%s type="Font">' % self.name)
+self.printAndSet("Height", self.readInt16(), hexdump=False)
+self.printAndSet("Width", self.readInt16(), hexdump=False)
+self.printAndSet("Escapement", self.readInt16(), hexdump=False)
+self.printAndSet("Orientati

[Libreoffice-commits] mso-dumper.git: msodumper/wmfrecord.py

2021-09-11 Thread Libreoffice Gerrit user
 msodumper/wmfrecord.py |  827 -
 1 file changed, 750 insertions(+), 77 deletions(-)

New commits:
commit b641e7b062b86e4c9b5f19c1819cf2ebceee4ab8
Author: Hossein 
AuthorDate: Sat Sep 11 21:49:37 2021 +0200
Commit: Hossein 
CommitDate: Sat Sep 11 21:56:24 2021 +0200

Added classes with empty dump for all wmf records

Added classes for all the wmf records according to the function names
in GDI. Checked all the names to be compliant with Wine and MS
documents.

The dump() functions for ~70 classes will be completed later.

Change-Id: I9893cc1db933b09916d0fa5d73bad39526b2
Reviewed-on: https://gerrit.libreoffice.org/c/mso-dumper/+/121965
Tested-by: Hossein 
Reviewed-by: Hossein 

diff --git a/msodumper/wmfrecord.py b/msodumper/wmfrecord.py
index 96cdca1..feb9d24 100644
--- a/msodumper/wmfrecord.py
+++ b/msodumper/wmfrecord.py
@@ -6,6 +6,7 @@
 #
 
 from .binarystream import BinaryStream
+import base64
 
 PlaceableKey = {
 0x9ac6cdd7: "META_PLACEABLE",
@@ -629,7 +630,6 @@ class Rect(WMFRecord):
 
 class RectL(WMFRecord):
 """The RectL Object defines a rectangle."""
-
 def __init__(self, parent, name=None):
 WMFRecord.__init__(self, parent)
 if name:
@@ -649,7 +649,6 @@ class RectL(WMFRecord):
 
 class SizeL(WMFRecord):
 """The SizeL Object defines a rectangle."""
-
 def __init__(self, parent, name=None):
 WMFRecord.__init__(self, parent)
 if name:
@@ -667,7 +666,6 @@ class SizeL(WMFRecord):
 
 class PointL(WMFRecord):
 """The PointL Object defines the coordinates of a point."""
-
 def __init__(self, parent, name=None):
 WMFRecord.__init__(self, parent)
 if name:
@@ -685,7 +683,6 @@ class PointL(WMFRecord):
 
 class PointS(WMFRecord):
 """The PointS Object defines the x- and y-coordinates of a point."""
-
 def __init__(self, parent, name):
 WMFRecord.__init__(self, parent)
 self.name = name
@@ -700,7 +697,6 @@ class PointS(WMFRecord):
 
 class ColorRef(WMFRecord):
 """The ColorRef Object defines the RGB color."""
-
 def __init__(self, parent, name):
 WMFRecord.__init__(self, parent)
 self.name = name
@@ -715,7 +711,7 @@ class ColorRef(WMFRecord):
 self.parent.pos = self.pos
 
 
-class WMFLineto(WMFRecord):
+class Lineto(WMFRecord):
 """Draws a line from the current position up to, but not including, the
 specified point."""
 def __init__(self, parent):
@@ -794,7 +790,7 @@ class PlaceableHeader(WMFRecord):
 return False
 
 
-class WmfSetviewportorgex(WMFRecord):
+class Setviewportorgex(WMFRecord):
 """Defines the viewport origin."""
 
 def __init__(self, parent):
@@ -808,78 +804,755 @@ class WmfSetviewportorgex(WMFRecord):
 assert self.pos - posOrig == self.Size
 
 
-"""The RecordType enumeration defines values that uniquely identify EMF 
records."""
+class RealizePalette(WMFRecord):
+def __init__(self, parent):
+WMFRecord.__init__(self, parent)
+
+def dump(self):
+print("")
+pass
+
+
+class SetPaletteEntries(WMFRecord):
+def __init__(self, parent):
+WMFRecord.__init__(self, parent)
+
+def dump(self):
+print("")
+pass
+
+
+class SetBkMode(WMFRecord):
+def __init__(self, parent):
+WMFRecord.__init__(self, parent)
+
+def dump(self):
+print("")
+pass
+
+
+class SetMapMode(WMFRecord):
+def __init__(self, parent):
+WMFRecord.__init__(self, parent)
+
+def dump(self):
+print("")
+pass
+
+
+class SetROP2(WMFRecord):
+def __init__(self, parent):
+WMFRecord.__init__(self, parent)
+
+def dump(self):
+print("")
+pass
+
+
+class SetRelAbs(WMFRecord):
+def __init__(self, parent):
+WMFRecord.__init__(self, parent)
+
+def dump(self):
+print("")
+pass
+
+
+class SetPolyFillMode(WMFRecord):
+def __init__(self, parent):
+WMFRecord.__init__(self, parent)
+
+def dump(self):
+print("")
+pass
+
+
+class SetStretchBltMode(WMFRecord):
+def __init__(self, parent):
+WMFRecord.__init__(self, parent)
+
+def dump(self):
+print("")
+pass
+
+
+class SetTextCharacterExtra(WMFRecord):
+def __init__(self, parent):
+WMFRecord.__init__(self, parent)
+
+def dump(self):
+print("")
+pass
+
+
+class RestoreDC:
+def __init__(self, parent):
+WMFRecord.__init__(self, parent)
+
+def dump(self):
+print("")
+pass
+
+
+class ResizePalette(WMFRecord):
+def __init__(self, parent):
+WMFRecord.__init__(self, parent)
+
+def dump(self):
+print("")
+pass
+
+
+class CreateDIBPatternBrush(WMFRecord):
+def __init__(self, parent):
+WMFRecord.__init__(self, parent)
+
+def dump(self):
+print("")
+pass
+
+
+class SetLayout(WMFR

Starting contributions for your organization

2021-09-11 Thread Manan Uppadhyay
Hello sir/ma'am,
I am Manan Uppadhyay, an Electronics undergrad from BITS Pilani, Goa. I've
just entered my second year and am looking to get started with open source
contributions. I am a front end developer and have decent knowledge of
Python, Javascript, C++ and Java.

I would love to contribute to your organization but could you please tell
me how to get started?
Hoping to hear from you soon.

Regards
Manan


[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sw/source

2021-09-11 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7e54667cbfafac1ea806245475930fd2dcc6fe36
Author: Caolán McNamara 
AuthorDate: Fri Sep 10 13:58:13 2021 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sat Sep 11 17:29:28 2021 +0200

Resolves: tdf#143777 Exclude recipient is always greyed out

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

diff --git a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx 
b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx
index 3f3ace7d801a..a97974f57f34 100644
--- a/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx
+++ b/sw/source/uibase/dbui/mailmergetoolbarcontrols.cxx
@@ -386,7 +386,7 @@ void MMExcludeEntryController::statusChanged(const 
frame::FeatureStateEvent& rEv
 }
 else
 {
-m_xExcludeCheckbox->set_sensitive(false);
+m_xExcludeCheckbox->set_sensitive(true);
 
m_xExcludeCheckbox->set_active(xConfigItem->IsRecordExcluded(xConfigItem->GetResultSetPosition()));
 }
 }


[Libreoffice-commits] core.git: editeng/source include/editeng include/svx svx/inc

2021-09-11 Thread Noel Grandin (via logerrit)
 editeng/source/editeng/impedit.hxx  |   14 +++---
 editeng/source/editeng/impedit2.cxx |8 
 editeng/source/uno/unoedprx.cxx |4 ++--
 include/editeng/SpellPortions.hxx   |   36 ++--
 include/editeng/numitem.hxx |7 +++
 include/svx/svdlayer.hxx|2 +-
 include/svx/svdpage.hxx |   13 +
 svx/inc/textchain.hxx   |6 +++---
 svx/inc/textchaincursor.hxx |2 +-
 svx/inc/textchainflow.hxx   |   22 ++
 10 files changed, 54 insertions(+), 60 deletions(-)

New commits:
commit 77fca82aab16619a693d53e970ac717f54105e95
Author: Noel Grandin 
AuthorDate: Sat Sep 11 15:53:11 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Sep 11 17:24:16 2021 +0200

clang:optin.performance.Padding in svx,editeng

Excessive padding in 'struct svx::SpellPortion' (18 padding bytes, where
2 is optimal).
Excessive padding in 'class SvxNumRule' (11 padding bytes, where 3 is
optimal).
Excessive padding in 'struct SpellInfo' (10 padding bytes, where 2 is
optimal).
Excessive padding in 'struct ImpEditEngine::LineAreaInfo' (14 padding
bytes, where 6 is optimal).
Excessive padding in 'class ImpChainLinkProperties' (5 padding bytes,
where 1 is optimal).
Excessive padding in 'class TextChainFlow' (20 padding bytes, where 4 is
optimal).
Excessive padding in 'class SdrObjList' (13 padding bytes, where 5 is
optimal).
Excessive padding in 'class SdrLayer' (12 padding bytes, where 4 is
optimal).

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

diff --git a/editeng/source/editeng/impedit.hxx 
b/editeng/source/editeng/impedit.hxx
index b894bd2153e6..a8f07741cc41 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -155,14 +155,14 @@ typedef std::vector  
SpellContentSelections;
 
 struct SpellInfo
 {
+EditPaM aCurSentenceStart;
+svx::SpellPortionsaLastSpellPortions;
+SpellContentSelections  aLastSpellContentSelections;
 EESpellStateeState;
 EPaMaSpellStart;
 EPaMaSpellTo;
-EditPaM aCurSentenceStart;
 boolbSpellToEnd;
 boolbMultipleDoc;
-svx::SpellPortionsaLastSpellPortions;
-SpellContentSelections  aLastSpellContentSelections;
 SpellInfo() : eState(EESpellState::Ok), bSpellToEnd(true), 
bMultipleDoc(false)
 { }
 };
@@ -1139,14 +1139,14 @@ public:
 };
 struct LineAreaInfo
 {
-sal_Int16 nColumn; // Column number; when overflowing, equal to total 
number of columns
 ParaPortion& rPortion; // Current ParaPortion
-sal_Int32 nPortion;
 EditLine* pLine; // Current line, or nullptr for paragraph start
-sal_Int32 nLine;
+tools::Long nHeightNeededToNotWrap;
 tools::Rectangle aArea; // The area for the line (or for rPortion's 
first line offset)
 // Bottom coordinate *does not* belong to the 
area
-tools::Long nHeightNeededToNotWrap;
+sal_Int32 nPortion;
+sal_Int32 nLine;
+sal_Int16 nColumn; // Column number; when overflowing, equal to total 
number of columns
 };
 using IterateLinesAreasFunc = std::function;
 enum IterFlag // bitmask
diff --git a/editeng/source/editeng/impedit2.cxx 
b/editeng/source/editeng/impedit2.cxx
index 8173558a097f..6d27b50dfd68 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3124,13 +3124,13 @@ void ImpEditEngine::IterateLineAreas(const 
IterateLinesAreasFunc& f, IterFlag eO
 return;
 
 LineAreaInfo aInfo{
-nColumn, // nColumn
 rPortion, // rPortion
-n, // nPortion
 nullptr, // pLine
-0, // nLine
+0, // nHeightNeededToNotWrap
 { aLineStart, Size{ nColumnWidth, 
rPortion.GetFirstLineOffset() } }, // aArea
-0 // nHeightNeededToNotWrap
+n, // nPortion
+0, // nLine
+nColumn // nColumn
 };
 auto eResult = f(aInfo);
 if (eResult == CallbackResult::Stop)
diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx
index 8cf7d8e62417..161633a137a2 100644
--- a/editeng/source/uno/unoedprx.cxx
+++ b/editeng/source/uno/unoedprx.cxx
@@ -52,9 +52,9 @@ public:
 mnEEIndex(0),
 mnFieldOffset(0),
 mnFieldLen(0),
-mbInField(false),
 mnBulletOffset(0),
 mnBulletLen(0),
+mbInField(false),
 mbInBullet(false) {};
 
 // Get/Set current paragraph
@@ -111,9 +111,9 @@ private:
 sal_Int32 mnEEIndex;
 sal_Int32 mnFieldOffse

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

2021-09-11 Thread Noel Grandin (via logerrit)
 include/sfx2/childwin.hxx  |   14 +++---
 include/sfx2/ctrlitem.hxx  |2 +-
 sfx2/source/appl/childwin.cxx  |4 ++--
 sfx2/source/control/ctrlitem.cxx   |8 
 xmloff/source/core/xmltoken.cxx|9 -
 xmloff/source/draw/animexp.cxx |   14 +++---
 xmloff/source/draw/shapeimport.cxx |2 +-
 7 files changed, 30 insertions(+), 23 deletions(-)

New commits:
commit d114a341bc9e891b2e10ff60ddadb0b5f58e6381
Author: Noel Grandin 
AuthorDate: Sat Sep 11 15:51:39 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Sep 11 17:24:02 2021 +0200

clang:optin.performance.Padding in sfx2

Excessive padding in 'class SfxControllerItem' (10 padding bytes, where
2 is optimal).
Excessive padding in 'struct SfxChildWinInfo' (11 padding bytes, where 3
is optimal).
Excessive padding in 'struct SfxChildWinFactory' (12 padding bytes,
where 4 is optimal).
Excessive padding in 'class SfxChildWindow' (10 padding bytes, where 2
is optimal).

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

diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index e21832b575c4..cccfa4d87a0b 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -60,13 +60,13 @@ namespace o3tl
 // ChildWindow Configuration
 struct SAL_DLLPUBLIC_RTTI SfxChildWinInfo
 {
-boolbVisible;
-Point   aPos;
-SizeaSize;
-SfxChildWindowFlags nFlags;
 OUStringaExtraString;
 OUStringaModule;
 OString aWinState;
+Point   aPos;
+SizeaSize;
+SfxChildWindowFlags nFlags;
+boolbVisible;
 
 SfxChildWinInfo()
 {
@@ -85,8 +85,8 @@ typedef std::unique_ptr (*SfxChildWinCtor)( 
vcl::Window *pParent
 struct SFX2_DLLPUBLIC SfxChildWinFactory
 {
 SfxChildWinCtor pCtor;  // Factory method
-sal_uInt16  nId;// ChildWindow-Id ( SlotId )
 SfxChildWinInfo aInfo;  // Configuration
+sal_uInt16  nId;// ChildWindow-Id ( SlotId )
 sal_uInt16  nPos;   // Position in UI
 
 SfxChildWinFactory( SfxChildWinCtor pTheCtor, sal_uInt16 nID, sal_uInt16 n 
);
@@ -99,12 +99,12 @@ extern SFX2_DLLPUBLIC bool ParentIsFloatingWindow(const 
vcl::Window *pParent);
 class SFX2_DLLPUBLIC SfxChildWindow
 {
 VclPtrpParent; // parent window ( Topwindow )
-sal_uInt16 nType;   // ChildWindow-Id
 VclPtrpWindow; // actual contents
+std::unique_ptr< SfxChildWindow_Impl>   pImpl;// 
Implementation data
 std::shared_ptr xController; // actual contents
 SfxChildAlignment  eChildAlignment; // Current 
css::drawing::Alignment
-std::unique_ptr< SfxChildWindow_Impl>   pImpl;// 
Implementation data
  // Another window in pWindow
+sal_uInt16 nType;   // ChildWindow-Id
 SAL_DLLPRIVATE void ClearWorkwin();
 
 protected:
diff --git a/include/sfx2/ctrlitem.hxx b/include/sfx2/ctrlitem.hxx
index 27f2d69422ea..03e530c782d8 100644
--- a/include/sfx2/ctrlitem.hxx
+++ b/include/sfx2/ctrlitem.hxx
@@ -30,10 +30,10 @@ class SfxBindings;
 class SFX2_DLLPUBLIC SfxControllerItem
 {
 private:
-sal_uInt16  nId;
 SfxControllerItem*  pNext; // to notify next ControllerItem
 SfxBindings*pBindings;
 MapUnit eFallbackCoreMetric;
+sal_uInt16  nId;
 
 public:
 SfxBindings &   GetBindings() {
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 404d912d9d3e..b00f70a3afb3 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -143,9 +143,9 @@ bool GetSplitSizeFromString( const OUString& rStr, Size& 
rSize )
 
 SfxChildWindow::SfxChildWindow(vcl::Window *pParentWindow, sal_uInt16 nId)
 : pParent(pParentWindow)
-, nType(nId)
-, eChildAlignment(SfxChildAlignment::NOALIGNMENT)
 , pImpl(new SfxChildWindow_Impl)
+, eChildAlignment(SfxChildAlignment::NOALIGNMENT)
+, nType(nId)
 {
 pImpl->pFact = nullptr;
 pImpl->bHideNotDelete = false;
diff --git a/sfx2/source/control/ctrlitem.cxx b/sfx2/source/control/ctrlitem.cxx
index b55ceda7d349..28edfec666de 100644
--- a/sfx2/source/control/ctrlitem.cxx
+++ b/sfx2/source/control/ctrlitem.cxx
@@ -170,19 +170,19 @@ void SfxControllerItem::SetId( sal_uInt16 nItemId )
 
 // creates an atomic item for a controller without registration.
 SfxControllerItem::SfxControllerItem()
-: nId(0)
-, pNext(this)
+: pNext(this)
 , pBindings(nullptr)
 , eFallbackCoreMetric(MapUnit::Map100thMM)
+

[Libreoffice-commits] mso-dumper.git: convert-enum.py Makefile msodumper/wmfrecord.py

2021-09-11 Thread Libreoffice Gerrit user
 Makefile   |1 
 convert-enum.py|   46 
 msodumper/wmfrecord.py |  272 -
 3 files changed, 315 insertions(+), 4 deletions(-)

New commits:
commit 9d706a8f4a0d35a2b11ff1f67b401af05926241a
Author: Hossein 
AuthorDate: Sat Sep 11 16:08:15 2021 +0200
Commit: Hossein 
CommitDate: Sat Sep 11 16:13:03 2021 +0200

Added all the enums from the wmf docs

All the enumerations used for the WMF files as described in [MS-WMF]
v20210625 (protocol revision 17.0) are added, except those that were
already existing.
The convert-enum.py script converts the C-style enums to Python
dictionaries that are used in the Python code.

Change-Id: Ia12f4e326e927d21f17ef9e2fb6729e63e1e33e3
Reviewed-on: https://gerrit.libreoffice.org/c/mso-dumper/+/121943
Tested-by: Hossein 
Reviewed-by: Hossein 

diff --git a/Makefile b/Makefile
index 9193c41..39312bb 100644
--- a/Makefile
+++ b/Makefile
@@ -9,3 +9,4 @@ check:
pycodestyle --ignore=E501 swlaycache-dump.py 
msodumper/swlaycacherecord.py
pycodestyle --ignore=E501 ole1-dump.py msodumper/ole1record.py
pycodestyle --ignore=E501 ole2preview-dump.py 
msodumper/ole2previewrecord.py
+   pycodestyle --ignore=E501 convert-enum.py
diff --git a/convert-enum.py b/convert-enum.py
new file mode 100755
index 000..0a1cae0
--- /dev/null
+++ b/convert-enum.py
@@ -0,0 +1,46 @@
+#!/usr/bin/env python3
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#
+# This is a simple script to convert C enum from documentation to the
+# Dict that is used in the Python code
+#
+# Example input:
+# ---
+# typedef enum
+# {
+# BLACKONWHITE = 0x0001,
+# WHITEONBLACK = 0x0002,
+# COLORONCOLOR = 0x0003,
+# HALFTONE = 0x0004
+# } StretchMode;
+# ---
+#
+# Example output:
+# ---
+# StretchMode = {
+# 0x0001: "BLACKONWHITE",
+# 0x0002: "WHITEONBLACK",
+# 0x0003: "COLORONCOLOR",
+# 0x0004: "HALFTONE",
+# }
+# ---
+
+import sys
+
+result = ""
+for line in sys.stdin:
+word = line.split()
+if len(word) == 0 or word[0] == "{" or word[0] == "enum":
+continue
+elif word[0] == "}":
+name = word[1].replace(";", "")
+result = name + " = {\n" + result
+elif len(word) == 3:
+enum = word[2].replace(",", "")
+result += ("" + enum + ": \"" + word[0] + "\",\n")
+result += "}"
+print(result)
diff --git a/msodumper/wmfrecord.py b/msodumper/wmfrecord.py
index 2294301..96cdca1 100644
--- a/msodumper/wmfrecord.py
+++ b/msodumper/wmfrecord.py
@@ -11,9 +11,33 @@ PlaceableKey = {
 0x9ac6cdd7: "META_PLACEABLE",
 }
 
-FileType = {
-0x00: "Memory",
-0x01: "Disk",
+BinaryRasterOperation = {
+0x0001: "R2_BLACK",
+0x0002: "R2_NOTMERGEPEN",
+0x0003: "R2_MASKNOTPEN",
+0x0004: "R2_NOTCOPYPEN",
+0x0005: "R2_MASKPENNOT",
+0x0006: "R2_NOT",
+0x0007: "R2_XORPEN",
+0x0008: "R2_NOTMASKPEN",
+0x0009: "R2_MASKPEN",
+0x000A: "R2_NOTXORPEN",
+0x000B: "R2_NOP",
+0x000C: "R2_MERGENOTPEN",
+0x000D: "R2_COPYPEN",
+0x000E: "R2_MERGEPENNOT",
+0x000F: "R2_MERGEPEN",
+0x0010: "R2_WHITE",
+}
+
+BitCount = {
+0x: "BI_BITCOUNT_0",
+0x0001: "BI_BITCOUNT_1",
+0x0004: "BI_BITCOUNT_2",
+0x0008: "BI_BITCOUNT_3",
+0x0010: "BI_BITCOUNT_4",
+0x0018: "BI_BITCOUNT_5",
+0x0020: "BI_BITCOUNT_6",
 }
 
 # The BrushStyle Enumeration specifies the different possible brush types that 
can be used in graphics operations.
@@ -30,6 +54,81 @@ BrushStyle = {
 0x0009: "BS_MONOPATTERN"
 }
 
+CharacterSet = {
+0x0001: "DEFAULT_CHARSET",
+0x0002: "SYMBOL_CHARSET",
+0x004D: "MAC_CHARSET",
+0x0080: "SHIFTJIS_CHARSET",
+0x0081: "HANGUL_CHARSET",
+0x0082: "JOHAB_CHARSET",
+0x0086: "GB2312_CHARSET",
+0x0088: "CHINESEBIG5_CHARSET",
+0x00A1: "GREEK_CHARSET",
+0x00A2: "TURKISH_CHARSET",
+0x00A3: "VIETNAMESE_CHARSET",
+0x00B1: "HEBREW_CHARSET",
+0x00B2: "ARABIC_CHARSET",
+0x00BA: "BALTIC_CHARSET",
+0x00CC: "RUSSIAN_CHARSET",
+0x00DE: "THAI_CHARSET",
+0x00EE: "EASTEUROPE_CHARSET",
+0x00FF: "OEM_CHARSET",
+}
+
+ColorUsage = {
+0x: "DIB_RGB_COLORS",
+0x0001: "DIB_PAL_COLORS",
+0x0002: "DIB_PAL_INDICES",
+}
+
+Compression = {
+0x: "BI_RGB",
+0x0001: "BI_RLE8",
+0x0002: "BI_RLE4",
+0x0003: "BI_BITFIELDS",
+0x0004: "BI_JPEG",
+0x0005: "BI_PNG",
+0x000B: "BI_CMYK",
+0x000C: "BI_CMYKRLE8",
+0x000D: "BI_CMYKRLE4",
+}
+
+FamilyFont = {
+0x00: "FF_DONTCARE",
+0x01: "FF_ROMAN",
+0x02: "FF_SWISS",
+0x03: "FF_MODERN",
+0x04: "FF_SCRIPT",
+0x05: "FF_DECORATIVE

[Libreoffice-commits] core.git: drawinglayer/source framework/inc svtools/source

2021-09-11 Thread Noel Grandin (via logerrit)
 drawinglayer/source/attribute/fillgradientattribute.cxx |   10 +++
 drawinglayer/source/attribute/sdrlineattribute.cxx  |   22 
 framework/inc/uielement/commandinfo.hxx |2 -
 svtools/source/control/valueacc.cxx |4 +-
 svtools/source/control/valueimp.hxx |   10 +++
 5 files changed, 24 insertions(+), 24 deletions(-)

New commits:
commit d8910519f1bc5aa284a79b7d24581d087adf0c29
Author: Noel Grandin 
AuthorDate: Sat Sep 11 14:11:38 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Sep 11 14:59:36 2021 +0200

clang:optin.performance.Padding

Excessive padding in 'struct ValueSetItem' (8 padding bytes, where 0 is
optimal).
Excessive padding in 'struct framework::CommandInfo' (12 padding bytes,
where 4 is optimal). Optimal fields order: aIds, nId, nImageInfo,
consider reordering the fields or adding explicit padding members
[optin.performance.Padding]
Excessive padding in 'class
drawinglayer::attribute::ImpFillGradientAttribute' (10 padding bytes,
where 2 is optimal).
Excessive padding in 'class
drawinglayer::attribute::ImpSdrLineAttribute' (8 padding bytes, where 0
is optimal).

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

diff --git a/drawinglayer/source/attribute/fillgradientattribute.cxx 
b/drawinglayer/source/attribute/fillgradientattribute.cxx
index 1d3a67b02a7a..0e42954e35e6 100644
--- a/drawinglayer/source/attribute/fillgradientattribute.cxx
+++ b/drawinglayer/source/attribute/fillgradientattribute.cxx
@@ -28,13 +28,13 @@ namespace drawinglayer::attribute
 {
 public:
 // data definitions
-GradientStyle   meStyle;
 double  mfBorder;
 double  mfOffsetX;
 double  mfOffsetY;
 double  mfAngle;
 basegfx::BColor maStartColor;
 basegfx::BColor maEndColor;
+GradientStyle   meStyle;
 sal_uInt16  mnSteps;
 
 ImpFillGradientAttribute(
@@ -46,23 +46,23 @@ namespace drawinglayer::attribute
 const basegfx::BColor& rStartColor,
 const basegfx::BColor& rEndColor,
 sal_uInt16 nSteps)
-:   meStyle(eStyle),
-mfBorder(fBorder),
+:   mfBorder(fBorder),
 mfOffsetX(fOffsetX),
 mfOffsetY(fOffsetY),
 mfAngle(fAngle),
 maStartColor(rStartColor),
 maEndColor(rEndColor),
+meStyle(eStyle),
 mnSteps(nSteps)
 {
 }
 
 ImpFillGradientAttribute()
-:   meStyle(GradientStyle::Linear),
-mfBorder(0.0),
+:   mfBorder(0.0),
 mfOffsetX(0.0),
 mfOffsetY(0.0),
 mfAngle(0.0),
+meStyle(GradientStyle::Linear),
 mnSteps(0)
 {
 }
diff --git a/drawinglayer/source/attribute/sdrlineattribute.cxx 
b/drawinglayer/source/attribute/sdrlineattribute.cxx
index 3dd7e16d6ab6..217ed813cdcd 100644
--- a/drawinglayer/source/attribute/sdrlineattribute.cxx
+++ b/drawinglayer/source/attribute/sdrlineattribute.cxx
@@ -28,13 +28,13 @@ namespace drawinglayer::attribute
 {
 public:
 // line definitions
-basegfx::B2DLineJoinmeJoin; // 
B2DLINEJOIN_* defines
 double  mfWidth;// 
1/100th mm, 0.0==hair
 double  mfTransparence; // 
[0.0 .. 1.0], 0.0==no transp.
+double  mfFullDotDashLen;   // sum 
of maDotDashArray (for convenience)
 basegfx::BColor maColor;// 
color of line
+std::vector< double >   maDotDashArray; // 
array of double which defines the dot-dash pattern
+basegfx::B2DLineJoinmeJoin; // 
B2DLINEJOIN_* defines
 css::drawing::LineCap   meCap;  // 
BUTT, ROUND, or SQUARE
-std::vector< double > maDotDashArray; // array 
of double which defines the dot-dash pattern
-double  mfFullDotDashLen;   // sum 
of maDotDashArray (for convenience)
 
 ImpSdrLineAttribute(
 basegfx::B2DLineJoin eJoin,
@@ -44,22 +44,22 @@ namespace drawinglayer::attribut

[Libreoffice-commits] core.git: external/cuckoo

2021-09-11 Thread Caolán McNamara (via logerrit)
 external/cuckoo/UnpackedTarball_cuckoo.mk |4 
 external/cuckoo/cuckoo-coverity.patch |   22 ++
 2 files changed, 26 insertions(+)

New commits:
commit 1fcc0cb5ee5397addee2fcfbebcc2d124a82e8e5
Author: Caolán McNamara 
AuthorDate: Sat Sep 11 11:34:57 2021 +0100
Commit: Caolán McNamara 
CommitDate: Sat Sep 11 14:35:50 2021 +0200

cid#1491408 Uninitialized scalar field

and

cid#1491409 Uninitialized scalar field

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

diff --git a/external/cuckoo/UnpackedTarball_cuckoo.mk 
b/external/cuckoo/UnpackedTarball_cuckoo.mk
index 1cfbcc6b882c..e0426181b3a7 100644
--- a/external/cuckoo/UnpackedTarball_cuckoo.mk
+++ b/external/cuckoo/UnpackedTarball_cuckoo.mk
@@ -15,4 +15,8 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,cuckoo,0))
 
 $(eval $(call gb_UnpackedTarball_update_autoconf_configs,cuckoo))
 
+$(eval $(call gb_UnpackedTarball_add_patches,cuckoo,\
+   external/cuckoo/cuckoo-coverity.patch \
+))
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/cuckoo/cuckoo-coverity.patch 
b/external/cuckoo/cuckoo-coverity.patch
new file mode 100644
index ..273d3bf1f0e3
--- /dev/null
+++ b/external/cuckoo/cuckoo-coverity.patch
@@ -0,0 +1,22 @@
+--- libcuckoo/cuckoohash_map.hh2021-09-11 11:29:05.656553870 +0100
 libcuckoo/cuckoohash_map.hh2021-09-11 11:31:48.265203248 +0100
+@@ -866,7 +866,8 @@
+ 
+   class TwoBuckets {
+   public:
+-TwoBuckets() {}
++TwoBuckets()
++: i1(0), i2(0) {}
+ TwoBuckets(size_type i1_, size_type i2_, locked_table_mode)
+ : i1(i1_), i2(i2_) {}
+ TwoBuckets(locks_t &locks, size_type i1_, size_type i2_, normal_mode)
+@@ -1552,7 +1553,8 @@
+   " MAX_BFS_PATH_LEN - 1");
+ static_assert(-1 >= std::numeric_limits::min(),
+   "The depth type must be able to hold a value of -1");
+-b_slot() {}
++b_slot()
++: bucket(0), pathcode(0), depth(0) {}
+ b_slot(const size_type b, const uint16_t p, const decltype(depth) d)
+ : bucket(b), pathcode(p), depth(d) {
+   assert(d < MAX_BFS_PATH_LEN);


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

2021-09-11 Thread Caolán McNamara (via logerrit)
 sc/source/filter/excel/xistream.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 6891347a3d0896918e4aec64c9d255fe6b58163a
Author: Caolán McNamara 
AuthorDate: Sat Sep 11 11:46:47 2021 +0100
Commit: Caolán McNamara 
CommitDate: Sat Sep 11 14:35:31 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

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

diff --git a/sc/source/filter/excel/xistream.cxx 
b/sc/source/filter/excel/xistream.cxx
index 702ae253e143..e4891ff90a1e 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -635,7 +635,7 @@ sal_Int16 XclImpStream::ReadInt16()
 {
 if( mbUseDecr )
 {
-SVBT16 pnBuffer;
+SVBT16 pnBuffer{0};
 mxDecrypter->Read( mrStrm, pnBuffer, 2 );
 nValue = static_cast< sal_Int16 >( SVBT16ToUInt16( pnBuffer ) );
 }
@@ -653,7 +653,7 @@ sal_uInt16 XclImpStream::ReaduInt16()
 {
 if( mbUseDecr )
 {
-SVBT16 pnBuffer;
+SVBT16 pnBuffer{0};
 mxDecrypter->Read( mrStrm, pnBuffer, 2 );
 nValue = SVBT16ToUInt16( pnBuffer );
 }
@@ -671,7 +671,7 @@ sal_Int32 XclImpStream::ReadInt32()
 {
 if( mbUseDecr )
 {
-SVBT32 pnBuffer;
+SVBT32 pnBuffer{0};
 mxDecrypter->Read( mrStrm, pnBuffer, 4 );
 nValue = static_cast< sal_Int32 >( SVBT32ToUInt32( pnBuffer ) );
 }
@@ -689,7 +689,7 @@ sal_uInt32 XclImpStream::ReaduInt32()
 {
 if( mbUseDecr )
 {
-SVBT32 pnBuffer;
+SVBT32 pnBuffer{0};
 mxDecrypter->Read( mrStrm, pnBuffer, 4 );
 nValue = SVBT32ToUInt32( pnBuffer );
 }
@@ -707,7 +707,7 @@ double XclImpStream::ReadDouble()
 {
 if( mbUseDecr )
 {
-SVBT64 pnBuffer;
+SVBT64 pnBuffer{0};
 mxDecrypter->Read( mrStrm, pnBuffer, 8 );
 nValue = SVBT64ToDouble( pnBuffer );
 }


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

2021-09-11 Thread Caolán McNamara (via logerrit)
 vcl/source/filter/imet/ios2met.cxx |   13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 650773993529aee030a0161d131a361e8e9ab227
Author: Caolán McNamara 
AuthorDate: Sat Sep 11 11:51:28 2021 +0100
Commit: Caolán McNamara 
CommitDate: Sat Sep 11 14:35:15 2021 +0200

ofz: MemorySanitizer: use-of-uninitialized-value

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

diff --git a/vcl/source/filter/imet/ios2met.cxx 
b/vcl/source/filter/imet/ios2met.cxx
index a57267357f21..a9c7a2cdde96 100644
--- a/vcl/source/filter/imet/ios2met.cxx
+++ b/vcl/source/filter/imet/ios2met.cxx
@@ -993,20 +993,17 @@ void OS2METReader::ReadBox(bool bGivenPos)
 
 void OS2METReader::ReadBitBlt()
 {
-Point aP1,aP2;
-Size aSize;
-sal_uInt32 nID;
-OSBitmap * pB;
-
 pOS2MET->SeekRel(4);
+sal_uInt32 nID(0);
 pOS2MET->ReadUInt32( nID );
 pOS2MET->SeekRel(4);
-aP1=ReadPoint(); aP2=ReadPoint();
+Point aP1 = ReadPoint();
+Point aP2 = ReadPoint();
 if (aP1.X() > aP2.X()) { auto nt=aP1.X(); aP1.setX(aP2.X() ); aP2.setX(nt 
); }
 if (aP1.Y() > aP2.Y()) { auto nt=aP1.Y(); aP1.setY(aP2.Y() ); aP2.setY(nt 
); }
-aSize=Size(aP2.X()-aP1.X(),aP2.Y()-aP1.Y());
+Size aSize(aP2.X() - aP1.X(), aP2.Y() - aP1.Y());
 
-pB=pBitmapList;
+OSBitmap* pB = pBitmapList;
 while (pB!=nullptr && pB->nID!=nID) pB=pB->pSucc;
 if (pB!=nullptr) {
 SetRasterOp(aAttr.ePatMix);


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

2021-09-11 Thread Noel Grandin (via logerrit)
 include/vcl/BitmapBuffer.hxx  |   12 ++--
 include/vcl/GraphicAttributes.hxx |   12 ++--
 vcl/inc/accel.hxx |4 ++--
 vcl/inc/salwtype.hxx  |   12 ++--
 vcl/source/app/svapp.cxx  |   16 
 vcl/source/edit/textdat2.hxx  |6 +++---
 vcl/source/gdi/mapmod.cxx |2 +-
 7 files changed, 32 insertions(+), 32 deletions(-)

New commits:
commit 349e1a7ce141d11432dda730ab8d34ab123117c5
Author: Noel Grandin 
AuthorDate: Fri Sep 10 20:20:05 2021 +0200
Commit: Noel Grandin 
CommitDate: Sat Sep 11 12:45:01 2021 +0200

clang:optin.performance.Padding in vcl

Excessive padding in 'class ImplAccelEntry' (13 padding bytes, where 5
is optimal).
Excessive padding in 'struct SalQueryCharPositionEvent' (14 padding
bytes, where 6 is optimal).
Excessive padding in 'struct SalFrameState' (8 padding bytes, where 0 is
optimal).
Excessive padding in 'struct BitmapBuffer' (10 padding bytes, where 2 is
optimal).
Excessive padding in 'class GraphicAttr' (10 padding bytes, where 2 is
optimal).
Excessive padding in 'struct ImplPostEventData' (12 padding bytes, where
4 is optimal).
Excessive padding in 'class TETextPortion' (10 padding bytes, where 2 is
optimal).
Excessive padding in 'struct MapMode::ImplMapMode' (11 padding bytes,
where 3 is optimal).

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

diff --git a/include/vcl/BitmapBuffer.hxx b/include/vcl/BitmapBuffer.hxx
index d67e42ac6cad..54efeea5e1bc 100644
--- a/include/vcl/BitmapBuffer.hxx
+++ b/include/vcl/BitmapBuffer.hxx
@@ -35,14 +35,14 @@ struct SalTwoRect;
 
 struct VCL_DLLPUBLIC BitmapBuffer
 {
-ScanlineFormat   mnFormat;
-tools::LongmnWidth;
-tools::LongmnHeight;
-tools::LongmnScanlineSize;
-sal_uInt16  mnBitCount;
-ColorMask   maColorMask;
+tools::Long mnWidth;
+tools::Long mnHeight;
+tools::Long mnScanlineSize;
 BitmapPalette   maPalette;
 sal_uInt8*  mpBits;
+ScanlineFormat  mnFormat;
+ColorMask   maColorMask;
+sal_uInt16  mnBitCount;
 };
 
 VCL_DLLPUBLIC std::unique_ptr StretchAndConvert(
diff --git a/include/vcl/GraphicAttributes.hxx 
b/include/vcl/GraphicAttributes.hxx
index b5e73625c467..442158cda2e9 100644
--- a/include/vcl/GraphicAttributes.hxx
+++ b/include/vcl/GraphicAttributes.hxx
@@ -35,38 +35,38 @@ class VCL_DLLPUBLIC GraphicAttr
 {
 private:
 double mfGamma;
-BmpMirrorFlags mnMirrFlags;
 tools::Long mnLeftCrop;
 tools::Long mnTopCrop;
 tools::Long mnRightCrop;
 tools::Long mnBottomCrop;
+BmpMirrorFlags mnMirrFlags;
+GraphicDrawMode meDrawMode;
 Degree10 mnRotate10;
 short mnContPercent;
 short mnLumPercent;
 short mnRPercent;
 short mnGPercent;
 short mnBPercent;
-bool mbInvert;
 sal_uInt8 mcAlpha;
-GraphicDrawMode meDrawMode;
+bool mbInvert;
 
 public:
 GraphicAttr()
 : mfGamma(1.0)
-, mnMirrFlags(BmpMirrorFlags::NONE)
 , mnLeftCrop(0)
 , mnTopCrop(0)
 , mnRightCrop(0)
 , mnBottomCrop(0)
+, mnMirrFlags(BmpMirrorFlags::NONE)
+, meDrawMode(GraphicDrawMode::Standard)
 , mnRotate10(0)
 , mnContPercent(0)
 , mnLumPercent(0)
 , mnRPercent(0)
 , mnGPercent(0)
 , mnBPercent(0)
-, mbInvert(false)
 , mcAlpha(255)
-, meDrawMode(GraphicDrawMode::Standard)
+, mbInvert(false)
 {
 }
 
diff --git a/vcl/inc/accel.hxx b/vcl/inc/accel.hxx
index 9d597f76fd47..b00950b30095 100644
--- a/vcl/inc/accel.hxx
+++ b/vcl/inc/accel.hxx
@@ -35,10 +35,10 @@ class Accelerator;
 class ImplAccelEntry
 {
 public:
-sal_uInt16  mnId;
-vcl::KeyCodemaKeyCode;
 Accelerator*mpAccel;
 Accelerator*mpAutoAccel;
+vcl::KeyCodemaKeyCode;
+sal_uInt16  mnId;
 boolmbEnabled;
 };
 
diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx
index 2b07854271ef..c9f50cd63982 100644
--- a/vcl/inc/salwtype.hxx
+++ b/vcl/inc/salwtype.hxx
@@ -214,13 +214,13 @@ struct SalSurroundingTextSelectionChangeEvent
 
 struct SalQueryCharPositionEvent
 {
-boolmbValid;// The data is valid or not.
 sal_uLong   mnCharPos;  // The index of character in a 
composition.
+tools::Long mnCursorBoundX; // The cursor bounds corresponding 
to the character specified by mnCharPos - X
+tools::Long mnCursorBoundY; // The cursor bounds corresponding 
to the character specified by mnCharPos - Y
+tools::Long mnCursorBoundWidth; // The cursor bounds corresponding 
to the character specified by mnCharPos - Width
+tools::Long mnCur

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

2021-09-11 Thread Julien Nabet (via logerrit)
 oox/source/export/chartexport.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 952734d4214e647110b556e962b11d192c76ee0a
Author: Julien Nabet 
AuthorDate: Sat Sep 11 09:51:07 2021 +0200
Commit: Julien Nabet 
CommitDate: Sat Sep 11 11:40:39 2021 +0200

cid#1454626: Uninitialized scalar field (oox/chartexport)

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

diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 8bbd4ecd1990..5229fef8188d 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -539,6 +539,7 @@ ChartExport::ChartExport( sal_Int32 nXmlNamespace, 
FSHelperPtr pFS, Reference< f
 , mbIs3DChart( false )
 , mbStacked(false)
 , mbPercent(false)
+, mbHasDateCategories(false)
 {
 }
 


[Libreoffice-commits] core.git: solenv/gbuild

2021-09-11 Thread Luboš Luňák (via logerrit)
 solenv/gbuild/PrecompiledHeaders.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit dacdcfe71e18be6493328c37b20da560f2867f7a
Author: Luboš Luňák 
AuthorDate: Sat Sep 11 09:11:14 2021 +0200
Commit: Luboš Luňák 
CommitDate: Sat Sep 11 09:11:52 2021 +0200

add -DSYSTEM_NSS to flags ignored for system PCH

Change-Id: I4afdf324956b0280ceeaf2d18174dedbb091b5b0

diff --git a/solenv/gbuild/PrecompiledHeaders.mk 
b/solenv/gbuild/PrecompiledHeaders.mk
index d02668e1e930..4b2409952599 100644
--- a/solenv/gbuild/PrecompiledHeaders.mk
+++ b/solenv/gbuild/PrecompiledHeaders.mk
@@ -132,6 +132,7 @@ gb_PrecompiledHeader_ignore_flags_system := \
 -DSYSTEM_EXPAT \
 -DSYSTEM_LIBXML \
 -DSYSTEM_ZLIB \
+-DSYSTEM_NSS \
 -DHAVE_VALGRIND_HEADERS \
 -DUSE_RANDR \
 -DUSE_XINERAMA_XORG \