[Libreoffice-commits] .: 2 commits - basic/source sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Sep 10 03:16:25 PDT 2012


 basic/source/runtime/runtime.cxx |    6 +++---
 sc/source/ui/unoobj/docuno.cxx   |   11 +++--------
 2 files changed, 6 insertions(+), 11 deletions(-)

New commits:
commit cea414bfe8fe356793778bdf09f5ca3b3a42daa0
Author: Noel Power <noel.power at suse.com>
Date:   Sun Sep 9 11:50:41 2012 +0100

    fdo#54721 fix vba not tracking currently selected doc correctly
    
    Change-Id: I43b17dfc621d0aba76cdd33ebf97c457fa1da912

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index cad7ae4..51e50ed 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -119,7 +119,7 @@ const SfxItemPropertyMapEntry* lcl_GetDocOptPropertyMap()
         {MAP_CHAR_LEN(SC_UNO_AUTOCONTFOC),       0, &getBooleanCppuType(),                                    0, 0},
         {MAP_CHAR_LEN(SC_UNO_BASICLIBRARIES),    0, &getCppuType((uno::Reference< script::XLibraryContainer >*)0), beans::PropertyAttribute::READONLY, 0},
         {MAP_CHAR_LEN(SC_UNO_DIALOGLIBRARIES),   0, &getCppuType((uno::Reference< script::XLibraryContainer >*)0), beans::PropertyAttribute::READONLY, 0},
-        {MAP_CHAR_LEN(SC_UNO_VBADOCOBJ),   0, &getCppuType((beans::PropertyValue*)0), beans::PropertyAttribute::READONLY, 0},
+        {MAP_CHAR_LEN(SC_UNO_VBADOCOBJ),   0, &getCppuType(static_cast< const rtl::OUString * >(0)), beans::PropertyAttribute::READONLY, 0},
         {MAP_CHAR_LEN(SC_UNO_CALCASSHOWN),       PROP_UNO_CALCASSHOWN, &getBooleanCppuType(),                                    0, 0},
         {MAP_CHAR_LEN(SC_UNONAME_CLOCAL),        0, &getCppuType((lang::Locale*)0),                           0, 0},
         {MAP_CHAR_LEN(SC_UNO_CJK_CLOCAL),        0, &getCppuType((lang::Locale*)0),                           0, 0},
@@ -1834,15 +1834,10 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa
         }
         else if ( aString.EqualsAscii( SC_UNO_VBADOCOBJ ) )
         {
-            // PropertyValue seems extreme because we store
-            // the model ( as the value member ) of the PropertyValue that is
-            // itself a property of the model ( the intention however is to
+            // Note: the intention really here is to
             // store something like a Workbook object... but we don't do that )
             // yet
-            beans::PropertyValue aProp;
-            aProp.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisExcelDoc") );
-            aProp.Value <<= pDocShell->GetModel();
-            aRet <<= aProp;
+            aRet = uno::makeAny( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisExcelDoc") ) );
         }
         else if ( aString.EqualsAscii( SC_UNO_RUNTIMEUID ) )
         {
commit 986a0f4eabae324091434c2670bb9592fadc1536
Author: Noel Power <noel.power at suse.com>
Date:   Sun Sep 9 10:46:03 2012 +0100

    fdo#54718 fix opcode detection in basic resulting in failed/unregcognized code
    
    fix is followup to bf5b493104d2dd4ab964f1fcb845200eaefbbcd5 which didn't adjust the runtime to
    cater for the new enum layout
    
    Change-Id: I6613fb8aacd8a70947c4fff556fb3e2d33c1113e

diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 803fb85..0a19676 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -702,17 +702,17 @@ bool SbiRuntime::Step()
 
         SbiOpcode eOp = (SbiOpcode ) ( *pCode++ );
         sal_uInt32 nOp1, nOp2;
-        if (eOp < SbOP0_END)
+        if (eOp <= SbOP0_END)
         {
             (this->*( aStep0[ eOp ] ) )();
         }
-        else if (eOp >= SbOP1_START && eOp < SbOP1_END)
+        else if (eOp >= SbOP1_START && eOp <= SbOP1_END)
         {
             nOp1 = *pCode++; nOp1 |= *pCode++ << 8; nOp1 |= *pCode++ << 16; nOp1 |= *pCode++ << 24;
 
             (this->*( aStep1[ eOp - SbOP1_START ] ) )( nOp1 );
         }
-        else if (eOp >= SbOP2_START && eOp < SbOP2_END)
+        else if (eOp >= SbOP2_START && eOp <= SbOP2_END)
         {
             nOp1 = *pCode++; nOp1 |= *pCode++ << 8; nOp1 |= *pCode++ << 16; nOp1 |= *pCode++ << 24;
             nOp2 = *pCode++; nOp2 |= *pCode++ << 8; nOp2 |= *pCode++ << 16; nOp2 |= *pCode++ << 24;


More information about the Libreoffice-commits mailing list