[Libreoffice-commits] .: sc/source

Noel Power noelp at kemper.freedesktop.org
Fri Mar 25 04:58:41 PDT 2011


 sc/source/ui/unoobj/servuno.cxx |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

New commits:
commit 50db21ff9341da4412e22fef16489d7676f538ae
Author: Noel Power <noel.power at novell.com>
Date:   Thu Mar 24 17:18:45 2011 +0000

    take into account streamname and codename needed match casewise
    
    in servuno on loading up vba modules we try to resolve the worksheet objects based on the codename, from the filter's point of view the streamname = the codename and although this is true they can differ in case ( rare ).

diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 74923f9..62cc5a0 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -121,7 +121,9 @@ public:
         ScDocument* pDoc = mpDocShell->GetDocument();
         if ( !pDoc )
             throw uno::RuntimeException();
-        if ( sName == pDoc->GetCodeName() )
+        // aName ( sName ) is generated from the stream name which can be different ( case-wise )
+        // from the code name
+        if( sName.EqualsIgnoreCaseAscii( pDoc->GetCodeName() ) )
             maCachedObject = maWorkbook;
         else 
         {
@@ -130,7 +132,9 @@ public:
             for( SCTAB i = 0; i < nCount; i++ )
             {
                 pDoc->GetCodeName( i, sCodeName );
-                if( sCodeName == sName )
+                // aName ( sName ) is generated from the stream name which can be different ( case-wise )
+                // from the code name
+                if( sCodeName.EqualsIgnoreCaseAscii( sName ) )
                 {
                     String sSheetName;
                     if( pDoc->GetName( i, sSheetName ) )


More information about the Libreoffice-commits mailing list