diff options
author | Michael Stahl <mst@openoffice.org> | 2012-07-31 14:47:26 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-07-31 14:47:26 +0200 |
commit | 10790f7a0bcf0fdcfafedda8c98a8f6ef845fd38 (patch) | |
tree | 9a7cfa2d7ae1fa39e782d60c43b7334ad13b8f93 | |
parent | 746954f550d3d42393a817cd1172403e098d119f (diff) |
sd, sfx2, writerfilter, xmloff: fix some warnings
Signed-off-by: Petr Mladek <pmladek@suse.cz>
-rw-r--r-- | sd/source/core/sdpage.cxx | 6 | ||||
-rw-r--r-- | sd/source/filter/ppt/pptanimations.hxx | 2 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx | 12 | ||||
-rw-r--r-- | xmloff/source/style/weighhdl.cxx | 2 |
4 files changed, 17 insertions, 5 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 1fd344dc9a6f..8313c842fc5d 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1390,7 +1390,7 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto 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; @@ -1412,7 +1412,7 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto 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; @@ -1572,7 +1572,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, sal_Bool bInit, sal_Bool bCreate 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 ); diff --git a/sd/source/filter/ppt/pptanimations.hxx b/sd/source/filter/ppt/pptanimations.hxx index ed1d5f091510..b82b3216a2f1 100644 --- a/sd/source/filter/ppt/pptanimations.hxx +++ b/sd/source/filter/ppt/pptanimations.hxx @@ -123,7 +123,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) diff --git a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx index c89fd90c200e..4bcec2abf9ab 100644 --- a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx @@ -72,6 +72,8 @@ OOXMLFastTokenHandler::OOXMLFastTokenHandler { ::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]; @@ -80,6 +82,9 @@ OOXMLFastTokenHandler::OOXMLFastTokenHandler aTokens[Token] = ::rtl::OUString::createFromAscii (tokenmap::wordlist[Token].name); } +#else + (void) Token; +#endif return sResult; } @@ -87,10 +92,17 @@ OOXMLFastTokenHandler::OOXMLFastTokenHandler 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 diff --git a/xmloff/source/style/weighhdl.cxx b/xmloff/source/style/weighhdl.cxx index 2befaa8b274a..66fd36912ab4 100644 --- a/xmloff/source/style/weighhdl.cxx +++ b/xmloff/source/style/weighhdl.cxx @@ -109,7 +109,7 @@ sal_Bool XMLFontWeightPropHdl::importXML( const OUString& rStrImpValue, Any& rVa { 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) ) { |