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:
parent
aeeabc36fd
commit
1b36f23b51
@ -59,7 +59,6 @@ using ::com::sun::star::uno::Reference;
|
||||
namespace
|
||||
{
|
||||
|
||||
const char aLabelPrefix[] = "label ";
|
||||
const char aCategoriesRange[] = "categories";
|
||||
|
||||
typedef ::std::multimap< OUString, OUString >
|
||||
@ -109,7 +108,7 @@ void lcl_fillRangeMapping(
|
||||
sal_Int32 nColOffset = ( rTable.bHasHeaderColumn ? 1 : 0 );
|
||||
|
||||
const OUString lcl_aCategoriesRange(aCategoriesRange);
|
||||
const OUString lcl_aLabelPrefix(aLabelPrefix);
|
||||
const OUString lcl_aLabelPrefix("label ");
|
||||
|
||||
// Fill range mapping
|
||||
const size_t nTableRowCount( rTable.aData.size());
|
||||
|
@ -103,7 +103,6 @@ using namespace ::com::sun::star::xml::sax;
|
||||
using namespace ::com::sun::star::io;
|
||||
using namespace ::xmloff::token;
|
||||
|
||||
sal_Char const sXML_1_1[] = "1.1";
|
||||
sal_Char const sXML_1_2[] = "1.2";
|
||||
|
||||
#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_012_EXT_COMPAT: 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;
|
||||
|
||||
default:
|
||||
|
@ -75,39 +75,6 @@ using namespace ::com::sun::star::container;
|
||||
using namespace ::com::sun::star::document;
|
||||
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 >
|
||||
{
|
||||
private:
|
||||
@ -364,38 +331,38 @@ void SvXMLImport::InitCtor_()
|
||||
{
|
||||
// implicit "xml" namespace prefix
|
||||
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( sXML_np_office_ext, GetXMLToken(XML_N_OFFICE_EXT), XML_NAMESPACE_OFFICE_EXT );
|
||||
mpNamespaceMap->Add( sXML_np_ooo, GetXMLToken(XML_N_OOO), XML_NAMESPACE_OOO );
|
||||
mpNamespaceMap->Add( sXML_np_style, GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
|
||||
mpNamespaceMap->Add( sXML_np_text, GetXMLToken(XML_N_TEXT), XML_NAMESPACE_TEXT );
|
||||
mpNamespaceMap->Add( sXML_np_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( sXML_np_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( sXML_np_dr3d, GetXMLToken(XML_N_DR3D), XML_NAMESPACE_DR3D );
|
||||
mpNamespaceMap->Add( sXML_np_fo, GetXMLToken(XML_N_FO_COMPAT), XML_NAMESPACE_FO );
|
||||
mpNamespaceMap->Add( sXML_np_xlink, GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK );
|
||||
mpNamespaceMap->Add( sXML_np_dc, GetXMLToken(XML_N_DC), XML_NAMESPACE_DC );
|
||||
mpNamespaceMap->Add( sXML_np_dom, GetXMLToken(XML_N_DOM), XML_NAMESPACE_DOM );
|
||||
mpNamespaceMap->Add( sXML_np_meta, GetXMLToken(XML_N_META), XML_NAMESPACE_META );
|
||||
mpNamespaceMap->Add( sXML_np_number, GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER );
|
||||
mpNamespaceMap->Add( sXML_np_svg, GetXMLToken(XML_N_SVG_COMPAT), XML_NAMESPACE_SVG );
|
||||
mpNamespaceMap->Add( sXML_np_chart, GetXMLToken(XML_N_CHART), XML_NAMESPACE_CHART );
|
||||
mpNamespaceMap->Add( sXML_np_math, GetXMLToken(XML_N_MATH), XML_NAMESPACE_MATH );
|
||||
mpNamespaceMap->Add(sXML_np_form, GetXMLToken(XML_N_FORM), XML_NAMESPACE_FORM );
|
||||
mpNamespaceMap->Add( sXML_np_script, GetXMLToken(XML_N_SCRIPT), XML_NAMESPACE_SCRIPT );
|
||||
mpNamespaceMap->Add( sXML_np_config, GetXMLToken(XML_N_CONFIG), XML_NAMESPACE_CONFIG );
|
||||
mpNamespaceMap->Add( sXML_np_xforms, GetXMLToken(XML_N_XFORMS_1_0), XML_NAMESPACE_XFORMS );
|
||||
mpNamespaceMap->Add( sXML_np_formx, GetXMLToken( XML_N_FORMX ), XML_NAMESPACE_FORMX );
|
||||
mpNamespaceMap->Add( sXML_np_xsd, GetXMLToken(XML_N_XSD), XML_NAMESPACE_XSD );
|
||||
mpNamespaceMap->Add( sXML_np_xsi, GetXMLToken(XML_N_XSI), XML_NAMESPACE_XFORMS );
|
||||
mpNamespaceMap->Add( sXML_np_ooow, GetXMLToken(XML_N_OOOW), XML_NAMESPACE_OOOW );
|
||||
mpNamespaceMap->Add( sXML_np_oooc, GetXMLToken(XML_N_OOOC), XML_NAMESPACE_OOOC );
|
||||
mpNamespaceMap->Add( sXML_np_field, GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
|
||||
mpNamespaceMap->Add( sXML_np_of, GetXMLToken(XML_N_OF), XML_NAMESPACE_OF );
|
||||
mpNamespaceMap->Add( sXML_np_xhtml, GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML );
|
||||
mpNamespaceMap->Add( sXML_np_css3text, GetXMLToken(XML_N_CSS3TEXT), XML_NAMESPACE_CSS3TEXT );
|
||||
mpNamespaceMap->Add( "_office", GetXMLToken(XML_N_OFFICE), XML_NAMESPACE_OFFICE );
|
||||
mpNamespaceMap->Add( "_office_ooo", GetXMLToken(XML_N_OFFICE_EXT), XML_NAMESPACE_OFFICE_EXT );
|
||||
mpNamespaceMap->Add( "_ooo", GetXMLToken(XML_N_OOO), XML_NAMESPACE_OOO );
|
||||
mpNamespaceMap->Add( "_style", GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
|
||||
mpNamespaceMap->Add( "_text", GetXMLToken(XML_N_TEXT), XML_NAMESPACE_TEXT );
|
||||
mpNamespaceMap->Add( "_table", GetXMLToken(XML_N_TABLE), XML_NAMESPACE_TABLE );
|
||||
mpNamespaceMap->Add( "_table_ooo", GetXMLToken(XML_N_TABLE_EXT), XML_NAMESPACE_TABLE_EXT );
|
||||
mpNamespaceMap->Add( "_draw", GetXMLToken(XML_N_DRAW), XML_NAMESPACE_DRAW );
|
||||
mpNamespaceMap->Add( "_draw_ooo", GetXMLToken(XML_N_DRAW_EXT), XML_NAMESPACE_DRAW_EXT );
|
||||
mpNamespaceMap->Add( "_dr3d", GetXMLToken(XML_N_DR3D), XML_NAMESPACE_DR3D );
|
||||
mpNamespaceMap->Add( "_fo", GetXMLToken(XML_N_FO_COMPAT), XML_NAMESPACE_FO );
|
||||
mpNamespaceMap->Add( "_xlink", GetXMLToken(XML_N_XLINK), XML_NAMESPACE_XLINK );
|
||||
mpNamespaceMap->Add( "_dc", GetXMLToken(XML_N_DC), XML_NAMESPACE_DC );
|
||||
mpNamespaceMap->Add( "_dom", GetXMLToken(XML_N_DOM), XML_NAMESPACE_DOM );
|
||||
mpNamespaceMap->Add( "_meta", GetXMLToken(XML_N_META), XML_NAMESPACE_META );
|
||||
mpNamespaceMap->Add( "_number", GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER );
|
||||
mpNamespaceMap->Add( "_svg", GetXMLToken(XML_N_SVG_COMPAT), XML_NAMESPACE_SVG );
|
||||
mpNamespaceMap->Add( "_chart", GetXMLToken(XML_N_CHART), XML_NAMESPACE_CHART );
|
||||
mpNamespaceMap->Add( "_math", GetXMLToken(XML_N_MATH), XML_NAMESPACE_MATH );
|
||||
mpNamespaceMap->Add( "_form", GetXMLToken(XML_N_FORM), XML_NAMESPACE_FORM );
|
||||
mpNamespaceMap->Add( "_script", GetXMLToken(XML_N_SCRIPT), XML_NAMESPACE_SCRIPT );
|
||||
mpNamespaceMap->Add( "_config", GetXMLToken(XML_N_CONFIG), XML_NAMESPACE_CONFIG );
|
||||
mpNamespaceMap->Add( "_xforms", GetXMLToken(XML_N_XFORMS_1_0), XML_NAMESPACE_XFORMS );
|
||||
mpNamespaceMap->Add( "_formx", GetXMLToken( XML_N_FORMX ), XML_NAMESPACE_FORMX );
|
||||
mpNamespaceMap->Add( "_xsd", GetXMLToken(XML_N_XSD), XML_NAMESPACE_XSD );
|
||||
mpNamespaceMap->Add( "_xsi", GetXMLToken(XML_N_XSI), XML_NAMESPACE_XFORMS );
|
||||
mpNamespaceMap->Add( "_ooow", GetXMLToken(XML_N_OOOW), XML_NAMESPACE_OOOW );
|
||||
mpNamespaceMap->Add( "_oooc", GetXMLToken(XML_N_OOOC), XML_NAMESPACE_OOOC );
|
||||
mpNamespaceMap->Add( "_field", GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
|
||||
mpNamespaceMap->Add( "_of", GetXMLToken(XML_N_OF), XML_NAMESPACE_OF );
|
||||
mpNamespaceMap->Add( "_xhtml", GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML );
|
||||
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( "_office_libo",
|
||||
|
@ -152,8 +152,6 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons
|
||||
, meDirection(ED_none), mnStartScale(100), meSpeed(AnimationSpeed_MEDIUM)
|
||||
, mnVerb(0), mbPlayFull(false)
|
||||
{
|
||||
static const char sXMLClickName[] = "click";
|
||||
|
||||
if( nPrfx == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_EVENT_LISTENER ) )
|
||||
{
|
||||
mbValid = true;
|
||||
@ -223,7 +221,7 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons
|
||||
sEventName = sValue;
|
||||
sal_uInt16 nScriptPrefix =
|
||||
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 ) )
|
||||
{
|
||||
|
@ -1553,13 +1553,11 @@ namespace xmloff
|
||||
const Reference< XAttributeList >& _rxAttrList)
|
||||
{
|
||||
// is it the "option" sub tag of a listbox ?
|
||||
static const char s_sOptionElementName[] = "option";
|
||||
if (s_sOptionElementName == _rLocalName)
|
||||
if (_rLocalName == "option")
|
||||
return new OListOptionImport(GetImport(), _nPrefix, _rLocalName, this);
|
||||
|
||||
// is it the "item" sub tag of a combobox ?
|
||||
static const char s_sItemElementName[] = "item";
|
||||
if (s_sItemElementName == _rLocalName)
|
||||
if (_rLocalName == "item")
|
||||
return new OComboItemImport(GetImport(), _nPrefix, _rLocalName, this);
|
||||
|
||||
// everything else
|
||||
|
@ -474,8 +474,7 @@ namespace xmloff
|
||||
|
||||
OUString lcl_findFreeControlId( const MapPropertySet2Map& _rAllPagesControlIds )
|
||||
{
|
||||
static const char sControlIdBase[] = "control";
|
||||
OUString sControlId = sControlIdBase;
|
||||
OUString sControlId = "control";
|
||||
|
||||
size_t nKnownControlCount = ::std::accumulate( _rAllPagesControlIds.begin(), _rAllPagesControlIds.end(), (size_t)0, AccumulateSize() );
|
||||
sControlId += OUString::number( (sal_Int32)nKnownControlCount + 1 );
|
||||
|
@ -506,7 +506,6 @@ void OFormLayerXMLImport_Impl::documentDone( )
|
||||
&& FormCellBindingHelper::isCellBindingAllowed( rImport.GetModel() )
|
||||
)
|
||||
{
|
||||
static const char s_sIndex[] = ":index";
|
||||
::std::vector< ModelStringPair >::const_iterator aEnd = m_aCellValueBindings.end();
|
||||
for ( ::std::vector< ModelStringPair >::const_iterator aCellBindings = m_aCellValueBindings.begin();
|
||||
aCellBindings != aEnd;
|
||||
@ -522,7 +521,7 @@ void OFormLayerXMLImport_Impl::documentDone( )
|
||||
// There are special bindings for listboxes. See
|
||||
// OListAndComboImport::doRegisterCellValueBinding for a comment on this HACK.
|
||||
OUString sBoundCellAddress( aCellBindings->second );
|
||||
sal_Int32 nIndicator = sBoundCellAddress.lastIndexOf( s_sIndex );
|
||||
sal_Int32 nIndicator = sBoundCellAddress.lastIndexOf( ":index" );
|
||||
|
||||
bool bUseIndexBinding = false;
|
||||
if ( nIndicator != -1 )
|
||||
|
@ -45,9 +45,6 @@ using namespace ::com::sun::star::xml::sax;
|
||||
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 {
|
||||
XML_TOK_FTN_NOTE_CITATION,
|
||||
XML_TOK_FTN_NOTE_BODY
|
||||
@ -103,8 +100,8 @@ void XMLFootnoteImportContext::StartElement(
|
||||
|
||||
Reference<XInterface> xIfc = xFactory->createInstance(
|
||||
bIsEndnote ?
|
||||
OUString(sAPI_service_endnote) :
|
||||
OUString(sAPI_service_footnote) );
|
||||
OUString("com.sun.star.text.Endnote") :
|
||||
OUString("com.sun.star.text.Footnote") );
|
||||
|
||||
// attach footnote to document
|
||||
Reference<XTextContent> xTextContent(xIfc, UNO_QUERY);
|
||||
|
@ -46,35 +46,23 @@ using ::xmloff::token::IsXMLToken;
|
||||
using ::xmloff::token::XML_ALPHABETICAL_INDEX_ENTRY_TEMPLATE;
|
||||
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(
|
||||
SvXMLImport& rImport,
|
||||
sal_uInt16 nPrfx,
|
||||
const OUString& rLocalName,
|
||||
Reference<XPropertySet> & rPropSet)
|
||||
: XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName, rPropSet, false)
|
||||
, sMainEntryCharacterStyleName(sAPI_MainEntryCharacterStyleName)
|
||||
, sUseAlphabeticalSeparators(sAPI_UseAlphabeticalSeparators)
|
||||
, sUseCombinedEntries(sAPI_UseCombinedEntries)
|
||||
, sIsCaseSensitive(sAPI_IsCaseSensitive)
|
||||
, sUseKeyAsEntry(sAPI_UseKeyAsEntry)
|
||||
, sUseUpperCase(sAPI_UseUpperCase)
|
||||
, sUseDash(sAPI_UseDash)
|
||||
, sUsePP(sAPI_UsePP)
|
||||
, sMainEntryCharacterStyleName("MainEntryCharacterStyleName")
|
||||
, sUseAlphabeticalSeparators("UseAlphabeticalSeparators")
|
||||
, sUseCombinedEntries("UseCombinedEntries")
|
||||
, sIsCaseSensitive("IsCaseSensitive")
|
||||
, sUseKeyAsEntry("UseKeyAsEntry")
|
||||
, sUseUpperCase("UseUpperCase")
|
||||
, sUseDash("UseDash")
|
||||
, sUsePP("UsePP")
|
||||
, sIsCommaSeparated("IsCommaSeparated")
|
||||
, sSortAlgorithm(sAPI_SortAlgorithm)
|
||||
, sLocale(sAPI_Locale)
|
||||
, sSortAlgorithm("SortAlgorithm")
|
||||
, sLocale("Locale")
|
||||
, bMainEntryStyleNameOK(false)
|
||||
, bSeparators(false)
|
||||
, bCombineEntries(true)
|
||||
|
@ -40,9 +40,6 @@ using ::com::sun::star::beans::PropertyValue;
|
||||
using ::com::sun::star::beans::XPropertySet;
|
||||
using ::com::sun::star::lang::XMultiServiceFactory;
|
||||
|
||||
const sal_Char sAPI_FieldMaster_Bibliography[] =
|
||||
"com.sun.star.text.FieldMaster.Bibliography";
|
||||
|
||||
|
||||
XMLIndexBibliographyConfigurationContext::XMLIndexBibliographyConfigurationContext(
|
||||
SvXMLImport& rImport,
|
||||
@ -50,8 +47,7 @@ XMLIndexBibliographyConfigurationContext::XMLIndexBibliographyConfigurationConte
|
||||
const OUString& rLocalName,
|
||||
const Reference<XAttributeList> & xAttrList) :
|
||||
SvXMLStyleContext(rImport, nPrfx, rLocalName, xAttrList, XML_STYLE_FAMILY_TEXT_BIBLIOGRAPHYCONFIG),
|
||||
sFieldMaster_Bibliography(
|
||||
sAPI_FieldMaster_Bibliography),
|
||||
sFieldMaster_Bibliography("com.sun.star.text.FieldMaster.Bibliography"),
|
||||
sBracketBefore("BracketBefore"),
|
||||
sBracketAfter("BracketAfter"),
|
||||
sIsNumberEntries("IsNumberEntries"),
|
||||
|
@ -244,11 +244,9 @@ void XMLIndexMarkExport::GetID(
|
||||
OUStringBuffer& sBuf,
|
||||
const Reference<XPropertySet> & rPropSet)
|
||||
{
|
||||
static const sal_Char sPrefix[] = "IMark";
|
||||
|
||||
// HACK: use address of object to form identifier
|
||||
sal_Int64 nId = sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(rPropSet.get()));
|
||||
sBuf.append(sPrefix);
|
||||
sBuf.append("IMark");
|
||||
sBuf.append(nId);
|
||||
}
|
||||
|
||||
|
@ -46,12 +46,6 @@ using ::xmloff::token::IsXMLToken;
|
||||
using ::xmloff::token::XML_OBJECT_INDEX_ENTRY_TEMPLATE;
|
||||
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(
|
||||
SvXMLImport& rImport,
|
||||
@ -60,11 +54,11 @@ XMLIndexObjectSourceContext::XMLIndexObjectSourceContext(
|
||||
Reference<XPropertySet> & rPropSet) :
|
||||
XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName,
|
||||
rPropSet, false),
|
||||
sCreateFromStarCalc(sAPI_CreateFromStarCalc),
|
||||
sCreateFromStarChart(sAPI_CreateFromStarChart),
|
||||
sCreateFromStarDraw(sAPI_CreateFromStarDraw),
|
||||
sCreateFromStarMath(sAPI_CreateFromStarMath),
|
||||
sCreateFromOtherEmbeddedObjects(sAPI_CreateFromOtherEmbeddedObjects),
|
||||
sCreateFromStarCalc("CreateFromStarCalc"),
|
||||
sCreateFromStarChart("CreateFromStarChart"),
|
||||
sCreateFromStarDraw("CreateFromStarDraw"),
|
||||
sCreateFromStarMath("CreateFromStarMath"),
|
||||
sCreateFromOtherEmbeddedObjects("CreateFromOtherEmbeddedObjects"),
|
||||
bUseCalc(false),
|
||||
bUseChart(false),
|
||||
bUseDraw(false),
|
||||
|
@ -40,9 +40,6 @@ using ::com::sun::star::uno::Reference;
|
||||
using ::com::sun::star::uno::Any;
|
||||
using ::com::sun::star::xml::sax::XAttributeList;
|
||||
|
||||
const sal_Char sAPI_CreateFromChapter[] = "CreateFromChapter";
|
||||
const sal_Char sAPI_IsRelativeTabstops[] = "IsRelativeTabstops";
|
||||
|
||||
static const SvXMLTokenMapEntry aIndexSourceTokenMap[] =
|
||||
{
|
||||
{ XML_NAMESPACE_TEXT,
|
||||
@ -151,8 +148,8 @@ XMLIndexSourceBaseContext::XMLIndexSourceBaseContext(
|
||||
Reference<XPropertySet> & rPropSet,
|
||||
bool bLevelFormats)
|
||||
: SvXMLImportContext(rImport, nPrfx, rLocalName)
|
||||
, sCreateFromChapter(sAPI_CreateFromChapter)
|
||||
, sIsRelativeTabstops(sAPI_IsRelativeTabstops)
|
||||
, sCreateFromChapter("CreateFromChapter")
|
||||
, sIsRelativeTabstops("IsRelativeTabstops")
|
||||
, bUseLevelFormats(bLevelFormats)
|
||||
, bChapterIndex(false)
|
||||
, bRelativeTabs(true)
|
||||
|
@ -40,22 +40,16 @@ using ::com::sun::star::uno::Reference;
|
||||
using ::com::sun::star::uno::Any;
|
||||
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(
|
||||
SvXMLImport& rImport,
|
||||
sal_uInt16 nPrfx,
|
||||
const OUString& rLocalName,
|
||||
Reference<XPropertySet> & rPropSet)
|
||||
: XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName, rPropSet, true)
|
||||
, sCreateFromMarks(sAPI_CreateFromMarks)
|
||||
, sLevel(sAPI_Level)
|
||||
, sCreateFromOutline(sAPI_CreateFromOutline)
|
||||
, sCreateFromLevelParagraphStyles(sAPI_CreateFromLevelParagraphStyles)
|
||||
, sCreateFromMarks("CreateFromMarks")
|
||||
, sLevel("Level")
|
||||
, sCreateFromOutline("CreateFromOutline")
|
||||
, sCreateFromLevelParagraphStyles("CreateFromLevelParagraphStyles")
|
||||
// use all chapters by default
|
||||
, nOutlineLevel(rImport.GetTextImport()->GetChapterNumbering()->getCount())
|
||||
, bUseOutline(true)
|
||||
|
@ -41,14 +41,12 @@ using ::com::sun::star::container::XIndexReplace;
|
||||
using ::com::sun::star::xml::sax::XAttributeList;
|
||||
|
||||
|
||||
const sal_Char sAPI_LevelParagraphStyles[] = "LevelParagraphStyles";
|
||||
|
||||
|
||||
XMLIndexTOCStylesContext::XMLIndexTOCStylesContext(
|
||||
SvXMLImport& rImport, Reference<XPropertySet> & rPropSet,
|
||||
sal_uInt16 nPrfx, const OUString& rLocalName)
|
||||
: SvXMLImportContext(rImport, nPrfx, rLocalName)
|
||||
, sLevelParagraphStyles(sAPI_LevelParagraphStyles)
|
||||
, sLevelParagraphStyles("LevelParagraphStyles")
|
||||
, rTOCPropertySet(rPropSet)
|
||||
, nOutlineLevel(0)
|
||||
{
|
||||
|
@ -47,19 +47,14 @@ using ::com::sun::star::uno::Reference;
|
||||
using ::com::sun::star::uno::Any;
|
||||
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(
|
||||
SvXMLImport& rImport, sal_uInt16 nPrfx,
|
||||
const OUString& rLocalName, Reference<XPropertySet> & rPropSet)
|
||||
: XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName,
|
||||
rPropSet, false)
|
||||
, sCreateFromLabels(sAPI_CreateFromLabels)
|
||||
, sLabelCategory(sAPI_LabelCategory)
|
||||
, sLabelDisplayType(sAPI_LabelDisplayType)
|
||||
, sCreateFromLabels("CreateFromLabels")
|
||||
, sLabelCategory("LabelCategory")
|
||||
, sLabelDisplayType("LabelDisplayType")
|
||||
, nDisplayFormat(0)
|
||||
, bSequenceOK(false)
|
||||
, bDisplayFormatOK(false)
|
||||
|
@ -47,18 +47,6 @@ using ::com::sun::star::uno::Any;
|
||||
using ::com::sun::star::xml::sax::XAttributeList;
|
||||
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(
|
||||
SvXMLImport& rImport,
|
||||
Reference<XPropertySet> & rPropSet,
|
||||
@ -79,15 +67,15 @@ XMLIndexTemplateContext::XMLIndexTemplateContext(
|
||||
, bOutlineLevelOK(false)
|
||||
, bTOC( bT )
|
||||
, rPropertySet(rPropSet)
|
||||
, sTokenEntryNumber(sAPI_TokenEntryNumber)
|
||||
, sTokenEntryText(sAPI_TokenEntryText)
|
||||
, sTokenTabStop(sAPI_TokenTabStop)
|
||||
, sTokenText(sAPI_TokenText)
|
||||
, sTokenPageNumber(sAPI_TokenPageNumber)
|
||||
, sTokenChapterInfo(sAPI_TokenChapterInfo)
|
||||
, sTokenHyperlinkStart(sAPI_TokenHyperlinkStart)
|
||||
, sTokenHyperlinkEnd(sAPI_TokenHyperlinkEnd)
|
||||
, sTokenBibliographyDataField(sAPI_TokenBibliographyDataField)
|
||||
, sTokenEntryNumber("TokenEntryNumber")
|
||||
, sTokenEntryText("TokenEntryText")
|
||||
, sTokenTabStop("TokenTabStop")
|
||||
, sTokenText("TokenText")
|
||||
, sTokenPageNumber("TokenPageNumber")
|
||||
, sTokenChapterInfo("TokenChapterInfo")
|
||||
, sTokenHyperlinkStart("TokenHyperlinkStart")
|
||||
, sTokenHyperlinkEnd("TokenHyperlinkEnd")
|
||||
, sTokenBibliographyDataField("TokenBibliographyDataField")
|
||||
|
||||
, sCharacterStyleName("CharacterStyleName")
|
||||
, sTokenType("TokenType")
|
||||
|
@ -41,17 +41,6 @@ using ::xmloff::token::IsXMLToken;
|
||||
using ::xmloff::token::XML_USER_INDEX_ENTRY_TEMPLATE;
|
||||
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(
|
||||
SvXMLImport& rImport,
|
||||
sal_uInt16 nPrfx,
|
||||
@ -59,14 +48,14 @@ XMLIndexUserSourceContext::XMLIndexUserSourceContext(
|
||||
Reference<XPropertySet> & rPropSet) :
|
||||
XMLIndexSourceBaseContext(rImport, nPrfx, rLocalName,
|
||||
rPropSet, true),
|
||||
sCreateFromEmbeddedObjects(sAPI_CreateFromEmbeddedObjects),
|
||||
sCreateFromGraphicObjects(sAPI_CreateFromGraphicObjects),
|
||||
sCreateFromMarks(sAPI_CreateFromMarks),
|
||||
sCreateFromTables(sAPI_CreateFromTables),
|
||||
sCreateFromTextFrames(sAPI_CreateFromTextFrames),
|
||||
sUseLevelFromSource(sAPI_UseLevelFromSource),
|
||||
sCreateFromLevelParagraphStyles(sAPI_CreateFromLevelParagraphStyles),
|
||||
sUserIndexName(sAPI_UserIndexName),
|
||||
sCreateFromEmbeddedObjects("CreateFromEmbeddedObjects"),
|
||||
sCreateFromGraphicObjects("CreateFromGraphicObjects"),
|
||||
sCreateFromMarks("CreateFromMarks"),
|
||||
sCreateFromTables("CreateFromTables"),
|
||||
sCreateFromTextFrames("CreateFromTextFrames"),
|
||||
sUseLevelFromSource("UseLevelFromSource"),
|
||||
sCreateFromLevelParagraphStyles("CreateFromLevelParagraphStyles"),
|
||||
sUserIndexName("UserIndexName"),
|
||||
bUseObjects(false),
|
||||
bUseGraphic(false),
|
||||
bUseMarks(false),
|
||||
|
@ -179,11 +179,10 @@ XMLPropertyBackpatcher<sal_Int16>& XMLTextImportHelper::GetSequenceIdBP()
|
||||
|
||||
XMLPropertyBackpatcher<OUString>& XMLTextImportHelper::GetSequenceNameBP()
|
||||
{
|
||||
static const char s_SourceName[] = "SourceName";
|
||||
if (!m_xBackpatcherImpl->m_pSequenceNameBackpatcher.get())
|
||||
{
|
||||
m_xBackpatcherImpl->m_pSequenceNameBackpatcher.reset(
|
||||
new XMLPropertyBackpatcher<OUString>(s_SourceName));
|
||||
new XMLPropertyBackpatcher<OUString>("SourceName"));
|
||||
}
|
||||
return *m_xBackpatcherImpl->m_pSequenceNameBackpatcher;
|
||||
}
|
||||
|
@ -1605,9 +1605,6 @@ void XMLSectionExport::ExportBoolean(
|
||||
}
|
||||
}
|
||||
|
||||
const sal_Char sAPI_FieldMaster_Bibliography[] =
|
||||
"com.sun.star.text.FieldMaster.Bibliography";
|
||||
|
||||
void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
|
||||
{
|
||||
// first: get field master (via text field supplier)
|
||||
@ -1615,7 +1612,7 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
|
||||
UNO_QUERY );
|
||||
if ( xTextFieldsSupp.is() )
|
||||
{
|
||||
const OUString sFieldMaster_Bibliography(sAPI_FieldMaster_Bibliography);
|
||||
const OUString sFieldMaster_Bibliography("com.sun.star.text.FieldMaster.Bibliography");
|
||||
|
||||
// get bibliography field master
|
||||
Reference<XNameAccess> xMasters =
|
||||
|
@ -47,14 +47,6 @@ using namespace ::com::sun::star::text;
|
||||
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
|
||||
{
|
||||
XML_TOK_SECTION_XMLID,
|
||||
@ -93,13 +85,13 @@ XMLSectionImportContext::XMLSectionImportContext(
|
||||
sal_uInt16 nPrfx,
|
||||
const OUString& rLocalName )
|
||||
: SvXMLImportContext(rImport, nPrfx, rLocalName)
|
||||
, sTextSection(sAPI_TextSection)
|
||||
, sIndexHeaderSection(sAPI_IndexHeaderSection)
|
||||
, sCondition(sAPI_Condition)
|
||||
, sIsVisible(sAPI_IsVisible)
|
||||
, sProtectionKey(sAPI_ProtectionKey)
|
||||
, sIsProtected(sAPI_IsProtected)
|
||||
, sIsCurrentlyVisible(sAPI_IsCurrentlyVisible)
|
||||
, sTextSection("com.sun.star.text.TextSection")
|
||||
, sIndexHeaderSection("com.sun.star.text.IndexHeaderSection")
|
||||
, sCondition("Condition")
|
||||
, sIsVisible("IsVisible")
|
||||
, sProtectionKey("ProtectionKey")
|
||||
, sIsProtected("IsProtected")
|
||||
, sIsCurrentlyVisible("IsCurrentlyVisible")
|
||||
, bProtect(false)
|
||||
, bCondOK(false)
|
||||
, bIsVisible(true)
|
||||
@ -199,11 +191,10 @@ void XMLSectionImportContext::StartElement(
|
||||
Reference<XTextRange> xStart =
|
||||
rHelper->GetCursor()->getStart();
|
||||
#ifndef DBG_UTIL
|
||||
static const sal_Char sMarker[] = " ";
|
||||
OUString sMarkerString(" ");
|
||||
#else
|
||||
static const sal_Char sMarker[] = "X";
|
||||
OUString sMarkerString("X");
|
||||
#endif
|
||||
OUString sMarkerString(sMarker);
|
||||
rHelper->InsertString(sMarkerString);
|
||||
rHelper->InsertControlCharacter(
|
||||
ControlCharacter::APPEND_PARAGRAPH );
|
||||
|
@ -41,12 +41,6 @@ using namespace ::com::sun::star::uno;
|
||||
using namespace ::com::sun::star::text;
|
||||
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(
|
||||
SvXMLImport& rImport,
|
||||
sal_uInt16 nPrfx,
|
||||
@ -54,10 +48,10 @@ XMLSectionSourceDDEImportContext::XMLSectionSourceDDEImportContext(
|
||||
Reference<XPropertySet> & rSectPropSet) :
|
||||
SvXMLImportContext(rImport, nPrfx, rLocalName),
|
||||
rSectionPropertySet(rSectPropSet),
|
||||
sDdeCommandFile(sAPI_DDECommandFile),
|
||||
sDdeCommandType(sAPI_DDECommandType),
|
||||
sDdeCommandElement(sAPI_DDECommandElement),
|
||||
sIsAutomaticUpdate(sAPI_IsAutomaticUpdate)
|
||||
sDdeCommandFile("DDECommandFile"),
|
||||
sDdeCommandType("DDECommandType"),
|
||||
sDdeCommandElement("DDECommandElement"),
|
||||
sIsAutomaticUpdate("IsAutomaticUpdate")
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,6 @@ XMLTextListItemContext::XMLTextListItemContext(
|
||||
mnSubListCount( 0 ),
|
||||
mxNumRulesOverride()
|
||||
{
|
||||
static const char s_NumberingRules[] = "NumberingRules";
|
||||
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
|
||||
for( sal_Int16 i=0; i < nAttrCount; i++ )
|
||||
{
|
||||
@ -85,7 +84,7 @@ XMLTextListItemContext::XMLTextListItemContext(
|
||||
aAny >>= xStyle;
|
||||
|
||||
uno::Reference< beans::XPropertySet > xPropSet( xStyle, UNO_QUERY );
|
||||
aAny = xPropSet->getPropertyValue(s_NumberingRules);
|
||||
aAny = xPropSet->getPropertyValue("NumberingRules");
|
||||
aAny >>= mxNumRulesOverride;
|
||||
}
|
||||
else
|
||||
|
@ -128,16 +128,14 @@ static SvXMLEnumMapEntry const lcl_aMarkTypeMap[] =
|
||||
|
||||
static const char *lcl_getFormFieldmarkName(OUString &name)
|
||||
{
|
||||
static const char sCheckbox[]=ODF_FORMCHECKBOX;
|
||||
static const char sFormDropDown[]=ODF_FORMDROPDOWN;
|
||||
if (name == "msoffice.field.FORMCHECKBOX" ||
|
||||
name == "ecma.office-open-xml.field.FORMCHECKBOX")
|
||||
return sCheckbox;
|
||||
return ODF_FORMCHECKBOX;
|
||||
else if (name == ODF_FORMCHECKBOX)
|
||||
return sCheckbox;
|
||||
if (name == ODF_FORMDROPDOWN ||
|
||||
return ODF_FORMCHECKBOX;
|
||||
else if (name == ODF_FORMDROPDOWN ||
|
||||
name == "ecma.office-open-xml.field.FORMDROPDOWN")
|
||||
return sFormDropDown;
|
||||
return ODF_FORMDROPDOWN;
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
@ -179,10 +177,7 @@ void XMLTextMarkImportContext::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_fieldmark[] = "com.sun.star.text.Fieldmark";
|
||||
static const char sAPI_formfieldmark[] = "com.sun.star.text.FormFieldmark";
|
||||
|
||||
if (!m_sBookmarkName.isEmpty())
|
||||
{
|
||||
@ -195,7 +190,7 @@ void XMLTextMarkImportContext::EndElement()
|
||||
case TypeReference:
|
||||
// export point reference mark
|
||||
CreateAndInsertMark(GetImport(),
|
||||
sAPI_reference_mark,
|
||||
"com.sun.star.text.ReferenceMark",
|
||||
m_sBookmarkName,
|
||||
m_rHelper.GetCursorAsRange()->getStart());
|
||||
break;
|
||||
@ -223,7 +218,7 @@ void XMLTextMarkImportContext::EndElement()
|
||||
// export point bookmark
|
||||
const Reference<XInterface> xContent(
|
||||
CreateAndInsertMark(GetImport(),
|
||||
(bImportAsField ? OUString(sAPI_formfieldmark) : OUString(sAPI_bookmark)),
|
||||
(bImportAsField ? OUString("com.sun.star.text.FormFieldmark") : OUString(sAPI_bookmark)),
|
||||
m_sBookmarkName,
|
||||
m_rHelper.GetCursorAsRange()->getStart(),
|
||||
m_sXmlId) );
|
||||
@ -341,7 +336,7 @@ void XMLTextMarkImportContext::EndElement()
|
||||
// insert reference
|
||||
xContent = CreateAndInsertMark(GetImport(),
|
||||
(bImportAsField
|
||||
? OUString(sAPI_fieldmark)
|
||||
? OUString("com.sun.star.text.Fieldmark")
|
||||
: OUString(sAPI_bookmark)),
|
||||
m_sBookmarkName,
|
||||
xInsertionCursor,
|
||||
|
@ -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_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_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_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_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_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_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_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
|
||||
const sal_Char sAPI_is_fixed[] = "IsFixed";
|
||||
const sal_Char sAPI_content[] = "Content";
|
||||
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_name[] = "Name";
|
||||
const sal_Char sAPI_sub_type[] = "SubType";
|
||||
const sal_Char sAPI_date_time_value[] = "DateTimeValue";
|
||||
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_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_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_chapter_format[] = "ChapterFormat";
|
||||
const sal_Char sAPI_level[] = "Level";
|
||||
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_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_condition_true[] = "IsConditionTrue";
|
||||
const sal_Char sAPI_data_command_type[] = "DataCommandType";
|
||||
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";
|
||||
|
||||
@ -617,10 +543,10 @@ XMLSenderFieldImportContext::XMLSenderFieldImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx, const OUString& sLocalName,
|
||||
sal_uInt16 nToken)
|
||||
: XMLTextFieldImportContext(rImport, rHlp, sAPI_extended_user,nPrfx, sLocalName)
|
||||
: XMLTextFieldImportContext(rImport, rHlp, "ExtendedUser", nPrfx, sLocalName)
|
||||
, nSubType(0)
|
||||
, sPropertyFixed(sAPI_is_fixed)
|
||||
, sPropertyFieldSubType(sAPI_user_data_type)
|
||||
, sPropertyFieldSubType("UserDataType")
|
||||
, sPropertyContent(sAPI_content)
|
||||
, bFixed(true)
|
||||
, nElementToken(nToken)
|
||||
@ -739,7 +665,7 @@ XMLAuthorFieldImportContext::XMLAuthorFieldImportContext(
|
||||
: XMLSenderFieldImportContext(rImport, rHlp, nPrfx, sLocalName, nToken)
|
||||
, bAuthorFullName(true)
|
||||
, sServiceAuthor(sAPI_author)
|
||||
, sPropertyAuthorFullName(sAPI_full_name)
|
||||
, sPropertyAuthorFullName("FullName")
|
||||
, sPropertyFixed(sAPI_is_fixed)
|
||||
, sPropertyContent(sAPI_content)
|
||||
{
|
||||
@ -800,7 +726,7 @@ XMLPageContinuationImportContext::XMLPageContinuationImportContext(
|
||||
const OUString& sLocalName)
|
||||
: XMLTextFieldImportContext(rImport, rHlp, sAPI_page_number, nPrfx, sLocalName)
|
||||
, sPropertySubType(sAPI_sub_type)
|
||||
, sPropertyUserText(sAPI_user_text)
|
||||
, sPropertyUserText("UserText")
|
||||
, sPropertyNumberingType(sAPI_numbering_type)
|
||||
, eSelectPage(PageNumberType_CURRENT)
|
||||
, sStringOK(false)
|
||||
@ -954,9 +880,9 @@ void XMLPageNumberImportContext::PrepareField(
|
||||
XMLPlaceholderFieldImportContext::XMLPlaceholderFieldImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx, const OUString& sLocalName)
|
||||
: XMLTextFieldImportContext(rImport, rHlp, sAPI_jump_edit,nPrfx, sLocalName)
|
||||
, sPropertyPlaceholderType(sAPI_place_holder_type)
|
||||
, sPropertyPlaceholder(sAPI_place_holder)
|
||||
: XMLTextFieldImportContext(rImport, rHlp, "JumpEdit", nPrfx, sLocalName)
|
||||
, sPropertyPlaceholderType("PlaceHolderType")
|
||||
, sPropertyPlaceholder("PlaceHolder")
|
||||
, sPropertyHint(sAPI_hint)
|
||||
, nPlaceholderType(PlaceholderType::TEXT)
|
||||
{
|
||||
@ -1041,7 +967,7 @@ XMLTimeFieldImportContext::XMLTimeFieldImportContext(
|
||||
, sPropertyFixed(sAPI_is_fixed)
|
||||
, sPropertyDateTimeValue(sAPI_date_time_value)
|
||||
, sPropertyDateTime(sAPI_date_time)
|
||||
, sPropertyAdjust(sAPI_adjust)
|
||||
, sPropertyAdjust("Adjust")
|
||||
, sPropertyIsDate(sAPI_is_date)
|
||||
, sPropertyIsFixedLanguage(sAPI_is_fixed_language)
|
||||
, nAdjust(0)
|
||||
@ -1214,11 +1140,11 @@ XMLDatabaseFieldImportContext::XMLDatabaseFieldImportContext(
|
||||
const sal_Char* pServiceName, sal_uInt16 nPrfx,
|
||||
const OUString& sLocalName, bool bUseDisply)
|
||||
: XMLTextFieldImportContext(rImport, rHlp, pServiceName, nPrfx, sLocalName)
|
||||
, sPropertyDataBaseName(sAPI_data_base_name)
|
||||
, sPropertyDataBaseURL(sAPI_data_base_u_r_l)
|
||||
, sPropertyTableName(sAPI_data_table_name)
|
||||
, sPropertyDataCommandType(sAPI_data_command_type)
|
||||
, sPropertyIsVisible(sAPI_is_visible)
|
||||
, sPropertyDataBaseName("DataBaseName")
|
||||
, sPropertyDataBaseURL("DataBaseURL")
|
||||
, sPropertyTableName("DataTableName")
|
||||
, sPropertyDataCommandType("DataCommandType")
|
||||
, sPropertyIsVisible("IsVisible")
|
||||
, nCommandType( sdb::CommandType::TABLE )
|
||||
, bCommandTypeOK(false)
|
||||
, bDisplay( true )
|
||||
@ -1345,7 +1271,7 @@ void XMLDatabaseFieldImportContext::PrepareField(
|
||||
XMLDatabaseNameImportContext::XMLDatabaseNameImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx, const OUString& sLocalName) :
|
||||
XMLDatabaseFieldImportContext(rImport, rHlp, sAPI_database_name,
|
||||
XMLDatabaseFieldImportContext(rImport, rHlp, "DatabaseName",
|
||||
nPrfx, sLocalName, true)
|
||||
{
|
||||
}
|
||||
@ -1378,7 +1304,7 @@ XMLDatabaseNextImportContext::XMLDatabaseNextImportContext(
|
||||
XMLDatabaseNextImportContext::XMLDatabaseNextImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
|
||||
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)
|
||||
, sTrue(sAPI_true)
|
||||
, bConditionOK(false)
|
||||
@ -1428,7 +1354,7 @@ void XMLDatabaseNextImportContext::PrepareField(
|
||||
XMLDatabaseSelectImportContext::XMLDatabaseSelectImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx, const OUString& sLocalName) :
|
||||
XMLDatabaseNextImportContext(rImport, rHlp, sAPI_database_select,
|
||||
XMLDatabaseNextImportContext(rImport, rHlp, "DatabaseNumberOfSet",
|
||||
nPrfx, sLocalName),
|
||||
sPropertySetNumber(sAPI_set_number),
|
||||
nNumber(0),
|
||||
@ -1473,7 +1399,7 @@ void XMLDatabaseSelectImportContext::PrepareField(
|
||||
XMLDatabaseNumberImportContext::XMLDatabaseNumberImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx, const OUString& sLocalName) :
|
||||
XMLDatabaseFieldImportContext(rImport, rHlp, sAPI_database_number,
|
||||
XMLDatabaseFieldImportContext(rImport, rHlp, "DatabaseSetNumber",
|
||||
nPrfx, sLocalName, true),
|
||||
sPropertyNumberingType(
|
||||
sAPI_numbering_type),
|
||||
@ -1616,7 +1542,7 @@ const sal_Char* XMLSimpleDocInfoImportContext::MapTokenToServiceName(
|
||||
switch(nToken)
|
||||
{
|
||||
case XML_TOK_TEXT_DOCUMENT_CREATION_AUTHOR:
|
||||
pServiceName = sAPI_docinfo_create_author;
|
||||
pServiceName = "DocInfo.CreateAuthor";
|
||||
break;
|
||||
case XML_TOK_TEXT_DOCUMENT_CREATION_DATE:
|
||||
pServiceName = sAPI_docinfo_create_date_time;
|
||||
@ -1625,16 +1551,16 @@ const sal_Char* XMLSimpleDocInfoImportContext::MapTokenToServiceName(
|
||||
pServiceName = sAPI_docinfo_create_date_time;
|
||||
break;
|
||||
case XML_TOK_TEXT_DOCUMENT_DESCRIPTION:
|
||||
pServiceName = sAPI_docinfo_description;
|
||||
pServiceName = "DocInfo.Description";
|
||||
break;
|
||||
case XML_TOK_TEXT_DOCUMENT_EDIT_DURATION:
|
||||
pServiceName = sAPI_docinfo_edit_time;
|
||||
pServiceName = "DocInfo.EditTime";
|
||||
break;
|
||||
case XML_TOK_TEXT_DOCUMENT_USER_DEFINED:
|
||||
pServiceName = sAPI_docinfo_custom;
|
||||
break;
|
||||
case XML_TOK_TEXT_DOCUMENT_PRINT_AUTHOR:
|
||||
pServiceName = sAPI_docinfo_print_author;
|
||||
pServiceName = "DocInfo.PrintAuthor";
|
||||
break;
|
||||
case XML_TOK_TEXT_DOCUMENT_PRINT_DATE:
|
||||
pServiceName = sAPI_docinfo_print_date_time;
|
||||
@ -1643,16 +1569,16 @@ const sal_Char* XMLSimpleDocInfoImportContext::MapTokenToServiceName(
|
||||
pServiceName = sAPI_docinfo_print_date_time;
|
||||
break;
|
||||
case XML_TOK_TEXT_DOCUMENT_KEYWORDS:
|
||||
pServiceName = sAPI_docinfo_keywords;
|
||||
pServiceName = "DocInfo.KeyWords";
|
||||
break;
|
||||
case XML_TOK_TEXT_DOCUMENT_SUBJECT:
|
||||
pServiceName = sAPI_docinfo_subject;
|
||||
pServiceName = "DocInfo.Subject";
|
||||
break;
|
||||
case XML_TOK_TEXT_DOCUMENT_REVISION:
|
||||
pServiceName = sAPI_docinfo_revision;
|
||||
pServiceName = "DocInfo.Revision";
|
||||
break;
|
||||
case XML_TOK_TEXT_DOCUMENT_SAVE_AUTHOR:
|
||||
pServiceName = sAPI_docinfo_change_author;
|
||||
pServiceName = "DocInfo.ChangeAuthor";
|
||||
break;
|
||||
case XML_TOK_TEXT_DOCUMENT_SAVE_DATE:
|
||||
pServiceName = sAPI_docinfo_change_date_time;
|
||||
@ -1661,7 +1587,7 @@ const sal_Char* XMLSimpleDocInfoImportContext::MapTokenToServiceName(
|
||||
pServiceName = sAPI_docinfo_change_date_time;
|
||||
break;
|
||||
case XML_TOK_TEXT_DOCUMENT_TITLE:
|
||||
pServiceName = sAPI_docinfo_title;
|
||||
pServiceName = "DocInfo.Title";
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -1682,7 +1608,7 @@ XMLRevisionDocInfoImportContext::XMLRevisionDocInfoImportContext(
|
||||
const OUString& sLocalName, sal_uInt16 nToken) :
|
||||
XMLSimpleDocInfoImportContext(rImport, rHlp, nPrfx, sLocalName,
|
||||
nToken, false, false),
|
||||
sPropertyRevision(sAPI_revision)
|
||||
sPropertyRevision("Revision")
|
||||
{
|
||||
bValid = true;
|
||||
}
|
||||
@ -1900,7 +1826,7 @@ void XMLUserDocInfoImportContext::PrepareField(
|
||||
XMLHiddenParagraphImportContext::XMLHiddenParagraphImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx, const OUString& sLocalName) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_hidden_paragraph,
|
||||
XMLTextFieldImportContext(rImport, rHlp, "HiddenParagraph",
|
||||
nPrfx, sLocalName),
|
||||
sPropertyCondition(sAPI_condition),
|
||||
sPropertyIsHidden(sAPI_is_hidden),
|
||||
@ -1950,12 +1876,12 @@ void XMLHiddenParagraphImportContext::PrepareField(
|
||||
XMLConditionalTextImportContext::XMLConditionalTextImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx, const OUString& sLocalName) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_conditional_text,
|
||||
XMLTextFieldImportContext(rImport, rHlp, "ConditionalText",
|
||||
nPrfx, sLocalName),
|
||||
sPropertyCondition(sAPI_condition),
|
||||
sPropertyTrueContent(sAPI_true_content),
|
||||
sPropertyFalseContent(sAPI_false_content),
|
||||
sPropertyIsConditionTrue(sAPI_is_condition_true),
|
||||
sPropertyTrueContent("TrueContent"),
|
||||
sPropertyFalseContent("FalseContent"),
|
||||
sPropertyIsConditionTrue("IsConditionTrue"),
|
||||
sPropertyCurrentPresentation(sAPI_current_presentation),
|
||||
bConditionOK(false),
|
||||
bTrueOK(false),
|
||||
@ -2023,7 +1949,7 @@ void XMLConditionalTextImportContext::PrepareField(
|
||||
XMLHiddenTextImportContext::XMLHiddenTextImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx, const OUString& sLocalName) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_hidden_text,
|
||||
XMLTextFieldImportContext(rImport, rHlp, "HiddenText",
|
||||
nPrfx, sLocalName),
|
||||
sPropertyCondition(sAPI_condition),
|
||||
sPropertyContent(sAPI_content),
|
||||
@ -2096,7 +2022,7 @@ static const SvXMLEnumMapEntry aFilenameDisplayMap[] =
|
||||
XMLFileNameImportContext::XMLFileNameImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
|
||||
const OUString& sLocalName) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_file_name,
|
||||
XMLTextFieldImportContext(rImport, rHlp, "FileName",
|
||||
nPrfx, sLocalName),
|
||||
sPropertyFixed(sAPI_is_fixed),
|
||||
sPropertyFileFormat(sAPI_file_format),
|
||||
@ -2181,7 +2107,7 @@ static const SvXMLEnumMapEntry aTemplateDisplayMap[] =
|
||||
XMLTemplateNameImportContext::XMLTemplateNameImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
|
||||
const OUString& sLocalName) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_template_name,
|
||||
XMLTextFieldImportContext(rImport, rHlp, "TemplateName",
|
||||
nPrfx, sLocalName),
|
||||
sPropertyFileFormat(sAPI_file_format),
|
||||
nFormat(TemplateDisplayFormat::FULL)
|
||||
@ -2234,11 +2160,10 @@ static const SvXMLEnumMapEntry aChapterDisplayMap[] =
|
||||
XMLChapterImportContext::XMLChapterImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx, const OUString& sLocalName) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_chapter,
|
||||
XMLTextFieldImportContext(rImport, rHlp, "Chapter",
|
||||
nPrfx, sLocalName),
|
||||
sPropertyChapterFormat(
|
||||
sAPI_chapter_format),
|
||||
sPropertyLevel(sAPI_level),
|
||||
sPropertyChapterFormat("ChapterFormat"),
|
||||
sPropertyLevel("Level"),
|
||||
nFormat(ChapterFormat::NAME_NUMBER),
|
||||
nLevel(0)
|
||||
{
|
||||
@ -2353,25 +2278,25 @@ const sal_Char* XMLCountFieldImportContext::MapTokenToServiceName(
|
||||
switch (nToken)
|
||||
{
|
||||
case XML_TOK_TEXT_WORD_COUNT:
|
||||
pServiceName = sAPI_word_count;
|
||||
pServiceName = "WordCount";
|
||||
break;
|
||||
case XML_TOK_TEXT_PARAGRAPH_COUNT:
|
||||
pServiceName = sAPI_paragraph_count;
|
||||
pServiceName = "ParagraphCount";
|
||||
break;
|
||||
case XML_TOK_TEXT_TABLE_COUNT:
|
||||
pServiceName = sAPI_table_count;
|
||||
pServiceName = "TableCount";
|
||||
break;
|
||||
case XML_TOK_TEXT_CHARACTER_COUNT:
|
||||
pServiceName = sAPI_character_count;
|
||||
pServiceName = "CharacterCount";
|
||||
break;
|
||||
case XML_TOK_TEXT_IMAGE_COUNT:
|
||||
pServiceName = sAPI_graphic_object_count;
|
||||
pServiceName = "GraphicObjectCount";
|
||||
break;
|
||||
case XML_TOK_TEXT_OBJECT_COUNT:
|
||||
pServiceName = sAPI_embedded_object_count;
|
||||
pServiceName = "EmbeddedObjectCount";
|
||||
break;
|
||||
case XML_TOK_TEXT_PAGE_COUNT:
|
||||
pServiceName = sAPI_page_count;
|
||||
pServiceName = "PageCount";
|
||||
break;
|
||||
default:
|
||||
pServiceName = nullptr;
|
||||
@ -2389,7 +2314,7 @@ const sal_Char* XMLCountFieldImportContext::MapTokenToServiceName(
|
||||
XMLPageVarGetFieldImportContext::XMLPageVarGetFieldImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx, const OUString& sLocalName) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_reference_page_get,
|
||||
XMLTextFieldImportContext(rImport, rHlp, "ReferencePageGet",
|
||||
nPrfx, sLocalName),
|
||||
sPropertyNumberingType(
|
||||
sAPI_numbering_type),
|
||||
@ -2442,9 +2367,9 @@ void XMLPageVarGetFieldImportContext::PrepareField(
|
||||
XMLPageVarSetFieldImportContext::XMLPageVarSetFieldImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
|
||||
const OUString& sLocalName) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_reference_page_set,
|
||||
XMLTextFieldImportContext(rImport, rHlp, "ReferencePageSet",
|
||||
nPrfx, sLocalName),
|
||||
sPropertyOn(sAPI_on),
|
||||
sPropertyOn("On"),
|
||||
sPropertyOffset(sAPI_offset),
|
||||
nAdjust(0),
|
||||
bActive(true)
|
||||
@ -2495,7 +2420,7 @@ void XMLPageVarSetFieldImportContext::PrepareField(
|
||||
XMLMacroFieldImportContext::XMLMacroFieldImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
|
||||
const OUString& sLocalName) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_macro,
|
||||
XMLTextFieldImportContext(rImport, rHlp, "Macro",
|
||||
nPrfx, sLocalName),
|
||||
sPropertyHint(sAPI_hint),
|
||||
sPropertyMacroName("MacroName"),
|
||||
@ -2626,10 +2551,10 @@ void XMLMacroFieldImportContext::PrepareField(
|
||||
XMLReferenceFieldImportContext::XMLReferenceFieldImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nToken, sal_uInt16 nPrfx, const OUString& sLocalName)
|
||||
: XMLTextFieldImportContext(rImport, rHlp, sAPI_get_reference, nPrfx, sLocalName)
|
||||
, sPropertyReferenceFieldPart(sAPI_reference_field_part)
|
||||
, sPropertyReferenceFieldSource(sAPI_reference_field_source)
|
||||
, sPropertySourceName(sAPI_source_name)
|
||||
: XMLTextFieldImportContext(rImport, rHlp, "GetReference", nPrfx, sLocalName)
|
||||
, sPropertyReferenceFieldPart("ReferenceFieldPart")
|
||||
, sPropertyReferenceFieldSource("ReferenceFieldSource")
|
||||
, sPropertySourceName("SourceName")
|
||||
, sPropertyCurrentPresentation(sAPI_current_presentation)
|
||||
, nElementToken(nToken)
|
||||
, nSource(0)
|
||||
@ -2807,11 +2732,11 @@ XMLDdeFieldDeclImportContext::XMLDdeFieldDeclImportContext(
|
||||
SvXMLImport& rImport, sal_uInt16 nPrfx,
|
||||
const OUString& sLocalName, const SvXMLTokenMap& rMap)
|
||||
: SvXMLImportContext(rImport, nPrfx, sLocalName)
|
||||
, sPropertyIsAutomaticUpdate(sAPI_is_automatic_update)
|
||||
, sPropertyIsAutomaticUpdate("IsAutomaticUpdate")
|
||||
, sPropertyName(sAPI_name)
|
||||
, sPropertyDDECommandType(sAPI_dde_command_type)
|
||||
, sPropertyDDECommandFile(sAPI_dde_command_file)
|
||||
, sPropertyDDECommandElement(sAPI_dde_command_element)
|
||||
, sPropertyDDECommandType("DDECommandType")
|
||||
, sPropertyDDECommandFile("DDECommandFile")
|
||||
, sPropertyDDECommandElement("DDECommandElement")
|
||||
, rTokenMap(rMap)
|
||||
{
|
||||
DBG_ASSERT(XML_NAMESPACE_TEXT == nPrfx, "wrong prefix");
|
||||
@ -3019,7 +2944,7 @@ XMLSheetNameImportContext::XMLSheetNameImportContext(
|
||||
XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx,
|
||||
const OUString& sLocalName) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_sheet_name,
|
||||
XMLTextFieldImportContext(rImport, rHlp, "SheetName",
|
||||
nPrfx, sLocalName)
|
||||
{
|
||||
bValid = true; // always valid!
|
||||
@ -3045,7 +2970,7 @@ XMLPageNameFieldImportContext::XMLPageNameFieldImportContext(
|
||||
XMLTextImportHelper& rHlp, /// Text import helper
|
||||
sal_uInt16 nPrfx, /// namespace prefix
|
||||
const OUString& sLocalName) /// element name w/o prefix
|
||||
: XMLTextFieldImportContext(rImport, rHlp, sAPI_pagename, nPrfx, sLocalName )
|
||||
: XMLTextFieldImportContext(rImport, rHlp, "PageName", nPrfx, sLocalName )
|
||||
{
|
||||
bValid = true;
|
||||
}
|
||||
@ -3074,9 +2999,8 @@ XMLUrlFieldImportContext::XMLUrlFieldImportContext(
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_url,
|
||||
nPrfx, sLocalName),
|
||||
sPropertyURL(sAPI_url),
|
||||
sPropertyTargetFrame(sAPI_target_frame),
|
||||
sPropertyRepresentation(
|
||||
sAPI_representation),
|
||||
sPropertyTargetFrame("TargetFrame"),
|
||||
sPropertyRepresentation("Representation"),
|
||||
bFrameOK(false)
|
||||
{
|
||||
}
|
||||
@ -3120,7 +3044,7 @@ XMLBibliographyFieldImportContext::XMLBibliographyFieldImportContext(
|
||||
XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx,
|
||||
const OUString& sLocalName) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_bibliography,
|
||||
XMLTextFieldImportContext(rImport, rHlp, "Bibliography",
|
||||
nPrfx, sLocalName),
|
||||
sPropertyFields("Fields"),
|
||||
aValues()
|
||||
@ -3380,14 +3304,14 @@ XMLAnnotationImportContext::XMLAnnotationImportContext(
|
||||
sal_uInt16 nToken,
|
||||
sal_uInt16 nPrfx,
|
||||
const OUString& sLocalName) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_annotation,
|
||||
XMLTextFieldImportContext(rImport, rHlp, "Annotation",
|
||||
nPrfx, sLocalName),
|
||||
sPropertyAuthor(sAPI_author),
|
||||
sPropertyInitials(sAPI_initials),
|
||||
sPropertyInitials("Initials"),
|
||||
sPropertyContent(sAPI_content),
|
||||
// why is there no UNO_NAME_DATE_TIME, but only UNO_NAME_DATE_TIME_VALUE?
|
||||
sPropertyDate(sAPI_date_time_value),
|
||||
sPropertyTextRange(sAPI_TextRange),
|
||||
sPropertyTextRange("TextRange"),
|
||||
sPropertyName(sAPI_name),
|
||||
m_nToken(nToken)
|
||||
{
|
||||
@ -3603,9 +3527,9 @@ XMLScriptImportContext::XMLScriptImportContext(
|
||||
XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx,
|
||||
const OUString& sLocalName)
|
||||
: XMLTextFieldImportContext(rImport, rHlp, sAPI_script, nPrfx, sLocalName)
|
||||
, sPropertyScriptType(sAPI_script_type)
|
||||
, sPropertyURLContent(sAPI_url_content)
|
||||
: XMLTextFieldImportContext(rImport, rHlp, "Script", nPrfx, sLocalName)
|
||||
, sPropertyScriptType("ScriptType")
|
||||
, sPropertyURLContent("URLContent")
|
||||
, sPropertyContent(sAPI_content)
|
||||
, bContentOK(false)
|
||||
, bScriptTypeOK(false)
|
||||
@ -3662,7 +3586,7 @@ XMLMeasureFieldImportContext::XMLMeasureFieldImportContext(
|
||||
XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx,
|
||||
const OUString& sLocalName) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_measure,
|
||||
XMLTextFieldImportContext(rImport, rHlp, "Measure",
|
||||
nPrfx, sLocalName),
|
||||
mnKind( 0 )
|
||||
{
|
||||
@ -3706,7 +3630,7 @@ XMLDropDownFieldImportContext::XMLDropDownFieldImportContext(
|
||||
XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx,
|
||||
const OUString& sLocalName) :
|
||||
XMLTextFieldImportContext( rImport, rHlp, sAPI_drop_down,
|
||||
XMLTextFieldImportContext( rImport, rHlp, "DropDown",
|
||||
nPrfx, sLocalName ),
|
||||
aLabels(),
|
||||
sName(),
|
||||
@ -3840,7 +3764,7 @@ XMLHeaderFieldImportContext::XMLHeaderFieldImportContext(
|
||||
XMLTextImportHelper& rHlp, /// Text import helper
|
||||
sal_uInt16 nPrfx, /// namespace 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;
|
||||
bValid = true;
|
||||
@ -3863,7 +3787,7 @@ XMLFooterFieldImportContext::XMLFooterFieldImportContext(
|
||||
XMLTextImportHelper& rHlp, /// Text import helper
|
||||
sal_uInt16 nPrfx, /// namespace 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;
|
||||
bValid = true;
|
||||
@ -3887,7 +3811,7 @@ XMLDateTimeFieldImportContext::XMLDateTimeFieldImportContext(
|
||||
XMLTextImportHelper& rHlp, /// Text import helper
|
||||
sal_uInt16 nPrfx, /// namespace 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;
|
||||
bValid = true;
|
||||
|
@ -1426,8 +1426,6 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
|
||||
// Numberings/Bullets in table not visible after save/reload (#i80724#)
|
||||
bool bSetListAttrs )
|
||||
{
|
||||
static const char s_ParaStyleName[] = "ParaStyleName";
|
||||
static const char s_CharStyleName[] = "CharStyleName";
|
||||
static const char s_NumberingRules[] = "NumberingRules";
|
||||
static const char s_NumberingIsNumber[] = "NumberingIsNumber";
|
||||
static const char s_NumberingLevel[] = "NumberingLevel";
|
||||
@ -1435,10 +1433,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
|
||||
static const char s_NumberingStartValue[] = "NumberingStartValue";
|
||||
static const char s_PropNameListId[] = "ListId";
|
||||
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_NumberingStyleName[] = "NumberingStyleName";
|
||||
|
||||
const sal_uInt16 nFamily = bPara ? XML_STYLE_FAMILY_TEXT_PARAGRAPH
|
||||
: XML_STYLE_FAMILY_TEXT_TEXT;
|
||||
@ -1462,7 +1457,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
|
||||
if( !sStyleName.isEmpty() )
|
||||
{
|
||||
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)
|
||||
? m_xImpl->m_xParaStyles
|
||||
: m_xImpl->m_xTextStyles;
|
||||
@ -1705,7 +1700,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
|
||||
{
|
||||
uno::Reference<beans::XPropertySet> const xTmp(
|
||||
m_xImpl->m_xServiceFactory->createInstance(
|
||||
s_ServiceCombinedCharacters), UNO_QUERY);
|
||||
"com.sun.star.text.TextField.CombinedCharacters"), UNO_QUERY);
|
||||
if( xTmp.is() )
|
||||
{
|
||||
// fix cursor if larger than possible for
|
||||
@ -1718,7 +1713,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
|
||||
}
|
||||
|
||||
// set field value (the combined character string)
|
||||
xTmp->setPropertyValue(s_Content,
|
||||
xTmp->setPropertyValue("Content",
|
||||
makeAny(rCursor->getString()));
|
||||
|
||||
// insert the field over it's original text
|
||||
@ -1838,7 +1833,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
|
||||
OUString sEmptyStr;
|
||||
if ( !lcl_HasListStyle( sStyleName,
|
||||
m_xImpl->m_xParaStyles, GetXMLImport(),
|
||||
s_NumberingStyleName,
|
||||
"NumberingStyleName",
|
||||
sEmptyStr ) )
|
||||
{
|
||||
// heading not in a list --> apply outline style
|
||||
@ -1868,8 +1863,6 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
|
||||
void XMLTextImportHelper::FindOutlineStyleName( OUString& rStyleName,
|
||||
sal_Int8 nOutlineLevel )
|
||||
{
|
||||
static const char s_HeadingStyleName[] = "HeadingStyleName";
|
||||
|
||||
// style name empty?
|
||||
if( rStyleName.isEmpty() )
|
||||
{
|
||||
@ -1894,7 +1887,7 @@ void XMLTextImportHelper::FindOutlineStyleName( OUString& rStyleName,
|
||||
>>= aProperties;
|
||||
for( sal_Int32 i = 0; i < aProperties.getLength(); i++ )
|
||||
{
|
||||
if (aProperties[i].Name == s_HeadingStyleName)
|
||||
if (aProperties[i].Name == "HeadingStyleName")
|
||||
{
|
||||
OUString aOutlineStyle;
|
||||
aProperties[i].Value >>= aOutlineStyle;
|
||||
@ -1932,9 +1925,6 @@ void XMLTextImportHelper::AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel
|
||||
|
||||
void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels )
|
||||
{
|
||||
static const char s_NumberingStyleName[] = "NumberingStyleName";
|
||||
static const char s_HeadingStyleName [] = "HeadingStyleName";
|
||||
|
||||
if ((m_xImpl->m_xOutlineStylesCandidates != nullptr || bSetEmptyLevels) &&
|
||||
m_xImpl->m_xChapterNumbering.is() &&
|
||||
!IsInsertMode())
|
||||
@ -2000,7 +1990,7 @@ void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels )
|
||||
m_xImpl->m_xOutlineStylesCandidates[i][j],
|
||||
m_xImpl->m_xParaStyles,
|
||||
GetXMLImport(),
|
||||
s_NumberingStyleName,
|
||||
"NumberingStyleName",
|
||||
sOutlineStyleName))
|
||||
{
|
||||
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#)
|
||||
Sequence < PropertyValue > aProps( 1 );
|
||||
PropertyValue *pProps = aProps.getArray();
|
||||
pProps->Name = s_HeadingStyleName;
|
||||
pProps->Name = "HeadingStyleName";
|
||||
for ( sal_Int32 i = 0; i < nCount; ++i )
|
||||
{
|
||||
// Paragraph style assignments in Outline of template lost from second level on (#i107610#)
|
||||
@ -2622,9 +2612,6 @@ void XMLTextImportHelper::ConnectFrameChains(
|
||||
const OUString& rNextFrmName,
|
||||
const Reference < XPropertySet >& rFrmPropSet )
|
||||
{
|
||||
static const char s_ChainNextName[] = "ChainNextName";
|
||||
static const char s_ChainPrevName[] = "ChainPrevName";
|
||||
|
||||
if( rFrmName.isEmpty() )
|
||||
return;
|
||||
|
||||
@ -2635,7 +2622,7 @@ void XMLTextImportHelper::ConnectFrameChains(
|
||||
if (m_xImpl->m_xTextFrames.is()
|
||||
&& m_xImpl->m_xTextFrames->hasByName(sNextFrmName))
|
||||
{
|
||||
rFrmPropSet->setPropertyValue(s_ChainNextName,
|
||||
rFrmPropSet->setPropertyValue("ChainNextName",
|
||||
makeAny(sNextFrmName));
|
||||
}
|
||||
else
|
||||
@ -2657,7 +2644,7 @@ void XMLTextImportHelper::ConnectFrameChains(
|
||||
{
|
||||
// The previous frame must exist, because it existing than
|
||||
// inserting the entry
|
||||
rFrmPropSet->setPropertyValue(s_ChainPrevName, makeAny(*i));
|
||||
rFrmPropSet->setPropertyValue("ChainPrevName", makeAny(*i));
|
||||
|
||||
i = m_xImpl->m_xPrevFrmNames->erase(i);
|
||||
j = m_xImpl->m_xNextFrmNames->erase(j);
|
||||
|
@ -407,7 +407,6 @@ XMLTextListsHelper::MakeNumRule(
|
||||
bool* o_pRestartNumbering,
|
||||
bool* io_pSetDefaults)
|
||||
{
|
||||
static const char s_NumberingRules[] = "NumberingRules";
|
||||
uno::Reference<container::XIndexReplace> xNumRules(i_rNumRule);
|
||||
if ( !i_StyleName.isEmpty() && i_StyleName != i_ParentStyleName )
|
||||
{
|
||||
@ -424,7 +423,7 @@ XMLTextListsHelper::MakeNumRule(
|
||||
|
||||
uno::Reference< beans::XPropertySet > xPropSet( xStyle,
|
||||
uno::UNO_QUERY );
|
||||
any = xPropSet->getPropertyValue(s_NumberingRules);
|
||||
any = xPropSet->getPropertyValue("NumberingRules");
|
||||
any >>= xNumRules;
|
||||
}
|
||||
else
|
||||
|
@ -2156,10 +2156,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
|
||||
bool bAutoStyles, bool bIsProgress,
|
||||
bool bPrvChrIsSpc )
|
||||
{
|
||||
static const char sMeta[] = "InContentMetadata";
|
||||
static const char sFieldMarkName[] = "__FieldMark_";
|
||||
static const char sAnnotation[] = "Annotation";
|
||||
static const char sAnnotationEnd[] = "AnnotationEnd";
|
||||
|
||||
bool bPrevCharIsSpace = bPrvChrIsSpc;
|
||||
|
||||
@ -2188,12 +2185,12 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
|
||||
exportTextField( xTxtRange, bAutoStyles, bIsProgress );
|
||||
bPrevCharIsSpace = false;
|
||||
}
|
||||
else if ( sType == sAnnotation )
|
||||
else if ( sType == "Annotation" )
|
||||
{
|
||||
exportTextField( xTxtRange, bAutoStyles, bIsProgress );
|
||||
bPrevCharIsSpace = false;
|
||||
}
|
||||
else if ( sType == sAnnotationEnd )
|
||||
else if ( sType == "AnnotationEnd" )
|
||||
{
|
||||
if (!bAutoStyles)
|
||||
{
|
||||
@ -2258,7 +2255,7 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
|
||||
{
|
||||
exportRuby(xPropSet, bAutoStyles);
|
||||
}
|
||||
else if (sType == sMeta)
|
||||
else if (sType == "InContentMetadata")
|
||||
{
|
||||
exportMeta(xPropSet, bAutoStyles, bIsProgress);
|
||||
}
|
||||
@ -3708,8 +3705,6 @@ void XMLTextParagraphExport::exportMeta(
|
||||
const Reference<XPropertySet> & i_xPortion,
|
||||
bool i_bAutoStyles, bool i_isProgress)
|
||||
{
|
||||
static const char sMeta[] = "InContentMetadata";
|
||||
|
||||
bool doExport(!i_bAutoStyles); // do not export element if autostyles
|
||||
// check version >= 1.2
|
||||
switch (GetExport().getDefaultVersion()) {
|
||||
@ -3719,7 +3714,7 @@ void XMLTextParagraphExport::exportMeta(
|
||||
}
|
||||
|
||||
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< XEnumeration > xTextEnum( xEA->createEnumeration() );
|
||||
|
||||
|
@ -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(
|
||||
OUString& sServiceName,
|
||||
@ -1219,9 +1213,7 @@ void XMLIndexMarkImportContext_Impl::GetServiceName(
|
||||
case XML_TOK_TEXT_TOC_MARK_START:
|
||||
case XML_TOK_TEXT_TOC_MARK_END:
|
||||
{
|
||||
OUString sTmp(
|
||||
sAPI_com_sun_star_text_ContentIndexMark);
|
||||
sServiceName = sTmp;
|
||||
sServiceName = "com.sun.star.text.ContentIndexMark";
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1229,9 +1221,7 @@ void XMLIndexMarkImportContext_Impl::GetServiceName(
|
||||
case XML_TOK_TEXT_USER_INDEX_MARK_START:
|
||||
case XML_TOK_TEXT_USER_INDEX_MARK_END:
|
||||
{
|
||||
OUString sTmp(
|
||||
sAPI_com_sun_star_text_UserIndexMark);
|
||||
sServiceName = sTmp;
|
||||
sServiceName = "com.sun.star.text.UserIndexMark";
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1239,9 +1229,7 @@ void XMLIndexMarkImportContext_Impl::GetServiceName(
|
||||
case XML_TOK_TEXT_ALPHA_INDEX_MARK_START:
|
||||
case XML_TOK_TEXT_ALPHA_INDEX_MARK_END:
|
||||
{
|
||||
OUString sTmp(
|
||||
sAPI_com_sun_star_text_DocumentIndexMark);
|
||||
sServiceName = sTmp;
|
||||
sServiceName = "com.sun.star.text.DocumentIndexMark";
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -50,37 +50,18 @@
|
||||
|
||||
|
||||
// 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_input[] = "Input";
|
||||
static const sal_Char sAPI_input_user[] = "InputUser";
|
||||
static const sal_Char sAPI_get_expression[] = "GetExpression";
|
||||
static const sal_Char sAPI_set_expression[] = "SetExpression";
|
||||
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_fieldmaster_database[] = "com.sun.star.text.FieldMaster.Database";
|
||||
|
||||
// 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_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_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_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_sequence_value[] = "SequenceValue";
|
||||
static const sal_Char sAPI_is_fixed_language[] = "IsFixedLanguage";
|
||||
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
@ -105,11 +86,11 @@ XMLVarFieldImportContext::XMLVarFieldImportContext(
|
||||
bool bPresentation) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, pServiceName, nPrfx, rLocalName),
|
||||
sPropertyContent(sAPI_content),
|
||||
sPropertyHint(sAPI_hint),
|
||||
sPropertyHelp(sAPI_help),
|
||||
sPropertyTooltip(sAPI_tooltip),
|
||||
sPropertyHint("Hint"),
|
||||
sPropertyHelp("Help"),
|
||||
sPropertyTooltip("Tooltip"),
|
||||
sPropertyIsVisible(sAPI_is_visible),
|
||||
sPropertyIsDisplayFormula(sAPI_is_show_formula),
|
||||
sPropertyIsDisplayFormula("IsShowFormula"),
|
||||
sPropertyCurrentPresentation(sAPI_current_presentation),
|
||||
aValueHelper(rImport, rHlp, bType, bStyle, bValue, false),
|
||||
bDisplayFormula(false),
|
||||
@ -306,7 +287,7 @@ void XMLSetVarFieldImportContext::EndElement()
|
||||
{
|
||||
// create field/Service
|
||||
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);
|
||||
if (xDepTextField.is())
|
||||
@ -366,7 +347,7 @@ XMLSequenceFieldImportContext::XMLSequenceFieldImportContext(
|
||||
false, false, false, true),
|
||||
|
||||
sPropertyNumberFormat(sAPI_number_format),
|
||||
sPropertySequenceValue(sAPI_sequence_value),
|
||||
sPropertySequenceValue("SequenceValue"),
|
||||
sNumFormat(OUString('1')),
|
||||
sNumFormatSync(GetXMLToken(XML_FALSE)),
|
||||
bRefNameOK(false)
|
||||
@ -467,7 +448,7 @@ XMLVariableInputFieldImportContext::XMLVariableInputFieldImportContext(
|
||||
true, true, true,
|
||||
true),
|
||||
sPropertySubType(sAPI_sub_type),
|
||||
sPropertyIsInput(sAPI_is_input)
|
||||
sPropertyIsInput("Input")
|
||||
{
|
||||
}
|
||||
|
||||
@ -512,7 +493,7 @@ XMLUserFieldImportContext::XMLUserFieldImportContext(
|
||||
XMLUserFieldInputImportContext::XMLUserFieldInputImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp, sal_uInt16 nPrfx,
|
||||
const OUString& rLocalName) :
|
||||
XMLVarFieldImportContext(rImport, rHlp, sAPI_input_user,
|
||||
XMLVarFieldImportContext(rImport, rHlp, "InputUser",
|
||||
nPrfx, rLocalName,
|
||||
// description, style
|
||||
false, false,
|
||||
@ -598,7 +579,7 @@ void XMLExpressionFieldImportContext::PrepareField(
|
||||
XMLTextInputFieldImportContext::XMLTextInputFieldImportContext(
|
||||
SvXMLImport& rImport, XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx, const OUString& sLocalName) :
|
||||
XMLVarFieldImportContext(rImport, rHlp, sAPI_input,
|
||||
XMLVarFieldImportContext(rImport, rHlp, "Input",
|
||||
nPrfx, sLocalName,
|
||||
// description
|
||||
false, false,
|
||||
@ -628,7 +609,7 @@ XMLTableFormulaImportContext::XMLTableFormulaImportContext(
|
||||
XMLTextImportHelper& rHlp,
|
||||
sal_uInt16 nPrfx,
|
||||
const OUString& rLocalName) :
|
||||
XMLTextFieldImportContext(rImport, rHlp, sAPI_table_formula,
|
||||
XMLTextFieldImportContext(rImport, rHlp, "TableFormula",
|
||||
nPrfx, rLocalName),
|
||||
sPropertyIsShowFormula("IsShowFormula"),
|
||||
sPropertyCurrentPresentation(
|
||||
@ -755,9 +736,9 @@ XMLVariableDeclImportContext::XMLVariableDeclImportContext(
|
||||
SvXMLImportContext(rImport, nPrfx, rLocalName),
|
||||
// bug?? which properties for userfield/userfieldmaster
|
||||
sPropertySubType(sAPI_sub_type),
|
||||
sPropertyNumberingLevel(sAPI_chapter_numbering_level),
|
||||
sPropertyNumberingSeparator(sAPI_numbering_separator),
|
||||
sPropertyIsExpression(sAPI_is_expression),
|
||||
sPropertyNumberingLevel("ChapterNumberingLevel"),
|
||||
sPropertyNumberingSeparator("NumberingSeparator"),
|
||||
sPropertyIsExpression("IsExpression"),
|
||||
aValueHelper(rImport, rHlp, true, false, true, false),
|
||||
nNumLevel(-1), cSeparationChar('.')
|
||||
{
|
||||
@ -963,7 +944,7 @@ bool XMLVariableDeclImportContext::FindFieldMaster(
|
||||
xMaster = xTmp;
|
||||
|
||||
// set name
|
||||
xMaster->setPropertyValue(sAPI_name, Any(sName));
|
||||
xMaster->setPropertyValue("Name", Any(sName));
|
||||
|
||||
if (eVarType != VarTypeUserField) {
|
||||
// set subtype for setexp field
|
||||
@ -995,8 +976,8 @@ XMLDatabaseDisplayImportContext::XMLDatabaseDisplayImportContext(
|
||||
const OUString& rLocalName) :
|
||||
XMLDatabaseFieldImportContext(rImport, rHlp, sAPI_database,
|
||||
nPrfx, rLocalName, false),
|
||||
sPropertyColumnName(sAPI_data_column_name),
|
||||
sPropertyDatabaseFormat(sAPI_is_data_base_format),
|
||||
sPropertyColumnName("DataColumnName"),
|
||||
sPropertyDatabaseFormat("DataBaseFormat"),
|
||||
sPropertyCurrentPresentation(sAPI_current_presentation),
|
||||
sPropertyIsVisible(sAPI_is_visible),
|
||||
aValueHelper(rImport, rHlp, false, true, false, false),
|
||||
@ -1054,7 +1035,7 @@ void XMLDatabaseDisplayImportContext::EndElement()
|
||||
|
||||
// create and prepare field master first
|
||||
if (CreateField(xMaster,
|
||||
sAPI_fieldmaster_database))
|
||||
"com.sun.star.text.FieldMaster.Database"))
|
||||
{
|
||||
Any aAny;
|
||||
xMaster->setPropertyValue(sPropertyColumnName, Any(sColumnName));
|
||||
@ -1144,9 +1125,9 @@ XMLValueImportHelper::XMLValueImportHelper(
|
||||
XMLTextImportHelper& rHlp,
|
||||
bool bType, bool bStyle, bool bValue, bool bFormula) :
|
||||
sPropertyContent(sAPI_content),
|
||||
sPropertyValue(sAPI_value),
|
||||
sPropertyValue("Value"),
|
||||
sPropertyNumberFormat(sAPI_number_format),
|
||||
sPropertyIsFixedLanguage(sAPI_is_fixed_language),
|
||||
sPropertyIsFixedLanguage("IsFixedLanguage"),
|
||||
|
||||
rImport(rImprt),
|
||||
rHelper(rHlp),
|
||||
|
@ -1431,8 +1431,7 @@ void XMLTrackedChangesOOoTContext_Impl::StartElement(
|
||||
OSL_ENSURE( rPropSet.is(), "no info property set" );
|
||||
if( rPropSet.is() )
|
||||
{
|
||||
const sal_Char sRedlineProtectionKey[] = "RedlineProtectionKey";
|
||||
OUString aPropName(sRedlineProtectionKey);
|
||||
OUString aPropName("RedlineProtectionKey");
|
||||
Reference< XPropertySetInfo > xPropSetInfo(
|
||||
rPropSet->getPropertySetInfo() );
|
||||
if( xPropSetInfo.is() &&
|
||||
|
@ -1515,8 +1515,7 @@ void XMLConfigItemTContext_Impl::EndElement()
|
||||
GetTransformer().GetPropertySet();
|
||||
if( rPropSet.is() )
|
||||
{
|
||||
const sal_Char sRedlineProtectionKey[] = "RedlineProtectionKey";
|
||||
OUString aPropName(sRedlineProtectionKey);
|
||||
OUString aPropName("RedlineProtectionKey");
|
||||
Reference< XPropertySetInfo > xPropSetInfo(
|
||||
rPropSet->getPropertySetInfo() );
|
||||
if( xPropSetInfo.is() &&
|
||||
@ -1570,8 +1569,7 @@ void XMLTrackedChangesOASISTContext_Impl::StartElement(
|
||||
GetTransformer().GetPropertySet();
|
||||
if( rPropSet.is() )
|
||||
{
|
||||
const sal_Char sRedlineProtectionKey[] = "RedlineProtectionKey";
|
||||
OUString aPropName(sRedlineProtectionKey);
|
||||
OUString aPropName("RedlineProtectionKey");
|
||||
Reference< XPropertySetInfo > xPropSetInfo(
|
||||
rPropSet->getPropertySetInfo() );
|
||||
if( xPropSetInfo.is() &&
|
||||
|
@ -47,14 +47,13 @@ const ErrDesc allDesc[] = {
|
||||
const char *
|
||||
getCertError(PRErrorCode errNum)
|
||||
{
|
||||
static const char sEmpty[] = "";
|
||||
for (const ErrDesc& i : allDesc)
|
||||
{
|
||||
if (i.errNum == errNum)
|
||||
return i.errString;
|
||||
}
|
||||
|
||||
return sEmpty;
|
||||
return "";
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user