1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
|
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: xmlimprt.hxx,v $
*
* $Revision: 1.95 $
*
* last change: $Author: kz $ $Date: 2008-03-06 16:04:49 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
************************************************************************/
#ifndef SC_XMLIMPRT_HXX
#define SC_XMLIMPRT_HXX
#ifndef _RSCSFX_HXX
#include <rsc/rscsfx.hxx>
#endif
#ifndef _XMLOFF_XMLICTXT_HXX
#include <xmloff/xmlictxt.hxx>
#endif
#ifndef _XMLOFF_XMLIMP_HXX
#include <xmloff/xmlimp.hxx>
#endif
#ifndef _XMLOFF_XMLTKMAP_HXX
#include <xmloff/xmltkmap.hxx>
#endif
#ifndef _XMLOFF_XMLASTPLP_HXX
#include <xmloff/xmlaustp.hxx>
#endif
#ifndef _XMLOFF_XMLSTYLE_HXX
#include <xmloff/xmlstyle.hxx>
#endif
#include <com/sun/star/frame/XModel.hpp>
#include <tools/time.hxx>
#include <com/sun/star/util/DateTime.hpp>
#include <vector>
#include "xmlsubti.hxx"
#include "global.hxx"
#include "grammar.hxx"
#ifndef _XMLSTYLE_HXX
#include "xmlstyle.hxx"
#endif
#ifndef _SC_XMLDETECTIVECONTEXT_HXX
#include "XMLDetectiveContext.hxx"
#endif
#ifndef _COM_SUN_STAR_SHEET_VALIDATIONALERTSTYLE_HPP_
#include <com/sun/star/sheet/ValidationAlertStyle.hpp>
#endif
#ifndef _COM_SUN_STAR_SHEET_VALIDATIONTYPE_HPP_
#include <com/sun/star/sheet/ValidationType.hpp>
#endif
#ifndef _COM_SUN_STAR_SHEET_CONDITIONOPERATOR_HPP_
#include <com/sun/star/sheet/ConditionOperator.hpp>
#endif
#ifndef _COM_SUN_STAR_TABLE_CELLADDRESS_HPP_
#include <com/sun/star/table/CellAddress.hpp>
#endif
#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
#endif
#ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATTYPES_HPP_
#include <com/sun/star/util/XNumberFormatTypes.hpp>
#endif
#ifndef _COM_SUN_STAR_SHEET_XSHEETCELLRANGECONTAINER_HPP_
#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp>
#endif
class ScRangeList;
class ScMyStyleNumberFormats;
class XMLNumberFormatAttributesExportHelper;
using namespace rtl;
enum ScXMLDocTokens
{
XML_TOK_DOC_FONTDECLS,
XML_TOK_DOC_STYLES,
XML_TOK_DOC_AUTOSTYLES,
XML_TOK_DOC_MASTERSTYLES,
XML_TOK_DOC_META,
XML_TOK_DOC_SCRIPTS,
XML_TOK_DOC_BODY,
XML_TOK_DOC_SETTINGS,
XML_TOK_OFFICE_END=XML_TOK_UNKNOWN
};
enum ScXMLStylesTokens
{
XML_TOK_STYLES_STYLE
};
enum ScXMLStylesAttrTokens
{
XML_TOK_STYLES_STYLE_NAME,
XML_TOK_STYLES_STYLE_FAMILY,
XML_TOK_STYLES_STYLE_PARENT_STYLE_NAME
};
enum ScXMLStyleTokens
{
XML_TOK_STYLE_PROPERTIES
};
enum ScXMLBodyTokens
{
XML_TOK_BODY_TRACKED_CHANGES,
XML_TOK_BODY_CALCULATION_SETTINGS,
XML_TOK_BODY_CONTENT_VALIDATIONS,
XML_TOK_BODY_LABEL_RANGES,
XML_TOK_BODY_TABLE,
XML_TOK_BODY_NAMED_EXPRESSIONS,
XML_TOK_BODY_DATABASE_RANGES,
XML_TOK_BODY_DATABASE_RANGE,
XML_TOK_BODY_DATA_PILOT_TABLES,
XML_TOK_BODY_CONSOLIDATION,
XML_TOK_BODY_DDE_LINKS
};
enum ScXMLContentValidationsElemTokens
{
XML_TOK_CONTENT_VALIDATION
};
enum ScXMLContentValidationElemTokens
{
XML_TOK_CONTENT_VALIDATION_ELEM_HELP_MESSAGE,
XML_TOK_CONTENT_VALIDATION_ELEM_ERROR_MESSAGE,
XML_TOK_CONTENT_VALIDATION_ELEM_ERROR_MACRO,
XML_TOK_CONTENT_VALIDATION_ELEM_EVENT_LISTENERS
};
enum ScXMLContentValidationAttrTokens
{
XML_TOK_CONTENT_VALIDATION_NAME,
XML_TOK_CONTENT_VALIDATION_CONDITION,
XML_TOK_CONTENT_VALIDATION_BASE_CELL_ADDRESS,
XML_TOK_CONTENT_VALIDATION_ALLOW_EMPTY_CELL,
XML_TOK_CONTENT_VALIDATION_DISPLAY_LIST
};
enum ScXMLContentValidationMessageElemTokens
{
XML_TOK_P
};
enum ScXMLContentValidationHelpMessageAttrTokens
{
XML_TOK_HELP_MESSAGE_ATTR_TITLE,
XML_TOK_HELP_MESSAGE_ATTR_DISPLAY
};
enum ScXMLContentValidationErrorMessageAttrTokens
{
XML_TOK_ERROR_MESSAGE_ATTR_TITLE,
XML_TOK_ERROR_MESSAGE_ATTR_DISPLAY,
XML_TOK_ERROR_MESSAGE_ATTR_MESSAGE_TYPE
};
enum ScXMLContentValidationErrorMacroAttrTokens
{
XML_TOK_ERROR_MACRO_ATTR_NAME,
XML_TOK_ERROR_MACRO_ATTR_EXECUTE
};
enum ScXMLLabelRangesElemTokens
{
XML_TOK_LABEL_RANGE_ELEM
};
enum ScXMLLabelRangeAttrTokens
{
XML_TOK_LABEL_RANGE_ATTR_LABEL_RANGE,
XML_TOK_LABEL_RANGE_ATTR_DATA_RANGE,
XML_TOK_LABEL_RANGE_ATTR_ORIENTATION
};
enum ScXMLTableTokens
{
XML_TOK_TABLE_COL_GROUP,
XML_TOK_TABLE_HEADER_COLS,
XML_TOK_TABLE_COLS,
XML_TOK_TABLE_COL,
XML_TOK_TABLE_ROW_GROUP,
XML_TOK_TABLE_HEADER_ROWS,
XML_TOK_TABLE_ROWS,
XML_TOK_TABLE_ROW,
XML_TOK_TABLE_SOURCE,
XML_TOK_TABLE_SCENARIO,
XML_TOK_TABLE_SHAPES,
XML_TOK_TABLE_FORMS
};
enum ScXMLTableRowsTokens
{
XML_TOK_TABLE_ROWS_ROW_GROUP,
XML_TOK_TABLE_ROWS_HEADER_ROWS,
XML_TOK_TABLE_ROWS_ROWS,
XML_TOK_TABLE_ROWS_ROW
};
enum ScXMLTableColsTokens
{
XML_TOK_TABLE_COLS_COL_GROUP,
XML_TOK_TABLE_COLS_HEADER_COLS,
XML_TOK_TABLE_COLS_COLS,
XML_TOK_TABLE_COLS_COL
};
enum ScXMLTableAttrTokens
{
XML_TOK_TABLE_NAME,
XML_TOK_TABLE_STYLE_NAME,
XML_TOK_TABLE_PROTECTION,
XML_TOK_TABLE_PRINT_RANGES,
XML_TOK_TABLE_PASSWORD,
XML_TOK_TABLE_PRINT
};
enum ScXMLTableScenarioAttrTokens
{
XML_TOK_TABLE_SCENARIO_ATTR_DISPLAY_BORDER,
XML_TOK_TABLE_SCENARIO_ATTR_BORDER_COLOR,
XML_TOK_TABLE_SCENARIO_ATTR_COPY_BACK,
XML_TOK_TABLE_SCENARIO_ATTR_COPY_STYLES,
XML_TOK_TABLE_SCENARIO_ATTR_COPY_FORMULAS,
XML_TOK_TABLE_SCENARIO_ATTR_IS_ACTIVE,
XML_TOK_TABLE_SCENARIO_ATTR_SCENARIO_RANGES,
XML_TOK_TABLE_SCENARIO_ATTR_COMMENT,
XML_TOK_TABLE_SCENARIO_ATTR_PROTECTED
};
enum ScXMLTableColAttrTokens
{
XML_TOK_TABLE_COL_ATTR_STYLE_NAME,
XML_TOK_TABLE_COL_ATTR_REPEATED,
XML_TOK_TABLE_COL_ATTR_VISIBILITY,
XML_TOK_TABLE_COL_ATTR_DEFAULT_CELL_STYLE_NAME
};
enum ScXMLTableRowTokens
{
XML_TOK_TABLE_ROW_CELL,
XML_TOK_TABLE_ROW_COVERED_CELL
};
enum ScXMLTableRowAttrTokens
{
XML_TOK_TABLE_ROW_ATTR_STYLE_NAME,
XML_TOK_TABLE_ROW_ATTR_VISIBILITY,
XML_TOK_TABLE_ROW_ATTR_REPEATED,
XML_TOK_TABLE_ROW_ATTR_DEFAULT_CELL_STYLE_NAME
// XML_TOK_TABLE_ROW_ATTR_USE_OPTIMAL_HEIGHT
};
enum ScXMLTableRowCellTokens
{
XML_TOK_TABLE_ROW_CELL_P,
XML_TOK_TABLE_ROW_CELL_TABLE,
XML_TOK_TABLE_ROW_CELL_ANNOTATION,
XML_TOK_TABLE_ROW_CELL_DETECTIVE,
XML_TOK_TABLE_ROW_CELL_CELL_RANGE_SOURCE
};
enum ScXMLTableRowCellAttrTokens
{
XML_TOK_TABLE_ROW_CELL_ATTR_STYLE_NAME,
XML_TOK_TABLE_ROW_CELL_ATTR_CONTENT_VALIDATION_NAME,
XML_TOK_TABLE_ROW_CELL_ATTR_SPANNED_ROWS,
XML_TOK_TABLE_ROW_CELL_ATTR_SPANNED_COLS,
XML_TOK_TABLE_ROW_CELL_ATTR_SPANNED_MATRIX_COLS,
XML_TOK_TABLE_ROW_CELL_ATTR_SPANNED_MATRIX_ROWS,
XML_TOK_TABLE_ROW_CELL_ATTR_REPEATED,
XML_TOK_TABLE_ROW_CELL_ATTR_VALUE_TYPE,
XML_TOK_TABLE_ROW_CELL_ATTR_VALUE,
XML_TOK_TABLE_ROW_CELL_ATTR_DATE_VALUE,
XML_TOK_TABLE_ROW_CELL_ATTR_TIME_VALUE,
XML_TOK_TABLE_ROW_CELL_ATTR_STRING_VALUE,
XML_TOK_TABLE_ROW_CELL_ATTR_BOOLEAN_VALUE,
XML_TOK_TABLE_ROW_CELL_ATTR_FORMULA,
XML_TOK_TABLE_ROW_CELL_ATTR_CURRENCY
};
enum ScXMLAnnotationAttrTokens
{
XML_TOK_TABLE_ANNOTATION_ATTR_AUTHOR,
XML_TOK_TABLE_ANNOTATION_ATTR_CREATE_DATE,
XML_TOK_TABLE_ANNOTATION_ATTR_CREATE_DATE_STRING,
XML_TOK_TABLE_ANNOTATION_ATTR_DISPLAY,
XML_TOK_TABLE_ANNOTATION_ATTR_X,
XML_TOK_TABLE_ANNOTATION_ATTR_Y
};
enum ScXMLDetectiveElemTokens
{
XML_TOK_DETECTIVE_ELEM_HIGHLIGHTED,
XML_TOK_DETECTIVE_ELEM_OPERATION
};
enum ScXMLDetectiveHighlightedAttrTokens
{
XML_TOK_DETECTIVE_HIGHLIGHTED_ATTR_CELL_RANGE,
XML_TOK_DETECTIVE_HIGHLIGHTED_ATTR_DIRECTION,
XML_TOK_DETECTIVE_HIGHLIGHTED_ATTR_CONTAINS_ERROR,
XML_TOK_DETECTIVE_HIGHLIGHTED_ATTR_MARKED_INVALID
};
enum ScXMLDetectiveOperationAttrTokens
{
XML_TOK_DETECTIVE_OPERATION_ATTR_NAME,
XML_TOK_DETECTIVE_OPERATION_ATTR_INDEX
};
enum ScXMLCellRangeSourceAttrTokens
{
XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_NAME,
XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_HREF,
XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_FILTER_NAME,
XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_FILTER_OPTIONS,
XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_LAST_COLUMN,
XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_LAST_ROW,
XML_TOK_TABLE_CELL_RANGE_SOURCE_ATTR_REFRESH_DELAY
};
enum ScXMLNamedExpressionsTokens
{
XML_TOK_NAMED_EXPRESSIONS_NAMED_RANGE,
XML_TOK_NAMED_EXPRESSIONS_NAMED_EXPRESSION
};
enum ScXMLNamedRangeAttrTokens
{
XML_TOK_NAMED_RANGE_ATTR_NAME,
XML_TOK_NAMED_RANGE_ATTR_CELL_RANGE_ADDRESS,
XML_TOK_NAMED_RANGE_ATTR_BASE_CELL_ADDRESS,
XML_TOK_NAMED_RANGE_ATTR_RANGE_USABLE_AS
};
enum ScXMLNamedExpressionAttrTokens
{
XML_TOK_NAMED_EXPRESSION_ATTR_NAME,
XML_TOK_NAMED_EXPRESSION_ATTR_BASE_CELL_ADDRESS,
XML_TOK_NAMED_EXPRESSION_ATTR_EXPRESSION
};
enum ScXMLDatabaseRangesTokens
{
XML_TOK_DATABASE_RANGE
};
enum ScXMLDatabaseRangeTokens
{
XML_TOK_DATABASE_RANGE_SOURCE_SQL,
XML_TOK_DATABASE_RANGE_SOURCE_TABLE,
XML_TOK_DATABASE_RANGE_SOURCE_QUERY,
XML_TOK_FILTER,
XML_TOK_SORT,
XML_TOK_DATABASE_RANGE_SUBTOTAL_RULES
};
enum ScXMLDatabaseRangeAttrTokens
{
XML_TOK_DATABASE_RANGE_ATTR_NAME,
XML_TOK_DATABASE_RANGE_ATTR_IS_SELECTION,
XML_TOK_DATABASE_RANGE_ATTR_ON_UPDATE_KEEP_STYLES,
XML_TOK_DATABASE_RANGE_ATTR_ON_UPDATE_KEEP_SIZE,
XML_TOK_DATABASE_RANGE_ATTR_HAS_PERSISTENT_DATA,
XML_TOK_DATABASE_RANGE_ATTR_ORIENTATION,
XML_TOK_DATABASE_RANGE_ATTR_CONTAINS_HEADER,
XML_TOK_DATABASE_RANGE_ATTR_DISPLAY_FILTER_BUTTONS,
XML_TOK_DATABASE_RANGE_ATTR_TARGET_RANGE_ADDRESS,
XML_TOK_DATABASE_RANGE_ATTR_REFRESH_DELAY
};
enum ScXMLDatabaseRangeSourceSQLAttrTokens
{
XML_TOK_SOURCE_SQL_ATTR_DATABASE_NAME,
XML_TOK_SOURCE_SQL_ATTR_HREF,
XML_TOK_SOURCE_SQL_ATTR_CONNECTION_RESSOURCE,
XML_TOK_SOURCE_SQL_ATTR_SQL_STATEMENT,
XML_TOK_SOURCE_SQL_ATTR_PARSE_SQL_STATEMENT
};
enum ScXMLDatabaseRangeSourceTableAttrTokens
{
XML_TOK_SOURCE_TABLE_ATTR_DATABASE_NAME,
XML_TOK_SOURCE_TABLE_ATTR_HREF,
XML_TOK_SOURCE_TABLE_ATTR_CONNECTION_RESSOURCE,
XML_TOK_SOURCE_TABLE_ATTR_TABLE_NAME
};
enum ScXMLDatabaseRangeSourceQueryAttrTokens
{
XML_TOK_SOURCE_QUERY_ATTR_DATABASE_NAME,
XML_TOK_SOURCE_QUERY_ATTR_HREF,
XML_TOK_SOURCE_QUERY_ATTR_CONNECTION_RESSOURCE,
XML_TOK_SOURCE_QUERY_ATTR_QUERY_NAME
};
enum ScXMLFilterTokens
{
XML_TOK_FILTER_AND,
XML_TOK_FILTER_OR,
XML_TOK_FILTER_CONDITION
};
enum ScXMLFilterAttrTokens
{
XML_TOK_FILTER_ATTR_TARGET_RANGE_ADDRESS,
XML_TOK_FILTER_ATTR_CONDITION_SOURCE_RANGE_ADDRESS,
XML_TOK_FILTER_ATTR_CONDITION_SOURCE,
XML_TOK_FILTER_ATTR_DISPLAY_DUPLICATES
};
enum ScXMLFilterConditionAttrTokens
{
XML_TOK_CONDITION_ATTR_FIELD_NUMBER,
XML_TOK_CONDITION_ATTR_CASE_SENSITIVE,
XML_TOK_CONDITION_ATTR_DATA_TYPE,
XML_TOK_CONDITION_ATTR_VALUE,
XML_TOK_CONDITION_ATTR_OPERATOR
};
enum ScXMLSortTokens
{
XML_TOK_SORT_SORT_BY
};
enum ScXMLSortAttrTokens
{
XML_TOK_SORT_ATTR_BIND_STYLES_TO_CONTENT,
XML_TOK_SORT_ATTR_TARGET_RANGE_ADDRESS,
XML_TOK_SORT_ATTR_CASE_SENSITIVE,
XML_TOK_SORT_ATTR_LANGUAGE,
XML_TOK_SORT_ATTR_COUNTRY,
XML_TOK_SORT_ATTR_ALGORITHM
};
enum ScXMLSortSortByAttrTokens
{
XML_TOK_SORT_BY_ATTR_FIELD_NUMBER,
XML_TOK_SORT_BY_ATTR_DATA_TYPE,
XML_TOK_SORT_BY_ATTR_ORDER
};
enum ScXMLDatabaseRangeSubTotalRulesTokens
{
XML_TOK_SUBTOTAL_RULES_SORT_GROUPS,
XML_TOK_SUBTOTAL_RULES_SUBTOTAL_RULE
};
enum ScXMLDatabaseRangeSubTotalRulesAttrTokens
{
XML_TOK_SUBTOTAL_RULES_ATTR_BIND_STYLES_TO_CONTENT,
XML_TOK_SUBTOTAL_RULES_ATTR_CASE_SENSITIVE,
XML_TOK_SUBTOTAL_RULES_ATTR_PAGE_BREAKS_ON_GROUP_CHANGE
};
enum ScXMLSubTotalRulesSortGroupsAttrTokens
{
XML_TOK_SORT_GROUPS_ATTR_DATA_TYPE,
XML_TOK_SORT_GROUPS_ATTR_ORDER
};
enum ScXMLSubTotalRulesSubTotalRuleTokens
{
XML_TOK_SUBTOTAL_RULE_SUBTOTAL_FIELD
};
enum ScXMLSubTotalRulesSubTotalRuleAttrTokens
{
XML_TOK_SUBTOTAL_RULE_ATTR_GROUP_BY_FIELD_NUMBER
};
enum ScXMLSubTotalRuleSubTotalField
{
XML_TOK_SUBTOTAL_FIELD_ATTR_FIELD_NUMBER,
XML_TOK_SUBTOTAL_FIELD_ATTR_FUNCTION
};
enum ScXMLDataPilotTablesElemTokens
{
XML_TOK_DATA_PILOT_TABLE
};
enum ScXMLDataPilotTableAttrTokens
{
XML_TOK_DATA_PILOT_TABLE_ATTR_NAME,
XML_TOK_DATA_PILOT_TABLE_ATTR_APPLICATION_DATA,
XML_TOK_DATA_PILOT_TABLE_ATTR_GRAND_TOTAL,
XML_TOK_DATA_PILOT_TABLE_ATTR_IGNORE_EMPTY_ROWS,
XML_TOK_DATA_PILOT_TABLE_ATTR_IDENTIFY_CATEGORIES,
XML_TOK_DATA_PILOT_TABLE_ATTR_TARGET_RANGE_ADDRESS,
XML_TOK_DATA_PILOT_TABLE_ATTR_BUTTONS,
XML_TOK_DATA_PILOT_TABLE_ATTR_SHOW_FILTER_BUTTON,
XML_TOK_DATA_PILOT_TABLE_ATTR_DRILL_DOWN
};
enum ScXMLDataPilotTableElemTokens
{
XML_TOK_DATA_PILOT_TABLE_ELEM_SOURCE_SQL,
XML_TOK_DATA_PILOT_TABLE_ELEM_SOURCE_TABLE,
XML_TOK_DATA_PILOT_TABLE_ELEM_SOURCE_QUERY,
XML_TOK_DATA_PILOT_TABLE_ELEM_SOURCE_SERVICE,
XML_TOK_DATA_PILOT_TABLE_ELEM_SOURCE_CELL_RANGE,
XML_TOK_DATA_PILOT_TABLE_ELEM_DATA_PILOT_FIELD
};
enum ScXMLDataPilotTableSourceServiceAttrTokens
{
XML_TOK_SOURCE_SERVICE_ATTR_NAME,
XML_TOK_SOURCE_SERVICE_ATTR_SOURCE_NAME,
XML_TOK_SOURCE_SERVICE_ATTR_OBJECT_NAME,
XML_TOK_SOURCE_SERVICE_ATTR_USER_NAME,
XML_TOK_SOURCE_SERVICE_ATTR_PASSWORD
};
enum ScXMLDataPilotTableSourceCellRangeElemTokens
{
XML_TOK_SOURCE_CELL_RANGE_ELEM_FILTER
};
enum ScXMLDataPilotTableSourceCellRangeAttrTokens
{
XML_TOK_SOURCE_CELL_RANGE_ATTR_CELL_RANGE_ADDRESS
};
enum ScXMLDataPilotFieldAttrTokens
{
XML_TOK_DATA_PILOT_FIELD_ATTR_SOURCE_FIELD_NAME,
XML_TOK_DATA_PILOT_FIELD_ATTR_IS_DATA_LAYOUT_FIELD,
XML_TOK_DATA_PILOT_FIELD_ATTR_FUNCTION,
XML_TOK_DATA_PILOT_FIELD_ATTR_ORIENTATION,
XML_TOK_DATA_PILOT_FIELD_ATTR_SELECTED_PAGE,
XML_TOK_DATA_PILOT_FIELD_ATTR_USED_HIERARCHY
};
enum ScXMLDataPilotFieldElemTokens
{
XML_TOK_DATA_PILOT_FIELD_ELEM_DATA_PILOT_LEVEL,
XML_TOK_DATA_PILOT_FIELD_ELEM_DATA_PILOT_REFERENCE,
XML_TOK_DATA_PILOT_FIELD_ELEM_DATA_PILOT_GROUPS
};
enum ScXMLDataPilotLevelAttrTokens
{
XML_TOK_DATA_PILOT_LEVEL_ATTR_SHOW_EMPTY
};
enum ScXMLDataPilotLevelElemTokens
{
XML_TOK_DATA_PILOT_LEVEL_ELEM_DATA_PILOT_SUBTOTALS,
XML_TOK_DATA_PILOT_LEVEL_ELEM_DATA_PILOT_MEMBERS,
XML_TOK_DATA_PILOT_FIELD_ELEM_DATA_PILOT_DISPLAY_INFO,
XML_TOK_DATA_PILOT_FIELD_ELEM_DATA_PILOT_SORT_INFO,
XML_TOK_DATA_PILOT_FIELD_ELEM_DATA_PILOT_LAYOUT_INFO
};
enum ScXMLDataPilotSubTotalsElemTokens
{
XML_TOK_DATA_PILOT_SUBTOTALS_ELEM_DATA_PILOT_SUBTOTAL
};
enum ScXMLDataPilotSubTotalAttrTokens
{
XML_TOK_DATA_PILOT_SUBTOTAL_ATTR_FUNCTION
};
enum ScXMLDataPilotMembersElemTokens
{
XML_TOK_DATA_PILOT_MEMBERS_ELEM_DATA_PILOT_MEMBER
};
enum ScXMLDataPilotMemberAttrTokens
{
XML_TOK_DATA_PILOT_MEMBER_ATTR_NAME,
XML_TOK_DATA_PILOT_MEMBER_ATTR_DISPLAY,
XML_TOK_DATA_PILOT_MEMBER_ATTR_SHOW_DETAILS
};
enum ScXMLConsolidationAttrTokens
{
XML_TOK_CONSOLIDATION_ATTR_FUNCTION,
XML_TOK_CONSOLIDATION_ATTR_SOURCE_RANGES,
XML_TOK_CONSOLIDATION_ATTR_TARGET_ADDRESS,
XML_TOK_CONSOLIDATION_ATTR_USE_LABEL,
XML_TOK_CONSOLIDATION_ATTR_LINK_TO_SOURCE
};
class SvI18NMap;
class SvXMLTokenMap;
//class SvXMLImportItemMapper;
class SvXMLStyleContext;
class SfxItemSet;
class SvXMLNumFmtHelper;
class XMLShapeImportHelper;
class ScXMLChangeTrackingImportHelper;
class ScUnoGuard;
struct tScMyCellRange
{
sal_Int16 Sheet;
sal_Int32 StartColumn, EndColumn;
sal_Int32 StartRow, EndRow;
};
struct ScMyNamedExpression
{
rtl::OUString sName;
rtl::OUString sContent;
rtl::OUString sBaseCellAddress;
rtl::OUString sRangeType;
ScGrammar::Grammar eGrammar;
sal_Bool bIsExpression;
};
typedef std::list<const ScMyNamedExpression*> ScMyNamedExpressions;
struct ScMyLabelRange
{
rtl::OUString sLabelRangeStr;
rtl::OUString sDataRangeStr;
sal_Bool bColumnOrientation;
};
typedef std::list<const ScMyLabelRange*> ScMyLabelRanges;
struct ScMyImportValidation
{
rtl::OUString sName;
rtl::OUString sImputTitle;
rtl::OUString sImputMessage;
rtl::OUString sErrorTitle;
rtl::OUString sErrorMessage;
rtl::OUString sFormula1;
rtl::OUString sFormula2;
rtl::OUString sBaseCellAddress; // #b4974740# string is used directly
com::sun::star::sheet::ValidationAlertStyle aAlertStyle;
com::sun::star::sheet::ValidationType aValidationType;
com::sun::star::sheet::ConditionOperator aOperator;
ScGrammar::Grammar eGrammar;
sal_Int16 nShowList;
sal_Bool bShowErrorMessage;
sal_Bool bShowImputMessage;
sal_Bool bIgnoreBlanks;
};
typedef std::vector<ScMyImportValidation> ScMyImportValidations;
typedef std::list<SvXMLImportContext*> ScMyViewContextList;
typedef std::list<com::sun::star::table::CellAddress> ScMyDefaultNotes;
class ScMyStylesImportHelper;
class ScXMLImport: public SvXMLImport
{
ScDocument* pDoc;
ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper;
ScMyViewContextList aViewContextList;
ScMyStylesImportHelper* pStylesImportHelper;
rtl::OUString sNumberFormat;
rtl::OUString sLocale;
rtl::OUString sCellStyle;
rtl::OUString sStandardFormat;
rtl::OUString sType;
// SvXMLAutoStylePoolP *pScAutoStylePool;
UniReference < XMLPropertyHandlerFactory > xScPropHdlFactory;
UniReference < XMLPropertySetMapper > xCellStylesPropertySetMapper;
UniReference < XMLPropertySetMapper > xColumnStylesPropertySetMapper;
UniReference < XMLPropertySetMapper > xRowStylesPropertySetMapper;
UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper;
// SvXMLImportContextRef xStyles;
// SvXMLImportContextRef xAutoStyles;
// SvXMLImportItemMapper *pParaItemMapper;// paragraph item import
// SvI18NMap *pI18NMap; // name mapping for I18N
SvXMLTokenMap *pDocElemTokenMap;
SvXMLTokenMap *pStylesElemTokenMap;
SvXMLTokenMap *pStylesAttrTokenMap;
SvXMLTokenMap *pStyleElemTokenMap;
SvXMLTokenMap *pBodyElemTokenMap;
SvXMLTokenMap *pContentValidationsElemTokenMap;
SvXMLTokenMap *pContentValidationElemTokenMap;
SvXMLTokenMap *pContentValidationAttrTokenMap;
SvXMLTokenMap *pContentValidationMessageElemTokenMap;
SvXMLTokenMap *pContentValidationHelpMessageAttrTokenMap;
SvXMLTokenMap *pContentValidationErrorMessageAttrTokenMap;
SvXMLTokenMap *pContentValidationErrorMacroAttrTokenMap;
SvXMLTokenMap *pLabelRangesElemTokenMap;
SvXMLTokenMap *pLabelRangeAttrTokenMap;
SvXMLTokenMap *pTableElemTokenMap;
SvXMLTokenMap *pTableRowsElemTokenMap;
SvXMLTokenMap *pTableColsElemTokenMap;
SvXMLTokenMap *pTableScenarioAttrTokenMap;
SvXMLTokenMap *pTableAttrTokenMap;
SvXMLTokenMap *pTableColAttrTokenMap;
SvXMLTokenMap *pTableRowElemTokenMap;
SvXMLTokenMap *pTableRowAttrTokenMap;
SvXMLTokenMap *pTableRowCellElemTokenMap;
SvXMLTokenMap *pTableRowCellAttrTokenMap;
SvXMLTokenMap *pTableAnnotationAttrTokenMap;
SvXMLTokenMap *pDetectiveElemTokenMap;
SvXMLTokenMap *pDetectiveHighlightedAttrTokenMap;
SvXMLTokenMap *pDetectiveOperationAttrTokenMap;
SvXMLTokenMap *pTableCellRangeSourceAttrTokenMap;
SvXMLTokenMap *pNamedExpressionsElemTokenMap;
SvXMLTokenMap *pNamedRangeAttrTokenMap;
SvXMLTokenMap *pNamedExpressionAttrTokenMap;
SvXMLTokenMap *pDatabaseRangesElemTokenMap;
SvXMLTokenMap *pDatabaseRangeElemTokenMap;
SvXMLTokenMap *pDatabaseRangeAttrTokenMap;
SvXMLTokenMap *pDatabaseRangeSourceSQLAttrTokenMap;
SvXMLTokenMap *pDatabaseRangeSourceTableAttrTokenMap;
SvXMLTokenMap *pDatabaseRangeSourceQueryAttrTokenMap;
SvXMLTokenMap *pFilterElemTokenMap;
SvXMLTokenMap *pFilterAttrTokenMap;
SvXMLTokenMap *pFilterConditionAttrTokenMap;
SvXMLTokenMap *pSortElemTokenMap;
SvXMLTokenMap *pSortAttrTokenMap;
SvXMLTokenMap *pSortSortByAttrTokenMap;
SvXMLTokenMap *pDatabaseRangeSubTotalRulesElemTokenMap;
SvXMLTokenMap *pDatabaseRangeSubTotalRulesAttrTokenMap;
SvXMLTokenMap *pSubTotalRulesSortGroupsAttrTokenMap;
SvXMLTokenMap *pSubTotalRulesSubTotalRuleElemTokenMap;
SvXMLTokenMap *pSubTotalRulesSubTotalRuleAttrTokenMap;
SvXMLTokenMap *pSubTotalRuleSubTotalFieldAttrTokenMap;
SvXMLTokenMap *pDataPilotTablesElemTokenMap;
SvXMLTokenMap *pDataPilotTableAttrTokenMap;
SvXMLTokenMap *pDataPilotTableElemTokenMap;
SvXMLTokenMap *pDataPilotTableSourceServiceAttrTokenMap;
SvXMLTokenMap *pDataPilotTableSourceCellRangeElemTokenMap;
SvXMLTokenMap *pDataPilotTableSourceCellRangeAttrTokenMap;
SvXMLTokenMap *pDataPilotFieldAttrTokenMap;
SvXMLTokenMap *pDataPilotFieldElemTokenMap;
SvXMLTokenMap *pDataPilotLevelAttrTokenMap;
SvXMLTokenMap *pDataPilotLevelElemTokenMap;
SvXMLTokenMap *pDataPilotSubTotalsElemTokenMap;
SvXMLTokenMap *pDataPilotSubTotalAttrTokenMap;
SvXMLTokenMap *pDataPilotMembersElemTokenMap;
SvXMLTokenMap *pDataPilotMemberAttrTokenMap;
SvXMLTokenMap *pConsolidationAttrTokenMap;
ScMyTables aTables;
ScMyNamedExpressions* pMyNamedExpressions;
ScMyLabelRanges* pMyLabelRanges;
ScMyImportValidations* pValidations;
ScMyImpDetectiveOpArray* pDetectiveOpArray;
ScMyDefaultNotes* pDefaultNotes;
ScUnoGuard* pScUnoGuard;
std::vector<rtl::OUString> aTableStyles;
XMLNumberFormatAttributesExportHelper* pNumberFormatAttributesExportHelper;
ScMyStyleNumberFormats* pStyleNumberFormats;
com::sun::star::uno::Reference <com::sun::star::util::XNumberFormats> xNumberFormats;
com::sun::star::uno::Reference <com::sun::star::util::XNumberFormatTypes> xNumberFormatTypes;
com::sun::star::uno::Reference <com::sun::star::sheet::XSheetCellRangeContainer> xSheetCellRanges;
rtl::OUString sEmpty;
rtl::OUString sPrevStyleName;
rtl::OUString sPrevCurrency;
sal_uInt32 nSolarMutexLocked;
sal_Int32 nProgressCount;
sal_uInt16 nStyleFamilyMask;// Mask of styles to load
sal_Int16 nPrevCellType;
sal_Bool bLoadDoc; // Load doc or styles only
sal_Bool bRemoveLastChar;
sal_Bool bNullDateSetted;
sal_Bool bSelfImportingXMLSet;
sal_Bool bLatinDefaultStyle; // latin-only number format in default style?
sal_Bool bFromWrapper; // called from ScDocShell / ScXMLImportWrapper?
protected:
// This method is called after the namespace map has been updated, but
// before a context for the current element has been pushed.
virtual SvXMLImportContext *CreateContext(USHORT nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<
::com::sun::star::xml::sax::XAttributeList>& xAttrList );
virtual XMLShapeImportHelper* CreateShapeImport();
public:
// #110680#
ScXMLImport(
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory,
const sal_uInt16 nImportFlag);
~ScXMLImport() throw();
// namespace office
// NB: in contrast to other CreateFooContexts, this particular one handles
// the root element (i.e. office:document-meta)
SvXMLImportContext *CreateMetaContext(
const ::rtl::OUString& rLocalName );
SvXMLImportContext *CreateFontDeclsContext(const USHORT nPrefix, const ::rtl::OUString& rLocalName,
const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList);
SvXMLImportContext *CreateScriptContext(
const ::rtl::OUString& rLocalName );
SvXMLImportContext *CreateStylesContext(const ::rtl::OUString& rLocalName,
const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList, sal_Bool bAutoStyles );
// SvXMLImportContext *CreateUseStylesContext(const ::rtl::OUString& rLocalName ,
// const ::com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList);
SvXMLImportContext *CreateBodyContext(
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList );
virtual void SetStatistics(
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue> & i_rStats);
inline ScDocument* GetDocument() { return pDoc; }
inline const ScDocument* GetDocument() const { return pDoc; }
ScMyTables& GetTables() { return aTables; }
sal_uInt16 GetStyleFamilyMask() const { return nStyleFamilyMask; }
sal_Bool IsStylesOnlyMode() const { return !bLoadDoc; }
sal_Bool IsLatinDefaultStyle() const { return bLatinDefaultStyle; }
// SvI18NMap& GetI18NMap() { return *pI18NMap; }
// inline const SvXMLImportItemMapper& GetParaItemMapper() const;
// SvXMLImportContext *CreateParaItemImportContext( USHORT nPrefix,
// const ::rtl::OUString& rLocalName,
// const ::com::sun::star::uno::Reference<
// ::com::sun::star::xml::sax::XAttributeList& xAttrList,
// SfxItemSet& rItemSet );
UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const { return xCellStylesPropertySetMapper; }
UniReference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const { return xColumnStylesPropertySetMapper; }
UniReference < XMLPropertySetMapper > GetRowStylesPropertySetMapper() const { return xRowStylesPropertySetMapper; }
UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const { return xTableStylesPropertySetMapper; }
// SvXMLImportContextRef GetAutoStyles() const { return xAutoStyles; }
// SvXMLImportContextRef GetStyles() const { return xStyles; }
const SvXMLTokenMap& GetDocElemTokenMap();
const SvXMLTokenMap& GetStylesElemTokenMap();
const SvXMLTokenMap& GetStylesAttrTokenMap();
const SvXMLTokenMap& GetStyleElemTokenMap();
const SvXMLTokenMap& GetBodyElemTokenMap();
const SvXMLTokenMap& GetContentValidationsElemTokenMap();
const SvXMLTokenMap& GetContentValidationElemTokenMap();
const SvXMLTokenMap& GetContentValidationAttrTokenMap();
const SvXMLTokenMap& GetContentValidationMessageElemTokenMap();
const SvXMLTokenMap& GetContentValidationHelpMessageAttrTokenMap();
const SvXMLTokenMap& GetContentValidationErrorMessageAttrTokenMap();
const SvXMLTokenMap& GetContentValidationErrorMacroAttrTokenMap();
const SvXMLTokenMap& GetLabelRangesElemTokenMap();
const SvXMLTokenMap& GetLabelRangeAttrTokenMap();
const SvXMLTokenMap& GetTableElemTokenMap();
const SvXMLTokenMap& GetTableRowsElemTokenMap();
const SvXMLTokenMap& GetTableColsElemTokenMap();
const SvXMLTokenMap& GetTableAttrTokenMap();
const SvXMLTokenMap& GetTableScenarioAttrTokenMap();
const SvXMLTokenMap& GetTableColAttrTokenMap();
const SvXMLTokenMap& GetTableRowElemTokenMap();
const SvXMLTokenMap& GetTableRowAttrTokenMap();
const SvXMLTokenMap& GetTableRowCellElemTokenMap();
const SvXMLTokenMap& GetTableRowCellAttrTokenMap();
const SvXMLTokenMap& GetTableAnnotationAttrTokenMap();
const SvXMLTokenMap& GetDetectiveElemTokenMap();
const SvXMLTokenMap& GetDetectiveHighlightedAttrTokenMap();
const SvXMLTokenMap& GetDetectiveOperationAttrTokenMap();
const SvXMLTokenMap& GetTableCellRangeSourceAttrTokenMap();
const SvXMLTokenMap& GetNamedExpressionsElemTokenMap();
const SvXMLTokenMap& GetNamedRangeAttrTokenMap();
const SvXMLTokenMap& GetNamedExpressionAttrTokenMap();
const SvXMLTokenMap& GetDatabaseRangesElemTokenMap();
const SvXMLTokenMap& GetDatabaseRangeElemTokenMap();
const SvXMLTokenMap& GetDatabaseRangeAttrTokenMap();
const SvXMLTokenMap& GetDatabaseRangeSourceSQLAttrTokenMap();
const SvXMLTokenMap& GetDatabaseRangeSourceTableAttrTokenMap();
const SvXMLTokenMap& GetDatabaseRangeSourceQueryAttrTokenMap();
const SvXMLTokenMap& GetFilterElemTokenMap();
const SvXMLTokenMap& GetFilterAttrTokenMap();
const SvXMLTokenMap& GetFilterConditionAttrTokenMap();
const SvXMLTokenMap& GetSortElemTokenMap();
const SvXMLTokenMap& GetSortAttrTokenMap();
const SvXMLTokenMap& GetSortSortByAttrTokenMap();
const SvXMLTokenMap& GetDatabaseRangeSubTotalRulesElemTokenMap();
const SvXMLTokenMap& GetDatabaseRangeSubTotalRulesAttrTokenMap();
const SvXMLTokenMap& GetSubTotalRulesSortGroupsAttrTokenMap();
const SvXMLTokenMap& GetSubTotalRulesSubTotalRuleElemTokenMap();
const SvXMLTokenMap& GetSubTotalRulesSubTotalRuleAttrTokenMap();
const SvXMLTokenMap& GetSubTotalRuleSubTotalFieldAttrTokenMap();
const SvXMLTokenMap& GetDataPilotTablesElemTokenMap();
const SvXMLTokenMap& GetDataPilotTableAttrTokenMap();
const SvXMLTokenMap& GetDataPilotTableElemTokenMap();
const SvXMLTokenMap& GetDataPilotTableSourceServiceAttrTokenMap();
const SvXMLTokenMap& GetDataPilotTableSourceCellRangeElemTokenMap();
const SvXMLTokenMap& GetDataPilotTableSourceCellRangeAttrTokenMap();
const SvXMLTokenMap& GetDataPilotFieldAttrTokenMap();
const SvXMLTokenMap& GetDataPilotFieldElemTokenMap();
const SvXMLTokenMap& GetDataPilotLevelAttrTokenMap();
const SvXMLTokenMap& GetDataPilotLevelElemTokenMap();
const SvXMLTokenMap& GetDataPilotSubTotalsElemTokenMap();
const SvXMLTokenMap& GetDataPilotSubTotalAttrTokenMap();
const SvXMLTokenMap& GetDataPilotMembersElemTokenMap();
const SvXMLTokenMap& GetDataPilotMemberAttrTokenMap();
const SvXMLTokenMap& GetConsolidationAttrTokenMap();
// const SvXMLTokenMap& GetTextPElemTokenMap();
// const SvXMLTokenMap& GetTextPAttrTokenMap();
// const SvXMLTokenMap& GetStyleStylesElemTokenMap();
// const SvXMLTokenMap& GetTextListBlockAttrTokenMap();
// const SvXMLTokenMap& GetTextListBlockElemTokenMap();
void AddNamedExpression(const ScMyNamedExpression* pMyNamedExpression) {
if (!pMyNamedExpressions)
pMyNamedExpressions = new ScMyNamedExpressions();
pMyNamedExpressions->push_back(pMyNamedExpression); }
ScMyNamedExpressions* GetNamedExpressions() { return pMyNamedExpressions; }
void AddLabelRange(const ScMyLabelRange* pMyLabelRange) {
if (!pMyLabelRanges)
pMyLabelRanges = new ScMyLabelRanges();
pMyLabelRanges->push_back(pMyLabelRange); }
ScMyLabelRanges* GetLabelRanges() { return pMyLabelRanges; }
void AddValidation(const ScMyImportValidation& rValidation) {
if (!pValidations)
pValidations = new ScMyImportValidations();
pValidations->push_back(rValidation); }
sal_Bool GetValidation(const rtl::OUString& sName, ScMyImportValidation& aValidation);
inline ScMyImpDetectiveOpArray* GetDetectiveOpArray() {
if (!pDetectiveOpArray)
pDetectiveOpArray = new ScMyImpDetectiveOpArray();
return pDetectiveOpArray; }
void SetRemoveLastChar(sal_Bool bValue) { bRemoveLastChar = bValue; }
sal_Bool GetRemoveLastChar() { return bRemoveLastChar; }
ScXMLChangeTrackingImportHelper* GetChangeTrackingImportHelper();
void AddViewContext(SvXMLImportContext* pContext) { aViewContextList.push_back(pContext); }
void InsertStyles();
void SetChangeTrackingViewSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& rChangeProps);
virtual void SetViewSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aViewProps);
virtual void SetConfigurationSettings(const com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>& aConfigProps);
void SetTableStyle(const rtl::OUString& rValue) { aTableStyles.push_back(rValue); }
std::vector<rtl::OUString> GetTableStyle() { return aTableStyles; }
ScMyStylesImportHelper* GetStylesImportHelper() { return pStylesImportHelper; }
sal_Int32 SetCurrencySymbol(const sal_Int32 nKey, const rtl::OUString& rCurrency);
sal_Bool IsCurrencySymbol(const sal_Int32 nNumberFormat, const rtl::OUString& sCurrencySymbol, const rtl::OUString& sBankSymbol);
void SetType(com::sun::star::uno::Reference <com::sun::star::beans::XPropertySet>& rProperties,
sal_Int32& rNumberFormat,
const sal_Int16 nCellType,
const rtl::OUString& rCurrency);
void ProgressBarIncrement(sal_Bool bEditCell, sal_Int32 nInc = 1);
private:
void AddStyleRange(const com::sun::star::table::CellRangeAddress& rCellRange);
void SetStyleToRanges();
void SetDefaultNotes();
void ExamineDefaultStyle();
public:
void SetStyleToRange(const ScRange& rRange, const rtl::OUString* pStyleName,
const sal_Int16 nCellType, const rtl::OUString* pCurrency);
sal_Bool SetNullDateOnUnitConverter();
XMLNumberFormatAttributesExportHelper* GetNumberFormatAttributesExportHelper();
ScMyStyleNumberFormats* GetStyleNumberFormats();
void SetStylesToRangesFinished();
// XImporter
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);
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
// ::com::sun::star::xml::sax::XDocumentHandler
virtual void SAL_CALL startDocument(void)
throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
virtual void SAL_CALL endDocument(void)
throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
virtual void DisposingModel();
void LockSolarMutex();
void UnlockSolarMutex();
void SetRangeOverflowType(sal_uInt32 nType);
sal_Int32 GetRangeType(const rtl::OUString sRangeType) const;
void SetNamedRanges();
void SetLabelRanges();
void AddDefaultNote( const com::sun::star::table::CellAddress& aCell );
/** If namespace prefix is an accepted formula namespace.
For an accepted namespace (return <TRUE/>), the formula text is the
part without the namespace tag (aFormula of the _GetKeyByAttrName()
example below).
For an invalid namespace (not defined in the file,
XML_NAMESPACE_UNKNOWN; may also be the result of no namespace with
colon in the formula text, in that case text has to start with
character '=') or no namespace tag (XML_NAMESPACE_NONE) the full text
(rValue) should be used (return <FALSE/>).
@param nFormulaPrefix
The result of a _GetKeyByAttrName( rValue, aFormula, sal_False)
call.
@param rValue
The attribute's string (formula text) including the namespace, if
any.
@param rGrammar
Return value set to ScGrammar::GRAM_ODFF or ScGrammar::GRAM_PODF or
eStorageGrammar, according to the namespace or absence thereof
encountered.
@param eStorageGrammar
Default storage grammar of the document, ScGrammar::GRAM_ODFF for
ODF 1.2 and later documents, ScGrammar::GRAM_PODF for ODF 1.x
documents.
@return
<TRUE/> if an accepted namespace (XML_NAMESPACE_OF or
XML_NAMESPACE_OOOC), else <FALSE/>.
*/
static bool IsAcceptedFormulaNamespace( const sal_uInt16 nFormulaPrefix,
const rtl::OUString & rValue, ScGrammar::Grammar& rGrammar,
const ScGrammar::Grammar eStorageGrammar );
};
#endif
|