animations/source/animcore/factreg.cxx | 2 +- basic/source/comp/exprgen.cxx | 4 ++-- basic/source/comp/parser.cxx | 4 ++-- basic/source/comp/token.cxx | 10 +++++----- basic/source/sbx/sbxscan.cxx | 2 +- sal/qa/osl/file/osl_File.cxx | 6 +++--- sax/source/tools/converter.cxx | 2 +- sfx2/source/doc/iframe.cxx | 2 +- sfx2/source/doc/plugin.cxx | 2 +- sfx2/source/sidebar/Deck.cxx | 2 +- svtools/source/uno/miscservices.cxx | 2 +- 11 files changed, 19 insertions(+), 19 deletions(-)
New commits: commit 392c5b2a70440c03341f21c7583ca5139b4a253b Author: Takeshi Abe <t...@fixedpoint.jp> Date: Thu Aug 1 04:32:32 2013 +0900 Mark as const Change-Id: Idd1d0641d5b7d8594f354c7d2e2a9093ecc6b2f7 diff --git a/animations/source/animcore/factreg.cxx b/animations/source/animcore/factreg.cxx index 4f5b078..d957981 100644 --- a/animations/source/animcore/factreg.cxx +++ b/animations/source/animcore/factreg.cxx @@ -40,7 +40,7 @@ using namespace animcore; 0, 0\ }\ -static struct ImplementationEntry g_entries[] = +static const struct ImplementationEntry g_entries[] = { IMPLEMENTATION_ENTRY( PAR ), IMPLEMENTATION_ENTRY( SEQ ), diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx index 3578097..762e0e3 100644 --- a/basic/source/comp/exprgen.cxx +++ b/basic/source/comp/exprgen.cxx @@ -28,7 +28,7 @@ typedef struct { SbiOpcode eOp; // Opcode } OpTable; -static OpTable aOpTable [] = { +static const OpTable aOpTable [] = { { EXPON,_EXP }, { MUL, _MUL }, { DIV, _DIV }, @@ -156,7 +156,7 @@ void SbiExprNode::Gen( RecursiveMode eRecMode ) { pRight->Gen(); } - for( OpTable* p = aOpTable; p->eTok != NIL; p++ ) + for( const OpTable* p = aOpTable; p->eTok != NIL; p++ ) { if( p->eTok == eTok ) { diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index bb53d93..d61f334 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -38,7 +38,7 @@ struct SbiStatement { #define Y sal_True #define N sal_False -static SbiStatement StmntTable [] = { +static const SbiStatement StmntTable [] = { { ATTRIBUTE, &SbiParser::Attribute, Y, Y, }, // ATTRIBUTE { CALL, &SbiParser::Call, N, Y, }, // CALL { CLOSE, &SbiParser::Close, N, Y, }, // CLOSE @@ -409,7 +409,7 @@ bool SbiParser::Parse() // statement parsers - SbiStatement* p; + const SbiStatement* p; for( p = StmntTable; p->eTok != NIL; p++ ) if( p->eTok == eCurTok ) break; diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx index 0da1c51..f3d27ed 100644 --- a/basic/source/comp/token.cxx +++ b/basic/source/comp/token.cxx @@ -25,9 +25,9 @@ struct TokenTable { SbiToken t; const char *s; }; static short nToken; // number of tokens -static TokenTable* pTokTable; +static const TokenTable* pTokTable; -static TokenTable aTokTable_Basic [] = { +static const TokenTable aTokTable_Basic [] = { { CAT, "&" }, { MUL, "*" }, { PLUS, "+" }, @@ -220,7 +220,7 @@ SbiTokenizer::SbiTokenizer( const OUString& rSrc, StarBASIC* pb ) bEos = bKeywords = bErrorIsSymbol = true; if( !nToken ) { - TokenTable *tp; + const TokenTable *tp; for( nToken = 0, tp = pTokTable; tp->t; nToken++, tp++ ) {} } @@ -297,7 +297,7 @@ const OUString& SbiTokenizer::Symbol( SbiToken t ) default: break; } - TokenTable* tp = pTokTable; + const TokenTable* tp = pTokTable; for( short i = 0; i < nToken; i++, tp++ ) { if( tp->t == t ) @@ -336,7 +336,7 @@ SbiToken SbiTokenizer::Next() bEos = IsEoln( eCurTok ); return eCurTok; } - TokenTable *tp; + const TokenTable *tp; if( !NextSym() ) { diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 157407e..180de7e 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -288,7 +288,7 @@ SbxError SbxValue::ScanNumIntnl( const OUString& rSrc, double& nVal, bool bSingl } -static double roundArray[] = { +static const double roundArray[] = { 5.0e+0, 0.5e+0, 0.5e-1, 0.5e-2, 0.5e-3, 0.5e-4, 0.5e-5, 0.5e-6, 0.5e-7, 0.5e-8, 0.5e-9, 0.5e-10,0.5e-11,0.5e-12,0.5e-13,0.5e-14,0.5e-15 }; diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 15df1b8..6357a8b 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -6198,9 +6198,9 @@ namespace osl_Directory #ifdef WNT //########################################## - char* get_unused_drive_letter() + const char* get_unused_drive_letter() { - static char m_aBuff[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + static const char m_aBuff[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; DWORD ld = GetLogicalDrives(); DWORD i = 4; @@ -6218,7 +6218,7 @@ namespace osl_Directory //########################################## void at_invalid_logical_drive() { - char* drv = get_unused_drive_letter(); + const char* drv = get_unused_drive_letter(); char buff[PATH_BUFFER_SIZE]; memset(buff, 0, sizeof(buff)); diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx index da3d3f1..6cfe688 100644 --- a/sax/source/tools/converter.cxx +++ b/sax/source/tools/converter.cxx @@ -1331,7 +1331,7 @@ static bool lcl_isLeapYear(const sal_uInt32 nYear) static sal_uInt16 lcl_MaxDaysPerMonth(const sal_Int32 nMonth, const sal_Int32 nYear) { - static sal_uInt16 s_MaxDaysPerMonth[12] = + static const sal_uInt16 s_MaxDaysPerMonth[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; OSL_ASSERT(0 < nMonth && nMonth <= 12); if ((2 == nMonth) && lcl_isLeapYear(nYear)) diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx index d43d338..9f6c15e 100644 --- a/sfx2/source/doc/iframe.cxx +++ b/sfx2/source/doc/iframe.cxx @@ -77,7 +77,7 @@ IFrameWindow_Impl::IFrameWindow_Impl( Window *pParent, sal_Bool bHasBorder, WinB const SfxItemPropertyMapEntry* lcl_GetIFramePropertyMap_Impl() { - static SfxItemPropertyMapEntry aIFramePropertyMap_Impl[] = + static const SfxItemPropertyMapEntry aIFramePropertyMap_Impl[] = { { MAP_CHAR_LEN("FrameIsAutoBorder"), WID_FRAME_IS_AUTO_BORDER, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 }, { MAP_CHAR_LEN("FrameIsAutoScroll"), WID_FRAME_IS_AUTO_SCROLL, &::getBooleanCppuType(), PROPERTY_UNBOUND, 0 }, diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx index 9a59132..3d24f23 100644 --- a/sfx2/source/doc/plugin.cxx +++ b/sfx2/source/doc/plugin.cxx @@ -60,7 +60,7 @@ void PluginWindow_Impl::Resize() #define WID_URL 3 const SfxItemPropertyMapEntry* lcl_GetPluginPropertyMap_Impl() { - static SfxItemPropertyMapEntry aPluginPropertyMap_Impl[] = + static const SfxItemPropertyMapEntry aPluginPropertyMap_Impl[] = { { MAP_CHAR_LEN("PluginCommands"), WID_COMMANDS, &::getCppuType((::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >*)0), PROPERTY_UNBOUND, 0}, { MAP_CHAR_LEN("PluginMimeType"), WID_MIMETYPE, &::getCppuType((const OUString*)0), PROPERTY_UNBOUND, 0 }, diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index 7aef143..f3b23b4 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -361,7 +361,7 @@ const char* GetWindowClassification (const Window* pWindow) } else { - static char msWindow[] = "window"; + static const char msWindow[] = "window"; return msWindow; } } diff --git a/svtools/source/uno/miscservices.cxx b/svtools/source/uno/miscservices.cxx index da5e7d2..76bc5a6 100644 --- a/svtools/source/uno/miscservices.cxx +++ b/svtools/source/uno/miscservices.cxx @@ -61,7 +61,7 @@ extern sdecl::ServiceDecl const serviceDecl; namespace { - static struct ::cppu::ImplementationEntry s_aServiceEntries[] = + static const struct ::cppu::ImplementationEntry s_aServiceEntries[] = { { ::svt::uno::Wizard::Create, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits