[Libreoffice-commits] .: 4 commits - connectivity/inc vbahelper/source xmloff/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Jan 31 03:13:19 PST 2011


 connectivity/inc/connectivity/sqliterator.hxx     |   30 +++++++---------
 connectivity/inc/connectivity/sqlnode.hxx         |   39 +++++++++-------------
 connectivity/inc/connectivity/sqlparse.hxx        |   15 +++-----
 vbahelper/source/vbahelper/vbaapplicationbase.cxx |    5 --
 xmloff/source/text/XMLSectionExport.cxx           |    2 -
 xmloff/source/text/XMLTextListBlockContext.cxx    |    2 -
 6 files changed, 37 insertions(+), 56 deletions(-)

New commits:
commit e0b35a547a38167f63f349eb411b41c3707388f5
Author: Tobias Rosenberger <son at ich-habe-fertig.com>
Date:   Mon Jan 31 11:12:38 2011 +0000

    translate german comments

diff --git a/connectivity/inc/connectivity/sqlparse.hxx b/connectivity/inc/connectivity/sqlparse.hxx
index d55c555..531f1ac 100644
--- a/connectivity/inc/connectivity/sqlparse.hxx
+++ b/connectivity/inc/connectivity/sqlparse.hxx
@@ -208,24 +208,23 @@ namespace connectivity
         /// access to the SQLError instance owned by this parser
         const SQLError& getErrorHelper() const;
 
-        // TokenIDToStr: Token-Name zu einer Token-Nr.
+        // TokenIDToStr: token name belonging to a token number.
         static ::rtl::OString TokenIDToStr(sal_uInt32 nTokenID, const IParseContext* pContext = NULL);
 
-        // StrToTokenID: Token-Nr. zu einem Token-Namen.
+        // StrToTokenID: token number belonging to a token name.
         // static sal_uInt32 StrToTokenID(const ::rtl::OString & rName);
 
-        // RuleIDToStr gibt den zu einer RuleID gehoerenden ::rtl::OUString zurueck
-        // (Leerstring, falls nicht gefunden)
+        // (empty string if not found)
         static ::rtl::OUString RuleIDToStr(sal_uInt32 nRuleID);
 
-        // StrToRuleID berechnet zu einem ::rtl::OUString die RuleID (d.h. ::com::sun::star::sdbcx::Index in yytname)
-        // (0, falls nicht gefunden). Die Suche nach der ID aufgrund eines Strings ist
-        // extrem ineffizient (sequentielle Suche nach ::rtl::OUString)!
+        // StrToRuleID calculates the RuleID for a ::rtl::OUString (that is, ::com::sun::star::sdbcx::Index in yytname)
+        // (0 if not found). The search for an ID based on a String is
+        // extremely inefficient (sequential search for ::rtl::OUString)!
         static sal_uInt32 StrToRuleID(const ::rtl::OString & rValue);
 
         static OSQLParseNode::Rule RuleIDToRule( sal_uInt32 _nRule );
 
-        // RuleId mit enum, wesentlich effizienter
+        // RuleId with enum, far more efficient
         static sal_uInt32 RuleID(OSQLParseNode::Rule eRule);
         // compares the _sFunctionName with all known function names and return the DataType of the return value
         static sal_Int32 getFunctionReturnType(const ::rtl::OUString& _sFunctionName, const IParseContext* pContext = NULL);
commit 4db1ad938ebbe3d3263261f43c3418c9d5c9f9c4
Author: Tobias Rosenberger <son at ich-habe-fertig.com>
Date:   Mon Jan 31 11:12:04 2011 +0000

    translate german comments

diff --git a/connectivity/inc/connectivity/sqlnode.hxx b/connectivity/inc/connectivity/sqlnode.hxx
index 18069e2..1f370c1 100644
--- a/connectivity/inc/connectivity/sqlnode.hxx
+++ b/connectivity/inc/connectivity/sqlnode.hxx
@@ -124,13 +124,13 @@ namespace connectivity
         friend class OSQLParser;
 
         OSQLParseNodes					m_aChildren;
-        OSQLParseNode*	 				m_pParent;		// pParent fuer Reuckverkettung im Baum
-        ::rtl::OUString 				m_aNodeValue;	// Token-Name oder leer bei Regeln oder ::rtl::OUString bei
-                                                        // ::rtl::OUString, INT, usw. -Werten
+        OSQLParseNode*	 				m_pParent;		// pParent for reverse linkage in the tree
+        ::rtl::OUString 				m_aNodeValue;	// token name, or empty in case of rules, or ::rtl::OUString in case of
+                                                        // ::rtl::OUString, INT, etc.
         SQLNodeType 					m_eNodeType;	// s. o.
