incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1362917 - in /incubator/ooo/trunk/main: sd/source/core/sdpage.cxx sd/source/filter/ppt/pptanimations.hxx sfx2/source/doc/docvor.cxx writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx xmloff/source/style/weighhdl.cxx
Date Wed, 18 Jul 2012 12:43:35 GMT
Author: alg
Date: Wed Jul 18 12:43:35 2012
New Revision: 1362917

URL: http://svn.apache.org/viewvc?rev=1362917&view=rev
Log:
sd, sfx2, writerfilter, xmloff: fix some warnings
Patch by: Michael Stahl

Modified:
    incubator/ooo/trunk/main/sd/source/core/sdpage.cxx
    incubator/ooo/trunk/main/sd/source/filter/ppt/pptanimations.hxx
    incubator/ooo/trunk/main/sfx2/source/doc/docvor.cxx
    incubator/ooo/trunk/main/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
    incubator/ooo/trunk/main/xmloff/source/style/weighhdl.cxx

Modified: incubator/ooo/trunk/main/sd/source/core/sdpage.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/core/sdpage.cxx?rev=1362917&r1=1362916&r2=1362917&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/core/sdpage.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/core/sdpage.cxx Wed Jul 18 12:43:35 2012
@@ -1401,7 +1401,7 @@ void findAutoLayoutShapesImpl( SdPage& r
 	bool bMissing = false;
 
 	// for each entry in the layoutdescriptor, arrange a presentation shape
-	for( i = 0; (i < PRESOBJ_MAX) && (rDescriptor.meKind[i] != PRESOBJ_NONE); i++
)
+    for (i = 0; (i < MAX_PRESOBJS) && (rDescriptor.meKind[i] != PRESOBJ_NONE);
i++)
 	{
 		PresObjKind eKind = rDescriptor.meKind[i];
 		SdrObject* pObj = 0;
@@ -1423,7 +1423,7 @@ void findAutoLayoutShapesImpl( SdPage& r
 	if( bMissing && bInit )
 	{
 		// for each entry in the layoutdescriptor, look for an alternative shape
-		for( i = 0; (i < PRESOBJ_MAX) && (rDescriptor.meKind[i] != PRESOBJ_NONE); i++
)
+        for (i = 0; (i < MAX_PRESOBJS) && (rDescriptor.meKind[i] != PRESOBJ_NONE);
i++)
 		{
 			if( rShapes[i] )
 				continue;
@@ -1583,7 +1583,7 @@ void SdPage::SetAutoLayout(AutoLayout eL
 	int i;
 
 	// for each entry in the layoutdescriptor, arrange a presentation shape
-	for( i = 0; (i < PRESOBJ_MAX) && (aDescriptor.meKind[i] != PRESOBJ_NONE); i++
)
+    for (i = 0; (i < MAX_PRESOBJS) && (aDescriptor.meKind[i] != PRESOBJ_NONE);
i++)
 	{
 		PresObjKind eKind = aDescriptor.meKind[i];
 		SdrObject* pObj = InsertAutoLayoutShape( aLayoutShapes[i], eKind, aDescriptor.mbVertical[i],
aRectangle[i], bInit );

Modified: incubator/ooo/trunk/main/sd/source/filter/ppt/pptanimations.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/filter/ppt/pptanimations.hxx?rev=1362917&r1=1362916&r2=1362917&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/filter/ppt/pptanimations.hxx (original)
+++ incubator/ooo/trunk/main/sd/source/filter/ppt/pptanimations.hxx Wed Jul 18 12:43:35 2012
@@ -118,7 +118,7 @@ namespace ppt
 #define DFF_ANIM_GROUP_ID					19
 #define DFF_ANIM_NODE_TYPE					20
 #define DFF_ANIM_VOLUME						22
-#define DFF_ANIM_PROPERTY_ID_COUNT			DFF_ANIM_VOLUME
+#define DFF_ANIM_PROPERTY_ID_COUNT			(DFF_ANIM_VOLUME + 1)
 
 
 

Modified: incubator/ooo/trunk/main/sfx2/source/doc/docvor.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sfx2/source/doc/docvor.cxx?rev=1362917&r1=1362916&r2=1362917&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sfx2/source/doc/docvor.cxx (original)
+++ incubator/ooo/trunk/main/sfx2/source/doc/docvor.cxx Wed Jul 18 12:43:35 2012
@@ -746,7 +746,7 @@ sal_Bool SfxOrganizeListBox_Impl::MoveOr
 					pChildIter = NextSibling(pChildIter);
 				// gfs Fuellen bei Items onDemand
 				++i;
-				if(p[i+1] != INDEX_IGNORE &&
+				if((i < 2) && p[i+1] != INDEX_IGNORE &&
 				   pChildIter->HasChildsOnDemand() &&
 				   !GetModel()->HasChilds(pChildIter))
 					RequestingChilds(pChildIter);

Modified: incubator/ooo/trunk/main/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx?rev=1362917&r1=1362916&r2=1362917&view=diff
==============================================================================
--- incubator/ooo/trunk/main/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx (original)
+++ incubator/ooo/trunk/main/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx Wed Jul 18
12:43:35 2012
@@ -67,6 +67,8 @@ OOXMLFastTokenHandler::OOXMLFastTokenHan
 {
     ::rtl::OUString sResult;
 
+#if 0
+    //FIXME this is broken: tokenmap::wordlist is not indexed by Token!
     if ( Token >= 0 || Token < OOXML_FAST_TOKENS_END )
     {
         static ::rtl::OUString aTokens[OOXML_FAST_TOKENS_END];
@@ -75,17 +77,27 @@ OOXMLFastTokenHandler::OOXMLFastTokenHan
             aTokens[Token] = ::rtl::OUString::createFromAscii
                 (tokenmap::wordlist[Token].name);
     }
-        
+#else
+    (void) Token;
+#endif
+
     return sResult;
 }
 
 css::uno::Sequence< ::sal_Int8 > SAL_CALL OOXMLFastTokenHandler::getUTF8Identifier(::sal_Int32
Token) 
     throw (css::uno::RuntimeException)
 {
+#if 0
 	if ( Token < 0  || Token >= OOXML_FAST_TOKENS_END )
+#endif
 		return css::uno::Sequence< ::sal_Int8 >();
 		
+#if 0
+    //FIXME this is broken: tokenmap::wordlist is not indexed by Token!
 	return css::uno::Sequence< ::sal_Int8 >(reinterpret_cast< const sal_Int8 *>(tokenmap::wordlist[Token].name),
strlen(tokenmap::wordlist[Token].name));
+#else
+    (void) Token;
+#endif
 }
 
 ::sal_Int32 SAL_CALL OOXMLFastTokenHandler::getTokenFromUTF8

Modified: incubator/ooo/trunk/main/xmloff/source/style/weighhdl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/xmloff/source/style/weighhdl.cxx?rev=1362917&r1=1362916&r2=1362917&view=diff
==============================================================================
--- incubator/ooo/trunk/main/xmloff/source/style/weighhdl.cxx (original)
+++ incubator/ooo/trunk/main/xmloff/source/style/weighhdl.cxx Wed Jul 18 12:43:35 2012
@@ -103,7 +103,7 @@ sal_Bool XMLFontWeightPropHdl::importXML
 	{
 		bRet = sal_False;
 		static int nCount = sizeof(aFontWeightMap)/sizeof(FontWeightMapper);
-		for( int i=0; i<nCount; i++ )
+        for (int i = 0; i < (nCount-1); ++i)
 		{
 			if( (nWeight >= aFontWeightMap[i].nValue) && (nWeight <= aFontWeightMap[i+1].nValue)
)
 			{



Mime
View raw message