Tag: cws_src680_qiq
User: fs      
Date: 06/05/16 21:31:53

Modified:
 /dba/dbaccess/source/ui/querydesign/
  QueryDesignView.cxx, SelectionBrowseBox.cxx

Log:
 #i61143# controller's getParser noew returning a reference instead of a pointer

File Changes:

Directory: /dba/dbaccess/source/ui/querydesign/
===============================================

File [changed]: QueryDesignView.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/QueryDesignView.cxx?r1=1.78.16.2&r2=1.78.16.3
Delta lines:  +20 -20
---------------------
--- QueryDesignView.cxx 15 May 2006 14:41:03 -0000      1.78.16.2
+++ QueryDesignView.cxx 17 May 2006 04:31:50 -0000      1.78.16.3
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: QueryDesignView.cxx,v $
  *
- *  $Revision: 1.78.16.2 $
+ *  $Revision: 1.78.16.3 $
  *
- *  last change: $Author: fs $ $Date: 2006/05/15 14:41:03 $
+ *  last change: $Author: fs $ $Date: 2006/05/17 04:31:50 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -214,7 +214,7 @@
                                                                
pController->getNumberFormatter(),
                                                                _rLocale,
                                                                
static_cast<sal_Char>(_sDecimal.toChar()),
-                                                               
&pController->getParser()->getContext());
+                                                               
&pController->getParser().getContext());
                }
                return aCondition;
        }
@@ -818,7 +818,7 @@
                {
                        Reference< XDatabaseMetaData >  xMetaData = 
xConnection->getMetaData();
                        ::rtl::OUString aQuote = 
xMetaData->getIdentifierQuoteString();
-                       const IParseContext& rContext = 
static_cast<OQueryController*>(_pView->getController())->getParser()->getContext();
+                       const IParseContext& rContext = 
static_cast<OQueryController*>(_pView->getController())->getParser().getContext();
 
                        for (sal_uInt16 i=0 ; i < nMaxCriteria ; i++)
                        {
@@ -1414,14 +1414,14 @@
                                                                                
                                pController->getNumberFormatter(),
                                                                                
                                aLocale,
                                                                                
                                static_cast<sal_Char>(sDecimal.toChar()),
-                                                                               
                                &pController->getParser()->getContext());
+                                                                               
                                &pController->getParser().getContext());
 
                                        
pCondition->getChild(0)->parseNodeToPredicateStr(       aColumnName,
                                                                                
                                                                xMetaData,
                                                                                
                                                                
pController->getNumberFormatter(),
                                                                                
                                                                aLocale,
                                                                                
                                                                
static_cast<sal_Char>(sDecimal.toChar()),
-                                                                               
                                                                
&pController->getParser()->getContext());
+                                                                               
                                                                
&pController->getParser().getContext());
 
                                        // don't display the column name
                                        aCondition = 
aCondition.copy(aColumnName.getLength());
@@ -1501,14 +1501,14 @@
                                                                                
                pController->getNumberFormatter(),
                                                                                
                _pView->getLocale(),
                                                                                
                static_cast<sal_Char>(_pView->getDecimalSeparator().toChar()),
-                                                                               
                &pController->getParser()->getContext());
+                                                                               
                &pController->getParser().getContext());
 
                        pFunction->parseNodeToPredicateStr(aColumnName,
                                                                                
                xMetaData,
                                                                                
                pController->getNumberFormatter(),
                                                                                
                _pView->getLocale(),
                                                                                
                static_cast<sal_Char>(_pView->getDecimalSeparator().toChar()),
-                                                                               
                &pController->getParser()->getContext());
+                                                                               
                &pController->getParser().getContext());
                        // don't display the column name
                        aCondition = aCondition.copy(aColumnName.getLength());
                        aCondition = aCondition.trim();
@@ -1541,7 +1541,7 @@
                                        ::rtl::OUString sParameterValue;
                                        pParamNode->parseNodeToStr(     
sParameterValue,
                                                                                
                xConnection->getMetaData(),
-                                                                               
                &pController->getParser()->getContext());
