User: hr      
Date: 06/06/19 20:26:42

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

Log:
 INTEGRATION: CWS warnings01 (1.76.72); FILE MERGED
 2006/05/24 00:00:05 sb 1.76.72.3: RESYNC: (1.77-1.78); FILE MERGED
 2006/04/07 20:55:28 sb 1.76.72.2: RESYNC: (1.76-1.77); FILE MERGED
 2006/03/24 15:36:26 fs 1.76.72.1: #i57457# warning-free code (unxlngi6/.pro + 
unxsoli4.pro)

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&r2=1.79
Delta lines:  +19 -82
---------------------
--- QueryDesignView.cxx 7 Apr 2006 14:13:23 -0000       1.78
+++ QueryDesignView.cxx 20 Jun 2006 03:26:39 -0000      1.79
@@ -670,7 +670,7 @@
                                pConn->RecalcLines();
                                        // fuer das unten folgende Invalidate 
muss ich dieser neuen Connection erst mal die Moeglichkeit geben,
                                        // ihr BoundingRect zu ermitteln
-                               pConn->Invalidate();
+                               pConn->InvalidateConnection();
                        }
 
                }
@@ -740,11 +740,11 @@
                                                // we have to look if we have 
alias.* here but before we have to check if the column doesn't already exist
                                                String sTemp = rFieldName;
                                                OTableFieldDescRef      aInfo = 
new OTableFieldDesc();
-                                               
OJoinTableView::OTableWindowMap::iterator aIter = pTabList->begin();
+                                               
OJoinTableView::OTableWindowMap::iterator tableIter = pTabList->begin();
                                                sal_Bool bFound = sal_False;