-        sal_uInt32						m_nNodeID; 		// ::com::sun::star::chaos::Rule ID (bei IsRule()) oder Token ID (bei !IsRule())
-                                            // ::com::sun::star::chaos::Rule IDs und Token IDs koennen nicht anhand des Wertes
-                                            // unterschieden werden, dafuer ist IsRule() abzufragen!
+        sal_uInt32						m_nNodeID; 		// ::com::sun::star::chaos::Rule ID (if IsRule()) or Token ID (if !IsRule())
+                                            // ::com::sun::star::chaos::Rule IDs and Token IDs can't be distinguished by their values,
+                                            // IsRule has to be used for that!
     public:
         enum Rule
         {
@@ -233,7 +233,7 @@ namespace connectivity
             other_like_predicate_part_2,
             between_predicate_part_2,
             cast_spec,
-            rule_count,             // letzter_wert
+            rule_count,             // last value
             UNKNOWN_RULE            // ID indicating that a node is no rule with a matching Rule-enum value (see getKnownRuleID)
         };
 
@@ -254,22 +254,19 @@ namespace connectivity
                       SQLNodeType _eNodeType,
                       sal_uInt32 _nNodeID = 0);
 
-            // Kopiert den entsprechenden ParseNode
+            // copies the respective ParseNode
         OSQLParseNode(const OSQLParseNode& rParseNode);
         OSQLParseNode& operator=(const OSQLParseNode& rParseNode);
 
         sal_Bool operator==(OSQLParseNode& rParseNode) const;
 
-        // Destruktor raeumt rekursiv den Baum ab
+        // destructor destruct the tree recursively
         virtual ~OSQLParseNode();
 
-        // Parent gibt den Zeiger auf den Parent zurueck
         OSQLParseNode* getParent() const {return m_pParent;};
 
-        // SetParent setzt den Parent-Zeiger eines ParseNodes
         void setParent(OSQLParseNode* pParseNode) {m_pParent = pParseNode;};
 
-        // ChildCount liefert die Anzahl der Kinder eines Knotens
         sal_uInt32 count() const {return m_aChildren.size();};
         inline OSQLParseNode* getChild(sal_uInt32 nPos) const;
 
@@ -350,15 +347,14 @@ namespace connectivity
         OSQLParseNode* getByRule(OSQLParseNode::Rule eRule) const;
 
 #if OSL_DEBUG_LEVEL > 0
-            // zeigt den ParseTree mit tabs und linefeeds
+            // shows the ParseTree with tabs and linefeeds
         void showParseTree( ::rtl::OUString& rString ) const;
         void showParseTree( ::rtl::OUStringBuffer& _inout_rBuf, sal_uInt32 nLevel ) const;
 #endif
 
-            // GetNodeType gibt den Knotentyp zurueck
         SQLNodeType getNodeType() const {return m_eNodeType;};
 
-            // RuleId liefert die RuleId der Regel des Knotens (nur bei IsRule())
+            // RuleId returns the RuleID of the node's rule (only if IsRule())
         sal_uInt32 getRuleID() const {return m_nNodeID;}
 
         /** returns the ID of the rule represented by the node
@@ -367,25 +363,22 @@ namespace connectivity
         */
         Rule getKnownRuleID() const;
 
-            // RuleId liefert die TokenId des Tokens des Knotens (nur bei ! IsRule())
+            // returns the TokenId of the node's tokenRuleId (only if !isRule())
         sal_uInt32 getTokenID() const {return m_nNodeID;}
 
-            // IsRule testet ob ein Node eine Regel (NonTerminal) ist
-            // Achtung : Regeln koenne auch Blaetter sein, z.B. leere Listen
+            // IsRule tests whether a node is a rule (NonTerminal)
+            // ATTENTION: rules can be leaves, for example empty lists
         sal_Bool isRule() const
             { return (m_eNodeType == SQL_NODE_RULE) || (m_eNodeType == SQL_NODE_LISTRULE)
                 || (m_eNodeType == SQL_NODE_COMMALISTRULE);}
 
-            // IsToken testet ob ein Node ein Token (Terminal) ist
-        sal_Bool isToken() const {return !isRule();} // ein Token ist keine Regel
+            // IsToken tests whether a Node is a Token (Terminal)
+        sal_Bool isToken() const {return !isRule();}
 
-                // TokenValue liefert den NodeValue eines Tokens
         const ::rtl::OUString& getTokenValue() const {return m_aNodeValue;}
 
-            // SetTokenValue setzt den NodeValue
         void setTokenValue(const ::rtl::OUString& rString) {	if (isToken()) m_aNodeValue = rString;}
 
