loplugin:oncevar in xmloff..xmlsecurity

Change-Id: I2353d3c73130ed9420e8d803a9a96a06549bb6bd
Reviewed-on: https://gerrit.libreoffice.org/30429
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2016-10-31 10:27:02 +02:00
parent aeeabc36fd
commit 1b36f23b51
33 changed files with 222 additions and 484 deletions

View File

@ -59,7 +59,6 @@ using ::com::sun::star::uno::Reference;
namespace namespace
{ {
const char aLabelPrefix[] = "label ";
const char aCategoriesRange[] = "categories"; const char aCategoriesRange[] = "categories";
typedef ::std::multimap< OUString, OUString > typedef ::std::multimap< OUString, OUString >
@ -109,7 +108,7 @@ void lcl_fillRangeMapping(
sal_Int32 nColOffset = ( rTable.bHasHeaderColumn ? 1 : 0 ); sal_Int32 nColOffset = ( rTable.bHasHeaderColumn ? 1 : 0 );
const OUString lcl_aCategoriesRange(aCategoriesRange); const OUString lcl_aCategoriesRange(aCategoriesRange);
const OUString lcl_aLabelPrefix(aLabelPrefix); const OUString lcl_aLabelPrefix("label ");
// Fill range mapping // Fill range mapping
const size_t nTableRowCount( rTable.aData.size()); const size_t nTableRowCount( rTable.aData.size());

View File

@ -103,7 +103,6 @@ using namespace ::com::sun::star::xml::sax;
using namespace ::com::sun::star::io; using namespace ::com::sun::star::io;
using namespace ::xmloff::token; using namespace ::xmloff::token;
sal_Char const sXML_1_1[] = "1.1";
sal_Char const sXML_1_2[] = "1.2"; sal_Char const sXML_1_2[] = "1.2";
#define XML_MODEL_SERVICE_WRITER "com.sun.star.text.TextDocument" #define XML_MODEL_SERVICE_WRITER "com.sun.star.text.TextDocument"
@ -1363,7 +1362,7 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass )
case SvtSaveOptions::ODFVER_LATEST: pVersion = sXML_1_2; break; case SvtSaveOptions::ODFVER_LATEST: pVersion = sXML_1_2; break;
case SvtSaveOptions::ODFVER_012_EXT_COMPAT: pVersion = sXML_1_2; break; case SvtSaveOptions::ODFVER_012_EXT_COMPAT: pVersion = sXML_1_2; break;
case SvtSaveOptions::ODFVER_012: pVersion = sXML_1_2; break; case SvtSaveOptions::ODFVER_012: pVersion = sXML_1_2; break;
case SvtSaveOptions::ODFVER_011: pVersion = sXML_1_1; break; case SvtSaveOptions::ODFVER_011: pVersion = "1.1"; break;
case SvtSaveOptions::ODFVER_010: break; case SvtSaveOptions::ODFVER_010: break;
default: default:

View File

@ -75,39 +75,6 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::document; using namespace ::com::sun::star::document;
using namespace ::xmloff::token; using namespace ::xmloff::token;
sal_Char const sXML_np_office[] = "_office";
sal_Char const sXML_np_office_ext[] = "_office_ooo";
sal_Char const sXML_np_ooo[] = "_ooo";
sal_Char const sXML_np_ooow[] = "_ooow";
sal_Char const sXML_np_oooc[] = "_oooc";
sal_Char const sXML_np_of[] = "_of";
sal_Char const sXML_np_style[] = "_style";
sal_Char const sXML_np_text[] = "_text";
sal_Char const sXML_np_table[] = "_table";
sal_Char const sXML_np_table_ext[] = "_table_ooo";
sal_Char const sXML_np_draw[] = "_draw";
sal_Char const sXML_np_draw_ext[] = "_draw_ooo";
sal_Char const sXML_np_dr3d[] = "_dr3d";
sal_Char const sXML_np_fo[] = "_fo";
sal_Char const sXML_np_xlink[] = "_xlink";
sal_Char const sXML_np_dc[] = "_dc";
sal_Char const sXML_np_dom[] = "_dom";
sal_Char const sXML_np_meta[] = "_meta";
sal_Char const sXML_np_number[] = "_number";
sal_Char const sXML_np_svg[] = "_svg";
sal_Char const sXML_np_chart[] = "_chart";
sal_Char const sXML_np_math[] = "_math";
sal_Char const sXML_np_form[] = "_form";
sal_Char const sXML_np_script[] = "_script";
sal_Char const sXML_np_config[] = "_config";
sal_Char const sXML_np_xforms[] = "_xforms";
sal_Char const sXML_np_formx[] = "_formx";
sal_Char const sXML_np_xsd[] = "_xsd";
sal_Char const sXML_np_xsi[] = "_xsi";
sal_Char const sXML_np_field[] = "_field";
sal_Char const sXML_np_xhtml[] = "_xhtml";
sal_Char const sXML_np_css3text[] = "_css3text";
class SvXMLImportEventListener : public cppu::WeakImplHelper< css::lang::XEventListener > class SvXMLImportEventListener : public cppu::WeakImplHelper< css::lang::XEventListener >
{ {
private: private:
@ -364,38 +331,38 @@ void SvXMLImport::InitCtor_()
{ {
// implicit "xml" namespace prefix // implicit "xml" namespace prefix
mpNamespaceMap->Add( GetXMLToken(XML_XML), GetXMLToken(XML_N_XML), XML_NAMESPACE_XML ); mpNamespaceMap->Add( GetXMLToken(XML_XML), GetXMLToken(XML_N_XML), XML_NAMESPACE_XML );
mpNamespaceMap->Add( sXML_np_office, GetXMLToken(XML_N_OFFICE), XML_NAMESPACE_OFFICE ); mpNamespaceMap->Add( "_office", GetXMLToken(XML_N_OFFICE), XML_NAMESPACE_OFFICE );
mpNamespaceMap->Add( sXML_np_office_ext, GetXMLToken(XML_N_OFFICE_EXT), XML_NAMESPACE_OFFICE_EXT ); mpNamespaceMap->Add( "_office_ooo", GetXMLToken(XML_N_OFFICE_EXT), XML_NAMESPACE_OFFICE_EXT );
mpNamespaceMap->Add( sXML_np_ooo, GetXMLToken(XML_N_OOO), XML_NAMESPACE_OOO ); mpNamespaceMap->Add( "_ooo", GetXMLToken(XML_N_OOO), XML_NAMESPACE_OOO );
mpNamespaceMap->Add( sXML_np_style, GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE ); mpNamespaceMap->Add( "_style", GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
mpNamespaceMap->Add( sXML_np_text, GetXMLToken(XML_N_TEXT), XML_NAMESPACE_TEXT ); mpNamespaceMap->Add( "_text", GetXMLToken(XML_N_TEXT), XML_NAMESPACE_TEXT );
mpNamespaceMap->Add( sXML_np_table, GetXMLToken(XML_N_TABLE), XML_NAMESPACE_TABLE ); mpNamespaceMap->Add( "_table", GetXMLToken(XML_N_TABLE), XML_NAMESPACE_TABLE );
mpNamespaceMap->Add( sXML_np_table_ext, GetXMLToken(XML_N_TABLE_EXT), XML_NAMESPACE_TABLE_EXT ); mpNamespaceMap->Add( "_table_ooo", GetXMLToken(XML_N_TABLE_EXT), XML_NAMESPACE_TABLE_EXT );
mpNamespaceMap->Add( sXML_np_draw, GetXMLToken(XML_N_DRAW), XML_NAMESPACE_DRAW ); mpNamespaceMap->Add( "_draw", GetXMLToken(XML_N_DRAW), XML_NAMESPACE_DRAW );
mpNamespaceMap->Add( sXML_np_draw_ext, GetXMLToken(XML_N_DRAW_EXT), XML_NAMESPACE_DRAW_EXT ); mpNamespaceMap->Add( "_draw_ooo", GetXMLToken(XML_N_DRAW_EXT), XML_NAMESPACE_DRAW_EXT );
mpNamespaceMap->Add( sXML_np_dr3d, GetXMLToken(XML_N_DR3D), XML_NAMESPACE_DR3D ); mpNamespaceMap->Add( "_dr3d", GetXMLToken(XML_N_DR3D), XML_NAMESPACE_DR3D );
mpNamespaceMap->Add( sXML_np_fo, GetXMLToken(XML_N_FO_COMPAT), XML_NAMESPACE_FO ); mpNamespaceMap->Add( "_fo", GetXMLToken(XML_N_FO_COMPAT), XML_NAMESPACE_FO );
mpNamespaceMap->Add( sXML_np_xlink, GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK ); mpNamespaceMap->Add( "_xlink", GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK );
mpNamespaceMap->Add( sXML_np_dc, GetXMLToken(XML_N_DC), XML_NAMESPACE_DC ); mpNamespaceMap->Add( "_dc", GetXMLToken(XML_N_DC), XML_NAMESPACE_DC );
mpNamespaceMap->Add( sXML_np_dom, GetXMLToken(XML_N_DOM), XML_NAMESPACE_DOM ); mpNamespaceMap->Add( "_dom", GetXMLToken(XML_N_DOM), XML_NAMESPACE_DOM );
mpNamespaceMap->Add( sXML_np_meta, GetXMLToken(XML_N_META), XML_NAMESPACE_META ); mpNamespaceMap->Add( "_meta", GetXMLToken(XML_N_META), XML_NAMESPACE_META );
mpNamespaceMap->Add( sXML_np_number, GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER ); mpNamespaceMap->Add( "_number", GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER );
mpNamespaceMap->Add( sXML_np_svg, GetXMLToken(XML_N_SVG_COMPAT), XML_NAMESPACE_SVG ); mpNamespaceMap->Add( "_svg", GetXMLToken(XML_N_SVG_COMPAT), XML_NAMESPACE_SVG );
mpNamespaceMap->Add( sXML_np_chart, GetXMLToken(XML_N_CHART), XML_NAMESPACE_CHART ); mpNamespaceMap->Add( "_chart", GetXMLToken(XML_N_CHART), XML_NAMESPACE_CHART );
mpNamespaceMap->Add( sXML_np_math, GetXMLToken(XML_N_MATH), XML_NAMESPACE_MATH ); mpNamespaceMap->Add( "_math", GetXMLToken(XML_N_MATH), XML_NAMESPACE_MATH );
mpNamespaceMap->Add(sXML_np_form, GetXMLToken(XML_N_FORM), XML_NAMESPACE_FORM ); mpNamespaceMap->Add( "_form", GetXMLToken(XML_N_FORM), XML_NAMESPACE_FORM );
mpNamespaceMap->Add( sXML_np_script, GetXMLToken(XML_N_SCRIPT), XML_NAMESPACE_SCRIPT ); mpNamespaceMap->Add( "_script", GetXMLToken(XML_N_SCRIPT), XML_NAMESPACE_SCRIPT );
mpNamespaceMap->Add( sXML_np_config, GetXMLToken(XML_N_CONFIG), XML_NAMESPACE_CONFIG ); mpNamespaceMap->Add( "_config", GetXMLToken(XML_N_CONFIG), XML_NAMESPACE_CONFIG );
mpNamespaceMap->Add( sXML_np_xforms, GetXMLToken(XML_N_XFORMS_1_0), XML_NAMESPACE_XFORMS ); mpNamespaceMap->Add( "_xforms", GetXMLToken(XML_N_XFORMS_1_0), XML_NAMESPACE_XFORMS );
mpNamespaceMap->Add( sXML_np_formx, GetXMLToken( XML_N_FORMX ), XML_NAMESPACE_FORMX ); mpNamespaceMap->Add( "_formx", GetXMLToken( XML_N_FORMX ), XML_NAMESPACE_FORMX );
mpNamespaceMap->Add( sXML_np_xsd, GetXMLToken(XML_N_XSD), XML_NAMESPACE_XSD ); mpNamespaceMap->Add( "_xsd", GetXMLToken(XML_N_XSD), XML_NAMESPACE_XSD );
mpNamespaceMap->Add( sXML_np_xsi, GetXMLToken(XML_N_XSI), XML_NAMESPACE_XFORMS ); mpNamespaceMap->Add( "_xsi", GetXMLToken(XML_N_XSI), XML_NAMESPACE_XFORMS );
mpNamespaceMap->Add( sXML_np_ooow, GetXMLToken(XML_N_OOOW), XML_NAMESPACE_OOOW ); mpNamespaceMap->Add( "_ooow", GetXMLToken(XML_N_OOOW), XML_NAMESPACE_OOOW );
mpNamespaceMap->Add( sXML_np_oooc, GetXMLToken(XML_N_OOOC), XML_NAMESPACE_OOOC ); mpNamespaceMap->Add( "_oooc", GetXMLToken(XML_N_OOOC), XML_NAMESPACE_OOOC );
mpNamespaceMap->Add( sXML_np_field, GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD ); mpNamespaceMap->Add( "_field", GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
mpNamespaceMap->Add( sXML_np_of, GetXMLToken(XML_N_OF), XML_NAMESPACE_OF ); mpNamespaceMap->Add( "_of", GetXMLToken(XML_N_OF), XML_NAMESPACE_OF );
mpNamespaceMap->Add( sXML_np_xhtml, GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML ); mpNamespaceMap->Add( "_xhtml", GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML );
mpNamespaceMap->Add( sXML_np_css3text, GetXMLToken(XML_N_CSS3TEXT), XML_NAMESPACE_CSS3TEXT ); mpNamespaceMap->Add( "_css3text", GetXMLToken(XML_N_CSS3TEXT), XML_NAMESPACE_CSS3TEXT );
mpNamespaceMap->Add( "_calc_libo", GetXMLToken(XML_N_CALC_EXT), XML_NAMESPACE_CALC_EXT); mpNamespaceMap->Add( "_calc_libo", GetXMLToken(XML_N_CALC_EXT), XML_NAMESPACE_CALC_EXT);
mpNamespaceMap->Add( "_office_libo", mpNamespaceMap->Add( "_office_libo",

View File

@ -152,8 +152,6 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons
, meDirection(ED_none), mnStartScale(100), meSpeed(AnimationSpeed_MEDIUM) , meDirection(ED_none), mnStartScale(100), meSpeed(AnimationSpeed_MEDIUM)
, mnVerb(0), mbPlayFull(false) , mnVerb(0), mbPlayFull(false)
{ {
static const char sXMLClickName[] = "click";
if( nPrfx == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_EVENT_LISTENER ) ) if( nPrfx == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_EVENT_LISTENER ) )
{ {
mbValid = true; mbValid = true;
@ -223,7 +221,7 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons
sEventName = sValue; sEventName = sValue;
sal_uInt16 nScriptPrefix = sal_uInt16 nScriptPrefix =
GetImport().GetNamespaceMap().GetKeyByAttrName( sValue, &sEventName ); GetImport().GetNamespaceMap().GetKeyByAttrName( sValue, &sEventName );
mbValid = XML_NAMESPACE_DOM == nScriptPrefix && sEventName == sXMLClickName; mbValid = XML_NAMESPACE_DOM == nScriptPrefix && sEventName == "click";
} }
else if( IsXMLToken( aAttrLocalName, XML_LANGUAGE ) ) else if( IsXMLToken( aAttrLocalName, XML_LANGUAGE ) )
{ {

View File

@ -1553,13 +1553,11 @@ namespace xmloff
const Reference< XAttributeList >& _rxAttrList) const Reference< XAttributeList >& _rxAttrList)
{ {
// is it the "option" sub tag of a listbox ? // is it the "option" sub tag of a listbox ?
static const char s_sOptionElementName[] = "option"; if (_rLocalName == "option")
if (s_sOptionElementName == _rLocalName)
return new OListOptionImport(GetImport(), _nPrefix, _rLocalName, this); return new OListOptionImport(GetImport(), _nPrefix, _rLocalName, this);
// is it the "item" sub tag of a combobox ? // is it the "item" sub tag of a combobox ?
static const char s_sItemElementName[] = "item"; if (_rLocalName == "item")
if (s_sItemElementName == _rLocalName)
return new OComboItemImport(GetImport(), _nPrefix, _rLocalName, this); return new OComboItemImport(GetImport(), _nPrefix, _rLocalName, this);
// everything else // everything else

View File

@ -474,8 +474,7 @@ namespace xmloff
OUString lcl_findFreeControlId( const MapPropertySet2Map& _rAllPagesControlIds ) OUString lcl_findFreeControlId( const MapPropertySet2Map& _rAllPagesControlIds )
{ {
static const char sControlIdBase[] = "control"; OUString sControlId = "control";
OUString sControlId = sControlIdBase;
size_t nKnownControlCount = ::std::accumulate( _rAllPagesControlIds.begin(), _rAllPagesControlIds.end(), (size_t)0, AccumulateSize() ); size_t nKnownControlCount = ::std::accumulate( _rAllPagesControlIds.begin(), _rAllPagesControlIds.end(), (size_t)0, AccumulateSize() );
sControlId += OUString::number( (sal_Int32)nKnownControlCount + 1 ); sControlId += OUString::number( (sal_Int32)nKnownControlCount + 1 );

View File

@ -506,7 +506,6 @@ void OFormLayerXMLImport_Impl::documentDone( )
&& FormCellBindingHelper::isCellBindingAllowed( rImport.GetModel() ) && FormCellBindingHelper::isCellBindingAllowed( rImport.GetModel() )
) )
{ {
static const char s_sIndex[] = ":index";
::std::vector< ModelStringPair >::const_iterator aEnd = m_aCellValueBindings.end(); ::std::vector< ModelStringPair >::const_iterator aEnd = m_aCellValueBindings.end();
for ( ::std::vector< ModelStringPair >::const_iterator aCellBindings = m_aCellValueBindings.begin(); for ( ::std::vector< ModelStringPair >::const_iterator aCellBindings = m_aCellValueBindings.begin();
aCellBindings != aEnd; aCellBindings != aEnd;
@ -522,7 +521,7 @@ void OFormLayerXMLImport_Impl::documentDone( )
// There are special bindings for listboxes. See // There are special bindings for listboxes. See
// OListAndComboImport::doRegisterCellValueBinding for a comment on this HACK. // OListAndComboImport::doRegisterCellValueBinding for a comment on this HACK.
OUString sBoundCellAddress( aCellBindings->second ); OUString sBoundCellAddress( aCellBindings->second );
sal_Int32 nIndicator = sBoundCellAddress.lastIndexOf( s_sIndex ); sal_Int32 nIndicator = sBoundCellAddress.lastIndexOf( ":index" );
bool bUseIndexBinding = false; bool bUseIndexBinding = false;
if ( nIndicator != -1 ) if ( nIndicator != -1 )

View File

@ -45,9 +45,6 @@ using namespace ::com::sun::star::xml::sax;
using namespace ::xmloff::token; using namespace ::xmloff::token;
const sal_Char sAPI_service_footnote[] = "com.sun.star.text.Footnote";
const sal_Char sAPI_service_endnote[] = "com.sun.star.text.Endnote";
enum XMLFootnoteChildToken { enum XMLFootnoteChildToken {
XML_TOK_FTN_NOTE_CITATION, XML_TOK_FTN_NOTE_CITATION,
XML_TOK_FTN_NOTE_BODY XML_TOK_FTN_NOTE_BODY
@ -103,8 +100,8 @@ void XMLFootnoteImportContext::StartElement(
Reference<XInterface> xIfc = xFactory->createInstance( Reference<XInterface> xIfc = xFactory->createInstance(
bIsEndnote ? bIsEndnote ?
OUString(sAPI_service_endnote) : OUString("com.sun.star.text.Endnote") :
OUString(sAPI_service_footnote) ); OUString("com.sun.star.text.Footnote") );
// attach footnote to document // attach footnote to document
Reference<XTextContent> xTextContent(xIfc, UNO_QUERY); Reference<XTextContent> xTextContent(xIfc, UNO_QUERY);

View File

@ -46,35 +46,23 @@ using ::xmloff::token::IsXMLToken;
using ::xmloff::token::XML_ALPHABETICAL_INDEX_ENTRY_TEMPLATE; using ::xmloff::token::XML_ALPHABETICAL_INDEX_ENTRY_TEMPLATE;
using ::xmloff::token::XML_OUTLINE_LEVEL; using ::xmloff::token::XML_OUTLINE_LEVEL;
const sal_Char sAPI_MainEntryCharacterStyleName[] = "MainEntryCharacterStyleName";
const sal_Char sAPI_UseAlphabeticalSeparators[] = "UseAlphabeticalSeparators";
const sal_Char sAPI_UseCombinedEntries[] = "UseCombinedEntries";
const sal_Char sAPI_IsCaseSensitive[] = "IsCaseSensitive";
const sal_Char sAPI_UseKeyAsEntry[] = "UseKeyAsEntry";
const sal_Char sAPI_UseUpperCase[] = "UseUpperCase";
const sal_Char sAPI_UseDash[] = "UseDash";
const sal_Char sAPI_UsePP[] = "UsePP";
const sal_Char sAPI_SortAlgorithm[] = "SortAlgorithm";
const sal_Char sAPI_Locale[] = "Locale";
XMLIndexAlphabeticalSourceContext::XMLIndexAlphabeticalSourceContext( XMLIndexAlphabeticalSourceContext::XMLIndexAlphabeticalSourceContext(
SvXMLImport& rImport, SvXMLImport& rImport,
sal_uInt16 nPrfx, sal_uInt16 nPrfx,
const OUString& rLocalName, const OUString& rLocalName,
Reference<XPropertySet> & rPropSet) Reference<XPropertySet> & rPropSet)
: XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName, rPropSet, false) : XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName, rPropSet, false)
, sMainEntryCharacterStyleName(sAPI_MainEntryCharacterStyleName) , sMainEntryCharacterStyleName("MainEntryCharacterStyleName")
, sUseAlphabeticalSeparators(sAPI_UseAlphabeticalSeparators) , sUseAlphabeticalSeparators("UseAlphabeticalSeparators")
, sUseCombinedEntries(sAPI_UseCombinedEntries) , sUseCombinedEntries("UseCombinedEntries")
, sIsCaseSensitive(sAPI_IsCaseSensitive) , sIsCaseSensitive("IsCaseSensitive")
, sUseKeyAsEntry(sAPI_UseKeyAsEntry) , sUseKeyAsEntry("UseKeyAsEntry")
, sUseUpperCase(sAPI_UseUpperCase) , sUseUpperCase("UseUpperCase")
, sUseDash(sAPI_UseDash) , sUseDash("UseDash")
, sUsePP(sAPI_UsePP) , sUsePP("UsePP")
, sIsCommaSeparated("IsCommaSeparated") , sIsCommaSeparated("IsCommaSeparated")
, sSortAlgorithm(sAPI_SortAlgorithm) , sSortAlgorithm("SortAlgorithm")
, sLocale(sAPI_Locale) , sLocale("Locale")
, bMainEntryStyleNameOK(false) , bMainEntryStyleNameOK(false)
, bSeparators(false) , bSeparators(false)
, bCombineEntries(true) , bCombineEntries(true)

View File

@ -40,9 +40,6 @@ using ::com::sun::star::beans::PropertyValue;
using ::com::sun::star::beans::XPropertySet; using ::com::sun::star::beans::XPropertySet;
using ::com::sun::star::lang::XMultiServiceFactory; using ::com::sun::star::lang::XMultiServiceFactory;
const sal_Char sAPI_FieldMaster_Bibliography[] =
"com.sun.star.text.FieldMaster.Bibliography";
XMLIndexBibliographyConfigurationContext::XMLIndexBibliographyConfigurationContext( XMLIndexBibliographyConfigurationContext::XMLIndexBibliographyConfigurationContext(
SvXMLImport& rImport, SvXMLImport& rImport,
@ -50,8 +47,7 @@ XMLIndexBibliographyConfigurationContext::XMLIndexBibliographyConfigurationConte
const OUString& rLocalName, const OUString& rLocalName,
const Reference<XAttributeList> & xAttrList) : const Reference<XAttributeList> & xAttrList) :
SvXMLStyleContext(rImport, nPrfx, rLocalName, xAttrList, XML_STYLE_FAMILY_TEXT_BIBLIOGRAPHYCONFIG), SvXMLStyleContext(rImport, nPrfx, rLocalName, xAttrList, XML_STYLE_FAMILY_TEXT_BIBLIOGRAPHYCONFIG),
sFieldMaster_Bibliography( sFieldMaster_Bibliography("com.sun.star.text.FieldMaster.Bibliography"),
sAPI_FieldMaster_Bibliography),
sBracketBefore("BracketBefore"), sBracketBefore("BracketBefore"),
sBracketAfter("BracketAfter"), sBracketAfter("BracketAfter"),
sIsNumberEntries("IsNumberEntries"), sIsNumberEntries("IsNumberEntries"),

View File

@ -244,11 +244,9 @@ void XMLIndexMarkExport::GetID(
OUStringBuffer& sBuf, OUStringBuffer& sBuf,
const Reference<XPropertySet> & rPropSet) const Reference<XPropertySet> & rPropSet)
{ {
static const sal_Char sPrefix[] = "IMark";
// HACK: use address of object to form identifier // HACK: use address of object to form identifier
sal_Int64 nId = sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(rPropSet.get())); sal_Int64 nId = sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(rPropSet.get()));
sBuf.append(sPrefix); sBuf.append("IMark");
sBuf.append(nId); sBuf.append(nId);
} }

View File

@ -46,12 +46,6 @@ using ::xmloff::token::IsXMLToken;
using ::xmloff::token::XML_OBJECT_INDEX_ENTRY_TEMPLATE; using ::xmloff::token::XML_OBJECT_INDEX_ENTRY_TEMPLATE;
using ::xmloff::token::XML_TOKEN_INVALID; using ::xmloff::token::XML_TOKEN_INVALID;
const sal_Char sAPI_CreateFromStarCalc[] = "CreateFromStarCalc";
const sal_Char sAPI_CreateFromStarChart[] = "CreateFromStarChart";
const sal_Char sAPI_CreateFromStarDraw[] = "CreateFromStarDraw";
const sal_Char sAPI_CreateFromStarMath[] = "CreateFromStarMath";
const sal_Char sAPI_CreateFromOtherEmbeddedObjects[] = "CreateFromOtherEmbeddedObjects";
XMLIndexObjectSourceContext::XMLIndexObjectSourceContext( XMLIndexObjectSourceContext::XMLIndexObjectSourceContext(
SvXMLImport& rImport, SvXMLImport& rImport,
@ -60,11 +54,11 @@ XMLIndexObjectSourceContext::XMLIndexObjectSourceContext(
Reference<XPropertySet> & rPropSet) : Reference<XPropertySet> & rPropSet) :
XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName, XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName,
rPropSet, false), rPropSet, false),
sCreateFromStarCalc(sAPI_CreateFromStarCalc), sCreateFromStarCalc("CreateFromStarCalc"),
sCreateFromStarChart(sAPI_CreateFromStarChart), sCreateFromStarChart("CreateFromStarChart"),
sCreateFromStarDraw(sAPI_CreateFromStarDraw), sCreateFromStarDraw("CreateFromStarDraw"),
sCreateFromStarMath(sAPI_CreateFromStarMath), sCreateFromStarMath("CreateFromStarMath"),
sCreateFromOtherEmbeddedObjects(sAPI_CreateFromOtherEmbeddedObjects), sCreateFromOtherEmbeddedObjects("CreateFromOtherEmbeddedObjects"),
bUseCalc(false), bUseCalc(false),
bUseChart(false), bUseChart(false),
bUseDraw(false), bUseDraw(false),

View File

@ -40,9 +40,6 @@ using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Any;
using ::com::sun::star::xml::sax::XAttributeList; using ::com::sun::star::xml::sax::XAttributeList;
const sal_Char sAPI_CreateFromChapter[] = "CreateFromChapter";
const sal_Char sAPI_IsRelativeTabstops[] = "IsRelativeTabstops";
static const SvXMLTokenMapEntry aIndexSourceTokenMap[] = static const SvXMLTokenMapEntry aIndexSourceTokenMap[] =
{ {
{ XML_NAMESPACE_TEXT, { XML_NAMESPACE_TEXT,
@ -151,8 +148,8 @@ XMLIndexSourceBaseContext::XMLIndexSourceBaseContext(
Reference<XPropertySet> & rPropSet, Reference<XPropertySet> & rPropSet,
bool bLevelFormats) bool bLevelFormats)
: SvXMLImportContext(rImport, nPrfx, rLocalName) : SvXMLImportContext(rImport, nPrfx, rLocalName)
, sCreateFromChapter(sAPI_CreateFromChapter) , sCreateFromChapter("CreateFromChapter")
, sIsRelativeTabstops(sAPI_IsRelativeTabstops) , sIsRelativeTabstops("IsRelativeTabstops")
, bUseLevelFormats(bLevelFormats) , bUseLevelFormats(bLevelFormats)
, bChapterIndex(false) , bChapterIndex(false)
, bRelativeTabs(true) , bRelativeTabs(true)

View File

@ -40,22 +40,16 @@ using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Any;
using ::com::sun::star::xml::sax::XAttributeList; using ::com::sun::star::xml::sax::XAttributeList;
const sal_Char sAPI_CreateFromOutline[] = "CreateFromOutline";
const sal_Char sAPI_CreateFromMarks[] = "CreateFromMarks";
const sal_Char sAPI_Level[] = "Level";
const sal_Char sAPI_CreateFromLevelParagraphStyles[] = "CreateFromLevelParagraphStyles";
XMLIndexTOCSourceContext::XMLIndexTOCSourceContext( XMLIndexTOCSourceContext::XMLIndexTOCSourceContext(
SvXMLImport& rImport, SvXMLImport& rImport,
sal_uInt16 nPrfx, sal_uInt16 nPrfx,
const OUString& rLocalName, const OUString& rLocalName,
Reference<XPropertySet> & rPropSet) Reference<XPropertySet> & rPropSet)
: XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName, rPropSet, true) : XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName, rPropSet, true)
, sCreateFromMarks(sAPI_CreateFromMarks) , sCreateFromMarks("CreateFromMarks")
, sLevel(sAPI_Level) , sLevel("Level")
, sCreateFromOutline(sAPI_CreateFromOutline) , sCreateFromOutline("CreateFromOutline")
, sCreateFromLevelParagraphStyles(sAPI_CreateFromLevelParagraphStyles) , sCreateFromLevelParagraphStyles("CreateFromLevelParagraphStyles")
// use all chapters by default // use all chapters by default
, nOutlineLevel(rImport.GetTextImport()->GetChapterNumbering()->getCount()) , nOutlineLevel(rImport.GetTextImport()->GetChapterNumbering()->getCount())
, bUseOutline(true) , bUseOutline(true)

View File

@ -41,14 +41,12 @@ using ::com::sun::star::container::XIndexReplace;
using ::com::sun::star::xml::sax::XAttributeList; using ::com::sun::star::xml::sax::XAttributeList;
const sal_Char sAPI_LevelParagraphStyles[] = "LevelParagraphStyles";
XMLIndexTOCStylesContext::XMLIndexTOCStylesContext( XMLIndexTOCStylesContext::XMLIndexTOCStylesContext(
SvXMLImport& rImport, Reference<XPropertySet> & rPropSet, SvXMLImport& rImport, Reference<XPropertySet> & rPropSet,
sal_uInt16 nPrfx, const OUString& rLocalName) sal_uInt16 nPrfx, const OUString& rLocalName)
: SvXMLImportContext(rImport, nPrfx, rLocalName) : SvXMLImportContext(rImport, nPrfx, rLocalName)
, sLevelParagraphStyles(sAPI_LevelParagraphStyles) , sLevelParagraphStyles("LevelParagraphStyles")
, rTOCPropertySet(rPropSet) , rTOCPropertySet(rPropSet)
, nOutlineLevel(0) , nOutlineLevel(0)
{ {

View File

@ -47,19 +47,14 @@ using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any; using ::com::sun::star::uno::Any;
using ::com::sun::star::xml::sax::XAttributeList; using ::com::sun::star::xml::sax::XAttributeList;
const sal_Char sAPI_CreateFromLabels[] = "CreateFromLabels";
const sal_Char sAPI_LabelCategory[] = "LabelCategory";
const sal_Char sAPI_LabelDisplayType[] = "LabelDisplayType";
XMLIndexTableSourceContext::XMLIndexTableSourceContext( XMLIndexTableSourceContext::XMLIndexTableSourceContext(
SvXMLImport& rImport, sal_uInt16 nPrfx, SvXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLocalName, Reference<XPropertySet> & rPropSet) const OUString& rLocalName, Reference<XPropertySet> & rPropSet)
: XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName, : XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName,
rPropSet, false) rPropSet, false)
, sCreateFromLabels(sAPI_CreateFromLabels) , sCreateFromLabels("CreateFromLabels")
, sLabelCategory(sAPI_LabelCategory) , sLabelCategory("LabelCategory")
, sLabelDisplayType(sAPI_LabelDisplayType) , sLabelDisplayType("LabelDisplayType")
, nDisplayFormat(0) , nDisplayFormat(0)
, bSequenceOK(false) , bSequenceOK(false)
, bDisplayFormatOK(false) , bDisplayFormatOK(false)

View File

@ -47,18 +47,6 @@ using ::com::sun::star::uno::Any;
using ::com::sun::star::xml::sax::XAttributeList; using ::com::sun::star::xml::sax::XAttributeList;
using ::com::sun::star::container::XIndexReplace; using ::com::sun::star::container::XIndexReplace;
const sal_Char sAPI_TokenEntryNumber[] = "TokenEntryNumber";
const sal_Char sAPI_TokenEntryText[] = "TokenEntryText";
const sal_Char sAPI_TokenTabStop[] = "TokenTabStop";
const sal_Char sAPI_TokenText[] = "TokenText";
const sal_Char sAPI_TokenPageNumber[] = "TokenPageNumber";
const sal_Char sAPI_TokenChapterInfo[] = "TokenChapterInfo";
const sal_Char sAPI_TokenHyperlinkStart[] = "TokenHyperlinkStart";
const sal_Char sAPI_TokenHyperlinkEnd[] = "TokenHyperlinkEnd";
const sal_Char sAPI_TokenBibliographyDataField[] =
"TokenBibliographyDataField";
XMLIndexTemplateContext::XMLIndexTemplateContext( XMLIndexTemplateContext::XMLIndexTemplateContext(
SvXMLImport& rImport, SvXMLImport& rImport,
Reference<XPropertySet> & rPropSet, Reference<XPropertySet> & rPropSet,
@ -79,15 +67,15 @@ XMLIndexTemplateContext::XMLIndexTemplateContext(
, bOutlineLevelOK(false) , bOutlineLevelOK(false)
, bTOC( bT ) , bTOC( bT )
, rPropertySet(rPropSet) , rPropertySet(rPropSet)
, sTokenEntryNumber(sAPI_TokenEntryNumber) , sTokenEntryNumber("TokenEntryNumber")
, sTokenEntryText(sAPI_TokenEntryText) , sTokenEntryText("TokenEntryText")
, sTokenTabStop(sAPI_TokenTabStop) , sTokenTabStop("TokenTabStop")
, sTokenText(sAPI_TokenText) , sTokenText("TokenText")
, sTokenPageNumber(sAPI_TokenPageNumber) , sTokenPageNumber("TokenPageNumber")
, sTokenChapterInfo(sAPI_TokenChapterInfo) , sTokenChapterInfo("TokenChapterInfo")
, sTokenHyperlinkStart(sAPI_TokenHyperlinkStart) , sTokenHyperlinkStart("TokenHyperlinkStart")
, sTokenHyperlinkEnd(sAPI_TokenHyperlinkEnd) , sTokenHyperlinkEnd("TokenHyperlinkEnd")
, sTokenBibliographyDataField(sAPI_TokenBibliographyDataField) , sTokenBibliographyDataField("TokenBibliographyDataField")
, sCharacterStyleName("CharacterStyleName") , sCharacterStyleName("CharacterStyleName")
, sTokenType("TokenType") , sTokenType("TokenType")

View File

@ -41,17 +41,6 @@ using ::xmloff::token::IsXMLToken;
using ::xmloff::token::XML_USER_INDEX_ENTRY_TEMPLATE; using ::xmloff::token::XML_USER_INDEX_ENTRY_TEMPLATE;
using ::xmloff::token::XML_OUTLINE_LEVEL; using ::xmloff::token::XML_OUTLINE_LEVEL;
const sal_Char sAPI_CreateFromEmbeddedObjects[] = "CreateFromEmbeddedObjects";
const sal_Char sAPI_CreateFromGraphicObjects[] = "CreateFromGraphicObjects";
const sal_Char sAPI_CreateFromMarks[] = "CreateFromMarks";
const sal_Char sAPI_CreateFromTables[] = "CreateFromTables";
const sal_Char sAPI_CreateFromTextFrames[] = "CreateFromTextFrames";
const sal_Char sAPI_UseLevelFromSource[] = "UseLevelFromSource";
const sal_Char sAPI_CreateFromLevelParagraphStyles[] = "CreateFromLevelParagraphStyles";
const sal_Char sAPI_UserIndexName[] = "UserIndexName";
XMLIndexUserSourceContext::XMLIndexUserSourceContext( XMLIndexUserSourceContext::XMLIndexUserSourceContext(
SvXMLImport& rImport, SvXMLImport& rImport,
sal_uInt16 nPrfx, sal_uInt16 nPrfx,
@ -59,14 +48,14 @@ XMLIndexUserSourceContext::XMLIndexUserSourceContext(
Reference<XPropertySet> & rPropSet) : Reference<XPropertySet> & rPropSet) :
XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName, XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName,
rPropSet, true), rPropSet, true),
sCreateFromEmbeddedObjects(sAPI_CreateFromEmbeddedObjects), sCreateFromEmbeddedObjects("CreateFromEmbeddedObjects"),
sCreateFromGraphicObjects(sAPI_CreateFromGraphicObjects), sCreateFromGraphicObjects("CreateFromGraphicObjects"),
sCreateFromMarks(sAPI_CreateFromMarks), sCreateFromMarks("CreateFromMarks"),
sCreateFromTables(sAPI_CreateFromTables), sCreateFromTables("CreateFromTables"),
sCreateFromTextFrames(sAPI_CreateFromTextFrames), sCreateFromTextFrames("CreateFromTextFrames"),
sUseLevelFromSource(sAPI_UseLevelFromSource), sUseLevelFromSource("UseLevelFromSource"),
sCreateFromLevelParagraphStyles(sAPI_CreateFromLevelParagraphStyles), sCreateFromLevelParagraphStyles("CreateFromLevelParagraphStyles"),
sUserIndexName(sAPI_UserIndexName), sUserIndexName("UserIndexName"),
bUseObjects(false), bUseObjects(false),
bUseGraphic(false), bUseGraphic(false),
bUseMarks(false), bUseMarks(false),

View File

@ -179,11 +179,10 @@ XMLPropertyBackpatcher<sal_Int16>& XMLTextImportHelper::GetSequenceIdBP()
XMLPropertyBackpatcher<OUString>& XMLTextImportHelper::GetSequenceNameBP() XMLPropertyBackpatcher<OUString>& XMLTextImportHelper::GetSequenceNameBP()
{ {
static const char s_SourceName[] = "SourceName";
if (!m_xBackpatcherImpl->m_pSequenceNameBackpatcher.get()) if (!m_xBackpatcherImpl->m_pSequenceNameBackpatcher.get())
{ {
m_xBackpatcherImpl->m_pSequenceNameBackpatcher.reset( m_xBackpatcherImpl->m_pSequenceNameBackpatcher.reset(
new XMLPropertyBackpatcher<OUString>(s_SourceName)); new XMLPropertyBackpatcher<OUString>("SourceName"));
} }
return *m_xBackpatcherImpl->m_pSequenceNameBackpatcher; return *m_xBackpatcherImpl->m_pSequenceNameBackpatcher;
} }

View File

@ -1605,9 +1605,6 @@ void XMLSectionExport::ExportBoolean(
} }
} }
const sal_Char sAPI_FieldMaster_Bibliography[] =
"com.sun.star.text.FieldMaster.Bibliography";
void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport) void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
{ {
// first: get field master (via text field supplier) // first: get field master (via text field supplier)
@ -1615,7 +1612,7 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
UNO_QUERY ); UNO_QUERY );
if ( xTextFieldsSupp.is() ) if ( xTextFieldsSupp.is() )
{ {
const OUString sFieldMaster_Bibliography(sAPI_FieldMaster_Bibliography); const OUString sFieldMaster_Bibliography("com.sun.star.text.FieldMaster.Bibliography");
// get bibliography field master // get bibliography field master
Reference<XNameAccess> xMasters = Reference<XNameAccess> xMasters =

View File

@ -47,14 +47,6 @@ using namespace ::com::sun::star::text;
using namespace ::xmloff::token; using namespace ::xmloff::token;
const sal_Char sAPI_TextSection[] = "com.sun.star.text.TextSection";
const sal_Char sAPI_IndexHeaderSection[] = "com.sun.star.text.IndexHeaderSection";
const sal_Char sAPI_IsProtected[] = "IsProtected";
const sal_Char sAPI_Condition[] = "Condition";
const sal_Char sAPI_IsVisible[] = "IsVisible";
const sal_Char sAPI_IsCurrentlyVisible[] = "IsCurrentlyVisible";
const sal_Char sAPI_ProtectionKey[] = "ProtectionKey";
enum XMLSectionToken enum XMLSectionToken
{ {
XML_TOK_SECTION_XMLID, XML_TOK_SECTION_XMLID,
@ -93,13 +85,13 @@ XMLSectionImportContext::XMLSectionImportContext(
sal_uInt16 nPrfx, sal_uInt16 nPrfx,
const OUString& rLocalName ) const OUString& rLocalName )
: SvXMLImportContext(rImport, nPrfx, rLocalName) : SvXMLImportContext(rImport, nPrfx, rLocalName)
, sTextSection(sAPI_TextSection) , sTextSection("com.sun.star.text.TextSection")
, sIndexHeaderSection(sAPI_IndexHeaderSection) , sIndexHeaderSection("com.sun.star.text.IndexHeaderSection")
, sCondition(sAPI_Condition) , sCondition("Condition")
, sIsVisible(sAPI_IsVisible) , sIsVisible("IsVisible")
, sProtectionKey(sAPI_ProtectionKey) , sProtectionKey("ProtectionKey")
, sIsProtected(sAPI_IsProtected) , sIsProtected("IsProtected")
, sIsCurrentlyVisible(sAPI_IsCurrentlyVisible) , sIsCurrentlyVisible("IsCurrentlyVisible")
, bProtect(false) , bProtect(false)
, bCondOK(false) , bCondOK(false)
, bIsVisible(true) , bIsVisible(true)
@ -199,11 +191,10 @@ void XMLSectionImportContext::StartElement(
Reference<XTextRange> xStart = Reference<XTextRange> xStart =
rHelper->GetCursor()->getStart(); rHelper->GetCursor()->getStart();
#ifndef DBG_UTIL #ifndef DBG_UTIL
static const sal_Char sMarker[] = " "; OUString sMarkerString(" ");
#else #else
static const sal_Char sMarker[] = "X"; OUString sMarkerString("X");
#endif #endif
OUString sMarkerString(sMarker);
rHelper->InsertString(sMarkerString); rHelper->InsertString(sMarkerString);
rHelper->InsertControlCharacter( rHelper->InsertControlCharacter(
ControlCharacter::APPEND_PARAGRAPH ); ControlCharacter::APPEND_PARAGRAPH );

View File

@ -41,12 +41,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::text; using namespace ::com::sun::star::text;
using namespace ::xmloff::token; using namespace ::xmloff::token;
const sal_Char sAPI_DDECommandFile[] = "DDECommandFile";
const sal_Char sAPI_DDECommandType[] = "DDECommandType";
const sal_Char sAPI_DDECommandElement[] = "DDECommandElement";
const sal_Char sAPI_IsAutomaticUpdate[] = "IsAutomaticUpdate";
XMLSectionSourceDDEImportContext::XMLSectionSourceDDEImportContext( XMLSectionSourceDDEImportContext::XMLSectionSourceDDEImportContext(
SvXMLImport& rImport, SvXMLImport& rImport,
sal_uInt16 nPrfx, sal_uInt16 nPrfx,
@ -54,10 +48,10 @@ XMLSectionSourceDDEImportContext::XMLSectionSourceDDEImportContext(
Reference<XPropertySet> & rSectPropSet) : Reference<XPropertySet> & rSectPropSet) :
SvXMLImportContext(rImport, nPrfx, rLocalName), SvXMLImportContext(rImport, nPrfx, rLocalName),
rSectionPropertySet(rSectPropSet), rSectionPropertySet(rSectPropSet),
sDdeCommandFile(sAPI_DDECommandFile), sDdeCommandFile("DDECommandFile"),
sDdeCommandType(sAPI_DDECommandType), sDdeCommandType("DDECommandType"),
sDdeCommandElement(sAPI_DDECommandElement), sDdeCommandElement("DDECommandElement"),
sIsAutomaticUpdate(sAPI_IsAutomaticUpdate) sIsAutomaticUpdate("IsAutomaticUpdate")
{ {
} }

View File

@ -49,7 +49,6 @@ XMLTextListItemContext::XMLTextListItemContext(
mnSubListCount( 0 ), mnSubListCount( 0 ),
mxNumRulesOverride() mxNumRulesOverride()
{ {
static const char s_NumberingRules[] = "NumberingRules";
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for( sal_Int16 i=0; i < nAttrCount; i++ ) for( sal_Int16 i=0; i < nAttrCount; i++ )
{ {
@ -85,7 +84,7 @@ XMLTextListItemContext::XMLTextListItemContext(
aAny >>= xStyle; aAny >>= xStyle;
uno::Reference< beans::XPropertySet > xPropSet( xStyle, UNO_QUERY ); uno::Reference< beans::XPropertySet > xPropSet( xStyle, UNO_QUERY );
aAny = xPropSet->getPropertyValue(s_NumberingRules); aAny = xPropSet->getPropertyValue("NumberingRules");
aAny >>= mxNumRulesOverride; aAny >>= mxNumRulesOverride;
} }
else else

View File

@ -128,16 +128,14 @@ static SvXMLEnumMapEntry const lcl_aMarkTypeMap[] =
static const char *lcl_getFormFieldmarkName(OUString &name) static const char *lcl_getFormFieldmarkName(OUString &name)
{ {
static const char sCheckbox[]=ODF_FORMCHECKBOX;
static const char sFormDropDown[]=ODF_FORMDROPDOWN;
if (name == "msoffice.field.FORMCHECKBOX" || if (name == "msoffice.field.FORMCHECKBOX" ||
name == "ecma.office-open-xml.field.FORMCHECKBOX") name == "ecma.office-open-xml.field.FORMCHECKBOX")
return sCheckbox; return ODF_FORMCHECKBOX;
else if (name == ODF_FORMCHECKBOX) else if (name == ODF_FORMCHECKBOX)
return sCheckbox; return ODF_FORMCHECKBOX;
if (name == ODF_FORMDROPDOWN || else if (name == ODF_FORMDROPDOWN ||
name == "ecma.office-open-xml.field.FORMDROPDOWN") name == "ecma.office-open-xml.field.FORMDROPDOWN")
return sFormDropDown; return ODF_FORMDROPDOWN;
else else
return nullptr; return nullptr;
} }
@ -179,10 +177,7 @@ void XMLTextMarkImportContext::EndElement()
{ {
SvXMLImportContext::EndElement(); SvXMLImportContext::EndElement();
static const char sAPI_reference_mark[] = "com.sun.star.text.ReferenceMark";
static const char sAPI_bookmark[] = "com.sun.star.text.Bookmark"; static const char sAPI_bookmark[] = "com.sun.star.text.Bookmark";
static const char sAPI_fieldmark[] = "com.sun.star.text.Fieldmark";
static const char sAPI_formfieldmark[] = "com.sun.star.text.FormFieldmark";
if (!m_sBookmarkName.isEmpty()) if (!m_sBookmarkName.isEmpty())
{ {
@ -195,7 +190,7 @@ void XMLTextMarkImportContext::EndElement()
case TypeReference: case TypeReference:
// export point reference mark // export point reference mark
CreateAndInsertMark(GetImport(), CreateAndInsertMark(GetImport(),
sAPI_reference_mark, "com.sun.star.text.ReferenceMark",
m_sBookmarkName, m_sBookmarkName,
m_rHelper.GetCursorAsRange()->getStart()); m_rHelper.GetCursorAsRange()->getStart());
break; break;
@ -223,7 +218,7 @@ void XMLTextMarkImportContext::EndElement()
// export point bookmark // export point bookmark
const Reference<XInterface> xContent( const Reference<XInterface> xContent(
CreateAndInsertMark(GetImport(), CreateAndInsertMark(GetImport(),
(bImportAsField ? OUString(sAPI_formfieldmark) : OUString(sAPI_bookmark)), (bImportAsField ? OUString("com.sun.star.text.FormFieldmark") : OUString(sAPI_bookmark)),
m_sBookmarkName, m_sBookmarkName,
m_rHelper.GetCursorAsRange()->getStart(), m_rHelper.GetCursorAsRange()->getStart(),
m_sXmlId) ); m_sXmlId) );
@ -341,7 +336,7 @@ void XMLTextMarkImportContext::EndElement()
// insert reference // insert reference
xContent = CreateAndInsertMark(GetImport(), xContent = CreateAndInsertMark(GetImport(),
(bImportAsField (bImportAsField
? OUString(sAPI_fieldmark) ? OUString("com.sun.star.text.Fieldmark")
: OUString(sAPI_bookmark)), : OUString(sAPI_bookmark)),
m_sBookmarkName, m_sBookmarkName,
xInsertionCursor, xInsertionCursor,

View File

@ -86,107 +86,33 @@ const sal_Char sAPI_textfield_prefix[] = "com.sun.star.text.TextField.";
const sal_Char sAPI_fieldmaster_prefix[] = "com.sun.star.text.FieldMaster."; const sal_Char sAPI_fieldmaster_prefix[] = "com.sun.star.text.FieldMaster.";
const sal_Char sAPI_presentation_prefix[] = "com.sun.star.presentation.TextField."; const sal_Char sAPI_presentation_prefix[] = "com.sun.star.presentation.TextField.";
const sal_Char sAPI_extended_user[] = "ExtendedUser";
const sal_Char sAPI_user_data_type[] = "UserDataType";
const sal_Char sAPI_jump_edit[] = "JumpEdit";
const sal_Char sAPI_date_time[] = "DateTime"; const sal_Char sAPI_date_time[] = "DateTime";
const sal_Char sAPI_page_number[] = "PageNumber"; const sal_Char sAPI_page_number[] = "PageNumber";
const sal_Char sAPI_database_next[] = "DatabaseNextSet";
const sal_Char sAPI_database_select[] = "DatabaseNumberOfSet";
const sal_Char sAPI_database_number[] = "DatabaseSetNumber";
const sal_Char sAPI_database_name[] = "DatabaseName";
const sal_Char sAPI_docinfo_change_author[] = "DocInfo.ChangeAuthor";
const sal_Char sAPI_docinfo_change_date_time[] = "DocInfo.ChangeDateTime"; const sal_Char sAPI_docinfo_change_date_time[] = "DocInfo.ChangeDateTime";
const sal_Char sAPI_docinfo_edit_time[] = "DocInfo.EditTime";
const sal_Char sAPI_docinfo_description[] = "DocInfo.Description";
const sal_Char sAPI_docinfo_create_author[] = "DocInfo.CreateAuthor";
const sal_Char sAPI_docinfo_create_date_time[] = "DocInfo.CreateDateTime"; const sal_Char sAPI_docinfo_create_date_time[] = "DocInfo.CreateDateTime";
const sal_Char sAPI_docinfo_custom[] = "DocInfo.Custom"; const sal_Char sAPI_docinfo_custom[] = "DocInfo.Custom";
const sal_Char sAPI_docinfo_print_author[] = "DocInfo.PrintAuthor";
const sal_Char sAPI_docinfo_print_date_time[] = "DocInfo.PrintDateTime"; const sal_Char sAPI_docinfo_print_date_time[] = "DocInfo.PrintDateTime";
const sal_Char sAPI_docinfo_keywords[] = "DocInfo.KeyWords";
const sal_Char sAPI_docinfo_subject[] = "DocInfo.Subject";
const sal_Char sAPI_docinfo_title[] = "DocInfo.Title";
const sal_Char sAPI_docinfo_revision[] = "DocInfo.Revision";
const sal_Char sAPI_hidden_paragraph[] = "HiddenParagraph";
const sal_Char sAPI_hidden_text[] = "HiddenText";
const sal_Char sAPI_conditional_text[] = "ConditionalText";
const sal_Char sAPI_file_name[] = "FileName";
const sal_Char sAPI_chapter[] = "Chapter";
const sal_Char sAPI_template_name[] = "TemplateName";
const sal_Char sAPI_page_count[] = "PageCount";
const sal_Char sAPI_paragraph_count[] = "ParagraphCount";
const sal_Char sAPI_word_count[] = "WordCount";
const sal_Char sAPI_character_count[] = "CharacterCount";
const sal_Char sAPI_table_count[] = "TableCount";
const sal_Char sAPI_graphic_object_count[] = "GraphicObjectCount";
const sal_Char sAPI_embedded_object_count[] = "EmbeddedObjectCount";
const sal_Char sAPI_reference_page_set[] = "ReferencePageSet";
const sal_Char sAPI_reference_page_get[] = "ReferencePageGet";
const sal_Char sAPI_macro[] = "Macro";
const sal_Char sAPI_dde[] = "DDE"; const sal_Char sAPI_dde[] = "DDE";
const sal_Char sAPI_get_reference[] = "GetReference";
const sal_Char sAPI_sheet_name[] = "SheetName";
const sal_Char sAPI_pagename[] = "PageName";
const sal_Char sAPI_url[] = "URL"; const sal_Char sAPI_url[] = "URL";
const sal_Char sAPI_bibliography[] = "Bibliography";
const sal_Char sAPI_annotation[] = "Annotation";
const sal_Char sAPI_script[] = "Script";
const sal_Char sAPI_measure[] = "Measure";
const sal_Char sAPI_drop_down[] = "DropDown";
const sal_Char sAPI_header[] = "Header";
const sal_Char sAPI_footer[] = "Footer";
const sal_Char sAPI_datetime[] = "DateTime";
// property names // property names
const sal_Char sAPI_is_fixed[] = "IsFixed"; const sal_Char sAPI_is_fixed[] = "IsFixed";
const sal_Char sAPI_content[] = "Content"; const sal_Char sAPI_content[] = "Content";
const sal_Char sAPI_author[] = "Author"; const sal_Char sAPI_author[] = "Author";
const sal_Char sAPI_initials[] = "Initials";
const sal_Char sAPI_full_name[] = "FullName";
const sal_Char sAPI_place_holder_type[] = "PlaceHolderType";
const sal_Char sAPI_place_holder[] = "PlaceHolder";
const sal_Char sAPI_hint[] = "Hint"; const sal_Char sAPI_hint[] = "Hint";
const sal_Char sAPI_name[] = "Name"; const sal_Char sAPI_name[] = "Name";
const sal_Char sAPI_sub_type[] = "SubType"; const sal_Char sAPI_sub_type[] = "SubType";
const sal_Char sAPI_date_time_value[] = "DateTimeValue"; const sal_Char sAPI_date_time_value[] = "DateTimeValue";
const sal_Char sAPI_number_format[] = "NumberFormat"; const sal_Char sAPI_number_format[] = "NumberFormat";
const sal_Char sAPI_user_text[] = "UserText";
const sal_Char sAPI_numbering_type[] = "NumberingType"; const sal_Char sAPI_numbering_type[] = "NumberingType";
const sal_Char sAPI_offset[] = "Offset"; const sal_Char sAPI_offset[] = "Offset";
const sal_Char sAPI_data_base_name[] = "DataBaseName";
const sal_Char sAPI_data_base_u_r_l[] = "DataBaseURL";
const sal_Char sAPI_data_table_name[] = "DataTableName";
const sal_Char sAPI_condition[] = "Condition"; const sal_Char sAPI_condition[] = "Condition";
const sal_Char sAPI_set_number[] = "SetNumber"; const sal_Char sAPI_set_number[] = "SetNumber";
const sal_Char sAPI_true_content[] = "TrueContent";
const sal_Char sAPI_false_content[] = "FalseContent";
const sal_Char sAPI_revision[] = "Revision";
const sal_Char sAPI_file_format[] = "FileFormat"; const sal_Char sAPI_file_format[] = "FileFormat";
const sal_Char sAPI_chapter_format[] = "ChapterFormat";
const sal_Char sAPI_level[] = "Level";
const sal_Char sAPI_is_date[] = "IsDate"; const sal_Char sAPI_is_date[] = "IsDate";
const sal_Char sAPI_adjust[] = "Adjust";
const sal_Char sAPI_on[] = "On";
const sal_Char sAPI_is_automatic_update[] = "IsAutomaticUpdate";
const sal_Char sAPI_source_name[] = "SourceName";
const sal_Char sAPI_current_presentation[] = "CurrentPresentation"; const sal_Char sAPI_current_presentation[] = "CurrentPresentation";
const sal_Char sAPI_reference_field_part[] = "ReferenceFieldPart";
const sal_Char sAPI_reference_field_source[] = "ReferenceFieldSource";
const sal_Char sAPI_dde_command_type[] = "DDECommandType";
const sal_Char sAPI_dde_command_file[] = "DDECommandFile";
const sal_Char sAPI_dde_command_element[] = "DDECommandElement";
// sAPI_url: also used as service name
const sal_Char sAPI_target_frame[] = "TargetFrame";
const sal_Char sAPI_representation[] = "Representation";
const sal_Char sAPI_url_content[] = "URLContent";
const sal_Char sAPI_script_type[] = "ScriptType";
const sal_Char sAPI_is_hidden[] = "IsHidden"; const sal_Char sAPI_is_hidden[] = "IsHidden";
const sal_Char sAPI_is_condition_true[] = "IsConditionTrue";
const sal_Char sAPI_data_command_type[] = "DataCommandType";
const sal_Char sAPI_is_fixed_language[] = "IsFixedLanguage"; const sal_Char sAPI_is_fixed_language[] = "IsFixedLanguage";
const sal_Char sAPI_is_visible[] = "IsVisible";
const sal_Char sAPI_TextRange[] = "TextRange";
const sal_Char sAPI_true[] = "TRUE"; const sal_Char sAPI_true[] = "TRUE";
@ -617,10 +543,10 @@ XMLSenderFieldImportContext::XMLSenderFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName, sal_uInt16 nPrfx, const OUString& sLocalName,
sal_uInt16 nToken) sal_uInt16 nToken)
: XMLTextFieldImportContext(rImport, rHlp, sAPI_extended_user,nPrfx, sLocalName) : XMLTextFieldImportContext(rImport, rHlp, "ExtendedUser", nPrfx, sLocalName)
, nSubType(0) , nSubType(0)
, sPropertyFixed(sAPI_is_fixed) , sPropertyFixed(sAPI_is_fixed)
, sPropertyFieldSubType(sAPI_user_data_type) , sPropertyFieldSubType("UserDataType")
, sPropertyContent(sAPI_content) , sPropertyContent(sAPI_content)
, bFixed(true) , bFixed(true)
, nElementToken(nToken) , nElementToken(nToken)
@ -739,7 +665,7 @@ XMLAuthorFieldImportContext::XMLAuthorFieldImportContext(
: XMLSenderFieldImportContext(rImport, rHlp, nPrfx, sLocalName, nToken) : XMLSenderFieldImportContext(rImport, rHlp, nPrfx, sLocalName, nToken)
, bAuthorFullName(true) , bAuthorFullName(true)
, sServiceAuthor(sAPI_author) , sServiceAuthor(sAPI_author)
, sPropertyAuthorFullName(sAPI_full_name) , sPropertyAuthorFullName("FullName")
, sPropertyFixed(sAPI_is_fixed) , sPropertyFixed(sAPI_is_fixed)
, sPropertyContent(sAPI_content) , sPropertyContent(sAPI_content)
{ {
@ -800,7 +726,7 @@ XMLPageContinuationImportContext::XMLPageContinuationImportContext(
const OUString& sLocalName) const OUString& sLocalName)
: XMLTextFieldImportContext(rImport, rHlp, sAPI_page_number, nPrfx, sLocalName) : XMLTextFieldImportContext(rImport, rHlp, sAPI_page_number, nPrfx, sLocalName)
, sPropertySubType(sAPI_sub_type) , sPropertySubType(sAPI_sub_type)
, sPropertyUserText(sAPI_user_text) , sPropertyUserText("UserText")
, sPropertyNumberingType(sAPI_numbering_type) , sPropertyNumberingType(sAPI_numbering_type)
, eSelectPage(PageNumberType_CURRENT) , eSelectPage(PageNumberType_CURRENT)
, sStringOK(false) , sStringOK(false)
@ -954,9 +880,9 @@ void XMLPageNumberImportContext::PrepareField(
XMLPlaceholderFieldImportContext::XMLPlaceholderFieldImportContext( XMLPlaceholderFieldImportContext::XMLPlaceholderFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName) sal_uInt16 nPrfx, const OUString& sLocalName)
: XMLTextFieldImportContext(rImport, rHlp, sAPI_jump_edit,nPrfx, sLocalName) : XMLTextFieldImportContext(rImport, rHlp, "JumpEdit", nPrfx, sLocalName)
, sPropertyPlaceholderType(sAPI_place_holder_type) , sPropertyPlaceholderType("PlaceHolderType")
, sPropertyPlaceholder(sAPI_place_holder) , sPropertyPlaceholder("PlaceHolder")
, sPropertyHint(sAPI_hint) , sPropertyHint(sAPI_hint)
, nPlaceholderType(PlaceholderType::TEXT) , nPlaceholderType(PlaceholderType::TEXT)
{ {
@ -1041,7 +967,7 @@ XMLTimeFieldImportContext::XMLTimeFieldImportContext(
, sPropertyFixed(sAPI_is_fixed) , sPropertyFixed(sAPI_is_fixed)
, sPropertyDateTimeValue(sAPI_date_time_value) , sPropertyDateTimeValue(sAPI_date_time_value)
, sPropertyDateTime(sAPI_date_time) , sPropertyDateTime(sAPI_date_time)
, sPropertyAdjust(sAPI_adjust) , sPropertyAdjust("Adjust")
, sPropertyIsDate(sAPI_is_date) , sPropertyIsDate(sAPI_is_date)
, sPropertyIsFixedLanguage(sAPI_is_fixed_language) , sPropertyIsFixedLanguage(sAPI_is_fixed_language)
, nAdjust(0) , nAdjust(0)
@ -1214,11 +1140,11 @@ XMLDatabaseFieldImportContext::XMLDatabaseFieldImportContext(
const sal_Char* pServiceName, sal_uInt16 nPrfx, const sal_Char* pServiceName, sal_uInt16 nPrfx,
const OUString& sLocalName, bool bUseDisply) const OUString& sLocalName, bool bUseDisply)
: XMLTextFieldImportContext(rImport, rHlp, pServiceName, nPrfx, sLocalName) : XMLTextFieldImportContext(rImport, rHlp, pServiceName, nPrfx, sLocalName)
, sPropertyDataBaseName(sAPI_data_base_name) , sPropertyDataBaseName("DataBaseName")
, sPropertyDataBaseURL(sAPI_data_base_u_r_l) , sPropertyDataBaseURL("DataBaseURL")
, sPropertyTableName(sAPI_data_table_name) , sPropertyTableName("DataTableName")
, sPropertyDataCommandType(sAPI_data_command_type) , sPropertyDataCommandType("DataCommandType")
, sPropertyIsVisible(sAPI_is_visible) , sPropertyIsVisible("IsVisible")
, nCommandType( sdb::CommandType::TABLE ) , nCommandType( sdb::CommandType::TABLE )
, bCommandTypeOK(false) , bCommandTypeOK(false)
, bDisplay( true ) , bDisplay( true )
@ -1345,7 +1271,7 @@ void XMLDatabaseFieldImportContext::PrepareField(
XMLDatabaseNameImportContext::XMLDatabaseNameImportContext( XMLDatabaseNameImportContext::XMLDatabaseNameImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName) : sal_uInt16 nPrfx, const OUString& sLocalName) :
XMLDatabaseFieldImportContext(rImport, rHlp, sAPI_database_name, XMLDatabaseFieldImportContext(rImport, rHlp, "DatabaseName",
nPrfx, sLocalName, true) nPrfx, sLocalName, true)
{ {
} }
@ -1378,7 +1304,7 @@ XMLDatabaseNextImportContext::XMLDatabaseNextImportContext(
XMLDatabaseNextImportContext::XMLDatabaseNextImportContext( XMLDatabaseNextImportContext::XMLDatabaseNextImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName) sal_uInt16 nPrfx, const OUString& sLocalName)
: XMLDatabaseFieldImportContext(rImport, rHlp, sAPI_database_next, nPrfx, sLocalName, false) : XMLDatabaseFieldImportContext(rImport, rHlp, "DatabaseNextSet", nPrfx, sLocalName, false)
, sPropertyCondition(sAPI_condition) , sPropertyCondition(sAPI_condition)
, sTrue(sAPI_true) , sTrue(sAPI_true)
, bConditionOK(false) , bConditionOK(false)
@ -1428,7 +1354,7 @@ void XMLDatabaseNextImportContext::PrepareField(
XMLDatabaseSelectImportContext::XMLDatabaseSelectImportContext( XMLDatabaseSelectImportContext::XMLDatabaseSelectImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName) : sal_uInt16 nPrfx, const OUString& sLocalName) :
XMLDatabaseNextImportContext(rImport, rHlp, sAPI_database_select, XMLDatabaseNextImportContext(rImport, rHlp, "DatabaseNumberOfSet",
nPrfx, sLocalName), nPrfx, sLocalName),
sPropertySetNumber(sAPI_set_number), sPropertySetNumber(sAPI_set_number),
nNumber(0), nNumber(0),
@ -1473,7 +1399,7 @@ void XMLDatabaseSelectImportContext::PrepareField(
XMLDatabaseNumberImportContext::XMLDatabaseNumberImportContext( XMLDatabaseNumberImportContext::XMLDatabaseNumberImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName) : sal_uInt16 nPrfx, const OUString& sLocalName) :
XMLDatabaseFieldImportContext(rImport, rHlp, sAPI_database_number, XMLDatabaseFieldImportContext(rImport, rHlp, "DatabaseSetNumber",
nPrfx, sLocalName, true), nPrfx, sLocalName, true),
sPropertyNumberingType( sPropertyNumberingType(
sAPI_numbering_type), sAPI_numbering_type),
@ -1616,7 +1542,7 @@ const sal_Char* XMLSimpleDocInfoImportContext::MapTokenToServiceName(
switch(nToken) switch(nToken)
{ {
case XML_TOK_TEXT_DOCUMENT_CREATION_AUTHOR: case XML_TOK_TEXT_DOCUMENT_CREATION_AUTHOR:
pServiceName = sAPI_docinfo_create_author; pServiceName = "DocInfo.CreateAuthor";
break; break;
case XML_TOK_TEXT_DOCUMENT_CREATION_DATE: case XML_TOK_TEXT_DOCUMENT_CREATION_DATE:
pServiceName = sAPI_docinfo_create_date_time; pServiceName = sAPI_docinfo_create_date_time;
@ -1625,16 +1551,16 @@ const sal_Char* XMLSimpleDocInfoImportContext::MapTokenToServiceName(
pServiceName = sAPI_docinfo_create_date_time; pServiceName = sAPI_docinfo_create_date_time;
break; break;
case XML_TOK_TEXT_DOCUMENT_DESCRIPTION: case XML_TOK_TEXT_DOCUMENT_DESCRIPTION:
pServiceName = sAPI_docinfo_description; pServiceName = "DocInfo.Description";
break; break;
case XML_TOK_TEXT_DOCUMENT_EDIT_DURATION: case XML_TOK_TEXT_DOCUMENT_EDIT_DURATION:
pServiceName = sAPI_docinfo_edit_time; pServiceName = "DocInfo.EditTime";
break; break;
case XML_TOK_TEXT_DOCUMENT_USER_DEFINED: case XML_TOK_TEXT_DOCUMENT_USER_DEFINED:
pServiceName = sAPI_docinfo_custom; pServiceName = sAPI_docinfo_custom;
break; break;
case XML_TOK_TEXT_DOCUMENT_PRINT_AUTHOR: case XML_TOK_TEXT_DOCUMENT_PRINT_AUTHOR:
pServiceName = sAPI_docinfo_print_author; pServiceName = "DocInfo.PrintAuthor";
break; break;
case XML_TOK_TEXT_DOCUMENT_PRINT_DATE: case XML_TOK_TEXT_DOCUMENT_PRINT_DATE:
pServiceName = sAPI_docinfo_print_date_time; pServiceName = sAPI_docinfo_print_date_time;
@ -1643,16 +1569,16 @@ const sal_Char* XMLSimpleDocInfoImportContext::MapTokenToServiceName(
pServiceName = sAPI_docinfo_print_date_time; pServiceName = sAPI_docinfo_print_date_time;
break; break;
case XML_TOK_TEXT_DOCUMENT_KEYWORDS: case XML_TOK_TEXT_DOCUMENT_KEYWORDS:
pServiceName = sAPI_docinfo_keywords; pServiceName = "DocInfo.KeyWords";
break; break;
case XML_TOK_TEXT_DOCUMENT_SUBJECT: case XML_TOK_TEXT_DOCUMENT_SUBJECT:
pServiceName = sAPI_docinfo_subject; pServiceName = "DocInfo.Subject";
break; break;
case XML_TOK_TEXT_DOCUMENT_REVISION: case XML_TOK_TEXT_DOCUMENT_REVISION:
pServiceName = sAPI_docinfo_revision; pServiceName = "DocInfo.Revision";
break; break;
case XML_TOK_TEXT_DOCUMENT_SAVE_AUTHOR: case XML_TOK_TEXT_DOCUMENT_SAVE_AUTHOR:
pServiceName = sAPI_docinfo_change_author; pServiceName = "DocInfo.ChangeAuthor";
break; break;
case XML_TOK_TEXT_DOCUMENT_SAVE_DATE: case XML_TOK_TEXT_DOCUMENT_SAVE_DATE:
pServiceName = sAPI_docinfo_change_date_time; pServiceName = sAPI_docinfo_change_date_time;
@ -1661,7 +1587,7 @@ const sal_Char* XMLSimpleDocInfoImportContext::MapTokenToServiceName(
pServiceName = sAPI_docinfo_change_date_time; pServiceName = sAPI_docinfo_change_date_time;
break; break;
case XML_TOK_TEXT_DOCUMENT_TITLE: case XML_TOK_TEXT_DOCUMENT_TITLE:
pServiceName = sAPI_docinfo_title; pServiceName = "DocInfo.Title";
break; break;
default: default:
@ -1682,7 +1608,7 @@ XMLRevisionDocInfoImportContext::XMLRevisionDocInfoImportContext(
const OUString& sLocalName, sal_uInt16 nToken) : const OUString& sLocalName, sal_uInt16 nToken) :
XMLSimpleDocInfoImportContext(rImport, rHlp, nPrfx, sLocalName, XMLSimpleDocInfoImportContext(rImport, rHlp, nPrfx, sLocalName,
nToken, false, false), nToken, false, false),
sPropertyRevision(sAPI_revision) sPropertyRevision("Revision")
{ {
bValid = true; bValid = true;
} }
@ -1900,7 +1826,7 @@ void XMLUserDocInfoImportContext::PrepareField(
XMLHiddenParagraphImportContext::XMLHiddenParagraphImportContext( XMLHiddenParagraphImportContext::XMLHiddenParagraphImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName) : sal_uInt16 nPrfx, const OUString& sLocalName) :
XMLTextFieldImportContext(rImport, rHlp, sAPI_hidden_paragraph, XMLTextFieldImportContext(rImport, rHlp, "HiddenParagraph",
nPrfx, sLocalName), nPrfx, sLocalName),
sPropertyCondition(sAPI_condition), sPropertyCondition(sAPI_condition),
sPropertyIsHidden(sAPI_is_hidden), sPropertyIsHidden(sAPI_is_hidden),
@ -1950,12 +1876,12 @@ void XMLHiddenParagraphImportContext::PrepareField(
XMLConditionalTextImportContext::XMLConditionalTextImportContext( XMLConditionalTextImportContext::XMLConditionalTextImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName) : sal_uInt16 nPrfx, const OUString& sLocalName) :
XMLTextFieldImportContext(rImport, rHlp, sAPI_conditional_text, XMLTextFieldImportContext(rImport, rHlp, "ConditionalText",
nPrfx, sLocalName), nPrfx, sLocalName),
sPropertyCondition(sAPI_condition), sPropertyCondition(sAPI_condition),
sPropertyTrueContent(sAPI_true_content), sPropertyTrueContent("TrueContent"),
sPropertyFalseContent(sAPI_false_content), sPropertyFalseContent("FalseContent"),
sPropertyIsConditionTrue(sAPI_is_condition_true), sPropertyIsConditionTrue("IsConditionTrue"),
sPropertyCurrentPresentation(sAPI_current_presentation), sPropertyCurrentPresentation(sAPI_current_presentation),
bConditionOK(false), bConditionOK(false),
bTrueOK(false), bTrueOK(false),
@ -2023,7 +1949,7 @@ void XMLConditionalTextImportContext::PrepareField(
XMLHiddenTextImportContext::XMLHiddenTextImportContext( XMLHiddenTextImportContext::XMLHiddenTextImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName) : sal_uInt16 nPrfx, const OUString& sLocalName) :
XMLTextFieldImportContext(rImport, rHlp, sAPI_hidden_text, XMLTextFieldImportContext(rImport, rHlp, "HiddenText",
nPrfx, sLocalName), nPrfx, sLocalName),
sPropertyCondition(sAPI_condition), sPropertyCondition(sAPI_condition),
sPropertyContent(sAPI_content), sPropertyContent(sAPI_content),
@ -2096,7 +2022,7 @@ static const SvXMLEnumMapEntry aFilenameDisplayMap[] =
XMLFileNameImportContext::XMLFileNameImportContext( XMLFileNameImportContext::XMLFileNameImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx, SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
const OUString& sLocalName) : const OUString& sLocalName) :
XMLTextFieldImportContext(rImport, rHlp, sAPI_file_name, XMLTextFieldImportContext(rImport, rHlp, "FileName",
nPrfx, sLocalName), nPrfx, sLocalName),
sPropertyFixed(sAPI_is_fixed), sPropertyFixed(sAPI_is_fixed),
sPropertyFileFormat(sAPI_file_format), sPropertyFileFormat(sAPI_file_format),
@ -2181,7 +2107,7 @@ static const SvXMLEnumMapEntry aTemplateDisplayMap[] =
XMLTemplateNameImportContext::XMLTemplateNameImportContext( XMLTemplateNameImportContext::XMLTemplateNameImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx, SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
const OUString& sLocalName) : const OUString& sLocalName) :
XMLTextFieldImportContext(rImport, rHlp, sAPI_template_name, XMLTextFieldImportContext(rImport, rHlp, "TemplateName",
nPrfx, sLocalName), nPrfx, sLocalName),
sPropertyFileFormat(sAPI_file_format), sPropertyFileFormat(sAPI_file_format),
nFormat(TemplateDisplayFormat::FULL) nFormat(TemplateDisplayFormat::FULL)
@ -2234,11 +2160,10 @@ static const SvXMLEnumMapEntry aChapterDisplayMap[] =
XMLChapterImportContext::XMLChapterImportContext( XMLChapterImportContext::XMLChapterImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName) : sal_uInt16 nPrfx, const OUString& sLocalName) :
XMLTextFieldImportContext(rImport, rHlp, sAPI_chapter, XMLTextFieldImportContext(rImport, rHlp, "Chapter",
nPrfx, sLocalName), nPrfx, sLocalName),
sPropertyChapterFormat( sPropertyChapterFormat("ChapterFormat"),
sAPI_chapter_format), sPropertyLevel("Level"),
sPropertyLevel(sAPI_level),
nFormat(ChapterFormat::NAME_NUMBER), nFormat(ChapterFormat::NAME_NUMBER),
nLevel(0) nLevel(0)
{ {
@ -2353,25 +2278,25 @@ const sal_Char* XMLCountFieldImportContext::MapTokenToServiceName(
switch (nToken) switch (nToken)
{ {
case XML_TOK_TEXT_WORD_COUNT: case XML_TOK_TEXT_WORD_COUNT:
pServiceName = sAPI_word_count; pServiceName = "WordCount";
break; break;
case XML_TOK_TEXT_PARAGRAPH_COUNT: case XML_TOK_TEXT_PARAGRAPH_COUNT:
pServiceName = sAPI_paragraph_count; pServiceName = "ParagraphCount";
break; break;
case XML_TOK_TEXT_TABLE_COUNT: case XML_TOK_TEXT_TABLE_COUNT:
pServiceName = sAPI_table_count; pServiceName = "TableCount";
break; break;
case XML_TOK_TEXT_CHARACTER_COUNT: case XML_TOK_TEXT_CHARACTER_COUNT:
pServiceName = sAPI_character_count; pServiceName = "CharacterCount";
break; break;
case XML_TOK_TEXT_IMAGE_COUNT: case XML_TOK_TEXT_IMAGE_COUNT:
pServiceName = sAPI_graphic_object_count; pServiceName = "GraphicObjectCount";
break; break;
case XML_TOK_TEXT_OBJECT_COUNT: case XML_TOK_TEXT_OBJECT_COUNT:
pServiceName = sAPI_embedded_object_count; pServiceName = "EmbeddedObjectCount";
break; break;
case XML_TOK_TEXT_PAGE_COUNT: case XML_TOK_TEXT_PAGE_COUNT:
pServiceName = sAPI_page_count; pServiceName = "PageCount";
break; break;
default: default:
pServiceName = nullptr; pServiceName = nullptr;
@ -2389,7 +2314,7 @@ const sal_Char* XMLCountFieldImportContext::MapTokenToServiceName(
XMLPageVarGetFieldImportContext::XMLPageVarGetFieldImportContext( XMLPageVarGetFieldImportContext::XMLPageVarGetFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName) : sal_uInt16 nPrfx, const OUString& sLocalName) :
XMLTextFieldImportContext(rImport, rHlp, sAPI_reference_page_get, XMLTextFieldImportContext(rImport, rHlp, "ReferencePageGet",
nPrfx, sLocalName), nPrfx, sLocalName),
sPropertyNumberingType( sPropertyNumberingType(
sAPI_numbering_type), sAPI_numbering_type),
@ -2442,9 +2367,9 @@ void XMLPageVarGetFieldImportContext::PrepareField(
XMLPageVarSetFieldImportContext::XMLPageVarSetFieldImportContext( XMLPageVarSetFieldImportContext::XMLPageVarSetFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx, SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
const OUString& sLocalName) : const OUString& sLocalName) :
XMLTextFieldImportContext(rImport, rHlp, sAPI_reference_page_set, XMLTextFieldImportContext(rImport, rHlp, "ReferencePageSet",
nPrfx, sLocalName), nPrfx, sLocalName),
sPropertyOn(sAPI_on), sPropertyOn("On"),
sPropertyOffset(sAPI_offset), sPropertyOffset(sAPI_offset),
nAdjust(0), nAdjust(0),
bActive(true) bActive(true)
@ -2495,7 +2420,7 @@ void XMLPageVarSetFieldImportContext::PrepareField(
XMLMacroFieldImportContext::XMLMacroFieldImportContext( XMLMacroFieldImportContext::XMLMacroFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx, SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
const OUString& sLocalName) : const OUString& sLocalName) :
XMLTextFieldImportContext(rImport, rHlp, sAPI_macro, XMLTextFieldImportContext(rImport, rHlp, "Macro",
nPrfx, sLocalName), nPrfx, sLocalName),
sPropertyHint(sAPI_hint), sPropertyHint(sAPI_hint),
sPropertyMacroName("MacroName"), sPropertyMacroName("MacroName"),
@ -2626,10 +2551,10 @@ void XMLMacroFieldImportContext::PrepareField(
XMLReferenceFieldImportContext::XMLReferenceFieldImportContext( XMLReferenceFieldImportContext::XMLReferenceFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nToken, sal_uInt16 nPrfx, const OUString& sLocalName) sal_uInt16 nToken, sal_uInt16 nPrfx, const OUString& sLocalName)
: XMLTextFieldImportContext(rImport, rHlp, sAPI_get_reference, nPrfx, sLocalName) : XMLTextFieldImportContext(rImport, rHlp, "GetReference", nPrfx, sLocalName)
, sPropertyReferenceFieldPart(sAPI_reference_field_part) , sPropertyReferenceFieldPart("ReferenceFieldPart")
, sPropertyReferenceFieldSource(sAPI_reference_field_source) , sPropertyReferenceFieldSource("ReferenceFieldSource")
, sPropertySourceName(sAPI_source_name) , sPropertySourceName("SourceName")
, sPropertyCurrentPresentation(sAPI_current_presentation) , sPropertyCurrentPresentation(sAPI_current_presentation)
, nElementToken(nToken) , nElementToken(nToken)
, nSource(0) , nSource(0)
@ -2807,11 +2732,11 @@ XMLDdeFieldDeclImportContext::XMLDdeFieldDeclImportContext(
SvXMLImport& rImport, sal_uInt16 nPrfx, SvXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& sLocalName, const SvXMLTokenMap& rMap) const OUString& sLocalName, const SvXMLTokenMap& rMap)
: SvXMLImportContext(rImport, nPrfx, sLocalName) : SvXMLImportContext(rImport, nPrfx, sLocalName)
, sPropertyIsAutomaticUpdate(sAPI_is_automatic_update) , sPropertyIsAutomaticUpdate("IsAutomaticUpdate")
, sPropertyName(sAPI_name) , sPropertyName(sAPI_name)
, sPropertyDDECommandType(sAPI_dde_command_type) , sPropertyDDECommandType("DDECommandType")
, sPropertyDDECommandFile(sAPI_dde_command_file) , sPropertyDDECommandFile("DDECommandFile")
, sPropertyDDECommandElement(sAPI_dde_command_element) , sPropertyDDECommandElement("DDECommandElement")
, rTokenMap(rMap) , rTokenMap(rMap)
{ {
DBG_ASSERT(XML_NAMESPACE_TEXT == nPrfx, "wrong prefix"); DBG_ASSERT(XML_NAMESPACE_TEXT == nPrfx, "wrong prefix");
@ -3019,7 +2944,7 @@ XMLSheetNameImportContext::XMLSheetNameImportContext(
XMLTextImportHelper& rHlp, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, sal_uInt16 nPrfx,
const OUString& sLocalName) : const OUString& sLocalName) :
XMLTextFieldImportContext(rImport, rHlp, sAPI_sheet_name, XMLTextFieldImportContext(rImport, rHlp, "SheetName",
nPrfx, sLocalName) nPrfx, sLocalName)
{ {
bValid = true; // always valid! bValid = true; // always valid!
@ -3045,7 +2970,7 @@ XMLPageNameFieldImportContext::XMLPageNameFieldImportContext(
XMLTextImportHelper& rHlp, /// Text import helper XMLTextImportHelper& rHlp, /// Text import helper
sal_uInt16 nPrfx, /// namespace prefix sal_uInt16 nPrfx, /// namespace prefix
const OUString& sLocalName) /// element name w/o prefix const OUString& sLocalName) /// element name w/o prefix
: XMLTextFieldImportContext(rImport, rHlp, sAPI_pagename, nPrfx, sLocalName ) : XMLTextFieldImportContext(rImport, rHlp, "PageName", nPrfx, sLocalName )
{ {
bValid = true; bValid = true;
} }
@ -3074,9 +2999,8 @@ XMLUrlFieldImportContext::XMLUrlFieldImportContext(
XMLTextFieldImportContext(rImport, rHlp, sAPI_url, XMLTextFieldImportContext(rImport, rHlp, sAPI_url,
nPrfx, sLocalName), nPrfx, sLocalName),
sPropertyURL(sAPI_url), sPropertyURL(sAPI_url),
sPropertyTargetFrame(sAPI_target_frame), sPropertyTargetFrame("TargetFrame"),
sPropertyRepresentation( sPropertyRepresentation("Representation"),
sAPI_representation),
bFrameOK(false) bFrameOK(false)
{ {
} }
@ -3120,7 +3044,7 @@ XMLBibliographyFieldImportContext::XMLBibliographyFieldImportContext(
XMLTextImportHelper& rHlp, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, sal_uInt16 nPrfx,
const OUString& sLocalName) : const OUString& sLocalName) :
XMLTextFieldImportContext(rImport, rHlp, sAPI_bibliography, XMLTextFieldImportContext(rImport, rHlp, "Bibliography",
nPrfx, sLocalName), nPrfx, sLocalName),
sPropertyFields("Fields"), sPropertyFields("Fields"),
aValues() aValues()
@ -3380,14 +3304,14 @@ XMLAnnotationImportContext::XMLAnnotationImportContext(
sal_uInt16 nToken, sal_uInt16 nToken,
sal_uInt16 nPrfx, sal_uInt16 nPrfx,
const OUString& sLocalName) : const OUString& sLocalName) :
XMLTextFieldImportContext(rImport, rHlp, sAPI_annotation, XMLTextFieldImportContext(rImport, rHlp, "Annotation",
nPrfx, sLocalName), nPrfx, sLocalName),
sPropertyAuthor(sAPI_author), sPropertyAuthor(sAPI_author),
sPropertyInitials(sAPI_initials), sPropertyInitials("Initials"),
sPropertyContent(sAPI_content), sPropertyContent(sAPI_content),
// why is there no UNO_NAME_DATE_TIME, but only UNO_NAME_DATE_TIME_VALUE? // why is there no UNO_NAME_DATE_TIME, but only UNO_NAME_DATE_TIME_VALUE?
sPropertyDate(sAPI_date_time_value), sPropertyDate(sAPI_date_time_value),
sPropertyTextRange(sAPI_TextRange), sPropertyTextRange("TextRange"),
sPropertyName(sAPI_name), sPropertyName(sAPI_name),
m_nToken(nToken) m_nToken(nToken)
{ {
@ -3603,9 +3527,9 @@ XMLScriptImportContext::XMLScriptImportContext(
XMLTextImportHelper& rHlp, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, sal_uInt16 nPrfx,
const OUString& sLocalName) const OUString& sLocalName)
: XMLTextFieldImportContext(rImport, rHlp, sAPI_script, nPrfx, sLocalName) : XMLTextFieldImportContext(rImport, rHlp, "Script", nPrfx, sLocalName)
, sPropertyScriptType(sAPI_script_type) , sPropertyScriptType("ScriptType")
, sPropertyURLContent(sAPI_url_content) , sPropertyURLContent("URLContent")
, sPropertyContent(sAPI_content) , sPropertyContent(sAPI_content)
, bContentOK(false) , bContentOK(false)
, bScriptTypeOK(false) , bScriptTypeOK(false)
@ -3662,7 +3586,7 @@ XMLMeasureFieldImportContext::XMLMeasureFieldImportContext(
XMLTextImportHelper& rHlp, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, sal_uInt16 nPrfx,
const OUString& sLocalName) : const OUString& sLocalName) :
XMLTextFieldImportContext(rImport, rHlp, sAPI_measure, XMLTextFieldImportContext(rImport, rHlp, "Measure",
nPrfx, sLocalName), nPrfx, sLocalName),
mnKind( 0 ) mnKind( 0 )
{ {
@ -3706,7 +3630,7 @@ XMLDropDownFieldImportContext::XMLDropDownFieldImportContext(
XMLTextImportHelper& rHlp, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, sal_uInt16 nPrfx,
const OUString& sLocalName) : const OUString& sLocalName) :
XMLTextFieldImportContext( rImport, rHlp, sAPI_drop_down, XMLTextFieldImportContext( rImport, rHlp, "DropDown",
nPrfx, sLocalName ), nPrfx, sLocalName ),
aLabels(), aLabels(),
sName(), sName(),
@ -3840,7 +3764,7 @@ XMLHeaderFieldImportContext::XMLHeaderFieldImportContext(
XMLTextImportHelper& rHlp, /// Text import helper XMLTextImportHelper& rHlp, /// Text import helper
sal_uInt16 nPrfx, /// namespace prefix sal_uInt16 nPrfx, /// namespace prefix
const OUString& sLocalName) /// element name w/o prefix const OUString& sLocalName) /// element name w/o prefix
: XMLTextFieldImportContext(rImport, rHlp, sAPI_header, nPrfx, sLocalName ) : XMLTextFieldImportContext(rImport, rHlp, "Header", nPrfx, sLocalName )
{ {
sServicePrefix = sAPI_presentation_prefix; sServicePrefix = sAPI_presentation_prefix;
bValid = true; bValid = true;
@ -3863,7 +3787,7 @@ XMLFooterFieldImportContext::XMLFooterFieldImportContext(
XMLTextImportHelper& rHlp, /// Text import helper XMLTextImportHelper& rHlp, /// Text import helper
sal_uInt16 nPrfx, /// namespace prefix sal_uInt16 nPrfx, /// namespace prefix
const OUString& sLocalName) /// element name w/o prefix const OUString& sLocalName) /// element name w/o prefix
: XMLTextFieldImportContext(rImport, rHlp, sAPI_footer, nPrfx, sLocalName ) : XMLTextFieldImportContext(rImport, rHlp, "Footer", nPrfx, sLocalName )
{ {
sServicePrefix = sAPI_presentation_prefix; sServicePrefix = sAPI_presentation_prefix;
bValid = true; bValid = true;
@ -3887,7 +3811,7 @@ XMLDateTimeFieldImportContext::XMLDateTimeFieldImportContext(
XMLTextImportHelper& rHlp, /// Text import helper XMLTextImportHelper& rHlp, /// Text import helper
sal_uInt16 nPrfx, /// namespace prefix sal_uInt16 nPrfx, /// namespace prefix
const OUString& sLocalName) /// element name w/o prefix const OUString& sLocalName) /// element name w/o prefix
: XMLTextFieldImportContext(rImport, rHlp, sAPI_datetime, nPrfx, sLocalName ) : XMLTextFieldImportContext(rImport, rHlp, "DateTime", nPrfx, sLocalName )
{ {
sServicePrefix = sAPI_presentation_prefix; sServicePrefix = sAPI_presentation_prefix;
bValid = true; bValid = true;

View File

@ -1426,8 +1426,6 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
// Numberings/Bullets in table not visible after save/reload (#i80724#) // Numberings/Bullets in table not visible after save/reload (#i80724#)
bool bSetListAttrs ) bool bSetListAttrs )
{ {
static const char s_ParaStyleName[] = "ParaStyleName";
static const char s_CharStyleName[] = "CharStyleName";
static const char s_NumberingRules[] = "NumberingRules"; static const char s_NumberingRules[] = "NumberingRules";
static const char s_NumberingIsNumber[] = "NumberingIsNumber"; static const char s_NumberingIsNumber[] = "NumberingIsNumber";
static const char s_NumberingLevel[] = "NumberingLevel"; static const char s_NumberingLevel[] = "NumberingLevel";
@ -1435,10 +1433,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
static const char s_NumberingStartValue[] = "NumberingStartValue"; static const char s_NumberingStartValue[] = "NumberingStartValue";
static const char s_PropNameListId[] = "ListId"; static const char s_PropNameListId[] = "ListId";
static const char s_PageDescName[] = "PageDescName"; static const char s_PageDescName[] = "PageDescName";
static const char s_ServiceCombinedCharacters[] = "com.sun.star.text.TextField.CombinedCharacters";
static const char s_Content[] = "Content";
static const char s_OutlineLevel[] = "OutlineLevel"; static const char s_OutlineLevel[] = "OutlineLevel";
static const char s_NumberingStyleName[] = "NumberingStyleName";
const sal_uInt16 nFamily = bPara ? XML_STYLE_FAMILY_TEXT_PARAGRAPH const sal_uInt16 nFamily = bPara ? XML_STYLE_FAMILY_TEXT_PARAGRAPH
: XML_STYLE_FAMILY_TEXT_TEXT; : XML_STYLE_FAMILY_TEXT_TEXT;
@ -1462,7 +1457,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
if( !sStyleName.isEmpty() ) if( !sStyleName.isEmpty() )
{ {
sStyleName = rImport.GetStyleDisplayName( nFamily, sStyleName ); sStyleName = rImport.GetStyleDisplayName( nFamily, sStyleName );
const OUString rPropName = bPara ? s_ParaStyleName : s_CharStyleName; const OUString rPropName = bPara ? OUString("ParaStyleName") : OUString("CharStyleName");
const Reference < XNameContainer > & rStyles = (bPara) const Reference < XNameContainer > & rStyles = (bPara)
? m_xImpl->m_xParaStyles ? m_xImpl->m_xParaStyles
: m_xImpl->m_xTextStyles; : m_xImpl->m_xTextStyles;
@ -1705,7 +1700,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
{ {
uno::Reference<beans::XPropertySet> const xTmp( uno::Reference<beans::XPropertySet> const xTmp(
m_xImpl->m_xServiceFactory->createInstance( m_xImpl->m_xServiceFactory->createInstance(
s_ServiceCombinedCharacters), UNO_QUERY); "com.sun.star.text.TextField.CombinedCharacters"), UNO_QUERY);
if( xTmp.is() ) if( xTmp.is() )
{ {
// fix cursor if larger than possible for // fix cursor if larger than possible for
@ -1718,7 +1713,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
} }
// set field value (the combined character string) // set field value (the combined character string)
xTmp->setPropertyValue(s_Content, xTmp->setPropertyValue("Content",
makeAny(rCursor->getString())); makeAny(rCursor->getString()));
// insert the field over it's original text // insert the field over it's original text
@ -1838,7 +1833,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
OUString sEmptyStr; OUString sEmptyStr;
if ( !lcl_HasListStyle( sStyleName, if ( !lcl_HasListStyle( sStyleName,
m_xImpl->m_xParaStyles, GetXMLImport(), m_xImpl->m_xParaStyles, GetXMLImport(),
s_NumberingStyleName, "NumberingStyleName",
sEmptyStr ) ) sEmptyStr ) )
{ {
// heading not in a list --> apply outline style // heading not in a list --> apply outline style
@ -1868,8 +1863,6 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
void XMLTextImportHelper::FindOutlineStyleName( OUString& rStyleName, void XMLTextImportHelper::FindOutlineStyleName( OUString& rStyleName,
sal_Int8 nOutlineLevel ) sal_Int8 nOutlineLevel )
{ {
static const char s_HeadingStyleName[] = "HeadingStyleName";
// style name empty? // style name empty?
if( rStyleName.isEmpty() ) if( rStyleName.isEmpty() )
{ {
@ -1894,7 +1887,7 @@ void XMLTextImportHelper::FindOutlineStyleName( OUString& rStyleName,
>>= aProperties; >>= aProperties;
for( sal_Int32 i = 0; i < aProperties.getLength(); i++ ) for( sal_Int32 i = 0; i < aProperties.getLength(); i++ )
{ {
if (aProperties[i].Name == s_HeadingStyleName) if (aProperties[i].Name == "HeadingStyleName")
{ {
OUString aOutlineStyle; OUString aOutlineStyle;
aProperties[i].Value >>= aOutlineStyle; aProperties[i].Value >>= aOutlineStyle;
@ -1932,9 +1925,6 @@ void XMLTextImportHelper::AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel
void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels ) void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels )
{ {
static const char s_NumberingStyleName[] = "NumberingStyleName";
static const char s_HeadingStyleName [] = "HeadingStyleName";
if ((m_xImpl->m_xOutlineStylesCandidates != nullptr || bSetEmptyLevels) && if ((m_xImpl->m_xOutlineStylesCandidates != nullptr || bSetEmptyLevels) &&
m_xImpl->m_xChapterNumbering.is() && m_xImpl->m_xChapterNumbering.is() &&
!IsInsertMode()) !IsInsertMode())
@ -2000,7 +1990,7 @@ void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels )
m_xImpl->m_xOutlineStylesCandidates[i][j], m_xImpl->m_xOutlineStylesCandidates[i][j],
m_xImpl->m_xParaStyles, m_xImpl->m_xParaStyles,
GetXMLImport(), GetXMLImport(),
s_NumberingStyleName, "NumberingStyleName",
sOutlineStyleName)) sOutlineStyleName))
{ {
sChosenStyles[i] = sChosenStyles[i] =
@ -2015,7 +2005,7 @@ void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels )
// Trashed outline numbering in ODF 1.1 text document created by OOo 3.x (#i106218#) // Trashed outline numbering in ODF 1.1 text document created by OOo 3.x (#i106218#)
Sequence < PropertyValue > aProps( 1 ); Sequence < PropertyValue > aProps( 1 );
PropertyValue *pProps = aProps.getArray(); PropertyValue *pProps = aProps.getArray();
pProps->Name = s_HeadingStyleName; pProps->Name = "HeadingStyleName";
for ( sal_Int32 i = 0; i < nCount; ++i ) for ( sal_Int32 i = 0; i < nCount; ++i )
{ {
// Paragraph style assignments in Outline of template lost from second level on (#i107610#) // Paragraph style assignments in Outline of template lost from second level on (#i107610#)
@ -2622,9 +2612,6 @@ void XMLTextImportHelper::ConnectFrameChains(
const OUString& rNextFrmName, const OUString& rNextFrmName,
const Reference < XPropertySet >& rFrmPropSet ) const Reference < XPropertySet >& rFrmPropSet )
{ {
static const char s_ChainNextName[] = "ChainNextName";
static const char s_ChainPrevName[] = "ChainPrevName";
if( rFrmName.isEmpty() ) if( rFrmName.isEmpty() )
return; return;
@ -2635,7 +2622,7 @@ void XMLTextImportHelper::ConnectFrameChains(
if (m_xImpl->m_xTextFrames.is() if (m_xImpl->m_xTextFrames.is()
&& m_xImpl->m_xTextFrames->hasByName(sNextFrmName)) && m_xImpl->m_xTextFrames->hasByName(sNextFrmName))
{ {
rFrmPropSet->setPropertyValue(s_ChainNextName, rFrmPropSet->setPropertyValue("ChainNextName",
makeAny(sNextFrmName)); makeAny(sNextFrmName));
} }
else else
@ -2657,7 +2644,7 @@ void XMLTextImportHelper::ConnectFrameChains(
{ {
// The previous frame must exist, because it existing than // The previous frame must exist, because it existing than
// inserting the entry // inserting the entry
rFrmPropSet->setPropertyValue(s_ChainPrevName, makeAny(*i)); rFrmPropSet->setPropertyValue("ChainPrevName", makeAny(*i));
i = m_xImpl->m_xPrevFrmNames->erase(i); i = m_xImpl->m_xPrevFrmNames->erase(i);
j = m_xImpl->m_xNextFrmNames->erase(j); j = m_xImpl->m_xNextFrmNames->erase(j);

View File

@ -407,7 +407,6 @@ XMLTextListsHelper::MakeNumRule(
bool* o_pRestartNumbering, bool* o_pRestartNumbering,
bool* io_pSetDefaults) bool* io_pSetDefaults)
{ {
static const char s_NumberingRules[] = "NumberingRules";
uno::Reference<container::XIndexReplace> xNumRules(i_rNumRule); uno::Reference<container::XIndexReplace> xNumRules(i_rNumRule);
if ( !i_StyleName.isEmpty() && i_StyleName != i_ParentStyleName ) if ( !i_StyleName.isEmpty() && i_StyleName != i_ParentStyleName )
{ {
@ -424,7 +423,7 @@ XMLTextListsHelper::MakeNumRule(
uno::Reference< beans::XPropertySet > xPropSet( xStyle, uno::Reference< beans::XPropertySet > xPropSet( xStyle,
uno::UNO_QUERY ); uno::UNO_QUERY );
any = xPropSet->getPropertyValue(s_NumberingRules); any = xPropSet->getPropertyValue("NumberingRules");
any >>= xNumRules; any >>= xNumRules;
} }
else else

View File

@ -2156,10 +2156,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
bool bAutoStyles, bool bIsProgress, bool bAutoStyles, bool bIsProgress,
bool bPrvChrIsSpc ) bool bPrvChrIsSpc )
{ {
static const char sMeta[] = "InContentMetadata";
static const char sFieldMarkName[] = "__FieldMark_"; static const char sFieldMarkName[] = "__FieldMark_";
static const char sAnnotation[] = "Annotation";
static const char sAnnotationEnd[] = "AnnotationEnd";
bool bPrevCharIsSpace = bPrvChrIsSpc; bool bPrevCharIsSpace = bPrvChrIsSpc;
@ -2188,12 +2185,12 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
exportTextField( xTxtRange, bAutoStyles, bIsProgress ); exportTextField( xTxtRange, bAutoStyles, bIsProgress );
bPrevCharIsSpace = false; bPrevCharIsSpace = false;
} }
else if ( sType == sAnnotation ) else if ( sType == "Annotation" )
{ {
exportTextField( xTxtRange, bAutoStyles, bIsProgress ); exportTextField( xTxtRange, bAutoStyles, bIsProgress );
bPrevCharIsSpace = false; bPrevCharIsSpace = false;
} }
else if ( sType == sAnnotationEnd ) else if ( sType == "AnnotationEnd" )
{ {
if (!bAutoStyles) if (!bAutoStyles)
{ {
@ -2258,7 +2255,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
{ {
exportRuby(xPropSet, bAutoStyles); exportRuby(xPropSet, bAutoStyles);
} }
else if (sType == sMeta) else if (sType == "InContentMetadata")
{ {
exportMeta(xPropSet, bAutoStyles, bIsProgress); exportMeta(xPropSet, bAutoStyles, bIsProgress);
} }
@ -3708,8 +3705,6 @@ void XMLTextParagraphExport::exportMeta(
const Reference<XPropertySet> & i_xPortion, const Reference<XPropertySet> & i_xPortion,
bool i_bAutoStyles, bool i_isProgress) bool i_bAutoStyles, bool i_isProgress)
{ {
static const char sMeta[] = "InContentMetadata";
bool doExport(!i_bAutoStyles); // do not export element if autostyles bool doExport(!i_bAutoStyles); // do not export element if autostyles
// check version >= 1.2 // check version >= 1.2
switch (GetExport().getDefaultVersion()) { switch (GetExport().getDefaultVersion()) {
@ -3719,7 +3714,7 @@ void XMLTextParagraphExport::exportMeta(
} }
const Reference< XTextContent > xTextContent( const Reference< XTextContent > xTextContent(
i_xPortion->getPropertyValue(sMeta), UNO_QUERY_THROW); i_xPortion->getPropertyValue("InContentMetadata"), UNO_QUERY_THROW);
const Reference< XEnumerationAccess > xEA( xTextContent, UNO_QUERY_THROW ); const Reference< XEnumerationAccess > xEA( xTextContent, UNO_QUERY_THROW );
const Reference< XEnumeration > xTextEnum( xEA->createEnumeration() ); const Reference< XEnumeration > xTextEnum( xEA->createEnumeration() );

View File

@ -1202,12 +1202,6 @@ void XMLIndexMarkImportContext_Impl::ProcessAttribute(
} }
} }
static const sal_Char sAPI_com_sun_star_text_ContentIndexMark[] =
"com.sun.star.text.ContentIndexMark";
static const sal_Char sAPI_com_sun_star_text_UserIndexMark[] =
"com.sun.star.text.UserIndexMark";
static const sal_Char sAPI_com_sun_star_text_DocumentIndexMark[] =
"com.sun.star.text.DocumentIndexMark";
void XMLIndexMarkImportContext_Impl::GetServiceName( void XMLIndexMarkImportContext_Impl::GetServiceName(
OUString& sServiceName, OUString& sServiceName,
@ -1219,9 +1213,7 @@ void XMLIndexMarkImportContext_Impl::GetServiceName(
case XML_TOK_TEXT_TOC_MARK_START: case XML_TOK_TEXT_TOC_MARK_START:
case XML_TOK_TEXT_TOC_MARK_END: case XML_TOK_TEXT_TOC_MARK_END:
{ {
OUString sTmp( sServiceName = "com.sun.star.text.ContentIndexMark";
sAPI_com_sun_star_text_ContentIndexMark);
sServiceName = sTmp;
break; break;
} }
@ -1229,9 +1221,7 @@ void XMLIndexMarkImportContext_Impl::GetServiceName(
case XML_TOK_TEXT_USER_INDEX_MARK_START: case XML_TOK_TEXT_USER_INDEX_MARK_START:
case XML_TOK_TEXT_USER_INDEX_MARK_END: case XML_TOK_TEXT_USER_INDEX_MARK_END:
{ {
OUString sTmp( sServiceName = "com.sun.star.text.UserIndexMark";
sAPI_com_sun_star_text_UserIndexMark);
sServiceName = sTmp;
break; break;
} }
@ -1239,9 +1229,7 @@ void XMLIndexMarkImportContext_Impl::GetServiceName(
case XML_TOK_TEXT_ALPHA_INDEX_MARK_START: case XML_TOK_TEXT_ALPHA_INDEX_MARK_START:
case XML_TOK_TEXT_ALPHA_INDEX_MARK_END: case XML_TOK_TEXT_ALPHA_INDEX_MARK_END:
{ {
OUString sTmp( sServiceName = "com.sun.star.text.DocumentIndexMark";
sAPI_com_sun_star_text_DocumentIndexMark);
sServiceName = sTmp;
break; break;
} }

View File

@ -50,37 +50,18 @@
// service names // service names
static const sal_Char sAPI_textfield_prefix[] = "com.sun.star.text.TextField.";
static const sal_Char sAPI_fieldmaster_prefix[] = "com.sun.star.text.FieldMaster."; static const sal_Char sAPI_fieldmaster_prefix[] = "com.sun.star.text.FieldMaster.";
static const sal_Char sAPI_input[] = "Input";
static const sal_Char sAPI_input_user[] = "InputUser";
static const sal_Char sAPI_get_expression[] = "GetExpression"; static const sal_Char sAPI_get_expression[] = "GetExpression";
static const sal_Char sAPI_set_expression[] = "SetExpression"; static const sal_Char sAPI_set_expression[] = "SetExpression";
static const sal_Char sAPI_user[] = "User"; static const sal_Char sAPI_user[] = "User";
static const sal_Char sAPI_table_formula[] = "TableFormula";
static const sal_Char sAPI_database[] = "com.sun.star.text.TextField.Database"; static const sal_Char sAPI_database[] = "com.sun.star.text.TextField.Database";
static const sal_Char sAPI_fieldmaster_database[] = "com.sun.star.text.FieldMaster.Database";
// property names // property names
static const sal_Char sAPI_hint[] = "Hint";
static const sal_Char sAPI_help[] = "Help";
static const sal_Char sAPI_tooltip[] = "Tooltip";
static const sal_Char sAPI_content[] = "Content"; static const sal_Char sAPI_content[] = "Content";
static const sal_Char sAPI_sub_type[] = "SubType"; static const sal_Char sAPI_sub_type[] = "SubType";
static const sal_Char sAPI_is_expression[] = "IsExpression";
static const sal_Char sAPI_is_input[] = "Input";
static const sal_Char sAPI_is_show_formula[] = "IsShowFormula";
static const sal_Char sAPI_number_format[] = "NumberFormat"; static const sal_Char sAPI_number_format[] = "NumberFormat";
static const sal_Char sAPI_name[] = "Name";
static const sal_Char sAPI_numbering_separator[] = "NumberingSeparator";
static const sal_Char sAPI_chapter_numbering_level[]= "ChapterNumberingLevel";
static const sal_Char sAPI_value[] = "Value";
static const sal_Char sAPI_is_visible[] = "IsVisible"; static const sal_Char sAPI_is_visible[] = "IsVisible";
static const sal_Char sAPI_data_column_name[] = "DataColumnName";
static const sal_Char sAPI_is_data_base_format[] = "DataBaseFormat";
static const sal_Char sAPI_current_presentation[] = "CurrentPresentation"; static const sal_Char sAPI_current_presentation[] = "CurrentPresentation";
static const sal_Char sAPI_sequence_value[] = "SequenceValue";
static const sal_Char sAPI_is_fixed_language[] = "IsFixedLanguage";
using namespace ::com::sun::star; using namespace ::com::sun::star;
@ -105,11 +86,11 @@ XMLVarFieldImportContext::XMLVarFieldImportContext(
bool bPresentation) : bool bPresentation) :
XMLTextFieldImportContext(rImport, rHlp, pServiceName, nPrfx, rLocalName), XMLTextFieldImportContext(rImport, rHlp, pServiceName, nPrfx, rLocalName),
sPropertyContent(sAPI_content), sPropertyContent(sAPI_content),
sPropertyHint(sAPI_hint), sPropertyHint("Hint"),
sPropertyHelp(sAPI_help), sPropertyHelp("Help"),
sPropertyTooltip(sAPI_tooltip), sPropertyTooltip("Tooltip"),
sPropertyIsVisible(sAPI_is_visible), sPropertyIsVisible(sAPI_is_visible),
sPropertyIsDisplayFormula(sAPI_is_show_formula), sPropertyIsDisplayFormula("IsShowFormula"),
sPropertyCurrentPresentation(sAPI_current_presentation), sPropertyCurrentPresentation(sAPI_current_presentation),
aValueHelper(rImport, rHlp, bType, bStyle, bValue, false), aValueHelper(rImport, rHlp, bType, bStyle, bValue, false),
bDisplayFormula(false), bDisplayFormula(false),
@ -306,7 +287,7 @@ void XMLSetVarFieldImportContext::EndElement()
{ {
// create field/Service // create field/Service
Reference<XPropertySet> xPropSet; Reference<XPropertySet> xPropSet;
if (CreateField(xPropSet, sAPI_textfield_prefix + GetServiceName())) if (CreateField(xPropSet, "com.sun.star.text.TextField." + GetServiceName()))
{ {
Reference<XDependentTextField> xDepTextField(xPropSet, UNO_QUERY); Reference<XDependentTextField> xDepTextField(xPropSet, UNO_QUERY);
if (xDepTextField.is()) if (xDepTextField.is())
@ -366,7 +347,7 @@ XMLSequenceFieldImportContext::XMLSequenceFieldImportContext(
false, false, false, true), false, false, false, true),
sPropertyNumberFormat(sAPI_number_format), sPropertyNumberFormat(sAPI_number_format),
sPropertySequenceValue(sAPI_sequence_value), sPropertySequenceValue("SequenceValue"),
sNumFormat(OUString('1')), sNumFormat(OUString('1')),
sNumFormatSync(GetXMLToken(XML_FALSE)), sNumFormatSync(GetXMLToken(XML_FALSE)),
bRefNameOK(false) bRefNameOK(false)
@ -467,7 +448,7 @@ XMLVariableInputFieldImportContext::XMLVariableInputFieldImportContext(
true, true, true, true, true, true,
true), true),
sPropertySubType(sAPI_sub_type), sPropertySubType(sAPI_sub_type),
sPropertyIsInput(sAPI_is_input) sPropertyIsInput("Input")
{ {
} }
@ -512,7 +493,7 @@ XMLUserFieldImportContext::XMLUserFieldImportContext(
XMLUserFieldInputImportContext::XMLUserFieldInputImportContext( XMLUserFieldInputImportContext::XMLUserFieldInputImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx, SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
const OUString& rLocalName) : const OUString& rLocalName) :
XMLVarFieldImportContext(rImport, rHlp, sAPI_input_user, XMLVarFieldImportContext(rImport, rHlp, "InputUser",
nPrfx, rLocalName, nPrfx, rLocalName,
// description, style // description, style
false, false, false, false,
@ -598,7 +579,7 @@ void XMLExpressionFieldImportContext::PrepareField(
XMLTextInputFieldImportContext::XMLTextInputFieldImportContext( XMLTextInputFieldImportContext::XMLTextInputFieldImportContext(
SvXMLImport& rImport, XMLTextImportHelper& rHlp, SvXMLImport& rImport, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, const OUString& sLocalName) : sal_uInt16 nPrfx, const OUString& sLocalName) :
XMLVarFieldImportContext(rImport, rHlp, sAPI_input, XMLVarFieldImportContext(rImport, rHlp, "Input",
nPrfx, sLocalName, nPrfx, sLocalName,
// description // description
false, false, false, false,
@ -628,7 +609,7 @@ XMLTableFormulaImportContext::XMLTableFormulaImportContext(
XMLTextImportHelper& rHlp, XMLTextImportHelper& rHlp,
sal_uInt16 nPrfx, sal_uInt16 nPrfx,
const OUString& rLocalName) : const OUString& rLocalName) :
XMLTextFieldImportContext(rImport, rHlp, sAPI_table_formula, XMLTextFieldImportContext(rImport, rHlp, "TableFormula",
nPrfx, rLocalName), nPrfx, rLocalName),
sPropertyIsShowFormula("IsShowFormula"), sPropertyIsShowFormula("IsShowFormula"),
sPropertyCurrentPresentation( sPropertyCurrentPresentation(
@ -755,9 +736,9 @@ XMLVariableDeclImportContext::XMLVariableDeclImportContext(
SvXMLImportContext(rImport, nPrfx, rLocalName), SvXMLImportContext(rImport, nPrfx, rLocalName),
// bug?? which properties for userfield/userfieldmaster // bug?? which properties for userfield/userfieldmaster
sPropertySubType(sAPI_sub_type), sPropertySubType(sAPI_sub_type),
sPropertyNumberingLevel(sAPI_chapter_numbering_level), sPropertyNumberingLevel("ChapterNumberingLevel"),
sPropertyNumberingSeparator(sAPI_numbering_separator), sPropertyNumberingSeparator("NumberingSeparator"),
sPropertyIsExpression(sAPI_is_expression), sPropertyIsExpression("IsExpression"),
aValueHelper(rImport, rHlp, true, false, true, false), aValueHelper(rImport, rHlp, true, false, true, false),
nNumLevel(-1), cSeparationChar('.') nNumLevel(-1), cSeparationChar('.')
{ {
@ -963,7 +944,7 @@ bool XMLVariableDeclImportContext::FindFieldMaster(
xMaster = xTmp; xMaster = xTmp;
// set name // set name
xMaster->setPropertyValue(sAPI_name, Any(sName)); xMaster->setPropertyValue("Name", Any(sName));
if (eVarType != VarTypeUserField) { if (eVarType != VarTypeUserField) {
// set subtype for setexp field // set subtype for setexp field
@ -995,8 +976,8 @@ XMLDatabaseDisplayImportContext::XMLDatabaseDisplayImportContext(
const OUString& rLocalName) : const OUString& rLocalName) :
XMLDatabaseFieldImportContext(rImport, rHlp, sAPI_database, XMLDatabaseFieldImportContext(rImport, rHlp, sAPI_database,
nPrfx, rLocalName, false), nPrfx, rLocalName, false),
sPropertyColumnName(sAPI_data_column_name), sPropertyColumnName("DataColumnName"),
sPropertyDatabaseFormat(sAPI_is_data_base_format), sPropertyDatabaseFormat("DataBaseFormat"),
sPropertyCurrentPresentation(sAPI_current_presentation), sPropertyCurrentPresentation(sAPI_current_presentation),
sPropertyIsVisible(sAPI_is_visible), sPropertyIsVisible(sAPI_is_visible),
aValueHelper(rImport, rHlp, false, true, false, false), aValueHelper(rImport, rHlp, false, true, false, false),
@ -1054,7 +1035,7 @@ void XMLDatabaseDisplayImportContext::EndElement()
// create and prepare field master first // create and prepare field master first
if (CreateField(xMaster, if (CreateField(xMaster,
sAPI_fieldmaster_database)) "com.sun.star.text.FieldMaster.Database"))
{ {
Any aAny; Any aAny;
xMaster->setPropertyValue(sPropertyColumnName, Any(sColumnName)); xMaster->setPropertyValue(sPropertyColumnName, Any(sColumnName));
@ -1144,9 +1125,9 @@ XMLValueImportHelper::XMLValueImportHelper(
XMLTextImportHelper& rHlp, XMLTextImportHelper& rHlp,
bool bType, bool bStyle, bool bValue, bool bFormula) : bool bType, bool bStyle, bool bValue, bool bFormula) :
sPropertyContent(sAPI_content), sPropertyContent(sAPI_content),
sPropertyValue(sAPI_value), sPropertyValue("Value"),
sPropertyNumberFormat(sAPI_number_format), sPropertyNumberFormat(sAPI_number_format),
sPropertyIsFixedLanguage(sAPI_is_fixed_language), sPropertyIsFixedLanguage("IsFixedLanguage"),
rImport(rImprt), rImport(rImprt),
rHelper(rHlp), rHelper(rHlp),

View File

@ -1431,8 +1431,7 @@ void XMLTrackedChangesOOoTContext_Impl::StartElement(
OSL_ENSURE( rPropSet.is(), "no info property set" ); OSL_ENSURE( rPropSet.is(), "no info property set" );
if( rPropSet.is() ) if( rPropSet.is() )
{ {
const sal_Char sRedlineProtectionKey[] = "RedlineProtectionKey"; OUString aPropName("RedlineProtectionKey");
OUString aPropName(sRedlineProtectionKey);
Reference< XPropertySetInfo > xPropSetInfo( Reference< XPropertySetInfo > xPropSetInfo(
rPropSet->getPropertySetInfo() ); rPropSet->getPropertySetInfo() );
if( xPropSetInfo.is() && if( xPropSetInfo.is() &&

View File

@ -1515,8 +1515,7 @@ void XMLConfigItemTContext_Impl::EndElement()
GetTransformer().GetPropertySet(); GetTransformer().GetPropertySet();
if( rPropSet.is() ) if( rPropSet.is() )
{ {
const sal_Char sRedlineProtectionKey[] = "RedlineProtectionKey"; OUString aPropName("RedlineProtectionKey");
OUString aPropName(sRedlineProtectionKey);
Reference< XPropertySetInfo > xPropSetInfo( Reference< XPropertySetInfo > xPropSetInfo(
rPropSet->getPropertySetInfo() ); rPropSet->getPropertySetInfo() );
if( xPropSetInfo.is() && if( xPropSetInfo.is() &&
@ -1570,8 +1569,7 @@ void XMLTrackedChangesOASISTContext_Impl::StartElement(
GetTransformer().GetPropertySet(); GetTransformer().GetPropertySet();
if( rPropSet.is() ) if( rPropSet.is() )
{ {
const sal_Char sRedlineProtectionKey[] = "RedlineProtectionKey"; OUString aPropName("RedlineProtectionKey");
OUString aPropName(sRedlineProtectionKey);
Reference< XPropertySetInfo > xPropSetInfo( Reference< XPropertySetInfo > xPropSetInfo(
rPropSet->getPropertySetInfo() ); rPropSet->getPropertySetInfo() );
if( xPropSetInfo.is() && if( xPropSetInfo.is() &&

View File

@ -47,14 +47,13 @@ const ErrDesc allDesc[] = {
const char * const char *
getCertError(PRErrorCode errNum) getCertError(PRErrorCode errNum)
{ {
static const char sEmpty[] = "";
for (const ErrDesc& i : allDesc) for (const ErrDesc& i : allDesc)
{ {
if (i.errNum == errNum) if (i.errNum == errNum)
return i.errString; return i.errString;
} }
return sEmpty; return "";
} }
void void