+                                                                               
                &pController->getParser().getContext());
                                        nFunctionType |= FKT_NUMERIC;
                                        aDragLeft->SetField(sParameterValue);
                                        eErrorCode = eOk;
@@ -1667,7 +1667,7 @@
                                                                                
                pController->getNumberFormatter(),
                                                                                
                _pView->getLocale(),
                                                                                
                static_cast<sal_Char>(_pView->getDecimalSeparator().toChar()),
-                                                                               
                &pController->getParser()->getContext());
+                                                                               
                &pController->getParser().getContext());
                                }
                        }
                        // else ???
@@ -1701,7 +1701,7 @@
                                Reference< XDatabaseMetaData >  xMetaData = 
xConnection->getMetaData();
                                pLhs->parseNodeToStr(aName,
                                                                                
        xMetaData,
-                                                                               
        &pController->getParser()->getContext(),
+                                                                               
        &pController->getParser().getContext(),
                                                                                
        sal_True);
                                // Kriterium
                                aCondition = 
pCondition->getChild(1)->getTokenValue();
@@ -1710,7 +1710,7 @@
                                                                                
                                        pController->getNumberFormatter(),
                                                                                
                                        _pView->getLocale(),
                                                                                
                                        
static_cast<sal_Char>(_pView->getDecimalSeparator().toChar()),
-                                                                               
                                        
&pController->getParser()->getContext());
+                                                                               
                                        &pController->getParser().getContext());
                        }
 
                        OTableFieldDescRef aDragLeft = new OTableFieldDesc();
@@ -2105,7 +2105,7 @@
                                                ::rtl::OUString aColumns;
                                                pColumnRef->parseNodeToStr(     
aColumns,
                                                                                
                        xMetaData,
-                                                                               
                        &pController->getParser()->getContext(),
+                                                                               
                        &pController->getParser().getContext(),
                                                                                
                        sal_True,
                                                                                
                        sal_True); // quote is to true because we need quoted 
elements inside the function
 
@@ -2147,7 +2147,7 @@
                                                                        
sFieldName = ::rtl::OUString();
                                                                        
pParamRef->parseNodeToStr(      sFieldName,
                                                                                
                                xMetaData,
-                                                                               
                                &pController->getParser()->getContext(),
+                                                                               
                                &pController->getParser().getContext(),
                                                                                
                                sal_True,
                                                                                
                                sal_True); // quote is to true because we need 
quoted elements inside the function
                                                                }
@@ -2176,7 +2176,7 @@
 
                                                                nDataType = 
OSQLParser::getFunctionReturnType(
                                                                                
                        sFunctionName
-                                                                               
                        ,&pController->getParser()->getContext());
+                                                                               
                        ,&pController->getParser().getContext());
                                                        }
                                                        
aInfo->SetDataType(nDataType);
                                                        
aInfo->SetFieldType(TAB_NORMAL_FIELD);
@@ -2202,7 +2202,7 @@
                                                ::rtl::OUString aColumns;
                                                pColumnRef->parseNodeToStr(     
aColumns,
                                                                                
                        xMetaData,
-                                                                               
                        &pController->getParser()->getContext(),
+                                                                               
                        &pController->getParser().getContext(),
                                                                                
                        sal_True,
                                                                                
                        sal_True); // quote is to true because we need quoted 
elements inside the function
 
@@ -2934,7 +2934,7 @@
        if(!xConnection.is())
                return NULL;
 
-       ::connectivity::OSQLParser* pParser = 
static_cast<OQueryController*>(getController())->getParser();
+       ::connectivity::OSQLParser& rParser( 
static_cast<OQueryController*>(getController())->getParser() );
        OQueryTableWindow* pWin = 
static_cast<OQueryTableWindow*>(pEntry->GetTabWindow());
 
        String sTest(_sCriteria);