-            // IsLeaf testet ob ein Node ein Blatt ist
         sal_Bool isLeaf() const {return m_aChildren.empty();}
 
         // negate only a searchcondition, any other rule could cause a gpf
commit c1c54c05fb32b1da744ba95ed29b49211e775028
Author: Tobias Rosenberger <son at ich-habe-fertig.com>
Date:   Mon Jan 31 11:11:14 2011 +0000

    translate german comments

diff --git a/connectivity/inc/connectivity/sqliterator.hxx b/connectivity/inc/connectivity/sqliterator.hxx
index 6512752..0593aa1 100644
--- a/connectivity/inc/connectivity/sqliterator.hxx
+++ b/connectivity/inc/connectivity/sqliterator.hxx
@@ -67,10 +67,10 @@ namespace connectivity
     {
     private:
         ::com::sun::star::sdbc::SQLException            m_aErrors;		    // conatins the error while iterating through the statement
-        const OSQLParseNode*				            m_pParseTree;		// aktueller ParseTree
+        const OSQLParseNode*				            m_pParseTree;		// current ParseTree
         const OSQLParser&					            m_rParser;			// if set used for general error messages from the context
-        OSQLStatementType					            m_eStatementType;	// Art des Statements
-        ::rtl::Reference<OSQLColumns>			            m_aSelectColumns;	// alle Spalten aus dem Select-Clause
+        OSQLStatementType					            m_eStatementType;
+        ::rtl::Reference<OSQLColumns>			            m_aSelectColumns;	// all columns from the Select clause
         ::rtl::Reference<OSQLColumns>			            m_aParameters;		// all parameters
         ::rtl::Reference<OSQLColumns>			            m_aGroupColumns;	// the group by columns
         ::rtl::Reference<OSQLColumns>			            m_aOrderColumns;	// the order by columns
@@ -79,7 +79,7 @@ namespace connectivity
         ::std::auto_ptr< OSQLParseTreeIteratorImpl >    m_pImpl;
 
         void				traverseParameter(const OSQLParseNode* _pParseNode,const OSQLParseNode* _pColumnRef,const ::rtl::OUString& _aColumnName,const ::rtl::OUString& _aTableRange, const ::rtl::OUString& _rColumnAlias);
-        // F"ugt eine Tabelle in die Map ein
+        // inserts a table into the map
         void				traverseOneTableName( OSQLTables& _rTables,const OSQLParseNode * pTableName, const ::rtl::OUString & rTableRange );
         void				traverseORCriteria(OSQLParseNode * pSearchCondition);
         void				traverseANDCriteria(OSQLParseNode * pSearchCondition);
@@ -124,11 +124,10 @@ namespace connectivity
       protected:
         void setSelectColumnName(::rtl::Reference<OSQLColumns>& _rColumns,const ::rtl::OUString & rColumnName,const ::rtl::OUString & rColumnAlias, const ::rtl::OUString & rTableRange,sal_Bool bFkt=sal_False,sal_Int32 _nType = com::sun::star::sdbc::DataType::VARCHAR,sal_Bool bAggFkt=sal_False);
         void appendColumns(::rtl::Reference<OSQLColumns>& _rColumns,const ::rtl::OUString& _rTableAlias,const OSQLTable& _rTable);
-        // Weitere Member-Variable, die in den "set"-Funktionen zur
-        // Verfuegung stehen sollen, koennen in der abgeleiteten Klasse
-        // definiert werden und z. B. in deren Konstruktor initialisiert
-        // bzw. nach Benutzung der "traverse"-Routinen mit Hilfe weiterer
-        // Funktionen abgefragt werden.
+        // Other member variables that should be available in the "set" functions
+        // can be defined in the derived class. They can be initialized
+        // in its constructor and, after the "traverse" routines have been used,
+        // they can be queried using other functions.
 
 
       private:
@@ -154,13 +153,13 @@ namespace connectivity
 
         void dispose();
         bool isCaseSensitive() const;
-        // Der zu analysierende/zu traversierende Parse Tree:
-        // bei "Ubergabe von NULL wird der aktuelle Parsetree gel"oscht und der Fehlerstatus gecleared
+        // The parse tree to be analysed/traversed:
+        // If NULL is passed, the current parse tree will be deleted and the error status cleared.
         void setParseTree(const OSQLParseNode * pNewParseTree);
 //		void setParser(const OSQLParser* _pParser) { m_pParser = _pParser; }
         const OSQLParseNode * getParseTree() const { return m_pParseTree; };
 
-        // Teilbaueme bei einem select statement
+        // subtrees in case of a select statement
         const OSQLParseNode* getWhereTree() const;
         const OSQLParseNode* getOrderTree() const;
         const OSQLParseNode* getGroupByTree() const;
@@ -178,7 +177,7 @@ namespace connectivity
         inline const ::com::sun::star::sdbc::SQLException&   getErrors() const { return m_aErrors; }
         inline bool hasErrors() const { return m_aErrors.Message.getLength() > 0; }
 
-        // Statement-Typ (wird bereits in setParseTree gesetzt):
+        // statement type (already set in setParseTree):
         OSQLStatementType getStatementType() const { return m_eStatementType; }
 
         /** traverses the complete statement tree, and fills all our data with
@@ -212,7 +211,7 @@ namespace connectivity
         */
         void traverseSome( sal_uInt32 _nIncludeMask );
 
-        // Die TableRangeMap enth"alt alle Tabellen unter dem zugeh"origen Rangenamen der zuerst gefunden wird
+        // The TableRangeMap contains all tables associated with the range name found first.
         const OSQLTables& getTables() const;
 
         ::rtl::Reference<OSQLColumns> getSelectColumns() const { return m_aSelectColumns;}
@@ -274,8 +273,7 @@ namespace connectivity
                                     ::rtl::OUString &_rColumnName,
                                     ::rtl::OUString& _rTableRange);
 
