Kaydet (Commit) fa23b694 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Import formatted spans correctly.

There are more format types to cover. I'm not done yet.

Change-Id: I42fab04f65810733e5b25fbbc2c92df7e05c05cf
üst 96d89d9c
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#include "xmlimprt.hxx" #include "xmlimprt.hxx"
#include "xmlcelli.hxx" #include "xmlcelli.hxx"
#include "xmloff/nmspmap.hxx"
#include <com/sun/star/xml/sax/XAttributeList.hpp> #include <com/sun/star/xml/sax/XAttributeList.hpp>
using namespace com::sun::star; using namespace com::sun::star;
...@@ -29,7 +31,7 @@ void ScXMLCellTextParaContext::StartElement(const uno::Reference<xml::sax::XAttr ...@@ -29,7 +31,7 @@ void ScXMLCellTextParaContext::StartElement(const uno::Reference<xml::sax::XAttr
void ScXMLCellTextParaContext::EndElement() void ScXMLCellTextParaContext::EndElement()
{ {
if (!maContent.isEmpty()) if (!maContent.isEmpty())
mrParentCxt.PushParagraphSpan(maContent); mrParentCxt.PushParagraphSpan(maContent, OUString());
mrParentCxt.PushParagraphEnd(); mrParentCxt.PushParagraphEnd();
} }
...@@ -44,7 +46,7 @@ SvXMLImportContext* ScXMLCellTextParaContext::CreateChildContext( ...@@ -44,7 +46,7 @@ SvXMLImportContext* ScXMLCellTextParaContext::CreateChildContext(
{ {
if (!maContent.isEmpty()) if (!maContent.isEmpty())
{ {
mrParentCxt.PushParagraphSpan(maContent); mrParentCxt.PushParagraphSpan(maContent, OUString());
maContent = OUString(); maContent = OUString();
} }
...@@ -61,9 +63,9 @@ SvXMLImportContext* ScXMLCellTextParaContext::CreateChildContext( ...@@ -61,9 +63,9 @@ SvXMLImportContext* ScXMLCellTextParaContext::CreateChildContext(
return new SvXMLImportContext(GetImport(), nPrefix, rLocalName); return new SvXMLImportContext(GetImport(), nPrefix, rLocalName);
} }
void ScXMLCellTextParaContext::PushSpan(const OUString& rSpan) void ScXMLCellTextParaContext::PushSpan(const OUString& rSpan, const OUString& rStyleName)
{ {
mrParentCxt.PushParagraphSpan(rSpan); mrParentCxt.PushParagraphSpan(rSpan, rStyleName);
} }
ScXMLCellTextSpanContext::ScXMLCellTextSpanContext( ScXMLCellTextSpanContext::ScXMLCellTextSpanContext(
...@@ -75,12 +77,37 @@ ScXMLCellTextSpanContext::ScXMLCellTextSpanContext( ...@@ -75,12 +77,37 @@ ScXMLCellTextSpanContext::ScXMLCellTextSpanContext(
void ScXMLCellTextSpanContext::StartElement(const uno::Reference<xml::sax::XAttributeList>& xAttrList) void ScXMLCellTextSpanContext::StartElement(const uno::Reference<xml::sax::XAttributeList>& xAttrList)
{ {
if (!xAttrList.is())
return;
OUString aLocalName;
sal_Int16 nAttrCount = xAttrList->getLength();
const SvXMLTokenMap& rTokenMap = GetScImport().GetCellTextSpanAttrTokenMap();
for (sal_Int16 i = 0; i < nAttrCount; ++i)
{
sal_uInt16 nAttrPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName(
xAttrList->getNameByIndex(i), &aLocalName);
const OUString& rAttrValue = xAttrList->getValueByIndex(i);
sal_uInt16 nToken = rTokenMap.Get(nAttrPrefix, aLocalName);
switch (nToken)
{
case XML_TOK_CELL_TEXT_SPAN_ATTR_STYLE_NAME:
maStyleName = rAttrValue;
break;
default:
;
}
}
} }
void ScXMLCellTextSpanContext::EndElement() void ScXMLCellTextSpanContext::EndElement()
{ {
if (!maContent.isEmpty()) if (!maContent.isEmpty())
mrParentCxt.PushSpan(maContent); {
mrParentCxt.PushSpan(maContent, maStyleName);
}
} }
void ScXMLCellTextSpanContext::Characters(const OUString& rChars) void ScXMLCellTextSpanContext::Characters(const OUString& rChars)
......
...@@ -31,7 +31,7 @@ public: ...@@ -31,7 +31,7 @@ public:
virtual SvXMLImportContext* CreateChildContext( virtual SvXMLImportContext* CreateChildContext(
sal_uInt16 nPrefix, const OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList); sal_uInt16 nPrefix, const OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList);
void PushSpan(const OUString& rSpan); void PushSpan(const OUString& rSpan, const OUString& rStyleName);
}; };
/** /**
...@@ -40,6 +40,7 @@ public: ...@@ -40,6 +40,7 @@ public:
class ScXMLCellTextSpanContext : public ScXMLImportContext class ScXMLCellTextSpanContext : public ScXMLImportContext
{ {
ScXMLCellTextParaContext& mrParentCxt; ScXMLCellTextParaContext& mrParentCxt;
OUString maStyleName;
OUString maContent; OUString maContent;
public: public:
ScXMLCellTextSpanContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent); ScXMLCellTextSpanContext(ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, ScXMLCellTextParaContext& rParent);
......
...@@ -55,10 +55,15 @@ ...@@ -55,10 +55,15 @@
#include <xmloff/families.hxx> #include <xmloff/families.hxx>
#include <xmloff/numehelp.hxx> #include <xmloff/numehelp.hxx>
#include <xmloff/xmlnmspe.hxx> #include <xmloff/xmlnmspe.hxx>
#include "xmloff/prstylei.hxx"
#include <svl/zforlist.hxx> #include <svl/zforlist.hxx>
#include <svx/svdocapt.hxx> #include <svx/svdocapt.hxx>
#include <editeng/outlobj.hxx> #include <editeng/outlobj.hxx>
#include <editeng/editobj.hxx> #include <editeng/editobj.hxx>
#include "editeng/wghtitem.hxx"
#include "editeng/colritem.hxx"
#include "editeng/fhgtitem.hxx"
#include "editeng/postitem.hxx"
#include <svx/unoapi.hxx> #include <svx/unoapi.hxx>
#include <svl/languageoptions.hxx> #include <svl/languageoptions.hxx>
#include <sax/tools/converter.hxx> #include <sax/tools/converter.hxx>
...@@ -96,7 +101,9 @@ using namespace xmloff::token; ...@@ -96,7 +101,9 @@ using namespace xmloff::token;
using rtl::OUString; using rtl::OUString;
//------------------------------------------------------------------
ScXMLTableRowCellContext::ParaFormat::ParaFormat(ScEditEngineDefaulter& rEditEngine) :
maItemSet(rEditEngine.GetEmptyItemSet()) {}
ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
sal_uInt16 nPrfx, sal_uInt16 nPrfx,
...@@ -107,6 +114,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, ...@@ -107,6 +114,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
const sal_Int32 nTempRepeatedRows ) : const sal_Int32 nTempRepeatedRows ) :
ScXMLImportContext(rImport, nPrfx, rLName), ScXMLImportContext(rImport, nPrfx, rLName),
mpEditEngine(GetScImport().GetEditEngine()), mpEditEngine(GetScImport().GetEditEngine()),
mnCurParagraph(0),
pDetectiveObjVec(NULL), pDetectiveObjVec(NULL),
pCellRangeSource(NULL), pCellRangeSource(NULL),
fValue(0.0), fValue(0.0),
...@@ -125,7 +133,8 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, ...@@ -125,7 +133,8 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
bSolarMutexLocked(false), bSolarMutexLocked(false),
bFormulaTextResult(false), bFormulaTextResult(false),
mbPossibleErrorCell(false), mbPossibleErrorCell(false),
mbCheckWithCompilerForError(false) mbCheckWithCompilerForError(false),
mbEditEngineHasText(false)
{ {
rtl::math::setNan(&fValue); // NaN by default rtl::math::setNan(&fValue); // NaN by default
mpEditEngine->Clear(); mpEditEngine->Clear();
...@@ -302,15 +311,127 @@ bool cellExists( const ScAddress& rCellPos ) ...@@ -302,15 +311,127 @@ bool cellExists( const ScAddress& rCellPos )
} }
void ScXMLTableRowCellContext::PushParagraphSpan(const OUString& rSpan) void ScXMLTableRowCellContext::PushParagraphSpan(const OUString& rSpan, const OUString& rStyleName)
{ {
sal_Int32 nBegin = maParagraph.getLength();
sal_Int32 nEnd = nBegin + rSpan.getLength();
maParagraph.append(rSpan); maParagraph.append(rSpan);
if (rStyleName.isEmpty())
return;
// Get the style information from xmloff.
UniReference<XMLPropertySetMapper> xMapper = GetImport().GetTextImport()->GetTextImportPropertySetMapper()->getPropertySetMapper();
if (!xMapper.is())
// We can't do anything without the mapper.
return;
sal_Int32 nEntryCount = xMapper->GetEntryCount();
SvXMLStylesContext* pAutoStyles = GetImport().GetAutoStyles();
// Style name for text span corresponds with the name of an automatic style.
const XMLPropStyleContext* pStyle = dynamic_cast<const XMLPropStyleContext*>(
pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TEXT_TEXT, rStyleName));
if (!pStyle)
// No style by that name found.
return;
const std::vector<XMLPropertyState>& rProps = pStyle->GetProperties();
if (rProps.empty())
return;
maFormats.push_back(new ParaFormat(*mpEditEngine));
ParaFormat& rFmt = maFormats.back();
rFmt.maSelection.nStartPara = rFmt.maSelection.nEndPara = mnCurParagraph;
rFmt.maSelection.nStartPos = nBegin;
rFmt.maSelection.nEndPos = nEnd;
std::vector<XMLPropertyState>::const_iterator it = rProps.begin(), itEnd = rProps.end();
for (; it != itEnd; ++it)
{
if (it->mnIndex == -1 || it->mnIndex >= nEntryCount)
continue;
const OUString& rName = xMapper->GetEntryXMLName(it->mnIndex);
if (rName == "font-weight")
{
SvxWeightItem aItem(WEIGHT_NORMAL, EE_CHAR_WEIGHT);
aItem.PutValue(it->maValue, MID_WEIGHT);
rFmt.maItemSet.Put(aItem);
}
else if (rName == "font-weight-asian")
{
SvxWeightItem aItem(WEIGHT_NORMAL, EE_CHAR_WEIGHT_CJK);
aItem.PutValue(it->maValue, MID_WEIGHT);
rFmt.maItemSet.Put(aItem);
}
else if (rName == "font-weight-complex")
{
SvxWeightItem aItem(WEIGHT_NORMAL, EE_CHAR_WEIGHT_CTL);
aItem.PutValue(it->maValue, MID_WEIGHT);
rFmt.maItemSet.Put(aItem);
}
else if (rName == "font-size")
{
SvxFontHeightItem aItem(240, 100, EE_CHAR_FONTHEIGHT);
aItem.PutValue(it->maValue, MID_FONTHEIGHT);
rFmt.maItemSet.Put(aItem);
}
else if (rName == "font-size-asian")
{
SvxFontHeightItem aItem(240, 100, EE_CHAR_FONTHEIGHT_CJK);
aItem.PutValue(it->maValue, MID_FONTHEIGHT);
rFmt.maItemSet.Put(aItem);
}
else if (rName == "font-size-complex")
{
SvxFontHeightItem aItem(240, 100, EE_CHAR_FONTHEIGHT_CTL);
aItem.PutValue(it->maValue, MID_FONTHEIGHT);
rFmt.maItemSet.Put(aItem);
}
else if (rName == "font-style")
{
SvxPostureItem aItem(ITALIC_NONE, EE_CHAR_ITALIC);
aItem.PutValue(it->maValue, MID_POSTURE);
rFmt.maItemSet.Put(aItem);
}
else if (rName == "font-style-asian")
{
SvxPostureItem aItem(ITALIC_NONE, EE_CHAR_ITALIC_CJK);
aItem.PutValue(it->maValue, MID_POSTURE);
rFmt.maItemSet.Put(aItem);
}
else if (rName == "font-style-complex")
{
SvxPostureItem aItem(ITALIC_NONE, EE_CHAR_ITALIC_CTL);
aItem.PutValue(it->maValue, MID_POSTURE);
rFmt.maItemSet.Put(aItem);
}
else if (rName == "color")
{
SvxColorItem aItem(EE_CHAR_COLOR);
aItem.PutValue(it->maValue, 0);
rFmt.maItemSet.Put(aItem);
}
}
} }
void ScXMLTableRowCellContext::PushParagraphEnd() void ScXMLTableRowCellContext::PushParagraphEnd()
{ {
mpEditEngine->InsertParagraph( // EditEngine always has at least one paragraph even when its content is empty.
mpEditEngine->GetParagraphCount(), maParagraph.makeStringAndClear());
if (mbEditEngineHasText)
mpEditEngine->InsertParagraph(mpEditEngine->GetParagraphCount(), maParagraph.makeStringAndClear());
else
{
mpEditEngine->SetText(maParagraph.makeStringAndClear());
mbEditEngineHasText = true;
}
++mnCurParagraph;
} }
SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( sal_uInt16 nPrefix, SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( sal_uInt16 nPrefix,
...@@ -674,7 +795,7 @@ void ScXMLTableRowCellContext::SetFormulaCell(ScFormulaCell* pFCell) const ...@@ -674,7 +795,7 @@ void ScXMLTableRowCellContext::SetFormulaCell(ScFormulaCell* pFCell) const
} }
else if (!rtl::math::isNan(fValue)) else if (!rtl::math::isNan(fValue))
{ {
if (mpEditEngine->GetParagraphCount()) if (mbEditEngineHasText)
pFCell->SetHybridValueString(fValue, mpEditEngine->GetText(0)); pFCell->SetHybridValueString(fValue, mpEditEngine->GetText(0));
else else
pFCell->SetHybridDouble(fValue); pFCell->SetHybridDouble(fValue);
...@@ -700,7 +821,7 @@ void ScXMLTableRowCellContext::PutTextCell( const ScAddress& rCurrentPos, ...@@ -700,7 +821,7 @@ void ScXMLTableRowCellContext::PutTextCell( const ScAddress& rCurrentPos,
OUString aCellString; OUString aCellString;
if (maStringValue) if (maStringValue)
aCellString = *maStringValue; aCellString = *maStringValue;
else if (mpEditEngine->GetParagraphCount()) else if (mbEditEngineHasText)
aCellString = mpEditEngine->GetText(0); aCellString = mpEditEngine->GetText(0);
else if ( nCurrentCol > 0 && pOUText && !pOUText->isEmpty() ) else if ( nCurrentCol > 0 && pOUText && !pOUText->isEmpty() )
aCellString = *pOUText; aCellString = *pOUText;
...@@ -735,8 +856,23 @@ void ScXMLTableRowCellContext::PutTextCell( const ScAddress& rCurrentPos, ...@@ -735,8 +856,23 @@ void ScXMLTableRowCellContext::PutTextCell( const ScAddress& rCurrentPos,
ScDocument* pDoc = rXMLImport.GetDocument(); ScDocument* pDoc = rXMLImport.GetDocument();
if (maStringValue) if (maStringValue)
pNewCell = ScBaseCell::CreateTextCell( *maStringValue, pDoc ); pNewCell = ScBaseCell::CreateTextCell( *maStringValue, pDoc );
else if (mpEditEngine->GetParagraphCount()) else if (mbEditEngineHasText)
{
if (maFormats.empty() && mpEditEngine->GetParagraphCount() == 1)
{
// This is a normal text without format runs.
pNewCell = new ScStringCell(mpEditEngine->GetText());
}
else
{
// This text either has format runs, or consists of multiple lines.
ParaFormatsType::const_iterator it = maFormats.begin(), itEnd = maFormats.end();
for (; it != itEnd; ++it)
mpEditEngine->QuickSetAttribs(it->maItemSet, it->maSelection);
pNewCell = new ScEditCell(mpEditEngine->CreateTextObject(), pDoc, pDoc->GetEditPool()); pNewCell = new ScEditCell(mpEditEngine->CreateTextObject(), pDoc, pDoc->GetEditPool());
}
}
else if ( nCurrentCol > 0 && pOUText && !pOUText->isEmpty() ) else if ( nCurrentCol > 0 && pOUText && !pOUText->isEmpty() )
pNewCell = ScBaseCell::CreateTextCell( *pOUText, pDoc ); pNewCell = ScBaseCell::CreateTextCell( *pOUText, pDoc );
...@@ -942,7 +1078,7 @@ void ScXMLTableRowCellContext::AddNonFormulaCell( const ScAddress& rCellPos ) ...@@ -942,7 +1078,7 @@ void ScXMLTableRowCellContext::AddNonFormulaCell( const ScAddress& rCellPos )
if( cellExists(rCellPos) && CellsAreRepeated() ) if( cellExists(rCellPos) && CellsAreRepeated() )
pOUText.reset( getOutputString(rXMLImport.GetDocument(), rCellPos) ); pOUText.reset( getOutputString(rXMLImport.GetDocument(), rCellPos) );
if (!mpEditEngine->GetParagraphCount() && !pOUText && !maStringValue) if (!mbEditEngineHasText && !pOUText && !maStringValue)
bIsEmpty = true; bIsEmpty = true;
} }
...@@ -1092,7 +1228,7 @@ void ScXMLTableRowCellContext::AddFormulaCell( const ScAddress& rCellPos ) ...@@ -1092,7 +1228,7 @@ void ScXMLTableRowCellContext::AddFormulaCell( const ScAddress& rCellPos )
// - has an "Err:[###]" (where "[###]" is an error number) // - has an "Err:[###]" (where "[###]" is an error number)
void ScXMLTableRowCellContext::HasSpecialCaseFormulaText() void ScXMLTableRowCellContext::HasSpecialCaseFormulaText()
{ {
if (!mpEditEngine->GetParagraphCount()) if (!mbEditEngineHasText)
return; return;
OUString aStr = mpEditEngine->GetText(0); OUString aStr = mpEditEngine->GetText(0);
......
...@@ -23,8 +23,12 @@ ...@@ -23,8 +23,12 @@
#include "XMLCellRangeSourceContext.hxx" #include "XMLCellRangeSourceContext.hxx"
#include "importcontext.hxx" #include "importcontext.hxx"
#include "formula/grammar.hxx" #include "formula/grammar.hxx"
#include "svl/itemset.hxx"
#include "editeng/editdata.hxx"
#include <boost/optional.hpp> #include <boost/optional.hpp>
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
class ScXMLImport; class ScXMLImport;
class ScFormulaCell; class ScFormulaCell;
...@@ -41,6 +45,17 @@ class ScXMLTableRowCellContext : public ScXMLImportContext ...@@ -41,6 +45,17 @@ class ScXMLTableRowCellContext : public ScXMLImportContext
ScEditEngineDefaulter* mpEditEngine; ScEditEngineDefaulter* mpEditEngine;
OUStringBuffer maParagraph; OUStringBuffer maParagraph;
sal_uInt16 mnCurParagraph;
struct ParaFormat
{
SfxItemSet maItemSet;
ESelection maSelection;
ParaFormat(ScEditEngineDefaulter& rEditEngine);
};
typedef boost::ptr_vector<ParaFormat> ParaFormatsType;
ParaFormatsType maFormats;
boost::scoped_ptr< ScXMLAnnotationData > mxAnnotationData; boost::scoped_ptr< ScXMLAnnotationData > mxAnnotationData;
ScMyImpDetectiveObjVec* pDetectiveObjVec; ScMyImpDetectiveObjVec* pDetectiveObjVec;
...@@ -60,6 +75,7 @@ class ScXMLTableRowCellContext : public ScXMLImportContext ...@@ -60,6 +75,7 @@ class ScXMLTableRowCellContext : public ScXMLImportContext
bool bFormulaTextResult; bool bFormulaTextResult;
bool mbPossibleErrorCell; bool mbPossibleErrorCell;
bool mbCheckWithCompilerForError; bool mbCheckWithCompilerForError;
bool mbEditEngineHasText;
sal_Int16 GetCellType(const rtl::OUString& sOUValue) const; sal_Int16 GetCellType(const rtl::OUString& sOUValue) const;
...@@ -103,7 +119,7 @@ public: ...@@ -103,7 +119,7 @@ public:
const ::com::sun::star::uno::Reference< const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList ); ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
void PushParagraphSpan(const OUString& rSpan); void PushParagraphSpan(const OUString& rSpan, const OUString& rStyleName);
void PushParagraphEnd(); void PushParagraphEnd();
void SetAnnotation( const ScAddress& rPosition ); void SetAnnotation( const ScAddress& rPosition );
......
...@@ -1857,6 +1857,21 @@ const SvXMLTokenMap& ScXMLImport::GetCellTextParaElemTokenMap() ...@@ -1857,6 +1857,21 @@ const SvXMLTokenMap& ScXMLImport::GetCellTextParaElemTokenMap()
return *pCellTextParaElemTokemMap; return *pCellTextParaElemTokemMap;
} }
const SvXMLTokenMap& ScXMLImport::GetCellTextSpanAttrTokenMap()
{
if (!pCellTextSpanAttrTokemMap)
{
static SvXMLTokenMapEntry aMap[] =
{
{ XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_TOK_CELL_TEXT_SPAN_ATTR_STYLE_NAME },
XML_TOKEN_MAP_END
};
pCellTextSpanAttrTokemMap = new SvXMLTokenMap(aMap);
}
return *pCellTextSpanAttrTokemMap;
}
SvXMLImportContext *ScXMLImport::CreateContext( sal_uInt16 nPrefix, SvXMLImportContext *ScXMLImport::CreateContext( sal_uInt16 nPrefix,
const OUString& rLocalName, const OUString& rLocalName,
const uno::Reference<xml::sax::XAttributeList>& xAttrList ) const uno::Reference<xml::sax::XAttributeList>& xAttrList )
...@@ -1980,6 +1995,7 @@ ScXMLImport::ScXMLImport( ...@@ -1980,6 +1995,7 @@ ScXMLImport::ScXMLImport(
pDataPilotMemberAttrTokenMap( 0 ), pDataPilotMemberAttrTokenMap( 0 ),
pConsolidationAttrTokenMap( 0 ), pConsolidationAttrTokenMap( 0 ),
pCellTextParaElemTokemMap(NULL), pCellTextParaElemTokemMap(NULL),
pCellTextSpanAttrTokemMap(NULL),
aTables(*this), aTables(*this),
pMyNamedExpressions(NULL), pMyNamedExpressions(NULL),
pMyLabelRanges(NULL), pMyLabelRanges(NULL),
...@@ -2118,6 +2134,7 @@ ScXMLImport::~ScXMLImport() throw() ...@@ -2118,6 +2134,7 @@ ScXMLImport::~ScXMLImport() throw()
delete pDataPilotMemberAttrTokenMap; delete pDataPilotMemberAttrTokenMap;
delete pConsolidationAttrTokenMap; delete pConsolidationAttrTokenMap;
delete pCellTextParaElemTokemMap; delete pCellTextParaElemTokemMap;
delete pCellTextSpanAttrTokemMap;
delete pChangeTrackingImportHelper; delete pChangeTrackingImportHelper;
delete pNumberFormatAttributesExportHelper; delete pNumberFormatAttributesExportHelper;
......
...@@ -682,11 +682,22 @@ enum ScXMLConsolidationAttrTokens ...@@ -682,11 +682,22 @@ enum ScXMLConsolidationAttrTokens
XML_TOK_CONSOLIDATION_ATTR_LINK_TO_SOURCE XML_TOK_CONSOLIDATION_ATTR_LINK_TO_SOURCE
}; };
/**
* Tokens for elements that come under <text:p>
*/
enum ScXMLCellTextParaElemTokens enum ScXMLCellTextParaElemTokens
{ {
XML_TOK_CELL_TEXT_SPAN XML_TOK_CELL_TEXT_SPAN
}; };
/**
* Tokens for attributes for <text:span>
*/
enum ScXMLCellTextSpanAttrTokens
{
XML_TOK_CELL_TEXT_SPAN_ATTR_STYLE_NAME
};
class SvXMLTokenMap; class SvXMLTokenMap;
class XMLShapeImportHelper; class XMLShapeImportHelper;
class ScXMLChangeTrackingImportHelper; class ScXMLChangeTrackingImportHelper;
...@@ -854,6 +865,7 @@ class ScXMLImport: public SvXMLImport, boost::noncopyable ...@@ -854,6 +865,7 @@ class ScXMLImport: public SvXMLImport, boost::noncopyable
SvXMLTokenMap *pDataPilotMemberAttrTokenMap; SvXMLTokenMap *pDataPilotMemberAttrTokenMap;
SvXMLTokenMap *pConsolidationAttrTokenMap; SvXMLTokenMap *pConsolidationAttrTokenMap;
SvXMLTokenMap *pCellTextParaElemTokemMap; SvXMLTokenMap *pCellTextParaElemTokemMap;
SvXMLTokenMap *pCellTextSpanAttrTokemMap;
ScMyTables aTables; ScMyTables aTables;
...@@ -1020,6 +1032,7 @@ public: ...@@ -1020,6 +1032,7 @@ public:
const SvXMLTokenMap& GetDataPilotMemberAttrTokenMap(); const SvXMLTokenMap& GetDataPilotMemberAttrTokenMap();
const SvXMLTokenMap& GetConsolidationAttrTokenMap(); const SvXMLTokenMap& GetConsolidationAttrTokenMap();
const SvXMLTokenMap& GetCellTextParaElemTokenMap(); const SvXMLTokenMap& GetCellTextParaElemTokenMap();
const SvXMLTokenMap& GetCellTextSpanAttrTokenMap();
void AddNamedExpression(ScMyNamedExpression* pMyNamedExpression) void AddNamedExpression(ScMyNamedExpression* pMyNamedExpression)
{ {
......
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