summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/xml/XMLExportIterator.cxx6
-rw-r--r--sc/source/filter/xml/XMLExportIterator.hxx5
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx33
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.hxx16
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx115
-rw-r--r--sc/source/filter/xml/xmlexprt.hxx5
-rw-r--r--sc/source/filter/xml/xmlstyle.cxx170
-rw-r--r--sc/source/filter/xml/xmlstyle.hxx29
8 files changed, 126 insertions, 253 deletions
diff --git a/sc/source/filter/xml/XMLExportIterator.cxx b/sc/source/filter/xml/XMLExportIterator.cxx
index d2f6e24ae845..021120a68bf8 100644
--- a/sc/source/filter/xml/XMLExportIterator.cxx
+++ b/sc/source/filter/xml/XMLExportIterator.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLExportIterator.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: sab $ $Date: 2001-05-21 10:16:41 $
+ * last change: $Author: sab $ $Date: 2001-05-29 15:42:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -689,7 +689,7 @@ void ScMyNotEmptyCellsIterator::SetCurrentTable(const sal_Int32 nTable)
DBG_ASSERT(aAnnotations.empty(), "not all Annotations saved");
aLastAddress.Row = 0;
aLastAddress.Column = 0;
- aLastAddress.Sheet = nTable;
+ aLastAddress.Sheet = static_cast<sal_Int16>(nTable);
if (nCurrentTable != nTable)
{
nCurrentTable = static_cast<sal_Int16>(nTable);
diff --git a/sc/source/filter/xml/XMLExportIterator.hxx b/sc/source/filter/xml/XMLExportIterator.hxx
index e9cfaaff8d65..6b19699cc1ee 100644
--- a/sc/source/filter/xml/XMLExportIterator.hxx
+++ b/sc/source/filter/xml/XMLExportIterator.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLExportIterator.hxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: sab $ $Date: 2001-05-21 10:16:41 $
+ * last change: $Author: sab $ $Date: 2001-05-29 15:42:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -128,6 +128,7 @@ struct ScMyShape
ScAddress aAddress;
ScAddress aEndAddress;
sal_Int32 nIndex;
+ sal_Int16 nLayerID;
sal_Bool operator<(const ScMyShape& aShape);
};
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 27bf5a292717..ae155c09342f 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLStylesExportHelper.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: sab $ $Date: 2001-05-23 09:53:43 $
+ * last change: $Author: sab $ $Date: 2001-05-29 15:42:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -153,7 +153,16 @@ sal_Bool ScMyValidation::IsEqual(const ScMyValidation& aVal) const
ScMyValidationsContainer::ScMyValidationsContainer()
: aValidationVec(),
- sEmptyString()
+ sEmptyString(),
+ sERRALSTY(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_ERRALSTY)),
+ sIGNOREBL(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_IGNOREBL)),
+ sTYPE(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_TYPE)),
+ sSHOWINP(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_SHOWINP)),
+ sSHOWERR(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_SHOWERR)),
+ sINPTITLE(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_INPTITLE)),
+ sINPMESS(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_INPMESS)),
+ sERRTITLE(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_ERRTITLE)),
+ sERRMESS(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_ERRMESS))
{
}
@@ -168,25 +177,25 @@ sal_Bool ScMyValidationsContainer::AddValidation(const uno::Any& aTempAny,
uno::Reference<beans::XPropertySet> xPropertySet;
if (aTempAny >>= xPropertySet)
{
- uno::Any aAny = xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_ERRMESS)));
+ uno::Any aAny = xPropertySet->getPropertyValue(sERRMESS);
rtl::OUString sErrorMessage;
aAny >>= sErrorMessage;
- aAny = xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_ERRTITLE)));
+ aAny = xPropertySet->getPropertyValue(sERRTITLE);
rtl::OUString sErrorTitle;
aAny >>= sErrorTitle;
- aAny = xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_INPMESS)));
+ aAny = xPropertySet->getPropertyValue(sINPMESS);
rtl::OUString sImputMessage;
aAny >>= sImputMessage;
- aAny = xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_INPTITLE)));
+ aAny = xPropertySet->getPropertyValue(sINPTITLE);
rtl::OUString sImputTitle;
aAny >>= sImputTitle;
- aAny = xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_SHOWERR)));
+ aAny = xPropertySet->getPropertyValue(sSHOWERR);
sal_Bool bShowErrorMessage;
aAny >>= bShowErrorMessage;
- aAny = xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_SHOWINP)));
+ aAny = xPropertySet->getPropertyValue(sSHOWINP);
sal_Bool bShowImputMessage;
aAny >>= bShowImputMessage;
- aAny = xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_TYPE)));
+ aAny = xPropertySet->getPropertyValue(sTYPE);
sheet::ValidationType aValidationType;
aAny >>= aValidationType;
if (bShowErrorMessage || bShowImputMessage || aValidationType != sheet::ValidationType_ANY ||
@@ -200,11 +209,11 @@ sal_Bool ScMyValidationsContainer::AddValidation(const uno::Any& aTempAny,
aValidation.bShowErrorMessage = bShowErrorMessage;
aValidation.bShowImputMessage = bShowImputMessage;
aValidation.aValidationType = aValidationType;
- aAny = xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_IGNOREBL)));
+ aAny = xPropertySet->getPropertyValue(sIGNOREBL);
sal_Bool bIgnoreBlanks(sal_False);
aAny >>= bIgnoreBlanks;
aValidation.bIgnoreBlanks = bIgnoreBlanks;
- aAny = xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_ERRALSTY)));
+ aAny = xPropertySet->getPropertyValue(sERRALSTY);
aAny >>= aValidation.aAlertStyle;
uno::Reference<sheet::XSheetCondition> xCondition(xPropertySet, uno::UNO_QUERY);
if (xCondition.is())
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx b/sc/source/filter/xml/XMLStylesExportHelper.hxx
index 72c3bf44f31e..e35a58761781 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: XMLStylesExportHelper.hxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: sab $ $Date: 2001-05-18 08:35:44 $
+ * last change: $Author: sab $ $Date: 2001-05-29 15:42:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -120,8 +120,16 @@ class ScMyValidationsContainer
{
private:
ScMyValidationVec aValidationVec;
- rtl::OUString sEmptyString;
-protected:
+ const rtl::OUString sEmptyString;
+ const rtl::OUString sERRALSTY;
+ const rtl::OUString sIGNOREBL;
+ const rtl::OUString sTYPE;
+ const rtl::OUString sSHOWINP;
+ const rtl::OUString sSHOWERR;
+ const rtl::OUString sINPTITLE;
+ const rtl::OUString sINPMESS;
+ const rtl::OUString sERRTITLE;
+ const rtl::OUString sERRMESS;
public:
ScMyValidationsContainer();
~ScMyValidationsContainer();
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 3552da0fdd70..ac259df51f6f 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlexprt.cxx,v $
*
- * $Revision: 1.112 $
+ * $Revision: 1.113 $
*
- * last change: $Author: sab $ $Date: 2001-05-23 11:43:09 $
+ * last change: $Author: sab $ $Date: 2001-05-29 15:42:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -427,7 +427,8 @@ ScXMLExport::ScXMLExport(const sal_uInt16 nExportFlag) :
pChangeTrackingExportHelper(NULL),
aXShapesVec(),
pDefaults(NULL),
- pNumberFormatAttributesExportHelper(NULL)
+ pNumberFormatAttributesExportHelper(NULL),
+ sLayerID(RTL_CONSTASCII_USTRINGPARAM( SC_LAYERID ))
{
pGroupColumns = new ScMyOpenCloseColumnRowGroup(*this, XML_TABLE_COLUMN_GROUP);
pGroupRows = new ScMyOpenCloseColumnRowGroup(*this, XML_TABLE_ROW_GROUP);
@@ -538,8 +539,7 @@ void ScXMLExport::CollectSharedData(sal_Int32& nTableCount, sal_Int32& nShapesCo
uno::Reference< beans::XPropertySet > xShapeProp( xShape, uno::UNO_QUERY );
if( xShapeProp.is() )
{
- uno::Any aPropAny = xShapeProp->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM( SC_LAYERID ) ) );
+ uno::Any aPropAny = xShapeProp->getPropertyValue(sLayerID);
sal_Int16 nLayerID;
if( (aPropAny >>= nLayerID) && (nLayerID != SC_LAYER_INTERN) )
nShapesCount++;
@@ -591,8 +591,7 @@ void ScXMLExport::CollectShapesAutoStyles(uno::Reference<sheet::XSpreadsheet>& x
uno::Reference< beans::XPropertySet > xShapeProp( xShape, uno::UNO_QUERY );
if( xShapeProp.is() )
{
- uno::Any aPropAny = xShapeProp->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM( SC_LAYERID ) ) );
+ uno::Any aPropAny = xShapeProp->getPropertyValue(sLayerID);
sal_Int16 nLayerID;
if( aPropAny >>= nLayerID )
{
@@ -619,6 +618,7 @@ void ScXMLExport::CollectShapesAutoStyles(uno::Reference<sheet::XSpreadsheet>& x
aMyShape.aAddress = aRange.aStart;
aMyShape.aEndAddress = aRange.aEnd;
aMyShape.nIndex = nShape;
+ aMyShape.nLayerID = nLayerID;
pSharedData->AddNewShape(aMyShape);
pSharedData->SetLastColumn(nTable, aRange.aStart.Col());
pSharedData->SetLastRow(nTable, aRange.aStart.Row());
@@ -1516,13 +1516,14 @@ void ScXMLExport::_ExportStyles( sal_Bool bUsed )
if (aStyleFamily >>= aCellStyles)
{
sal_Int32 nCount = aCellStyles->getCount();
+ rtl::OUString sNumberFormat(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_NUMFMT));
for (sal_Int32 i = 0; i < nCount; i++)
{
uno::Any aCellStyle = aCellStyles->getByIndex(i);
uno::Reference <beans::XPropertySet> xCellProperties;
if (aCellStyle >>= xCellProperties)
{
- uno::Any aNumberFormat = xCellProperties->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_NUMFMT)));
+ uno::Any aNumberFormat = xCellProperties->getPropertyValue(sNumberFormat);
sal_Int32 nNumberFormat;
if (aNumberFormat >>= nNumberFormat)
addDataStyle(nNumberFormat);
@@ -1578,9 +1579,8 @@ void ScXMLExport::_ExportAutoStyles()
if(xPropStates.size())
{
rtl::OUString sParent;
- rtl::OUString sName = GetAutoStylePool()->Find(XML_STYLE_FAMILY_TABLE_TABLE, sParent, xPropStates);
- if (!sName.getLength())
- sName = GetAutoStylePool()->Add(XML_STYLE_FAMILY_TABLE_TABLE, sParent, xPropStates);
+ rtl::OUString sName;
+ GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_TABLE, sParent, xPropStates);
aTableStyles.push_back(sName);
}
}
@@ -1604,31 +1604,74 @@ void ScXMLExport::_ExportAutoStyles()
uno::Reference <sheet::XCellRangeAddressable> xCellRangeAddressable(xCellRange, uno::UNO_QUERY);
if (xCellRangeAddressable.is())
{
- table::CellRangeAddress aRangeAddress = xCellRangeAddressable->getRangeAddress();
- uno::Any aValidation = xProperties->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_VALIXML)));
+ rtl::OUString sStyleName;
+ sal_Int32 nNumberFormat;
sal_Int32 nValidationIndex(-1);
- if (pValidationsContainer->AddValidation(aValidation, aRangeAddress, nValidationIndex))
+ table::CellRangeAddress aRangeAddress = xCellRangeAddressable->getRangeAddress();
+ std::vector< XMLPropertyState > xPropStates = xCellStylesExportPropertySetMapper->Filter( xProperties );
+ std::vector< XMLPropertyState >::iterator aItr = xPropStates.begin();
+ sal_Int32 nCount(0);
+ while (aItr != xPropStates.end())
{
- pSharedData->SetLastColumn(nTable, aRangeAddress.EndColumn);
- pSharedData->SetLastRow(nTable, aRangeAddress.EndRow);
+ if (aItr->mnIndex != -1)
+ {
+ switch (xCellStylesPropertySetMapper->GetEntryContextId(aItr->mnIndex))
+ {
+ case CTF_SC_VALIDATION :
+ {
+ if (pValidationsContainer->AddValidation(aItr->maValue, aRangeAddress, nValidationIndex))
+ {
+ pSharedData->SetLastColumn(nTable, aRangeAddress.EndColumn);
+ pSharedData->SetLastRow(nTable, aRangeAddress.EndRow);
+ }
+ // this is not very slow, because it is most the last property or
+ // if it is not the last property it is the property before the last property,
+ // so in the worst case only one property has to be copied, but in the best case no
+ // property has to be copied
+ aItr = xPropStates.erase(aItr);
+ }
+ break;
+ case CTF_SC_CELLSTYLE :
+ {
+ aItr->maValue >>= sStyleName;
+ aItr->mnIndex = -1;
+ aItr++;
+ nCount++;
+ }
+ break;
+ case CTF_SC_NUMBERFORMAT :
+ {
+ if (aItr->maValue >>= nNumberFormat)
+ addDataStyle(nNumberFormat);
+ aItr++;
+ nCount++;
+ }
+ break;
+ default:
+ {
+ aItr++;
+ nCount++;
+ }
+ break;
+ }
+ }
+ else
+ {
+ aItr++;
+ nCount++;
+ }
}
- uno::Any aNumberFormat = xProperties->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_NUMFMT)));
- sal_Int32 nNumberFormat;
- if (aNumberFormat >>= nNumberFormat)
- addDataStyle(nNumberFormat);
- uno::Any aStyle = xProperties->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLSTYL)));
- rtl::OUString sStyleName;
- if (aStyle >>= sStyleName)
+ if (nCount == 1) // this is the CellStyle and should be removed if alone
+ xPropStates.clear();
+ if (sStyleName.getLength())
{
- std::vector< XMLPropertyState > xPropStates = xCellStylesExportPropertySetMapper->Filter( xProperties );
if (xPropStates.size())
{
sal_Int32 nIndex;
- rtl::OUString sName = GetAutoStylePool()->Find(XML_STYLE_FAMILY_TABLE_CELL, sStyleName, xPropStates);
+ rtl::OUString sName;
sal_Bool bIsAutoStyle = sal_True;
- if (!sName.getLength())
+ if (GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_CELL, sStyleName, xPropStates))
{
- sName = GetAutoStylePool()->Add(XML_STYLE_FAMILY_TABLE_CELL, sStyleName, xPropStates);
rtl::OUString* pTemp = new rtl::OUString(sName);
nIndex = pCellStyles->AddStyleName(pTemp);
}
@@ -1694,10 +1737,9 @@ void ScXMLExport::_ExportAutoStyles()
if(xPropStates.size())
{
rtl::OUString sParent;
- rtl::OUString sName = GetAutoStylePool()->Find(XML_STYLE_FAMILY_TABLE_COLUMN, sParent, xPropStates);
- if (!sName.getLength())
+ rtl::OUString sName;
+ if (GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_COLUMN, sParent, xPropStates))
{
- sName = GetAutoStylePool()->Add(XML_STYLE_FAMILY_TABLE_COLUMN, sParent, xPropStates);
rtl::OUString* pTemp = new rtl::OUString(sName);
nIndex = pColumnStyles->AddStyleName(pTemp);
}
@@ -1751,10 +1793,9 @@ void ScXMLExport::_ExportAutoStyles()
if(xPropStates.size())
{
rtl::OUString sParent;
- rtl::OUString sName = GetAutoStylePool()->Find(XML_STYLE_FAMILY_TABLE_ROW, sParent, xPropStates);
- if (!sName.getLength())
+ rtl::OUString sName;
+ if (GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_ROW, sParent, xPropStates))
{
- sName = GetAutoStylePool()->Add(XML_STYLE_FAMILY_TABLE_ROW, sParent, xPropStates);
rtl::OUString* pTemp = new rtl::OUString(sName);
nIndex = pRowStyles->AddStyleName(pTemp);
}
@@ -2249,10 +2290,7 @@ void ScXMLExport::WriteShapes(const ScMyCell& rMyCell)
uno::Reference< beans::XPropertySet > xShapeProp( xShape, uno::UNO_QUERY );
if( xShapeProp.is() )
{
- uno::Any aPropAny = xShapeProp->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM( SC_LAYERID ) ) );
- sal_Int16 nLayerID;
- if( (aPropAny >>= nLayerID) && (nLayerID == SC_LAYER_BACK) )
+ if(aItr->nLayerID == SC_LAYER_BACK)
AddAttribute(XML_NAMESPACE_TABLE, XML_TABLE_BACKGROUND, XML_TRUE);
}
ExportShape(xShape, pPoint);
@@ -2279,8 +2317,7 @@ void ScXMLExport::WriteTableShapes()
uno::Reference< beans::XPropertySet > xShapeProp( xShape, uno::UNO_QUERY );
if( xShapeProp.is() )
{
- uno::Any aPropAny = xShapeProp->getPropertyValue(
- OUString( RTL_CONSTASCII_USTRINGPARAM( SC_LAYERID ) ) );
+ uno::Any aPropAny = xShapeProp->getPropertyValue(sLayerID);
sal_Int16 nLayerID;
if( (aPropAny >>= nLayerID) && (nLayerID == SC_LAYER_BACK) )
AddAttribute(XML_NAMESPACE_TABLE, XML_TABLE_BACKGROUND, XML_TRUE);
diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx
index 3b55a99d88fd..954af24bcef8 100644
--- a/sc/source/filter/xml/xmlexprt.hxx
+++ b/sc/source/filter/xml/xmlexprt.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlexprt.hxx,v $
*
- * $Revision: 1.58 $
+ * $Revision: 1.59 $
*
- * last change: $Author: sab $ $Date: 2001-05-22 12:20:31 $
+ * last change: $Author: sab $ $Date: 2001-05-29 15:42:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -136,6 +136,7 @@ class ScXMLExport : public SvXMLExport
ScMyDetectiveObjContainer* pDetectiveObjContainer;
ScMyNotEmptyCellsIterator* pCellsItr;
ScChangeTrackingExportHelper* pChangeTrackingExportHelper;
+ const rtl::OUString sLayerID;
sal_Int32 nOpenRow;
sal_uInt16 nCurrentTable;
sal_Bool bHasRowHeader : 1;
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index 2accf1fbf73c..f679ca4cdb9f 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlstyle.cxx,v $
*
- * $Revision: 1.32 $
+ * $Revision: 1.33 $
*
- * last change: $Author: sab $ $Date: 2001-05-23 13:17:06 $
+ * last change: $Author: sab $ $Date: 2001-05-29 15:42:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -130,7 +130,7 @@ const XMLPropertyMapEntry aXMLScCellStylesProperties[] =
{ "CellBackColor", XML_NAMESPACE_FO, sXML_background_color, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY|MID_FLAG_MERGE_ATTRIBUTE, 0 },
{ "CellProtection", XML_NAMESPACE_STYLE, sXML_cell_protect, XML_SC_TYPE_CELLPROTECTION|MID_FLAG_MERGE_PROPERTY, 0 },
{ "CellProtection", XML_NAMESPACE_STYLE, sXML_print_content, XML_SC_TYPE_PRINTCONTENT|MID_FLAG_MERGE_PROPERTY, 0 },
- { "CellStyle", XML_NAMESPACE_STYLE, sXML_style, XML_TYPE_STRING|MID_FLAG_NO_PROPERTY_EXPORT, CTF_SC_CELLSTYLE },
+ { "CellStyle", XML_NAMESPACE_STYLE, sXML_style, XML_TYPE_STRING, CTF_SC_CELLSTYLE },
{ "ConditionalFormat", XML_NAMESPACE_STYLE, sXML_map, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM, CTF_SC_IMPORT_MAP },
{ "ConditionalFormatXML", XML_NAMESPACE_STYLE, sXML_map, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM, CTF_SC_MAP },
{ "HoriJustify", XML_NAMESPACE_FO, sXML_text_align, XML_SC_TYPE_HORIJUSTIFY|MID_FLAG_MERGE_PROPERTY, 0 },
@@ -155,44 +155,11 @@ const XMLPropertyMapEntry aXMLScCellStylesProperties[] =
{ "RotateAngle", XML_NAMESPACE_STYLE, sXML_rotation_angle, XML_SC_TYPE_ROTATEANGLE, 0 },
{ "RotateReference", XML_NAMESPACE_STYLE, sXML_rotation_align, XML_SC_TYPE_ROTATEREFERENCE, 0},
{ "ShadowFormat", XML_NAMESPACE_STYLE, sXML_shadow, XML_TYPE_TEXT_SHADOW, 0 },
+ { "StandardDecimals", XML_NAMESPACE_STYLE, sXML_decimal_places, XML_TYPE_NUMBER16, 0 },
{ "TopBorder", XML_NAMESPACE_FO, sXML_border_top, XML_TYPE_BORDER, CTF_SC_TOPBORDER },
{ "TopBorder", XML_NAMESPACE_STYLE, sXML_border_line_width_top, XML_TYPE_BORDER_WIDTH, CTF_SC_TOPBORDERWIDTH },
+// { "ValidationXML", XML_NAMESPACE_TABLE, sXML_content_validation, XML_TYPE_BUILDIN_CMP_ONLY, CTF_SC_VALIDATION },
{ "VertJustify", XML_NAMESPACE_FO, sXML_vertical_align, XML_SC_TYPE_VERTJUSTIFY, 0},
- { "StandardDecimals", XML_NAMESPACE_STYLE, sXML_decimal_places, XML_TYPE_NUMBER16, 0 },
-
-
-// CharacterProperties
-/* { "CharAutoKerning", XML_NAMESPACE_STYLE, sXML_letter_kerning, XML_TYPE_BOOL, 0 },
- ( "CharBackColor", XML_NAMESPACE_STYLE, text_background_color, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
- ( "CharBackTransparent", XML_NAMESPACE_STYLE, text_background_color, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
- ( "CharBackColor", XML_NAMESPACE_FO, text_background_color, XML_TYPE_COLOR|MID_FLAG_SPECIAL_ITEM_EXPORT, CTF_OLDTEXTBACKGROUND ),
- { "CharCaseMap", XML_NAMESPACE_FO, sXML_font_variant, XML_TYPE_TEXT_CASEMAP_VAR, 0 },
- { "CharCaseMap", XML_NAMESPACE_FO, sXML_text_transform, XML_TYPE_TEXT_CASEMAP, 0 },
- { "CharColor", XML_NAMESPACE_FO, sXML_color, XML_TYPE_COLOR, 0 },
- { "CharContoured", XML_NAMESPACE_STYLE, sXML_text_outline, XML_TYPE_BOOL, 0 },
- { "CharCrossedOut", XML_NAMESPACE_STYLE, sXML_text_crossing_out, XML_TYPE_TEXT_BOOLCROSSEDOUT, 0 },
-// { "CharEscapement", XML_NAMESPACE_STYLE, sXML_text_position, XML_TYPE_TEXT_ESCAPEMENT|MID_FLAG_MERGE_ATTRIBUTE, 0 },
-// { "CharEscapementHeight", XML_NAMESPACE_STYLE, sXML_text_position, XML_TYPE_TEXT_ESCAPEMENT_HEIGHT|MID_FLAG_MERGE_ATTRIBUTE, 0 },
- { "CharFlash", XML_NAMESPACE_STYLE, sXML_text_blinking, XML_TYPE_BOOL, 0},
- { "CharFontName",XML_NAMESPACE_FO, sXML_font_family, XML_TYPE_TEXT_FONTFAMILYNAME, 0 },
-// { "CharFontType", ...},
- { "CharFontStyleName", XML_NAMESPACE_STYLE, sXML_font_style_name, XML_TYPE_STRING, 0 },
- { "CharFontFamily", XML_NAMESPACE_STYLE, sXML_font_family_generic, XML_TYPE_TEXT_FONTFAMILY, 0 },
- { "CharFontPitch", XML_NAMESPACE_STYLE, sXML_font_pitch, XML_TYPE_TEXT_FONTPITCH, 0 },
- { "CharFontCharSet", XML_NAMESPACE_STYLE, sXML_font_charset, XML_TYPE_TEXT_FONTENCODING, 0 },
- { "CharHeight", XML_NAMESPACE_FO, sXML_font_size, XML_TYPE_CHAR_HEIGHT, 0 },
- { "CharKeepTogether", XML_NAMESPACE_FO, sXML_keep_with_next, XML_TYPE_BOOL, 0 },
- { "CharKerning", XML_NAMESPACE_FO, sXML_letter_spacing, XML_TYPE_TEXT_KERNING, 0 },
- { "CharLocale", XML_NAMESPACE_FO, sXML_language, XML_TYPE_CHAR_LANGUAGE|MID_FLAG_MERGE_PROPERTY, 0 },
- { "CharLocale", XML_NAMESPACE_FO, sXML_country, XML_TYPE_CHAR_COUNTRY|MID_FLAG_MERGE_PROPERTY, 0 },
-// { "CharNoLineBreak, ...},
- { "CharPosture",XML_NAMESPACE_FO, sXML_font_style, XML_TYPE_TEXT_POSTURE, 0 },
- { "CharShadowed",XML_NAMESPACE_FO, sXML_text_shadow, XML_TYPE_TEXT_SHADOWED, 0 },
-// { "CharStyle", ... },
- { "CharBackTransparent", XML_NAMESPACE_FO, sXML_text_background_color, XML_TYPE_ISTRANSPARENT|MID_FLAG_MULTI_PROPERTY|MID_FLAG_MERGE_ATTRIBUTE, 0 },
- { "CharUnderline", XML_NAMESPACE_STYLE, sXML_text_underline, XML_TYPE_TEXT_UNDERLINE, 0 },
- { "CharWeight", XML_NAMESPACE_FO, sXML_font_weight, XML_TYPE_TEXT_WEIGHT, 0 },
- { "CharWordMode", XML_NAMESPACE_STYLE, sXML_score_spaces, XML_TYPE_NBOOL, 0 },*/
{ 0L }
};
@@ -219,12 +186,6 @@ const XMLPropertyMapEntry aXMLScTableStylesProperties[] =
{ 0L }
};
-/*const XMLPropertyMapEntry aXMLScShapeStylesProperties[] =
-{
- { "LayerID", XML_NAMESPACE_STYLE, sXML_run_through, XML_SC_TYPE_LAYER, 0 },
- { 0L }
-};*/
-
ScXMLCellExportPropertyMapper::ScXMLCellExportPropertyMapper(
const UniReference< XMLPropertySetMapper >& rMapper )
: SvXMLExportPropertyMapper(rMapper)
@@ -709,11 +670,6 @@ const XMLPropertyHandler* XMLScPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
{
switch(nType)
{
- /*case XML_SC_TYPE_LAYER :
- {
- pHdl = new XmlScPropHdl_LayerID;
- }
- break;*/
case XML_SC_TYPE_CELLPROTECTION :
{
pHdl = new XmlScPropHdl_CellProtection;
@@ -724,14 +680,6 @@ const XMLPropertyHandler* XMLScPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
pHdl = new XmlScPropHdl_PrintContent;
}
break;
- /* case XML_SC_TYPE_NUMBERFORMAT :
- {
- if (bIsExport)
- pHdl = new XmlScPropHdl_NumberFormat(pScXMLExport);
- else
- pHdl = new XmlScPropHdl_NumberFormat(pScXMLImport);
- }
- break;*/
case XML_SC_TYPE_HORIJUSTIFY :
{
pHdl = new XmlScPropHdl_HoriJustify;
@@ -781,51 +729,6 @@ const XMLPropertyHandler* XMLScPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
return pHdl;
}
-/*XmlScPropHdl_LayerID::~XmlScPropHdl_LayerID()
-{
-}
-
-sal_Bool XmlScPropHdl_LayerID::importXML(
- const ::rtl::OUString& rStrImpValue,
- ::com::sun::star::uno::Any& rValue,
- const SvXMLUnitConverter& rUnitConverter ) const
-{
- sal_Bool bRetval(sal_True);
-
- sal_Int16 nLayer;
- if (rStrImpValue.compareToAscii (sXML_foreground) == 0)
- nLayer = SC_LAYER_FRONT;
- else if (rStrImpValue.compareToAscii (sXML_background) == 0)
- nLayer = SC_LAYER_BACK;
- else
- bRetval = sal_False;
- rValue <<= nLayer;
-
- return bRetval;
-}
-
-sal_Bool XmlScPropHdl_LayerID::exportXML(
- ::rtl::OUString& rStrExpValue,
- const ::com::sun::star::uno::Any& rValue,
- const SvXMLUnitConverter& rUnitConverter ) const
-{
- sal_Bool bRetval(sal_False);
-
- sal_Int16 nLayer;
- if (rValue >>= nLayer)
- {
- bRetval = sal_True;
- if (nLayer == SC_LAYER_FRONT)
- rStrExpValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_foreground));
- else if (nLayer == SC_LAYER_BACK)
- rStrExpValue = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(sXML_background));
- else
- bRetval = sal_False;
- }
-
- return bRetval;
-}*/
-
XmlScPropHdl_CellProtection::~XmlScPropHdl_CellProtection()
{
}
@@ -1035,69 +938,6 @@ sal_Bool XmlScPropHdl_PrintContent::exportXML(
return bRetval;
}
-/*XmlScPropHdl_NumberFormat::XmlScPropHdl_NumberFormat(const ScXMLExport* pScTempXMLExport)
-{
- pScXMLExport = pScTempXMLExport;
-}
-
-XmlScPropHdl_NumberFormat::XmlScPropHdl_NumberFormat(const ScXMLImport* pScTempXMLImport)
-{
- pScXMLImport = pScTempXMLImport;
-}
-
-XmlScPropHdl_NumberFormat::~XmlScPropHdl_NumberFormat()
-{
-}
-
-sal_Bool XmlScPropHdl_NumberFormat::equals(
- const ::com::sun::star::uno::Any& r1,
- const ::com::sun::star::uno::Any& r2 ) const
-{
- sal_Int32 aNumberFormat1, aNumberFormat2;
-
- if((r1 >>= aNumberFormat1) && (r2 >>= aNumberFormat2))
- {
- return (aNumberFormat1 == aNumberFormat2);
- }
- return sal_False;
-}
-
-sal_Bool XmlScPropHdl_NumberFormat::importXML(
- const ::rtl::OUString& rStrImpValue,
- ::com::sun::star::uno::Any& rValue,
- const SvXMLUnitConverter& rUnitConverter ) const
-{
- sal_Bool bRetval(sal_False);
-
- sal_Int32 nNumberFormat = pScXMLImport->GetNumImport()->GetKeyForName(rStrImpValue);
- if (nNumberFormat >= 0)
- {
- rValue <<= nNumberFormat;
- bRetval = sal_True;
- }
- else
- bRetval = sal_False;
-
- return bRetval;
-}
-
-sal_Bool XmlScPropHdl_NumberFormat::exportXML(
- ::rtl::OUString& rStrExpValue,
- const ::com::sun::star::uno::Any& rValue,
- const SvXMLUnitConverter& rUnitConverter ) const
-{
- sal_Bool bRetval(sal_False);
-
- sal_Int32 nNumberFormat;
- if (rValue >>= nNumberFormat)
- {
- rStrExpValue = pScXMLExport->GetNumExport()->GetStyleName(nNumberFormat);
- bRetval = sal_True;
- }
-
- return bRetval;
-}*/
-
XmlScPropHdl_HoriJustify::~XmlScPropHdl_HoriJustify()
{
}
diff --git a/sc/source/filter/xml/xmlstyle.hxx b/sc/source/filter/xml/xmlstyle.hxx
index 6df2a1042824..c5195aea489e 100644
--- a/sc/source/filter/xml/xmlstyle.hxx
+++ b/sc/source/filter/xml/xmlstyle.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: xmlstyle.hxx,v $
*
- * $Revision: 1.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: sab $ $Date: 2001-05-11 07:43:40 $
+ * last change: $Author: sab $ $Date: 2001-05-29 15:42:01 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -93,7 +93,6 @@ extern const XMLPropertyMapEntry aXMLScCellStylesProperties[];
extern const XMLPropertyMapEntry aXMLScColumnStylesProperties[];
extern const XMLPropertyMapEntry aXMLScRowStylesProperties[];
extern const XMLPropertyMapEntry aXMLScTableStylesProperties[];
-//extern const XMLPropertyMapEntry aXMLScShapeStylesProperties[];
//CellStyles
#define XML_SC_TYPE_CELLPROTECTION (XML_SC_TYPES_START + 1)
@@ -133,6 +132,7 @@ extern const XMLPropertyMapEntry aXMLScTableStylesProperties[];
#define CTF_SC_OLDTEXTBACKGROUND (XML_SC_CTF_START + 21)
#define CTF_SC_IMPORT_MAP (XML_SC_CTF_START + 22)
#define CTF_SC_CELLSTYLE (XML_SC_CTF_START + 23)
+#define CTF_SC_VALIDATION (XML_SC_CTF_START + 24)
#define CTF_SC_ROWHEIGHT (XML_SC_CTF_START + 50)
#define CTF_SC_ROWOPTIMALHEIGHT (XML_SC_CTF_START + 51)
@@ -142,8 +142,6 @@ extern const XMLPropertyMapEntry aXMLScTableStylesProperties[];
//ColumnStyles
#define XML_SC_TYPE_BREAKBEFORE (XML_SC_TYPES_START + 50)
-//ShapeStyles
-//#define XML_SC_TYPE_LAYER (XML_SC_TYPES_START + 51)
class ScXMLExport;
class ScXMLImport;
@@ -252,14 +250,6 @@ public:
virtual const XMLPropertyHandler* GetPropertyHandler( sal_Int32 nType ) const;
};
-/*class XmlScPropHdl_LayerID : public XMLPropertyHandler
-{
-public:
- virtual ~XmlScPropHdl_LayerID();
- virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
- virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
-};*/
-
class XmlScPropHdl_CellProtection : public XMLPropertyHandler
{
public:
@@ -278,19 +268,6 @@ public:
virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
};
-/*class XmlScPropHdl_NumberFormat : public XMLPropertyHandler
-{
- const ScXMLExport* pScXMLExport;
- const ScXMLImport* pScXMLImport;
-public:
- XmlScPropHdl_NumberFormat(const ScXMLExport* pScXMLExport);
- XmlScPropHdl_NumberFormat(const ScXMLImport* pScXMLImport);
- virtual ~XmlScPropHdl_NumberFormat();
- virtual sal_Bool equals( const ::com::sun::star::uno::Any& r1, const ::com::sun::star::uno::Any& r2 ) const;
- virtual sal_Bool importXML( const ::rtl::OUString& rStrImpValue, ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
- virtual sal_Bool exportXML( ::rtl::OUString& rStrExpValue, const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const;
-};*/
-
class XmlScPropHdl_HoriJustify : public XMLPropertyHandler
{
public: