diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2015-12-19 15:18:01 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-01-07 12:18:40 +0000 |
commit | 5e0d36adc3f7f245edfc79230d0871017ba15d5d (patch) | |
tree | b26f52373a20adb65041a79da23803503abad030 /sw/source/filter/html/htmlbas.cxx | |
parent | a8b10c2841bf38e0f4393594de9b61d9bd3cd842 (diff) |
BASIC : use std::vector instead of SbArray for Modules.
Change-Id: I9594efb13b3dccc637ccd61eea4b42255c2a775c
Reviewed-on: https://gerrit.libreoffice.org/20817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw/source/filter/html/htmlbas.cxx')
-rw-r--r-- | sw/source/filter/html/htmlbas.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx index 748985992dde..ef2f83ba43cd 100644 --- a/sw/source/filter/html/htmlbas.cxx +++ b/sw/source/filter/html/htmlbas.cxx @@ -268,23 +268,21 @@ void SwHTMLWriter::OutBasic() return; } + bool bFirst=true; // und jetzt alle StarBasic-Module und alle unbenutzen JavaSrript-Module // ausgeben for( sal_uInt16 i=0; i<pBasicMan->GetLibCount(); i++ ) { StarBASIC *pBasic = pBasicMan->GetLib( i ); const OUString& rLibName = pBasic->GetName(); - - SbxArray *pModules = pBasic->GetModules(); - for( sal_uInt16 j=0; j<pModules->Count(); j++ ) + for( const auto& pModule: pBasic->GetModules() ) { - const SbModule &rModule = dynamic_cast<const SbModule&>(*pModules->Get(j)); - OUString sLang(SVX_MACRO_LANGUAGE_STARBASIC); ScriptType eType = STARBASIC; - if( 0==i && 0==j ) + if( bFirst ) { + bFirst = false; OutNewLine(); OStringBuffer sOut; sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_meta) @@ -299,9 +297,9 @@ void SwHTMLWriter::OutBasic() .WriteCharPtr( "\">" ); } - const OUString& rModName = rModule.GetName(); + const OUString& rModName = pModule->GetName(); Strm().WriteCharPtr( SAL_NEWLINE_STRING ); // nicht einruecken! - HTMLOutFuncs::OutScript( Strm(), GetBaseURL(), rModule.GetSource(), + HTMLOutFuncs::OutScript( Strm(), GetBaseURL(), pModule->GetSource(), sLang, eType, aEmptyOUStr, &rLibName, &rModName, m_eDestEnc, &m_aNonConvertableCharacters ); |