-        // Ermittelt fuer eine Funktion, Spalten den zugehoeren TableRange,
-        // wenn nicht eindeutig, dann leer
+        // empty if ambiguous
         sal_Bool getColumnTableRange(const OSQLParseNode* pNode, ::rtl::OUString &rTableRange) const;
 
         // return true when the tableNode is a rule like catalog_name, schema_name or table_name
commit c282c61b5fba08635868655f58776bf172d75e5d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 31 11:10:21 2011 +0000

    WaE: various new gcc 4.6.0 warnings

diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index 927054a..403feb5 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -359,15 +359,10 @@ uno::Any SAL_CALL VbaApplicationBase::Run( const ::rtl::OUString& MacroName, con
         const uno::Any** pArg = aArgsPtrArray;
         const uno::Any** pArgEnd = ( aArgsPtrArray + nArg );
 
-        sal_Int32 nLastArgWithValue = 0;
         sal_Int32 nArgProcessed = 0;
 
         for ( ; pArg != pArgEnd; ++pArg, ++nArgProcessed )
-        {
             aArgs[ nArgProcessed ] =  **pArg;
-            if( (*pArg)->hasValue() )
-                nLastArgWithValue = nArgProcessed;
-        }
 
         // resize array to position of last param with value
         aArgs.realloc( nArgProcessed + 1 );
diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx
index 16c8b8c..b8b675f 100644
--- a/xmloff/source/text/XMLSectionExport.cxx
+++ b/xmloff/source/text/XMLSectionExport.cxx
@@ -1241,7 +1241,6 @@ void XMLSectionExport::ExportIndexTemplateElement(
 
     // tab position
     sal_Bool bRightAligned = sal_False;
-    sal_Bool bRightAlignedOK = sal_False;
 
     // tab position
     sal_Int32 nTabPosition = 0;
@@ -1315,7 +1314,6 @@ void XMLSectionExport::ExportIndexTemplateElement(
                 case TOK_TPARAM_TAB_RIGHT_ALIGNED:
                     bRightAligned =
                         *(sal_Bool *)rValues[i].Value.getValue();
-                    bRightAlignedOK = sal_True;
                     break;
 
                 case TOK_TPARAM_TAB_POSITION:
diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx
index 984a1be..6efff1a 100644
--- a/xmloff/source/text/XMLTextListBlockContext.cxx
+++ b/xmloff/source/text/XMLTextListBlockContext.cxx
@@ -86,7 +86,6 @@ XMLTextListBlockContext::XMLTextListBlockContext(
     // Inherit style name from parent list, as well as the flags whether
     // numbering must be restarted and formats have to be created.
     OUString sParentListStyleName;
-    sal_Bool bParentRestartNumbering( sal_False );
     if( mxParentListBlock.Is() )
     {
         XMLTextListBlockContext *pParent =
@@ -97,7 +96,6 @@ XMLTextListBlockContext::XMLTextListBlockContext(
         mnLevel = pParent->GetLevel() + 1;
         mbRestartNumbering = pParent->IsRestartNumbering() ||
                              bRestartNumberingAtSubList;
-        bParentRestartNumbering = pParent->IsRestartNumbering();
         mbSetDefaults = pParent->mbSetDefaults;
         msListId = pParent->GetListId();
         msContinueListId = pParent->GetContinueListId();


More information about the Libreoffice-commits mailing list