-                                               for(;!bFound && aIter != 
pTabList->end() ;++aIter)
+                                               for(;!bFound && tableIter != 
pTabList->end() ;++tableIter)
                                                {
-                                                       OQueryTableWindow* 
pTabWin = static_cast<OQueryTableWindow*>(aIter->second);
+                                                       OQueryTableWindow* 
pTabWin = static_cast<OQueryTableWindow*>(tableIter->second);
 
                                                        if ( bFound = 
pTabWin->ExistsField( rFieldName, aInfo ) )
                                                        {
@@ -882,8 +882,8 @@
                                                                ::rtl::OUString 
sHavingStr = aHavingStr;
                                                                
                                                                sal_uInt32 
nCount = pParseNode->count();
-                                                               for( sal_uInt32 
i = 1 ; i < nCount ; ++i)
-                                                                       
pParseNode->getChild(i)->parseNodeToStr(        sHavingStr,
+                                                               for( sal_uInt32 
node = 1 ; node < nCount ; ++node)
+                                                                       
pParseNode->getChild(node)->parseNodeToStr(     sHavingStr,
                                                                                
                                                xMetaData,
                                                                                
                                                &rContext,
                                                                                
                                                sal_False,
@@ -1067,49 +1067,6 @@
        }
 
        
//------------------------------------------------------------------------------
-
-       ::rtl::OUString BuildACriteria( const OQueryDesignView* _pView,const 
::rtl::OUString& _rVal, sal_Int32 aType )
-       {
-
-               ::rtl::OUString aRetStr;
-               String  aVal,rVal;
-               String aOpList;aOpList.AssignAscii("<>;>=;<=;<;>;=;LIKE");
-               xub_StrLen      nOpListCnt = aOpList.GetTokenCount();
-
-               String aToken;
-               for( xub_StrLen nIdx=0 ; nIdx < nOpListCnt ; nIdx++ )
-               {
-                       aToken = aOpList.GetToken(nIdx);
-                       if (rVal.Search( aToken ) == 0)
-                       {
-                               aRetStr = ::rtl::OUString(' ');
-                               aRetStr += aToken;
-                               aRetStr += ::rtl::OUString(' ');
-                               aVal = rVal.Copy( aToken.Len() );
-                               aVal.EraseLeadingChars( ' ' );
-                               if( aVal.Search( '\'' ) == STRING_NOTFOUND 
)//XXX O'Brien???
-                               {
-                                       aVal = QuoteField(_pView, aVal, aType );
-                               }
-                               aRetStr += aVal;
-                               break;
-                       }
-               }
-
-               if( !aRetStr.getLength()) //  == 0
-               {
-                       aRetStr = rVal.Search( '%' ) == STRING_NOTFOUND ? 
::rtl::OUString::createFromAscii(" = ") : ::rtl::OUString::createFromAscii(" 
LIKE ");
-                       aVal = rVal;
-                       if( aVal.Search( '\'' ) == STRING_NOTFOUND )//XXX 
O'Brien???
-                       {
-                               aVal = QuoteField( _pView,aVal, aType );
-                       }
-                       aRetStr += aVal;
-               }
-
-               return aRetStr;//XXX
-       }
-       
//------------------------------------------------------------------------------
        void GenerateInnerJoinCriterias(const Reference< XConnection>& 
_xConnection,
                                                                        
::rtl::OUString& _rJoinCrit,
                                                                        const 
::std::vector<OTableConnection*>* _pConnList)
@@ -1287,8 +1244,7 @@
        SqlParseError GetSelectionCriteria(     OQueryDesignView* _pView,
                                                                                
OSelectionBrowseBox* _pSelectionBrw,
                                                                                
const ::connectivity::OSQLParseNode* pNode,
-                                                                               
int& rLevel,
-                                                                               
sal_Bool bJoinWhere = sal_False)
+                                                                               
int& rLevel )
        {
                if (!SQL_ISRULE(pNode, select_statement))
                        return eNoSelectStatement;
@@ -1654,6 +1610,8 @@
                                                i--;
                                                aCondition = aCondition + 
::rtl::OUString::createFromAscii("<=");
                                                break;
+                    default:
+                        break;
                                }
 
                                // go backward
@@ -1862,7 +1820,6 @@
 
                ::connectivity::OSQLParseTreeIterator& aIterator = 
pController->getParseIterator();
                const ::connectivity::OSQLParseNode* pParseTree = 
aIterator.getParseTree();
-               const ::connectivity::OSQLParseNode* pTableRefCommaList = 0;
 
                if (pParseTree)
                {
@@ -1870,8 +1827,6 @@
                                eErrorCode = eNativeMode;
                        else if (SQL_ISRULE(pParseTree,select_statement))
                        {
-                               ::connectivity::OSQLParseNode* pTree = 
pParseTree->getChild(1);
-
                                const OSQLTables& aMap = aIterator.getTables();
                                ::comphelper::UStringMixLess 
aTmp(aMap.key_comp());
                                ::comphelper::UStringMixEqual 
aKeyComp(static_cast< ::comphelper::UStringMixLess*>(&aTmp)->isCaseSensitive());
@@ -1943,7 +1898,7 @@
                                                                        // 
GetSelectionCriteria mu"s vor GetHavingCriteria aufgerufen werden
                                                                        int 
nLevel=0;
 
-                                                                       if ( 
eOk == (eErrorCode = 
GetSelectionCriteria(_pView,_pSelectionBrw,pParseTree,nLevel,sal_True)) )
+                                                                       if ( 
eOk == (eErrorCode = 
GetSelectionCriteria(_pView,_pSelectionBrw,pParseTree,nLevel)) )
                                                                        {
                                                                                
if ( eOk == (eErrorCode = GetGroupCriteria(_pView,_pSelectionBrw,pParseTree)) )
                                                                                
{
@@ -2377,12 +2332,11 @@
     DBG_DTOR(OQueryDesignView,NULL);
 }
 
//------------------------------------------------------------------------------
-IMPL_LINK( OQueryDesignView, SplitHdl, void*, p )
+IMPL_LINK( OQueryDesignView, SplitHdl, void*, /*p*/ )
 {
        if (!getController()->isReadOnly())
        {
                m_bInSplitHandler = sal_True;
-               long nTest = m_aSplitter.GetPosPixel().Y();
                m_aSplitter.SetPosPixel( Point( 
m_aSplitter.GetPosPixel().X(),m_aSplitter.GetSplitPosPixel() ) );
                
static_cast<OQueryController*>(getController())->setSplitPos(m_aSplitter.GetSplitPosPixel());
                static_cast<OQueryController*>(getController())->setModified();
@@ -2492,7 +2446,7 @@
        m_pTableView->ClearAll();
 }
 // 
-----------------------------------------------------------------------------
-void OQueryDesignView::setStatement(const ::rtl::OUString& _rsStatement)
+void OQueryDesignView::setStatement(const ::rtl::OUString& /*_rsStatement*/)
 {
 }
 // 
-----------------------------------------------------------------------------
@@ -2510,42 +2464,24 @@
 sal_Bool OQueryDesignView::isCutAllowed()
 {
        sal_Bool bAllowed = sal_False;
-       switch(m_eChildFocus)
-       {
-               case SELECTION:
+       if ( SELECTION == m_eChildFocus )
                        bAllowed = m_pSelectionBox->isCutAllowed();
-                       break;
-               case TABLEVIEW:
-                       break;
-       }
        return bAllowed;
 }
 // 
-----------------------------------------------------------------------------
 sal_Bool OQueryDesignView::isPasteAllowed()
 {
        sal_Bool bAllowed = sal_False;
-       switch(m_eChildFocus)
-       {
-               case SELECTION:
+       if ( SELECTION == m_eChildFocus )
                        bAllowed = m_pSelectionBox->isPasteAllowed();
-                       break;
-               case TABLEVIEW:
-                       break;
-       }
        return bAllowed;
 }
 // 
-----------------------------------------------------------------------------
 sal_Bool OQueryDesignView::isCopyAllowed()
 {
        sal_Bool bAllowed = sal_False;
-       switch(m_eChildFocus)
-       {
-               case SELECTION:
+       if ( SELECTION == m_eChildFocus )
                        bAllowed = m_pSelectionBox->isCopyAllowed();
-                       break;
-               case TABLEVIEW:
-                       break;
-       }
        return bAllowed;
 }
 // 
-----------------------------------------------------------------------------
@@ -2661,6 +2597,7 @@
 #if OSL_DEBUG_LEVEL > 0
                        {
                                Window* pFocus = Application::GetFocusWindow();
+                (void)pFocus;
                        }
 #endif
 




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

Reply via email to