Kaydet (Commit) 89f08dce authored tarafından Michael Stahl's avatar Michael Stahl Kaydeden (comit) Michael Stahl

sd, sfx2, writerfilter, xmloff: fix some warnings

üst 4c3501cb
...@@ -1384,7 +1384,7 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto ...@@ -1384,7 +1384,7 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
bool bMissing = false; bool bMissing = false;
// for each entry in the layoutdescriptor, arrange a presentation shape // 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]; PresObjKind eKind = rDescriptor.meKind[i];
SdrObject* pObj = 0; SdrObject* pObj = 0;
...@@ -1406,7 +1406,7 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto ...@@ -1406,7 +1406,7 @@ void findAutoLayoutShapesImpl( SdPage& rPage, const LayoutDescriptor& rDescripto
if( bMissing && bInit ) if( bMissing && bInit )
{ {
// for each entry in the layoutdescriptor, look for an alternative shape // 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] ) if( rShapes[i] )
continue; continue;
...@@ -1566,7 +1566,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, sal_Bool bInit, sal_Bool bCreate ...@@ -1566,7 +1566,7 @@ void SdPage::SetAutoLayout(AutoLayout eLayout, sal_Bool bInit, sal_Bool bCreate
int i; int i;
// for each entry in the layoutdescriptor, arrange a presentation shape // 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]; PresObjKind eKind = aDescriptor.meKind[i];
SdrObject* pObj = InsertAutoLayoutShape( aLayoutShapes[i], eKind, aDescriptor.mbVertical[i], aRectangle[i], bInit ); SdrObject* pObj = InsertAutoLayoutShape( aLayoutShapes[i], eKind, aDescriptor.mbVertical[i], aRectangle[i], bInit );
......
...@@ -112,7 +112,7 @@ namespace ppt ...@@ -112,7 +112,7 @@ namespace ppt
#define DFF_ANIM_GROUP_ID 19 #define DFF_ANIM_GROUP_ID 19
#define DFF_ANIM_NODE_TYPE 20 #define DFF_ANIM_NODE_TYPE 20
#define DFF_ANIM_VOLUME 22 #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 // property types
#define DFF_ANIM_PROP_TYPE_BYTE 0 #define DFF_ANIM_PROP_TYPE_BYTE 0
......
...@@ -63,6 +63,8 @@ OUString SAL_CALL OOXMLFastTokenHandler::getIdentifier(::sal_Int32 Token) ...@@ -63,6 +63,8 @@ OUString SAL_CALL OOXMLFastTokenHandler::getIdentifier(::sal_Int32 Token)
{ {
OUString sResult; OUString sResult;
#if 0
//FIXME this is broken: tokenmap::wordlist is not indexed by Token!
if ( Token >= 0 || Token < OOXML_FAST_TOKENS_END ) if ( Token >= 0 || Token < OOXML_FAST_TOKENS_END )
{ {
static OUString aTokens[OOXML_FAST_TOKENS_END]; static OUString aTokens[OOXML_FAST_TOKENS_END];
...@@ -71,6 +73,9 @@ OUString SAL_CALL OOXMLFastTokenHandler::getIdentifier(::sal_Int32 Token) ...@@ -71,6 +73,9 @@ OUString SAL_CALL OOXMLFastTokenHandler::getIdentifier(::sal_Int32 Token)
aTokens[Token] = OUString::createFromAscii aTokens[Token] = OUString::createFromAscii
(tokenmap::wordlist[Token].name); (tokenmap::wordlist[Token].name);
} }
#else
(void) Token;
#endif
return sResult; return sResult;
} }
...@@ -78,10 +83,17 @@ OUString SAL_CALL OOXMLFastTokenHandler::getIdentifier(::sal_Int32 Token) ...@@ -78,10 +83,17 @@ OUString SAL_CALL OOXMLFastTokenHandler::getIdentifier(::sal_Int32 Token)
css::uno::Sequence< ::sal_Int8 > SAL_CALL OOXMLFastTokenHandler::getUTF8Identifier(::sal_Int32 Token) css::uno::Sequence< ::sal_Int8 > SAL_CALL OOXMLFastTokenHandler::getUTF8Identifier(::sal_Int32 Token)
throw (css::uno::RuntimeException) throw (css::uno::RuntimeException)
{ {
#if 0
if ( Token < 0 || Token >= OOXML_FAST_TOKENS_END ) if ( Token < 0 || Token >= OOXML_FAST_TOKENS_END )
#endif
return css::uno::Sequence< ::sal_Int8 >(); 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)); 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 ::sal_Int32 SAL_CALL OOXMLFastTokenHandler::getTokenFromUTF8
......
...@@ -109,7 +109,7 @@ sal_Bool XMLFontWeightPropHdl::importXML( const OUString& rStrImpValue, Any& rVa ...@@ -109,7 +109,7 @@ sal_Bool XMLFontWeightPropHdl::importXML( const OUString& rStrImpValue, Any& rVa
{ {
bRet = sal_False; bRet = sal_False;
static int nCount = sizeof(aFontWeightMap)/sizeof(FontWeightMapper); 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) ) if( (nWeight >= aFontWeightMap[i].nValue) && (nWeight <= aFontWeightMap[i+1].nValue) )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment