merge the formfield patch from ooo-build
[ooovba.git] / sc / source / filter / xml / xmlimprt.hxx
blob003797ed03f7f2441847f81c3da3fd62ada42858
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xmlimprt.hxx,v $
10 * $Revision: 1.97.52.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_XMLIMPRT_HXX
32 #define SC_XMLIMPRT_HXX
34 #include <rsc/rscsfx.hxx>
35 #include <xmloff/xmlictxt.hxx>
36 #include <xmloff/xmlimp.hxx>
37 #include <xmloff/xmltkmap.hxx>
38 #include <xmloff/xmlaustp.hxx>
39 #include <xmloff/xmlstyle.hxx>
40 #include <com/sun/star/frame/XModel.hpp>
41 #include <tools/time.hxx>
42 #include <com/sun/star/util/DateTime.hpp>
43 #include "xmlsubti.hxx"
44 #include "global.hxx"
45 #include "formula/grammar.hxx"
47 #include "xmlstyle.hxx"
48 #include "XMLDetectiveContext.hxx"
49 #include <com/sun/star/sheet/ValidationAlertStyle.hpp>
50 #include <com/sun/star/sheet/ValidationType.hpp>
51 #include <com/sun/star/sheet/ConditionOperator.hpp>
52 #include <com/sun/star/table/CellAddress.hpp>
53 #include <com/sun/star/beans/XPropertySet.hpp>
54 #include <com/sun/star/util/XNumberFormatTypes.hpp>
55 #include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
57 #include <vector>
58 #include <hash_map>
60 class ScRangeList;
61 class ScMyStyleNumberFormats;
62 class XMLNumberFormatAttributesExportHelper;
64 enum ScXMLDocTokens
66 XML_TOK_DOC_FONTDECLS,
67 XML_TOK_DOC_STYLES,
68 XML_TOK_DOC_AUTOSTYLES,
69 XML_TOK_DOC_MASTERSTYLES,
70 XML_TOK_DOC_META,
71 XML_TOK_DOC_SCRIPTS,
72 XML_TOK_DOC_BODY,
73 XML_TOK_DOC_SETTINGS,
74 XML_TOK_OFFICE_END=XML_TOK_UNKNOWN
77 enum ScXMLStylesTokens
79 XML_TOK_STYLES_STYLE
82 enum ScXMLStylesAttrTokens
84 XML_TOK_STYLES_STYLE_NAME,
85 XML_TOK_STYLES_STYLE_FAMILY,
86 XML_TOK_STYLES_STYLE_PARENT_STYLE_NAME
89 enum ScXMLStyleTokens
91 XML_TOK_STYLE_PROPERTIES
94 enum ScXMLBodyTokens
96 XML_TOK_BODY_TRACKED_CHANGES,
97 XML_TOK_BODY_CALCULATION_SETTINGS,
98 XML_TOK_BODY_CONTENT_VALIDATIONS,
99 XML_TOK_BODY_LABEL_RANGES,
100 XML_TOK_BODY_TABLE,
101 XML_TOK_BODY_NAMED_EXPRESSIONS,
102 XML_TOK_BODY_DATABASE_RANGES,
103 XML_TOK_BODY_DATABASE_RANGE,
104 XML_TOK_BODY_DATA_PILOT_TABLES,
105 XML_TOK_BODY_CONSOLIDATION,
106 XML_TOK_BODY_DDE_LINKS
109 enum ScXMLContentValidationsElemTokens
111 XML_TOK_CONTENT_VALIDATION
114 enum ScXMLContentValidationElemTokens
116 XML_TOK_CONTENT_VALIDATION_ELEM_HELP_MESSAGE,
117 XML_TOK_CONTENT_VALIDATION_ELEM_ERROR_MESSAGE,
118 XML_TOK_CONTENT_VALIDATION_ELEM_ERROR_MACRO,
119 XML_TOK_CONTENT_VALIDATION_ELEM_EVENT_LISTENERS
122 enum ScXMLContentValidationAttrTokens
124 XML_TOK_CONTENT_VALIDATION_NAME,
125 XML_TOK_CONTENT_VALIDATION_CONDITION,
126 XML_TOK_CONTENT_VALIDATION_BASE_CELL_ADDRESS,
127 XML_TOK_CONTENT_VALIDATION_ALLOW_EMPTY_CELL,
128 XML_TOK_CONTENT_VALIDATION_DISPLAY_LIST
131 enum ScXMLContentValidationMessageElemTokens
133 XML_TOK_P
136 enum ScXMLContentValidationHelpMessageAttrTokens
138 XML_TOK_HELP_MESSAGE_ATTR_TITLE,
139 XML_TOK_HELP_MESSAGE_ATTR_DISPLAY
142 enum ScXMLContentValidationErrorMessageAttrTokens
144 XML_TOK_ERROR_MESSAGE_ATTR_TITLE,
145 XML_TOK_ERROR_MESSAGE_ATTR_DISPLAY,
146 XML_TOK_ERROR_MESSAGE_ATTR_MESSAGE_TYPE
149 enum ScXMLContentValidationErrorMacroAttrTokens
151 XML_TOK_ERROR_MACRO_ATTR_NAME,
152 XML_TOK_ERROR_MACRO_ATTR_EXECUTE
155 enum ScXMLLabelRangesElemTokens
157 XML_TOK_LABEL_RANGE_ELEM
160 enum ScXMLLabelRangeAttrTokens
162 XML_TOK_LABEL_RANGE_ATTR_LABEL_RANGE,
163 XML_TOK_LABEL_RANGE_ATTR_DATA_RANGE,
164 XML_TOK_LABEL_RANGE_ATTR_ORIENTATION
167 enum ScXMLTableTokens
169 XML_TOK_TABLE_COL_GROUP,
170 XML_TOK_TABLE_HEADER_COLS,
171 XML_TOK_TABLE_COLS,
172 XML_TOK_TABLE_COL,
173 XML_TOK_TABLE_ROW_GROUP,
174 XML_TOK_TABLE_HEADER_ROWS,
175 XML_TOK_TABLE_PROTECTION,
176 XML_TOK_TABLE_ROWS,
177 XML_TOK_TABLE_ROW,
178 XML_TOK_TABLE_SOURCE,
179 XML_TOK_TABLE_SCENARIO,
180 XML_TOK_TABLE_SHAPES,
181 XML_TOK_TABLE_FORMS
184 enum ScXMLTokenProtectionTokens
186 XML_TOK_TABLE_SELECT_PROTECTED_CELLS,
187 XML_TOK_TABLE_SELECT_UNPROTECTED_CELLS
190 enum ScXMLTableRowsTokens
192 XML_TOK_TABLE_ROWS_ROW_GROUP,
193 XML_TOK_TABLE_ROWS_HEADER_ROWS,
194 XML_TOK_TABLE_ROWS_ROWS,
195 XML_TOK_TABLE_ROWS_ROW
198 enum ScXMLTableColsTokens
200 XML_TOK_TABLE_COLS_COL_GROUP,
201 XML_TOK_TABLE_COLS_HEADER_COLS,
202 XML_TOK_TABLE_COLS_COLS,
203 XML_TOK_TABLE_COLS_COL
206 enum ScXMLTableAttrTokens
208 XML_TOK_TABLE_NAME,
209 XML_TOK_TABLE_STYLE_NAME,
210 XML_TOK_TABLE_PROTECTED,
211 XML_TOK_TABLE_PRINT_RANGES,
212 XML_TOK_TABLE_PASSWORD,
213 XML_TOK_TABLE_PASSHASH,
214 XML_TOK_TABLE_PASSHASH_2,
215 XML_TOK_TABLE_PRINT
218 enum ScXMLTableScenarioAttrTokens
220 XML_TOK_TABLE_SCENARIO_ATTR_DISPLAY_BORDER,
221 XML_TOK_TABLE_SCENARIO_ATTR_BORDER_COLOR,
222 XML_TOK_TABLE_SCENARIO_ATTR_COPY_BACK,
223 XML_TOK_TABLE_SCENARIO_ATTR_COPY_STYLES,
224 XML_TOK_TABLE_SCENARIO_ATTR_COPY_FORMULAS,
225 XML_TOK_TABLE_SCENARIO_ATTR_IS_ACTIVE,
226 XML_TOK_TABLE_SCENARIO_ATTR_SCENARIO_RANGES,
227 XML_TOK_TABLE_SCENARIO_ATTR_COMMENT,
228 XML_TOK_TABLE_SCENARIO_ATTR_PROTECTED
231 enum ScXMLTableColAttrTokens
233 XML_TOK_TABLE_COL_ATTR_STYLE_NAME,
234 XML_TOK_TABLE_COL_ATTR_REPEATED,
235 XML_TOK_TABLE_COL_ATTR_VISIBILITY,
236 XML_TOK_TABLE_COL_ATTR_DEFAULT_CELL_STYLE_NAME
239 enum ScXMLTableRowTokens
241 XML_TOK_TABLE_ROW_CELL,
242 XML_TOK_TABLE_ROW_COVERED_CELL
245 enum ScXMLTableRowAttrTokens
247 XML_TOK_TABLE_ROW_ATTR_STYLE_NAME,
248 XML_TOK_TABLE_ROW_ATTR_VISIBILITY,
249 XML_TOK_TABLE_ROW_ATTR_REPEATED,
250 XML_TOK_TABLE_ROW_ATTR_DEFAULT_CELL_STYLE_NAME
251 // XML_TOK_TABLE_ROW_ATTR_USE_OPTIMAL_HEIGHT
254 enum ScXMLTableRowCellTokens
256 XML_TOK_TABLE_ROW_CELL_P,
257 XML_TOK_TABLE_ROW_CELL_TABLE,
258 XML_TOK_TABLE_ROW_CELL_ANNOTATION,
259 XML_TOK_TABLE_ROW_CELL_DETECTIVE,
260 XML_TOK_TABLE_ROW_CELL_CELL_RANGE_SOURCE
263 enum ScXMLTableRowCellAttrTokens
265 XML_TOK_TABLE_ROW_CELL_ATTR_STYLE_NAME,
266 XML_TOK_TABLE_ROW_CELL_ATTR_CONTENT_VALIDATION_NAME,
267 XML_TOK_TABLE_ROW_CELL_ATTR_SPANNED_ROWS,
268 XML_TOK_TABLE_ROW_CELL_ATTR_SPANNED_COLS,
269 XML_TOK_TABLE_ROW_CELL_ATTR_SPANNED_MATRIX_COLS,
270 XML_TOK_TABLE_ROW_CELL_ATTR_SPANNED_MATRIX_ROWS,
271 XML_TOK_TABLE_ROW_CELL_ATTR_REPEATED,
272 XML_TOK_TABLE_ROW_CELL_ATTR_VALUE_TYPE,
273 XML_TOK_TABLE_ROW_CELL_ATTR_VALUE,
274 XML_TOK_TABLE_ROW_CELL_ATTR_DATE_VALUE,
275 XML_TOK_TABLE_ROW_CELL_ATTR_TIME_VALUE,
276 XML_TOK_TABLE_ROW_CELL_ATTR_STRING_VALUE,
277 XML_TOK_TABLE_ROW_CELL_ATTR_BOOLEAN_VALUE,
278 XML_TOK_TABLE_ROW_CELL_ATTR_FORMULA,
279 XML_TOK_TABLE_ROW_CELL_ATTR_CURRENCY
282 enum ScXMLAnnotationAttrTokens
284 XML_TOK_TABLE_ANNOTATION_ATTR_AUTHOR,
285 XML_TOK_TABLE_ANNOTATION_ATTR_CREATE_DATE,
286 XML_TOK_TABLE_ANNOTATION_ATTR_CREATE_DATE_STRING,
287 XML_TOK_TABLE_ANNOTATION_ATTR_DISPLAY,
288 XML_TOK_TABLE_ANNOTATION_ATTR_X,
289 XML_TOK_TABLE_ANNOTATION_ATTR_Y
292 enum ScXMLDetectiveElemTokens
294 XML_TOK_DETECTIVE_ELEM_HIGHLIGHTED,
295 XML_TOK_DETECTIVE_ELEM_OPERATION
298 enum ScXMLDetectiveHighlightedAttrTokens
300 XML_TOK_DETECTIVE_HIGHLIGHTED_ATTR_CELL_RANGE,
301 XML_TOK_DETECTIVE_HIGHLIGHTED_ATTR_DIRECTION,
302 XML_TOK_DETECTIVE_HIGHLIGHTED_ATTR_CONTAINS_ERROR,
303 XML_TOK_DETECTIVE_HIGHLIGHTED_ATTR_MARKED_INVALID
306 enum ScXMLDetectiveOperationAttrTokens
308 XML_TOK_DETECTIVE_OPERATION_ATTR_NAME,
309 XML_TOK_DETECTIVE_OPERATION_ATTR_INDEX
312 enum ScXMLCellRangeSourceAttrTokens
314 XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_NAME,
315 XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_HREF,
316 XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_FILTER_NAME,
317 XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_FILTER_OPTIONS,
318 XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_LAST_COLUMN,
319 XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_LAST_ROW,
320 XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_REFRESH_DELAY
323 enum ScXMLNamedExpressionsTokens
325 XML_TOK_NAMED_EXPRESSIONS_NAMED_RANGE,
326 XML_TOK_NAMED_EXPRESSIONS_NAMED_EXPRESSION
329 enum ScXMLNamedRangeAttrTokens
331 XML_TOK_NAMED_RANGE_ATTR_NAME,
332 XML_TOK_NAMED_RANGE_ATTR_CELL_RANGE_ADDRESS,
333 XML_TOK_NAMED_RANGE_ATTR_BASE_CELL_ADDRESS,
334 XML_TOK_NAMED_RANGE_ATTR_RANGE_USABLE_AS
337 enum ScXMLNamedExpressionAttrTokens
339 XML_TOK_NAMED_EXPRESSION_ATTR_NAME,
340 XML_TOK_NAMED_EXPRESSION_ATTR_BASE_CELL_ADDRESS,
341 XML_TOK_NAMED_EXPRESSION_ATTR_EXPRESSION
344 enum ScXMLDatabaseRangesTokens
346 XML_TOK_DATABASE_RANGE
349 enum ScXMLDatabaseRangeTokens
351 XML_TOK_DATABASE_RANGE_SOURCE_SQL,
352 XML_TOK_DATABASE_RANGE_SOURCE_TABLE,
353 XML_TOK_DATABASE_RANGE_SOURCE_QUERY,
354 XML_TOK_FILTER,
355 XML_TOK_SORT,
356 XML_TOK_DATABASE_RANGE_SUBTOTAL_RULES
359 enum ScXMLDatabaseRangeAttrTokens
361 XML_TOK_DATABASE_RANGE_ATTR_NAME,
362 XML_TOK_DATABASE_RANGE_ATTR_IS_SELECTION,
363 XML_TOK_DATABASE_RANGE_ATTR_ON_UPDATE_KEEP_STYLES,
364 XML_TOK_DATABASE_RANGE_ATTR_ON_UPDATE_KEEP_SIZE,
365 XML_TOK_DATABASE_RANGE_ATTR_HAS_PERSISTENT_DATA,
366 XML_TOK_DATABASE_RANGE_ATTR_ORIENTATION,
367 XML_TOK_DATABASE_RANGE_ATTR_CONTAINS_HEADER,
368 XML_TOK_DATABASE_RANGE_ATTR_DISPLAY_FILTER_BUTTONS,
369 XML_TOK_DATABASE_RANGE_ATTR_TARGET_RANGE_ADDRESS,
370 XML_TOK_DATABASE_RANGE_ATTR_REFRESH_DELAY
373 enum ScXMLDatabaseRangeSourceSQLAttrTokens
375 XML_TOK_SOURCE_SQL_ATTR_DATABASE_NAME,
376 XML_TOK_SOURCE_SQL_ATTR_HREF,
377 XML_TOK_SOURCE_SQL_ATTR_CONNECTION_RESSOURCE,
378 XML_TOK_SOURCE_SQL_ATTR_SQL_STATEMENT,
379 XML_TOK_SOURCE_SQL_ATTR_PARSE_SQL_STATEMENT
382 enum ScXMLDatabaseRangeSourceTableAttrTokens
384 XML_TOK_SOURCE_TABLE_ATTR_DATABASE_NAME,
385 XML_TOK_SOURCE_TABLE_ATTR_HREF,
386 XML_TOK_SOURCE_TABLE_ATTR_CONNECTION_RESSOURCE,
387 XML_TOK_SOURCE_TABLE_ATTR_TABLE_NAME
390 enum ScXMLDatabaseRangeSourceQueryAttrTokens
392 XML_TOK_SOURCE_QUERY_ATTR_DATABASE_NAME,
393 XML_TOK_SOURCE_QUERY_ATTR_HREF,
394 XML_TOK_SOURCE_QUERY_ATTR_CONNECTION_RESSOURCE,
395 XML_TOK_SOURCE_QUERY_ATTR_QUERY_NAME
398 enum ScXMLFilterTokens
400 XML_TOK_FILTER_AND,
401 XML_TOK_FILTER_OR,
402 XML_TOK_FILTER_CONDITION
405 enum ScXMLFilterAttrTokens
407 XML_TOK_FILTER_ATTR_TARGET_RANGE_ADDRESS,
408 XML_TOK_FILTER_ATTR_CONDITION_SOURCE_RANGE_ADDRESS,
409 XML_TOK_FILTER_ATTR_CONDITION_SOURCE,
410 XML_TOK_FILTER_ATTR_DISPLAY_DUPLICATES
413 enum ScXMLFilterConditionAttrTokens
415 XML_TOK_CONDITION_ATTR_FIELD_NUMBER,
416 XML_TOK_CONDITION_ATTR_CASE_SENSITIVE,
417 XML_TOK_CONDITION_ATTR_DATA_TYPE,
418 XML_TOK_CONDITION_ATTR_VALUE,
419 XML_TOK_CONDITION_ATTR_OPERATOR
422 enum ScXMLSortTokens
424 XML_TOK_SORT_SORT_BY
427 enum ScXMLSortAttrTokens
429 XML_TOK_SORT_ATTR_BIND_STYLES_TO_CONTENT,
430 XML_TOK_SORT_ATTR_TARGET_RANGE_ADDRESS,
431 XML_TOK_SORT_ATTR_CASE_SENSITIVE,
432 XML_TOK_SORT_ATTR_LANGUAGE,
433 XML_TOK_SORT_ATTR_COUNTRY,
434 XML_TOK_SORT_ATTR_ALGORITHM
437 enum ScXMLSortSortByAttrTokens
439 XML_TOK_SORT_BY_ATTR_FIELD_NUMBER,
440 XML_TOK_SORT_BY_ATTR_DATA_TYPE,
441 XML_TOK_SORT_BY_ATTR_ORDER
444 enum ScXMLDatabaseRangeSubTotalRulesTokens
446 XML_TOK_SUBTOTAL_RULES_SORT_GROUPS,
447 XML_TOK_SUBTOTAL_RULES_SUBTOTAL_RULE
450 enum ScXMLDatabaseRangeSubTotalRulesAttrTokens
452 XML_TOK_SUBTOTAL_RULES_ATTR_BIND_STYLES_TO_CONTENT,
453 XML_TOK_SUBTOTAL_RULES_ATTR_CASE_SENSITIVE,
454 XML_TOK_SUBTOTAL_RULES_ATTR_PAGE_BREAKS_ON_GROUP_CHANGE
457 enum ScXMLSubTotalRulesSortGroupsAttrTokens
459 XML_TOK_SORT_GROUPS_ATTR_DATA_TYPE,
460 XML_TOK_SORT_GROUPS_ATTR_ORDER
463 enum ScXMLSubTotalRulesSubTotalRuleTokens
465 XML_TOK_SUBTOTAL_RULE_SUBTOTAL_FIELD
468 enum ScXMLSubTotalRulesSubTotalRuleAttrTokens
470 XML_TOK_SUBTOTAL_RULE_ATTR_GROUP_BY_FIELD_NUMBER
473 enum ScXMLSubTotalRuleSubTotalField
475 XML_TOK_SUBTOTAL_FIELD_ATTR_FIELD_NUMBER,
476 XML_TOK_SUBTOTAL_FIELD_ATTR_FUNCTION
479 enum ScXMLDataPilotTablesElemTokens
481 XML_TOK_DATA_PILOT_TABLE
484 enum ScXMLDataPilotTableAttrTokens
486 XML_TOK_DATA_PILOT_TABLE_ATTR_NAME,
487 XML_TOK_DATA_PILOT_TABLE_ATTR_APPLICATION_DATA,
488 XML_TOK_DATA_PILOT_TABLE_ATTR_GRAND_TOTAL,
489 XML_TOK_DATA_PILOT_TABLE_ATTR_IGNORE_EMPTY_ROWS,
490 XML_TOK_DATA_PILOT_TABLE_ATTR_IDENTIFY_CATEGORIES,
491 XML_TOK_DATA_PILOT_TABLE_ATTR_TARGET_RANGE_ADDRESS,
492 XML_TOK_DATA_PILOT_TABLE_ATTR_BUTTONS,
493 XML_TOK_DATA_PILOT_TABLE_ATTR_SHOW_FILTER_BUTTON,
494 XML_TOK_DATA_PILOT_TABLE_ATTR_DRILL_DOWN,
495 XML_TOK_DATA_PILOT_TABLE_ATTR_HEADER_GRID_LAYOUT
498 enum ScXMLDataPilotTableElemTokens
500 XML_TOK_DATA_PILOT_TABLE_ELEM_SOURCE_SQL,
501 XML_TOK_DATA_PILOT_TABLE_ELEM_SOURCE_TABLE,
502 XML_TOK_DATA_PILOT_TABLE_ELEM_GRAND_TOTAL,
503 XML_TOK_DATA_PILOT_TABLE_ELEM_SOURCE_QUERY,
504 XML_TOK_DATA_PILOT_TABLE_ELEM_SOURCE_SERVICE,
505 XML_TOK_DATA_PILOT_TABLE_ELEM_SOURCE_CELL_RANGE,
506 XML_TOK_DATA_PILOT_TABLE_ELEM_DATA_PILOT_FIELD
509 enum ScXMLDataPilotTableSourceServiceAttrTokens
511 XML_TOK_SOURCE_SERVICE_ATTR_NAME,
512 XML_TOK_SOURCE_SERVICE_ATTR_SOURCE_NAME,
513 XML_TOK_SOURCE_SERVICE_ATTR_OBJECT_NAME,
514 XML_TOK_SOURCE_SERVICE_ATTR_USER_NAME,
515 XML_TOK_SOURCE_SERVICE_ATTR_PASSWORD
518 enum ScXMLDataPilotGrandTotalAttrTokens
520 XML_TOK_DATA_PILOT_GRAND_TOTAL_ATTR_DISPLAY,
521 XML_TOK_DATA_PILOT_GRAND_TOTAL_ATTR_ORIENTATION,
522 XML_TOK_DATA_PILOT_GRAND_TOTAL_ATTR_DISPLAY_NAME
525 enum ScXMLDataPilotTableSourceCellRangeElemTokens
527 XML_TOK_SOURCE_CELL_RANGE_ELEM_FILTER
530 enum ScXMLDataPilotTableSourceCellRangeAttrTokens
532 XML_TOK_SOURCE_CELL_RANGE_ATTR_CELL_RANGE_ADDRESS
535 enum ScXMLDataPilotFieldAttrTokens
537 XML_TOK_DATA_PILOT_FIELD_ATTR_SOURCE_FIELD_NAME,
538 XML_TOK_DATA_PILOT_FIELD_ATTR_DISPLAY_NAME,
539 XML_TOK_DATA_PILOT_FIELD_ATTR_IS_DATA_LAYOUT_FIELD,
540 XML_TOK_DATA_PILOT_FIELD_ATTR_FUNCTION,
541 XML_TOK_DATA_PILOT_FIELD_ATTR_ORIENTATION,
542 XML_TOK_DATA_PILOT_FIELD_ATTR_SELECTED_PAGE,
543 XML_TOK_DATA_PILOT_FIELD_ATTR_USED_HIERARCHY
546 enum ScXMLDataPilotFieldElemTokens
548 XML_TOK_DATA_PILOT_FIELD_ELEM_DATA_PILOT_LEVEL,
549 XML_TOK_DATA_PILOT_FIELD_ELEM_DATA_PILOT_REFERENCE,
550 XML_TOK_DATA_PILOT_FIELD_ELEM_DATA_PILOT_GROUPS
553 enum ScXMLDataPilotLevelAttrTokens
555 XML_TOK_DATA_PILOT_LEVEL_ATTR_SHOW_EMPTY
558 enum ScXMLDataPilotLevelElemTokens
560 XML_TOK_DATA_PILOT_LEVEL_ELEM_DATA_PILOT_SUBTOTALS,
561 XML_TOK_DATA_PILOT_LEVEL_ELEM_DATA_PILOT_MEMBERS,
562 XML_TOK_DATA_PILOT_FIELD_ELEM_DATA_PILOT_DISPLAY_INFO,
563 XML_TOK_DATA_PILOT_FIELD_ELEM_DATA_PILOT_SORT_INFO,
564 XML_TOK_DATA_PILOT_FIELD_ELEM_DATA_PILOT_LAYOUT_INFO
567 enum ScXMLDataPilotSubTotalsElemTokens
569 XML_TOK_DATA_PILOT_SUBTOTALS_ELEM_DATA_PILOT_SUBTOTAL
572 enum ScXMLDataPilotSubTotalAttrTokens
574 XML_TOK_DATA_PILOT_SUBTOTAL_ATTR_FUNCTION,
575 XML_TOK_DATA_PILOT_SUBTOTAL_ATTR_DISPLAY_NAME
578 enum ScXMLDataPilotMembersElemTokens
580 XML_TOK_DATA_PILOT_MEMBERS_ELEM_DATA_PILOT_MEMBER
583 enum ScXMLDataPilotMemberAttrTokens
585 XML_TOK_DATA_PILOT_MEMBER_ATTR_NAME,
586 XML_TOK_DATA_PILOT_MEMBER_ATTR_DISPLAY_NAME,
587 XML_TOK_DATA_PILOT_MEMBER_ATTR_DISPLAY,
588 XML_TOK_DATA_PILOT_MEMBER_ATTR_SHOW_DETAILS
591 enum ScXMLConsolidationAttrTokens
593 XML_TOK_CONSOLIDATION_ATTR_FUNCTION,
594 XML_TOK_CONSOLIDATION_ATTR_SOURCE_RANGES,
595 XML_TOK_CONSOLIDATION_ATTR_TARGET_ADDRESS,
596 XML_TOK_CONSOLIDATION_ATTR_USE_LABEL,
597 XML_TOK_CONSOLIDATION_ATTR_LINK_TO_SOURCE
601 class SvI18NMap;
602 class SvXMLTokenMap;
603 //class SvXMLImportItemMapper;
604 class SvXMLStyleContext;
605 class SfxItemSet;
606 class SvXMLNumFmtHelper;
607 class XMLShapeImportHelper;
608 class ScXMLChangeTrackingImportHelper;
609 class ScUnoGuard;
611 struct tScMyCellRange
613 sal_Int16 Sheet;
614 sal_Int32 StartColumn, EndColumn;
615 sal_Int32 StartRow, EndRow;
618 struct ScMyNamedExpression
620 rtl::OUString sName;
621 rtl::OUString sContent;
622 rtl::OUString sContentNmsp;
623 rtl::OUString sBaseCellAddress;
624 rtl::OUString sRangeType;
625 formula::FormulaGrammar::Grammar eGrammar;
626 sal_Bool bIsExpression;
629 typedef std::list<const ScMyNamedExpression*> ScMyNamedExpressions;
631 struct ScMyLabelRange
633 rtl::OUString sLabelRangeStr;
634 rtl::OUString sDataRangeStr;
635 sal_Bool bColumnOrientation;
638 typedef std::list<const ScMyLabelRange*> ScMyLabelRanges;
640 struct ScMyImportValidation
642 rtl::OUString sName;
643 rtl::OUString sImputTitle;
644 rtl::OUString sImputMessage;
645 rtl::OUString sErrorTitle;
646 rtl::OUString sErrorMessage;
647 rtl::OUString sFormula1;
648 rtl::OUString sFormula2;
649 rtl::OUString sFormulaNmsp1;
650 rtl::OUString sFormulaNmsp2;
651 rtl::OUString sBaseCellAddress; // #b4974740# string is used directly
652 com::sun::star::sheet::ValidationAlertStyle aAlertStyle;
653 com::sun::star::sheet::ValidationType aValidationType;
654 com::sun::star::sheet::ConditionOperator aOperator;
655 formula::FormulaGrammar::Grammar eGrammar1;
656 formula::FormulaGrammar::Grammar eGrammar2;
657 sal_Int16 nShowList;
658 sal_Bool bShowErrorMessage;
659 sal_Bool bShowImputMessage;
660 sal_Bool bIgnoreBlanks;
663 typedef std::vector<ScMyImportValidation> ScMyImportValidations;
664 typedef std::list<SvXMLImportContext*> ScMyViewContextList;
665 class ScMyStylesImportHelper;
667 class ScXMLImport: public SvXMLImport
669 typedef ::std::hash_map< ::rtl::OUString, sal_Int16, ::rtl::OUStringHash > CellTypeMap;
670 CellTypeMap aCellTypeMap;
672 ScDocument* pDoc;
673 ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper;
674 ScMyViewContextList aViewContextList;
675 ScMyStylesImportHelper* pStylesImportHelper;
676 rtl::OUString sNumberFormat;
677 rtl::OUString sLocale;
678 rtl::OUString sCellStyle;
679 rtl::OUString sStandardFormat;
680 rtl::OUString sType;
682 // SvXMLAutoStylePoolP *pScAutoStylePool;
683 UniReference < XMLPropertyHandlerFactory > xScPropHdlFactory;
684 UniReference < XMLPropertySetMapper > xCellStylesPropertySetMapper;
685 UniReference < XMLPropertySetMapper > xColumnStylesPropertySetMapper;
686 UniReference < XMLPropertySetMapper > xRowStylesPropertySetMapper;
687 UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper;
688 // SvXMLImportContextRef xStyles;
689 // SvXMLImportContextRef xAutoStyles;
691 // SvXMLImportItemMapper *pParaItemMapper;// paragraph item import
692 // SvI18NMap *pI18NMap; // name mapping for I18N
693 SvXMLTokenMap *pDocElemTokenMap;
694 SvXMLTokenMap *pStylesElemTokenMap;
695 SvXMLTokenMap *pStylesAttrTokenMap;
696 SvXMLTokenMap *pStyleElemTokenMap;
697 SvXMLTokenMap *pBodyElemTokenMap;
698 SvXMLTokenMap *pContentValidationsElemTokenMap;
699 SvXMLTokenMap *pContentValidationElemTokenMap;
700 SvXMLTokenMap *pContentValidationAttrTokenMap;
701 SvXMLTokenMap *pContentValidationMessageElemTokenMap;
702 SvXMLTokenMap *pContentValidationHelpMessageAttrTokenMap;
703 SvXMLTokenMap *pContentValidationErrorMessageAttrTokenMap;
704 SvXMLTokenMap *pContentValidationErrorMacroAttrTokenMap;
705 SvXMLTokenMap *pLabelRangesElemTokenMap;
706 SvXMLTokenMap *pLabelRangeAttrTokenMap;
707 SvXMLTokenMap *pTableElemTokenMap;
708 SvXMLTokenMap *pTableProtectionElemTokenMap;
709 SvXMLTokenMap *pTableRowsElemTokenMap;
710 SvXMLTokenMap *pTableColsElemTokenMap;
711 SvXMLTokenMap *pTableScenarioAttrTokenMap;
712 SvXMLTokenMap *pTableAttrTokenMap;
713 SvXMLTokenMap *pTableColAttrTokenMap;
714 SvXMLTokenMap *pTableRowElemTokenMap;
715 SvXMLTokenMap *pTableRowAttrTokenMap;
716 SvXMLTokenMap *pTableRowCellElemTokenMap;
717 SvXMLTokenMap *pTableRowCellAttrTokenMap;
718 SvXMLTokenMap *pTableAnnotationAttrTokenMap;
719 SvXMLTokenMap *pDetectiveElemTokenMap;
720 SvXMLTokenMap *pDetectiveHighlightedAttrTokenMap;
721 SvXMLTokenMap *pDetectiveOperationAttrTokenMap;
722 SvXMLTokenMap *pTableCellRangeSourceAttrTokenMap;
723 SvXMLTokenMap *pNamedExpressionsElemTokenMap;
724 SvXMLTokenMap *pNamedRangeAttrTokenMap;
725 SvXMLTokenMap *pNamedExpressionAttrTokenMap;
726 SvXMLTokenMap *pDatabaseRangesElemTokenMap;
727 SvXMLTokenMap *pDatabaseRangeElemTokenMap;
728 SvXMLTokenMap *pDatabaseRangeAttrTokenMap;
729 SvXMLTokenMap *pDatabaseRangeSourceSQLAttrTokenMap;
730 SvXMLTokenMap *pDatabaseRangeSourceTableAttrTokenMap;
731 SvXMLTokenMap *pDatabaseRangeSourceQueryAttrTokenMap;
732 SvXMLTokenMap *pFilterElemTokenMap;
733 SvXMLTokenMap *pFilterAttrTokenMap;
734 SvXMLTokenMap *pFilterConditionAttrTokenMap;
735 SvXMLTokenMap *pSortElemTokenMap;
736 SvXMLTokenMap *pSortAttrTokenMap;
737 SvXMLTokenMap *pSortSortByAttrTokenMap;
738 SvXMLTokenMap *pDatabaseRangeSubTotalRulesElemTokenMap;
739 SvXMLTokenMap *pDatabaseRangeSubTotalRulesAttrTokenMap;
740 SvXMLTokenMap *pSubTotalRulesSortGroupsAttrTokenMap;
741 SvXMLTokenMap *pSubTotalRulesSubTotalRuleElemTokenMap;
742 SvXMLTokenMap *pSubTotalRulesSubTotalRuleAttrTokenMap;
743 SvXMLTokenMap *pSubTotalRuleSubTotalFieldAttrTokenMap;
744 SvXMLTokenMap *pDataPilotTablesElemTokenMap;
745 SvXMLTokenMap *pDataPilotTableAttrTokenMap;
746 SvXMLTokenMap *pDataPilotTableElemTokenMap;
747 SvXMLTokenMap *pDataPilotTableSourceServiceAttrTokenMap;
748 SvXMLTokenMap *pDataPilotGrandTotalAttrTokenMap;
749 SvXMLTokenMap *pDataPilotTableSourceCellRangeElemTokenMap;
750 SvXMLTokenMap *pDataPilotTableSourceCellRangeAttrTokenMap;
751 SvXMLTokenMap *pDataPilotFieldAttrTokenMap;
752 SvXMLTokenMap *pDataPilotFieldElemTokenMap;
753 SvXMLTokenMap *pDataPilotLevelAttrTokenMap;
754 SvXMLTokenMap *pDataPilotLevelElemTokenMap;
755 SvXMLTokenMap *pDataPilotSubTotalsElemTokenMap;
756 SvXMLTokenMap *pDataPilotSubTotalAttrTokenMap;
757 SvXMLTokenMap *pDataPilotMembersElemTokenMap;
758 SvXMLTokenMap *pDataPilotMemberAttrTokenMap;
759 SvXMLTokenMap *pConsolidationAttrTokenMap;
761 ScMyTables aTables;
763 ScMyNamedExpressions* pMyNamedExpressions;
764 ScMyLabelRanges* pMyLabelRanges;
765 ScMyImportValidations* pValidations;
766 ScMyImpDetectiveOpArray* pDetectiveOpArray;
767 ScUnoGuard* pScUnoGuard;
769 std::vector<rtl::OUString> aTableStyles;
770 XMLNumberFormatAttributesExportHelper* pNumberFormatAttributesExportHelper;
771 ScMyStyleNumberFormats* pStyleNumberFormats;
772 com::sun::star::uno::Reference <com::sun::star::util::XNumberFormats> xNumberFormats;
773 com::sun::star::uno::Reference <com::sun::star::util::XNumberFormatTypes> xNumberFormatTypes;
775 com::sun::star::uno::Reference <com::sun::star::sheet::XSheetCellRangeContainer> xSheetCellRanges;
777 rtl::OUString sEmpty;
778 rtl::OUString sPrevStyleName;
779 rtl::OUString sPrevCurrency;
780 sal_uInt32 nSolarMutexLocked;
781 sal_Int32 nProgressCount;
782 sal_uInt16 nStyleFamilyMask;// Mask of styles to load
783 sal_Int16 nPrevCellType;
784 sal_Bool bLoadDoc; // Load doc or styles only
785 sal_Bool bRemoveLastChar;
786 sal_Bool bNullDateSetted;
787 sal_Bool bSelfImportingXMLSet;
788 sal_Bool bLatinDefaultStyle; // latin-only number format in default style?
789 sal_Bool bFromWrapper; // called from ScDocShell / ScXMLImportWrapper?
792 protected:
794 // This method is called after the namespace map has been updated, but
795 // before a context for the current element has been pushed.
796 virtual SvXMLImportContext *CreateContext(USHORT nPrefix,
797 const ::rtl::OUString& rLocalName,
798 const ::com::sun::star::uno::Reference<
799 ::com::sun::star::xml::sax::XAttributeList>& xAttrList );
800 virtual XMLShapeImportHelper* CreateShapeImport();
802 public:
803 // #110680#
804 ScXMLImport(
805 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
806 const sal_uInt16 nImportFlag);
808 ~ScXMLImport() throw();
810 // namespace office
811 // NB: in contrast to other CreateFooContexts, this particular one handles
812 // the root element (i.e. office:document-meta)
813 SvXMLImportContext *CreateMetaContext(
814 const ::rtl::OUString& rLocalName );
815 SvXMLImportContext *CreateFontDeclsContext(const USHORT nPrefix, const ::rtl::OUString& rLocalName,
816 const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList);
817 SvXMLImportContext *CreateScriptContext(
818 const ::rtl::OUString& rLocalName );
819 SvXMLImportContext *CreateStylesContext(const ::rtl::OUString& rLocalName,
820 const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList, sal_Bool bAutoStyles );
821 // SvXMLImportContext *CreateUseStylesContext(const ::rtl::OUString& rLocalName ,
822 // const ::com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList);
823 SvXMLImportContext *CreateBodyContext(
824 const ::rtl::OUString& rLocalName,
825 const ::com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList );
827 virtual void SetStatistics(
828 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue> & i_rStats);
830 inline ScDocument* GetDocument() { return pDoc; }
831 inline const ScDocument* GetDocument() const { return pDoc; }
833 ScMyTables& GetTables() { return aTables; }
835 sal_uInt16 GetStyleFamilyMask() const { return nStyleFamilyMask; }
836 sal_Bool IsStylesOnlyMode() const { return !bLoadDoc; }
838 sal_Bool IsLatinDefaultStyle() const { return bLatinDefaultStyle; }
840 sal_Int16 GetCellType(const ::rtl::OUString& rStrValue) const;
842 // SvI18NMap& GetI18NMap() { return *pI18NMap; }
844 // inline const SvXMLImportItemMapper& GetParaItemMapper() const;
845 // SvXMLImportContext *CreateParaItemImportContext( USHORT nPrefix,
846 // const ::rtl::OUString& rLocalName,
847 // const ::com::sun::star::uno::Reference<
848 // ::com::sun::star::xml::sax::XAttributeList& xAttrList,
849 // SfxItemSet& rItemSet );
851 UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const { return xCellStylesPropertySetMapper; }
852 UniReference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const { return xColumnStylesPropertySetMapper; }
853 UniReference < XMLPropertySetMapper > GetRowStylesPropertySetMapper() const { return xRowStylesPropertySetMapper; }
854 UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const { return xTableStylesPropertySetMapper; }
855 // SvXMLImportContextRef GetAutoStyles() const { return xAutoStyles; }
856 // SvXMLImportContextRef GetStyles() const { return xStyles; }
858 const SvXMLTokenMap& GetDocElemTokenMap();
859 //UNUSED2008-05 const SvXMLTokenMap& GetStylesElemTokenMap();
860 //UNUSED2008-05 const SvXMLTokenMap& GetStylesAttrTokenMap();
861 //UNUSED2008-05 const SvXMLTokenMap& GetStyleElemTokenMap();
862 const SvXMLTokenMap& GetBodyElemTokenMap();
863 const SvXMLTokenMap& GetContentValidationsElemTokenMap();
864 const SvXMLTokenMap& GetContentValidationElemTokenMap();
865 const SvXMLTokenMap& GetContentValidationAttrTokenMap();
866 const SvXMLTokenMap& GetContentValidationMessageElemTokenMap();
867 const SvXMLTokenMap& GetContentValidationHelpMessageAttrTokenMap();
868 const SvXMLTokenMap& GetContentValidationErrorMessageAttrTokenMap();
869 const SvXMLTokenMap& GetContentValidationErrorMacroAttrTokenMap();
870 const SvXMLTokenMap& GetLabelRangesElemTokenMap();
871 const SvXMLTokenMap& GetLabelRangeAttrTokenMap();
872 const SvXMLTokenMap& GetTableElemTokenMap();
873 const SvXMLTokenMap& GetTableProtectionAttrTokenMap();
874 const SvXMLTokenMap& GetTableRowsElemTokenMap();
875 const SvXMLTokenMap& GetTableColsElemTokenMap();
876 const SvXMLTokenMap& GetTableAttrTokenMap();
877 const SvXMLTokenMap& GetTableScenarioAttrTokenMap();
878 const SvXMLTokenMap& GetTableColAttrTokenMap();
879 const SvXMLTokenMap& GetTableRowElemTokenMap();
880 const SvXMLTokenMap& GetTableRowAttrTokenMap();
881 const SvXMLTokenMap& GetTableRowCellElemTokenMap();
882 const SvXMLTokenMap& GetTableRowCellAttrTokenMap();
883 const SvXMLTokenMap& GetTableAnnotationAttrTokenMap();
884 const SvXMLTokenMap& GetDetectiveElemTokenMap();
885 const SvXMLTokenMap& GetDetectiveHighlightedAttrTokenMap();
886 const SvXMLTokenMap& GetDetectiveOperationAttrTokenMap();
887 const SvXMLTokenMap& GetTableCellRangeSourceAttrTokenMap();
888 const SvXMLTokenMap& GetNamedExpressionsElemTokenMap();
889 const SvXMLTokenMap& GetNamedRangeAttrTokenMap();
890 const SvXMLTokenMap& GetNamedExpressionAttrTokenMap();
891 const SvXMLTokenMap& GetDatabaseRangesElemTokenMap();
892 const SvXMLTokenMap& GetDatabaseRangeElemTokenMap();
893 const SvXMLTokenMap& GetDatabaseRangeAttrTokenMap();
894 const SvXMLTokenMap& GetDatabaseRangeSourceSQLAttrTokenMap();
895 const SvXMLTokenMap& GetDatabaseRangeSourceTableAttrTokenMap();
896 const SvXMLTokenMap& GetDatabaseRangeSourceQueryAttrTokenMap();
897 const SvXMLTokenMap& GetFilterElemTokenMap();
898 const SvXMLTokenMap& GetFilterAttrTokenMap();
899 const SvXMLTokenMap& GetFilterConditionAttrTokenMap();
900 const SvXMLTokenMap& GetSortElemTokenMap();
901 const SvXMLTokenMap& GetSortAttrTokenMap();
902 const SvXMLTokenMap& GetSortSortByAttrTokenMap();
903 const SvXMLTokenMap& GetDatabaseRangeSubTotalRulesElemTokenMap();
904 const SvXMLTokenMap& GetDatabaseRangeSubTotalRulesAttrTokenMap();
905 const SvXMLTokenMap& GetSubTotalRulesSortGroupsAttrTokenMap();
906 const SvXMLTokenMap& GetSubTotalRulesSubTotalRuleElemTokenMap();
907 const SvXMLTokenMap& GetSubTotalRulesSubTotalRuleAttrTokenMap();
908 const SvXMLTokenMap& GetSubTotalRuleSubTotalFieldAttrTokenMap();
909 const SvXMLTokenMap& GetDataPilotTablesElemTokenMap();
910 const SvXMLTokenMap& GetDataPilotTableAttrTokenMap();
911 const SvXMLTokenMap& GetDataPilotTableElemTokenMap();
912 const SvXMLTokenMap& GetDataPilotTableSourceServiceAttrTokenMap();
913 const SvXMLTokenMap& GetDataPilotGrandTotalAttrTokenMap();
914 const SvXMLTokenMap& GetDataPilotTableSourceCellRangeElemTokenMap();
915 const SvXMLTokenMap& GetDataPilotTableSourceCellRangeAttrTokenMap();
916 const SvXMLTokenMap& GetDataPilotFieldAttrTokenMap();
917 const SvXMLTokenMap& GetDataPilotFieldElemTokenMap();
918 const SvXMLTokenMap& GetDataPilotLevelAttrTokenMap();
919 const SvXMLTokenMap& GetDataPilotLevelElemTokenMap();
920 const SvXMLTokenMap& GetDataPilotSubTotalsElemTokenMap();
921 const SvXMLTokenMap& GetDataPilotSubTotalAttrTokenMap();
922 const SvXMLTokenMap& GetDataPilotMembersElemTokenMap();
923 const SvXMLTokenMap& GetDataPilotMemberAttrTokenMap();
924 const SvXMLTokenMap& GetConsolidationAttrTokenMap();
925 // const SvXMLTokenMap& GetTextPElemTokenMap();
926 // const SvXMLTokenMap& GetTextPAttrTokenMap();
927 // const SvXMLTokenMap& GetStyleStylesElemTokenMap();
928 // const SvXMLTokenMap& GetTextListBlockAttrTokenMap();
929 // const SvXMLTokenMap& GetTextListBlockElemTokenMap();
931 void AddNamedExpression(const ScMyNamedExpression* pMyNamedExpression) {
932 if (!pMyNamedExpressions)
933 pMyNamedExpressions = new ScMyNamedExpressions();
934 pMyNamedExpressions->push_back(pMyNamedExpression); }
935 ScMyNamedExpressions* GetNamedExpressions() { return pMyNamedExpressions; }
937 void AddLabelRange(const ScMyLabelRange* pMyLabelRange) {
938 if (!pMyLabelRanges)
939 pMyLabelRanges = new ScMyLabelRanges();
940 pMyLabelRanges->push_back(pMyLabelRange); }
941 ScMyLabelRanges* GetLabelRanges() { return pMyLabelRanges; }
943 void AddValidation(const ScMyImportValidation& rValidation) {
944 if (!pValidations)
945 pValidations = new ScMyImportValidations();
946 pValidations->push_back(rValidation); }
947 sal_Bool GetValidation(const rtl::OUString& sName, ScMyImportValidation& aValidation);
949 inline ScMyImpDetectiveOpArray* GetDetectiveOpArray() {
950 if (!pDetectiveOpArray)
951 pDetectiveOpArray = new ScMyImpDetectiveOpArray();
952 return pDetectiveOpArray; }
954 void SetRemoveLastChar(sal_Bool bValue) { bRemoveLastChar = bValue; }
955 sal_Bool GetRemoveLastChar() { return bRemoveLastChar; }
957 ScXMLChangeTrackingImportHelper* GetChangeTrackingImportHelper();
958 void AddViewContext(SvXMLImportContext* pContext) { aViewContextList.push_back(pContext); }
959 void InsertStyles();
961 void SetChangeTrackingViewSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rChangeProps);
962 virtual void SetViewSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aViewProps);
963 virtual void SetConfigurationSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aConfigProps);
965 void SetTableStyle(const rtl::OUString& rValue) { aTableStyles.push_back(rValue); }
966 std::vector<rtl::OUString> GetTableStyle() { return aTableStyles; }
967 ScMyStylesImportHelper* GetStylesImportHelper() { return pStylesImportHelper; }
968 sal_Int32 SetCurrencySymbol(const sal_Int32 nKey, const rtl::OUString& rCurrency);
969 sal_Bool IsCurrencySymbol(const sal_Int32 nNumberFormat, const rtl::OUString& sCurrencySymbol, const rtl::OUString& sBankSymbol);
970 void SetType(com::sun::star::uno::Reference <com::sun::star::beans::XPropertySet>& rProperties,
971 sal_Int32& rNumberFormat,
972 const sal_Int16 nCellType,
973 const rtl::OUString& rCurrency);
975 void ProgressBarIncrement(sal_Bool bEditCell, sal_Int32 nInc = 1);
977 private:
978 void AddStyleRange(const com::sun::star::table::CellRangeAddress& rCellRange);
979 void SetStyleToRanges();
981 void ExamineDefaultStyle();
982 public:
983 void SetStyleToRange(const ScRange& rRange, const rtl::OUString* pStyleName,
984 const sal_Int16 nCellType, const rtl::OUString* pCurrency);
985 sal_Bool SetNullDateOnUnitConverter();
986 XMLNumberFormatAttributesExportHelper* GetNumberFormatAttributesExportHelper();
987 ScMyStyleNumberFormats* GetStyleNumberFormats();
989 void SetStylesToRangesFinished();
991 // XImporter
992 virtual void SAL_CALL setTargetDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
994 // XServiceInfo
995 virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
997 // ::com::sun::star::xml::sax::XDocumentHandler
998 virtual void SAL_CALL startDocument(void)
999 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
1000 virtual void SAL_CALL endDocument(void)
1001 throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
1003 virtual void DisposingModel();
1005 void LockSolarMutex();
1006 void UnlockSolarMutex();
1008 sal_Int32 GetByteOffset();
1010 void SetRangeOverflowType(sal_uInt32 nType);
1012 sal_Int32 GetRangeType(const rtl::OUString sRangeType) const;
1013 void SetNamedRanges();
1014 void SetLabelRanges();
1015 void AddDefaultNote( const com::sun::star::table::CellAddress& aCell );
1017 sal_Int32 GetVisibleSheet();
1018 /** Extracts the formula string, the formula grammar namespace URL, and a
1019 grammar enum value from the passed formula attribute value.
1021 @param rFormula
1022 (out-parameter) Returns the plain formula string with the leading
1023 equality sign if existing.
1025 @param rFormulaNmsp
1026 (out-parameter) Returns the URL of the formula grammar namespace if
1027 the attribute value contains the prefix of an unknown namespace.
1029 @param reGrammar
1030 (out-parameter) Returns the exact formula grammar if the formula
1031 is in a supported ODF format (e.g. FormulaGrammar::GRAM_PODF for
1032 ODF 1.0/1.1 formulas, or FormulaGrammar::GRAM_ODFF for ODF 1.2
1033 formulas a.k.a. OpenFormula). Returns the default storage grammar,
1034 if the attribute value does not contain a namespace prefix. Returns
1035 the special value FormulaGrammar::GRAM_EXTERNAL, if an unknown
1036 namespace could be extracted from the formula which will be
1037 contained in the parameter rFormulaNmsp then.
1039 @param rAttrValue
1040 The value of the processed formula attribute.
1042 @param bRestrictToExternalNmsp
1043 If set to TRUE, only namespaces of external formula grammars will
1044 be recognized. Internal namespace prefixes (e.g. 'oooc:' or 'of:'
1045 will be considered to be part of the formula, e.g. an expression
1046 with range operator.
1048 void ExtractFormulaNamespaceGrammar(
1049 ::rtl::OUString& rFormula,
1050 ::rtl::OUString& rFormulaNmsp,
1051 ::formula::FormulaGrammar::Grammar& reGrammar,
1052 const ::rtl::OUString& rAttrValue,
1053 bool bRestrictToExternalNmsp = false ) const;
1056 #endif