Kaydet (Commit) f1940265 authored tarafından Caolán McNamara's avatar Caolán McNamara

fix windows build

Change-Id: Ibd768bef633de63ad3f7e826eb8044e04c1159ae
üst cc2c9d51
...@@ -778,10 +778,11 @@ void VbaExport::exportVBA(SotStorage* pRootStorage) ...@@ -778,10 +778,11 @@ void VbaExport::exportVBA(SotStorage* pRootStorage)
// start here with the VBA export // start here with the VBA export
SotStorage* pVBAStream = pRootStorage->OpenSotStorage("VBA", STREAM_READWRITE); SotStorage* pVBAStream = pRootStorage->OpenSotStorage("VBA", STREAM_READWRITE);
SotStorageStream* pDirStream = pVBAStream->OpenSotStream("dir", 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) 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* pVBAProjectStream = pVBAStream->OpenSotStream("_VBA_PROJECT", STREAM_READWRITE);
SotStorageStream* pPROJECTStream = pRootStorage->OpenSotStream("PROJECT", STREAM_READWRITE); SotStorageStream* pPROJECTStream = pRootStorage->OpenSotStream("PROJECT", STREAM_READWRITE);
...@@ -795,7 +796,7 @@ void VbaExport::exportVBA(SotStorage* pRootStorage) ...@@ -795,7 +796,7 @@ void VbaExport::exportVBA(SotStorage* pRootStorage)
css::uno::Any aCode = xNameContainer->getByName(aElementNames[i]); css::uno::Any aCode = xNameContainer->getByName(aElementNames[i]);
OUString aSourceCode; OUString aSourceCode;
aCode >>= aSourceCode; aCode >>= aSourceCode;
exportModuleStream(*pModuleStream[i], aSourceCode, aElementNames[i]); exportModuleStream(*aModuleStreams[i], aSourceCode, aElementNames[i]);
} }
exportVBAProjectStream(*pVBAProjectStream); exportVBAProjectStream(*pVBAProjectStream);
exportPROJECTStream(*pPROJECTStream, xNameContainer, getProjectName()); exportPROJECTStream(*pPROJECTStream, xNameContainer, getProjectName());
...@@ -804,7 +805,7 @@ void VbaExport::exportVBA(SotStorage* pRootStorage) ...@@ -804,7 +805,7 @@ void VbaExport::exportVBA(SotStorage* pRootStorage)
pVBAProjectStream->Commit(); pVBAProjectStream->Commit();
for(sal_Int32 i = 0; i < n; i++) for(sal_Int32 i = 0; i < n; i++)
{ {
pModuleStream[i]->Commit(); aModuleStreams[i]->Commit();
} }
pDirStream->Commit(); pDirStream->Commit();
pVBAStream->Commit(); pVBAStream->Commit();
......
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