summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2010-05-28 09:36:24 +0200
committerVladimir Glazunov <vg@openoffice.org>2010-05-28 09:36:24 +0200
commit649c52775f351b4deae44d88aa107c55c788a1c4 (patch)
treecf42197d1980a414f87c67feac173e4ca6377301
parent4f6210d7696db9f8fa48e5bcc1f1d0f10537f7c3 (diff)
parent493e4e46a109284d985d66db01edf3aec0a30b13 (diff)
CWS-TOOLING: integrate CWS calc53
-rw-r--r--connectivity/source/drivers/calc/CTable.cxx9
-rw-r--r--editeng/source/editeng/eehtml.cxx21
-rw-r--r--editeng/source/editeng/eehtml.hxx1
-rw-r--r--formula/inc/formula/compiler.hrc8
-rw-r--r--formula/inc/formula/opcode.hxx4
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx2
-rw-r--r--xmloff/source/forms/elementexport.cxx4
-rw-r--r--xmloff/source/forms/propertyexport.cxx6
-rw-r--r--xmloff/source/forms/propertyexport.hxx8
-rw-r--r--xmloff/source/forms/propertyimport.cxx2
-rw-r--r--xmloff/source/script/XMLScriptExportHandler.cxx3
11 files changed, 40 insertions, 28 deletions
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index 65505495cd..c1c2e90beb 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -347,14 +347,15 @@ void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& xSheet,
switch (nType)
{
case DataType::VARCHAR:
- if ( eCellType == CellContentType_TEXT )
+ if ( eCellType == CellContentType_EMPTY )
+ rValue.setNull();
+ else
{
+ // #i25840# still let Calc convert numbers to text
const Reference<XText> xText( xCell, UNO_QUERY );
if ( xText.is() )
rValue = xText->getString();
- } // if ( eCellType == CellContentType_TEXT )
- else
- rValue.setNull();
+ }
break;
case DataType::DECIMAL:
if ( eCellType == CellContentType_VALUE )
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index a6d5096be7..87bf077bb2 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -60,6 +60,7 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const String& rBaseURL, SvKeyValu
bWasInPara = FALSE;
nInTable = 0;
nInCell = 0;
+ bInTitle = FALSE;
nDefListLevel = 0;
nBulletLevel = 0;
nNumberingLevel = 0;
@@ -179,11 +180,14 @@ void EditHTMLParser::NextToken( int nToken )
break;
case HTML_TEXTTOKEN:
{
- if ( !bInPara )
- StartPara( FALSE );
-
-// if ( bInPara || pCurAnchor )
+ // #i110937# for <title> content, call aImportHdl (no SkipGroup), but don't insert the text into the EditEngine
+ if (!bInTitle)
{
+ if ( !bInPara )
+ StartPara( FALSE );
+
+ // if ( bInPara || pCurAnchor )
+
String aText = aToken;
if ( aText.Len() && ( aText.GetChar( 0 ) == ' ' )
&& ThrowAwayBlank() && !IsReadPRE() )
@@ -342,6 +346,13 @@ void EditHTMLParser::NextToken( int nToken )
// #58335# kein SkipGroup on/off auf inline markup etc.
+ case HTML_TITLE_ON:
+ bInTitle = TRUE;
+ break;
+ case HTML_TITLE_OFF:
+ bInTitle = FALSE;
+ break;
+
// globals
case HTML_HTML_ON:
case HTML_HTML_OFF:
@@ -355,8 +366,6 @@ void EditHTMLParser::NextToken( int nToken )
case HTML_THEAD_OFF:
case HTML_TBODY_ON:
case HTML_TBODY_OFF:
- case HTML_TITLE_ON:
- case HTML_TITLE_OFF:
// inline elements, structural markup
// HTML 3.0
case HTML_BANNER_ON:
diff --git a/editeng/source/editeng/eehtml.hxx b/editeng/source/editeng/eehtml.hxx
index 6314db6161..4035cb1598 100644
--- a/editeng/source/editeng/eehtml.hxx
+++ b/editeng/source/editeng/eehtml.hxx
@@ -57,6 +57,7 @@ private:
BOOL bFieldsInserted;
BYTE nInTable;
BYTE nInCell;
+ BOOL bInTitle;
BYTE nDefListLevel;
BYTE nBulletLevel;
diff --git a/formula/inc/formula/compiler.hrc b/formula/inc/formula/compiler.hrc
index 2df2a8ee78..c1a8117ab0 100644
--- a/formula/inc/formula/compiler.hrc
+++ b/formula/inc/formula/compiler.hrc
@@ -393,12 +393,8 @@
#define SC_OPCODE_LAST_OPCODE_ID 394 /* last OpCode */
/*** Interna ***/
-#define SC_OPCODE_INTERNAL_BEGIN 9995
-#define SC_OPCODE_GAME 9995
-#define SC_OPCODE_SPEW 9996
-#define SC_OPCODE_TTT 9997
-#define SC_OPCODE_TEAM 9998
-#define SC_OPCODE_ANSWER 9999
+#define SC_OPCODE_INTERNAL_BEGIN 9999
+#define SC_OPCODE_TTT 9999
#define SC_OPCODE_INTERNAL_END 9999
/*** from here on ExtraData contained ***/
diff --git a/formula/inc/formula/opcode.hxx b/formula/inc/formula/opcode.hxx
index 12061917d6..53f387ae76 100644
--- a/formula/inc/formula/opcode.hxx
+++ b/formula/inc/formula/opcode.hxx
@@ -386,11 +386,7 @@ enum OpCodeEnum
ocNumberValue = SC_OPCODE_NUMBERVALUE,
// internal stuff
ocInternalBegin = SC_OPCODE_INTERNAL_BEGIN,
- ocGame = SC_OPCODE_GAME,
- ocSpew = SC_OPCODE_SPEW,
ocTTT = SC_OPCODE_TTT,
- ocTeam = SC_OPCODE_TEAM,
- ocAnswer = SC_OPCODE_ANSWER,
ocInternalEnd = SC_OPCODE_INTERNAL_END,
// from here on ExtraData
ocDataToken1 = SC_OPCODE_DATA_TOKEN_1,
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index bdc6e4f0d3..5bac848086 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -46,7 +46,7 @@ namespace formula
// =============================================================================
using namespace ::com::sun::star;
- static const sal_Char* pInternal[ 5 ] = { "GAME", "SPEW", "TTT", "STARCALCTEAM", "ANTWORT" };
+ static const sal_Char* pInternal[ 1 ] = { "TTT" };
// =============================================================================
namespace
diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx
index 3f895568ba..9fe201e65a 100644
--- a/xmloff/source/forms/elementexport.cxx
+++ b/xmloff/source/forms/elementexport.cxx
@@ -691,7 +691,7 @@ namespace xmloff
if (m_nIncludeCommon & CCA_TARGET_LOCATION)
{
- exportTargetLocationAttribute();
+ exportTargetLocationAttribute(false);
#if OSL_DEBUG_LEVEL > 0
// reset the bit for later checking
m_nIncludeCommon = m_nIncludeCommon & ~CCA_TARGET_LOCATION;
@@ -2138,7 +2138,7 @@ namespace xmloff
// the target frame
exportTargetFrameAttribute();
// the target URL
- exportTargetLocationAttribute();
+ exportTargetLocationAttribute(true); // #i110911# add type attribute (for form, but not for control)
// master fields
exportStringSequenceAttribute(
diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx
index e6140c03c3..41b7587ce2 100644
--- a/xmloff/source/forms/propertyexport.cxx
+++ b/xmloff/source/forms/propertyexport.cxx
@@ -420,7 +420,7 @@ namespace xmloff
}
//---------------------------------------------------------------------
- void OPropertyExport::exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty)
+ void OPropertyExport::exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType)
{
DBG_CHECK_PROPERTY( _sPropertyName, ::rtl::OUString );
@@ -433,6 +433,10 @@ namespace xmloff
,OAttributeMetaData::getCommonControlAttributeName(_nProperty)
, sTargetLocation);
+ // #i110911# add xlink:type="simple" if required
+ if (_bAddType)
+ AddAttribute(XML_NAMESPACE_XLINK, token::XML_TYPE, token::XML_SIMPLE);
+
exportedProperty(_sPropertyName);
}
//---------------------------------------------------------------------
diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx
index 8ca221bbe8..28cd7ea84b 100644
--- a/xmloff/source/forms/propertyexport.hxx
+++ b/xmloff/source/forms/propertyexport.hxx
@@ -69,7 +69,7 @@ namespace xmloff
StringSet m_aRemainingProps;
// see examinePersistence
- void exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty);
+ void exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType);
protected:
IFormsExportContext& m_rContext;
@@ -230,8 +230,10 @@ namespace xmloff
<p>The value of this attribute is extracted from the TargetURL property of the object given.</p>
<p>The property needs a special handling because the URL's need to be made relative</p>
+
+ <p>If _bAddType is set, an additional xlink:type="simple" attribute is also added.</p>
*/
- inline void exportTargetLocationAttribute() { exportRelativeTargetLocation(PROPERTY_TARGETURL,CCA_TARGET_LOCATION); }
+ inline void exportTargetLocationAttribute(bool _bAddType) { exportRelativeTargetLocation(PROPERTY_TARGETURL,CCA_TARGET_LOCATION,_bAddType); }
/** add the form:image attribute to the export context.
@@ -239,7 +241,7 @@ namespace xmloff
<p>The property needs a special handling because the URL's need to be made relative</p>
*/
- inline void exportImageDataAttribute() { exportRelativeTargetLocation(PROPERTY_IMAGEURL,CCA_IMAGE_DATA); }
+ inline void exportImageDataAttribute() { exportRelativeTargetLocation(PROPERTY_IMAGEURL,CCA_IMAGE_DATA,false); }
/** flag the style properties as 'already exported'
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx
index b5c20be581..9cf2bea366 100644
--- a/xmloff/source/forms/propertyimport.cxx
+++ b/xmloff/source/forms/propertyimport.cxx
@@ -363,7 +363,7 @@ void OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl
implPushBackPropertyValue( aNewValue );
}
#if OSL_DEBUG_LEVEL > 0
- else
+ else if (!token::IsXMLToken(_rLocalName, token::XML_TYPE)) // xlink:type is valid but ignored for <form:form>
{
::rtl::OString sMessage( "OPropertyImport::handleAttribute: Can't handle the following:\n" );
sMessage += ::rtl::OString( " Attribute name: " );
diff --git a/xmloff/source/script/XMLScriptExportHandler.cxx b/xmloff/source/script/XMLScriptExportHandler.cxx
index be72ceba52..0e610cb15f 100644
--- a/xmloff/source/script/XMLScriptExportHandler.cxx
+++ b/xmloff/source/script/XMLScriptExportHandler.cxx
@@ -75,6 +75,9 @@ void XMLScriptExportHandler::Export(
OUString sTmp;
rValues[i].Value >>= sTmp;
rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, sTmp);
+
+ // #i110911# xlink:type="simple" is required
+ rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE);
}
// else: disregard
}