@@ -2951,7 +2951,7 @@
                if(sFunction.GetTokenCount('(') > 1)
                        sFunction = sFunction.GetToken(0,'('); // this should 
be the name of the function
 
-               sal_Int32 nType = 
::connectivity::OSQLParser::getFunctionReturnType(sFunction,&pParser->getContext());
+               sal_Int32 nType = 
::connectivity::OSQLParser::getFunctionReturnType(sFunction,&rParser.getContext());
                if ( nType == DataType::OTHER || (!sFunction.Len() && 
pEntry->isNumericOrAggreateFunction()) )
                {
                        // first try the international version
@@ -2960,7 +2960,7 @@
                        sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" 
FROM x WHERE "));
                        sSql += pEntry->GetField();
                        sSql += _sCriteria;
-                       OSQLParseNode* pParseNode = pParser->parseTree( 
_rsErrorMessage,sSql,sal_True);
+                       OSQLParseNode* pParseNode = rParser.parseTree( 
_rsErrorMessage, sSql, sal_True );
                        nType = DataType::DOUBLE;
                        if ( pParseNode )
                        {
@@ -3002,7 +3002,7 @@
                }
        }
 
-       OSQLParseNode* pParseNode = pParser->predicateTree(     _rsErrorMessage,
+       OSQLParseNode* pParseNode = rParser.predicateTree(      _rsErrorMessage,
                                                                                
                                sTest,
                                                                                
                                
static_cast<OQueryController*>(getController())->getNumberFormatter(),
                                                                                
                                _rxColumn);

File [changed]: SelectionBrowseBox.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx?r1=1.66.66.1&r2=1.66.66.2
Delta lines:  +14 -14
---------------------
--- SelectionBrowseBox.cxx      10 May 2006 11:07:41 -0000      1.66.66.1
+++ SelectionBrowseBox.cxx      17 May 2006 04:31:51 -0000      1.66.66.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: SelectionBrowseBox.cxx,v $
  *
- *  $Revision: 1.66.66.1 $
+ *  $Revision: 1.66.66.2 $
  *
- *  last change: $Author: fs $ $Date: 2006/05/10 11:07:41 $
+ *  last change: $Author: fs $ $Date: 2006/05/17 04:31:51 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -244,7 +244,7 @@
        Reference< XConnection> xConnection = 
static_cast<OQueryController*>(getDesignView()->getController())->getConnection();
        if(xConnection.is())
        {
-               const IParseContext& rContext = 
static_cast<OQueryController*>(getDesignView()->getController())->getParser()->getContext();
+               const IParseContext& rContext = 
static_cast<OQueryController*>(getDesignView()->getController())->getParser().getContext();
                IParseContext::InternationalKeyCode eFunctions[] = { 
IParseContext::KEY_AVG,IParseContext::KEY_COUNT,IParseContext::KEY_MAX,IParseContext::KEY_MIN,IParseContext::KEY_SUM
 };
                
                String sGroup = 
m_aFunctionStrings.GetToken(m_aFunctionStrings.GetTokenCount() - 1);
@@ -732,11 +732,11 @@
        sSql += _sFieldName;
        sSql += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" FROM x"));
 
-       ::connectivity::OSQLParser* pParser = pController->getParser();
+       ::connectivity::OSQLParser& rParser( pController->getParser() );
        // first try the international version
-       OSQLParseNode* pParseNode = pParser->parseTree(sErrorMsg, 
sSql,sal_True);
+       OSQLParseNode* pParseNode = rParser.parseTree(sErrorMsg, sSql,sal_True);
        if ( !pParseNode ) // if that doesn't work try the english one
