Commit 885a6386 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander Trofimov

(1.0.0.35): FileConverterService2

(1.0.0.120): XlsxSerializerCom
для бага Bug 24236 - [ODS] Ошибка в консоли 'Gw' при открытии таблицы.
если пришло AVS_ERROR_PASSWORD или AVS_ERROR_DRM, показываем ошибку что файл зашифрован.

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@56269 954022d7-b5bf-4e40-9824-e11837661b57
parent fce559ce
...@@ -19,7 +19,7 @@ namespace SimpleTypes ...@@ -19,7 +19,7 @@ namespace SimpleTypes
return m_sValue; return m_sValue;
} }
void SetValue(CString &sValue) void SetValue(const CString &sValue)
{ {
m_sValue = sValue; m_sValue = sValue;
} }
......
...@@ -560,9 +560,9 @@ namespace OOX ...@@ -560,9 +560,9 @@ namespace OOX
CString sVal; sVal.Format(_T(" showZeros=\"%s\""), m_oShowZeros->ToString2(SimpleTypes::onofftostring1)); CString sVal; sVal.Format(_T(" showZeros=\"%s\""), m_oShowZeros->ToString2(SimpleTypes::onofftostring1));
writer.WriteString(sVal); writer.WriteString(sVal);
} }
if(m_oWabSelected.IsInit()) if(m_oTabSelected.IsInit())
{ {
CString sVal; sVal.Format(_T(" tabSelected=\"%s\""), m_oWabSelected->ToString2(SimpleTypes::onofftostring1)); CString sVal; sVal.Format(_T(" tabSelected=\"%s\""), m_oTabSelected->ToString2(SimpleTypes::onofftostring1));
writer.WriteString(sVal); writer.WriteString(sVal);
} }
if(m_oTopLeftCell.IsInit()) if(m_oTopLeftCell.IsInit())
...@@ -651,7 +651,7 @@ namespace OOX ...@@ -651,7 +651,7 @@ namespace OOX
WritingElement_ReadAttributes_Read_if ( oReader, _T("showRuler"), m_oShowRuler) WritingElement_ReadAttributes_Read_if ( oReader, _T("showRuler"), m_oShowRuler)
WritingElement_ReadAttributes_Read_if ( oReader, _T("showWhiteSpace"), m_oShowWhiteSpace) WritingElement_ReadAttributes_Read_if ( oReader, _T("showWhiteSpace"), m_oShowWhiteSpace)
WritingElement_ReadAttributes_Read_if ( oReader, _T("showZeros"), m_oShowZeros) WritingElement_ReadAttributes_Read_if ( oReader, _T("showZeros"), m_oShowZeros)
WritingElement_ReadAttributes_Read_if ( oReader, _T("tabSelected"), m_oWabSelected) WritingElement_ReadAttributes_Read_if ( oReader, _T("tabSelected"), m_oTabSelected)
WritingElement_ReadAttributes_Read_if ( oReader, _T("topLeftCell"), m_oTopLeftCell) WritingElement_ReadAttributes_Read_if ( oReader, _T("topLeftCell"), m_oTopLeftCell)
WritingElement_ReadAttributes_Read_if ( oReader, _T("view"), m_oView) WritingElement_ReadAttributes_Read_if ( oReader, _T("view"), m_oView)
WritingElement_ReadAttributes_Read_if ( oReader, _T("windowProtection"), m_oWindowProtection) WritingElement_ReadAttributes_Read_if ( oReader, _T("windowProtection"), m_oWindowProtection)
...@@ -677,7 +677,7 @@ namespace OOX ...@@ -677,7 +677,7 @@ namespace OOX
nullable<SimpleTypes::COnOff<>> m_oShowRuler; nullable<SimpleTypes::COnOff<>> m_oShowRuler;
nullable<SimpleTypes::COnOff<>> m_oShowWhiteSpace; nullable<SimpleTypes::COnOff<>> m_oShowWhiteSpace;
nullable<SimpleTypes::COnOff<>> m_oShowZeros; nullable<SimpleTypes::COnOff<>> m_oShowZeros;
nullable<SimpleTypes::COnOff<>> m_oWabSelected; nullable<SimpleTypes::COnOff<>> m_oTabSelected;
nullable<CString> m_oTopLeftCell; nullable<CString> m_oTopLeftCell;
nullable<SimpleTypes::Spreadsheet::CSheetViewType<>>m_oView; nullable<SimpleTypes::Spreadsheet::CSheetViewType<>>m_oView;
nullable<SimpleTypes::COnOff<>> m_oWindowProtection; nullable<SimpleTypes::COnOff<>> m_oWindowProtection;
......
...@@ -266,6 +266,67 @@ namespace OOX ...@@ -266,6 +266,67 @@ namespace OOX
void PrepareWorkbook() void PrepareWorkbook()
{ {
IFileContainer::m_mapEnumeratedGlobal.RemoveAll(); IFileContainer::m_mapEnumeratedGlobal.RemoveAll();
if(NULL == m_pWorkbook)
{
m_pWorkbook = new OOX::Spreadsheet::CWorkbook();
m_pWorkbook->m_oWorkbookPr.Init();
m_pWorkbook->m_oWorkbookPr->m_oDefaultThemeVersion.Init();
m_pWorkbook->m_oWorkbookPr->m_oDefaultThemeVersion->SetValue(124226);
m_pWorkbook->m_oBookViews.Init();
OOX::Spreadsheet::CWorkbookView* pWorkbookView = new OOX::Spreadsheet::CWorkbookView();
pWorkbookView->m_oXWindow.Init();
pWorkbookView->m_oXWindow->SetValue(480);
pWorkbookView->m_oYWindow.Init();
pWorkbookView->m_oYWindow->SetValue(120);
pWorkbookView->m_oWindowWidth.Init();
pWorkbookView->m_oWindowWidth->SetValue(27795);
pWorkbookView->m_oWindowHeight.Init();
pWorkbookView->m_oWindowHeight->SetValue(12585);
m_pWorkbook->m_oBookViews->m_arrItems.Add(pWorkbookView);
}
// sheet,
if(0 == m_aWorksheets.GetCount())
{
OOX::Spreadsheet::CWorksheet* pWorksheet = new OOX::Spreadsheet::CWorksheet();
pWorksheet->m_oDimension.Init();
pWorksheet->m_oDimension->m_oRef.Init();
pWorksheet->m_oDimension->m_oRef->Append(_T("A1"));
pWorksheet->m_oSheetViews.Init();
OOX::Spreadsheet::CSheetView* pSheetView = new OOX::Spreadsheet::CSheetView();
pSheetView->m_oTabSelected.Init();
pSheetView->m_oTabSelected->FromBool(true);
pSheetView->m_oWorkbookViewId.Init();
pSheetView->m_oWorkbookViewId->SetValue(0);
pWorksheet->m_oSheetViews->m_arrItems.Add(pSheetView);
pWorksheet->m_oSheetFormatPr.Init();
pWorksheet->m_oSheetFormatPr->m_oDefaultRowHeight.Init();
pWorksheet->m_oSheetFormatPr->m_oDefaultRowHeight->SetValue(15);
pWorksheet->m_oPageMargins.Init();
pWorksheet->m_oPageMargins->m_oLeft.Init();
pWorksheet->m_oPageMargins->m_oLeft->FromInches(0.7);
pWorksheet->m_oPageMargins->m_oTop.Init();
pWorksheet->m_oPageMargins->m_oTop->FromInches(0.7);
pWorksheet->m_oPageMargins->m_oRight.Init();
pWorksheet->m_oPageMargins->m_oRight->FromInches(0.7);
pWorksheet->m_oPageMargins->m_oBottom.Init();
pWorksheet->m_oPageMargins->m_oBottom->FromInches(0.7);
pWorksheet->m_oPageMargins->m_oHeader.Init();
pWorksheet->m_oPageMargins->m_oHeader->FromInches(0.3);
pWorksheet->m_oPageMargins->m_oFooter.Init();
pWorksheet->m_oPageMargins->m_oFooter->FromInches(0.3);
smart_ptr<OOX::File> pWorksheetFile(pWorksheet);
OOX::RId oRId = this->Add(pWorksheetFile);
m_aWorksheets.SetAt(oRId.ToString(), pWorksheet);
m_pWorkbook->m_oSheets.Init();
OOX::Spreadsheet::CSheet* pSheet = new OOX::Spreadsheet::CSheet();
pSheet->m_oName.Init();
pSheet->m_oName->Append(_T("Sheet1"));
pSheet->m_oSheetId.Init();
pSheet->m_oSheetId->SetValue(1);
pSheet->m_oRid.Init();
pSheet->m_oRid->SetValue(oRId.ToString());
m_pWorkbook->m_oSheets->m_arrItems.Add(pSheet);
}
// font // font
if(NULL != m_pStyles ) if(NULL != m_pStyles )
{ {
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//0 //0
//0 //0
//119 //120
#define INTVER 1,0,0,119 #define INTVER 1,0,0,120
#define STRVER "1,0,0,119\0" #define STRVER "1,0,0,120\0"
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