diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-10 10:22:59 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-10 10:22:59 +0100 |
commit | f19402658dce6944e82a9058a6888e488b37b336 (patch) | |
tree | 1f61689f05381282de296dd7f37668dd5a6a1951 | |
parent | cc2c9d514d3095d561da7c8fc94e8a09fa2f1a2f (diff) |
fix windows build
Change-Id: Ibd768bef633de63ad3f7e826eb8044e04c1159ae
-rw-r--r-- | oox/source/ole/vbaexport.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx index b9c9676b5d38..904056d6a18d 100644 --- a/oox/source/ole/vbaexport.cxx +++ b/oox/source/ole/vbaexport.cxx @@ -778,10 +778,11 @@ void VbaExport::exportVBA(SotStorage* pRootStorage) // start here with the VBA export SotStorage* pVBAStream = pRootStorage->OpenSotStorage("VBA", STREAM_READWRITE); SotStorageStream* pDirStream = pVBAStream->OpenSotStream("dir", STREAM_READWRITE); - SotStorageStream* pModuleStream[n]; + std::vector<SotStorageStream*> aModuleStreams; + aModuleStreams.reserve(n); for (sal_Int32 i = 0; i < n; ++i) { - pModuleStream[i] = pVBAStream->OpenSotStream(aElementNames[i], STREAM_READWRITE); + aModuleStreams.push_back(pVBAStream->OpenSotStream(aElementNames[i], STREAM_READWRITE)); } SotStorageStream* pVBAProjectStream = pVBAStream->OpenSotStream("_VBA_PROJECT", STREAM_READWRITE); SotStorageStream* pPROJECTStream = pRootStorage->OpenSotStream("PROJECT", STREAM_READWRITE); @@ -795,7 +796,7 @@ void VbaExport::exportVBA(SotStorage* pRootStorage) css::uno::Any aCode = xNameContainer->getByName(aElementNames[i]); OUString aSourceCode; aCode >>= aSourceCode; - exportModuleStream(*pModuleStream[i], aSourceCode, aElementNames[i]); + exportModuleStream(*aModuleStreams[i], aSourceCode, aElementNames[i]); } exportVBAProjectStream(*pVBAProjectStream); exportPROJECTStream(*pPROJECTStream, xNameContainer, getProjectName()); @@ -804,7 +805,7 @@ void VbaExport::exportVBA(SotStorage* pRootStorage) pVBAProjectStream->Commit(); for(sal_Int32 i = 0; i < n; i++) { - pModuleStream[i]->Commit(); + aModuleStreams[i]->Commit(); } pDirStream->Commit(); pVBAStream->Commit(); |