diff options
author | Michael Stahl <mst@openoffice.org> | 2012-07-27 17:31:03 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-07-27 17:50:22 +0200 |
commit | 89f08dce89adfddd3fb8e00b7a7a9c5da2a4943e (patch) | |
tree | 5ff4fb439b69b59569632fcbf4e67ae3cf4b5545 | |
parent | sw: fix some warnings (diff) | |
download | core-89f08dce89adfddd3fb8e00b7a7a9c5da2a4943e.tar.gz core-89f08dce89adfddd3fb8e00b7a7a9c5da2a4943e.zip |
sd, sfx2, writerfilter, xmloff: fix some warnings
-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 5f5d5cc25c04..0432f5403700 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -1384,7 +1384,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; @@ -1406,7 +1406,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; @@ -1566,7 +1566,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 972eea42e295..92054bd6ddb5 100644 --- a/sd/source/filter/ppt/pptanimations.hxx +++ b/sd/source/filter/ppt/pptanimations.hxx @@ -112,7 +112,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) // property types #define DFF_ANIM_PROP_TYPE_BYTE 0 diff --git a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx index 53338c8e6440..3dbf3086f20e 100644 --- a/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastTokenHandler.cxx @@ -63,6 +63,8 @@ OUString SAL_CALL OOXMLFastTokenHandler::getIdentifier(::sal_Int32 Token) { OUString sResult; +#if 0 + //FIXME this is broken: tokenmap::wordlist is not indexed by Token! if ( Token >= 0 || Token < OOXML_FAST_TOKENS_END ) { static OUString aTokens[OOXML_FAST_TOKENS_END]; @@ -71,6 +73,9 @@ OUString SAL_CALL OOXMLFastTokenHandler::getIdentifier(::sal_Int32 Token) aTokens[Token] = OUString::createFromAscii (tokenmap::wordlist[Token].name); } +#else + (void) Token; +#endif return sResult; } @@ -78,10 +83,17 @@ OUString SAL_CALL OOXMLFastTokenHandler::getIdentifier(::sal_Int32 Token) 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) ) { |