Fix broken ODS column width import fdo#51446
Change-Id: I43b6558de6e92b0fe40a38b5f2417bebad2b7f8b
This commit is contained in:
parent
f4e82885dc
commit
68eb65f19d
3 changed files with 11 additions and 11 deletions
|
@ -118,7 +118,7 @@ void ScXMLTableColContext::EndElement()
|
|||
{
|
||||
ScXMLImport& rXMLImport = GetScImport();
|
||||
SCTAB nSheet = rXMLImport.GetTables().GetCurrentSheet();
|
||||
sal_Int32 nCurrentColumn = rXMLImport.GetTables().GetCurrentColumn();
|
||||
sal_Int32 nCurrentColumn = rXMLImport.GetTables().GetCurrentColCount();
|
||||
uno::Reference<sheet::XSpreadsheet> xSheet(rXMLImport.GetTables().GetCurrentXSheet());
|
||||
if(xSheet.is())
|
||||
{
|
||||
|
@ -187,10 +187,10 @@ ScXMLTableColsContext::ScXMLTableColsContext( ScXMLImport& rImport,
|
|||
{
|
||||
// don't have any attributes
|
||||
if (bHeader)
|
||||
nHeaderStartCol = rImport.GetTables().GetCurrentColumn();
|
||||
nHeaderStartCol = rImport.GetTables().GetCurrentColCount();
|
||||
else if (bGroup)
|
||||
{
|
||||
nGroupStartCol = rImport.GetTables().GetCurrentColumn();
|
||||
nGroupStartCol = rImport.GetTables().GetCurrentColCount();
|
||||
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
|
||||
for( sal_Int16 i=0; i < nAttrCount; ++i )
|
||||
{
|
||||
|
@ -257,7 +257,7 @@ void ScXMLTableColsContext::EndElement()
|
|||
ScXMLImport& rXMLImport = GetScImport();
|
||||
if (bHeader)
|
||||
{
|
||||
nHeaderEndCol = rXMLImport.GetTables().GetCurrentColumn();
|
||||
nHeaderEndCol = rXMLImport.GetTables().GetCurrentColCount();
|
||||
nHeaderEndCol--;
|
||||
if (nHeaderStartCol <= nHeaderEndCol)
|
||||
{
|
||||
|
@ -284,7 +284,7 @@ void ScXMLTableColsContext::EndElement()
|
|||
else if (bGroup)
|
||||
{
|
||||
SCTAB nSheet = rXMLImport.GetTables().GetCurrentSheet();
|
||||
nGroupEndCol = rXMLImport.GetTables().GetCurrentColumn();
|
||||
nGroupEndCol = rXMLImport.GetTables().GetCurrentColCount();
|
||||
nGroupEndCol--;
|
||||
if (nGroupStartCol <= nGroupEndCol)
|
||||
{
|
||||
|
|
|
@ -75,7 +75,7 @@ ScMyTables::ScMyTables(ScXMLImport& rTempImport)
|
|||
: rImport(rTempImport),
|
||||
aFixupOLEs(rTempImport),
|
||||
maCurrentCellPos(ScAddress::INITIALIZE_INVALID),
|
||||
nCurrentColStylePos(0),
|
||||
nCurrentColCount(0),
|
||||
nCurrentDrawPage( -1 ),
|
||||
nCurrentXShapes( -1 )
|
||||
{
|
||||
|
@ -113,7 +113,7 @@ void ScMyTables::NewSheet(const rtl::OUString& sTableName, const rtl::OUString&
|
|||
{
|
||||
if (rImport.GetModel().is())
|
||||
{
|
||||
nCurrentColStylePos = 0;
|
||||
nCurrentColCount = 0;
|
||||
sCurrentSheetName = sTableName;
|
||||
//reset cols and rows for new sheet, but increment tab
|
||||
maCurrentCellPos.SetCol(-1);
|
||||
|
@ -227,8 +227,8 @@ void ScMyTables::DeleteTable()
|
|||
|
||||
void ScMyTables::AddColStyle(const sal_Int32 nRepeat, const rtl::OUString& rCellStyleName)
|
||||
{
|
||||
rImport.GetStylesImportHelper()->AddColumnStyle(rCellStyleName, nCurrentColStylePos, nRepeat);
|
||||
nCurrentColStylePos += nRepeat;
|
||||
rImport.GetStylesImportHelper()->AddColumnStyle(rCellStyleName, nCurrentColCount, nRepeat);
|
||||
nCurrentColCount += nRepeat;
|
||||
}
|
||||
|
||||
uno::Reference< drawing::XDrawPage > ScMyTables::GetCurrentXDrawPage()
|
||||
|
|
|
@ -71,7 +71,7 @@ private:
|
|||
ScAddress maCurrentCellPos;
|
||||
ScRangeList maMatrixRangeList;
|
||||
ScXMLTabProtectionData maProtectionData;
|
||||
sal_Int32 nCurrentColStylePos;
|
||||
sal_Int32 nCurrentColCount;
|
||||
sal_Int16 nCurrentDrawPage;
|
||||
sal_Int16 nCurrentXShapes;
|
||||
|
||||
|
@ -96,7 +96,7 @@ public:
|
|||
ScXMLTabProtectionData& GetCurrentProtectionData() { return maProtectionData; }
|
||||
rtl::OUString GetCurrentSheetName() const { return sCurrentSheetName; }
|
||||
SCTAB GetCurrentSheet() const { return (maCurrentCellPos.Tab() >= 0) ? maCurrentCellPos.Tab() : 0; }
|
||||
SCCOL GetCurrentColumn() const { return (maCurrentCellPos.Col() >= 0) ? maCurrentCellPos.Col() : 0; }
|
||||
SCCOL GetCurrentColCount() const { return nCurrentColCount; }
|
||||
SCROW GetCurrentRow() const { return (maCurrentCellPos.Row() >= 0) ? maCurrentCellPos.Row() : 0; }
|
||||
::com::sun::star::uno::Reference< ::com::sun::star::sheet::XSpreadsheet >
|
||||
GetCurrentXSheet() const { return xCurrentSheet; }
|
||||
|
|
Loading…
Reference in a new issue