Kaydet (Commit) c6dd735a authored tarafından Rosemary Sebastian's avatar Rosemary Sebastian Kaydeden (comit) Markus Mohrhard

replace namespace url strings with function calls

Change-Id: I3c0ca35c6f6acdd0f00a2aff4c9ef49d110cc1a2
Reviewed-on: https://gerrit.libreoffice.org/33664Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst e4f7e197
......@@ -26,6 +26,7 @@
#include "document.hxx"
#include "editutil.hxx"
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
#include <rtl/strbuf.hxx>
#include <svl/sharedstring.hxx>
......@@ -377,8 +378,8 @@ void XclExpXmlChTrHeaders::SaveXml( XclExpXmlStream& rStrm )
pHeaders->write("<")->writeId(XML_headers);
rStrm.WriteAttributes(
XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
FSNS(XML_xmlns, XML_r), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
XML_xmlns, XclXmlUtils::ToOString(rStrm.getNamespaceURL(OOX_NS(xls))).getStr(),
FSNS(XML_xmlns, XML_r), XclXmlUtils::ToOString(rStrm.getNamespaceURL(OOX_NS(officeRel))).getStr(),
XML_guid, lcl_GuidToOString(maGUID).getStr(),
XML_lastGuid, nullptr, // OOXTODO
XML_shared, nullptr, // OOXTODO
......@@ -470,8 +471,8 @@ void XclExpXmlChTrHeader::SaveXml( XclExpXmlStream& rStrm )
pRevLogStrm->write("<")->writeId(XML_revisions);
rStrm.WriteAttributes(
XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
FSNS(XML_xmlns, XML_r), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
XML_xmlns, XclXmlUtils::ToOString(rStrm.getNamespaceURL(OOX_NS(xls))).getStr(),
FSNS(XML_xmlns, XML_r), XclXmlUtils::ToOString(rStrm.getNamespaceURL(OOX_NS(officeRel))).getStr(),
FSEND);
pRevLogStrm->write(">");
......@@ -1645,8 +1646,8 @@ static void lcl_WriteUserNamesXml( XclExpXmlStream& rWorkbookStrm )
"application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml",
CREATE_OFFICEDOC_RELATION_TYPE("usernames"));
pUserNames->startElement( XML_users,
XML_xmlns, "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
FSNS( XML_xmlns, XML_r ), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
XML_xmlns, XclXmlUtils::ToOString(rWorkbookStrm.getNamespaceURL(OOX_NS(xls))).getStr(),
FSNS( XML_xmlns, XML_r ), XclXmlUtils::ToOString(rWorkbookStrm.getNamespaceURL(OOX_NS(officeRel))).getStr(),
XML_count, "0",
FSEND );
// OOXTODO: XML_userinfo elements for each user editing the file
......
......@@ -73,6 +73,7 @@
#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
#include <com/sun/star/chart2/XChartTypeContainer.hpp>
#include <oox/token/tokens.hxx>
#include <oox/token/namespaces.hxx>
#include <oox/export/shapes.hxx>
#include <oox/export/utils.hxx>
#include <oox/export/vmlexport.hxx>
......@@ -260,9 +261,9 @@ void SaveDrawingMLObjects( XclExpObjList& rList, XclExpXmlStream& rStrm, sal_Int
rStrm.PushStream( pDrawing );
pDrawing->startElement( FSNS( XML_xdr, XML_wsDr ),
FSNS( XML_xmlns, XML_xdr ), "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",
FSNS( XML_xmlns, XML_a ), "http://schemas.openxmlformats.org/drawingml/2006/main",
FSNS( XML_xmlns, XML_r ), "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
FSNS( XML_xmlns, XML_xdr ), XclXmlUtils::ToOString(rStrm.getNamespaceURL(OOX_NS(dmlSpreadDr))).getStr(),
FSNS( XML_xmlns, XML_a ), XclXmlUtils::ToOString(rStrm.getNamespaceURL(OOX_NS(dml))).getStr(),
FSNS( XML_xmlns, XML_r ), XclXmlUtils::ToOString(rStrm.getNamespaceURL(OOX_NS(officeRel))).getStr(),
FSEND );
for (it = aList.begin(), itEnd = aList.end(); it != itEnd; ++it)
......@@ -294,10 +295,10 @@ void SaveVmlObjects( XclExpObjList& rList, XclExpXmlStream& rStrm, sal_Int32& nV
rStrm.PushStream( pVmlDrawing );
pVmlDrawing->startElement( XML_xml,
FSNS( XML_xmlns, XML_v ), "urn:schemas-microsoft-com:vml",
FSNS( XML_xmlns, XML_o ), "urn:schemas-microsoft-com:office:office",
FSNS( XML_xmlns, XML_x ), "urn:schemas-microsoft-com:office:excel",
FSNS( XML_xmlns, XML_w10 ), "urn:schemas-microsoft-com:office:word",
FSNS( XML_xmlns, XML_v ), XclXmlUtils::ToOString(rStrm.getNamespaceURL(OOX_NS(vml))).getStr(),
FSNS( XML_xmlns, XML_o ), XclXmlUtils::ToOString(rStrm.getNamespaceURL(OOX_NS(vmlOffice))).getStr(),
FSNS( XML_xmlns, XML_x ), XclXmlUtils::ToOString(rStrm.getNamespaceURL(OOX_NS(vmlExcel))).getStr(),
FSNS( XML_xmlns, XML_w10 ), XclXmlUtils::ToOString(rStrm.getNamespaceURL(OOX_NS(vmlWord))).getStr(),
FSEND );
std::vector<XclObj*>::iterator pIter;
......
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