-               pParseNode = pParser->parseTree(sErrorMsg, sSql,sal_False);
+               pParseNode = rParser.parseTree(sErrorMsg, sSql,sal_False);
 
        if ( pParseNode ) // we got a valid select column
        {
@@ -834,7 +834,7 @@
                                                        // now parse the 
parameters
                                                        ::rtl::OUString 
sParameters;
                                                        for(sal_uInt32 i = 2; i 
< nFunCount; ++i) // we only want to parse the parameters of the function
-                                                               
pColumnRef->getChild(i)->parseNodeToStr(sParameters,xMetaData,&pParser->getContext(),sal_True,bQuote);
+                                                               
pColumnRef->getChild(i)->parseNodeToStr(sParameters,xMetaData,&rParser.getContext(),sal_True,bQuote);
 
                                                        
aSelEntry->SetFunctionType(nFunctionType);
                                                        
aSelEntry->SetField(sParameters);
@@ -875,7 +875,7 @@
                                                                
                                                                nDataType = 
OSQLParser::getFunctionReturnType(
                                                                                
                        sFunctionName
-                                                                               
                        ,&pController->getParser()->getContext());
+                                                                               
                        ,&pController->getParser().getContext());
                                                                
aSelEntry->SetDataType(nDataType);
                                                        }
                                                }
@@ -885,7 +885,7 @@
                                                sal_uInt32 nFunCount = 
pColumnRef->count();
                                                ::rtl::OUString sParameters;
                                                for(sal_uInt32 i = 0; i < 
nFunCount; ++i) 
-                                                       
pColumnRef->getChild(i)->parseNodeToStr(sParameters,xMetaData,&pParser->getContext(),sal_True,bQuote);
+                                                       
pColumnRef->getChild(i)->parseNodeToStr(sParameters,xMetaData,&rParser.getContext(),sal_True,bQuote);
 
                                                ::rtl::OUString sOldAlias = 
aSelEntry->GetAlias();
                                                
aSelEntry->SetAlias(::rtl::OUString());
@@ -908,7 +908,7 @@
                                                ::rtl::OUString aColumns;
                                                pColumnRef->parseNodeToStr(     
aColumns,
                                                                                
                        xMetaData,
-                                                                               
                        &pController->getParser()->getContext(),
+                                                                               
                        &pController->getParser().getContext(),
                                                                                
                        sal_True,
                                                                                
                        sal_True);
                                                // get the type out of the 
funtion name
@@ -1168,7 +1168,7 @@
                                                                                
                                        xColumn,
                                                                                
                                        getDesignView()->getLocale(),
                                                                                
                                        
static_cast<sal_Char>(getDesignView()->getDecimalSeparator().toChar()),
-                                                                               
                                        
&(static_cast<OQueryController*>(getDesignView()->getController())->getParser()->getContext()));
+                                                                               
                                        
&(static_cast<OQueryController*>(getDesignView()->getController())->getParser().getContext()));
                                                delete pParseNode;
                                        }
                                        else
@@ -1193,8 +1193,8 @@
                                                                default:
                                                                        ;
                                                        }
-                                                       
::connectivity::OSQLParser* pParser = 
static_cast<OQueryController*>(getDesignView()->getController())->getParser();
-                                                       pParseNode = 
pParser->predicateTree(aErrorMsg, 
+                                                       
::connectivity::OSQLParser& rParser = 
static_cast<OQueryController*>(getDesignView()->getController())->getParser();
+                                                       pParseNode = 
rParser.predicateTree(aErrorMsg, 
                                                                                
                                                aText, 
                                                                                
                                                
static_cast<OQueryController*>(getDesignView()->getController())->getNumberFormatter(),
 
                                                                                
                                                xColumn);
@@ -1206,7 +1206,7 @@
                                                                                
                                                        xColumn, 
                                                                                
                                                        
getDesignView()->getLocale(),
                                                                                
                                                        
static_cast<sal_Char>(getDesignView()->getDecimalSeparator().toChar()),
-                                                                               
                                                        
&(static_cast<OQueryController*>(getDesignView()->getController())->getParser()->getContext()));
+                                                                               
                                                        
&(static_cast<OQueryController*>(getDesignView()->getController())->getParser().getContext()));
                                                                delete 
pParseNode;
                                                        }
                                                        else




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to