[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - basic/source

2016-10-03 Thread Laurent Balland-Poirier
 basic/source/runtime/stdobj.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 74817e67441204416a4e6db0440d35c85a2fca84
Author: Laurent Balland-Poirier 
Date:   Sat Oct 1 15:00:26 2016 +0200

tdf#102872 TAB function is missing its argument

Commit 98f0e0eda50690bd01842c806bd13e3bc5af2966 introduced TAB function
but its declaration in basic/source/runtime/stdobj.cxx is missing its 
argument
So it used TAN function as argument

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

diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx
index cc2484b..115252c 100644
--- a/basic/source/runtime/stdobj.cxx
+++ b/basic/source/runtime/stdobj.cxx
@@ -604,6 +604,7 @@ static Methods aMethods[] = {
   { "Expression",   SbxVARIANT, 0,nullptr,0 },
   { "Value",SbxVARIANT, 0,nullptr,0 },
 { "Tab",SbxSTRING,1 | FUNCTION_, RTLNAME(Tab),0 },
+  { "Count",SbxLONG, 0,nullptr,0 },
 { "Tan",SbxDOUBLE,1 | FUNCTION_, RTLNAME(Tan),0 },
   { "number",   SbxDOUBLE, 0,nullptr,0 },
 { "Time",   SbxVARIANT,   LFUNCTION_,RTLNAME(Time),0},
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - basic/source include/basic

2016-08-24 Thread Caolán McNamara
 basic/source/runtime/dllmgr-x64.cxx |2 +-
 basic/source/runtime/dllmgr-x86.cxx |2 +-
 include/basic/sbxvar.hxx|2 ++
 3 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 23fab7af86ac9655832ac83aa4c1e3fb464e852d
Author: Caolán McNamara 
Date:   Fri Aug 19 16:46:42 2016 +0100

Resolves: tdf#88953 byref args incorrectly passed in basic->c++

partial revert

of

commit 22b094f5d8e1e82375b135abd3a6f99a9a555244
Date:   Tue Jul 14 14:50:07 2015 +0200

loplugin:unusedmethods basic

and partial revert of...

commit e2080e70fe8b085f18e868e46340454720fa94ca
Date:   Wed Jun 18 12:14:29 2014 +0200

new compilerplugin returnbyref

and revert of...

commit 536051f8862203e0e115a5394a6379acd83cc8fe
Date:   Wed Jul 15 14:04:01 2015 +0200

fix Windows build

after commit 22b094f5d8e1e82375b135abd3a6f99a9a555244
"loplugin:unusedmethods basic"

Change-Id: I612937334fdb75365080c98a9d4da5ed7ae647e3
(cherry picked from commit 4a647a04a7881964ce13b541399f89e4ab042ea8)
Reviewed-on: https://gerrit.libreoffice.org/28249
Tested-by: Jenkins 
Reviewed-by: Christian Lohmaier 

diff --git a/basic/source/runtime/dllmgr-x64.cxx 
b/basic/source/runtime/dllmgr-x64.cxx
index 11a514b..b78ff5d 100644
--- a/basic/source/runtime/dllmgr-x64.cxx
+++ b/basic/source/runtime/dllmgr-x64.cxx
@@ -315,7 +315,7 @@ SbError marshal(
 case SbxDOUBLE:
 case SbxBOOL:
 case SbxBYTE:
-add(blob, variable->GetValues_Impl(), 8, offset);
+add(blob, variable->data(), 8, offset);
 break;
 case SbxSTRING:
 {
diff --git a/basic/source/runtime/dllmgr-x86.cxx 
b/basic/source/runtime/dllmgr-x86.cxx
index bd8c5be..fd41317 100644
--- a/basic/source/runtime/dllmgr-x86.cxx
+++ b/basic/source/runtime/dllmgr-x86.cxx
@@ -330,7 +330,7 @@ SbError marshal(
 case SbxDOUBLE:
 case SbxBOOL:
 case SbxBYTE:
-add(blob, variable->GetValues_Impl(), 4, offset);
+add(blob, variable->data(), 4, offset);
 break;
 case SbxSTRING:
 {
diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx
index a0800cf..9b97159 100644
--- a/include/basic/sbxvar.hxx
+++ b/include/basic/sbxvar.hxx
@@ -118,6 +118,8 @@ public:
 const SbxValues& GetValues_Impl() const { return aData; }
 bool Put( const SbxValues& );
 
+SbxValues * data() { return &aData; }
+
 sal_Unicode GetChar() const;
 sal_Int16   GetInteger() const;
 sal_Int32   GetLong() const;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - basic/source

2016-07-20 Thread Caolán McNamara
 basic/source/sbx/sbxscan.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit ff5e57d2292b548d7f8607c47a38d9e39753d5fa
Author: Caolán McNamara 
Date:   Wed Jul 20 16:30:16 2016 +0100

Resolves: tdf#98778 fix parsing of exponents

regression from...

commit 9e9f39d171cafa035d7b8e74187e25c3581cb89d
Date:   Tue Mar 19 23:23:16 2013 +0100

resolved rhbz#919020 Basic CDbl() and CSng() scan localized number

Change-Id: I96535fd9bc9ec59d6e07739a3118c96eb2d8bd05
Reviewed-on: https://gerrit.libreoffice.org/27342
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 2aed0d49d7891b9360916b65771222810aeeac96)
Reviewed-on: https://gerrit.libreoffice.org/27348
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index bf68189..05a4eae 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -160,6 +160,13 @@ SbxError ImpScan( const OUString& rWSrc, double& nVal, 
SbxDataType& rType,
 eScanType = SbxDOUBLE;
 aBuf[ p - pStart ] = 'E';
 p++;
+if (*p == '+')
+++p;
+else if (*p == '-')
+{
+aBuf.append('-');
+++p;
+}
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - basic/source

2016-05-31 Thread Caolán McNamara
 basic/source/basmgr/basicmanagerrepository.cxx |   54 +
 1 file changed, 38 insertions(+), 16 deletions(-)

New commits:
commit 9f21b660fe2ed3805614be5d782137554e32e7d2
Author: Caolán McNamara 
Date:   Tue May 31 17:05:59 2016 +0100

Resolves: tdf#93386 crash when closing a Database with macro editor open

Change-Id: Id3ecee744cb10f539f2b57e83a4b6e4c7744d3d5
(cherry picked from commit 9a0fd9c7f424fb787e1fae2113f0a42f0895a1e9)

diff --git a/basic/source/basmgr/basicmanagerrepository.cxx 
b/basic/source/basmgr/basicmanagerrepository.cxx
index 35c965b..02a4555 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -104,6 +104,17 @@ namespace basic
 BasicManager*&
 impl_getLocationForModel( const Reference< XModel >& 
_rxDocumentModel );
 
+/** tests if there is a location set at which the BasicManager for the 
given model
+is stored.
+
+@param _rxDocumentModel
+the model whose BasicManager's location is to be retrieved. 
Must not be .
+
+@precond
+our mutex is locked
+*/
+bool impl_hasLocationForModel( const Reference< XModel >& 
_rxDocumentModel );
+
 /** creates a new BasicManager instance for the given model
 
 @param _out_rpBasicManager
@@ -113,7 +124,7 @@ namespace basic
 @param _rxDocumentModel
 the model whose BasicManager will be created. Must not be 
.
 */
-void impl_createManagerForModel(
+bool impl_createManagerForModel(
 BasicManager*& _out_rpBasicManager,
 const Reference< XModel >& _rxDocumentModel );
 
@@ -207,7 +218,6 @@ namespace basic
 create( CreateImplRepository(), ::osl::GetGlobalMutex() );
 }
 
-
 BasicManager* ImplRepository::getDocumentBasicManager( const Reference< 
XModel >& _rxDocumentModel )
 {
 SolarMutexGuard g;
@@ -221,13 +231,13 @@ namespace basic
 without creating another instance.
  */
 BasicManager*& pBasicManager = impl_getLocationForModel( 
_rxDocumentModel );
-if ( pBasicManager == nullptr )
-impl_createManagerForModel( pBasicManager, _rxDocumentModel );
-
-return pBasicManager;
+if (pBasicManager != nullptr)
+return pBasicManager;
+if (impl_createManagerForModel(pBasicManager, _rxDocumentModel))
+return pBasicManager;
+return nullptr;
 }
 
-
 BasicManager* ImplRepository::getApplicationBasicManager( bool _bCreate )
 {
 SolarMutexGuard g;
@@ -353,7 +363,6 @@ namespace basic
 return pAppBasic;
 }
 
-
 BasicManager*& ImplRepository::impl_getLocationForModel( const Reference< 
XModel >& _rxDocumentModel )
 {
 Reference< XInterface > xNormalized( _rxDocumentModel, UNO_QUERY );
@@ -363,6 +372,13 @@ namespace basic
 return location;
 }
 
+bool ImplRepository::impl_hasLocationForModel( const Reference< XModel >& 
_rxDocumentModel )
+{
+Reference< XInterface > xNormalized( _rxDocumentModel, UNO_QUERY );
+DBG_ASSERT( _rxDocumentModel.is(), 
"ImplRepository::impl_getLocationForModel: invalid model!" );
+
+return m_aStore.find(xNormalized) != m_aStore.end();
+}
 
 void ImplRepository::impl_initDocLibraryContainers_nothrow( const 
Reference< XPersistentLibraryContainer >& _rxBasicLibraries, const Reference< 
XPersistentLibraryContainer >& _rxDialogLibraries )
 {
@@ -389,8 +405,7 @@ namespace basic
 }
 }
 
-
-void ImplRepository::impl_createManagerForModel( BasicManager*& 
_out_rpBasicManager, const Reference< XModel >& _rxDocumentModel )
+bool ImplRepository::impl_createManagerForModel( BasicManager*& 
_out_rpBasicManager, const Reference< XModel >& _rxDocumentModel )
 {
 StarBASIC* pAppBasic = impl_getDefaultAppBasicLibrary();
 
@@ -399,13 +414,13 @@ namespace basic
 if ( !impl_getDocumentStorage_nothrow( _rxDocumentModel, xStorage ) )
 {
 // the document is not able to provide the storage it is based on.
-return;
+return false;
 }
 Reference< XPersistentLibraryContainer > xBasicLibs;
 Reference< XPersistentLibraryContainer > xDialogLibs;
 if ( !impl_getDocumentLibraryContainers_nothrow( _rxDocumentModel, 
xBasicLibs, xDialogLibs ) )
 // the document does not have BasicLibraries and DialogLibraries
-return;
+return false;
 
 if ( xStorage.is() )
 {
@@ -466,20 +481,27 @@ namespace basic
 
 // register as listener for this model being disposed/closed
 OSL_ENSURE( _rxDocumentModel.is(), 
"ImplRepository::impl_createManagerForModel: the document must be an 
XComponent!" );
+assert(impl_hasLocationForModel(_rxDocumentModel));
 star