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

Lionel Elie Mamane lionel at mamane.lu
Tue Jul 2 06:24:01 PDT 2013


 dbaccess/source/ui/browser/unodatbr.cxx |   16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

New commits:
commit a733e8e91aecbcbde7cc2127a3c45d8dd3ebe4ee
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Tue Jul 2 15:21:13 2013 +0200

    i#112615 table names are allowed slashes
    
    Change-Id: I1b69c4575d79ba1b6a6e9cd83abaf18bad54fd79

diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 0bee0cd..fa33bcb 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1244,7 +1244,21 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSour
                 sal_Int32 nIndex = 0;
                 do
                 {
-                    OUString sPath = sCommand.getToken( 0, '/', nIndex );
+                    OUString sPath;
+                    switch (_nCommandType)
+                    {
+                    case CommandType::TABLE:
+                        sPath = sCommand;
+                        nIndex = -1;
+                        break;
+
+                    default:
+                        assert(false);
+                        // in non-debug builds, fall through.
+                    case CommandType::QUERY:
+                        sPath = sCommand.getToken( 0, '/', nIndex );
+                        break;
+                    }
                     pObject = m_pTreeView->getListBox().GetEntryPosByName(sPath, pCommandType);
                     pCommandType = pObject;
                     if ( nIndex >= 0 )


More information about the Libreoffice-commits mailing list