From 66f3cc020560c74e8a2df8a9d5ac3f9a5cabce63 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Wed, 28 Apr 2010 12:49:32 +0200 Subject: #162096# take SOLARSRC as default repository when there is no valid hg repository --- solenv/bin/modules/SourceConfig.pm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/solenv/bin/modules/SourceConfig.pm b/solenv/bin/modules/SourceConfig.pm index 9379b7764d0a..2be650713513 100644 --- a/solenv/bin/modules/SourceConfig.pm +++ b/solenv/bin/modules/SourceConfig.pm @@ -248,7 +248,7 @@ sub get_config_file { return ''; }; -sub get_hg_root { +sub get_repository_root { my $self = shift; return $self->{USER_SOURCE_ROOT} if (defined $self->{USER_SOURCE_ROOT}); my $hg_root; @@ -265,13 +265,14 @@ sub get_hg_root { return $hg_root; }; }; - croak('Cannot open find source_config and/or determine hg root directory for ' . cwd()); + Carp::cluck('Cannot open/find source_config and/or determine hg root directory for ' . cwd() . ". Taking $ENV{SOLARSRC} as default repository\n\n"); + return $ENV{SOLARSRC}; }; sub read_config_file { my $self = shift; if (!$self->{SOURCE_CONFIG_FILE}) { - my $repository_root = get_hg_root($self); + my $repository_root = get_repository_root($self); ${$self->{REPOSITORIES}}{File::Basename::basename($repository_root)} = $repository_root; return; }; @@ -324,7 +325,7 @@ sub read_config_file { close SOURCE_CONFIG_FILE; if (!scalar keys %{$self->{REPOSITORIES}}) { # Fallback - default repository is the directory where is our module... - my $hg_root = get_hg_root($self); + my $hg_root = get_repository_root($self); ${$self->{REPOSITORIES}}{File::Basename::basename($hg_root)} = $hg_root; }; } else { -- cgit v1.2.3 From 60458a1093d335264a11838bd4d0fa595e54924e Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Thu, 29 Apr 2010 14:47:52 +0200 Subject: #i111237# manipulate with source_config from the module parent directory --- solenv/bin/build.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index 442dcba26946..6430cf33c755 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -342,7 +342,7 @@ sub rename_file { }; sub generate_config_file { - my $source_config = SourceConfig->new(); + my $source_config = SourceConfig->new($StandDir); $source_config->add_active_modules([keys %add_to_config], 1) if (scalar %add_to_config); $source_config->remove_activated_modules([keys %remove_from_config], 1) if (scalar %remove_from_config); $source_config->remove_all_activated_modules() if ($clear_config); @@ -2289,7 +2289,7 @@ sub prepare_incompatible_build { %add_to_config = %$deps_hash; if ($prepare) { if ((!defined $ENV{UPDATER}) || (defined $ENV{CWS_WORK_STAMP})) { - SourceConfig->new()->add_active_modules([keys %add_to_config], 0); + SourceConfig->new($StandDir)->add_active_modules([keys %add_to_config], 0); } clear_delivered(); } -- cgit v1.2.3 From cd3128953c0d364ee6a70ea9ab860d778a509c3e Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Thu, 29 Apr 2010 16:14:28 +0200 Subject: #i111239# write html status file in the parent directory of the workspace modules --- solenv/bin/build.pl | 10 +++++++--- solenv/bin/modules/SourceConfig.pm | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index 6430cf33c755..b56745402c5d 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -167,8 +167,8 @@ $html_last_updated = 0; %jobs_hash = (); $html_path = undef; - $html_file = CorrectPath($ENV{SOLARSRC} . '/' . $ENV{INPATH}. '.build.html'); $build_finished = 0; + $html_file = ''; %had_error = (); # hack for misteriuos windows problems - try run dmake 2 times if first time there was an error $mkout = CorrectPath("$ENV{SOLARENV}/bin/mkout.pl"); %weights_hash = (); # hash contains info about how many modules are dependent from one module @@ -209,7 +209,6 @@ get_options(); - $html_file = CorrectPath($html_path . '/' . $ENV{INPATH}. '.build.html') if (defined $html_path); # my $temp_html_file = CorrectPath($tmp_dir. '/' . $ENV{INPATH}. '.build.html'); get_build_modes(); %deliver_env = (); @@ -225,12 +224,17 @@ $deliver_env{'OUTPATH'}++; $deliver_env{'L10N_framework'}++; }; + $StandDir = get_stand_dir(); # This also sets $initial_module + if (defined $html_path) { + $html_file = CorrectPath($html_path . '/' . $ENV{INPATH}. '.build.html'); + } else { + $html_file = CorrectPath($ENV{SOLARSRC} . '/../' . $ENV{INPATH}. '.build.html'); + }; if ($generate_config && ($clear_config || (scalar keys %remove_from_config)||(scalar keys %add_to_config))) { generate_config_file(); exit 0; } - $StandDir = get_stand_dir(); # This also sets $initial_module get_module_and_buildlist_paths(); provide_consistency() if (defined $ENV{CWS_WORK_STAMP} && defined($ENV{COMMON_ENV_TOOLS})); diff --git a/solenv/bin/modules/SourceConfig.pm b/solenv/bin/modules/SourceConfig.pm index 2be650713513..0bf4e7a1508d 100644 --- a/solenv/bin/modules/SourceConfig.pm +++ b/solenv/bin/modules/SourceConfig.pm @@ -75,8 +75,9 @@ sub new { $source_root .= '/..'; } } else { - $source_root = Cwd::realpath($ENV{SOURCE_ROOT_DIR}); + $source_root = $ENV{SOURCE_ROOT_DIR}; }; + $source_root = Cwd::realpath($source_root); $self->{SOURCE_ROOT} = $source_root; $self->{DEBUG} = 0; $self->{VERBOSE} = 0; -- cgit v1.2.3 From 301f697cd5b80a31e4abb0210da4e206e4f62479 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Thu, 29 Apr 2010 17:30:28 +0200 Subject: #i111239# fixed dmake log file path for html page --- solenv/bin/build.pl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index b56745402c5d..85a1ebdd76a4 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -225,10 +225,11 @@ $deliver_env{'L10N_framework'}++; }; $StandDir = get_stand_dir(); # This also sets $initial_module + $source_config = SourceConfig -> new($StandDir); if (defined $html_path) { $html_file = CorrectPath($html_path . '/' . $ENV{INPATH}. '.build.html'); } else { - $html_file = CorrectPath($ENV{SOLARSRC} . '/../' . $ENV{INPATH}. '.build.html'); + $html_file = CorrectPath($StandDir . '/../' . $ENV{INPATH}. '.build.html'); }; if ($generate_config && ($clear_config || (scalar keys %remove_from_config)||(scalar keys %add_to_config))) { @@ -346,7 +347,6 @@ sub rename_file { }; sub generate_config_file { - my $source_config = SourceConfig->new($StandDir); $source_config->add_active_modules([keys %add_to_config], 1) if (scalar %add_to_config); $source_config->remove_activated_modules([keys %remove_from_config], 1) if (scalar %remove_from_config); $source_config->remove_all_activated_modules() if ($clear_config); @@ -1240,7 +1240,7 @@ sub check_deps_hash { $jobs_hash{$key} = { SHORT_NAME => $string, BUILD_NUMBER => $build_number, STATUS => 'waiting', - LOG_PATH => $module . "/$ENV{INPATH}/misc/logs/$log_name", + LOG_PATH => $source_config->get_module_repository($module) . "/$module/$ENV{INPATH}/misc/logs/$log_name", LONG_LOG_PATH => CorrectPath($module_paths{$module} . "/$ENV{INPATH}/misc/logs/$log_name"), START_TIME => 0, FINISH_TIME => 0, @@ -1597,7 +1597,6 @@ sub get_options { sub get_module_and_buildlist_paths { if ($build_all_parents || $checkparents) { - my $source_config = SourceConfig -> new($StandDir); $source_config_file = $source_config->get_config_file_path(); $active_modules{$_}++ foreach ($source_config->get_active_modules()); my %active_modules_copy = %active_modules; @@ -2293,7 +2292,7 @@ sub prepare_incompatible_build { %add_to_config = %$deps_hash; if ($prepare) { if ((!defined $ENV{UPDATER}) || (defined $ENV{CWS_WORK_STAMP})) { - SourceConfig->new($StandDir)->add_active_modules([keys %add_to_config], 0); + $source_config->add_active_modules([keys %add_to_config], 0); } clear_delivered(); } -- cgit v1.2.3 From 0b404429eb845a847c2100ee781cbbee67b881b0 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Mon, 3 May 2010 10:15:53 +0200 Subject: corrected error message for --all and multiprocessing builds --- solenv/bin/build.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index 85a1ebdd76a4..1233f24ffe6f 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -1655,7 +1655,13 @@ sub cancel_build { $message_part .= "--from @broken_modules_names\n"; }; } else { - $message_part .= "--all:@broken_modules_names\n"; + if ($processes_to_run) { + $message_part .= "--from "; + } else { + $message_part .= "--all:"; + }; + $message_part .= "@broken_modules_names\n"; + }; if ($broken_modules_number && $build_all_parents) { print "\n"; -- cgit v1.2.3 From 8362cbced7e63906939831b74ea580cda5e91ebc Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Wed, 12 May 2010 17:11:57 +0200 Subject: #i109602# introduced new switch exclude_branch_from --- solenv/bin/build.pl | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index 1233f24ffe6f..159e00c7c7d3 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -139,6 +139,7 @@ $html = ''; @ignored_errors = (); %incompatibles = (); + %exclude_branches = (); $only_platform = ''; # the only platform to prepare $only_common = ''; # the only common output tree to delete when preparing %build_modes = (); @@ -566,17 +567,31 @@ sub get_parent_deps { my @unresolved_parents = get_parents_array($prj_dir); $parents_deps_hash{$_}++ foreach (@unresolved_parents); $$deps_hash{$prj_dir} = \%parents_deps_hash; + my %skipped_branches = (); while ($module = pop(@unresolved_parents)) { + if (defined $exclude_branches{$module}) { + $skipped_branches{$module}++; + next; + }; my %parents_deps_hash = (); - $parents_deps_hash{$_}++ foreach (get_parents_array($module)); + foreach (get_parents_array($module)) { + if (defined $exclude_branches{$_}) { + $skipped_branches{$_}++; + next; + }; + $parents_deps_hash{$_}++; + } $$deps_hash{$module} = \%parents_deps_hash; foreach $Parent (keys %parents_deps_hash) { - if (!defined($$deps_hash{$Parent})) { + if (!defined($$deps_hash{$Parent}) && (!defined $exclude_branches{$module})) { push (@unresolved_parents, $Parent); }; }; }; check_deps_hash($deps_hash); + foreach (keys %skipped_branches) { + print $echo . "Skipping module's $_ branch\n"; + }; }; sub store_weights { @@ -1396,7 +1411,7 @@ sub print_error { sub usage { print STDERR "\nbuild\n"; - print STDERR "Syntax: build [--all|-a[:prj_name]]|[--from|-f prj_name1[:prj_name2] [prj_name3 [...]]]|[--since|-c prj_name] [--with_branches|-b]|[--prepare|-p][:platform] [--deliver|-d [--dlv_switch deliver_switch]]] [-P processes|--server [--setenvstring \"string\"] [--client_timeout MIN] [--port port1[:port2:...:portN]]] [--show|-s] [--help|-h] [--file|-F] [--ignore|-i] [--version|-V] [--mode|-m OOo[,SO[,EXT]] [--html [--html_path html_file_path] [--dontgraboutput]] [--pre_job=pre_job_sring] [--job=job_string|-j] [--post_job=post_job_sring] [--stoponerror] [--genconf [--removeall|--clear|--remove|--add [module1,module2[,...,moduleN]]]] [--interactive]\n"; + print STDERR "Syntax: build [--all|-a[:prj_name]]|[--from|-f prj_name1[:prj_name2] [prj_name3 [...]]]|[--since|-c prj_name] [--with_branches|-b]|[--prepare|-p][:platform] [--deliver|-d [--dlv_switch deliver_switch]]] [-P processes|--server [--setenvstring \"string\"] [--client_timeout MIN] [--port port1[:port2:...:portN]]] [--show|-s] [--help|-h] [--file|-F] [--ignore|-i] [--version|-V] [--mode|-m OOo[,SO[,EXT]] [--html [--html_path html_file_path] [--dontgraboutput]] [--pre_job=pre_job_sring] [--job=job_string|-j] [--post_job=post_job_sring] [--stoponerror] [--genconf [--removeall|--clear|--remove|--add [module1,module2[,...,moduleN]]]] [--exclude_branch_from prj_name1[:prj_name2] [prj_name3 [...]]] [--interactive]\n"; print STDERR "Example1: build --from sfx2\n"; print STDERR " - build all projects dependent from sfx2, starting with sfx2, finishing with the current module\n"; print STDERR "Example2: build --all:sfx2\n"; @@ -1409,6 +1424,7 @@ sub usage { print STDERR "\nSwitches:\n"; print STDERR " --all - build all projects from very beginning till current one\n"; print STDERR " --from - build all projects dependent from the specified (including it) till current one\n"; + print STDERR " --exclude_branch_from - exclude module(s) and its branch from the build\n"; print STDERR " --mode OOo - build only projects needed for OpenOffice.org\n"; print STDERR " --prepare - clear all projects for incompatible build from prj_name till current one [for platform] (cws version)\n"; print STDERR " --with_branches- build all projects in neighbour branches and current branch starting from actual project\n"; @@ -1478,7 +1494,11 @@ sub get_options { and $build_all_cont = $1 and next; if ($arg =~ /^--from$/ || $arg =~ /^-f$/) { $build_all_parents = 1; - get_incomp_projects(); + get_modules_passed(\%incompatibles); + next; + }; + if ($arg =~ /^--exclude_branch_from$/) { + get_modules_passed(\%exclude_branches); next; }; $arg =~ /^--prepare$/ and $prepare = 1 and next; @@ -2279,7 +2299,6 @@ sub prepare_incompatible_build { if (!defined $$deps_hash{$module}) { print_error("The module $initial_module is independent from $module\n"); } - delete $incompatibles{$module}; $incompatibles{$module} = $$deps_hash{$module}; delete $$deps_hash{$module}; } @@ -2423,7 +2442,8 @@ sub get_list_of_modules { # }; }; -sub get_incomp_projects { +sub get_modules_passed { + my $hash_ref = shift; my $option = ''; while ($option = shift @ARGV) { if ($option =~ /^-+/) { @@ -2435,7 +2455,7 @@ sub get_incomp_projects { print_error("\'--from\' switch collision") if ($build_all_cont); $build_all_cont = $'; }; - $incompatibles{$option}++; + $$hash_ref{$option}++; }; }; }; -- cgit v1.2.3 From fa35aefa9a0d93c37653e6db76076a758e5ebcf3 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Wed, 12 May 2010 17:23:48 +0200 Subject: #i10000# do not write source_config if defined UPDATER in non-cws environment --- solenv/bin/build.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index 159e00c7c7d3..acc8f69d6614 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -2316,7 +2316,7 @@ sub prepare_incompatible_build { @modules_built = keys %$deps_hash; %add_to_config = %$deps_hash; if ($prepare) { - if ((!defined $ENV{UPDATER}) || (defined $ENV{CWS_WORK_STAMP})) { + if ((!(defined $ENV{UPDATER} && (!defined $ENV{CWS_WORK_STAMP}))) || (defined $ENV{CWS_WORK_STAMP})) { $source_config->add_active_modules([keys %add_to_config], 0); } clear_delivered(); -- cgit v1.2.3 From a67693196fa1efba50bcebf2019e2d3e256870a2 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Wed, 26 May 2010 14:04:33 +0200 Subject: #i111239# put html page in the log directory --- solenv/bin/build.pl | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index acc8f69d6614..a37edfa3d074 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -227,10 +227,18 @@ }; $StandDir = get_stand_dir(); # This also sets $initial_module $source_config = SourceConfig -> new($StandDir); - if (defined $html_path) { - $html_file = CorrectPath($html_path . '/' . $ENV{INPATH}. '.build.html'); - } else { - $html_file = CorrectPath($StandDir . '/../' . $ENV{INPATH}. '.build.html'); + + if ($html) { + if (defined $html_path) { + $html_file = CorrectPath($html_path . '/' . $ENV{INPATH}. '.build.html'); + } else { + my $log_directory = Cwd::realpath(CorrectPath($StandDir . '/../log')); + if ((!-d $log_directory) && (!mkdir($log_directory))) { + print_error("Cannot create $log_directory for writing html file\n"); + }; + $html_file = $log_directory . '/' . $ENV{INPATH}. '.build.html'; + print "\nPath to html status page: $html_file\n"; + }; }; if ($generate_config && ($clear_config || (scalar keys %remove_from_config)||(scalar keys %add_to_config))) { @@ -1255,7 +1263,7 @@ sub check_deps_hash { $jobs_hash{$key} = { SHORT_NAME => $string, BUILD_NUMBER => $build_number, STATUS => 'waiting', - LOG_PATH => $source_config->get_module_repository($module) . "/$module/$ENV{INPATH}/misc/logs/$log_name", + LOG_PATH => '../' . $source_config->get_module_repository($module) . "/$module/$ENV{INPATH}/misc/logs/$log_name", LONG_LOG_PATH => CorrectPath($module_paths{$module} . "/$ENV{INPATH}/misc/logs/$log_name"), START_TIME => 0, FINISH_TIME => 0, -- cgit v1.2.3 From 336bc45f08a1780316c34209056307e712809671 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Wed, 26 May 2010 17:53:22 +0200 Subject: vgbugs10: #i109602# removed unexpected sideeffect --- solenv/bin/build.pl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index a37edfa3d074..495583fa1f06 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -569,14 +569,11 @@ sub get_build_list_path { # Get dependencies hash of the current and all parent projects # sub get_parent_deps { - my (%parents_deps_hash, $module, $parent); my $prj_dir = shift; my $deps_hash = shift; - my @unresolved_parents = get_parents_array($prj_dir); - $parents_deps_hash{$_}++ foreach (@unresolved_parents); - $$deps_hash{$prj_dir} = \%parents_deps_hash; + my @unresolved_parents = ($prj_dir); my %skipped_branches = (); - while ($module = pop(@unresolved_parents)) { + while (my $module = pop(@unresolved_parents)) { if (defined $exclude_branches{$module}) { $skipped_branches{$module}++; next; -- cgit v1.2.3 From 32de849ec0d285772b4be28ffd53bdc9cf6d905d Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Tue, 1 Jun 2010 15:00:01 +0200 Subject: vgbugs10: #i109602# rework concept to meet real bug requirements --- solenv/bin/build.pl | 89 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 38 deletions(-) diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index 495583fa1f06..ab1167ddc65e 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -139,6 +139,7 @@ $html = ''; @ignored_errors = (); %incompatibles = (); + %skip_modules = (); %exclude_branches = (); $only_platform = ''; # the only platform to prepare $only_common = ''; # the only common output tree to delete when preparing @@ -574,10 +575,7 @@ sub get_parent_deps { my @unresolved_parents = ($prj_dir); my %skipped_branches = (); while (my $module = pop(@unresolved_parents)) { - if (defined $exclude_branches{$module}) { - $skipped_branches{$module}++; - next; - }; + next if (defined $$deps_hash{$module}); my %parents_deps_hash = (); foreach (get_parents_array($module)) { if (defined $exclude_branches{$_}) { @@ -596,6 +594,11 @@ sub get_parent_deps { check_deps_hash($deps_hash); foreach (keys %skipped_branches) { print $echo . "Skipping module's $_ branch\n"; + delete $exclude_branches{$_}; + }; + my @missing_branches = keys %exclude_branches; + if (scalar @missing_branches) { + print_error("For $prj_dir branche(s): \"@missing_branches\" not found\n"); }; }; @@ -629,18 +632,18 @@ sub expand_dependencies { }; # -# This procedure fills out the %reversed_dependencies hash, -# the hash contaninig the info about modules "waiting" for the module +# This procedure fills the second hash with reversed dependencies, +# ie, with info about modules "waiting" for the module # sub reverse_dependensies { - my $deps_hash = shift; + my ($deps_hash, $reversed) = @_; foreach my $module (keys %$deps_hash) { foreach (keys %{$$deps_hash{$module}}) { - if (defined $reversed_dependencies{$_}) { - ${$reversed_dependencies{$_}}{$module}++ + if (defined $$reversed{$_}) { + ${$$reversed{$_}}{$module}++ } else { my %single_module_dep_hash = ($module => 1); - $reversed_dependencies{$_} = \%single_module_dep_hash; + $$reversed{$_} = \%single_module_dep_hash; }; }; }; @@ -659,8 +662,12 @@ sub build_all { }; modules_classify(keys %global_deps_hash); expand_dependencies (\%global_deps_hash); -# prepare_build_from(\%global_deps_hash) if (scalar keys %incompatibles); - prepare_incompatible_build(\%global_deps_hash) if ($incompatible); + prepare_incompatible_build(\%global_deps_hash) if ($incompatible && (!$build_from_with_branches)); + if ($build_from_with_branches) { + my %reversed_full_deps_hash = (); + reverse_dependensies(\%global_deps_hash, \%reversed_full_deps_hash); + prepare_build_from_with_branches(\%global_deps_hash, \%reversed_full_deps_hash); + } if ($build_all_cont || $build_since) { prepare_build_all_cont(\%global_deps_hash); }; @@ -677,13 +684,13 @@ sub build_all { print_error("There are modules:\n@missing_modules\n\nthat should be built, but they are not activated. Please, verify your $source_config_file.\n"); }; }; - foreach my $module (%dead_parents) { + foreach my $module (keys %dead_parents, keys %skip_modules) { remove_from_dependencies($module, \%global_deps_hash); delete ($global_deps_hash{$module}) if (defined $global_deps_hash{$module}); }; store_weights(\%global_deps_hash); backup_deps_hash(\%global_deps_hash, \%global_deps_hash_backup); - reverse_dependensies(\%global_deps_hash_backup); + reverse_dependensies(\%global_deps_hash_backup, \%reversed_dependencies); $modules_number = scalar keys %global_deps_hash; initialize_html_info($_) foreach (keys %global_deps_hash); if ($processes_to_run) { @@ -1416,7 +1423,7 @@ sub print_error { sub usage { print STDERR "\nbuild\n"; - print STDERR "Syntax: build [--all|-a[:prj_name]]|[--from|-f prj_name1[:prj_name2] [prj_name3 [...]]]|[--since|-c prj_name] [--with_branches|-b]|[--prepare|-p][:platform] [--deliver|-d [--dlv_switch deliver_switch]]] [-P processes|--server [--setenvstring \"string\"] [--client_timeout MIN] [--port port1[:port2:...:portN]]] [--show|-s] [--help|-h] [--file|-F] [--ignore|-i] [--version|-V] [--mode|-m OOo[,SO[,EXT]] [--html [--html_path html_file_path] [--dontgraboutput]] [--pre_job=pre_job_sring] [--job=job_string|-j] [--post_job=post_job_sring] [--stoponerror] [--genconf [--removeall|--clear|--remove|--add [module1,module2[,...,moduleN]]]] [--exclude_branch_from prj_name1[:prj_name2] [prj_name3 [...]]] [--interactive]\n"; + print STDERR "Syntax: build [--all|-a[:prj_name]]|[--from|-f prj_name1[:prj_name2] [prj_name3 [...]]]|[--since|-c prj_name] [--with_branches prj_name1[:prj_name2] [--skip prj_name1[:prj_name2] [prj_name3 [...]] [prj_name3 [...]|-b]|[--prepare|-p][:platform] [--deliver|-d [--dlv_switch deliver_switch]]] [-P processes|--server [--setenvstring \"string\"] [--client_timeout MIN] [--port port1[:port2:...:portN]]] [--show|-s] [--help|-h] [--file|-F] [--ignore|-i] [--version|-V] [--mode|-m OOo[,SO[,EXT]] [--html [--html_path html_file_path] [--dontgraboutput]] [--pre_job=pre_job_sring] [--job=job_string|-j] [--post_job=post_job_sring] [--stoponerror] [--genconf [--removeall|--clear|--remove|--add [module1,module2[,...,moduleN]]]] [--exclude_branch_from prj_name1[:prj_name2] [prj_name3 [...]]] [--interactive]\n"; print STDERR "Example1: build --from sfx2\n"; print STDERR " - build all projects dependent from sfx2, starting with sfx2, finishing with the current module\n"; print STDERR "Example2: build --all:sfx2\n"; @@ -1432,7 +1439,8 @@ sub usage { print STDERR " --exclude_branch_from - exclude module(s) and its branch from the build\n"; print STDERR " --mode OOo - build only projects needed for OpenOffice.org\n"; print STDERR " --prepare - clear all projects for incompatible build from prj_name till current one [for platform] (cws version)\n"; - print STDERR " --with_branches- build all projects in neighbour branches and current branch starting from actual project\n"; + print STDERR " --with_branches- the same as \"--from\" but with build all projects in neighbour branches\n"; + print STDERR " --skip - do not build certain module(s)\n"; print STDERR " --since - build all projects beginning from the specified till current one (the same as \"--all:prj_name\", but skipping prj_name)\n"; print STDERR " --checkmodules - check if all required parent projects are availlable\n"; print STDERR " --show - show what is going to be built\n"; @@ -1487,12 +1495,14 @@ sub get_options { $arg =~ /^--dlv_switch$/ and $dlv_switch = shift @ARGV and next; $arg =~ /^--file$/ and $cmd_file = shift @ARGV and next; $arg =~ /^-F$/ and $cmd_file = shift @ARGV and next; + $arg =~ /^--skip$/ and get_modules_passed(\%skip_modules) and next; - $arg =~ /^--with_branches$/ and $build_all_parents = 1 - and $build_from_with_branches = shift @ARGV and next; - $arg =~ /^-b$/ and $build_all_parents = 1 - and $build_from_with_branches = shift @ARGV and next; - + if ($arg =~ /^--with_branches$/ || $arg =~ /^-b$/) { + $build_from_with_branches = 1; + $build_all_parents = 1; + get_modules_passed(\%incompatibles); + next; + }; $arg =~ /^--all:(\S+)$/ and $build_all_parents = 1 and $build_all_cont = $1 and next; $arg =~ /^-a:(\S+)$/ and $build_all_parents = 1 @@ -1556,8 +1566,12 @@ sub get_options { print_error("\"--html_path\" switch is used only with \"--html\"") if ($html_path); print_error("\"--dontgraboutput\" switch is used only with \"--html\"") if ($dont_grab_output); }; + if ((scalar keys %exclude_branches) && !$build_all_parents) { + print_error("\"--exclude_branch_from\" is not applicable for one module builds!!"); + }; $grab_output = 0 if ($dont_grab_output); print_error('Switches --with_branches and --all collision') if ($build_from_with_branches && $build_all_cont); + print_error('Switch --skip is for building multiple modules only!!') if (!$build_all_parents); # print_error('Please prepare the workspace on one of UNIX platforms') if ($prepare && ($ENV{GUI} ne 'UNX')); print_error('Switches --with_branches and --since collision') if ($build_from_with_branches && $build_since); if ($show) { @@ -2143,12 +2157,12 @@ sub modules_classify { # # This procedure provides consistency for cws -# and optimized build (ie in case of -with_branches, -all:prj_name +# and optimized build (ie in case of --with_branches, -all:prj_name # and -since switches) # sub provide_consistency { check_dir(); - foreach $var_ref (\$build_from_with_branches, \$build_all_cont, \$build_since) { + foreach $var_ref (\$build_all_cont, \$build_since) { if ($$var_ref) { return if (defined $module_paths{$$var_ref}); print_error("Cannot find module '$$var_ref'", 9); @@ -2293,6 +2307,20 @@ sub fix_permissions { chmod '0664', $file; }; +sub prepare_build_from_with_branches { + ($full_deps_hash, $reversed_full_deps_hash) = @_; + foreach my $prerequisite (keys %$full_deps_hash) { + foreach my $dependent_module (keys %incompatibles) { + if (defined ${$$reversed_full_deps_hash{$prerequisite}}{$dependent_module}) { + remove_from_dependencies($prerequisite, $full_deps_hash); + delete $$full_deps_hash{$prerequisite}; +# print "Removed $prerequisite\n"; + last; + }; + }; + }; +}; + # # Removes projects which it is not necessary to build # in incompatible build @@ -2365,21 +2393,6 @@ sub prepare_incompatible_build { do_exit(0) if ($prepare); }; -# -# Removes projects which it is not necessary to build -# with -with_branches switch -# -#sub prepare_build_from { -# my ($prj, $deps_hash); -# $deps_hash = shift; -# my %from_deps_hash = (); # hash of dependencies of the -from project -# get_parent_deps($build_from_with_branches, \%from_deps_hash); -# foreach $prj (keys %from_deps_hash) { -# delete $$deps_hash{$prj}; -# remove_from_dependencies($prj, $deps_hash); -# }; -#}; - # # Removes projects which it is not necessary to build # with --all:prj_name or --since switch -- cgit v1.2.3 From 79efb54f42ba554996ba0da77cf2c2e8567c963a Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Fri, 11 Jun 2010 14:33:56 +0200 Subject: vgbugs10: moved repository detection to the new module RepositoryHelper --- solenv/bin/build.pl | 67 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 28 deletions(-) diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index ab1167ddc65e..445b33b37b1e 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -45,6 +45,7 @@ use lib ("$ENV{SOLARENV}/bin/modules"); use SourceConfig; + use RepositoryHelper; my $in_so_env = 0; if (defined $ENV{COMMON_ENV_TOOLS}) { @@ -1141,34 +1142,44 @@ sub get_stand_dir { $ENV{mk_tmp} = ''; die "No environment set\n"; }; - my $StandDir; - if ( defined $ENV{PWD} ) { - $StandDir = $ENV{PWD}; - } elsif (defined $ENV{_cwd}) { - $StandDir = $ENV{_cwd}; - } else { - $StandDir = cwd(); - }; - my $previous_dir = ''; - do { - foreach (@possible_build_lists) {# ('build.lst', 'build.xlist'); - if (-e $StandDir . '/prj/'.$_) { - $initial_module = File::Basename::basename($StandDir); - $build_list_paths{$initial_module} =$StandDir . '/prj/'.$_; - $StandDir = File::Basename::dirname($StandDir); - $module_paths{$initial_module} = $StandDir . "/$initial_module"; + my $repository_helper = RepositoryHelper->new(); + my $StandDir = $repository_helper->get_repository_root(); + my $initial_dir = $repository_helper->get_initial_directory(); + if ($StandDir eq $initial_dir) { + print_error('Found no project to build'); + }; + $initial_module = substr($initial_dir, length($StandDir) + 1); + if ($initial_module =~ /\\|\//) { + $initial_module = File::Basename::dirname($initial_module); + }; + $module_paths{$initial_module} = $StandDir . "/$initial_module"; +# $build_list_paths{$initial_module} =$StandDir . '/prj/'.$_; +# if ( defined $ENV{PWD} ) { +# $StandDir = $ENV{PWD}; +# } elsif (defined $ENV{_cwd}) { +# $StandDir = $ENV{_cwd}; +# } else { +# $StandDir = cwd(); +# }; +# my $previous_dir = ''; +# do { +# foreach (@possible_build_lists) {# ('build.lst', 'build.xlist'); +# if (-e $StandDir . '/prj/'.$_) { +# $initial_module = File::Basename::basename($StandDir); +# $build_list_paths{$initial_module} =$StandDir . '/prj/'.$_; +# $StandDir = File::Basename::dirname($StandDir); +# $module_paths{$initial_module} = $StandDir . "/$initial_module"; return $StandDir; - } elsif ($StandDir eq $previous_dir) { - $ENV{mk_tmp} = ''; - print_error('Found no project to build'); - }; - }; - $previous_dir = $StandDir; - $StandDir = File::Basename::dirname(Cwd::realpath($StandDir)); - print_error('Found no project to build') if (!$StandDir); - } -# while (chdir '..'); - while (chdir "$StandDir"); +# } elsif ($StandDir eq $previous_dir) { +# $ENV{mk_tmp} = ''; +# print_error('Found no project to build'); +# }; +# }; +# $previous_dir = $StandDir; +# $StandDir = File::Basename::dirname(Cwd::realpath($StandDir)); +# print_error('Found no project to build') if (!$StandDir); +# } +# while (chdir "$StandDir"); }; # @@ -1571,7 +1582,7 @@ sub get_options { }; $grab_output = 0 if ($dont_grab_output); print_error('Switches --with_branches and --all collision') if ($build_from_with_branches && $build_all_cont); - print_error('Switch --skip is for building multiple modules only!!') if (!$build_all_parents); + print_error('Switch --skip is for building multiple modules only!!') if ((scalar keys %skip_modules) && (!$build_all_parents)); # print_error('Please prepare the workspace on one of UNIX platforms') if ($prepare && ($ENV{GUI} ne 'UNX')); print_error('Switches --with_branches and --since collision') if ($build_from_with_branches && $build_since); if ($show) { -- cgit v1.2.3 From 49175f3415be166a8e1360af46ae58e506c0ec15 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Fri, 11 Jun 2010 14:34:44 +0200 Subject: vgbugs10: new module for repository detection --- solenv/bin/modules/RepositoryHelper.pm | 205 +++++++++++++++++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 solenv/bin/modules/RepositoryHelper.pm diff --git a/solenv/bin/modules/RepositoryHelper.pm b/solenv/bin/modules/RepositoryHelper.pm new file mode 100644 index 000000000000..7677376be70e --- /dev/null +++ b/solenv/bin/modules/RepositoryHelper.pm @@ -0,0 +1,205 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org 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 version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +#************************************************************************* +# +# RepositoryHelper - Perl for working with repositories and underlying SCM +# +# usage: see below +# +#************************************************************************* + +package RepositoryHelper; + +use strict; + + +use Carp; +use Cwd qw (cwd); +use File::Basename; +#use File::Temp qw(tmpnam); + +my $debug = 0; + +##### profiling ##### + +##### ctor ##### + +sub new { + my $proto = shift; + my $class = ref($proto) || $proto; + my $initial_directory = shift; + if ($initial_directory) { + $initial_directory = Cwd::realpath($initial_directory); + } else { + if ( defined $ENV{PWD} ) { + $initial_directory = $ENV{PWD}; + } elsif (defined $ENV{_cwd}) { + $initial_directory = $ENV{_cwd}; + } else { + $initial_directory = cwd(); + }; + }; + my $self = {}; + $self->{INITIAL_DIRECTORY} = $initial_directory; + $self->{REPOSITORY_ROOT} = undef; + $self->{REPOSITORY_NAME} = undef; + $self->{SCM_NAME} = undef; + detect_repository($self); + bless($self, $class); + return $self; +} + +##### methods ##### +sub get_repository_root +{ + my $self = shift; + return $self->{REPOSITORY_ROOT}; +} + +sub get_initial_directory +{ + my $self = shift; + return $self->{INITIAL_DIRECTORY}; +} + +sub get_scm_name +{ + my $self = shift; + return$self->{SCM_NAME}; +} + +##### private methods ##### +sub search_for_hg { + my $self = shift; + my $hg_root; + my $scm_name = 'hg'; + if (open(COMMAND, "$scm_name root 2>&1 |")) { + foreach () { + next if (/^Not trusting file/); + chomp; + $hg_root = $_; + last; + }; + close COMMAND; + chomp $hg_root; + if ($hg_root !~ /There is no Mercurial repository here/) { + $self->{REPOSITORY_ROOT} = $hg_root; + $self->{SCM_NAME} = $scm_name; + return 1; + }; + }; + return 0; +}; + +sub search_via_build_lst { + my $self = shift; + my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names + my $previous_dir = ''; + my $rep_root_candidate = $self->{INITIAL_DIRECTORY}; + do { + foreach (@possible_build_lists) {# ('build.lst', 'build.xlist'); + if (-e $rep_root_candidate . '/prj/'.$_) { + $self->{REPOSITORY_ROOT} = File::Basename::dirname($rep_root_candidate); + return 1; + } elsif ($rep_root_candidate eq $previous_dir) { + return 0; + }; + }; + $previous_dir = $rep_root_candidate; + $rep_root_candidate = File::Basename::dirname(Cwd::realpath($rep_root_candidate)); + return 0 if (!$rep_root_candidate); + } + while (chdir "$rep_root_candidate"); +}; + +sub detect_repository { + my $self = shift; + return if (search_via_build_lst($self)); + chdir $self->{INITIAL_DIRECTORY}; + return if (search_for_hg($self)); + croak('Cannot determine source directory/repository for ' . $self->{INITIAL_DIRECTORY}); +}; + +##### finish ##### + +1; # needed by use or require + +__END__ + +=head1 NAME + +RepositoryHelper - Perl module for working with repositories and underlying SCM + +=head1 SYNOPSIS + + # example that will analyze sources and return the source root directory + + use RepositoryHelper; + + # Create a new instance: + $a = RepositoryHelper->new(); + + # Get repositories for the actual workspace: + $a->get_repository_root(); + + +=head1 DESCRIPTION + +RepositoryHelper is a perlPerl module for working with repositories and underlying SCM +in the database. + +Methods: + +RepositoryHelper::new() + +Creates a new instance of RepositoryHelper. Can be initialized by: some path which likely to belong to a repository, default - empty, the current dir will be taken. + +RepositoryHelper::get_repository_root() + +Returns the repository root, retrieved by SCM methods or on educated guess... + +RepositoryHelper::get_initial_directory() + +Returns full path to the initialistion directory. + +=head2 EXPORT + +RepositoryHelper::new() +RepositoryHelper::get_repository_root() +RepositoryHelper::get_scm_name() +RepositoryHelper::get_initial_directory() + +=head1 AUTHOR + +Vladimir Glazunov, vg@openoffice.org + +=head1 SEE ALSO + +perl(1). + +=cut -- cgit v1.2.3 From 3d31ac2617ceb452debc86e2da1e7cade20cd123 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Fri, 2 Jul 2010 12:40:16 +0200 Subject: vgbugs10: verbose dmake output in html mode --- solenv/bin/build.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index 445b33b37b1e..8240b5b6206e 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -1132,6 +1132,7 @@ sub get_commands { while ($arg = pop(@dmake_args)) { $dmake .= ' '.$arg; }; + $dmake .= ' verbose=true' if ($html); }; # -- cgit v1.2.3 From 7bb10e673560b6f174f9a1026db51f6c83494e3b Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Tue, 6 Jul 2010 12:03:07 +0200 Subject: cws tl83: #i112277# security tab page change --- sfx2/source/dialog/securitypage.cxx | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index d32ee843cbf2..2ac8f6a43fee 100755 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -245,6 +245,36 @@ SfxSecurityPage_Impl::SfxSecurityPage_Impl( SfxSecurityPage &rTabPage, const Sfx m_aRecordChangesCB.SetStyle( m_aRecordChangesCB.GetStyle() | WB_EARLYTOGGLE ); m_aRecordChangesCB.SetToggleHdl( LINK( this, SfxSecurityPage_Impl, RecordChangesCBToggleHdl ) ); m_aChangeProtectionPB.SetClickHdl( LINK( this, SfxSecurityPage_Impl, ChangeProtectionPBHdl ) ); + + + // #i112277: for the time being (OOO 3.3) the following options should not + // be available. In the long run however it is planned to implement the yet + // missing functionality. Thus now we hide them and move the remaining ones up. + m_aNewPasswordToOpenFL.Hide(); + m_aNewPasswordToOpenFT.Hide(); + m_aNewPasswordToOpenED.Hide(); + m_aConfirmPasswordToOpenFT.Hide(); + m_aConfirmPasswordToOpenED.Hide(); + m_aNewPasswordInfoFT.Hide(); + m_aNewPasswordToModifyFL.Hide(); + m_aNewPasswordToModifyFT.Hide(); + m_aNewPasswordToModifyED.Hide(); + m_aConfirmPasswordToModifyFT.Hide(); + m_aConfirmPasswordToModifyED.Hide(); + const long nDelta = m_aOptionsFL.GetPosPixel().Y() - m_aNewPasswordToOpenFL.GetPosPixel().Y(); + Point aPos; + aPos = m_aOptionsFL.GetPosPixel(); + aPos.Y() -= nDelta; + m_aOptionsFL.SetPosPixel( aPos ); + aPos = m_aOpenReadonlyCB.GetPosPixel(); + aPos.Y() -= nDelta; + m_aOpenReadonlyCB.SetPosPixel( aPos ); + aPos = m_aRecordChangesCB.GetPosPixel(); + aPos.Y() -= nDelta; + m_aRecordChangesCB.SetPosPixel( aPos ); + aPos = m_aChangeProtectionPB.GetPosPixel(); + aPos.Y() -= nDelta; + m_aChangeProtectionPB.SetPosPixel( aPos ); } -- cgit v1.2.3 From 068bd24c40aa21ba7df7e13dd76f8f62679033d3 Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 7 Jul 2010 08:20:36 +0200 Subject: sb128: #i112986# shifted relevant smoketest work to OOo main thread to work around potential deadlocks --- smoketestoo_native/smoketest.cxx | 44 +++++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/smoketestoo_native/smoketest.cxx b/smoketestoo_native/smoketest.cxx index e2cb51127f47..41baeddf9edb 100644 --- a/smoketestoo_native/smoketest.cxx +++ b/smoketestoo_native/smoketest.cxx @@ -28,6 +28,8 @@ #include "sal/config.h" #include "boost/noncopyable.hpp" +#include "com/sun/star/awt/XCallback.hpp" +#include "com/sun/star/awt/XRequestCallback.hpp" #include "com/sun/star/beans/PropertyState.hpp" #include "com/sun/star/beans/PropertyValue.hpp" #include "com/sun/star/document/MacroExecMode.hpp" @@ -40,6 +42,7 @@ #include "com/sun/star/frame/XModel.hpp" #include "com/sun/star/frame/XNotifyingDispatch.hpp" #include "com/sun/star/lang/EventObject.hpp" +#include "com/sun/star/uno/Any.hxx" #include "com/sun/star/uno/Reference.hxx" #include "com/sun/star/uno/RuntimeException.hpp" #include "com/sun/star/uno/Sequence.hxx" @@ -94,6 +97,29 @@ void Listener::dispatchFinished(css::frame::DispatchResultEvent const & Result) result_->condition.set(); } +class Callback: public cppu::WeakImplHelper1< css::awt::XCallback > { +public: + Callback( + css::uno::Reference< css::frame::XNotifyingDispatch > const & dispatch, + css::util::URL const & url, + css::uno::Sequence< css::beans::PropertyValue > const & arguments, + css::uno::Reference< css::frame::XDispatchResultListener > const & + listener): + dispatch_(dispatch), url_(url), arguments_(arguments), + listener_(listener) + { OSL_ASSERT(dispatch.is()); } + +private: + virtual void SAL_CALL notify(css::uno::Any const &) + throw (css::uno::RuntimeException) + { dispatch_->dispatchWithNotification(url_, arguments_, listener_); } + + css::uno::Reference< css::frame::XNotifyingDispatch > dispatch_; + css::util::URL url_; + css::uno::Sequence< css::beans::PropertyValue > arguments_; + css::uno::Reference< css::frame::XDispatchResultListener > listener_; +}; + class Test: public CppUnit::TestFixture { public: virtual void setUp(); @@ -135,8 +161,7 @@ void Test::test() { RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.script:Standard.Global.StartTestWithDefaultOptions?" "language=Basic&location=document")); - Result result; - css::uno::Reference< css::frame::XNotifyingDispatch >( + css::uno::Reference< css::frame::XNotifyingDispatch > disp( css::uno::Reference< css::frame::XDispatchProvider >( css::uno::Reference< css::frame::XController >( css::uno::Reference< css::frame::XModel >( @@ -154,9 +179,18 @@ void Test::test() { css::uno::UNO_SET_THROW)->getFrame(), css::uno::UNO_QUERY_THROW)->queryDispatch( url, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_self")), 0), - css::uno::UNO_QUERY_THROW)->dispatchWithNotification( - url, css::uno::Sequence< css::beans::PropertyValue >(), - new Listener(&result)); + css::uno::UNO_QUERY_THROW); + Result result; + // Shifted to main thread to work around potential deadlocks (i112867): + css::uno::Reference< css::awt::XRequestCallback >( + connection_.getFactory()->createInstance( //TODO: AsyncCallback ctor + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.AsyncCallback"))), + css::uno::UNO_QUERY_THROW)->addCallback( + new Callback( + disp, url, css::uno::Sequence< css::beans::PropertyValue >(), + new Listener(&result)), + css::uno::Any()); result.condition.wait(); CPPUNIT_ASSERT(result.success); CPPUNIT_ASSERT_EQUAL(rtl::OUString(), result.result); -- cgit v1.2.3 From 1ac22a94e060d6de3af716ce818eb5efa0e90d4c Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Thu, 8 Jul 2010 12:26:34 +0200 Subject: vgbugs10: added new add_repository method --- solenv/bin/modules/SourceConfig.pm | 139 ++++++++++++++++++------------------- 1 file changed, 69 insertions(+), 70 deletions(-) diff --git a/solenv/bin/modules/SourceConfig.pm b/solenv/bin/modules/SourceConfig.pm index 0bf4e7a1508d..06d72d06fe4c 100644 --- a/solenv/bin/modules/SourceConfig.pm +++ b/solenv/bin/modules/SourceConfig.pm @@ -38,7 +38,7 @@ package SourceConfig; use strict; use constant SOURCE_CONFIG_FILE_NAME => 'source_config'; -use constant SOURCE_CONFIG_VERSION => 2; +use constant SOURCE_CONFIG_VERSION => 3; use Carp; use Cwd; @@ -95,14 +95,10 @@ sub new { $self->{WARNINGS} = []; $self->{REPORT_MESSAGES} = []; $self->{CONFIG_FILE_CONTENT} = []; - $self->{DEFAULT_REPOSITORY} = undef; - if (defined $self->{USER_SOURCE_ROOT}) { - ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT}; - $self->{DEFAULT_REPOSITORY} = File::Basename::basename($self->{USER_SOURCE_ROOT}); - }; $self->{SOURCE_CONFIG_FILE} = get_config_file($self->{SOURCE_ROOT}) if (!defined $self->{SOURCE_CONFIG_FILE}); $self->{SOURCE_CONFIG_DEFAULT} = $self->{SOURCE_ROOT} .'/'.SOURCE_CONFIG_FILE_NAME; read_config_file($self); + get_module_paths($self); bless($self, $class); return $self; } @@ -119,6 +115,19 @@ sub get_repositories return sort keys %{$self->{REPOSITORIES}}; } +sub add_repository +{ + my $self = shift; + my $new_rep_path = shift; + $new_rep_path = Cwd::realpath($new_rep_path); + my $new_rep_name = File::Basename::basename($new_rep_path); + if (defined ${$self->{REPOSITORIES}}{$new_rep_name}) { + croak("Repository $new_rep_name is already defined!!"); + }; + ${$self->{REPOSITORIES}}{$new_rep_name} = $new_rep_path; + $self -> get_repository_module_paths($new_rep_name); +} + sub get_config_file_default_path { my $self = shift; return $self->{SOURCE_CONFIG_DEFAULT}; @@ -132,7 +141,6 @@ sub get_config_file_path { sub get_module_repository { my $self = shift; my $module = shift; - $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}}); if (defined ${$self->{MODULE_REPOSITORY}}{$module}) { return ${$self->{MODULE_REPOSITORY}}{$module}; } else { @@ -144,7 +152,6 @@ sub get_module_repository { sub get_module_path { my $self = shift; my $module = shift; - $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}}); if (defined ${$self->{MODULE_PATHS}}{$module}) { return ${$self->{MODULE_PATHS}}{$module}; } else { @@ -156,10 +163,17 @@ sub get_module_path { sub get_module_build_list { my $self = shift; my $module = shift; - $self -> get_buildlist_paths() if (!scalar keys %{$self->{MODULE_BUILD_LIST_PATHS}}); if (defined ${$self->{MODULE_BUILD_LIST_PATHS}}{$module}) { return ${$self->{MODULE_BUILD_LIST_PATHS}}{$module}; } else { + my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names + foreach (@possible_build_lists) { + my $possible_path = ${$self->{MODULE_PATHS}}{$module} . "/prj/$_"; + if (-e $possible_path) { + ${$self->{MODULE_BUILD_LIST_PATHS}}{$module} = $possible_path; + return $possible_path; + }; + }; Carp::cluck("No build list in module $module found!!\n") if ($self->{DEBUG}); return undef; }; @@ -169,7 +183,6 @@ sub get_all_modules { my $self = shift; my $module = shift; - $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}}); return sort keys %{$self->{MODULE_PATHS}}; }; @@ -179,7 +192,6 @@ sub get_active_modules if (scalar keys %{$self->{ACTIVATED_MODULES}}) { return sort keys %{$self->{ACTIVATED_MODULES}}; } - $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}}); return sort keys %{$self->{REAL_MODULES}}; } @@ -190,49 +202,42 @@ sub is_active if (scalar keys %{$self->{ACTIVATED_MODULES}}) { return exists ($self->{ACTIVATED_MODULES}{$module}); } - $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}}); return exists ($self->{REAL_MODULES}{$module}); } ##### private methods ##### -sub get_buildlist_paths { +sub get_repository_module_paths { my $self = shift; - $self -> get_module_paths() if (!scalar keys %{$self->{MODULE_PATHS}}); - my @possible_build_lists = ('build.lst', 'build.xlist'); # build lists names - foreach my $module (keys %{$self->{MODULE_PATHS}}) { - foreach (@possible_build_lists) { - my $possible_path = ${$self->{MODULE_PATHS}}{$module} . "/prj/$_"; - ${$self->{MODULE_BUILD_LIST_PATHS}}{$module} = $possible_path if (-e $possible_path); + my $repository = shift; + my $repository_path = ${$self->{REPOSITORIES}}{$repository}; + if (opendir DIRHANDLE, $repository_path) { + foreach my $module (readdir(DIRHANDLE)) { + next if (($module =~ /^\.+/) || (!-d "$repository_path/$module")); + my $module_entry = $module; + if (($module !~ s/\.lnk$//) && ($module !~ s/\.link$//)) { + $self->{REAL_MODULES}{$module}++; + } + my $possible_path = "$repository_path/$module_entry"; + if (-d $possible_path) { + if (defined ${$self->{MODULE_PATHS}}{$module}) { + close DIRHANDLE; + croak("Ambiguous paths for module $module: $possible_path and " . ${$self->{MODULE_PATHS}}{$module}); + }; + ${$self->{MODULE_PATHS}}{$module} = $possible_path; + ${$self->{MODULE_REPOSITORY}}{$module} = $repository; + } }; + close DIRHANDLE; + } else { + croak("Cannot read $repository_path repository content"); }; }; sub get_module_paths { my $self = shift; foreach my $repository (keys %{$self->{REPOSITORIES}}) { - my $repository_path = ${$self->{REPOSITORIES}}{$repository}; - if (opendir DIRHANDLE, $repository_path) { - foreach my $module (readdir(DIRHANDLE)) { - next if (($module =~ /^\.+/) || (!-d "$repository_path/$module")); - my $module_entry = $module; - if (($module !~ s/\.lnk$//) && ($module !~ s/\.link$//)) { - $self->{REAL_MODULES}{$module}++; - } - my $possible_path = "$repository_path/$module_entry"; - if (-d $possible_path) { - if (defined ${$self->{MODULE_PATHS}}{$module}) { - close DIRHANDLE; - croak("Ambiguous paths for module $module: $possible_path and " . ${$self->{MODULE_PATHS}}{$module}); - }; - ${$self->{MODULE_PATHS}}{$module} = $possible_path; - ${$self->{MODULE_REPOSITORY}}{$module} = $repository; - } - }; - close DIRHANDLE; - } else { - croak("Cannot read $_ repository content"); - }; + get_repository_module_paths($self, $repository); }; my @false_actives = (); foreach (keys %{$self->{ACTIVATED_MODULES}}) { @@ -249,32 +254,22 @@ sub get_config_file { return ''; }; -sub get_repository_root { +# +# Fallback - default repository is based on the object initialization parameter... +# +sub get_fallback_repository { my $self = shift; - return $self->{USER_SOURCE_ROOT} if (defined $self->{USER_SOURCE_ROOT}); - my $hg_root; - if (open(COMMAND, "hg root 2>&1 |")) { - foreach () { - next if (/^Not trusting file/); - chomp; - $hg_root = $_; - last; - }; - close COMMAND; - chomp $hg_root; - if ($hg_root !~ /There is no Mercurial repository here/) { - return $hg_root; - }; + if (defined $self->{USER_SOURCE_ROOT}) { + ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT}; + return; }; - Carp::cluck('Cannot open/find source_config and/or determine hg root directory for ' . cwd() . ". Taking $ENV{SOLARSRC} as default repository\n\n"); - return $ENV{SOLARSRC}; + croak('Cannot determine repository. Please make your checks!!'); }; sub read_config_file { my $self = shift; if (!$self->{SOURCE_CONFIG_FILE}) { - my $repository_root = get_repository_root($self); - ${$self->{REPOSITORIES}}{File::Basename::basename($repository_root)} = $repository_root; + get_fallback_repository($self); return; }; my $repository_section = 0; @@ -307,11 +302,6 @@ sub read_config_file { if (defined $ENV{UPDMINOREXT}) { $repository_source_path .= $ENV{UPDMINOREXT}; }; - if ((defined $self->{DEFAULT_REPOSITORY}) && (${$self->{REPOSITORIES}}{$self->{DEFAULT_REPOSITORY}} eq $repository_source_path)) { - delete ${$self->{REPOSITORIES}}{$self->{DEFAULT_REPOSITORY}}; - $self->{DEFAULT_REPOSITORY} = undef; - - }; ${$self->{REPOSITORIES}}{$1} = $repository_source_path; ${$self->{ACTIVATED_REPOSITORIES}}{$1}++; next; @@ -325,9 +315,7 @@ sub read_config_file { }; close SOURCE_CONFIG_FILE; if (!scalar keys %{$self->{REPOSITORIES}}) { - # Fallback - default repository is the directory where is our module... - my $hg_root = get_repository_root($self); - ${$self->{REPOSITORIES}}{File::Basename::basename($hg_root)} = $hg_root; + get_fallback_repository($self); }; } else { croak('Cannot open ' . $self->{SOURCE_CONFIG_FILE} . 'for reading'); @@ -381,15 +369,18 @@ sub remove_activated_modules { sub add_active_repositories { my $self = shift; $self->{NEW_REPOSITORIES} = shift; - croak('Empty module list passed for adding to source_config') if (!scalar @{$self->{NEW_REPOSITORIES}}); + croak('Empty repository list passed for addition to source_config') if (!scalar @{$self->{NEW_REPOSITORIES}}); $self->{VERBOSE} = shift; + foreach (@{$self->{NEW_REPOSITORIES}}) { + $self->add_repository($_); + }; generate_config_file($self); }; sub add_active_modules { my $self = shift; $self->{NEW_MODULES} = shift; - croak('Empty module list passed for adding to source_config') if (!scalar @{$self->{NEW_MODULES}}); + croak('Empty module list passed for addition to source_config') if (!scalar @{$self->{NEW_MODULES}}); $self->{VERBOSE} = shift; generate_config_file($self); }; @@ -537,6 +528,8 @@ SourceConfig - Perl extension for parsing general info databases # Get repositories for the actual workspace: $a->get_repositories(); + # Add a repository new_repository for the actual workspace (via full path): + $a->add_repository(/DEV300/new_repository); =head1 DESCRIPTION @@ -561,6 +554,11 @@ SourceConfig::get_repositories() Returns sorted list of active repositories for the actual workspace +SourceConfig::add_repository(REPOSITORY_PATH) + +Adds a repository to the list of active repositories + + SourceConfig::get_active_modules() Returns a sorted list of active modules @@ -624,6 +622,7 @@ Removes all activated repositories from the source_config file SourceConfig::new() SourceConfig::get_version() SourceConfig::get_repositories() +SourceConfig::add_repository() SourceConfig::get_active_modules() SourceConfig::get_all_modules() SourceConfig::get_module_path($module) -- cgit v1.2.3 From 1acb3fa596bac16a168b22d4070db9f6423881d8 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 9 Jul 2010 10:55:23 +0200 Subject: cws tl83: #i113004# crash when spell checking in sd fixed --- sw/source/core/edit/edlingu.cxx | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index d99293071048..c9ab4a591383 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -1318,8 +1318,12 @@ void SwEditShell::MoveContinuationPosToEndOfCheckedSentence() void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, bool bRecheck) { + // Note: rNewPortions.size() == 0 is valid and happens when the whole + // sentence got removed in the dialog + ASSERT( pSpellIter, "SpellIter missing" ); - if(pSpellIter) + if(pSpellIter && + pSpellIter->GetLastPortions().size() > 0) // no portions -> no text to be changed { const SpellPortions& rLastPortions = pSpellIter->GetLastPortions(); const SpellContentPositions rLastPositions = pSpellIter->GetLastPositions(); @@ -1330,9 +1334,6 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, // iterate over the new portions, beginning at the end to take advantage of the previously // saved content positions - if(!rLastPortions.size()) - return; - pDoc->StartUndo( UNDO_OVERWRITE, NULL ); StartAction(); @@ -1344,6 +1345,10 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, sal_uInt32 nRedlinePortions = lcl_CountRedlines(rLastPortions); if((rLastPortions.size() - nRedlinePortions) == rNewPortions.size()) { + DBG_ASSERT( rNewPortions.size() > 0, "rNewPortions should not be empty here" ); + DBG_ASSERT( rLastPortions.size() > 0, "rLastPortions should not be empty here" ); + DBG_ASSERT( rLastPositions.size() > 0, "rLastPositions should not be empty here" ); + //the simple case: the same number of elements on both sides //each changed element has to be applied to the corresponding source element svx::SpellPortions::const_iterator aCurrentNewPortion = rNewPortions.end(); @@ -1357,8 +1362,17 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, //jump over redline portions while(aCurrentOldPortion->bIsHidden) { - --aCurrentOldPortion; - --aCurrentOldPosition; + if (aCurrentOldPortion != rLastPortions.begin() && + aCurrentOldPosition != rLastPositions.begin()) + { + --aCurrentOldPortion; + --aCurrentOldPosition; + } + else + { + DBG_ASSERT( 0, "ApplyChangedSentence: iterator positions broken" ); + break; + } } if ( !pCrsr->HasMark() ) pCrsr->SetMark(); @@ -1398,6 +1412,8 @@ void SwEditShell::ApplyChangedSentence(const ::svx::SpellPortions& rNewPortions, } else { + DBG_ASSERT( rLastPositions.size() > 0, "rLastPositions should not be empty here" ); + //select the complete sentence SpellContentPositions::const_iterator aCurrentEndPosition = rLastPositions.end(); --aCurrentEndPosition; -- cgit v1.2.3 From 4efd2d986e38cd362d6771c175dcfa33a3856c96 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 9 Jul 2010 10:55:23 +0200 Subject: cws tl83: #i113004# crash when spell checking in sd fixed --- editeng/source/editeng/impedit4.cxx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) mode change 100755 => 100644 editeng/source/editeng/impedit4.cxx diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx old mode 100755 new mode 100644 index 482cd6d71338..5a54c054016b --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -1458,7 +1458,11 @@ Reference< XSpellChecker1 > ImpEditEngine::GetSpeller() SpellInfo * ImpEditEngine::CreateSpellInfo( const EditSelection &rSel, bool bMultipleDocs ) { - pSpellInfo = new SpellInfo; + if (!pSpellInfo) + pSpellInfo = new SpellInfo; + else + *pSpellInfo = SpellInfo(); // reset to default values + pSpellInfo->bMultipleDoc = bMultipleDocs; EditSelection aSentenceSel( SelectSentence( rSel ) ); // pSpellInfo->aSpellStart = CreateEPaM( aSentenceSel.Min() ); @@ -2023,7 +2027,6 @@ bool ImpEditEngine::SpellSentence(EditView& rEditView, #else bool bRet = false; EditSelection aCurSel( rEditView.pImpEditView->GetEditSelection() ); - //the pSpellInfo has to be created on demand if(!pSpellInfo) pSpellInfo = CreateSpellInfo( aCurSel, true ); pSpellInfo->aCurSentenceStart = aCurSel.Min(); @@ -2191,8 +2194,12 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, { #ifdef SVX_LIGHT #else + // Note: rNewPortions.size() == 0 is valid and happens when the whole + // sentence got removed in the dialog + DBG_ASSERT(pSpellInfo, "pSpellInfo not initialized"); - if(pSpellInfo) + if (pSpellInfo && + pSpellInfo->aLastSpellPortions.size() > 0) // no portions -> no text to be changed { // get current paragraph length to calculate later on how the sentence length changed, // in order to place the cursor at the end of the sentence again @@ -2202,6 +2209,10 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, UndoActionStart( EDITUNDO_INSERT ); if(pSpellInfo->aLastSpellPortions.size() == rNewPortions.size()) { + DBG_ASSERT( rNewPortions.size() > 0, "rNewPortions should not be empty here" ); + DBG_ASSERT( pSpellInfo->aLastSpellPortions.size() == pSpellInfo->aLastSpellContentSelections.size(), + "aLastSpellPortions and aLastSpellContentSelections size mismatch" ); + //the simple case: the same number of elements on both sides //each changed element has to be applied to the corresponding source element svx::SpellPortions::const_iterator aCurrentNewPortion = rNewPortions.end(); @@ -2252,6 +2263,8 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, } else { + DBG_ASSERT( pSpellInfo->aLastSpellContentSelections.size() > 0, "aLastSpellContentSelections should not be empty here" ); + //select the complete sentence SpellContentSelections::const_iterator aCurrentEndPosition = pSpellInfo->aLastSpellContentSelections.end(); --aCurrentEndPosition; -- cgit v1.2.3 From b6c7b932e7ad2a6d27fa62674926d1e8675ad83d Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Mon, 19 Jul 2010 13:07:06 +0200 Subject: #162096# use RepositoryHelper for missing source_config --- solenv/bin/modules/SourceConfig.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/solenv/bin/modules/SourceConfig.pm b/solenv/bin/modules/SourceConfig.pm index 06d72d06fe4c..84b25135cc3d 100644 --- a/solenv/bin/modules/SourceConfig.pm +++ b/solenv/bin/modules/SourceConfig.pm @@ -42,6 +42,7 @@ use constant SOURCE_CONFIG_VERSION => 3; use Carp; use Cwd; +use RepositoryHelper; use File::Basename; use File::Temp qw(tmpnam); @@ -261,9 +262,10 @@ sub get_fallback_repository { my $self = shift; if (defined $self->{USER_SOURCE_ROOT}) { ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT}; - return; + } else { + my $repository_root = RepositoryHelper->new()->get_repository_root(); + ${$self->{REPOSITORIES}}{File::Basename::basename($repository_root)} = $repository_root; }; - croak('Cannot determine repository. Please make your checks!!'); }; sub read_config_file { -- cgit v1.2.3 From c9f7f4a18b2e22346fe6f673d5bfe6738fb53870 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Wed, 21 Jul 2010 17:26:17 +0200 Subject: vgbugs10: #162096# initialisation repository considered as active --- solenv/bin/modules/SourceConfig.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/solenv/bin/modules/SourceConfig.pm b/solenv/bin/modules/SourceConfig.pm index 84b25135cc3d..25fd13f4fdb2 100644 --- a/solenv/bin/modules/SourceConfig.pm +++ b/solenv/bin/modules/SourceConfig.pm @@ -96,6 +96,9 @@ sub new { $self->{WARNINGS} = []; $self->{REPORT_MESSAGES} = []; $self->{CONFIG_FILE_CONTENT} = []; + if (defined $self->{USER_SOURCE_ROOT}) { + ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT}; + }; $self->{SOURCE_CONFIG_FILE} = get_config_file($self->{SOURCE_ROOT}) if (!defined $self->{SOURCE_CONFIG_FILE}); $self->{SOURCE_CONFIG_DEFAULT} = $self->{SOURCE_ROOT} .'/'.SOURCE_CONFIG_FILE_NAME; read_config_file($self); @@ -260,12 +263,8 @@ sub get_config_file { # sub get_fallback_repository { my $self = shift; - if (defined $self->{USER_SOURCE_ROOT}) { - ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT}; - } else { - my $repository_root = RepositoryHelper->new()->get_repository_root(); - ${$self->{REPOSITORIES}}{File::Basename::basename($repository_root)} = $repository_root; - }; + my $repository_root = RepositoryHelper->new()->get_repository_root(); + ${$self->{REPOSITORIES}}{File::Basename::basename($repository_root)} = $repository_root; }; sub read_config_file { -- cgit v1.2.3 From 45a54fdd3c61b929690cd91a2ff66bce235ac064 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Thu, 22 Jul 2010 09:59:29 +0200 Subject: #i111719# updated liberation fonts to release 1.06 --- more_fonts/fonts/ttf_liberation/makefile.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/more_fonts/fonts/ttf_liberation/makefile.mk b/more_fonts/fonts/ttf_liberation/makefile.mk index de711a644690..a49c568e2770 100644 --- a/more_fonts/fonts/ttf_liberation/makefile.mk +++ b/more_fonts/fonts/ttf_liberation/makefile.mk @@ -36,8 +36,8 @@ TARGET=ttf_liberation # --- Files -------------------------------------------------------- -TARFILE_NAME=liberation-fonts-ttf-1.05.3.20100427 -TARFILE_MD5=ef9ab6c1740682fbd730606d5f6922e6 +TARFILE_NAME=liberation-fonts-ttf-1.06.0.20100721 +TARFILE_MD5=ca4870d899fd7e943ffc310a5421ad4d TARFILE_ROOTDIR=. PATCH_FILES= -- cgit v1.2.3 From 1809df9e834bf1581f3b5d61256d732d00a7ea19 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Thu, 22 Jul 2010 10:18:09 +0200 Subject: #i111719# deliver updated versions of liberation fonts --- more_fonts/prj/d.lst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/more_fonts/prj/d.lst b/more_fonts/prj/d.lst index 0bc15242b086..261aae0b2d28 100644 --- a/more_fonts/prj/d.lst +++ b/more_fonts/prj/d.lst @@ -1,9 +1,10 @@ mkdir: %COMMON_DEST%\pck%_EXT% ..\fonts\fc_local.conf %COMMON_DEST%\pck%_EXT%\fc_local.conf +# TODO: replace explicit versions by wildcard when the build system learns to handle them ..\%__SRC%\misc\build\dejavu-fonts-ttf-2.30\ttf\*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf ..\%__SRC%\misc\build\dejavu-fonts-ttf-2.30\LICENSE %COMMON_DEST%\pck%_EXT%\LICENSE_dejavu -..\%__SRC%\misc\build\Liberation*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf -..\%__SRC%\misc\build\License.txt %COMMON_DEST%\pck%_EXT%\LICENSE_liberation +..\%__SRC%\misc\build\liberation-fonts-ttf-1.06.0.20100721/Liberation*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf +..\%__SRC%\misc\build\liberation-fonts-ttf-1.06.0.20100721/License.txt %COMMON_DEST%\pck%_EXT%\LICENSE_liberation ..\%__SRC%\misc\build\gentiumbasic-fonts-1.10\*.ttf %COMMON_DEST%\pck%_EXT%\*.ttf ..\%__SRC%\misc\build\gentiumbasic-fonts-1.10\OFL.txt %COMMON_DEST%\pck%_EXT%\LICENSE_gentium -- cgit v1.2.3 From e2631519a86937148a337ca9115a5b48d1d03de4 Mon Sep 17 00:00:00 2001 From: "Herbert Duerr [hdu]" Date: Fri, 23 Jul 2010 08:54:21 +0200 Subject: #i111719# update ooo.lst with new liberation-fonts tarball name --- ooo.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ooo.lst b/ooo.lst index d2f92d6ef534..4b9cb79dc19d 100644 --- a/ooo.lst +++ b/ooo.lst @@ -15,7 +15,7 @@ http://hg.services.openoffice.org/binaries 2ae988b339daec234019a7066f96733e-commons-lang-2.3-src.tar.gz 2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz 2f6ecca935948f7db92d925d88d0d078-icu4c-4_0_1-src.tgz -ef9ab6c1740682fbd730606d5f6922e6-liberation-fonts-ttf-1.05.3.20100427.zip +ca4870d899fd7e943ffc310a5421ad4d-liberation-fonts-ttf-1.06.0.20100721.tar.gz 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip 35efabc239af896dfb79be7ebdd6e6b9-gentiumbasic-fonts-1.10.zip 377a60170e5185eb63d3ed2fae98e621-README_silgraphite-2.3.1.txt -- cgit v1.2.3 From 4c8d9dbc46403017cf09723d903e1b49296b9e48 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 23 Jul 2010 17:21:05 +0200 Subject: cws tl83: #i113276# changes to Greek symbol set because of new OpenSymbol font --- starmath/inc/symbol.hxx | 12 ++++++++++++ starmath/source/dialog.cxx | 3 +++ starmath/source/document.cxx | 6 +----- starmath/source/edit.cxx | 8 ++++++++ starmath/source/mathmlexport.cxx | 1 - starmath/source/mathmlimport.cxx | 1 - starmath/source/symbol.cxx | 35 ++++++++++++++++++++++++++++++++++- starmath/source/types.cxx | 2 +- starmath/source/view.cxx | 3 +-- 9 files changed, 60 insertions(+), 11 deletions(-) mode change 100755 => 100644 starmath/source/view.cxx diff --git a/starmath/inc/symbol.hxx b/starmath/inc/symbol.hxx index 503859485095..51e8ad0b8642 100644 --- a/starmath/inc/symbol.hxx +++ b/starmath/inc/symbol.hxx @@ -38,7 +38,10 @@ #include #include #include +#include +#include +#include "unomodel.hxx" #include "utility.hxx" #include "smmod.hxx" @@ -133,6 +136,15 @@ typedef std::map< String, SmSym, lt_String > SymbolMap_t; // vector of pointers to the actual symbols in the above container typedef std::vector< const SmSym * > SymbolPtrVec_t; +struct lt_SmSymPtr : public std::binary_function< const SmSym *, const SmSym *, bool > +{ + bool operator() ( const SmSym *pSym1, const SmSym *pSym2 ) + { + return pSym1->GetCharacter() < pSym2->GetCharacter(); + } +}; + + class SmSymbolManager : public SfxListener { SymbolMap_t m_aSymbols; diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 037f2fc1dff8..6067daa797dc 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1600,6 +1600,9 @@ BOOL SmSymbolDialog::SelectSymbolSet(const XubString &rSymbolSetName) aSymbolSetName = rSymbolSetName; aSymbolSet = rSymbolMgr.GetSymbolSet( aSymbolSetName ); + // sort symbols by Unicode position (useful for displaying Greek characters alphabetically) + std::sort( aSymbolSet.begin(), aSymbolSet.end(), lt_SmSymPtr() ); + aSymbolSetDisplay.SetSymbolSet( aSymbolSet ); if (aSymbolSet.size() > 0) SelectSymbol(0); diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 49739af72972..86d23af0161b 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -1123,13 +1123,9 @@ void SmDocShell::Execute(SfxRequest& rReq) case SID_TEXT: { - const SfxStringItem& rItem = - (const SfxStringItem&)rReq.GetArgs()->Get(SID_TEXT); - + const SfxStringItem& rItem = (const SfxStringItem&)rReq.GetArgs()->Get(SID_TEXT); if (GetText() != rItem.GetValue()) - { SetText(rItem.GetValue()); - } } break; diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index f7093f9c3815..fe849a36e358 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -251,7 +251,10 @@ IMPL_LINK( SmEditWindow, ModifyTimerHdl, Timer *, EMPTYARG /*pTimer*/ ) { SmModule *pp = SM_MOD(); if (pp->GetConfig()->IsAutoRedraw()) + { Flush(); + aModifyTimer.Stop(); + } return 0; } @@ -917,7 +920,10 @@ void SmEditWindow::InsertText(const String& Text) { DBG_ASSERT( pEditView, "EditView missing" ); if (pEditView) + { pEditView->InsertText(Text); + aModifyTimer.Start(); + } } void SmEditWindow::Flush() @@ -928,9 +934,11 @@ void SmEditWindow::Flush() pEditEngine->ClearModifyFlag(); SmViewShell *pViewSh = rCmdBox.GetView(); if (pViewSh) + { pViewSh->GetViewFrame()->GetDispatcher()->Execute( SID_TEXT, SFX_CALLMODE_STANDARD, new SfxStringItem(SID_TEXT, GetText()), 0L); + } } if (aCursorMoveTimer.IsActive()) diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx index 36eb9d3884b5..bec69eb01b95 100644 --- a/starmath/source/mathmlexport.cxx +++ b/starmath/source/mathmlexport.cxx @@ -75,7 +75,6 @@ #include #include "mathmlexport.hxx" -#include "mathtype.hxx" #include #include #include diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index dd90caaf6d45..36c009757eac 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -71,7 +71,6 @@ one go*/ #include #include "mathmlimport.hxx" -#include "mathtype.hxx" #include #include #include diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx index e248f9726629..5208ce3644ce 100644 --- a/starmath/source/symbol.cxx +++ b/starmath/source/symbol.cxx @@ -290,6 +290,28 @@ void SmSymbolManager::Load() DBG_ERROR( "no symbol set found" ); m_bModified = false; } + + // now add a %i... symbol to the 'iGreek' set for every symbol found in the 'Greek' set. + SmLocalizedSymbolData aLocalizedData; + const String aGreekSymbolSetName( aLocalizedData.GetUiSymbolSetName( A2OU("Greek") ) ); + const SymbolPtrVec_t aGreekSymbols( GetSymbolSet( aGreekSymbolSetName ) ); + String aSymbolSetName( (sal_Unicode) 'i' ); + aSymbolSetName += aGreekSymbolSetName; + size_t nSymbols = aGreekSymbols.size(); + for (size_t i = 0; i < nSymbols; ++i) + { + // make the new symbol a copy but with ITALIC_NORMAL, and add it to iGreek + const SmSym &rSym = *aGreekSymbols[i]; + Font aFont( rSym.GetFace() ); + DBG_ASSERT( aFont.GetItalic() == ITALIC_NONE, "expected Font with ITALIC_NONE, failed." ); + aFont.SetItalic( ITALIC_NORMAL ); + String aSymbolName( (sal_Unicode)'i' ); + aSymbolName += rSym.GetName(); + SmSym aSymbol( aSymbolName, aFont, rSym.GetCharacter(), + aSymbolSetName, TRUE /*bIsPredefined*/ ); + + AddOrReplaceSymbol( aSymbol ); + } } void SmSymbolManager::Save() @@ -314,10 +336,21 @@ void SmSymbolManager::Save() } DBG_ASSERT(pSym - pSymbols == nSaveSymbolCnt, "wrong number of symbols" ); #endif + + // prepare to skip symbols from iGreek on saving + SmLocalizedSymbolData aLocalizedData; + String aSymbolSetName( (sal_Unicode) 'i' ); + aSymbolSetName += aLocalizedData.GetUiSymbolSetName( A2OU("Greek") ); + SymbolPtrVec_t aTmp( GetSymbols() ); std::vector< SmSym > aSymbols; for (size_t i = 0; i < aTmp.size(); ++i) - aSymbols.push_back( *aTmp[i] ); + { + // skip symbols from iGreek set since those symbols always get added + // by computational means in SmSymbolManager::Load + if (aTmp[i]->GetSymbolSetName() != aSymbolSetName) + aSymbols.push_back( *aTmp[i] ); + } rCfg.SetSymbols( aSymbols ); #if 0 delete [] pSymbols; diff --git a/starmath/source/types.cxx b/starmath/source/types.cxx index a861db5a0c79..e63d46c79e9b 100644 --- a/starmath/source/types.cxx +++ b/starmath/source/types.cxx @@ -38,7 +38,7 @@ sal_Unicode ConvertMathPrivateUseAreaToUnicode( sal_Unicode cChar ) if (IsInPrivateUseArea( cChar )) { DBG_ASSERT( 0, "Error: private use area characters should no longer be in use!" ); - cRes = (sal_Unicode) '&'; // just some character that should easily be notice as odd in the context + cRes = (sal_Unicode) '@'; // just some character that should easily be notice as odd in the context } return cRes; } diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx old mode 100755 new mode 100644 index 886d409931b2..0087595703ca --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1545,8 +1545,7 @@ void SmViewShell::Execute(SfxRequest& rReq) case SID_INSERTTEXT: { const SfxStringItem& rItem = - (const SfxStringItem&)rReq.GetArgs()->Get(SID_INSERTTEXT); - + (const SfxStringItem&)rReq.GetArgs()->Get(SID_INSERTTEXT); if (pWin) pWin->InsertText(rItem.GetValue()); break; -- cgit v1.2.3 From dec8e657ceffb60df8585ab16887bffaa2cdda6e Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Fri, 23 Jul 2010 17:21:05 +0200 Subject: cws tl83: #i113276# changes to Greek symbol set because of new OpenSymbol font --- officecfg/registry/data/org/openoffice/Office/Math.xcu | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) mode change 100644 => 100755 officecfg/registry/data/org/openoffice/Office/Math.xcu diff --git a/officecfg/registry/data/org/openoffice/Office/Math.xcu b/officecfg/registry/data/org/openoffice/Office/Math.xcu old mode 100644 new mode 100755 index 6778873e3386..b65c2422c433 --- a/officecfg/registry/data/org/openoffice/Office/Math.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Math.xcu @@ -48,6 +48,8 @@ 0 + + OpenSymbol @@ -65,10 +67,11 @@ 0 - 2 + 0 + -- cgit v1.2.3 From b1e16431c0965e13631af64627e000942960dc25 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Tue, 27 Jul 2010 10:49:30 +0200 Subject: vgbugs10: #162096# initialisation repository is the only active repository when source_config is missing --- solenv/bin/modules/SourceConfig.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/solenv/bin/modules/SourceConfig.pm b/solenv/bin/modules/SourceConfig.pm index 25fd13f4fdb2..c4b9cc01ec67 100644 --- a/solenv/bin/modules/SourceConfig.pm +++ b/solenv/bin/modules/SourceConfig.pm @@ -101,6 +101,9 @@ sub new { }; $self->{SOURCE_CONFIG_FILE} = get_config_file($self->{SOURCE_ROOT}) if (!defined $self->{SOURCE_CONFIG_FILE}); $self->{SOURCE_CONFIG_DEFAULT} = $self->{SOURCE_ROOT} .'/'.SOURCE_CONFIG_FILE_NAME; + if (defined $self->{USER_SOURCE_ROOT}) { + ${$self->{REPOSITORIES}}{File::Basename::basename($self->{USER_SOURCE_ROOT})} = $self->{USER_SOURCE_ROOT}; + }; read_config_file($self); get_module_paths($self); bless($self, $class); @@ -259,7 +262,7 @@ sub get_config_file { }; # -# Fallback - default repository is based on the object initialization parameter... +# Fallback - fallback repository is based on RepositoryHelper educated guess # sub get_fallback_repository { my $self = shift; @@ -270,7 +273,9 @@ sub get_fallback_repository { sub read_config_file { my $self = shift; if (!$self->{SOURCE_CONFIG_FILE}) { - get_fallback_repository($self); + if (!defined $self->{USER_SOURCE_ROOT}) { + get_fallback_repository($self); + }; return; }; my $repository_section = 0; -- cgit v1.2.3 From 4ed0e085d2a1730f201bf584c22c0a9fe32c98e2 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Tue, 27 Jul 2010 15:55:17 +0200 Subject: l10nfixer01: #i113440# fixed resource --- sfx2/source/dialog/securitypage.src | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sfx2/source/dialog/securitypage.src b/sfx2/source/dialog/securitypage.src index fee60404d01c..ee334234c802 100755 --- a/sfx2/source/dialog/securitypage.src +++ b/sfx2/source/dialog/securitypage.src @@ -79,9 +79,9 @@ TabPage TP_DOCINFOSECURITY Pos = MAP_APPFONT( 12, 48 ); Size = MAP_APPFONT( 236, 3 * RSC_CD_FIXEDTEXT_HEIGHT ); Text [ en-US ] = - "Note: After a password has been set, the document will only open "\ - "with the password. Should you lose the password, there will be "\ - "no way to recover the document. Please also note that this password "\ + "Note: After a password has been set, the document will only open " + "with the password. Should you lose the password, there will be " + "no way to recover the document. Please also note that this password " "is case-sensitive."; WordBreak = TRUE; }; -- cgit v1.2.3 From cdce29a326c834a269b33dff27e74ed34c82c7df Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 28 Jul 2010 09:46:36 +0200 Subject: cws tl83: #i113276# default layout for 'Greek' characters changed; added new property 'GreekCharStyle' --- starmath/inc/format.hxx | 4 ++ starmath/inc/node.hxx | 23 +++-------- starmath/source/cfgitem.cxx | 7 ++++ starmath/source/document.cxx | 30 +++++++++----- starmath/source/format.cxx | 7 +++- starmath/source/node.cxx | 96 ++++++++++++++++++++++++++++++++++++++------ starmath/source/parse.cxx | 4 +- starmath/source/unomodel.cxx | 16 ++++++++ 8 files changed, 144 insertions(+), 43 deletions(-) mode change 100644 => 100755 starmath/inc/format.hxx mode change 100644 => 100755 starmath/source/node.cxx mode change 100755 => 100644 starmath/source/parse.cxx mode change 100755 => 100644 starmath/source/unomodel.cxx diff --git a/starmath/inc/format.hxx b/starmath/inc/format.hxx old mode 100644 new mode 100755 index f632131d834f..4d13ea48185e --- a/starmath/inc/format.hxx +++ b/starmath/inc/format.hxx @@ -109,6 +109,7 @@ class SmFormat : public SfxBroadcaster USHORT vSize[SIZ_END + 1]; USHORT vDist[DIS_END + 1]; SmHorAlign eHorAlign; + INT16 nGreekCharStyle; BOOL bIsTextmode, bScaleNormalBrackets; @@ -138,6 +139,9 @@ public: BOOL IsTextmode() const { return bIsTextmode; } void SetTextmode(BOOL bVal) { bIsTextmode = bVal; } + INT16 GetGreekCharStyle() const { return nGreekCharStyle; } + void SetGreekCharStyle(INT16 nVal) { nGreekCharStyle = nVal; } + BOOL IsScaleNormalBrackets() const { return bScaleNormalBrackets; } void SetScaleNormalBrackets(BOOL bVal) { bScaleNormalBrackets = bVal; } diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index 6ef89ea5ec1b..92c9d4621292 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -311,19 +311,10 @@ class SmTextNode : public SmVisibleNode USHORT nFontDesc; protected: - SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP) - : SmVisibleNode(eNodeType, rNodeToken) - { - nFontDesc = nFontDescP; - } + SmTextNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP ); public: - SmTextNode(const SmToken &rNodeToken, USHORT nFontDescP) - : SmVisibleNode(NTEXT, rNodeToken) - { - nFontDesc = nFontDescP; - } - + SmTextNode(const SmToken &rNodeToken, USHORT nFontDescP ); USHORT GetFontDesc() const { return nFontDesc; } void SetText(const XubString &rText) { aText = rText; } @@ -347,15 +338,13 @@ public: class SmSpecialNode : public SmTextNode { + bool bIsFromGreekSymbolSet; + protected: - SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc) - : SmTextNode(eNodeType, rNodeToken, _nFontDesc) - {} + SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc); public: - SmSpecialNode(const SmToken &rNodeToken) - : SmTextNode(NSPECIAL, rNodeToken, FNT_MATH) //! default Font nicht immer richtig - {} + SmSpecialNode(const SmToken &rNodeToken); virtual void Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell); virtual void Arrange(const OutputDevice &rDev, const SmFormat &rFormat); diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index bf62157a30d3..8066b88fd80d 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -127,6 +127,7 @@ static const char * aMathPropNames[] = static const char * aFormatPropNames[] = { "StandardFormat/Textmode", + "StandardFormat/GreekCharStyle", "StandardFormat/ScaleNormalBracket", "StandardFormat/HorizontalAlignment", "StandardFormat/BaseSize", @@ -994,6 +995,10 @@ void SmMathConfig::LoadFormat() if (pVal->hasValue() && (*pVal >>= bTmp)) pFormat->SetTextmode( bTmp ); ++pVal; + // StandardFormat/GreekCharStyle + if (pVal->hasValue() && (*pVal >>= nTmp16)) + pFormat->SetGreekCharStyle( nTmp16 ); + ++pVal; // StandardFormat/ScaleNormalBracket if (pVal->hasValue() && (*pVal >>= bTmp)) pFormat->SetScaleNormalBrackets( bTmp ); @@ -1069,6 +1074,8 @@ void SmMathConfig::SaveFormat() // StandardFormat/Textmode *pValue++ <<= (BOOL) pFormat->IsTextmode(); + // StandardFormat/GreekCharStyle + *pValue++ <<= (INT16) pFormat->GetGreekCharStyle(); // StandardFormat/ScaleNormalBracket *pValue++ <<= (BOOL) pFormat->IsScaleNormalBrackets(); // StandardFormat/HorizontalAlignment diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 86d23af0161b..ab1382b97879 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -131,9 +131,9 @@ void SmDocShell::SFX_NOTIFY(SfxBroadcaster&, const TypeId&, { case HINT_FORMATCHANGED: SetFormulaArranged(FALSE); - nModifyCount++; //! merkwuerdig... - // ohne dies wird die Grafik letztlich - // nicht geupdatet + + nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState + Repaint(); break; } @@ -211,11 +211,19 @@ void SmDocShell::SetFormat(SmFormat& rFormat) RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetFormat" ); aFormat = rFormat; - SetFormulaArranged(FALSE); - SmViewShell *pViewSh = SmGetActiveView(); - if (pViewSh) - pViewSh->GetViewFrame()->GetBindings().Invalidate(SID_GAPHIC_SM); - SetModified(TRUE); + SetFormulaArranged( FALSE ); + SetModified( TRUE ); + + nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState + + // don't use SmGetActiveView since the view shell might not be active (0 pointer) + // if for example the Basic Macro dialog currently has the focus. Thus: + SfxViewFrame* pFrm = SfxViewFrame::GetFirst( this ); + while (pFrm) + { + pFrm->GetBindings().Invalidate(SID_GAPHIC_SM); + pFrm = SfxViewFrame::GetNext( *pFrm, this ); + } } String SmDocShell::GetAccessibleText() @@ -241,7 +249,7 @@ void SmDocShell::Parse() delete pTree; ReplaceBadChars(); pTree = aInterpreter.Parse(aText); - nModifyCount++; + nModifyCount++; //! see comment for SID_GAPHIC_SM in SmDocShell::GetState SetFormulaArranged( FALSE ); } @@ -1218,6 +1226,10 @@ void SmDocShell::GetState(SfxItemSet &rSet) break; case SID_GAPHIC_SM: + //! very old (pre UNO) and ugly hack to invalidate the SmGraphicWindow. + //! If nModifyCount gets changed then the call below will implicitly notify + //! SmGraphicController::StateChanged and there the window gets invalidated. + //! Thus all the 'nModifyCount++' before invalidating this slot. rSet.Put(SfxInt16Item(SID_GAPHIC_SM, nModifyCount)); break; diff --git a/starmath/source/format.cxx b/starmath/source/format.cxx index 18aaed4c841c..e92d1a5e97aa 100644 --- a/starmath/source/format.cxx +++ b/starmath/source/format.cxx @@ -112,8 +112,9 @@ SmFormat::SmFormat() { nVersion = SM_FMT_VERSION_NOW; - eHorAlign = AlignCenter; - bIsTextmode = bScaleNormalBrackets = FALSE; + eHorAlign = AlignCenter; + nGreekCharStyle = 0; + bIsTextmode = bScaleNormalBrackets = FALSE; vSize[SIZ_TEXT] = 100; vSize[SIZ_INDEX] = 60; @@ -191,6 +192,7 @@ SmFormat & SmFormat::operator = (const SmFormat &rFormat) SetVersion (rFormat.GetVersion()); SetHorAlign(rFormat.GetHorAlign()); SetTextmode(rFormat.IsTextmode()); + SetGreekCharStyle(rFormat.GetGreekCharStyle()); SetScaleNormalBrackets(rFormat.IsScaleNormalBrackets()); USHORT i; @@ -212,6 +214,7 @@ BOOL SmFormat::operator == (const SmFormat &rFormat) const { BOOL bRes = aBaseSize == rFormat.aBaseSize && eHorAlign == rFormat.eHorAlign && + nGreekCharStyle == rFormat.nGreekCharStyle && bIsTextmode == rFormat.bIsTextmode && bScaleNormalBrackets == rFormat.bScaleNormalBrackets; diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx old mode 100644 new mode 100755 index 4601b2f84fec..2747d994a7eb --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -28,7 +28,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_starmath.hxx" -#define APPEND(str,ascii) str.AppendAscii(RTL_CONSTASCII_STRINGPARAM(ascii)) +#include "node.hxx" +#include "rect.hxx" +#include "symbol.hxx" +#include "smmod.hxx" +#include "document.hxx" +#include "view.hxx" +#include "mathtype.hxx" + #include #include #include @@ -38,23 +45,14 @@ #include #include - -#include "node.hxx" -#include -#include "symbol.hxx" -#include "smmod.hxx" -#include -#include -#ifndef _MATHTYPE_HXX -#include "mathtype.hxx" -#endif - #include #include // define this to draw rectangles for debugging //#define SM_RECT_DEBUG +#define APPEND(str,ascii) str.AppendAscii(RTL_CONSTASCII_STRINGPARAM(ascii)) + //////////////////////////////////////// // SmTmpDevice // Allows for font and color changes. The original settings will be restored @@ -2355,6 +2353,20 @@ void SmRectangleNode::Draw(OutputDevice &rDev, const Point &rPosition) const /**************************************************************************/ +SmTextNode::SmTextNode( SmNodeType eNodeType, const SmToken &rNodeToken, USHORT nFontDescP ) : + SmVisibleNode(eNodeType, rNodeToken) +{ + nFontDesc = nFontDescP; +} + + +SmTextNode::SmTextNode( const SmToken &rNodeToken, USHORT nFontDescP ) : + SmVisibleNode(NTEXT, rNodeToken) +{ + nFontDesc = nFontDescP; +} + + void SmTextNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell) { SmNode::Prepare(rFormat, rDocShell); @@ -2798,6 +2810,36 @@ void SmAttributNode::CreateTextFromNode(String &rText) /**************************************************************************/ +bool lcl_IsFromGreekSymbolSet( const String &rTokenText ) +{ + bool bRes = false; + + // valid symbol name needs to have a '%' at pos 0 and at least an additonal char + if (rTokenText.Len() > 2 && rTokenText.GetBuffer()[0] == (sal_Unicode)'%') + { + String aName( rTokenText.Copy(1) ); + SmSym *pSymbol = SM_MOD()->GetSymbolManager().GetSymbolByName( aName ); + if (pSymbol && GetExportSymbolSetName( pSymbol->GetSymbolSetName() ).EqualsAscii( "Greek" ) ) + bRes = true; + } + + return bRes; +} + + +SmSpecialNode::SmSpecialNode(SmNodeType eNodeType, const SmToken &rNodeToken, USHORT _nFontDesc) : + SmTextNode(eNodeType, rNodeToken, _nFontDesc) +{ + bIsFromGreekSymbolSet = lcl_IsFromGreekSymbolSet( rNodeToken.aText ); +} + + +SmSpecialNode::SmSpecialNode(const SmToken &rNodeToken) : + SmTextNode(NSPECIAL, rNodeToken, FNT_MATH) //! default Font nicht immer richtig +{ + bIsFromGreekSymbolSet = lcl_IsFromGreekSymbolSet( rNodeToken.aText ); +} + void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell) { @@ -2806,7 +2848,8 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell const SmSym *pSym; SmModule *pp = SM_MOD(); - if (NULL != (pSym = pp->GetSymbolManager().GetSymbolByName(GetToken().aText))) + String aName( GetToken().aText.Copy(1) ); + if (NULL != (pSym = pp->GetSymbolManager().GetSymbolByName( aName ))) { SetText( pSym->GetCharacter() ); GetFont() = pSym->GetFace(); @@ -2832,6 +2875,33 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell SetAttribut(ATTR_BOLD); Flags() |= FLG_FONT; + + if (bIsFromGreekSymbolSet) + { + DBG_ASSERT( GetText().Len() == 1, "a symbol should only consist of 1 char!" ); + bool bItalic = false; + INT16 nStyle = rFormat.GetGreekCharStyle(); + DBG_ASSERT( nStyle >= 0 && nStyle <= 2, "unexpected value for GreekCharStyle" ); + if (nStyle == 1) + bItalic = true; + else if (nStyle == 2) + { + String aText( GetText() ); + if (aText.Len() > 0) + { + const sal_Unicode cUppercaseAlpha = 0x0391; + const sal_Unicode cUppercaseOmega = 0x03A9; + sal_Unicode cChar = aText.GetBuffer()[0]; + // uppercase letters should be straight and lowercase letters italic + bItalic = !(cUppercaseAlpha <= cChar && cChar <= cUppercaseOmega); + } + } + + if (bItalic) + Attributes() |= ATTR_ITALIC; + else + Attributes() &= ~ATTR_ITALIC;; + } }; diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx old mode 100755 new mode 100644 index 15971d0c38af..d12f3df07400 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -741,14 +741,14 @@ void SmParser::NextToken() CurToken.nLevel = 5; CurToken.aText = String(); CurToken.nRow = sal::static_int_cast< xub_StrLen >(Row); - CurToken.nCol = nTmpStart - ColOff + 1; + CurToken.nCol = nTmpStart - ColOff; if (aTmpRes.TokenType & KParseType::IDENTNAME) { xub_StrLen n = sal::static_int_cast< xub_StrLen >(aTmpRes.EndPos - nTmpStart); CurToken.eType = TSPECIAL; - CurToken.aText = BufferString.Copy( sal::static_int_cast< xub_StrLen >(nTmpStart), n ); + CurToken.aText = BufferString.Copy( sal::static_int_cast< xub_StrLen >(nTmpStart-1), n+1 ); DBG_ASSERT( aTmpRes.EndPos > rnEndPos, "empty identifier" ); diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx old mode 100755 new mode 100644 index 013831f6e44e..9d008f326d2f --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -203,6 +203,7 @@ enum SmModelPropertyHandles HANDLE_RELATIVE_FONT_HEIGHT_OPERATORS, HANDLE_RELATIVE_FONT_HEIGHT_LIMITS, HANDLE_IS_TEXT_MODE, + HANDLE_GREEK_CHAR_STYLE, HANDLE_ALIGNMENT, HANDLE_RELATIVE_SPACING, HANDLE_RELATIVE_LINE_SPACING, @@ -273,6 +274,7 @@ PropertySetInfo * lcl_createModelPropertyInfo () { RTL_CONSTASCII_STRINGPARAM( "Formula" ), HANDLE_FORMULA , &::getCppuType((const OUString*)0), PROPERTY_NONE, 0}, { RTL_CONSTASCII_STRINGPARAM( "IsScaleAllBrackets" ), HANDLE_IS_SCALE_ALL_BRACKETS , &::getBooleanCppuType(), PROPERTY_NONE, 0}, { RTL_CONSTASCII_STRINGPARAM( "IsTextMode" ), HANDLE_IS_TEXT_MODE , &::getBooleanCppuType(), PROPERTY_NONE, 0}, + { RTL_CONSTASCII_STRINGPARAM( "GreekCharStyle" ), HANDLE_GREEK_CHAR_STYLE, &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, 0}, { RTL_CONSTASCII_STRINGPARAM( "LeftMargin" ), HANDLE_LEFT_MARGIN , &::getCppuType((const sal_Int16*)0), PROPERTY_NONE, DIS_LEFTSPACE }, { RTL_CONSTASCII_STRINGPARAM( "PrinterName" ), HANDLE_PRINTER_NAME , &::getCppuType((const OUString*)0), PROPERTY_NONE, 0 }, { RTL_CONSTASCII_STRINGPARAM( "PrinterSetup" ), HANDLE_PRINTER_SETUP , &::getCppuType((const Sequence < sal_Int8 >*)0), PROPERTY_NONE, 0 }, @@ -593,6 +595,16 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* } break; + case HANDLE_GREEK_CHAR_STYLE : + { + sal_Int16 nVal = 0; + *pValues >>= nVal; + if (nVal < 0 || nVal > 2) + throw IllegalArgumentException(); + aFormat.SetGreekCharStyle( nVal ); + } + break; + case HANDLE_ALIGNMENT : { // SmHorAlign uses the same values as HorizontalAlignment @@ -824,6 +836,10 @@ void SmModel::_getPropertyValues( const PropertyMapEntry **ppEntries, Any *pValu } break; + case HANDLE_GREEK_CHAR_STYLE : + *pValue <<= (sal_Int16)aFormat.GetGreekCharStyle(); + break; + case HANDLE_ALIGNMENT : // SmHorAlign uses the same values as HorizontalAlignment *pValue <<= (sal_Int16)aFormat.GetHorAlign(); -- cgit v1.2.3 From 0319bf68ea594167312e15df50148994daa31357 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 28 Jul 2010 09:46:36 +0200 Subject: cws tl83: #i113276# default layout for 'Greek' characters changed; added new property 'GreekCharStyle' --- .../registry/schema/org/openoffice/Office/Math.xcs | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/officecfg/registry/schema/org/openoffice/Office/Math.xcs b/officecfg/registry/schema/org/openoffice/Office/Math.xcs index caa8726b7c72..31f6e00a230a 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Math.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Math.xcs @@ -402,7 +402,28 @@ false - + + + + TL + Specifies the default layout for symbols from the 'Greek' symbol set. + + + + + + Specifies the minimum value allowed + + + + + Specifies the maximum value allowed + + + + 0 + + -- cgit v1.2.3 From f3c8be9585274b00f42de5eb4244297cbc3a6c4f Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 28 Jul 2010 12:01:07 +0200 Subject: l10nfixer01: #i113441# Remove wrong user defined text attribute for the Search&Replace function within the findbar.xml files --- sw/uiconfig/sglobal/toolbar/findbar.xml | 8 ++++---- sw/uiconfig/sweb/toolbar/findbar.xml | 8 ++++---- sw/uiconfig/swriter/toolbar/findbar.xml | 8 ++++---- sw/uiconfig/swxform/toolbar/findbar.xml | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sw/uiconfig/sglobal/toolbar/findbar.xml b/sw/uiconfig/sglobal/toolbar/findbar.xml index 9ef9d8a1a78f..078c0fc5bed5 100644 --- a/sw/uiconfig/sglobal/toolbar/findbar.xml +++ b/sw/uiconfig/sglobal/toolbar/findbar.xml @@ -1,8 +1,8 @@ - - - - + + + + diff --git a/sw/uiconfig/sweb/toolbar/findbar.xml b/sw/uiconfig/sweb/toolbar/findbar.xml index 9ef9d8a1a78f..0338d3156195 100644 --- a/sw/uiconfig/sweb/toolbar/findbar.xml +++ b/sw/uiconfig/sweb/toolbar/findbar.xml @@ -1,8 +1,8 @@ - - - - + + + + diff --git a/sw/uiconfig/swriter/toolbar/findbar.xml b/sw/uiconfig/swriter/toolbar/findbar.xml index 9ef9d8a1a78f..0338d3156195 100644 --- a/sw/uiconfig/swriter/toolbar/findbar.xml +++ b/sw/uiconfig/swriter/toolbar/findbar.xml @@ -1,8 +1,8 @@ - - - - + + + + diff --git a/sw/uiconfig/swxform/toolbar/findbar.xml b/sw/uiconfig/swxform/toolbar/findbar.xml index 9ef9d8a1a78f..0338d3156195 100644 --- a/sw/uiconfig/swxform/toolbar/findbar.xml +++ b/sw/uiconfig/swxform/toolbar/findbar.xml @@ -1,8 +1,8 @@ - - - - + + + + -- cgit v1.2.3 From 9ad1d7e628562e32630f5bbf20cb25a4f9782993 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 28 Jul 2010 12:01:07 +0200 Subject: l10nfixer01: #i113441# Remove wrong user defined text attribute for the Search&Replace function within the findbar.xml files --- sd/uiconfig/sdraw/toolbar/findbar.xml | 8 ++++---- sd/uiconfig/simpress/toolbar/findbar.xml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sd/uiconfig/sdraw/toolbar/findbar.xml b/sd/uiconfig/sdraw/toolbar/findbar.xml index 9ef9d8a1a78f..078c0fc5bed5 100644 --- a/sd/uiconfig/sdraw/toolbar/findbar.xml +++ b/sd/uiconfig/sdraw/toolbar/findbar.xml @@ -1,8 +1,8 @@ - - - - + + + + diff --git a/sd/uiconfig/simpress/toolbar/findbar.xml b/sd/uiconfig/simpress/toolbar/findbar.xml index 9ef9d8a1a78f..0338d3156195 100644 --- a/sd/uiconfig/simpress/toolbar/findbar.xml +++ b/sd/uiconfig/simpress/toolbar/findbar.xml @@ -1,8 +1,8 @@ - - - - + + + + -- cgit v1.2.3 From 2b4775df68fb75fdd3f0bc44eac308c71268549a Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Wed, 28 Jul 2010 12:01:07 +0200 Subject: l10nfixer01: #i113441# Remove wrong user defined text attribute for the Search&Replace function within the findbar.xml files --- sc/uiconfig/scalc/toolbar/findbar.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sc/uiconfig/scalc/toolbar/findbar.xml b/sc/uiconfig/scalc/toolbar/findbar.xml index 9ef9d8a1a78f..0338d3156195 100644 --- a/sc/uiconfig/scalc/toolbar/findbar.xml +++ b/sc/uiconfig/scalc/toolbar/findbar.xml @@ -1,8 +1,8 @@ - - - - + + + + -- cgit v1.2.3 From 3ea1b06686ea33cf131dc59007507455276df651 Mon Sep 17 00:00:00 2001 From: va Date: Wed, 28 Jul 2010 13:30:40 +0200 Subject: #i112962# Changed Format to OOoUserDict1 --- extras/source/wordbook/standard.dic | Bin 11 -> 47 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/extras/source/wordbook/standard.dic b/extras/source/wordbook/standard.dic index 7eadfdb77c7c..5b8b235b5dd0 100644 Binary files a/extras/source/wordbook/standard.dic and b/extras/source/wordbook/standard.dic differ -- cgit v1.2.3 From a8f1ad65612c0e54969cabc541b183062ae3d905 Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 28 Jul 2010 14:17:26 +0200 Subject: writerfilter08ooo330: applied patch for writerfilter08 --- sfx2/source/doc/sfxbasemodel.cxx | 6 ++++++ sfx2/source/view/frame2.cxx | 5 +---- sfx2/source/view/viewfrm.cxx | 2 ++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index b5a9536b12c5..7ef9fe0d2f19 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -977,6 +977,8 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString& aArgs.remove( "BreakMacroSignature" ); aArgs.remove( "Stream" ); aArgs.remove( "InputStream" ); + aArgs.remove( "URL" ); + aArgs.remove( "Frame" ); // TODO/LATER: all the parameters that are accepted by ItemSet of the DocShell must be removed here @@ -988,6 +990,10 @@ sal_Bool SAL_CALL SfxBaseModel::attachResource( const ::rtl::OUString& SfxAllItemSet aSet( pObjectShell->GetPool() ); TransformParameters( SID_OPENDOC, rArgs, aSet ); + // the arguments are not allowed to reach the medium + aSet.ClearItem( SID_FILE_NAME ); + aSet.ClearItem( SID_FILLFRAME ); + pMedium->GetItemSet()->Put( aSet ); SFX_ITEMSET_ARG( &aSet, pItem, SfxStringItem, SID_FILTER_NAME, sal_False ); if ( pItem ) diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index d99ad8733e03..d43512ac791d 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -280,10 +280,7 @@ SfxFrame* SfxFrame::Create( SfxObjectShell& rDoc, Window& rWindow, USHORT nViewI aLoadArgs = aArgs.getPropertyValues(); // load the doc into that frame - ::rtl::OUString sLoaderURL( rDoc.GetModel()->getURL() ); - if ( sLoaderURL.getLength() == 0 ) - sLoaderURL = rDoc.GetFactory().GetFactoryURL(); - + ::rtl::OUString sLoaderURL( RTL_CONSTASCII_USTRINGPARAM( "private:object" ) ); Reference< XComponentLoader > xLoader( xFrame, UNO_QUERY_THROW ); xLoader->loadComponentFromURL( sLoaderURL, diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 035fd3f794de..feced28efb11 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2144,6 +2144,8 @@ SfxViewShell* SfxViewFrame::LoadViewIntoFrame_Impl( const SfxObjectShell& i_rDoc aTransformLoadArgs.remove( "Hidden" ); ::rtl::OUString sURL( RTL_CONSTASCII_USTRINGPARAM( "private:object" ) ); + if ( !sURL.getLength() ) + sURL = i_rDoc.GetFactory().GetFactoryURL(); Reference< XComponentLoader > xLoader( i_rFrame, UNO_QUERY_THROW ); xLoader->loadComponentFromURL( sURL, ::rtl::OUString::createFromAscii( "_self" ), 0, -- cgit v1.2.3 From 22ab8529b60edbedc4f4ca657172ccb23ecd528d Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 28 Jul 2010 14:17:26 +0200 Subject: writerfilter08ooo330: applied patch for writerfilter08 --- sw/source/filter/ww8/ww8par.cxx | 2 +- sw/source/filter/ww8/ww8par.hxx | 1 + sw/source/filter/ww8/ww8par6.cxx | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index ba932c33c479..24f36b047a4e 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1857,7 +1857,7 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect, bool wwSectionManager::SectionIsProtected(const wwSection &rSection) const { - return (!rSection.IsNotProtected()); + return (mrReader.pWwFib->fReadOnlyRecommended && !rSection.IsNotProtected()); } void wwSectionManager::SetHdFt(wwSection &rSection, int nSect, diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 025cf0f588f4..c87035f208a1 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1164,6 +1164,7 @@ private: bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&, rtl_TextEncoding&); bool SetNewFontAttr(USHORT nFCode, bool bSetEnums, USHORT nWhich); + USHORT CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich); void ResetCharSetVars(); void ResetCJKCharSetVars(); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 1588944e179b..b298f3721b00 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -3551,6 +3551,23 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily, return true; } +USHORT SwWW8ImplReader::CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich) +{ + USHORT nResult = 0; + + switch (nCharSet) { + case RTL_TEXTENCODING_MS_932: + nResult = RES_CHRATR_CJK_FONT; + break; + + default: + nResult = nWhich; + break; + } + + return nResult; +} + bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums, USHORT nWhich) { @@ -3600,6 +3617,8 @@ bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums, SvxFontItem aFont( eFamily, aName, aEmptyStr, ePitch, eDstCharSet, nWhich); + nWhich = CorrectResIdForCharset(eSrcCharSet, nWhich); + if( bSetEnums ) { if( pAktColl ) // StyleDef -- cgit v1.2.3 From 2638faa2e834c2da4c195224fd88d32c29b3d0cc Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 28 Jul 2010 14:17:26 +0200 Subject: writerfilter08ooo330: applied patch for writerfilter08 --- writerfilter/inc/dmapper/DomainMapper.hxx | 2 - writerfilter/inc/resourcemodel/Protocol.hxx | 4 + .../inc/resourcemodel/ResourceModelHelper.hxx | 40 + writerfilter/inc/resourcemodel/TagLogger.hxx | 13 + writerfilter/inc/resourcemodel/util.hxx | 2 + writerfilter/qa/complex/ooxml/LoadDocuments.java | 51 + writerfilter/qa/complex/ooxml/makefile.mk | 90 + writerfilter/source/dmapper/DomainMapper.cxx | 218 +- .../source/dmapper/DomainMapperTableManager.cxx | 38 +- writerfilter/source/dmapper/DomainMapper_Impl.cxx | 1395 +-- writerfilter/source/dmapper/DomainMapper_Impl.hxx | 41 +- writerfilter/source/dmapper/FFData.xml | 58 + writerfilter/source/dmapper/FFDataHandler.cxx | 483 + writerfilter/source/dmapper/FFDataHandler.hxx | 161 + writerfilter/source/dmapper/FieldTypes.hxx | 299 + writerfilter/source/dmapper/FormControlHelper.cxx | 309 + writerfilter/source/dmapper/FormControlHelper.hxx | 64 + writerfilter/source/dmapper/PropertyIds.cxx | 2 + writerfilter/source/dmapper/PropertyIds.hxx | 2 + writerfilter/source/dmapper/PropertyMap.cxx | 32 +- writerfilter/source/dmapper/PropertyMap.hxx | 2 + writerfilter/source/dmapper/PropertyMapHelper.cxx | 4 +- writerfilter/source/dmapper/PropertyMapHelper.hxx | 2 + writerfilter/source/dmapper/SettingsTable.cxx | 57 +- writerfilter/source/dmapper/StyleSheetTable.cxx | 69 +- writerfilter/source/dmapper/ThemeTable.cxx | 35 +- writerfilter/source/dmapper/dmapperLoggers.hxx | 2 + writerfilter/source/dmapper/genclass.xsl | 707 ++ writerfilter/source/dmapper/makefile.mk | 2 + writerfilter/source/doctok/WW8DocumentImpl.cxx | 51 +- writerfilter/source/doctok/WW8DocumentImpl.hxx | 15 + writerfilter/source/doctok/WW8FontTable.cxx | 5 - writerfilter/source/doctok/WW8LFOTable.cxx | 7 - writerfilter/source/doctok/WW8ListTable.cxx | 5 - .../source/doctok/WW8ResourceModelImpl.cxx | 1 - writerfilter/source/doctok/WW8StreamImpl.cxx | 4 +- writerfilter/source/doctok/WW8StructBase.cxx | 1 - writerfilter/source/doctok/WW8StyleSheet.cxx | 5 - writerfilter/source/doctok/doctokLoggers.hxx | 4 +- writerfilter/source/doctok/doctokutil.cxx | 53 - writerfilter/source/doctok/dopbase.xml | 91 + writerfilter/source/doctok/makefile.mk | 1 - writerfilter/source/doctok/resources.xmi | 10730 +++++++++++++------ writerfilter/source/doctok/resources.xsl | 21 +- writerfilter/source/doctok/util.hxx | 57 - writerfilter/source/doctok/xmigen.xsl | 72 +- writerfilter/source/filter/ImportFilter.cxx | 19 +- writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 4 + writerfilter/source/ooxml/OOXMLFactory.cxx | 8 +- .../source/ooxml/OOXMLFastContextHandler.cxx | 160 +- .../source/ooxml/OOXMLFastContextHandler.hxx | 45 +- .../source/ooxml/OOXMLFastDocumentHandler.cxx | 7 - .../source/ooxml/OOXMLFastDocumentHandler.hxx | 2 - writerfilter/source/ooxml/OOXMLFastHelper.hxx | 7 - writerfilter/source/ooxml/OOXMLParserState.cxx | 70 +- writerfilter/source/ooxml/OOXMLParserState.hxx | 18 +- writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx | 22 - writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx | 9 - writerfilter/source/ooxml/OOXMLStreamImpl.cxx | 16 - writerfilter/source/ooxml/OOXMLStreamImpl.hxx | 4 - writerfilter/source/ooxml/attrsprm.xsl | 142 + writerfilter/source/ooxml/dummyannotate.xsl | 2 +- writerfilter/source/ooxml/factoryimpl_ns.xsl | 99 +- .../fastresourcesimpl_dml-shapeProperties.xsl | 93 - writerfilter/source/ooxml/model.xml | 71 +- writerfilter/source/ooxml/ooxmlLoggers.hxx | 3 + writerfilter/source/ooxml/status.sh | 6 +- writerfilter/source/resourcemodel/Protocol.cxx | 2 + .../source/resourcemodel/ResourceModelHelper.cxx | 48 + writerfilter/source/resourcemodel/TagLogger.cxx | 125 +- writerfilter/source/resourcemodel/makefile.mk | 1 + .../source/resourcemodel/resourcemodel.cxx | 6 - .../source/resourcemodel/resourcemodel.hxx | 2 - writerfilter/source/resourcemodel/util.cxx | 95 +- 74 files changed, 11871 insertions(+), 4522 deletions(-) create mode 100644 writerfilter/inc/resourcemodel/ResourceModelHelper.hxx create mode 100644 writerfilter/qa/complex/ooxml/LoadDocuments.java create mode 100644 writerfilter/qa/complex/ooxml/makefile.mk mode change 100644 => 100755 writerfilter/source/dmapper/DomainMapper.cxx mode change 100644 => 100755 writerfilter/source/dmapper/DomainMapper_Impl.hxx create mode 100644 writerfilter/source/dmapper/FFData.xml create mode 100644 writerfilter/source/dmapper/FFDataHandler.cxx create mode 100644 writerfilter/source/dmapper/FFDataHandler.hxx create mode 100644 writerfilter/source/dmapper/FieldTypes.hxx create mode 100644 writerfilter/source/dmapper/FormControlHelper.cxx create mode 100644 writerfilter/source/dmapper/FormControlHelper.hxx mode change 100644 => 100755 writerfilter/source/dmapper/SettingsTable.cxx create mode 100644 writerfilter/source/dmapper/genclass.xsl mode change 100644 => 100755 writerfilter/source/dmapper/makefile.mk delete mode 100644 writerfilter/source/doctok/doctokutil.cxx create mode 100644 writerfilter/source/doctok/dopbase.xml delete mode 100644 writerfilter/source/doctok/util.hxx create mode 100644 writerfilter/source/ooxml/attrsprm.xsl delete mode 100644 writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl create mode 100644 writerfilter/source/resourcemodel/ResourceModelHelper.cxx diff --git a/writerfilter/inc/dmapper/DomainMapper.hxx b/writerfilter/inc/dmapper/DomainMapper.hxx index d119e0e84312..99602ceab924 100644 --- a/writerfilter/inc/dmapper/DomainMapper.hxx +++ b/writerfilter/inc/dmapper/DomainMapper.hxx @@ -145,8 +145,6 @@ private: rtl::OUString getBracketStringFromEnum(const sal_Int32 nIntValue, const bool bIsPrefix = true); com::sun::star::style::TabAlign getTabAlignFromValue(const sal_Int32 nIntValue); sal_Unicode getFillCharFromValue(const sal_Int32 nIntValue); - void resolveAttributeProperties(Value & val); - void resolveSprmProps(Sprm & sprm_); sal_Int32 mnBackgroundColor; bool mbIsHighlightSet; }; diff --git a/writerfilter/inc/resourcemodel/Protocol.hxx b/writerfilter/inc/resourcemodel/Protocol.hxx index d0405861f695..2f4c9f6261ba 100644 --- a/writerfilter/inc/resourcemodel/Protocol.hxx +++ b/writerfilter/inc/resourcemodel/Protocol.hxx @@ -30,6 +30,8 @@ #ifndef INCLUDE_WRITERFILTER_PROTOCOL_HXX #define INCLUDE_WRITERFILTER_PROTOCOL_HXX +#ifdef DEBUG + #include #include "WW8ResourceModel.hxx" #include "TagLogger.hxx" @@ -95,4 +97,6 @@ public: }; } + +#endif // DEBUG #endif // INCLUDE_WRITERFILTER_PROTOCOL_HXX diff --git a/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx new file mode 100644 index 000000000000..c1c500545055 --- /dev/null +++ b/writerfilter/inc/resourcemodel/ResourceModelHelper.hxx @@ -0,0 +1,40 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef INCLUDED_RESOURCE_MODEL_HELPER_HXX +#define INCLUDED_RESOURCE_MODEL_HELPER_HXX + +#include + +namespace writerfilter { +namespace resourcemodel { + +void WRITERFILTER_DLLPUBLIC resolveSprmProps(Properties & rHandler, Sprm & rSprm); +void WRITERFILTER_DLLPUBLIC resolveAttributeProperties(Properties & rHandler, Value & rValue); + +}} + +#endif // INCLUDED_RESOURCE_MODEL_HELPER_HXX diff --git a/writerfilter/inc/resourcemodel/TagLogger.hxx b/writerfilter/inc/resourcemodel/TagLogger.hxx index cf58dc3be8c3..055656832761 100644 --- a/writerfilter/inc/resourcemodel/TagLogger.hxx +++ b/writerfilter/inc/resourcemodel/TagLogger.hxx @@ -28,7 +28,10 @@ #ifndef INCLUDED_TAG_LOGGER_HXX #define INCLUDED_TAG_LOGGER_HXX +#ifdef DEBUG + #include +#include #include #include #include @@ -76,8 +79,10 @@ namespace writerfilter void addAttr(string name, string value); void addAttr(string name, const ::rtl::OUString & value); void addAttr(string name, sal_uInt32 nValue); + void addAttr(string name, uno::Any rAny); void addTag(Pointer_t pTag); void chars(const string & rChars); + void chars(const ::rtl::OUString & rChars); const string & getTag() const; string toString() const; @@ -93,6 +98,7 @@ namespace writerfilter stack mTags; XMLTag::Pointer_t currentTag() const; XMLTag::Pointer_t mpRoot; + string mFileName; TagLogger(); @@ -101,12 +107,15 @@ namespace writerfilter static Pointer_t getInstance(const char * name); + void setFileName(const string & rName); + void startDocument(); void element(const string & name); void startElement(const string & name); void attribute(const string & name, const string & value); void attribute(const string & name, const ::rtl::OUString & value); void attribute(const string & name, sal_uInt32 value); + void attribute(const string & name, const uno::Any aAny); void addTag(XMLTag::Pointer_t pTag); void chars(const string & chars); void chars(const ::rtl::OUString & chars); @@ -142,5 +151,9 @@ namespace writerfilter virtual void attribute(Id name, Value & val); virtual void sprm(Sprm & sprm); }; + +WRITERFILTER_DLLPUBLIC XMLTag::Pointer_t unoPropertySetToTag(uno::Reference rPropSet); } + +#endif // DEBUG #endif // INCLUDED_TAG_LOGGER_HXX diff --git a/writerfilter/inc/resourcemodel/util.hxx b/writerfilter/inc/resourcemodel/util.hxx index 360dfc3d4113..0a700513576a 100644 --- a/writerfilter/inc/resourcemodel/util.hxx +++ b/writerfilter/inc/resourcemodel/util.hxx @@ -39,10 +39,12 @@ namespace writerfilter string WRITERFILTER_DLLPUBLIC xmlify(const string & str); +#ifdef DEBUG string WRITERFILTER_DLLPUBLIC propertysetToString (uno::Reference const & rProps); string toString(uno::Reference< text::XTextRange > textRange); string toString(const string & rString); +#endif } #endif // INCLUDED_RESOURCEMODEL_UTIL_HXX diff --git a/writerfilter/qa/complex/ooxml/LoadDocuments.java b/writerfilter/qa/complex/ooxml/LoadDocuments.java new file mode 100644 index 000000000000..6f05391b6d21 --- /dev/null +++ b/writerfilter/qa/complex/ooxml/LoadDocuments.java @@ -0,0 +1,51 @@ + +package complex.ooxml; +import com.sun.star.lang.XMultiServiceFactory; +import complexlib.ComplexTestCase; +import java.io.File; +import com.sun.star.text.XTextDocument; + +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author hb137859 + */ +public class LoadDocuments extends ComplexTestCase { + private XMultiServiceFactory m_xMSF; + + @Override + public String[] getTestMethodNames() { + return new String [] { + "test1" + }; + } + + public void before() throws Exception { + m_xMSF = (XMultiServiceFactory) param.getMSF(); + } + + public void test1() { + String testDocumentsPath = util.utils.getFullTestDocName(""); + log.println("Test documents in:" + testDocumentsPath); + + File dir = new File(testDocumentsPath); + String [] files = dir.list(); + + if (files != null) { + for (int i = 0; i < files.length; ++i) { + log.println(files[i]); + String url = util.utils.getFullTestURL(files[i]); + log.println(url); + + XTextDocument xDoc = util.WriterTools.loadTextDoc(m_xMSF, url); + util.DesktopTools.closeDoc(xDoc); + } + } else { + failed(); + } + } +} diff --git a/writerfilter/qa/complex/ooxml/makefile.mk b/writerfilter/qa/complex/ooxml/makefile.mk new file mode 100644 index 000000000000..b57a0f5279f5 --- /dev/null +++ b/writerfilter/qa/complex/ooxml/makefile.mk @@ -0,0 +1,90 @@ +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2008 by Sun Microsystems, Inc. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# $RCSfile: makefile.mk,v $ +# +# $Revision: 1.5.198.1 $ +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org 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 version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ = ..$/..$/.. +TARGET = PropertyValues +PRJNAME = $(TARGET) +PACKAGE = complex$/ooxml + +# --- Settings ----------------------------------------------------- +.INCLUDE: settings.mk + + +#----- compile .java files ----------------------------------------- + +JARFILES = mysql.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar +JAVAFILES = LoadDocuments.java +JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) + +#----- make a jar from compiled files ------------------------------ + +MAXLINELENGTH = 100000 + +JARCLASSDIRS = $(PACKAGE) +JARTARGET = $(TARGET).jar +JARCOMPRESS = TRUE + +# --- Parameters for the test -------------------------------------- + +# start an office if the parameter is set for the makefile +.IF "$(OFFICE)" == "" +CT_APPEXECCOMMAND = +.ELSE +CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;" +.ENDIF + +# test base is java complex +CT_TESTBASE = -TestBase java_complex + +# build package name with "." instead of $/ +CT_PACKAGE = -o $(PACKAGE:s\$/\.\) + +# start the runner application +CT_APP = org.openoffice.Runner + +# --- Targets ------------------------------------------------------ + +.IF "$(depend)" == "" +ALL: ALLTAR +.ELSE +ALL: ALLDEP +.ENDIF + +.INCLUDE : target.mk + +run: \ + LoadDocuments + +RUN: run + +LoadDocuments: + +java -cp $(CLASSPATH) $(CT_APP) $(CT_APPEXECCOMMAND) $(CT_TESTBASE) -tdoc $(PWD)$/testdocuments $(CT_PACKAGE).LoadDocuments + diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx old mode 100644 new mode 100755 index 64af3a953eef..65dfb4c5fcec --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -27,6 +27,7 @@ #include "PageBordersHandler.hxx" #include +#include #include #include #include @@ -69,6 +70,7 @@ #include #include #include +#include #include #include #include @@ -98,6 +100,10 @@ using namespace ::com::sun::star; using namespace ::rtl; namespace writerfilter { + +using resourcemodel::resolveSprmProps; +using resourcemodel::resolveAttributeProperties; + namespace dmapper{ #ifdef DEBUG_DOMAINMAPPER @@ -198,6 +204,9 @@ void DomainMapper::attribute(Id nName, Value & val) static ::rtl::OUString sLocalBookmarkName; sal_Int32 nIntValue = val.getInt(); rtl::OUString sStringValue = val.getString(); + + SectionPropertyMap * pSectionContext = m_pImpl->GetSectionContext(); + // printf ( "DomainMapper::attribute(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)nName, (unsigned int)nIntValue, ::rtl::OUStringToOString(sStringValue, RTL_TEXTENCODING_DONTKNOW).getStr()); if( nName >= NS_rtf::LN_WIDENT && nName <= NS_rtf::LN_LCBSTTBFUSSR ) m_pImpl->GetFIB().SetData( nName, nIntValue ); @@ -1459,7 +1468,7 @@ void DomainMapper::attribute(Id nName, Value & val) case NS_rtf::LN_sed: /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ //section properties - resolveAttributeProperties(val); + resolveAttributeProperties(*this, val); break; case NS_rtf::LN_tbdAdd: /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ @@ -2133,6 +2142,36 @@ void DomainMapper::attribute(Id nName, Value & val) case NS_ooxml::LN_endtrackchange: m_pImpl->RemoveCurrentRedline( ); break; + case NS_ooxml::LN_CT_DocGrid_linePitch: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + { + //see SwWW8ImplReader::SetDocumentGrid + OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); + if(pSectionContext) + { + pSectionContext->SetGridLinePitch( ConversionHelper::convertTwipToMM100( nIntValue ) ); + } + } + break; + case NS_ooxml::LN_CT_DocGrid_charSpace: + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ + { + OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); + if(pSectionContext) + { + pSectionContext->SetDxtCharSpace( nIntValue ); + } + } + break; + case NS_ooxml::LN_CT_DocGrid_type: + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ + { + if (pSectionContext != NULL) + { + pSectionContext->SetGridType(nIntValue); + } + } + break; default: { #if OSL_DEBUG_LEVEL > 0 @@ -2167,7 +2206,7 @@ void DomainMapper::sprm(Sprm & rSprm) void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmType ) { #ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("sprm"); + dmapper_logger->startElement("DomainMapper.sprm"); dmapper_logger->chars(rSprm.toString()); #endif OSL_ENSURE(rContext.get(), "PropertyMap has to be valid!"); @@ -2176,14 +2215,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp sal_uInt32 nSprmId = rSprm.getId(); //needed for page properties - SectionPropertyMap* pSectionContext = 0; - //the section context is not availabe before the first call of startSectionGroup() - if( !m_pImpl->IsAnyTableImport() ) - { - PropertyMapPtr pContext = m_pImpl->GetTopContextOfType(CONTEXT_SECTION); - OSL_ENSURE(pContext.get(), "Section context is not in the stack!"); - pSectionContext = dynamic_cast< SectionPropertyMap* >( pContext.get() ); - } + SectionPropertyMap * pSectionContext = m_pImpl->GetSectionContext(); //TODO: In rtl-paragraphs the meaning of left/right are to be exchanged bool bExchangeLeftRight = false; @@ -2221,8 +2253,9 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; // sprmPFSideBySide case NS_sprm::LN_PFKeep: // sprmPFKeep - /* WRITERFILTERSTATUS: done: 0, planned: 3, spent: 0 */ + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ /* WRITERFILTERSTATUS: comment: */ + rContext->Insert(PROP_PARA_SPLIT, true, uno::makeAny(nIntValue ? false : true)); break; case NS_sprm::LN_PFKeepFollow: // sprmPFKeepFollow /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 1 */ @@ -2297,7 +2330,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp } //create a new tab stop property - this is done with the contained properties - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); //add this property rContext->Insert(PROP_PARA_TAB_STOPS, true, uno::makeAny( m_pImpl->GetCurrentTabStopAndClear())); } @@ -2430,7 +2463,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp case NS_ooxml::LN_CT_PrBase_pBdr: //paragraph border /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); break; /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ case NS_sprm::LN_PBrcTop: // sprmPBrcTop @@ -2584,7 +2617,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; // sprmPFLocked case NS_sprm::LN_PFWidowControl: case NS_ooxml::LN_CT_PPrBase_widowControl: - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { uno::Any aVal( uno::makeAny( sal_Int8(nIntValue ? 2 : 0 ))); rContext->Insert( PROP_PARA_WIDOWS, true, aVal ); @@ -2641,8 +2674,16 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp } break; // sprmPOutLvl case NS_sprm::LN_PFBiDi: - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ + rContext->Insert(PROP_WRITING_MODE, false, uno::makeAny( text::WritingMode2::RL_TB )); + rContext->Insert(PROP_PARA_ADJUST, false, uno::makeAny( style::ParagraphAdjust_RIGHT )); + break; // sprmPFBiDi + case NS_ooxml::LN_EG_SectPrContents_bidi: + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ + if (pSectionContext != NULL) + pSectionContext->Insert(PROP_WRITING_MODE,false, uno::makeAny( text::WritingMode2::RL_TB)); + break; case NS_sprm::LN_PFNumRMIns: /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmPFNumRMIns @@ -2692,7 +2733,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; // sprmCChs case NS_sprm::LN_CSymbol: // sprmCSymbol /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ - resolveSprmProps(rSprm); //resolves LN_FONT and LN_CHAR + resolveSprmProps(*this, rSprm); //resolves LN_FONT and LN_CHAR break; case NS_sprm::LN_CFOle2: /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ @@ -2701,7 +2742,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmCIdCharType case NS_sprm::LN_CHighlight: - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { sal_Int32 nColor = 0; if(true ==( mbIsHighlightSet = getColorFromIndex(nIntValue, nColor))) @@ -2729,7 +2770,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmCPlain case NS_sprm::LN_CKcd: - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ rContext->Insert(PROP_CHAR_EMPHASIS, true, uno::makeAny ( getEmphasisValue (nIntValue))); break; // sprmCKcd case NS_sprm::LN_CFEmboss:// sprmCFEmboss @@ -2843,6 +2884,13 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: */ { uno::Any aBold( uno::makeAny( nIntValue ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL ) ); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("charWeight"); + dmapper_logger->attribute("weight", nIntValue ? awt::FontWeight::BOLD : awt::FontWeight::NORMAL); + dmapper_logger->endElement("charWeight"); +#endif + rContext->Insert(ePropertyId, true, aBold ); if( nSprmId != NS_sprm::LN_CFBoldBi ) // sprmCFBoldBi rContext->Insert(PROP_CHAR_WEIGHT_ASIAN, true, aBold ); @@ -3079,7 +3127,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmCPropRMark case NS_sprm::LN_CSfxText: - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ // The file-format has many character animations. We have only // one, so we use it always. Suboptimal solution though. if (nIntValue) @@ -3109,7 +3157,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; // sprmCBrc case NS_sprm::LN_CShd: - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ break; // sprmCShd case NS_sprm::LN_CIdslRMarkDel: /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ @@ -3515,7 +3563,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; case NS_sprm::LN_SDxtCharSpace: { - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); if(pSectionContext) { @@ -3525,7 +3573,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; // sprmSDxtCharSpace case NS_sprm::LN_SDyaLinePitch: // sprmSDyaLinePitch { - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ //see SwWW8ImplReader::SetDocumentGrid OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); if(pSectionContext) @@ -3570,8 +3618,9 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp } break; // sprmSClm case NS_sprm::LN_STextFlow: - { + case NS_ooxml::LN_EG_SectPrContents_textDirection: /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ + { /* 0 HoriLR 1 Vert TR 2 Vert TR 3 Vert TT 4 HoriLT only 0 and 1 can be imported correctly */ @@ -3589,7 +3638,16 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break; default:; } - rContext->Insert(PROP_WRITING_MODE, false, uno::makeAny( nDirection ) ); + + PropertyMap * pTargetContext = rContext.get(); + + if (pSectionContext != NULL && + nSprmId == NS_ooxml::LN_EG_SectPrContents_textDirection) + { + pTargetContext = pSectionContext; + } + + pTargetContext->Insert(PROP_WRITING_MODE, false, uno::makeAny( nDirection ) ); } break; // sprmSTextFlow case NS_sprm::LN_TJc: // sprmTJc @@ -3718,11 +3776,11 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp break;//undocumented section properties case NS_sprm::LN_CEastAsianLayout: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); break; case NS_ooxml::LN_CT_Tabs_tab: /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); m_pImpl->IncorporateTabStop(m_pImpl->m_aCurrentTabStop); m_pImpl->m_aCurrentTabStop = DeletableTabStop(); break; @@ -3739,58 +3797,58 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp m_pImpl->InitTabStopFromStyle( aStyleTabStops ); } } - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); rContext->Insert(PROP_PARA_TAB_STOPS, true, uno::makeAny( m_pImpl->GetCurrentTabStopAndClear())); } break; case NS_ooxml::LN_CT_PPr_sectPr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_RPrBase_color: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_RPrBase_rFonts: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_RPrBase_bdr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_RPrBase_eastAsianLayout: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_RPrBase_u: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_RPrBase_lang: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_PPrBase_spacing: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_PPrBase_ind: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_RPrDefault_rPr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_PPrDefault_pPr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_DocDefaults_pPrDefault: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_DocDefaults_rPrDefault: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_Style_pPr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_Style_rPr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_PPr_rPr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_PPrBase_numPr: - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ - resolveSprmProps(rSprm); + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ + resolveSprmProps(*this, rSprm); break; case NS_ooxml::LN_EG_SectPrContents_footnotePr: - /* WRITERFILTERSTATUS: done: 1ß0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_EG_SectPrContents_endnotePr: /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ m_pImpl->SetInFootnoteProperties( NS_ooxml::LN_EG_SectPrContents_footnotePr == nSprmId ); - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); break; case NS_ooxml::LN_EG_SectPrContents_lnNumType: /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ { - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); LineNumberSettings aSettings = m_pImpl->GetLineNumberSettings(); aSettings.bIsOn = true; m_pImpl->SetLineNumberSettings( aSettings ); @@ -3827,7 +3885,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp { //TODO: What about style sheet import of frame properties } - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); } break; case NS_ooxml::LN_EG_SectPrContents_pgSz: @@ -3839,7 +3897,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp CT_PageSz.h = aLetter.getHeight(); } CT_PageSz.orient = false; - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); if(pSectionContext) { @@ -3853,7 +3911,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp case NS_ooxml::LN_EG_SectPrContents_pgMar: /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ m_pImpl->InitPageMargins(); - resolveSprmProps(rSprm); + resolveSprmProps(*this, rSprm); OSL_ENSURE(pSectionContext, "SectionContext unavailable!"); if(pSectionContext) { @@ -3908,6 +3966,9 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp } } break; + case NS_ooxml::LN_EG_SectPrContents_docGrid: + resolveSprmProps(*this, rSprm); + break; case NS_ooxml::LN_EG_SectPrContents_pgBorders: { writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); @@ -3960,7 +4021,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp case NS_ooxml::LN_CT_TblPrBase_tblCellMar: //cell margins /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { - resolveSprmProps(rSprm);//contains LN_CT_TblCellMar_top, LN_CT_TblCellMar_left, LN_CT_TblCellMar_bottom, LN_CT_TblCellMar_right + resolveSprmProps(*this, rSprm);//contains LN_CT_TblCellMar_top, LN_CT_TblCellMar_left, LN_CT_TblCellMar_bottom, LN_CT_TblCellMar_right } break; case NS_ooxml::LN_CT_TblCellMar_top: @@ -4003,7 +4064,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp } break; case NS_sprm::LN_CFNoProof: //0x875 no grammar and spell checking, unsupported - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ break; case NS_ooxml::LN_anchor_anchor: // at_character drawing /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ @@ -4104,7 +4165,7 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp /* WRITERFILTERSTATUS: done: 100, planned: 5, spent: 0 */ { m_pImpl->AddNewRedline( ); - resolveSprmProps( rSprm ); + resolveSprmProps(*this, rSprm ); // now the properties author, date and id should be available sal_Int32 nToken = m_pImpl->GetCurrentRedlineToken(); switch( nToken & 0xffff ) @@ -4160,7 +4221,21 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp //TODO: determines whether top/bottom paragraph spacing is added if equal styles are following - unsupported break; case NS_ooxml::LN_EG_SectPrContents_formProt: //section protection, only form editing is enabled - unsupported - /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ + case NS_ooxml::LN_EG_SectPrContents_vAlign: + case NS_ooxml::LN_EG_RPrBase_fitText: + /* WRITERFILTERSTATUS: done: 0, planned: 0, spent: 0 */ + break; + case NS_ooxml::LN_ffdata: + { + writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); + if (pProperties.get() != NULL) + { + FFDataHandler::Pointer_t pFFDataHandler(new FFDataHandler()); + + pProperties->resolve(*pFFDataHandler); + m_pImpl->SetFieldFFData(pFFDataHandler); + } + } break; default: { @@ -4173,7 +4248,8 @@ void DomainMapper::sprm( Sprm& rSprm, PropertyMapPtr rContext, SprmType eSprmTyp } #ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("sprm"); + dmapper_logger->addTag(rContext->toTag()); + dmapper_logger->endElement("DomainMapper.sprm"); #endif } /*-- 09.06.2006 09:52:13--------------------------------------------------- @@ -4183,13 +4259,13 @@ void DomainMapper::entry(int /*pos*/, writerfilter::Reference::Pointer_t ref) { #ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("entry"); + dmapper_logger->startElement("DomainMapper.entry"); #endif ref->resolve(*this); #ifdef DEBUG_DOMAINMAPPER - dmapper_logger->endElement("entry"); + dmapper_logger->endElement("DomainMapper.entry"); #endif } /*-- 09.06.2006 09:52:13--------------------------------------------------- @@ -4357,6 +4433,12 @@ void DomainMapper::text(const sal_uInt8 * data_, size_t len) { //TODO: Determine the right text encoding (FIB?) ::rtl::OUString sText( (const sal_Char*) data_, len, RTL_TEXTENCODING_MS_1252 ); +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("text"); + dmapper_logger->chars(sText); + dmapper_logger->endElement("text"); +#endif + try { if(len == 1) @@ -4423,11 +4505,6 @@ void DomainMapper::text(const sal_uInt8 * data_, size_t len) pContext.reset(new PropertyMap()); m_pImpl->appendTextPortion( sText, pContext ); -#ifdef DEBUG_DOMAINMAPPER - dmapper_logger->startElement("text"); - dmapper_logger->chars(sText); - dmapper_logger->endElement("text"); -#endif } } catch( const uno::RuntimeException& ) @@ -4819,21 +4896,6 @@ rtl::OUString DomainMapper::getBracketStringFromEnum(const sal_Int32 nIntValue, } } -void DomainMapper::resolveSprmProps(Sprm & rSprm) -{ - writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); - if( pProperties.get()) - pProperties->resolve(*this); -} - -void DomainMapper::resolveAttributeProperties(Value & val) -{ - writerfilter::Reference::Pointer_t pProperties = val.getProperties(); - if( pProperties.get()) - pProperties->resolve(*this); -} - - com::sun::star::style::TabAlign DomainMapper::getTabAlignFromValue(const sal_Int32 nIntValue) { switch (nIntValue) diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 452391fe6300..8783421faaaf 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -99,14 +99,14 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) sal_Int32 nIntValue = ((pValue.get() != NULL) ? pValue->getInt() : 0); switch ( nSprmId ) { - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case 0xf661: //sprmTTRLeft left table indent - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ case 0xf614: // sprmTTPreferredWidth - preferred table width - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TblPrBase_tblW: //90722; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TblPrBase_tblInd: //90725 + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { //contains unit and value writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); @@ -132,9 +132,9 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) } } break; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case 0x3404:// sprmTTableHeader case NS_ooxml::LN_CT_TrPrBase_tblHeader: //90704 + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ // if nIntValue == 1 then the row is a repeated header line // to prevent later rows from increasing the repeating m_nHeaderRepeat is set to NULL when repeating stops if( nIntValue > 0 && m_nHeaderRepeat >= 0 ) @@ -147,8 +147,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) else m_nHeaderRepeat = -1; break; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case 0xd608: // TDefTable + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); if( pProperties.get()) @@ -178,8 +178,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) } } break; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case 0xD605: // sprmTTableBorders + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); if( pProperties.get()) @@ -193,14 +193,14 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) } } break; - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ case 0xd632 : //sprmTNewSpacing - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ + /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ case 0xd634 : //sprmTNewSpacing + /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ //TODO: sprms contain default (TNew) and actual border spacing of cells - not resolvable yet break; - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ case 0xd613: //sprmTGridLineProps + /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ // TODO: needs a handler /*contains: GridLineProps"> @@ -216,8 +216,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) */ break; - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ case 0x740a : //sprmTTlp + /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ //TODO: Table look specifier break; case 0x6816 : //unknown @@ -227,10 +227,11 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) case 0x7479 : //unknown case 0xf617 : //unknown case 0xf618 : //unknown + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ bRet = false; break; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TblPrBase_tblStyle: //table style name + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { m_sTableStyleName = pValue->getString(); TablePropertyMapPtr pPropMap( new TablePropertyMap ); @@ -238,14 +239,14 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) insertTableProps(pPropMap); } break; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TblGridBase_gridCol: + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { getCurrentGrid()->push_back( ConversionHelper::convertTwipToMM100( nIntValue ) ); } break; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TcPrBase_vMerge : //vertical merge + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { // values can be: LN_Value_ST_Merge_restart, LN_Value_ST_Merge_continue, in reality the second one is a 0 TablePropertyMapPtr pMergeProps( new TablePropertyMap ); @@ -253,8 +254,8 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) cellProps( pMergeProps); } break; - /* WRITERFILTERSTATUS: done: 1, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TcPrBase_gridSpan: //number of grid positions spanned by this cell + /* WRITERFILTERSTATUS: done: 100, planned: 2, spent: 0 */ { #if DEBUG_DOMAINMAPPER dmapper_logger->startElement("tablemanager.GridSpan"); @@ -264,13 +265,14 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) m_nGridSpan = nIntValue; } break; - /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ case NS_ooxml::LN_CT_TblPrBase_tblLook: + /* WRITERFILTERSTATUS: done: 0, planned: 2, spent: 0 */ break; //todo: table look specifier - /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ case NS_ooxml::LN_CT_TcPrBase_tcW: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ break; //fixed column width is not supported case NS_ooxml::LN_CT_TrPrBase_cnfStyle: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { TablePropertyMapPtr pProps( new TablePropertyMap ); pProps->Insert( PROP_CNF_STYLE, true, uno::makeAny( pValue->getString( ) ) ); @@ -278,9 +280,11 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) } break; case NS_ooxml::LN_CT_PPrBase_cnfStyle: + /* WRITERFILTERSTATUS: done: 0, planned: 0.5, spent: 0 */ // TODO cnfStyle on a paragraph break; case NS_ooxml::LN_CT_TcPrBase_cnfStyle: + /* WRITERFILTERSTATUS: done: 100, planned: 0.5, spent: 0 */ { TablePropertyMapPtr pProps( new TablePropertyMap ); pProps->Insert( PROP_CNF_STYLE, true, uno::makeAny( pValue->getString( ) ) ); diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index c6d347a37281..4c176b59b4ef 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -69,6 +69,7 @@ #include #include #include +#include "FieldTypes.hxx" #include #ifdef DEBUG_DOMAINMAPPER @@ -89,269 +90,6 @@ using namespace ::com::sun::star; using namespace ::rtl; namespace writerfilter { namespace dmapper{ -/*-- 08.09.2006 09:39:50--------------------------------------------------- - - -----------------------------------------------------------------------*/ -//defaultswitch { Upper FirstCap Lower } -//Numberingswitch { Arabic, ALPHABETIC, ...} see lcl_ParseNumberingType -enum FieldId -{ - /* ADDRESSBLOCK \d \* MERGEFORMAT -> Addressblock completely unsupported*/ - FIELD_ADDRESSBLOCK - /* ADVANCE \d downvalue \l leftvalue \r rightvalue \u upvalue \x xvalue \y yvalue -> unsupported*/ - ,FIELD_ADVANCE - /* ASK bookmarkname "hint" \d defaultanswer \o \* MERGEFORMAT -> - the hint is not always quoted, inputfield with default answer, prompt before merge (\o) - */ - ,FIELD_ASK - /* AUTONUM \* Numberingswitch -> - mapped to sequence field "AutoNr" - */ - ,FIELD_AUTONUM - /* AUTONUMLGL \* Numberingswitch -> - mapped to sequence field "AutoNr" - */ - ,FIELD_AUTONUMLGL - /* AUTONUMOUT \* Numberingswitch -> - mapped to sequence field "AutoNr" - */ - ,FIELD_AUTONUMOUT - /* AUTHOR NewAuthor \* defaultswitch \* MERGEFORMAT -> - mapped to sequence field "AutoNr" - */ - ,FIELD_AUTHOR - /* COMMENTS "comment" \* MERGEFORMAT -> - Docinfo-Comments - */ - ,FIELD_COMMENTS - /* CREATEDATE \h \* MERGEFORMAT -> - docinfo-created-date - */ - ,FIELD_CREATEDATE - /* DATE \@ "number format" \s \* MERGEFORMAT -> - ww8filterimprovement: multiple languages now supported - */ - ,FIELD_DATE - /* DOCPROPERTY propertyname \* MERGEFORMAT -> - ww8filterimprovement: some fields imported as functionally equivalent fields if possible, - the others imported as UserField - */ - ,FIELD_DOCPROPERTY - /* DOCVARIABLE Name \* MERGEFORMAT -> - ww8filterimprovement: now imported as user fields - */ - ,FIELD_DOCVARIABLE - /* EDITTIME \# "displayformat" \* Numberingswitch \* MERGEFORMAT -> - DocInfo-Modified-Date - ww8filterimprovement: multiple languages now supported - */ - ,FIELD_EDITTIME - /* FILLIN "text to fill in" \d defaultanswer \o \* MERGEFORMAT -> - Function-InputField - */ - ,FIELD_FILLIN - /* FILENAME \p \* * MERGEFORMAT -> - file name (\p with path) - */ - ,FIELD_FILENAME - /* FILESIZE \* NumberingType \* MERGEFORMAT -> - not imported in old ww8 filter, see lcl_ParseNumberingType - todo find alternative field - */ - ,FIELD_FILESIZE - /* =formula \# "number format" - todo find alternative field - */ - ,FIELD_FORMULA - /* GOTOBUTTON text \* MERGEFORMAT -> - not imported in old ww8 filter - todo find alternative field - */ - ,FIELD_GOTOBUTTON - /* HYPERLINK "link" \* MERGEFORMAT -> - not imported in old ww8 filter - ww8filterimprovement: now imported as hyperlink - */ - ,FIELD_HYPERLINK - /* IF condition "then text" "else text" -> - not imported in old ww8 filter - ww8filterimprovement: now imported - todo: condition, if text, else text still missing - */ - ,FIELD_IF - /* INFO NameOfInfo \* MERGEFORMAT -> old - todo: filter imports wrong? - */ - ,FIELD_INFO - /* INCLUDEPICTURE path \* MERGEFORMAT-> - old filter imports an embedded picture - todo: not yet supported - */ - ,FIELD_INCLUDEPICTURE - /* KEYWORDS keyword \* defaultswitch \* Numberingswitch \* MERGEFORMAT -> - DocInfo Keywords - */ - ,FIELD_KEYWORDS - /* LASTSAVEDBY \* MERGEFORMAT -> - DocInfo-Modified-Author - */ - ,FIELD_LASTSAVEDBY - /* MACROBUTTON MacroName quick help text -> - Macro field - */ - ,FIELD_MACROBUTTON - /* MERGEFIELD ColumName \b prefix \f suffix \* MERGEFORMAT -> - ww8filterimprovement: column-only API now upporterd - */ - ,FIELD_MERGEFIELD - /* MERGEREC \* MERGEFORMAT -> - RecordNumber field, maybe without db name - todo: currently unchecked - */ - ,FIELD_MERGEREC - /* MERGESEQ \* MERGEFORMAT -> - not imported in old ww8 filter - ww8filterimprovement: now imported - todo: currently unchecked - */ - ,FIELD_MERGESEQ - /* NEXT text -> - Next record - todo: currently unchecked - */ - ,FIELD_NEXT - /* NEXTIF condition - todo: condition not imported - */ - ,FIELD_NEXTIF - /* PAGE \* Numberingswitch \* MERGEFORMAT -> - see lcl_ParseNumberingType - */ - ,FIELD_PAGE - /* REF targetbkm \f \* MERGEFORMAT -> - imports a ShowVariable (bookmarkname)? - \h hyerlink to paragraph - \p relative to para above/below - \f refenence number - \d separator number separator - \n paragraph number - \r paragraph number in relative context - \t suppres non delimiters - \w paragraph number in full context - \* Upper/Lower... - */ - ,FIELD_REF // - /* REVNUM \* Numberingswitch \* MERGEFORMAT -> - DocInfo-revision number - */ - ,FIELD_REVNUM - /* SAVEDATE \@ "NumberFormat"\* MERGEFORMAT -> - DocInfo-modified-date - */ - ,FIELD_SAVEDATE - /* SECTION \* NumberFormat \* MERGEFORMAT -> - not imported in old ww8 filter see lcl_ParseNumberingType - todo: find alternative - */ - ,FIELD_SECTION - /* SECTIONPAGES \* NumberFormat \* MERGEFORMAT -> - not imported in old ww8 filter see lcl_ParseNumberingType - todo: find alternative - */ - ,FIELD_SECTIONPAGES - /* SEQ sequencename \h \c \n \r \s \* MERGEFORMAT -> - number range name:sequencename value:sequencename+1 - todo: only partially implemented, switches unsupported - */ - ,FIELD_SEQ - /* SET bookmarkname newtext \* MERGEFORMAT -> - SetVariable bookmarkname = newtext - todo: not implemented yet - */ - ,FIELD_SET - /* SKIPIF condition \* MERGEFORMAT -> - ?? - todo: not implemented yet - */ - ,FIELD_SKIPIF - /* STYLEREF stylename \* MERGEFORMAT -> - not imported in old ww8 filter - todo: add an equivalent field type - */ - ,FIELD_STYLEREF - /* SUBJECT subject \* Defaultswitch \* MERGEFORMAT -> - DocInfo - subject - */ - ,FIELD_SUBJECT - /* SYMBOL symbolnumber \* MERGEFORMAT -> - inserts a special char (symbolnumber) - todo: find alternative - */ - ,FIELD_SYMBOL - /* TEMPLATE \* Defaultswitch \* MERGEFORMAT - TemplateName field - */ - ,FIELD_TEMPLATE - /* TIME \@ "number format" \* MERGEFORMAT - ww8filterimprovement: multiple languages now supported - */ - ,FIELD_TIME - /* TITLE \* Defaultswitch \* MERGEFORMAT -> - DocInfo-title - */ - ,FIELD_TITLE - /* USERINITIALS newinitials \* MERGEFORMAT -> - ExtendedUser field (SHORTCUT) - */ - ,FIELD_USERINITIALS - /* USERADDRESS \* MERGEFORMAT -> - not imported in old ww8 filter - todo: find alternative - */ - ,FIELD_USERADDRESS - /* USERNAME newusername \* MERGEFORMAT -> - not imported in old ww8 filter - todo: import as extended user field(s) - */ - ,FIELD_USERNAME - /* - TOC options: - \a Builds a table of figures but does not include the captions's label and number - \b Uses a bookmark to specify area of document from which to build table of contents - \c Builds a table of figures of the given label - \d Defines the separator between sequence and page numbers - \f Builds a table of contents using TC entries instead of outline levels - \h Hyperlinks the entries and page numbers within the table of contents - \l Defines the TC entries field level used to build a table of contents - \n Builds a table of contents or a range of entries, sucah as “1-9”, in a table of contents without page numbers - \o Builds a table of contents by using outline levels instead of TC entries - \p Defines the separator between the table entry and its page number - \s Builds a table of contents by using a sequence type - \t Builds a table of contents by using style names other than the standard outline styles - \u Builds a table of contents by using the applied paragraph outline level - \w Preserve tab characters within table entries - \x Preserve newline characters within table entries - \z Hides page numbers within the table of contens when shown in Web Layout View - */ - ,FIELD_TOC - /* - TOC entry: “text” - \f TC entry in doc with multiple tables - \l Outline Level - \n Suppress page numbers - example: TOC "EntryText \f \l 2 \n - */ - ,FIELD_TC - /* document statistic - number of characters - */ - ,FIELD_NUMCHARS - /* document statistic - number of words - */ - ,FIELD_NUMWORDS - /* document statistic - number of pages - */ - ,FIELD_NUMPAGES -}; struct FieldConversion { ::rtl::OUString sWordCommand; @@ -2543,6 +2281,10 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::FindOrCreateFieldMaster -----------------------------------------------------------------------*/ void DomainMapper_Impl::PushFieldContext() { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("pushFieldContext"); +#endif + uno::Reference< text::XTextAppend > xTextAppend = m_aTextAppendStack.top().xTextAppend; //insert a dummy char to make sure the start range doesn't move together with the to-be-appended text xTextAppend->appendTextPortion(::rtl::OUString( '-' ), uno::Sequence< beans::PropertyValue >() ); @@ -2585,11 +2327,74 @@ void FieldContext::AppendCommand(const ::rtl::OUString& rPart) { m_sCommand += rPart; } + +::std::vector FieldContext::GetCommandParts() const +{ + ::std::vector aResult; + sal_Int32 nIndex = 0; + bool bInString = false; + OUString sPart; + while (nIndex != -1) + { + OUString sToken = GetCommand().getToken(0, ' ', nIndex); + bool bInStringNext = bInString; + + if (sToken.getLength() == 0) + continue; + + if (sToken.getStr()[0] == '"') + { + bInStringNext = true; + sToken = sToken.copy(1); + } + if (sToken.getStr()[sToken.getLength() - 1] == '"') + { + bInStringNext = false; + sToken = sToken.copy(0, sToken.getLength() - 1); + } + + if (bInString) + { + if (bInStringNext) + { + sPart += OUString(' '); + sPart += sToken; + } + else + { + sPart += sToken; + aResult.push_back(sPart); + } + } + else + { + if (bInStringNext) + { + sPart = sToken; + } + else + { + aResult.push_back(sToken); + } + } + + bInString = bInStringNext; + } + + return aResult; +} + /*-- 29.01.2007 11:33:15--------------------------------------------------- //collect the pieces of the command -----------------------------------------------------------------------*/ void DomainMapper_Impl::AppendFieldCommand(::rtl::OUString& rPartOfCommand) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("appendFieldCommand"); + dmapper_logger->chars(rPartOfCommand); + dmapper_logger->endElement("appendFieldCommand"); +#endif + FieldContextPtr pContext = m_aFieldStack.top(); OSL_ENSURE( pContext.get(), "no field context available"); if( pContext.get() ) @@ -2601,89 +2406,499 @@ void DomainMapper_Impl::AppendFieldCommand(::rtl::OUString& rPartOfCommand) -----------------------------------------------------------------------*/ typedef std::multimap < sal_Int32, ::rtl::OUString > TOCStyleMap; + +const FieldConversionMap_t & lcl_GetFieldConversion() +{ +static FieldConversionMap_t aFieldConversionMap; +static bool bFilled = false; +if(!bFilled) +{ + static const FieldConversion aFields[] = + { +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ADDRESSBLOCK")), "", "", FIELD_ADDRESSBLOCK }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ADVANCE")), "", "", FIELD_ADVANCE }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ASK")), "SetExpression", "SetExpression", FIELD_ASK }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUM")), "SetExpression", "SetExpression", FIELD_AUTONUM }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUMLGL")), "SetExpression", "SetExpression", FIELD_AUTONUMLGL }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUMOUT")), "SetExpression", "SetExpression", FIELD_AUTONUMOUT }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTHOR")), "Author", "", FIELD_AUTHOR }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE")), "DateTime", "", FIELD_DATE }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("COMMENTS")), "DocInfo.Description", "", FIELD_COMMENTS }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CREATEDATE")), "DocInfo.CreateDateTime", "", FIELD_CREATEDATE }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOCPROPERTY")), "", "", FIELD_DOCPROPERTY }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOCVARIABLE")), "User", "", FIELD_DOCVARIABLE }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EDITTIME")), "DocInfo.EditTime", "", FIELD_EDITTIME }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILLIN")), "Input", "", FIELD_FILLIN }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILENAME")), "FileName", "", FIELD_FILENAME }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILESIZE")), "", "", FIELD_FILESIZE }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMULA")), "", "", FIELD_FORMULA }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMCHECKBOX")), "", "", FIELD_FORMCHECKBOX}, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMDROPDOWN")), "", "", FIELD_FORMDROWDOWN}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMTEXT")), "Input", "", FIELD_FORMTEXT}, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GOTOBUTTON")), "", "", FIELD_GOTOBUTTON }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HYPERLINK")), "", "", FIELD_HYPERLINK }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IF")), "ConditionalText", "", FIELD_IF }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INFO")), "","", FIELD_INFO }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INCLUDEPICTURE")), "", "", FIELD_INCLUDEPICTURE}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEYWORDS")), "DocInfo.KeyWords", "", FIELD_KEYWORDS }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LASTSAVEDBY")), "DocInfo.ChangeAuthor", "", FIELD_LASTSAVEDBY }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MACROBUTTON")), "Macro", "", FIELD_MACROBUTTON }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGEFIELD")), "Database", "Database", FIELD_MERGEFIELD}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGEREC")), "DatabaseNumberOfSet", "", FIELD_MERGEREC }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGESEQ")), "", "", FIELD_MERGESEQ }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NEXT")), "DatabaseNextSet", "", FIELD_NEXT }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NEXTIF")), "DatabaseNextSet", "", FIELD_NEXTIF }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PAGE")), "PageNumber", "", FIELD_PAGE }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REF")), "GetReference", "", FIELD_REF }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REVNUM")), "DocInfo.Revision", "", FIELD_REVNUM }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SAVEDATE")), "DocInfo.Change", "", FIELD_SAVEDATE }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SECTION")), "", "", FIELD_SECTION }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SECTIONPAGES")), "", "", FIELD_SECTIONPAGES }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SEQ")), "SetExpression", "SetExpression", FIELD_SEQ }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SET")), "","", FIELD_SET }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SKIPIF")),"", "", FIELD_SKIPIF }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("STYLEREF")),"", "", FIELD_STYLEREF }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SUBJECT")), "DocInfo.Subject", "", FIELD_SUBJECT }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SYMBOL")),"", "", FIELD_SYMBOL }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TEMPLATE")), "TemplateName", "", FIELD_TEMPLATE}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME")), "DateTime", "", FIELD_TIME }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TITLE")), "DocInfo.Title", "", FIELD_TITLE }, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERINITIALS")), "ExtendedUser", "", FIELD_USERINITIALS}, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERADDRESS")), "", "", FIELD_USERADDRESS }, +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERNAME")), "ExtendedUser", "", FIELD_USERNAME } + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TOC")), "com.sun.star.text.ContentIndex", "", FIELD_TOC}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TC")), "com.sun.star.text.ContentIndexMark", "", FIELD_TC}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMCHARS")), "CharacterCount", "", FIELD_NUMCHARS}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMWORDS")), "WordCount", "", FIELD_NUMWORDS}, + {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMPAGES")), "PageCount", "", FIELD_NUMPAGES}, + +// {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")), "", "", FIELD_}, + + }; + size_t nConversions = sizeof(aFields)/sizeof(FieldConversion); + for( size_t nConversion = 0; nConversion < nConversions; ++nConversion) + { + aFieldConversionMap.insert( FieldConversionMap_t::value_type( + aFields[nConversion].sWordCommand, + aFields[nConversion] )); + } + + bFilled = true; + } + + return aFieldConversionMap; +} + +void DomainMapper_Impl::handleFieldAsk + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties) +{ + //doesn the command contain a variable name? + ::rtl::OUString sVariable, sHint; + + sVariable = lcl_ExctractAskVariableAndHint( pContext->GetCommand(), + sHint ); + if(sVariable.getLength()) + { + // determine field master name + uno::Reference< beans::XPropertySet > xMaster = + FindOrCreateFieldMaster + ("com.sun.star.text.FieldMaster.SetExpression", sVariable ); + + // attach the master to the field + uno::Reference< text::XDependentTextField > xDependentField + ( xFieldInterface, uno::UNO_QUERY_THROW ); + xDependentField->attachTextFieldMaster( xMaster ); + + // set input flag at the field + xFieldProperties->setPropertyValue( + rPropNameSupplier.GetName(PROP_IS_INPUT), uno::makeAny( true )); + // set the prompt + xFieldProperties->setPropertyValue( + rPropNameSupplier.GetName(PROP_HINT), + uno::makeAny( sHint )); + } + else + { + //don't insert the field + //todo: maybe import a 'normal' input field here? + xFieldInterface = 0; + } +} + +void DomainMapper_Impl::handleAutoNum + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties) +{ + //create a sequence field master "AutoNr" + uno::Reference< beans::XPropertySet > xMaster = + FindOrCreateFieldMaster + ("com.sun.star.text.FieldMaster.SetExpression", + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoNr") )); + + xMaster->setPropertyValue( rPropNameSupplier.GetName(PROP_SUB_TYPE), + uno::makeAny(text::SetVariableType::SEQUENCE)); + + //apply the numbering type + xFieldProperties->setPropertyValue( + rPropNameSupplier.GetName(PROP_NUMBERING_TYPE), + uno::makeAny( lcl_ParseNumberingType(pContext->GetCommand()) )); + // attach the master to the field + uno::Reference< text::XDependentTextField > xDependentField + ( xFieldInterface, uno::UNO_QUERY_THROW ); + xDependentField->attachTextFieldMaster( xMaster ); +} + +void DomainMapper_Impl::handleAuthor + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & /*xFieldInterface*/, + uno::Reference< beans::XPropertySet > xFieldProperties) +{ + xFieldProperties->setPropertyValue + ( rPropNameSupplier.GetName(PROP_FULL_NAME), uno::makeAny( true )); + ::rtl::OUString sParam = + lcl_ExtractParameter(pContext->GetCommand(), sizeof(" AUTHOR") ); + if(sParam.getLength()) + { + xFieldProperties->setPropertyValue( + rPropNameSupplier.GetName( PROP_IS_FIXED ), + uno::makeAny( true )); + //PROP_CURRENT_PRESENTATION is set later anyway + } +} + + void DomainMapper_Impl::handleDocProperty + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties) +{ + //some docproperties should be imported as document statistic fields, some as DocInfo fields + //others should be user fields + ::rtl::OUString sParam = + lcl_ExtractParameter(pContext->GetCommand(), sizeof(" DOCPROPERTY") ); + + if(sParam.getLength()) + { + #define SET_ARABIC 0x01 + #define SET_FULL_NAME 0x02 + struct DocPropertyMap + { + const sal_Char* pDocPropertyName; + const sal_Char* pServiceName; + sal_uInt8 nFlags; + }; + static const DocPropertyMap aDocProperties[] = + { + {"Author", "Author", SET_FULL_NAME}, + {"CreateTime", "DocInfo.CreateDateTime", 0}, + {"Characters", "CharacterCount", SET_ARABIC}, + {"Comments", "DocInfo.Description", 0}, + {"Keywords", "DocInfo.KeyWords", 0}, + {"LastPrinted", "DocInfo.PrintDateTime", 0}, + {"LastSavedBy", "DocInfo.ChangeAuthor", 0}, + {"LastSavedTime", "DocInfo.ChangeDateTime", 0}, + {"Paragraphs", "ParagraphCount", SET_ARABIC}, + {"RevisionNumber", "DocInfo.Revision", 0}, + {"Subject", "DocInfo.Subject", 0}, + {"Template", "TemplateName", 0}, + {"Title", "DocInfo.Title", 0}, + {"TotalEditingTime", "DocInfo.EditTime", 9}, + {"Words", "WordCount", SET_ARABIC} + + //other available DocProperties: + //Bytes, Category, CharactersWithSpaces, Company + //HyperlinkBase, + //Lines, Manager, NameofApplication, ODMADocId, Pages, + //Security, + }; + //search for a field mapping + ::rtl::OUString sFieldServiceName; + sal_uInt16 nMap = 0; + for( ; nMap < sizeof(aDocProperties) / sizeof(DocPropertyMap); + ++nMap ) + { + if(sParam.equalsAscii(aDocProperties[nMap].pDocPropertyName)) + { + sFieldServiceName = + ::rtl::OUString::createFromAscii + (aDocProperties[nMap].pServiceName); + break; + } + } + ::rtl::OUString sServiceName(RTL_CONSTASCII_USTRINGPARAM + ("com.sun.star.text.TextField.")); + bool bIsCustomField = false; + if(!sFieldServiceName.getLength()) + { + //create a custom property field + sServiceName += + ::rtl::OUString::createFromAscii("DocInfo.Custom"); + bIsCustomField = true; + } + else + { + sServiceName += sFieldServiceName; + } + xFieldInterface = m_xTextFactory->createInstance(sServiceName); + xFieldProperties = + uno::Reference< beans::XPropertySet >( xFieldInterface, + uno::UNO_QUERY_THROW); + if( bIsCustomField ) + xFieldProperties->setPropertyValue( + rPropNameSupplier.GetName(PROP_NAME), uno::makeAny( sParam )); + else + { + if(0 != (aDocProperties[nMap].nFlags & SET_ARABIC)) + xFieldProperties->setPropertyValue( + rPropNameSupplier.GetName(PROP_NUMBERING_TYPE), + uno::makeAny( style::NumberingType::ARABIC )); + else if(0 != (aDocProperties[nMap].nFlags & SET_FULL_NAME)) + xFieldProperties->setPropertyValue( + rPropNameSupplier.GetName(PROP_FULL_NAME), + uno::makeAny( true )); + } + } + +#undef SET_ARABIC +#undef SET_FULL_NAME +} + +void DomainMapper_Impl::handleToc + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & /*xFieldInterface*/, + uno::Reference< beans::XPropertySet > /*xFieldProperties*/, + const ::rtl::OUString & sTOCServiceName) +{ + ::rtl::OUString sValue; + bool bTableOfFigures = false; + bool bHyperlinks = false; + bool bFromOutline = false; + bool bFromEntries = false; + sal_Int16 nMaxLevel = 10; + ::rtl::OUString sTemplate; + ::rtl::OUString sChapterNoSeparator; +// \a Builds a table of figures but does not include the captions's label and number + if( lcl_FindInCommand( pContext->GetCommand(), 'a', sValue )) + { //make it a table of figures + bTableOfFigures = true; + } +// \b Uses a bookmark to specify area of document from which to build table of contents +// if( lcl_FindInCommand( pContext->GetCommand(), 'b', sValue )) +// { //todo: sValue contains the bookmark name - unsupported feature +// } + if( lcl_FindInCommand( pContext->GetCommand(), 'c', sValue )) +// \c Builds a table of figures of the given label + { + //todo: sValue contains the label's name + bTableOfFigures = true; + } +// \d Defines the separator between sequence and page numbers + if( lcl_FindInCommand( pContext->GetCommand(), 'd', sValue )) + { + //todo: insert the chapter number into each level and insert the separator additionally + sChapterNoSeparator = sValue; + } +// \f Builds a table of contents using TC entries instead of outline levels + if( lcl_FindInCommand( pContext->GetCommand(), 'f', sValue )) + { + //todo: sValue can contain a TOC entry identifier - use unclear + bFromEntries = true; + } +// \h Hyperlinks the entries and page numbers within the table of contents + if( lcl_FindInCommand( pContext->GetCommand(), 'h', sValue )) + { + //todo: make all entries to hyperlinks + bHyperlinks = true; + } +// \l Defines the TC entries field level used to build a table of contents +// if( lcl_FindInCommand( pContext->GetCommand(), 'l', sValue )) +// { + //todo: entries can only be included completely +// } +// \n Builds a table of contents or a range of entries, sucah as “1-9”, in a table of contents without page numbers +// if( lcl_FindInCommand( pContext->GetCommand(), 'n', sValue )) +// { + //todo: what does the description mean? +// } +// \o Builds a table of contents by using outline levels instead of TC entries + if( lcl_FindInCommand( pContext->GetCommand(), 'o', sValue )) + { + bFromOutline = true; + UniString sParam( sValue ); + xub_StrLen nIndex = 0; + sParam.GetToken( 0, '-', nIndex ); + nMaxLevel = sal_Int16( sParam.Copy( nIndex ).ToInt32( ) ); + } +// \p Defines the separator between the table entry and its page number + if( lcl_FindInCommand( pContext->GetCommand(), 'p', sValue )) + { } +// \s Builds a table of contents by using a sequence type + if( lcl_FindInCommand( pContext->GetCommand(), 's', sValue )) + { } +// \t Builds a table of contents by using style names other than the standard outline styles + if( lcl_FindInCommand( pContext->GetCommand(), 't', sValue )) + { + sal_Int32 nPos = 0; + ::rtl::OUString sToken = sValue.getToken( 1, '"', nPos); + sTemplate = sToken.getLength() ? sToken : sValue; + } +// \u Builds a table of contents by using the applied paragraph outline level + if( lcl_FindInCommand( pContext->GetCommand(), 'u', sValue )) + { + bFromOutline = true; + //todo: what doesn 'the applied paragraph outline level' refer to? + } +// \w Preserve tab characters within table entries +// if( lcl_FindInCommand( pContext->GetCommand(), 'w', sValue )) +// { + //todo: not supported +// } +// \x Preserve newline characters within table entries +// if( lcl_FindInCommand( pContext->GetCommand(), 'x', sValue )) +// { + //todo: unsupported +// } +// \z Hides page numbers within the table of contens when shown in Web Layout View +// if( lcl_FindInCommand( pContext->GetCommand(), 'z', sValue )) +// { //todo: unsupported feature } + + //if there's no option then it should be created from outline + if( !bFromOutline && !bFromEntries && !sTemplate.getLength() ) + bFromOutline = true; + + uno::Reference< beans::XPropertySet > xTOC( + m_xTextFactory->createInstance + ( bTableOfFigures ? + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM + ("com.sun.star.text.IllustrationsIndex")) + : sTOCServiceName), + uno::UNO_QUERY_THROW); + xTOC->setPropertyValue(rPropNameSupplier.GetName( PROP_TITLE ), uno::makeAny(::rtl::OUString())); + if( !bTableOfFigures ) + { + xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_LEVEL ), uno::makeAny( nMaxLevel ) ); + xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_OUTLINE ), uno::makeAny( bFromOutline )); + xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_MARKS ), uno::makeAny( bFromEntries )); + if( sTemplate.getLength() ) + { + //the string contains comma separated the names and related levels + //like: "Heading 1,1,Heading 2,2" + TOCStyleMap aMap; + sal_Int32 nLevel; + sal_Int32 nPosition = 0; + while( nPosition >= 0) + { + ::rtl::OUString sStyleName = sTemplate.getToken( 0, ',', nPosition ); + //empty tokens should be skipped + while( !sStyleName.getLength() && nPosition > 0 ) + sStyleName = sTemplate.getToken( 0, ',', nPosition ); + nLevel = sTemplate.getToken( 0, ',', nPosition ).toInt32(); + if( !nLevel ) + nLevel = 1; + if( sStyleName.getLength() ) + aMap.insert( TOCStyleMap::value_type(nLevel, sStyleName) ); + } + uno::Reference< container::XIndexReplace> xParaStyles; + xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_PARAGRAPH_STYLES)) >>= xParaStyles; + for( nLevel = 1; nLevel < 10; ++nLevel) + { + sal_Int32 nLevelCount = aMap.count( nLevel ); + if( nLevelCount ) + { + TOCStyleMap::iterator aTOCStyleIter = aMap.find( nLevel ); + + uno::Sequence< rtl::OUString> aStyles( nLevelCount ); + for ( sal_Int32 nStyle = 0; nStyle < nLevelCount; ++nStyle, ++aTOCStyleIter ) + { + aStyles[nStyle] = aTOCStyleIter->second; + } + xParaStyles->replaceByIndex(nLevel - 1, uno::makeAny(aStyles)); + } + } + xTOC->setPropertyValue(rPropNameSupplier.GetName(PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES), uno::makeAny( true )); + + } + if(bHyperlinks || sChapterNoSeparator.getLength()) + { + uno::Reference< container::XIndexReplace> xLevelFormats; + xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_FORMAT)) >>= xLevelFormats; + sal_Int32 nLevelCount = xLevelFormats->getCount(); + //start with level 1, 0 is the header level + for( sal_Int32 nLevel = 1; nLevel < nLevelCount; ++nLevel) + { + uno::Sequence< beans::PropertyValues > aLevel; + xLevelFormats->getByIndex( nLevel ) >>= aLevel; + //create a copy of the level and add two new entries - hyperlink start and end + bool bChapterNoSeparator = sChapterNoSeparator.getLength() > 0; + sal_Int32 nAdd = (bHyperlinks && bChapterNoSeparator) ? 4 : 2; + uno::Sequence< beans::PropertyValues > aNewLevel( aLevel.getLength() + nAdd); + beans::PropertyValues* pNewLevel = aNewLevel.getArray(); + if( bHyperlinks ) + { + beans::PropertyValues aHyperlink(1); + aHyperlink[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE ); + aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_START ); + pNewLevel[0] = aHyperlink; + aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_END ); + pNewLevel[aNewLevel.getLength() -1] = aHyperlink; + } + if( bChapterNoSeparator ) + { + beans::PropertyValues aChapterNo(2); + aChapterNo[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE ); + aChapterNo[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_CHAPTER_INFO ); + aChapterNo[1].Name = rPropNameSupplier.GetName( PROP_CHAPTER_FORMAT ); + //todo: is ChapterFormat::Number correct? + aChapterNo[1].Value <<= (sal_Int16)text::ChapterFormat::NUMBER; + pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 4 : 2) ] = aChapterNo; + + beans::PropertyValues aChapterSeparator(2); + aChapterSeparator[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE ); + aChapterSeparator[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_TEXT ); + aChapterSeparator[1].Name = rPropNameSupplier.GetName( PROP_TEXT ); + aChapterSeparator[1].Value <<= sChapterNoSeparator; + pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 3 : 1)] = aChapterSeparator; + } + //copy the 'old' entries except the last (page no) + for( sal_Int32 nToken = 0; nToken < aLevel.getLength() - 1; ++nToken) + { + pNewLevel[nToken + 1] = aLevel[nToken]; + } + //copy page no entry (last or last but one depending on bHyperlinks + sal_Int32 nPageNo = aNewLevel.getLength() - (bHyperlinks ? 2 : 3); + pNewLevel[nPageNo] = aLevel[aLevel.getLength() - 1]; + + xLevelFormats->replaceByIndex( nLevel, uno::makeAny( aNewLevel ) ); + } + } + } + pContext->SetTOC( xTOC ); +} + + /*-- 29.01.2007 11:33:16--------------------------------------------------- //the field command has to be closed (0x14 appeared) -----------------------------------------------------------------------*/ void DomainMapper_Impl::CloseFieldCommand() { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("closeFieldCommand"); +#endif + FieldContextPtr pContext = m_aFieldStack.top(); OSL_ENSURE( pContext.get(), "no field context available"); if( pContext.get() ) { - static FieldConversionMap_t aFieldConversionMap; - static bool bFilled = false; m_bSetUserFieldContent = false; - if(!bFilled) - { - static const FieldConversion aFields[] = - { - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ADDRESSBLOCK")), "", "", FIELD_ADDRESSBLOCK }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ADVANCE")), "", "", FIELD_ADVANCE }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ASK")), "SetExpression", "SetExpression", FIELD_ASK }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUM")), "SetExpression", "SetExpression", FIELD_AUTONUM }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUMLGL")), "SetExpression", "SetExpression", FIELD_AUTONUMLGL }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTONUMOUT")), "SetExpression", "SetExpression", FIELD_AUTONUMOUT }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AUTHOR")), "Author", "", FIELD_AUTHOR }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DATE")), "DateTime", "", FIELD_DATE }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("COMMENTS")), "DocInfo.Description", "", FIELD_COMMENTS }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CREATEDATE")), "DocInfo.CreateDateTime", "", FIELD_CREATEDATE }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOCPROPERTY")), "", "", FIELD_DOCPROPERTY }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DOCVARIABLE")), "User", "", FIELD_DOCVARIABLE }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("EDITTIME")), "DocInfo.EditTime", "", FIELD_EDITTIME }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILLIN")), "Input", "", FIELD_FILLIN }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILENAME")), "FileName", "", FIELD_FILENAME }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FILESIZE")), "", "", FIELD_FILESIZE }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FORMULA")), "", "", FIELD_FORMULA - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GOTOBUTTON")), "", "", FIELD_GOTOBUTTON }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HYPERLINK")), "", "", FIELD_HYPERLINK }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IF")), "ConditionalText", "", FIELD_IF }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INFO")), "","", FIELD_INFO }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("INCLUDEPICTURE")), "", "", FIELD_INCLUDEPICTURE}, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KEYWORDS")), "DocInfo.KeyWords", "", FIELD_KEYWORDS }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LASTSAVEDBY")), "DocInfo.ChangeAuthor", "", FIELD_LASTSAVEDBY }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MACROBUTTON")), "Macro", "", FIELD_MACROBUTTON }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGEFIELD")), "Database", "Database", FIELD_MERGEFIELD}, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGEREC")), "DatabaseNumberOfSet", "", FIELD_MERGEREC }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MERGESEQ")), "", "", FIELD_MERGESEQ }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NEXT")), "DatabaseNextSet", "", FIELD_NEXT }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NEXTIF")), "DatabaseNextSet", "", FIELD_NEXTIF }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PAGE")), "PageNumber", "", FIELD_PAGE }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REF")), "GetReference", "", FIELD_REF }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("REVNUM")), "DocInfo.Revision", "", FIELD_REVNUM }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SAVEDATE")), "DocInfo.Change", "", FIELD_SAVEDATE }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SECTION")), "", "", FIELD_SECTION }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SECTIONPAGES")), "", "", FIELD_SECTIONPAGES }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SEQ")), "SetExpression", "SetExpression", FIELD_SEQ }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SET")), "","", FIELD_SET }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SKIPIF")),"", "", FIELD_SKIPIF }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("STYLEREF")),"", "", FIELD_STYLEREF }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SUBJECT")), "DocInfo.Subject", "", FIELD_SUBJECT }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SYMBOL")),"", "", FIELD_SYMBOL }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TEMPLATE")), "TemplateName", "", FIELD_TEMPLATE}, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TIME")), "DateTime", "", FIELD_TIME }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TITLE")), "DocInfo.Title", "", FIELD_TITLE }, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERINITIALS")), "ExtendedUser", "", FIELD_USERINITIALS}, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERADDRESS")), "", "", FIELD_USERADDRESS }, - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("USERNAME")), "ExtendedUser", "", FIELD_USERNAME } - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TOC")), "com.sun.star.text.ContentIndex", "", FIELD_TOC}, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TC")), "com.sun.star.text.ContentIndexMark", "", FIELD_TC}, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMCHARS")), "CharacterCount", "", FIELD_NUMCHARS}, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMWORDS")), "WordCount", "", FIELD_NUMWORDS}, - {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NUMPAGES")), "PageCount", "", FIELD_NUMPAGES}, - - // {::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")), "", "", FIELD_}, - - }; - size_t nConversions = sizeof(aFields)/sizeof(FieldConversion); - for( size_t nConversion = 0; nConversion < nConversions; ++nConversion) - { - aFieldConversionMap.insert( FieldConversionMap_t::value_type( - aFields[nConversion].sWordCommand, - aFields[nConversion] )); - } + FieldConversionMap_t aFieldConversionMap = lcl_GetFieldConversion(); - bFilled = true; - } try { uno::Reference< uno::XInterface > xFieldInterface; @@ -2697,14 +2912,31 @@ void DomainMapper_Impl::CloseFieldCommand() if(aIt != aFieldConversionMap.end()) { uno::Reference< beans::XPropertySet > xFieldProperties; - if( FIELD_HYPERLINK != aIt->second.eFieldId && - FIELD_DOCPROPERTY != aIt->second.eFieldId && - FIELD_TOC != aIt->second.eFieldId && - FIELD_TC != aIt->second.eFieldId) + bool bCreateField = true; + switch (aIt->second.eFieldId) + { + case FIELD_HYPERLINK: + case FIELD_DOCPROPERTY: + case FIELD_TOC: + case FIELD_TC: + case FIELD_FORMCHECKBOX: + bCreateField = false; + break; + default: + break; + } + if( bCreateField) { //add the service prefix OUString sServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.")); sServiceName += ::rtl::OUString::createFromAscii(aIt->second.cFieldServiceName ); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("fieldService"); + dmapper_logger->chars(sServiceName); + dmapper_logger->endElement("fieldService"); +#endif + xFieldInterface = m_xTextFactory->createInstance(sServiceName); xFieldProperties = uno::Reference< beans::XPropertySet >( xFieldInterface, uno::UNO_QUERY_THROW); } @@ -2714,69 +2946,15 @@ void DomainMapper_Impl::CloseFieldCommand() case FIELD_ADDRESSBLOCK: break; case FIELD_ADVANCE : break; case FIELD_ASK : - { - //doesn the command contain a variable name? - ::rtl::OUString sVariable, sHint; - - sVariable = lcl_ExctractAskVariableAndHint( pContext->GetCommand(), sHint ); - if(sVariable.getLength()) - { - // determine field master name - uno::Reference< beans::XPropertySet > xMaster = FindOrCreateFieldMaster( - "com.sun.star.text.FieldMaster.SetExpression", sVariable ); - - // attach the master to the field - uno::Reference< text::XDependentTextField > xDependentField( xFieldInterface, uno::UNO_QUERY_THROW ); - xDependentField->attachTextFieldMaster( xMaster ); - - // set input flag at the field - xFieldProperties->setPropertyValue( - rPropNameSupplier.GetName(PROP_IS_INPUT), uno::makeAny( true )); - // set the prompt - xFieldProperties->setPropertyValue( - rPropNameSupplier.GetName(PROP_HINT), - uno::makeAny( sHint )); - } - else - { - //don't insert the field - //todo: maybe import a 'normal' input field here? - xFieldInterface = 0; - } - } + handleFieldAsk(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties); break; case FIELD_AUTONUM : case FIELD_AUTONUMLGL : case FIELD_AUTONUMOUT : - { - //create a sequence field master "AutoNr" - uno::Reference< beans::XPropertySet > xMaster = FindOrCreateFieldMaster( - "com.sun.star.text.FieldMaster.SetExpression", - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AutoNr") )); - - xMaster->setPropertyValue( rPropNameSupplier.GetName(PROP_SUB_TYPE), - uno::makeAny(text::SetVariableType::SEQUENCE)); - - //apply the numbering type - xFieldProperties->setPropertyValue( - rPropNameSupplier.GetName(PROP_NUMBERING_TYPE), - uno::makeAny( lcl_ParseNumberingType(pContext->GetCommand()) )); - // attach the master to the field - uno::Reference< text::XDependentTextField > xDependentField( xFieldInterface, uno::UNO_QUERY_THROW ); - xDependentField->attachTextFieldMaster( xMaster ); - } + handleAutoNum(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties); break; case FIELD_AUTHOR : - { - xFieldProperties->setPropertyValue( rPropNameSupplier.GetName(PROP_FULL_NAME), uno::makeAny( true )); - ::rtl::OUString sParam = lcl_ExtractParameter(pContext->GetCommand(), sizeof(" AUTHOR") ); - if(sParam.getLength()) - { - xFieldProperties->setPropertyValue( - rPropNameSupplier.GetName( PROP_IS_FIXED ), uno::makeAny( true )); - //PROP_CURRENT_PRESENTATION is set later anyway - } - } + handleAuthor(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties); break; case FIELD_DATE: { @@ -2807,86 +2985,7 @@ void DomainMapper_Impl::CloseFieldCommand() } break; case FIELD_DOCPROPERTY : - { - //some docproperties should be imported as document statistic fields, some as DocInfo fields - //others should be user fields - ::rtl::OUString sParam = lcl_ExtractParameter(pContext->GetCommand(), sizeof(" DOCPROPERTY") ); - if(sParam.getLength()) - { - #define SET_ARABIC 0x01 - #define SET_FULL_NAME 0x02 - struct DocPropertyMap - { - const sal_Char* pDocPropertyName; - const sal_Char* pServiceName; - sal_uInt8 nFlags; - }; - static const DocPropertyMap aDocProperties[] = - { - {"Author", "Author", SET_FULL_NAME}, - {"CreateTime", "DocInfo.CreateDateTime", 0}, - {"Characters", "CharacterCount", SET_ARABIC}, - {"Comments", "DocInfo.Description", 0}, - {"Keywords", "DocInfo.KeyWords", 0}, - {"LastPrinted", "DocInfo.PrintDateTime", 0}, - {"LastSavedBy", "DocInfo.ChangeAuthor", 0}, - {"LastSavedTime", "DocInfo.ChangeDateTime", 0}, - {"Paragraphs", "ParagraphCount", SET_ARABIC}, - {"RevisionNumber", "DocInfo.Revision", 0}, - {"Subject", "DocInfo.Subject", 0}, - {"Template", "TemplateName", 0}, - {"Title", "DocInfo.Title", 0}, - {"TotalEditingTime", "DocInfo.EditTime", 9}, - {"Words", "WordCount", SET_ARABIC} - - //other available DocProperties: - //Bytes, Category, CharactersWithSpaces, Company - //HyperlinkBase, - //Lines, Manager, NameofApplication, ODMADocId, Pages, - //Security, - }; - //search for a field mapping - ::rtl::OUString sFieldServiceName; - sal_uInt16 nMap = 0; - for( ; nMap < sizeof(aDocProperties) / sizeof(DocPropertyMap); ++nMap ) - { - if(sParam.equalsAscii(aDocProperties[nMap].pDocPropertyName)) - { - sFieldServiceName = ::rtl::OUString::createFromAscii(aDocProperties[nMap].pServiceName); - break; - } - } - ::rtl::OUString sServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextField.")); - bool bIsCustomField = false; - if(!sFieldServiceName.getLength()) - { - //create a custom property field - sServiceName += ::rtl::OUString::createFromAscii("DocInfo.Custom"); - bIsCustomField = true; - } - else - { - sServiceName += sFieldServiceName; - } - xFieldInterface = m_xTextFactory->createInstance(sServiceName); - xFieldProperties = uno::Reference< beans::XPropertySet >( xFieldInterface, uno::UNO_QUERY_THROW); - if( bIsCustomField ) - xFieldProperties->setPropertyValue( - rPropNameSupplier.GetName(PROP_NAME), uno::makeAny( sParam )); - else - { - if(0 != (aDocProperties[nMap].nFlags & SET_ARABIC)) - xFieldProperties->setPropertyValue( - rPropNameSupplier.GetName(PROP_NUMBERING_TYPE), - uno::makeAny( style::NumberingType::ARABIC )); - else if(0 != (aDocProperties[nMap].nFlags & SET_FULL_NAME)) - xFieldProperties->setPropertyValue( - rPropNameSupplier.GetName(PROP_FULL_NAME), uno::makeAny( true )); - } - } - } - #undef SET_ARABIC - #undef SET_FULL_NAME + handleDocProperty(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties); break; case FIELD_DOCVARIABLE : { @@ -2919,13 +3018,79 @@ void DomainMapper_Impl::CloseFieldCommand() break; case FIELD_FILESIZE : break; case FIELD_FORMULA : break; + case FIELD_FORMCHECKBOX : + { + FFDataHandler::Pointer_t + pFFDataHandler(pContext->getFFDataHandler()); + FormControlHelper::Pointer_t + pFormControlHelper(new FormControlHelper + (FIELD_FORMCHECKBOX, + m_xTextDocument, pFFDataHandler)); + pContext->setFormControlHelper(pFormControlHelper); + } + break; + case FIELD_FORMDROPDOWN : break; + case FIELD_FORMTEXT : + { + FFDataHandler::Pointer_t pFFDataHandler + (pContext->getFFDataHandler()); + + xFieldProperties->setPropertyValue + (rPropNameSupplier.GetName(PROP_HINT), + uno::makeAny(pFFDataHandler->getStatusText())); + xFieldProperties->setPropertyValue + (rPropNameSupplier.GetName(PROP_HELP), + uno::makeAny(pFFDataHandler->getHelpText())); + xFieldProperties->setPropertyValue + (rPropNameSupplier.GetName(PROP_CONTENT), + uno::makeAny(pFFDataHandler->getTextDefault())); + } + break; case FIELD_GOTOBUTTON : break; case FIELD_HYPERLINK: { - sal_Int32 nStartQuote = pContext->GetCommand().indexOf( '\"' ); - sal_Int32 nEndQuote = nStartQuote < pContext->GetCommand().getLength() + 1 ? pContext->GetCommand().indexOf( '\"', nStartQuote + 1) : -1; - if( nEndQuote > 0) - pContext->SetHyperlinkURL( pContext->GetCommand().copy(nStartQuote + 1, nEndQuote - nStartQuote - 1) ); + ::std::vector aParts = pContext->GetCommandParts(); + ::std::vector::const_iterator aItEnd = aParts.end(); + ::std::vector::const_iterator aPartIt = aParts.begin(); + + OUString sURL; + + while (aPartIt != aItEnd) + { + if (aPartIt->equalsAscii("\\l")) + { + aPartIt++; + + if (aPartIt == aItEnd) + break; + + sURL = OUString('#'); + sURL += *aPartIt; + } + else if (aPartIt->equalsAscii("\\m") || + aPartIt->equalsAscii("\\n")) + { + } + else if (aPartIt->equalsAscii("\\o") || + aPartIt->equalsAscii("\\t")) + { + aPartIt++; + + if (aPartIt == aItEnd) + break; + } + else + { + sURL = *aPartIt; + } + + aPartIt++; + } + + if (sURL.getLength() > 0) + { + pContext->SetHyperlinkURL(sURL); + } } break; case FIELD_IF : break; @@ -3065,211 +3230,8 @@ void DomainMapper_Impl::CloseFieldCommand() case FIELD_USERNAME : //todo: user name is firstname + lastname break; case FIELD_TOC: - { - ::rtl::OUString sValue; - bool bTableOfFigures = false; - bool bHyperlinks = false; - bool bFromOutline = false; - bool bFromEntries = false; - sal_Int16 nMaxLevel = 10; - ::rtl::OUString sTemplate; - ::rtl::OUString sChapterNoSeparator; - // \a Builds a table of figures but does not include the captions's label and number - if( lcl_FindInCommand( pContext->GetCommand(), 'a', sValue )) - { //make it a table of figures - bTableOfFigures = true; - } - // \b Uses a bookmark to specify area of document from which to build table of contents - // if( lcl_FindInCommand( pContext->GetCommand(), 'b', sValue )) - // { //todo: sValue contains the bookmark name - unsupported feature - // } - if( lcl_FindInCommand( pContext->GetCommand(), 'c', sValue )) - // \c Builds a table of figures of the given label - { - //todo: sValue contains the label's name - bTableOfFigures = true; - } - // \d Defines the separator between sequence and page numbers - if( lcl_FindInCommand( pContext->GetCommand(), 'd', sValue )) - { - //todo: insert the chapter number into each level and insert the separator additionally - sChapterNoSeparator = sValue; - } - // \f Builds a table of contents using TC entries instead of outline levels - if( lcl_FindInCommand( pContext->GetCommand(), 'f', sValue )) - { - //todo: sValue can contain a TOC entry identifier - use unclear - bFromEntries = true; - } - // \h Hyperlinks the entries and page numbers within the table of contents - if( lcl_FindInCommand( pContext->GetCommand(), 'h', sValue )) - { - //todo: make all entries to hyperlinks - bHyperlinks = true; - } - // \l Defines the TC entries field level used to build a table of contents - // if( lcl_FindInCommand( pContext->GetCommand(), 'l', sValue )) - // { - //todo: entries can only be included completely - // } - // \n Builds a table of contents or a range of entries, sucah as “1-9”, in a table of contents without page numbers - // if( lcl_FindInCommand( pContext->GetCommand(), 'n', sValue )) - // { - //todo: what does the description mean? - // } - // \o Builds a table of contents by using outline levels instead of TC entries - if( lcl_FindInCommand( pContext->GetCommand(), 'o', sValue )) - { - bFromOutline = true; - UniString sParam( sValue ); - xub_StrLen nIndex = 0; - sParam.GetToken( 0, '-', nIndex ); - nMaxLevel = sal_Int16( sParam.Copy( nIndex ).ToInt32( ) ); - } - // \p Defines the separator between the table entry and its page number - if( lcl_FindInCommand( pContext->GetCommand(), 'p', sValue )) - { } - // \s Builds a table of contents by using a sequence type - if( lcl_FindInCommand( pContext->GetCommand(), 's', sValue )) - { } - // \t Builds a table of contents by using style names other than the standard outline styles - if( lcl_FindInCommand( pContext->GetCommand(), 't', sValue )) - { - sal_Int32 nPos = 0; - ::rtl::OUString sToken = sValue.getToken( 1, '"', nPos); - sTemplate = sToken.getLength() ? sToken : sValue; - } - // \u Builds a table of contents by using the applied paragraph outline level - if( lcl_FindInCommand( pContext->GetCommand(), 'u', sValue )) - { - bFromOutline = true; - //todo: what doesn 'the applied paragraph outline level' refer to? - } - // \w Preserve tab characters within table entries - // if( lcl_FindInCommand( pContext->GetCommand(), 'w', sValue )) - // { - //todo: not supported - // } - // \x Preserve newline characters within table entries - // if( lcl_FindInCommand( pContext->GetCommand(), 'x', sValue )) - // { - //todo: unsupported - // } - // \z Hides page numbers within the table of contens when shown in Web Layout View - // if( lcl_FindInCommand( pContext->GetCommand(), 'z', sValue )) - // { //todo: unsupported feature } - - //if there's no option then it should be created from outline - if( !bFromOutline && !bFromEntries && !sTemplate.getLength() ) - bFromOutline = true; - - uno::Reference< beans::XPropertySet > xTOC( - m_xTextFactory->createInstance( - bTableOfFigures ? - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.IllustrationsIndex")) : - ::rtl::OUString::createFromAscii(aIt->second.cFieldServiceName)), - uno::UNO_QUERY_THROW); - xTOC->setPropertyValue(rPropNameSupplier.GetName( PROP_TITLE ), uno::makeAny(::rtl::OUString())); - if( !bTableOfFigures ) - { - xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_LEVEL ), uno::makeAny( nMaxLevel ) ); - xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_OUTLINE ), uno::makeAny( bFromOutline )); - xTOC->setPropertyValue( rPropNameSupplier.GetName( PROP_CREATE_FROM_MARKS ), uno::makeAny( bFromEntries )); - if( sTemplate.getLength() ) - { - //the string contains comma separated the names and related levels - //like: "Heading 1,1,Heading 2,2" - TOCStyleMap aMap; - sal_Int32 nLevel; - sal_Int32 nPosition = 0; - while( nPosition >= 0) - { - ::rtl::OUString sStyleName = sTemplate.getToken( 0, ',', nPosition ); - //empty tokens should be skipped - while( !sStyleName.getLength() && nPosition > 0 ) - sStyleName = sTemplate.getToken( 0, ',', nPosition ); - nLevel = sTemplate.getToken( 0, ',', nPosition ).toInt32(); - if( !nLevel ) - nLevel = 1; - if( sStyleName.getLength() ) - aMap.insert( TOCStyleMap::value_type(nLevel, sStyleName) ); - } - uno::Reference< container::XIndexReplace> xParaStyles; - xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_PARAGRAPH_STYLES)) >>= xParaStyles; - for( nLevel = 1; nLevel < 10; ++nLevel) - { - sal_Int32 nLevelCount = aMap.count( nLevel ); - if( nLevelCount ) - { - TOCStyleMap::iterator aTOCStyleIter = aMap.find( nLevel ); - - uno::Sequence< rtl::OUString> aStyles( nLevelCount ); - for ( sal_Int32 nStyle = 0; nStyle < nLevelCount; ++nStyle, ++aTOCStyleIter ) - { - aStyles[nStyle] = aTOCStyleIter->second; - } - xParaStyles->replaceByIndex(nLevel - 1, uno::makeAny(aStyles)); - } - } - xTOC->setPropertyValue(rPropNameSupplier.GetName(PROP_CREATE_FROM_LEVEL_PARAGRAPH_STYLES), uno::makeAny( true )); - - } - if(bHyperlinks || sChapterNoSeparator.getLength()) - { - uno::Reference< container::XIndexReplace> xLevelFormats; - xTOC->getPropertyValue(rPropNameSupplier.GetName(PROP_LEVEL_FORMAT)) >>= xLevelFormats; - sal_Int32 nLevelCount = xLevelFormats->getCount(); - //start with level 1, 0 is the header level - for( sal_Int32 nLevel = 1; nLevel < nLevelCount; ++nLevel) - { - uno::Sequence< beans::PropertyValues > aLevel; - xLevelFormats->getByIndex( nLevel ) >>= aLevel; - //create a copy of the level and add two new entries - hyperlink start and end - bool bChapterNoSeparator = sChapterNoSeparator.getLength() > 0; - sal_Int32 nAdd = (bHyperlinks && bChapterNoSeparator) ? 4 : 2; - uno::Sequence< beans::PropertyValues > aNewLevel( aLevel.getLength() + nAdd); - beans::PropertyValues* pNewLevel = aNewLevel.getArray(); - if( bHyperlinks ) - { - beans::PropertyValues aHyperlink(1); - aHyperlink[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE ); - aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_START ); - pNewLevel[0] = aHyperlink; - aHyperlink[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_HYPERLINK_END ); - pNewLevel[aNewLevel.getLength() -1] = aHyperlink; - } - if( bChapterNoSeparator ) - { - beans::PropertyValues aChapterNo(2); - aChapterNo[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE ); - aChapterNo[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_CHAPTER_INFO ); - aChapterNo[1].Name = rPropNameSupplier.GetName( PROP_CHAPTER_FORMAT ); - //todo: is ChapterFormat::Number correct? - aChapterNo[1].Value <<= (sal_Int16)text::ChapterFormat::NUMBER; - pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 4 : 2) ] = aChapterNo; - - beans::PropertyValues aChapterSeparator(2); - aChapterSeparator[0].Name = rPropNameSupplier.GetName( PROP_TOKEN_TYPE ); - aChapterSeparator[0].Value <<= rPropNameSupplier.GetName( PROP_TOKEN_TEXT ); - aChapterSeparator[1].Name = rPropNameSupplier.GetName( PROP_TEXT ); - aChapterSeparator[1].Value <<= sChapterNoSeparator; - pNewLevel[aNewLevel.getLength() - (bHyperlinks ? 3 : 1)] = aChapterSeparator; - } - //copy the 'old' entries except the last (page no) - for( sal_Int32 nToken = 0; nToken < aLevel.getLength() - 1; ++nToken) - { - pNewLevel[nToken + 1] = aLevel[nToken]; - } - //copy page no entry (last or last but one depending on bHyperlinks - sal_Int32 nPageNo = aNewLevel.getLength() - (bHyperlinks ? 2 : 3); - pNewLevel[nPageNo] = aLevel[aLevel.getLength() - 1]; - - xLevelFormats->replaceByIndex( nLevel, uno::makeAny( aNewLevel ) ); - } - } - } - pContext->SetTOC( xTOC ); - } + handleToc(pContext, rPropNameSupplier, xFieldInterface, xFieldProperties, + ::rtl::OUString::createFromAscii(aIt->second.cFieldServiceName)); break; case FIELD_TC : { @@ -3343,6 +3305,11 @@ bool DomainMapper_Impl::IsFieldResultAsString() -----------------------------------------------------------------------*/ void DomainMapper_Impl::SetFieldResult( ::rtl::OUString& rResult ) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("setFieldResult"); + dmapper_logger->chars(rResult); +#endif + FieldContextPtr pContext = m_aFieldStack.top(); OSL_ENSURE( pContext.get(), "no field context available"); if( pContext.get() ) @@ -3388,11 +3355,32 @@ void DomainMapper_Impl::SetFieldResult( ::rtl::OUString& rResult ) } } +void DomainMapper_Impl::SetFieldFFData(FFDataHandler::Pointer_t pFFDataHandler) +{ +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("setFieldFFData"); +#endif + + FieldContextPtr pContext = m_aFieldStack.top(); + if (pContext.get()) + { + pContext->setFFDataHandler(pFFDataHandler); + } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("setFieldFFData"); +#endif +} + /*-- 29.01.2007 11:33:17--------------------------------------------------- //the end of field is reached (0x15 appeared) - the command might still be open -----------------------------------------------------------------------*/ void DomainMapper_Impl::PopFieldContext() { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("popFieldContext"); +#endif + FieldContextPtr pContext = m_aFieldStack.top(); OSL_ENSURE( pContext.get(), "no field context available"); if( pContext.get() ) @@ -3426,15 +3414,23 @@ void DomainMapper_Impl::PopFieldContext() uno::Reference< text::XTextAppendAndConvert > xTextAppendAndConvert( xTextAppend, uno::UNO_QUERY_THROW ); xTextAppendAndConvert->appendTextContent( xToInsert, uno::Sequence< beans::PropertyValue >() ); } - else if(pContext->GetHyperlinkURL().getLength()) + else { - PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier(); - xCrsr->gotoEnd( true ); + FormControlHelper::Pointer_t pFormControlHelper(pContext->getFormControlHelper()); + if (pFormControlHelper.get() != NULL) + { + uno::Reference xTxtRange(xCrsr, uno::UNO_QUERY); + pFormControlHelper->insertControl(xTxtRange); + } + else if(pContext->GetHyperlinkURL().getLength()) + { + PropertyNameSupplier& rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier(); + xCrsr->gotoEnd( true ); - uno::Reference< beans::XPropertySet > xCrsrProperties( xCrsr, uno::UNO_QUERY_THROW ); - xCrsrProperties->setPropertyValue( - rPropNameSupplier.GetName(PROP_HYPER_LINK_U_R_L), uno:: - makeAny(pContext->GetHyperlinkURL())); + uno::Reference< beans::XPropertySet > xCrsrProperties( xCrsr, uno::UNO_QUERY_THROW ); + xCrsrProperties->setPropertyValue(rPropNameSupplier.GetName(PROP_HYPER_LINK_U_R_L), uno:: + makeAny(pContext->GetHyperlinkURL())); + } } } } @@ -3757,4 +3753,19 @@ void DomainMapper_Impl::ApplySettingsTable() } } } + +SectionPropertyMap * DomainMapper_Impl::GetSectionContext() +{ + SectionPropertyMap* pSectionContext = 0; + //the section context is not availabe before the first call of startSectionGroup() + if( !IsAnyTableImport() ) + { + PropertyMapPtr pContext = GetTopContextOfType(CONTEXT_SECTION); + OSL_ENSURE(pContext.get(), "Section context is not in the stack!"); + pSectionContext = dynamic_cast< SectionPropertyMap* >( pContext.get() ); + } + + return pSectionContext; +} + }} diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx old mode 100644 new mode 100755 index 00881d45968f..145e19412a75 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -52,6 +52,8 @@ #include #include #include +#include +#include #include #include @@ -134,6 +136,8 @@ class FieldContext ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xTOC;//TOX ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xTC;//TOX entry ::rtl::OUString m_sHyperlinkURL; + FFDataHandler::Pointer_t m_pFFDataHandler; + FormControlHelper::Pointer_t m_pFormControlHelper; public: FieldContext(::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > xStart); @@ -159,6 +163,13 @@ public: void SetHyperlinkURL( const ::rtl::OUString& rURL ) { m_sHyperlinkURL = rURL; } const ::rtl::OUString& GetHyperlinkURL() { return m_sHyperlinkURL; } + void setFFDataHandler(FFDataHandler::Pointer_t pFFDataHandler) { m_pFFDataHandler = pFFDataHandler; } + FFDataHandler::Pointer_t getFFDataHandler() const { return m_pFFDataHandler; } + + void setFormControlHelper(FormControlHelper::Pointer_t pFormControlHelper) { m_pFormControlHelper = pFormControlHelper; } + FormControlHelper::Pointer_t getFormControlHelper() const { return m_pFormControlHelper; } + + ::std::vector GetCommandParts() const; }; struct TextAppendContext @@ -487,12 +498,40 @@ public: bool IsOpenField() const; //collect the pieces of the command void AppendFieldCommand(::rtl::OUString& rPartOfCommand); + void handleFieldAsk + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties); + void handleAutoNum + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties); + void handleAuthor + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties); + void handleDocProperty + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties); + void handleToc + (FieldContextPtr pContext, + PropertyNameSupplier& rPropNameSupplier, + uno::Reference< uno::XInterface > & xFieldInterface, + uno::Reference< beans::XPropertySet > xFieldProperties, + const ::rtl::OUString & sTOCServiceName); //the field command has to be closed (0x14 appeared) void CloseFieldCommand(); //the _current_ fields require a string type result while TOCs accept richt results bool IsFieldResultAsString(); //apply the result text to the related field void SetFieldResult( ::rtl::OUString& rResult ); + // set FFData of top field context + void SetFieldFFData( FFDataHandler::Pointer_t pFFDataHandler ); //the end of field is reached (0x15 appeared) - the command might still be open void PopFieldContext(); @@ -557,7 +596,7 @@ public: void ResetParaRedline( ); void ApplySettingsTable(); - + SectionPropertyMap * GetSectionContext(); }; } //namespace dmapper } //namespace writerfilter diff --git a/writerfilter/source/dmapper/FFData.xml b/writerfilter/source/dmapper/FFData.xml new file mode 100644 index 000000000000..525f59391dc4 --- /dev/null +++ b/writerfilter/source/dmapper/FFData.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/writerfilter/source/dmapper/FFDataHandler.cxx b/writerfilter/source/dmapper/FFDataHandler.cxx new file mode 100644 index 000000000000..9f9430401161 --- /dev/null +++ b/writerfilter/source/dmapper/FFDataHandler.cxx @@ -0,0 +1,483 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: PropertyMap.hxx,v $ + * $Revision: 1.18 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#include "FFDataHandler.hxx" + +#include +#ifdef DEBUG_DOMAINMAPPER +#include +#include "dmapperLoggers.hxx" +#endif +namespace writerfilter { +namespace dmapper { + +/************************ + * class: FFDataHandler * + ************************/ + +FFDataHandler::FFDataHandler() +: m_bEnabled(false), + m_bCalcOnExit(false), + m_nHelpTextType(0), + m_nStatusTextType(0), + m_nCheckboxHeight(0), + m_bCheckboxAutoHeight(false), + m_bCheckboxDefault(false), + m_bCheckboxChecked(false), + m_nTextType(0), + m_nTextMaxLength(0) +{ +} + + +FFDataHandler::~FFDataHandler() +{ +} + +// member: FFDataHandler::name +void FFDataHandler::setName(const rtl::OUString & r_sName) +{ + m_sName = r_sName; +} + +const rtl::OUString & FFDataHandler::getName() const +{ + return m_sName; +} + +// member: FFDataHandler::enabled +void FFDataHandler::setEnabled(bool r_enabled) +{ + m_bEnabled = r_enabled; +} + +bool FFDataHandler::getEnabled() const +{ + return m_bEnabled; +} + +// member: FFDataHandler::calcOnExit +void FFDataHandler::setCalcOnExit(bool r_calcOnExit) +{ + m_bCalcOnExit = r_calcOnExit; +} + +bool FFDataHandler::getCalcOnExit() const +{ + return m_bCalcOnExit; +} + +// member: FFDataHandler::entryMacro +void FFDataHandler::setEntryMacro(const rtl::OUString & r_sEntryMacro) +{ + m_sEntryMacro = r_sEntryMacro; +} + +const rtl::OUString & FFDataHandler::getEntryMacro() const +{ + return m_sEntryMacro; +} + +// member: FFDataHandler::exitMacro +void FFDataHandler::setExitMacro(const rtl::OUString & r_sExitMacro) +{ + m_sExitMacro = r_sExitMacro; +} + +const rtl::OUString & FFDataHandler::getExitMacro() const +{ + return m_sExitMacro; +} + +// member: FFDataHandler::helpTextType +void FFDataHandler::setHelpTextType(sal_uInt32 r_helpTextType) +{ + m_nHelpTextType = r_helpTextType; +} + +sal_uInt32 FFDataHandler::getHelpTextType() const +{ + return m_nHelpTextType; +} + +// member: FFDataHandler::helpText +void FFDataHandler::setHelpText(const rtl::OUString & r_sHelpText) +{ + m_sHelpText = r_sHelpText; +} + +const rtl::OUString & FFDataHandler::getHelpText() const +{ + return m_sHelpText; +} + +// member: FFDataHandler::statusTextType +void FFDataHandler::setStatusTextType(sal_uInt32 r_statusTextType) +{ + m_nStatusTextType = r_statusTextType; +} + +sal_uInt32 FFDataHandler::getStatusTextType() const +{ + return m_nStatusTextType; +} + +// member: FFDataHandler::statusText +void FFDataHandler::setStatusText(const rtl::OUString & r_sStatusText) +{ + m_sStatusText = r_sStatusText; +} + +const rtl::OUString & FFDataHandler::getStatusText() const +{ + return m_sStatusText; +} + +// member: FFDataHandler::checkboxHeight +void FFDataHandler::setCheckboxHeight(sal_uInt32 r_checkboxHeight) +{ + m_nCheckboxHeight = r_checkboxHeight; +} + +sal_uInt32 FFDataHandler::getCheckboxHeight() const +{ + return m_nCheckboxHeight; +} + +// member: FFDataHandler::checkboxAutoHeight +void FFDataHandler::setCheckboxAutoHeight(bool r_checkboxAutoHeight) +{ + m_bCheckboxAutoHeight = r_checkboxAutoHeight; +} + +bool FFDataHandler::getCheckboxAutoHeight() const +{ + return m_bCheckboxAutoHeight; +} + +// member: FFDataHandler::checkboxDefault +void FFDataHandler::setCheckboxDefault(bool r_checkboxDefault) +{ + m_bCheckboxDefault = r_checkboxDefault; +} + +bool FFDataHandler::getCheckboxDefault() const +{ + return m_bCheckboxDefault; +} + +// member: FFDataHandler::checkboxChecked +void FFDataHandler::setCheckboxChecked(bool r_checkboxChecked) +{ + m_bCheckboxChecked = r_checkboxChecked; +} + +bool FFDataHandler::getCheckboxChecked() const +{ + return m_bCheckboxChecked; +} + +// member: FFDataHandler::dropDownResult +void FFDataHandler::setDropDownResult(const rtl::OUString & r_sDropDownResult) +{ + m_sDropDownResult = r_sDropDownResult; +} + +const rtl::OUString & FFDataHandler::getDropDownResult() const +{ + return m_sDropDownResult; +} + +// member: FFDataHandler::dropDownDefault +void FFDataHandler::setDropDownDefault(const rtl::OUString & r_sDropDownDefault) +{ + m_sDropDownDefault = r_sDropDownDefault; +} + +const rtl::OUString & FFDataHandler::getDropDownDefault() const +{ + return m_sDropDownDefault; +} + +// member: FFDataHandler::dropDownEntries +void FFDataHandler::setDropDownEntries(const FFDataHandler::DropDownEntries_t & r_dropDownEntries) +{ + m_DropDownEntries = r_dropDownEntries; +} + +const FFDataHandler::DropDownEntries_t & FFDataHandler::getDropDownEntries() const +{ + return m_DropDownEntries; +} + +void FFDataHandler::dropDownEntriesPushBack(const rtl::OUString & r_Element) +{ + m_DropDownEntries.push_back(r_Element); +} + +// member: FFDataHandler::textType +void FFDataHandler::setTextType(sal_uInt32 r_textType) +{ + m_nTextType = r_textType; +} + +sal_uInt32 FFDataHandler::getTextType() const +{ + return m_nTextType; +} + +// member: FFDataHandler::textMaxLength +void FFDataHandler::setTextMaxLength(sal_uInt32 r_textMaxLength) +{ + m_nTextMaxLength = r_textMaxLength; +} + +sal_uInt32 FFDataHandler::getTextMaxLength() const +{ + return m_nTextMaxLength; +} + +// member: FFDataHandler::textDefault +void FFDataHandler::setTextDefault(const rtl::OUString & r_sTextDefault) +{ + m_sTextDefault = r_sTextDefault; +} + +const rtl::OUString & FFDataHandler::getTextDefault() const +{ + return m_sTextDefault; +} + +// member: FFDataHandler::textFormat +void FFDataHandler::setTextFormat(const rtl::OUString & r_sTextFormat) +{ + m_sTextFormat = r_sTextFormat; +} + +const rtl::OUString & FFDataHandler::getTextFormat() const +{ + return m_sTextFormat; +} + + +void FFDataHandler::sprm(Sprm & r_Sprm) +{ +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("FFDataHandler.sprm"); + dmapper_logger->chars(r_Sprm.toString()); +#endif + switch(r_Sprm.getId()) + { + case NS_ooxml::LN_CT_FFData_name: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sName = r_Sprm.getValue()->getString(); + } + break; + case NS_ooxml::LN_CT_FFData_enabled: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_bEnabled = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFData_calcOnExit: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_bCalcOnExit = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFData_entryMacro: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sEntryMacro = r_Sprm.getValue()->getString(); + } + break; + case NS_ooxml::LN_CT_FFData_exitMacro: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sExitMacro = r_Sprm.getValue()->getString(); + } + break; + case NS_ooxml::LN_CT_FFData_helpText: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + resolveSprm(r_Sprm); + } + break; + case NS_ooxml::LN_CT_FFData_statusText: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + resolveSprm(r_Sprm); + } + break; + case NS_ooxml::LN_CT_FFCheckBox_size: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_nCheckboxHeight = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFCheckBox_sizeAuto: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_bCheckboxAutoHeight = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFCheckBox_default: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_bCheckboxDefault = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFCheckBox_checked: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_bCheckboxChecked = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFData_checkBox: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + resolveSprm(r_Sprm); + } + break; + case NS_ooxml::LN_CT_FFDDList_result: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sDropDownResult = r_Sprm.getValue()->getString(); + } + break; + case NS_ooxml::LN_CT_FFDDList_default: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sDropDownDefault = r_Sprm.getValue()->getString(); + } + break; + case NS_ooxml::LN_CT_FFDDList_listEntry: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_DropDownEntries.push_back(r_Sprm.getValue()->getString());; + } + break; + case NS_ooxml::LN_CT_FFData_ddList: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + resolveSprm(r_Sprm); + } + break; + case NS_ooxml::LN_CT_FFTextInput_type: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_nTextType = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFTextInput_default: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sTextDefault = r_Sprm.getValue()->getString(); + } + break; + case NS_ooxml::LN_CT_FFTextInput_maxLength: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_nTextMaxLength = r_Sprm.getValue()->getInt(); + } + break; + case NS_ooxml::LN_CT_FFTextInput_format: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sTextFormat = r_Sprm.getValue()->getString(); + } + break; + case NS_ooxml::LN_CT_FFData_textInput: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + resolveSprm(r_Sprm); + } + break; + default: +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif + break; + } +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("FFDataHandler.sprm"); +#endif +} + +void FFDataHandler::resolveSprm(Sprm & r_Sprm) +{ + writerfilter::Reference::Pointer_t pProperties = r_Sprm.getProps(); + if( pProperties.get()) + pProperties->resolve(*this); +} + +void FFDataHandler::attribute(Id name, Value & val) +{ +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("FFDataHandler.attribute"); + dmapper_logger->attribute("name", (*QNameToString::Instance())(name)); + dmapper_logger->attribute("value", val.toString()); + dmapper_logger->endElement("FFDataHandler.attribute"); +#endif + switch (name) + { + case NS_ooxml::LN_CT_FFHelpText_type: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_nHelpTextType = val.getInt(); + } + break; + case NS_ooxml::LN_CT_FFHelpText_val: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sHelpText = val.getString(); + } + break; + case NS_ooxml::LN_CT_FFStatusText_type: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_nStatusTextType = val.getInt(); + } + break; + case NS_ooxml::LN_CT_FFStatusText_val: + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + { + m_sStatusText = val.getString(); + } + break; + default: +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif + break; + } +} + +}} diff --git a/writerfilter/source/dmapper/FFDataHandler.hxx b/writerfilter/source/dmapper/FFDataHandler.hxx new file mode 100644 index 000000000000..fb7a4ccee950 --- /dev/null +++ b/writerfilter/source/dmapper/FFDataHandler.hxx @@ -0,0 +1,161 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: PropertyMap.hxx,v $ + * $Revision: 1.18 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef INCLUDED_FFDataHandler_HXX +#define INCLUDED_FFDataHandler_HXX +#include +#include +namespace writerfilter { +namespace dmapper { +class FFDataHandler : public Properties +{ +public: + // typedefs + typedef ::boost::shared_ptr Pointer_t; + typedef ::std::vector DropDownEntries_t; + + // constructor + FFDataHandler(); + // destructor + virtual ~FFDataHandler(); + + // member: name + void setName(const rtl::OUString & r_sName); + const rtl::OUString & getName() const; + + // member: enabled + void setEnabled(bool r_enabled); + bool getEnabled() const; + + // member: calcOnExit + void setCalcOnExit(bool r_calcOnExit); + bool getCalcOnExit() const; + + // member: entryMacro + void setEntryMacro(const rtl::OUString & r_sEntryMacro); + const rtl::OUString & getEntryMacro() const; + + // member: exitMacro + void setExitMacro(const rtl::OUString & r_sExitMacro); + const rtl::OUString & getExitMacro() const; + + // member: helpTextType + void setHelpTextType(sal_uInt32 r_helpTextType); + sal_uInt32 getHelpTextType() const; + + // member: helpText + void setHelpText(const rtl::OUString & r_sHelpText); + const rtl::OUString & getHelpText() const; + + // member: statusTextType + void setStatusTextType(sal_uInt32 r_statusTextType); + sal_uInt32 getStatusTextType() const; + + // member: statusText + void setStatusText(const rtl::OUString & r_sStatusText); + const rtl::OUString & getStatusText() const; + + // member: checkboxHeight + void setCheckboxHeight(sal_uInt32 r_checkboxHeight); + sal_uInt32 getCheckboxHeight() const; + + // member: checkboxAutoHeight + void setCheckboxAutoHeight(bool r_checkboxAutoHeight); + bool getCheckboxAutoHeight() const; + + // member: checkboxDefault + void setCheckboxDefault(bool r_checkboxDefault); + bool getCheckboxDefault() const; + + // member: checkboxChecked + void setCheckboxChecked(bool r_checkboxChecked); + bool getCheckboxChecked() const; + + // member: dropDownResult + void setDropDownResult(const rtl::OUString & r_sDropDownResult); + const rtl::OUString & getDropDownResult() const; + + // member: dropDownDefault + void setDropDownDefault(const rtl::OUString & r_sDropDownDefault); + const rtl::OUString & getDropDownDefault() const; + + // member: dropDownEntries + void setDropDownEntries(const DropDownEntries_t & r_dropDownEntries); + const DropDownEntries_t & getDropDownEntries() const; + void dropDownEntriesPushBack(const rtl::OUString & r_Element); + + // member: textType + void setTextType(sal_uInt32 r_textType); + sal_uInt32 getTextType() const; + + // member: textMaxLength + void setTextMaxLength(sal_uInt32 r_textMaxLength); + sal_uInt32 getTextMaxLength() const; + + // member: textDefault + void setTextDefault(const rtl::OUString & r_sTextDefault); + const rtl::OUString & getTextDefault() const; + + // member: textFormat + void setTextFormat(const rtl::OUString & r_sTextFormat); + const rtl::OUString & getTextFormat() const; + + // sprm + void sprm(Sprm & r_sprm); + void resolveSprm(Sprm & r_sprm); + + // attribute + void attribute(Id name, Value & val); + +private: + rtl::OUString m_sName; + bool m_bEnabled; + bool m_bCalcOnExit; + rtl::OUString m_sEntryMacro; + rtl::OUString m_sExitMacro; + sal_uInt32 m_nHelpTextType; + rtl::OUString m_sHelpText; + sal_uInt32 m_nStatusTextType; + rtl::OUString m_sStatusText; + sal_uInt32 m_nCheckboxHeight; + bool m_bCheckboxAutoHeight; + bool m_bCheckboxDefault; + bool m_bCheckboxChecked; + rtl::OUString m_sDropDownResult; + rtl::OUString m_sDropDownDefault; + DropDownEntries_t m_DropDownEntries; + sal_uInt32 m_nTextType; + sal_uInt32 m_nTextMaxLength; + rtl::OUString m_sTextDefault; + rtl::OUString m_sTextFormat; +}; + + +}} +#endif //INCLUDED_FFDataHandler_HXX diff --git a/writerfilter/source/dmapper/FieldTypes.hxx b/writerfilter/source/dmapper/FieldTypes.hxx new file mode 100644 index 000000000000..d0a98efcb0fb --- /dev/null +++ b/writerfilter/source/dmapper/FieldTypes.hxx @@ -0,0 +1,299 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef INCLUDED_FIELD_TYPES_HXX +#define INCLUDED_FIELD_TYPES_HXX + +namespace writerfilter { +namespace dmapper { + +enum FieldId +{ + /* ADDRESSBLOCK \d \* MERGEFORMAT -> Addressblock completely unsupported*/ + FIELD_ADDRESSBLOCK + /* ADVANCE \d downvalue \l leftvalue \r rightvalue \u upvalue \x xvalue \y yvalue -> unsupported*/ + ,FIELD_ADVANCE + /* ASK bookmarkname "hint" \d defaultanswer \o \* MERGEFORMAT -> + the hint is not always quoted, inputfield with default answer, prompt before merge (\o) + */ + ,FIELD_ASK + /* AUTONUM \* Numberingswitch -> + mapped to sequence field "AutoNr" + */ + ,FIELD_AUTONUM + /* AUTONUMLGL \* Numberingswitch -> + mapped to sequence field "AutoNr" + */ + ,FIELD_AUTONUMLGL + /* AUTONUMOUT \* Numberingswitch -> + mapped to sequence field "AutoNr" + */ + ,FIELD_AUTONUMOUT + /* AUTHOR NewAuthor \* defaultswitch \* MERGEFORMAT -> + mapped to sequence field "AutoNr" + */ + ,FIELD_AUTHOR + /* COMMENTS "comment" \* MERGEFORMAT -> + Docinfo-Comments + */ + ,FIELD_COMMENTS + /* CREATEDATE \h \* MERGEFORMAT -> + docinfo-created-date + */ + ,FIELD_CREATEDATE + /* DATE \@ "number format" \s \* MERGEFORMAT -> + ww8filterimprovement: multiple languages now supported + */ + ,FIELD_DATE + /* DOCPROPERTY propertyname \* MERGEFORMAT -> + ww8filterimprovement: some fields imported as functionally equivalent fields if possible, + the others imported as UserField + */ + ,FIELD_DOCPROPERTY + /* DOCVARIABLE Name \* MERGEFORMAT -> + ww8filterimprovement: now imported as user fields + */ + ,FIELD_DOCVARIABLE + /* EDITTIME \# "displayformat" \* Numberingswitch \* MERGEFORMAT -> + DocInfo-Modified-Date + ww8filterimprovement: multiple languages now supported + */ + ,FIELD_EDITTIME + /* FILLIN "text to fill in" \d defaultanswer \o \* MERGEFORMAT -> + Function-InputField + */ + ,FIELD_FILLIN + /* FILENAME \p \* * MERGEFORMAT -> + file name (\p with path) + */ + ,FIELD_FILENAME + /* FILESIZE \* NumberingType \* MERGEFORMAT -> + not imported in old ww8 filter, see lcl_ParseNumberingType + todo find alternative field + */ + ,FIELD_FILESIZE + /* =formula \# "number format" + todo find alternative field + */ + ,FIELD_FORMULA + /* FORMCHECKBOX */ + ,FIELD_FORMCHECKBOX + /* FORMDROPDOWN */ + ,FIELD_FORMDROPDOWN + /* FORMTEXT */ + ,FIELD_FORMTEXT + /* GOTOBUTTON text \* MERGEFORMAT -> + not imported in old ww8 filter + todo find alternative field + */ + ,FIELD_GOTOBUTTON + /* HYPERLINK "link" \* MERGEFORMAT -> + not imported in old ww8 filter + ww8filterimprovement: now imported as hyperlink + */ + ,FIELD_HYPERLINK + /* IF condition "then text" "else text" -> + not imported in old ww8 filter + ww8filterimprovement: now imported + todo: condition, if text, else text still missing + */ + ,FIELD_IF + /* INFO NameOfInfo \* MERGEFORMAT -> old + todo: filter imports wrong? + */ + ,FIELD_INFO + /* INCLUDEPICTURE path \* MERGEFORMAT-> + old filter imports an embedded picture + todo: not yet supported + */ + ,FIELD_INCLUDEPICTURE + /* KEYWORDS keyword \* defaultswitch \* Numberingswitch \* MERGEFORMAT -> + DocInfo Keywords + */ + ,FIELD_KEYWORDS + /* LASTSAVEDBY \* MERGEFORMAT -> + DocInfo-Modified-Author + */ + ,FIELD_LASTSAVEDBY + /* MACROBUTTON MacroName quick help text -> + Macro field + */ + ,FIELD_MACROBUTTON + /* MERGEFIELD ColumName \b prefix \f suffix \* MERGEFORMAT -> + ww8filterimprovement: column-only API now upporterd + */ + ,FIELD_MERGEFIELD + /* MERGEREC \* MERGEFORMAT -> + RecordNumber field, maybe without db name + todo: currently unchecked + */ + ,FIELD_MERGEREC + /* MERGESEQ \* MERGEFORMAT -> + not imported in old ww8 filter + ww8filterimprovement: now imported + todo: currently unchecked + */ + ,FIELD_MERGESEQ + /* NEXT text -> + Next record + todo: currently unchecked + */ + ,FIELD_NEXT + /* NEXTIF condition + todo: condition not imported + */ + ,FIELD_NEXTIF + /* PAGE \* Numberingswitch \* MERGEFORMAT -> + see lcl_ParseNumberingType + */ + ,FIELD_PAGE + /* REF targetbkm \f \* MERGEFORMAT -> + imports a ShowVariable (bookmarkname)? + \h hyerlink to paragraph + \p relative to para above/below + \f refenence number + \d separator number separator + \n paragraph number + \r paragraph number in relative context + \t suppres non delimiters + \w paragraph number in full context + \* Upper/Lower... + */ + ,FIELD_REF // + /* REVNUM \* Numberingswitch \* MERGEFORMAT -> + DocInfo-revision number + */ + ,FIELD_REVNUM + /* SAVEDATE \@ "NumberFormat"\* MERGEFORMAT -> + DocInfo-modified-date + */ + ,FIELD_SAVEDATE + /* SECTION \* NumberFormat \* MERGEFORMAT -> + not imported in old ww8 filter see lcl_ParseNumberingType + todo: find alternative + */ + ,FIELD_SECTION + /* SECTIONPAGES \* NumberFormat \* MERGEFORMAT -> + not imported in old ww8 filter see lcl_ParseNumberingType + todo: find alternative + */ + ,FIELD_SECTIONPAGES + /* SEQ sequencename \h \c \n \r \s \* MERGEFORMAT -> + number range name:sequencename value:sequencename+1 + todo: only partially implemented, switches unsupported + */ + ,FIELD_SEQ + /* SET bookmarkname newtext \* MERGEFORMAT -> + SetVariable bookmarkname = newtext + todo: not implemented yet + */ + ,FIELD_SET + /* SKIPIF condition \* MERGEFORMAT -> + ?? + todo: not implemented yet + */ + ,FIELD_SKIPIF + /* STYLEREF stylename \* MERGEFORMAT -> + not imported in old ww8 filter + todo: add an equivalent field type + */ + ,FIELD_STYLEREF + /* SUBJECT subject \* Defaultswitch \* MERGEFORMAT -> + DocInfo - subject + */ + ,FIELD_SUBJECT + /* SYMBOL symbolnumber \* MERGEFORMAT -> + inserts a special char (symbolnumber) + todo: find alternative + */ + ,FIELD_SYMBOL + /* TEMPLATE \* Defaultswitch \* MERGEFORMAT + TemplateName field + */ + ,FIELD_TEMPLATE + /* TIME \@ "number format" \* MERGEFORMAT + ww8filterimprovement: multiple languages now supported + */ + ,FIELD_TIME + /* TITLE \* Defaultswitch \* MERGEFORMAT -> + DocInfo-title + */ + ,FIELD_TITLE + /* USERINITIALS newinitials \* MERGEFORMAT -> + ExtendedUser field (SHORTCUT) + */ + ,FIELD_USERINITIALS + /* USERADDRESS \* MERGEFORMAT -> + not imported in old ww8 filter + todo: find alternative + */ + ,FIELD_USERADDRESS + /* USERNAME newusername \* MERGEFORMAT -> + not imported in old ww8 filter + todo: import as extended user field(s) + */ + ,FIELD_USERNAME + /* + TOC options: + \a Builds a table of figures but does not include the captions's label and number + \b Uses a bookmark to specify area of document from which to build table of contents + \c Builds a table of figures of the given label + \d Defines the separator between sequence and page numbers + \f Builds a table of contents using TC entries instead of outline levels + \h Hyperlinks the entries and page numbers within the table of contents + \l Defines the TC entries field level used to build a table of contents + \n Builds a table of contents or a range of entries, sucah as “1-9”, in a table of contents without page numbers + \o Builds a table of contents by using outline levels instead of TC entries + \p Defines the separator between the table entry and its page number + \s Builds a table of contents by using a sequence type + \t Builds a table of contents by using style names other than the standard outline styles + \u Builds a table of contents by using the applied paragraph outline level + \w Preserve tab characters within table entries + \x Preserve newline characters within table entries + \z Hides page numbers within the table of contens when shown in Web Layout View + */ + ,FIELD_TOC + /* + TOC entry: “text” + \f TC entry in doc with multiple tables + \l Outline Level + \n Suppress page numbers + example: TOC "EntryText \f \l 2 \n + */ + ,FIELD_TC + /* document statistic - number of characters + */ + ,FIELD_NUMCHARS + /* document statistic - number of words + */ + ,FIELD_NUMWORDS + /* document statistic - number of pages + */ + ,FIELD_NUMPAGES +}; + +}} +#endif // INCLUDED_FIELD_TYPES_HXX diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx new file mode 100644 index 000000000000..eebf921f4963 --- /dev/null +++ b/writerfilter/source/dmapper/FormControlHelper.cxx @@ -0,0 +1,309 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FormControlHelper.hxx" + +namespace writerfilter { +namespace dmapper { + +using namespace ::com::sun::star; + +struct FormControlHelper::FormControlHelper_Impl +{ + FieldId m_eFieldId; + awt::Size aSize; + uno::Reference rDrawPage; + uno::Reference rForm; + uno::Reference rFormComponent; + uno::Reference rServiceFactory; + uno::Reference rTextDocument; + + uno::Reference getDrawPage(); + uno::Reference getServiceFactory(); + uno::Reference getForm(); + uno::Reference getFormComps(); +}; + +uno::Reference FormControlHelper::FormControlHelper_Impl::getDrawPage() +{ + if (! rDrawPage.is()) + { + uno::Reference + xDrawPageSupplier(rTextDocument, uno::UNO_QUERY); + if (xDrawPageSupplier.is()) + rDrawPage = xDrawPageSupplier->getDrawPage(); + } + + return rDrawPage; +} + +uno::Reference FormControlHelper::FormControlHelper_Impl::getServiceFactory() +{ + if (! rServiceFactory.is()) + rServiceFactory = uno::Reference(rTextDocument, uno::UNO_QUERY); + + return rServiceFactory; +} + +uno::Reference FormControlHelper::FormControlHelper_Impl::getForm() +{ + if (! rForm.is()) + { + uno::Reference xFormsSupplier(getDrawPage(), uno::UNO_QUERY); + + if (xFormsSupplier.is()) + { + uno::Reference xFormsNamedContainer(xFormsSupplier->getForms()); + static ::rtl::OUString sDOCXForm(RTL_CONSTASCII_USTRINGPARAM("DOCX-Standard")); + + ::rtl::OUString sFormName(sDOCXForm); + sal_uInt16 nUnique = 0; + + while (xFormsNamedContainer->hasByName(sFormName)) + { + ++nUnique; + sFormName = sDOCXForm; + sFormName += ::rtl::OUString::valueOf(nUnique); + } + + uno::Reference + xForm(getServiceFactory()->createInstance + (::rtl::OUString + (RTL_CONSTASCII_USTRINGPARAM + ("com.sun.star.form.component.Form")))); + if (xForm.is()) + { + uno::Reference + xFormProperties(xForm, uno::UNO_QUERY); + uno::Any aAny(sFormName); + static ::rtl::OUString sName(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"))); + xFormProperties->setPropertyValue(sName, aAny); + } + + rForm = uno::Reference(xForm, uno::UNO_QUERY); + + uno::Reference xForms(xFormsNamedContainer, uno::UNO_QUERY); + uno::Any aAny(xForm); + xForms->insertByIndex(xForms->getCount(), aAny); + } + } + + return rForm; +} + +uno::Reference FormControlHelper::FormControlHelper_Impl::getFormComps() +{ + uno::Reference xIndexContainer(getForm(), uno::UNO_QUERY); + + return xIndexContainer; +} + +FormControlHelper::FormControlHelper(FieldId eFieldId, + uno::Reference rTextDocument, + FFDataHandler::Pointer_t pFFData) + : m_pFFData(pFFData), m_pImpl(new FormControlHelper_Impl) +{ + m_pImpl->m_eFieldId = eFieldId; + m_pImpl->rTextDocument = rTextDocument; +} + +FormControlHelper::~FormControlHelper() +{ +} + +bool FormControlHelper::createCheckbox(uno::Reference xTextRange, + const ::rtl::OUString & rControlName) +{ + uno::Reference + xServiceFactory(m_pImpl->getServiceFactory()); + + if (! xServiceFactory.is()) + return false; + + uno::Reference xInterface = + xServiceFactory->createInstance + (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.form.component.CheckBox"))); + + if (!xInterface.is()) + return false; + + m_pImpl->rFormComponent = uno::Reference(xInterface, uno::UNO_QUERY); + if (!m_pImpl->rFormComponent.is()) + return false; + + uno::Reference xPropSet(xInterface, uno::UNO_QUERY); + + sal_uInt32 nCheckBoxHeight = 16 * m_pFFData->getCheckboxHeight(); + + if (m_pFFData->getCheckboxAutoHeight()) + { + uno::Reference xTextRangeProps(xTextRange, uno::UNO_QUERY); + + try + { + static ::rtl::OUString sCharHeight(RTL_CONSTASCII_USTRINGPARAM("CharHeight")); + float fCheckBoxHeight = 0.0; + xTextRangeProps->getPropertyValue(sCharHeight) >>= fCheckBoxHeight; + nCheckBoxHeight = floor(fCheckBoxHeight * 35.3); + } + catch (beans::UnknownPropertyException & rException) + { + } + } + + m_pImpl->aSize.Width = nCheckBoxHeight; + m_pImpl->aSize.Height = m_pImpl->aSize.Width; + + uno::Any aAny; + if (m_pFFData->getStatusText().getLength()) + { + aAny <<= m_pFFData->getStatusText(); + + xPropSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpText")), aAny); + } + + aAny <<= m_pFFData->getCheckboxChecked(); + xPropSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultState")), aAny); + + if (m_pFFData->getHelpText().getLength()) + { + aAny <<= m_pFFData->getHelpText(); + xPropSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HelpF1Text")), aAny); + } + + aAny <<= rControlName; + xPropSet->setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aAny); + + return true; +} + +bool FormControlHelper::insertControl(uno::Reference xTextRange) +{ + bool bCreated = false; + + uno::Reference xFormCompsByName(m_pImpl->getForm(), uno::UNO_QUERY); + uno::Reference xFormComps(m_pImpl->getFormComps()); + if (! xFormComps.is()) + return false; + + static ::rtl::OUString sControl(RTL_CONSTASCII_USTRINGPARAM("Control")); + + sal_Int32 nControl = 0; + bool bDone = false; + ::rtl::OUString sControlName; + + do + { + ::rtl::OUString sTmp(sControl); + sTmp += ::rtl::OUString::valueOf(nControl); + + nControl++; + if (! xFormCompsByName->hasByName(sTmp)) + { + sControlName = sTmp; + bDone = true; + } + } + while (! bDone); + + switch (m_pImpl->m_eFieldId) + { + case FIELD_FORMCHECKBOX: + bCreated = createCheckbox(xTextRange, sControlName); + break; + default: + break; + } + + if (!bCreated) + return false; + + uno::Any aAny(m_pImpl->rFormComponent); + xFormComps->insertByIndex(xFormComps->getCount(), aAny); + + if (! m_pImpl->getServiceFactory().is()) + return false; + + uno::Reference xInterface = + m_pImpl->getServiceFactory()->createInstance + (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"))); + + if (! xInterface.is()) + return false; + + uno::Reference xShape(xInterface, uno::UNO_QUERY); + + if (! xShape.is()) + return false; + + xShape->setSize(m_pImpl->aSize); + + uno::Reference xShapeProps(xShape, uno::UNO_QUERY); + + sal_uInt16 nTmp = text::TextContentAnchorType_AS_CHARACTER; + aAny <<= nTmp; + + static const ::rtl::OUString sAnchorType(RTL_CONSTASCII_USTRINGPARAM("AnchorType")); + xShapeProps->setPropertyValue(sAnchorType, aAny); + + static const ::rtl::OUString sVertOrient(RTL_CONSTASCII_USTRINGPARAM("VertOrient")); + nTmp = text::VertOrientation::CENTER; + aAny <<= nTmp; + xShapeProps->setPropertyValue(sVertOrient, aAny); + + aAny <<= xTextRange; + + static const ::rtl::OUString sTextRange(RTL_CONSTASCII_USTRINGPARAM("TextRange")); + xShapeProps->setPropertyValue(sTextRange, aAny); + + uno::Reference xControlShape(xShape, uno::UNO_QUERY); + uno::Reference xControlModel(m_pImpl->rFormComponent, uno::UNO_QUERY); + xControlShape->setControl(xControlModel); + + m_pImpl->getDrawPage()->add(xShape); + + return true; +} + +}} diff --git a/writerfilter/source/dmapper/FormControlHelper.hxx b/writerfilter/source/dmapper/FormControlHelper.hxx new file mode 100644 index 000000000000..21b50912a039 --- /dev/null +++ b/writerfilter/source/dmapper/FormControlHelper.hxx @@ -0,0 +1,64 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef INCLUDED_FORM_CONTROL_HELPER_HXX +#define INCLUDED_FORM_CONTROL_HELPER_HXX + +#include +#include +#include +#include "FieldTypes.hxx" + +namespace writerfilter { +namespace dmapper { + +using namespace ::com::sun::star; + +class FormControlHelper +{ +public: + typedef boost::shared_ptr Pointer_t; + FormControlHelper(FieldId eFieldId, + uno::Reference rTextDocument, + FFDataHandler::Pointer_t pFFData); + ~FormControlHelper(); + + bool insertControl(uno::Reference xTextRange); + +private: + FFDataHandler::Pointer_t m_pFFData; + struct FormControlHelper_Impl; + typedef boost::shared_ptr ImplPointer_t; + ImplPointer_t m_pImpl; + + bool createCheckbox(uno::Reference xTextRange, + const ::rtl::OUString & rControlName); +}; + +} +} + +#endif // INCLUDED_FORM_CONTROL_HELPER_HXX diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx index fb99f254ef86..abb2ca46a9c9 100644 --- a/writerfilter/source/dmapper/PropertyIds.cxx +++ b/writerfilter/source/dmapper/PropertyIds.cxx @@ -320,6 +320,8 @@ const rtl::OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const case PROP_OUTLINE_LEVEL : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OutlineLevel")); break; case PROP_LISTTAB_STOP_POSITION : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ListtabStopPosition")); break; case PROP_POSITION_AND_SPACE_MODE : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PositionAndSpaceMode")); break; + case PROP_PARA_SPLIT: sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaSplit")); break; + case PROP_HELP: sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Help")); break; case PROP_HEADING_STYLE_NAME: sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName")); break; // case : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break; // case : sName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")); break; diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx index 1d5992cc212c..2066cf58f530 100644 --- a/writerfilter/source/dmapper/PropertyIds.hxx +++ b/writerfilter/source/dmapper/PropertyIds.hxx @@ -284,6 +284,8 @@ enum PropertyIds /*248*/ ,PROP_LISTTAB_STOP_POSITION /*249*/ ,PROP_POSITION_AND_SPACE_MODE /*250*/ ,PROP_HEADING_STYLE_NAME +/*251*/ ,PROP_PARA_SPLIT +/*252*/ ,PROP_HELP }; struct PropertyNameSupplier_Impl; class PropertyNameSupplier diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index aa8a29c5e6a2..11930fb01972 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include "dmapperLoggers.hxx" #include "PropertyMapHelper.hxx" @@ -155,6 +156,18 @@ XMLTag::Pointer_t PropertyMap::toTag() const sal_Int32 aInt; aMapIter->second >>= aInt; pTag->addAttr("value", aInt); + + sal_uInt32 auInt; + aMapIter->second >>= auInt; + pTag->addAttr("unsignedValue", auInt); + + float aFloat; + aMapIter->second >>= aFloat; + pTag->addAttr("floatValue", aFloat); + + ::rtl::OUString aStr; + aMapIter->second >>= auInt; + pTag->addAttr("stringValue", aStr); } catch (...) { } @@ -244,6 +257,7 @@ SectionPropertyMap::SectionPropertyMap(bool bIsFirstSection) : ,m_nDzaGutter( 0 ) ,m_bGutterRTL( false ) ,m_bSFBiDi( false ) + ,m_nGridType(0) ,m_nGridLinePitch( 1 ) ,m_nDxtCharSpace( 0 ) ,m_nLnnMod( 0 ) @@ -274,7 +288,7 @@ SectionPropertyMap::SectionPropertyMap(bool bIsFirstSection) : uno::Any aFalse( ::uno::makeAny( false ) ); Insert( PROP_GRID_DISPLAY, false, aFalse); Insert( PROP_GRID_PRINT, false, aFalse); - + Insert( PROP_GRID_MODE, false, uno::makeAny(text::TextGridMode::NONE)); if( m_bIsFirstSection ) @@ -908,6 +922,22 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl ) nRubyHeight = 0; operator[]( PropertyDefinition( PROP_GRID_RUBY_HEIGHT, false )) = uno::makeAny( nRubyHeight ); + sal_Int16 nGridMode = text::TextGridMode::NONE; + + switch (m_nGridType) + { + case NS_ooxml::LN_Value_wordprocessingml_ST_DocGrid_lines: + nGridMode = text::TextGridMode::LINES; + break; + case NS_ooxml::LN_Value_wordprocessingml_ST_DocGrid_linesAndChars: + nGridMode = text::TextGridMode::LINES_AND_CHARS; + break; + default: + break; + } + + operator[](PropertyDefinition(PROP_GRID_MODE, false)) = uno::makeAny(nGridMode); + _ApplyProperties( xFollowPageStyle ); //todo: creating a "First Page" style depends on HasTitlePage und _fFacingPage_ diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index 0efe7e3ba433..16886530f324 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -193,6 +193,7 @@ class SectionPropertyMap : public PropertyMap bool m_bGutterRTL; bool m_bSFBiDi; + sal_Int32 m_nGridType; sal_Int32 m_nGridLinePitch; sal_Int32 m_nDxtCharSpace; @@ -266,6 +267,7 @@ public: void SetDzaGutter( sal_Int32 nSet ) {m_nDzaGutter = nSet; } void SetSFBiDi( bool bSet ) { m_bSFBiDi = bSet;} + void SetGridType(sal_Int32 nSet) { m_nGridType = nSet; } void SetGridLinePitch( sal_Int32 nSet ) { m_nGridLinePitch = nSet; } void SetDxtCharSpace( sal_Int32 nSet ) { m_nDxtCharSpace = nSet; } diff --git a/writerfilter/source/dmapper/PropertyMapHelper.cxx b/writerfilter/source/dmapper/PropertyMapHelper.cxx index 555003774113..4fb4c759289d 100644 --- a/writerfilter/source/dmapper/PropertyMapHelper.cxx +++ b/writerfilter/source/dmapper/PropertyMapHelper.cxx @@ -32,6 +32,7 @@ #include #include "PropertyMapHelper.hxx" +#ifdef DEBUG namespace writerfilter { namespace dmapper @@ -39,7 +40,7 @@ namespace dmapper using namespace ::com::sun::star; - XMLTag::Pointer_t lcl_TableColumnSeparatorsToTag(const uno::Any & rTableColumnSeparators) +XMLTag::Pointer_t lcl_TableColumnSeparatorsToTag(const uno::Any & rTableColumnSeparators) { uno::Sequence aSeq; rTableColumnSeparators >>= aSeq; @@ -127,3 +128,4 @@ XMLTag::Pointer_t lcl_PropertyValueSeqSeqToTag(PropertyValueSeqSeq_t rPropValSeq } } +#endif // DEBUG diff --git a/writerfilter/source/dmapper/PropertyMapHelper.hxx b/writerfilter/source/dmapper/PropertyMapHelper.hxx index fc9ea0a85bb4..4a528f1736c0 100644 --- a/writerfilter/source/dmapper/PropertyMapHelper.hxx +++ b/writerfilter/source/dmapper/PropertyMapHelper.hxx @@ -28,6 +28,7 @@ * ************************************************************************/ +#ifdef DEBUG #include "PropertyMap.hxx" #include @@ -46,3 +47,4 @@ typedef uno::Sequence PropertyValueSeqSeq_t; XMLTag::Pointer_t lcl_PropertyValueSeqSeqToTag(PropertyValueSeqSeq_t & rPropValSeqSeq); } } +#endif // DEBUG diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx old mode 100644 new mode 100755 index deb65c7c8cba..e711240b65d0 --- a/writerfilter/source/dmapper/SettingsTable.cxx +++ b/writerfilter/source/dmapper/SettingsTable.cxx @@ -28,6 +28,7 @@ * ************************************************************************/ +#include #include #include @@ -37,7 +38,15 @@ #include #include +#ifdef DEBUG_DOMAINMAPPER +#include +#include "dmapperLoggers.hxx" +#endif + namespace writerfilter { + +using resourcemodel::resolveSprmProps; + namespace dmapper { @@ -56,6 +65,21 @@ struct SettingsTable_Impl bool m_bNoPunctuationKerning; bool m_doNotIncludeSubdocsInStats; // Do Not Include Content in Text Boxes, Footnotes, and Endnotes in Document Statistics) bool m_bRecordChanges; + int m_nEdit; + bool m_bFormatting; + bool m_bEnforcement; + int m_nCryptProviderType; + int m_nCryptAlgorithmClass; + int m_nCryptAlgorithmType; + ::rtl::OUString m_sCryptAlgorithmSid; + int m_nCryptSpinCount; + ::rtl::OUString m_sCryptProvider; + ::rtl::OUString m_sAlgIdExt; + ::rtl::OUString m_sAlgIdExtSource; + ::rtl::OUString m_sCryptProviderTypeExt; + ::rtl::OUString m_sCryptProviderTypeExtSource; + ::rtl::OUString m_sHash; + ::rtl::OUString m_sSalt; SettingsTable_Impl( DomainMapper& rDMapper, const uno::Reference< lang::XMultiServiceFactory > xTextFactory ) : m_rDMapper( rDMapper ) @@ -65,6 +89,13 @@ struct SettingsTable_Impl , m_bNoPunctuationKerning(false) , m_doNotIncludeSubdocsInStats(false) , m_bRecordChanges(false) + , m_nEdit(NS_ooxml::LN_Value_wordprocessingml_ST_DocProtect_none) + , m_bFormatting(false) + , m_bEnforcement(false) + , m_nCryptProviderType(NS_ooxml::LN_Value_wordprocessingml_ST_CryptProv_rsaAES) + , m_nCryptAlgorithmClass(NS_ooxml::LN_Value_wordprocessingml_ST_AlgClass_hash) + , m_nCryptAlgorithmType(NS_ooxml::LN_Value_wordprocessingml_ST_AlgType_typeAny) + , m_nCryptSpinCount(0) {} }; @@ -79,8 +110,15 @@ SettingsTable::~SettingsTable() delete m_pImpl; } -void SettingsTable::attribute(Id /*Name*/, Value & val) +void SettingsTable::attribute(Id nName, Value & val) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("SettingsTable.attribute"); + dmapper_logger->attribute("name", (*QNameToString::Instance())(nName)); + dmapper_logger->attribute("value", val.toString()); +#endif + + (void) nName; int nIntValue = val.getInt(); (void)nIntValue; ::rtl::OUString sValue = val.getString(); @@ -99,10 +137,18 @@ void SettingsTable::attribute(Id /*Name*/, Value & val) } } #endif +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("SettingsTable.attribute"); +#endif } void SettingsTable::sprm(Sprm& rSprm) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("SettingsTable.sprm"); + dmapper_logger->chars(rSprm.toString()); +#endif + sal_uInt32 nSprmId = rSprm.getId(); Value::Pointer_t pValue = rSprm.getValue(); @@ -184,11 +230,20 @@ void SettingsTable::sprm(Sprm& rSprm) m_pImpl->m_bRecordChanges = bool(rSprm.getValue( )->getInt( ) ); } break; + case NS_ooxml::LN_CT_Settings_documentProtection: + { + resolveSprmProps(*this, rSprm); + } + break; default: { OSL_ENSURE( false, "unknown sprmid in SettingsTable::sprm()"); } } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("SettingsTable.sprm"); +#endif } void SettingsTable::entry(int /*pos*/, writerfilter::Reference::Pointer_t ref) diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 8b2dbc4d9756..5f2e2268abb8 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -417,6 +417,7 @@ void StyleSheetTable::attribute(Id Name, Value & val) #ifdef DEBUG_DOMAINMAPPER dmapper_logger->startElement("StyleSheetTable.attribute"); dmapper_logger->attribute("name", (*QNameToString::Instance())(Name)); + dmapper_logger->attribute("value", val.toString()); #endif OSL_ENSURE( m_pImpl->m_pCurrentEntry, "current entry has to be set here"); @@ -534,10 +535,9 @@ void StyleSheetTable::attribute(Id Name, Value & val) break; default: { - //----> debug - int nVal = val.getInt(); - ++nVal; - //<---- debug +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif } break; } @@ -599,7 +599,6 @@ void StyleSheetTable::sprm(Sprm & rSprm) break; case NS_ooxml::LN_CT_Style_tblPr: //contains table properties case NS_ooxml::LN_CT_Style_tblStylePr: //contains to table properties - case NS_ooxml::LN_CT_DocDefaults_pPrDefault: case NS_ooxml::LN_CT_DocDefaults_rPrDefault: case NS_ooxml::LN_CT_TblPrBase_tblInd: //table properties - at least width value and type case NS_ooxml::LN_EG_RPrBase_rFonts: //table fonts @@ -682,19 +681,30 @@ void StyleSheetTable::sprm(Sprm & rSprm) break; case NS_ooxml::LN_CT_Style_pPr: /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + // no break case NS_ooxml::LN_CT_Style_rPr: /* WRITERFILTERSTATUS: done: 100, planned: 0, spent: 0 */ + // no break default: - if (!m_pImpl->m_pCurrentEntry) - break; - TablePropertiesHandlerPtr pTblHandler( new TablePropertiesHandler( true ) ); - pTblHandler->SetProperties( m_pImpl->m_pCurrentEntry->pProperties ); - if ( !pTblHandler->sprm( rSprm ) ) { - m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pCurrentEntry->pProperties ); - m_pImpl->m_rDMapper.sprm( rSprm ); - m_pImpl->m_rDMapper.PopStyleSheetProperties( ); + if (!m_pImpl->m_pCurrentEntry) + break; + + TablePropertiesHandlerPtr pTblHandler( new TablePropertiesHandler( true ) ); + pTblHandler->SetProperties( m_pImpl->m_pCurrentEntry->pProperties ); + if ( !pTblHandler->sprm( rSprm ) ) + { + m_pImpl->m_rDMapper.PushStyleSheetProperties( m_pImpl->m_pCurrentEntry->pProperties ); + + PropertyMapPtr pProps(new PropertyMap()); + m_pImpl->m_rDMapper.sprm( rSprm, pProps ); + + m_pImpl->m_pCurrentEntry->pProperties->insert(pProps); + + m_pImpl->m_rDMapper.PopStyleSheetProperties( ); + } } + break; } #ifdef DEBUG_DOMAINMAPPER @@ -798,6 +808,10 @@ uno::Sequence< ::rtl::OUString > PropValVector::getNames() -----------------------------------------------------------------------*/ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("applyStyleSheets"); +#endif + try { uno::Reference< style::XStyleFamiliesSupplier > xStylesSupplier( m_pImpl->m_xTextDocument, uno::UNO_QUERY_THROW ); @@ -956,11 +970,24 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) PropValVector aSortedPropVals; for( sal_Int32 nProp = 0; nProp < aPropValues.getLength(); ++nProp) { - // Don't add the style name properties +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("propvalue"); + dmapper_logger->attribute("name", aPropValues[nProp].Name); + dmapper_logger->attribute("value", aPropValues[nProp].Value); +#endif + // Don't add the style name properties bool bIsParaStyleName = aPropValues[nProp].Name.equalsAscii( "ParaStyleName" ); bool bIsCharStyleName = aPropValues[nProp].Name.equalsAscii( "CharStyleName" ); - if ( !bInsert && !bIsParaStyleName && !bIsCharStyleName ) + if ( !bIsParaStyleName && !bIsCharStyleName ) + { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("insert"); +#endif aSortedPropVals.Insert( aPropValues[nProp] ); + } +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("propvalue"); +#endif } if(bAddFollowStyle) { @@ -1009,7 +1036,15 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) } } if(bInsert) + { xStyles->insertByName( sConvertedStyleName, uno::makeAny( xStyle) ); +#ifdef DEBUG_DOMAINMAPPER + uno::Reference xProps(xStyle, uno::UNO_QUERY); + dmapper_logger->startElement("insertStyle"); + dmapper_logger->addTag(unoPropertySetToTag(xProps)); + dmapper_logger->endElement("insertStyle"); +#endif + } } ++aIt; } @@ -1020,6 +1055,10 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable ) (void)rEx; OSL_ENSURE( false, "Styles could not be imported completely"); } + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("applyStyleSheets"); +#endif } /*-- 22.06.2006 15:56:56--------------------------------------------------- diff --git a/writerfilter/source/dmapper/ThemeTable.cxx b/writerfilter/source/dmapper/ThemeTable.cxx index ec9d8ea9d5a5..0f0becf06552 100755 --- a/writerfilter/source/dmapper/ThemeTable.cxx +++ b/writerfilter/source/dmapper/ThemeTable.cxx @@ -31,6 +31,10 @@ #include #endif #include +#ifdef DEBUG_DOMAINMAPPER +#include "dmapperLoggers.hxx" +#include +#endif namespace writerfilter { namespace dmapper @@ -59,6 +63,11 @@ ThemeTable::~ThemeTable() void ThemeTable::attribute(Id Name, Value & val) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("ThemeTable.attribute"); + dmapper_logger->attribute("name", (*QNameToString::Instance())(Name)); + dmapper_logger->attribute("value", val.toString()); +#endif // int nIntValue = val.getInt(); ::rtl::OUString sValue = val.getString(); // printf ( "ThemeTable::attribute(0x%.4x, 0x%.4x) [%s]\n", (unsigned int)Name, (unsigned int)nIntValue, ::rtl::OUStringToOString(sValue, RTL_TEXTENCODING_DONTKNOW).getStr()); @@ -72,12 +81,23 @@ void ThemeTable::attribute(Id Name, Value & val) break; default: { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif } } +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("ThemeTable.attribute"); +#endif } void ThemeTable::sprm(Sprm& rSprm) { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("ThemeTable.sprm"); + dmapper_logger->chars(rSprm.toString()); +#endif + sal_uInt32 nSprmId = rSprm.getId(); (void)nSprmId; @@ -126,14 +146,27 @@ void ThemeTable::sprm(Sprm& rSprm) break; default: { +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); +#endif } } +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("ThemeTable.sprm"); +#endif } void ThemeTable::entry(int /*pos*/, writerfilter::Reference::Pointer_t ref) { - // printf ( "ThemeTable::entry\n"); +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement("ThemeTable.entry"); +#endif + ref->resolve(*this); + +#ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement("ThemeTable.entry"); +#endif } const ::rtl::OUString ThemeTable::getFontNameForTheme(const Id id) const diff --git a/writerfilter/source/dmapper/dmapperLoggers.hxx b/writerfilter/source/dmapper/dmapperLoggers.hxx index a19ff4832370..fd9ed722de4a 100644 --- a/writerfilter/source/dmapper/dmapperLoggers.hxx +++ b/writerfilter/source/dmapper/dmapperLoggers.hxx @@ -31,6 +31,7 @@ #ifndef INCLUDED_DMAPPER_LOGGERS_HXX #define INCLUDED_DMAPPER_LOGGERS_HXX +#ifdef DEBUG #include namespace writerfilter { @@ -38,4 +39,5 @@ namespace writerfilter { extern TagLogger::Pointer_t dmapper_logger; } } +#endif // DEBUG #endif // INCLUDED_DMAPPER_LOGGERS_HXX diff --git a/writerfilter/source/dmapper/genclass.xsl b/writerfilter/source/dmapper/genclass.xsl new file mode 100644 index 000000000000..eaddab52ea0e --- /dev/null +++ b/writerfilter/source/dmapper/genclass.xsl @@ -0,0 +1,707 @@ + + + + + + + + + + + + + + + + + + + /************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: PropertyMap.hxx,v $ + * $Revision: 1.18 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + + + + + + + + + + + + + + + + + m_b + + + m_s + + + m_n + + + m_ + + + + + + + + + + + + + INCLUDED_ + + _HXX + + #ifndef + + #define + + #include <resourcemodel/WW8ResourceModel.hxx> + #include <rtl/ustring.hxx> + namespace writerfilter { + namespace dmapper { + + }} + #endif // + + + + + + + + + #include " + + .hxx" + #include <ooxml/resourceids.hxx> + #ifdef DEBUG_DOMAINMAPPER + #include <resourcemodel/QNameToString.hxx> + #include "dmapperLoggers.hxx" + #endif + namespace writerfilter { + namespace dmapper { + + }} + + + + + class + + + : public + + + + , + + + + { + public: + + // constructor + + + (); + // destructor + virtual ~ + + (); + + + // sprm + void sprm(Sprm & r_sprm); + void resolveSprm(Sprm & r_sprm); + + + // attribute + void attribute(Id name, Value & val); + + private: + + }; + + + + + + + ::rtl::OUString + + + + + + + + + // typedefs + + typedef + + + ::boost::shared_ptr< + + > + + + + + + ::std::vector< + + > + + + + ; + + + + + + set + + + + + + + get + + + + + + + + PushBack + + + + + + + true + + + void + + + :: + + + ( + + + + + + ) + + + + + + + true + + + + + + + + + + :: + + + () const + + + + + + + + + + + void + + + :: + + + ( + + true + + r_Element + ) + + + + + + + // member: + + + + ; + + + ; + + + + + + ; + + + + + + + + + + + ; + + + + + + + + + + + + + + + + + + + + + + + + + rtl::OUString + + + + + + + + :: + + + + + + + + + + + + + + + + const + + + + + + + + + + + + + + + + + + & + + + + + + + + + + + + + + r_s + + + + + + r_ + + + + + + + + + + { + + + = + + ; + } + + + + + + + { + return + + ; + } + + + + + + + + + + + { + + + .push_back(r_Element); + } + + + + + + + + + getString() + + + + getInt() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + { + + + = + + + + ; } + + + + + { + + + .push_back( + + + + ); + ; } + + + + { + resolveSprm(r_Sprm); + } + + + + + + + + + + + + + + + + + + + + + + + + + void + + + ::sprm(Sprm & r_Sprm) + { + #ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement(" + + .sprm"); + dmapper_logger->chars(r_Sprm.toString()); + #endif + switch(r_Sprm.getId()) + { + + case + + : + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + + r_Sprm.getValue()-> + + break; + + default: + #ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); + #endif DEBUG_DOMAINMAPPER + break; + } + #ifdef DEBUG_DOMAINMAPPER + dmapper_logger->endElement(" + + .sprm"); + #endif + } + void + + ::resolveSprm(Sprm & r_Sprm) + { + writerfilter::Reference<Properties>::Pointer_t pProperties = r_Sprm.getProps(); + if( pProperties.get()) + pProperties->resolve(*this); + } + + + + + + void + + + :: + attribute(Id name, Value & val) + { + #ifdef DEBUG_DOMAINMAPPER + dmapper_logger->startElement(" + + .attribute"); + dmapper_logger->attribute("name", (*QNameToString::Instance())(name)); + dmapper_logger->attribute("value", val.toString()); + dmapper_logger->endElement(" + + .attribute"); + #endif + switch (name) + { + + case + + : + /* WRITERFILTERSTATUS done: 100, planned: 2, spent: 0 */ + + val. + + break; + + default: + #ifdef DEBUG_DOMAINMAPPER + dmapper_logger->element("unhandled"); + #endif DEBUG_DOMAINMAPPER + break; + } + } + + + + + + + :: + + () + + + + , + + + + + + (0) + + + (false) + + + + + + : + + + { + } + + + + + + ::~ + + () + { + } + + + + + + class: + + + + + + /*** + + * + * + + * + ** + + **/ + + + + // member: + + :: + + + + + + + + + + diff --git a/writerfilter/source/dmapper/makefile.mk b/writerfilter/source/dmapper/makefile.mk old mode 100644 new mode 100755 index 4b9636855562..300dfb31d959 --- a/writerfilter/source/dmapper/makefile.mk +++ b/writerfilter/source/dmapper/makefile.mk @@ -47,6 +47,8 @@ SLOFILES= \ $(SLO)$/DomainMapperTableHandler.obj \ $(SLO)$/DomainMapperTableManager.obj \ $(SLO)$/DomainMapper_Impl.obj \ + $(SLO)$/FFDataHandler.obj \ + $(SLO)$/FormControlHelper.obj \ $(SLO)$/FontTable.obj \ $(SLO)$/GraphicHelpers.obj \ $(SLO)$/GraphicImport.obj \ diff --git a/writerfilter/source/doctok/WW8DocumentImpl.cxx b/writerfilter/source/doctok/WW8DocumentImpl.cxx index 27dfd68e4eb8..fee0abc85fe7 100644 --- a/writerfilter/source/doctok/WW8DocumentImpl.cxx +++ b/writerfilter/source/doctok/WW8DocumentImpl.cxx @@ -157,6 +157,7 @@ WW8Document::~WW8Document() { } +#ifdef DEBUG class WW8IdToString : public IdToString { public: @@ -173,6 +174,7 @@ public: return s; } }; +#endif WW8DocumentImpl::~WW8DocumentImpl() { @@ -185,6 +187,9 @@ mbInSection(false), mbInParagraphGroup(false), mbInCharacterGroup(false) mpDocStream = getSubStream(::rtl::OUString::createFromAscii ("WordDocument")); + mpSummaryInformationStream = getSubStream(::rtl::OUString::createFromAscii + ("\5SummaryInformation")); + try { mpDataStream = getSubStream(::rtl::OUString::createFromAscii @@ -1077,6 +1082,24 @@ writerfilter::Reference::Pointer_t WW8DocumentImpl::getStyleSheet() const return pResult; } +writerfilter::Reference
::Pointer_t WW8DocumentImpl::getAssocTable() const +{ + writerfilter::Reference
::Pointer_t pResult; + + if (mpFib->get_lcbSttbfAssoc() > 0) + { + WW8Sttbf::Pointer_t pSttbfAssoc + (new WW8Sttbf(*mpTableStream, + mpFib->get_fcSttbfAssoc(), + mpFib->get_lcbSttbfAssoc())); + + pResult = writerfilter::Reference
::Pointer_t + (new WW8SttbTableResource(pSttbfAssoc)); + } + + return pResult; +} + sal_uInt32 WW8DocumentImpl::getHeaderCount() const { sal_uInt32 nResult = 0; @@ -1281,6 +1304,19 @@ WW8DocumentImpl::getField(const CpAndFc & rCpAndFc) const return mpFieldHelper->getField(rCpAndFc); } +writerfilter::Reference::Pointer_t +WW8DocumentImpl::getDocumentProperties() const +{ + writerfilter::Reference::Pointer_t pResult; + + if (mpFib->get_lcbDop() > 0) + { + pResult.reset(new WW8DopBase(*mpTableStream, mpFib->get_fcDop(), mpFib->get_lcbDop())); + } + + return pResult; +} + WW8FLD::Pointer_t WW8DocumentImpl::getCurrentFLD() const { return mpFLD; @@ -1632,7 +1668,7 @@ void WW8DocumentImpl::resolve(Stream & rStream) //output.addItem(mTextboxHeaderEndCpAndFc.toString()); -#if 0 +#if 1 output.addItem(""); output.addItem(mpStream->getSubStreamNames()); output.addItem(""); @@ -1641,6 +1677,11 @@ void WW8DocumentImpl::resolve(Stream & rStream) { mpDocStream->dump(output); } + + if (mpSummaryInformationStream.get() != NULL) + { + mpSummaryInformationStream->dump(output); + } #endif writerfilter::Reference::Pointer_t pFib @@ -1743,6 +1784,11 @@ void WW8DocumentImpl::resolve(Stream & rStream) clog << e.getText() << endl; } + writerfilter::Reference
::Pointer_t pAssocTable = getAssocTable(); + + if (pAssocTable.get() != NULL) + rStream.table(NS_rtf::LN_SttbAssoc, pAssocTable); + writerfilter::Reference
::Pointer_t pListTable = getListTable(); if (pListTable.get() != NULL) @@ -1845,6 +1891,9 @@ void WW8DocumentImpl::resolve(Stream & rStream) startSectionGroup(rStream); rStream.info(pIt->toString()); + if (nSectionIndex == 0) + rStream.props(getDocumentProperties()); + sal_uInt32 nHeaderStartIndex = 6 + nSectionIndex * 6; sal_uInt32 nHeaderEndIndex = nHeaderStartIndex + 6; diff --git a/writerfilter/source/doctok/WW8DocumentImpl.hxx b/writerfilter/source/doctok/WW8DocumentImpl.hxx index 9b123ae54cde..a1f7e8abb2b4 100644 --- a/writerfilter/source/doctok/WW8DocumentImpl.hxx +++ b/writerfilter/source/doctok/WW8DocumentImpl.hxx @@ -284,6 +284,9 @@ class WW8DocumentImpl : public WW8Document /// pointer to the compound object stream of the document WW8Stream::Pointer_t mpCompObjStream; + /// pointer to the summayry information stream of the document + WW8Stream::Pointer_t mpSummaryInformationStream; + /// pointer to the piece table WW8PieceTable::Pointer_t mpPieceTable; @@ -553,6 +556,11 @@ public: */ writerfilter::Reference
::Pointer_t getStyleSheet() const; + /** + Return reference to associated data. + */ + writerfilter::Reference
::Pointer_t getAssocTable() const; + /** Return count of headers/footers. */ @@ -676,6 +684,13 @@ public: writerfilter::Reference::Pointer_t getField(const CpAndFc & rCpAndFc) const; + /** + Return document properties. + + */ + writerfilter::Reference::Pointer_t + getDocumentProperties() const; + /** Return current field descriptor. */ diff --git a/writerfilter/source/doctok/WW8FontTable.cxx b/writerfilter/source/doctok/WW8FontTable.cxx index f29d2ea4a343..7391763f347e 100644 --- a/writerfilter/source/doctok/WW8FontTable.cxx +++ b/writerfilter/source/doctok/WW8FontTable.cxx @@ -52,11 +52,6 @@ void WW8FontTable::initPayload() mnPlcfPayloadOffset = nOffset; } -sal_uInt32 WW8FontTable::calcPayloadOffset() -{ - return 0; -} - sal_uInt32 WW8FontTable::getEntryCount() { return entryOffsets.size() - 1; diff --git a/writerfilter/source/doctok/WW8LFOTable.cxx b/writerfilter/source/doctok/WW8LFOTable.cxx index 2164c4887c8b..1197ef7f190d 100644 --- a/writerfilter/source/doctok/WW8LFOTable.cxx +++ b/writerfilter/source/doctok/WW8LFOTable.cxx @@ -62,13 +62,6 @@ void WW8LFOTable::initPayload() payloadOffsets.push_back(nOffsetLFOData); } -sal_uInt32 WW8LFOTable::calcPayloadOffset() -{ - sal_uInt32 nResult = 4 + getEntryCount() * WW8LFO::getSize(); - - return nResult; -} - sal_uInt32 WW8LFOTable::getEntryCount() { return getU32(0); diff --git a/writerfilter/source/doctok/WW8ListTable.cxx b/writerfilter/source/doctok/WW8ListTable.cxx index f70c7740dff2..15ef3039d8da 100644 --- a/writerfilter/source/doctok/WW8ListTable.cxx +++ b/writerfilter/source/doctok/WW8ListTable.cxx @@ -68,11 +68,6 @@ void WW8ListTable::initPayload() entryOffsets.push_back(nOffset); } -sal_uInt32 WW8ListTable::calcPayloadOffset() -{ - return 0; -} - sal_uInt32 WW8ListTable::getEntryCount() { return getU16(0); diff --git a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx index a576640905ce..da72435d5efb 100644 --- a/writerfilter/source/doctok/WW8ResourceModelImpl.cxx +++ b/writerfilter/source/doctok/WW8ResourceModelImpl.cxx @@ -27,7 +27,6 @@ #include #include -#include #include #include #include diff --git a/writerfilter/source/doctok/WW8StreamImpl.cxx b/writerfilter/source/doctok/WW8StreamImpl.cxx index 4418839919d4..585673bfa887 100644 --- a/writerfilter/source/doctok/WW8StreamImpl.cxx +++ b/writerfilter/source/doctok/WW8StreamImpl.cxx @@ -39,7 +39,9 @@ namespace doctok { using namespace ::com::sun::star; - TagLogger::Pointer_t debug_logger(TagLogger::getInstance("DEBUG")); +#ifdef DEBUG +TagLogger::Pointer_t debug_logger(TagLogger::getInstance("DEBUG")); +#endif WW8Stream::~WW8Stream() { diff --git a/writerfilter/source/doctok/WW8StructBase.cxx b/writerfilter/source/doctok/WW8StructBase.cxx index 7d03e8763c69..746034f4b177 100644 --- a/writerfilter/source/doctok/WW8StructBase.cxx +++ b/writerfilter/source/doctok/WW8StructBase.cxx @@ -26,7 +26,6 @@ ************************************************************************/ #include -#include namespace writerfilter { namespace doctok { diff --git a/writerfilter/source/doctok/WW8StyleSheet.cxx b/writerfilter/source/doctok/WW8StyleSheet.cxx index 797554f984e3..3bf08eee430c 100644 --- a/writerfilter/source/doctok/WW8StyleSheet.cxx +++ b/writerfilter/source/doctok/WW8StyleSheet.cxx @@ -46,11 +46,6 @@ void WW8StyleSheet::initPayload() entryOffsets.push_back(nOffset); } -sal_uInt32 WW8StyleSheet::calcPayloadOffset() -{ - return 0; -} - sal_uInt32 WW8StyleSheet::calcSize() { return getCount(); diff --git a/writerfilter/source/doctok/doctokLoggers.hxx b/writerfilter/source/doctok/doctokLoggers.hxx index 8df90348a249..b7dc7e0aa48f 100644 --- a/writerfilter/source/doctok/doctokLoggers.hxx +++ b/writerfilter/source/doctok/doctokLoggers.hxx @@ -28,6 +28,8 @@ #ifndef INCLUDED_DOCTOK_LOGGERS_HXX #define INCLUDED_DOCTOK_LOGGERS_HXX +#ifdef DEBUG + #include namespace writerfilter { @@ -36,5 +38,5 @@ namespace writerfilter { } } - +#endif // DEBUG #endif // INCLUDED_DOCTOK_LOGGERS_HXX diff --git a/writerfilter/source/doctok/doctokutil.cxx b/writerfilter/source/doctok/doctokutil.cxx deleted file mode 100644 index 7d94b525550b..000000000000 --- a/writerfilter/source/doctok/doctokutil.cxx +++ /dev/null @@ -1,53 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include - -using namespace ::std; - -namespace writerfilter { -namespace doctok { -void util_assert(bool bTest) -{ - if (! bTest) - clog << "ASSERT!\n" << endl; -} - -void printBytes(ostream & o, const string & str) -{ - unsigned int nCount = str.size(); - for (unsigned int n = 0; n < nCount; ++n) - { - unsigned char c = static_cast(str[n]); - if (c < 128 && isprint(c)) - o << str[n]; - else - o << "."; - } -} - -}} diff --git a/writerfilter/source/doctok/dopbase.xml b/writerfilter/source/doctok/dopbase.xml new file mode 100644 index 000000000000..8beb21d8cf08 --- /dev/null +++ b/writerfilter/source/doctok/dopbase.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/writerfilter/source/doctok/makefile.mk b/writerfilter/source/doctok/makefile.mk index 6a407a0b91ea..ff03079f2c7a 100644 --- a/writerfilter/source/doctok/makefile.mk +++ b/writerfilter/source/doctok/makefile.mk @@ -58,7 +58,6 @@ SLOFILES= \ $(SLO)$/WW8LFOTable.obj \ $(SLO)$/WW8ListTable.obj \ $(SLO)$/resources.obj \ - $(SLO)$/doctokutil.obj \ $(SLO)$/WW8CpAndFc.obj \ $(SLO)$/WW8StructBase.obj \ $(SLO)$/WW8Clx.obj \ diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi index cfcd2ac7e67e..926e046d37b9 100644 --- a/writerfilter/source/doctok/resources.xmi +++ b/writerfilter/source/doctok/resources.xmi @@ -552,6 +552,21 @@ + + + + + rtf:SttbAssoc + + + + + + + + + + @@ -578,24 +593,21 @@ - - + + - - - - 28 + 84 - + @@ -614,7 +626,7 @@ - + 31 @@ -622,7 +634,7 @@ - + 0x80000000 @@ -630,7 +642,7 @@ - + 1 @@ -638,7 +650,7 @@ - rtf:ISTARTAT + rtf:fFacingPages @@ -653,7 +665,7 @@ - + @@ -664,7 +676,7 @@ - 4 + 0 @@ -672,7 +684,7 @@ - + 30 @@ -680,15 +692,73 @@ - + 0x40000000 + + + 1 + + + + + + + + rtf:unused1 + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + 29 + + + + + + + + 0x20000000 + + + + + + + + 1 @@ -696,14 +766,14 @@ - rtf:NFC + rtf:fPMHMainDoc - + @@ -711,7 +781,7 @@ - + @@ -722,7 +792,7 @@ - 5 + 0 @@ -730,7 +800,7 @@ - 6 + 27 @@ -738,7 +808,7 @@ - 0xc0 + 0x18000000 @@ -754,14 +824,14 @@ - rtf:JC + rtf:unused2 - + @@ -769,7 +839,7 @@ - + @@ -780,7 +850,7 @@ - 5 + 0 @@ -788,7 +858,7 @@ - 5 + 25 @@ -796,7 +866,7 @@ - 0x20 + 0x6000000 @@ -804,7 +874,7 @@ - 1 + 2 @@ -812,14 +882,14 @@ - rtf:FLEGAL + rtf:fpc - + @@ -827,7 +897,7 @@ - + @@ -838,7 +908,7 @@ - 5 + 0 @@ -846,7 +916,7 @@ - 4 + 24 @@ -854,7 +924,7 @@ - 0x0 + 0x000000 @@ -870,14 +940,14 @@ - rtf:FNORESTART + rtf:unused3 - + @@ -885,7 +955,7 @@ - + @@ -896,7 +966,7 @@ - 5 + 0 @@ -904,7 +974,7 @@ - 3 + 16 @@ -912,7 +982,7 @@ - 0x8 + 0xff0000 @@ -920,7 +990,7 @@ - 1 + 8 @@ -928,14 +998,14 @@ - rtf:FIDENTSAV + rtf:unused4 - + @@ -943,7 +1013,7 @@ - + @@ -954,7 +1024,7 @@ - 5 + 0 @@ -962,7 +1032,7 @@ - 2 + 14 @@ -970,7 +1040,7 @@ - 0x4 + 0xc000 @@ -978,7 +1048,7 @@ - 1 + 2 @@ -986,14 +1056,14 @@ - rtf:FCONVERTED + rtf:rncFtn - + @@ -1001,7 +1071,7 @@ - + @@ -1012,7 +1082,7 @@ - 5 + 0 @@ -1028,7 +1098,7 @@ - 0x1 + 0x3fff @@ -1036,7 +1106,7 @@ - 1 + 14 @@ -1044,14 +1114,14 @@ - rtf:FTENTATIVE + rtf:nFtn - + @@ -1059,7 +1129,7 @@ - + @@ -1070,7 +1140,7 @@ - 6 + 4 @@ -1078,7 +1148,7 @@ - + 31 @@ -1086,7 +1156,7 @@ - + 0x80000000 @@ -1094,7 +1164,7 @@ - + 1 @@ -1102,30 +1172,80 @@ - rtf:RGBXCHNUMS + rtf:unused5 + + + + + + + + + + - 9 + - + + + + + + + 4 + + + + + + + + 30 + + + + + + + + 0x40000000 + + + + + + + + 1 + + + + + + + + rtf:unused6 + + - + - + - + @@ -1136,7 +1256,7 @@ - 15 + 4 @@ -1144,7 +1264,7 @@ - + 29 @@ -1152,7 +1272,7 @@ - + 0x20000000 @@ -1160,7 +1280,7 @@ - + 1 @@ -1168,14 +1288,14 @@ - rtf:IXCHFOLLOW + rtf:unused7 - + @@ -1183,7 +1303,7 @@ - + @@ -1194,7 +1314,7 @@ - 16 + 4 @@ -1202,7 +1322,7 @@ - + 28 @@ -1210,7 +1330,7 @@ - + 0x0000000 @@ -1218,7 +1338,7 @@ - + 1 @@ -1226,14 +1346,14 @@ - rtf:DXASPACE + rtf:unused8 - + @@ -1241,7 +1361,7 @@ - + @@ -1252,7 +1372,7 @@ - 20 + 4 @@ -1260,7 +1380,7 @@ - + 27 @@ -1268,7 +1388,7 @@ - + 0x8000000 @@ -1276,7 +1396,7 @@ - + 1 @@ -1284,14 +1404,14 @@ - rtf:DXAINDENT + rtf:unused9 - + @@ -1299,7 +1419,7 @@ - + @@ -1310,7 +1430,7 @@ - 24 + 4 @@ -1318,7 +1438,7 @@ - + 26 @@ -1326,7 +1446,7 @@ - + 0x4000000 @@ -1334,7 +1454,7 @@ - + 1 @@ -1342,14 +1462,14 @@ - rtf:CBGRPPRLCHPX + rtf:unused10 - + @@ -1357,7 +1477,7 @@ - + @@ -1368,7 +1488,7 @@ - 25 + 4 @@ -1376,7 +1496,7 @@ - + 25 @@ -1384,7 +1504,7 @@ - + 0x2000000 @@ -1392,7 +1512,7 @@ - + 1 @@ -1400,14 +1520,14 @@ - rtf:CBGRPPRLPAPX + rtf:fSplAllDone - + @@ -1415,7 +1535,7 @@ - + @@ -1426,7 +1546,7 @@ - 26 + 4 @@ -1434,7 +1554,7 @@ - + 24 @@ -1442,7 +1562,7 @@ - + 0x000000 @@ -1450,7 +1570,7 @@ - + 1 @@ -1458,14 +1578,14 @@ - rtf:ilvlRestartLim + rtf:fSplAllClean - + @@ -1473,7 +1593,7 @@ - + @@ -1484,7 +1604,7 @@ - 27 + 4 @@ -1492,7 +1612,7 @@ - + 23 @@ -1500,7 +1620,7 @@ - + 0x800000 @@ -1508,7 +1628,7 @@ - + 1 @@ -1516,14 +1636,14 @@ - rtf:grfhic + rtf:fSplHideErrors - + @@ -1531,77 +1651,123 @@ - + - rtf:xst + - + - - - - - - - + + + 4 + + + + + + + + 22 + + + + + + + + 0x400000 + + + + + + + + 1 + + + + + + + + rtf:fGramHideErrors + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - 28 - - - - - - + - rtf:LISTLEVEL + - + - - - - - - - + + + 4 + + + + + + + + 21 + + + + + + + + 0x200000 + + + + + + + + 1 + + + + + + + + rtf:fLabelDoc + + + + + + + + - + - + - + @@ -1612,7 +1778,7 @@ - 0 + 4 @@ -1620,7 +1786,7 @@ - + 20 @@ -1628,7 +1794,7 @@ - + 0x00000 @@ -1636,7 +1802,7 @@ - + 1 @@ -1644,14 +1810,14 @@ - rtf:LSID + rtf:fHyphCapitals - + @@ -1659,7 +1825,7 @@ - + @@ -1678,7 +1844,7 @@ - + 19 @@ -1686,15 +1852,73 @@ - + 0x80000 + + + 1 + + + + + + + + rtf:fAutoHyphen + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + + 18 + + + + + + + + 0x40000 + + + + + + + + 1 @@ -1702,14 +1926,14 @@ - rtf:TPLC + rtf:fFormNoFields - + @@ -1717,7 +1941,7 @@ - + @@ -1736,7 +1960,7 @@ - 31 + 17 @@ -1744,7 +1968,7 @@ - 0x80000000 + 0x20000 @@ -1760,7 +1984,7 @@ - rtf:fBuildIn + rtf:fLinkStyles @@ -1775,7 +1999,7 @@ - + @@ -1802,7 +2026,7 @@ - 0x7fff0000 + 0x0000 @@ -1810,7 +2034,7 @@ - 15 + 1 @@ -1818,7 +2042,7 @@ - rtf:ilgpdM1 + rtf:fRevMarking @@ -1833,7 +2057,7 @@ - + @@ -1852,7 +2076,7 @@ - 0 + 15 @@ -1860,7 +2084,7 @@ - 0xffff + 0x8000 @@ -1868,7 +2092,7 @@ - 16 + 1 @@ -1876,7 +2100,7 @@ - rtf:lid + rtf:unused11 @@ -1891,7 +2115,7 @@ - + @@ -1910,7 +2134,7 @@ - 0 + 14 @@ -1918,7 +2142,7 @@ - 0x7fffffff + 0x4000 @@ -1926,7 +2150,7 @@ - 31 + 1 @@ -1934,7 +2158,7 @@ - rtf:random + rtf:fExactCWords @@ -1949,7 +2173,7 @@ - + @@ -1960,7 +2184,7 @@ - 8 + 4 @@ -1968,7 +2192,7 @@ - + 13 @@ -1976,7 +2200,7 @@ - + 0x2000 @@ -1984,7 +2208,7 @@ - + 1 @@ -1992,30 +2216,22 @@ - rtf:RGISTD + rtf:fPagHidden - - - 9 - - - - - - + - + - + @@ -2026,7 +2242,7 @@ - 14 + 4 @@ -2034,7 +2250,7 @@ - 7 + 12 @@ -2042,7 +2258,7 @@ - 0x80 + 0x000 @@ -2058,14 +2274,14 @@ - rtf:FSIMPLELIST + rtf:fPagResults - + @@ -2073,7 +2289,7 @@ - + @@ -2084,7 +2300,7 @@ - 14 + 4 @@ -2092,7 +2308,7 @@ - 5 + 11 @@ -2100,7 +2316,7 @@ - 0x20 + 0x800 @@ -2116,14 +2332,14 @@ - rtf:fAutoNum + rtf:fLockAtn - + @@ -2131,7 +2347,7 @@ - + @@ -2142,7 +2358,7 @@ - 14 + 4 @@ -2150,7 +2366,7 @@ - 3 + 10 @@ -2158,7 +2374,7 @@ - 0x8 + 0x400 @@ -2174,14 +2390,14 @@ - rtf:fHybrid + rtf:fMirrorMargins - + @@ -2189,7 +2405,7 @@ - + @@ -2200,7 +2416,7 @@ - 14 + 4 @@ -2208,7 +2424,7 @@ - 0 + 9 @@ -2216,7 +2432,7 @@ - 0x7 + 0x200 @@ -2224,7 +2440,7 @@ - 3 + 1 @@ -2232,14 +2448,14 @@ - rtf:reserved1 + rtf:fWord97Compat - + @@ -2247,7 +2463,7 @@ - + @@ -2258,7 +2474,7 @@ - 27 + 4 @@ -2266,7 +2482,7 @@ - + 8 @@ -2274,7 +2490,7 @@ - + 0x00 @@ -2282,7 +2498,7 @@ - + 1 @@ -2290,78 +2506,25 @@ - rtf:grfhic + rtf:unused12 - + - - - - - - - - - - - - - - - - - - - - - rtf:LISTTABLE - - - - - - - - - - - - - - - - - - - - - - - - - - 8 - - - - - - + - start-at value if fFormatting == false and fStartAt == true. - (if fFormatting == true, the start-at is stored in the LVL) + @@ -2369,7 +2532,7 @@ - 0x0 + 4 @@ -2377,7 +2540,7 @@ - 0 + 7 @@ -2385,7 +2548,7 @@ - + 0x80 @@ -2393,7 +2556,7 @@ - 4 + 1 @@ -2401,14 +2564,14 @@ - rtf:ISTARTAT + rtf:unused13 - + @@ -2416,10 +2579,10 @@ - + - the level to be overridden + @@ -2427,7 +2590,7 @@ - 0x4 + 4 @@ -2435,7 +2598,7 @@ - 0 + 6 @@ -2443,7 +2606,7 @@ - 0x0F + 0x40 @@ -2451,7 +2614,7 @@ - :4 + 1 @@ -2459,14 +2622,14 @@ - rtf:ILVL + rtf:fProtEnabled - + @@ -2474,10 +2637,10 @@ - + - true if the start-at value is overridden + @@ -2485,7 +2648,7 @@ - 0x4 + 4 @@ -2493,7 +2656,7 @@ - 4 + 5 @@ -2501,7 +2664,7 @@ - 0x10 + 0x20 @@ -2509,7 +2672,7 @@ - :1 + 1 @@ -2517,14 +2680,14 @@ - rtf:FSTARTAT + rtf:fDispFormFldSel - + @@ -2532,11 +2695,10 @@ - + - true if the formatting is overriden (in which case the LFOLVL - should contain a pointer to a LVL) + @@ -2544,7 +2706,7 @@ - 0x4 + 4 @@ -2552,7 +2714,7 @@ - 5 + 4 @@ -2560,7 +2722,7 @@ - 0x20 + 0x0 @@ -2568,7 +2730,7 @@ - :1 + 1 @@ -2576,14 +2738,14 @@ - rtf:FFORMATTING + rtf:fRMView - + @@ -2591,10 +2753,10 @@ - + - reserved + @@ -2602,7 +2764,7 @@ - 0x4 + 4 @@ -2610,7 +2772,7 @@ - 6 + 3 @@ -2618,7 +2780,7 @@ - 0xC0 + 0x8 @@ -2626,7 +2788,7 @@ - :2 + 1 @@ -2634,14 +2796,14 @@ - rtf:UNSIGNED4_6 + rtf:fRMPrint - + @@ -2649,10 +2811,10 @@ - + - reserved + @@ -2660,7 +2822,7 @@ - 0x5 + 4 @@ -2668,7 +2830,7 @@ - 0 + 2 @@ -2676,7 +2838,7 @@ - + 0x4 @@ -2684,7 +2846,7 @@ - 3 + 1 @@ -2692,56 +2854,22 @@ - rtf:RESERVED + rtf:fLockVbaProj - - - 3 - - - - - - + - + - - - - - - - - - - - - - - - - - - - - - 15 - - - - - - + @@ -2752,7 +2880,7 @@ - 0 + 4 @@ -2760,7 +2888,7 @@ - + 1 @@ -2768,7 +2896,7 @@ - + 0x2 @@ -2776,7 +2904,7 @@ - + 1 @@ -2784,14 +2912,14 @@ - rtf:lsid + rtf:fLockRev - + @@ -2799,7 +2927,7 @@ - + @@ -2810,7 +2938,7 @@ - 12 + 4 @@ -2818,7 +2946,7 @@ - + 0 @@ -2826,7 +2954,7 @@ - + 0x1 @@ -2834,7 +2962,7 @@ - + 1 @@ -2842,14 +2970,14 @@ - rtf:clfolvl + rtf:fEmbedFonts - + @@ -2857,7 +2985,7 @@ - + @@ -2868,7 +2996,7 @@ - 13 + 8 @@ -2900,14 +3028,14 @@ - rtf:ibstFltAutoNum + rtf:copts60 - + @@ -2915,7 +3043,7 @@ - + @@ -2926,7 +3054,7 @@ - 14 + 10 @@ -2958,14 +3086,14 @@ - rtf:grfhic + rtf:dxaTab - + @@ -2973,75 +3101,7 @@ - - - - rtf:LFOData - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rtf:SttbRgtplc - - - - - - - - - - - - - - - - - - - - - - - 4 - - - - - - - + @@ -3052,7 +3112,7 @@ - 0 + 12 @@ -3084,177 +3144,83 @@ - rtf:cp + rtf:cpgWebOpt - + - - - - - - - - - - - - - - - - - - - - - rtf:LFOTABLE - - - - - - - - - - - - - - - - - - - - - - - - - - rtf:FONTTABLE - - - - - - - - - - - - - - - - - - - - - - - - - - 40 - - - - - - + - rtf:F + - + - - - - - - - - - - - - - rtf:ALTFONTNAME + 14 - + - - - - - - - - - - - - - rtf:XSZFFN + - + - - - - - - - - - - - zero terminated string that records name of font. Possibly - followed by a second xsz which records the name of an alternate - font to use if the first named font does not exist on this system. - Maximal size of xszFfn is 65 characters. + - + + + + + + + + + + + + rtf:dxaHotZ + + + + + + + + - - + + + + - total length of FFN - 1. + @@ -3262,7 +3228,7 @@ - 0x0 + 16 @@ -3270,7 +3236,7 @@ - 0 + @@ -3294,14 +3260,14 @@ - rtf:CBFFNM1 + rtf:cConsecHypLim - + @@ -3309,10 +3275,10 @@ - + - pitch request + @@ -3320,7 +3286,7 @@ - 0x1 + 18 @@ -3328,7 +3294,7 @@ - 0 + @@ -3336,7 +3302,7 @@ - 03 + @@ -3344,7 +3310,7 @@ - :2 + @@ -3352,14 +3318,14 @@ - rtf:PRQ + rtf:wSpare2 - + @@ -3367,10 +3333,10 @@ - + - when 1, font is a TrueType font + @@ -3378,7 +3344,7 @@ - 0x1 + 20 @@ -3386,7 +3352,7 @@ - 2 + @@ -3394,7 +3360,7 @@ - 04 + @@ -3402,7 +3368,7 @@ - :1 + @@ -3410,14 +3376,14 @@ - rtf:FTRUETYPE + rtf:dttmCreated - + @@ -3425,10 +3391,10 @@ - + - reserved + @@ -3436,7 +3402,7 @@ - 0x1 + 24 @@ -3444,7 +3410,7 @@ - 3 + @@ -3452,7 +3418,7 @@ - 08 + @@ -3460,7 +3426,7 @@ - :1 + @@ -3468,14 +3434,14 @@ - rtf:UNUSED1_3 + rtf:dttmRevised - + @@ -3483,10 +3449,10 @@ - + - font family id + @@ -3494,7 +3460,7 @@ - 0x1 + 28 @@ -3502,7 +3468,7 @@ - 4 + @@ -3510,7 +3476,7 @@ - 70 + @@ -3518,7 +3484,7 @@ - :3 + @@ -3526,14 +3492,14 @@ - rtf:FF + rtf:dttmLastPrint - + @@ -3541,10 +3507,10 @@ - + - reserved + @@ -3552,7 +3518,7 @@ - 0x1 + 32 @@ -3560,7 +3526,7 @@ - 7 + @@ -3568,7 +3534,7 @@ - 80 + @@ -3576,7 +3542,7 @@ - :1 + @@ -3584,14 +3550,14 @@ - rtf:UNUSED1_7 + rtf:nRevision - + @@ -3599,10 +3565,10 @@ - + - base weight of font + @@ -3610,7 +3576,7 @@ - 0x2 + 34 @@ -3618,7 +3584,7 @@ - 0 + @@ -3642,14 +3608,14 @@ - rtf:WWEIGHT + rtf:tmEdited - + @@ -3657,10 +3623,10 @@ - + - character set identifier + @@ -3668,7 +3634,7 @@ - 0x4 + 38 @@ -3676,7 +3642,7 @@ - 0 + @@ -3700,14 +3666,14 @@ - rtf:CHS + rtf:cWords - + @@ -3715,10 +3681,10 @@ - + - index into ffn.szFfn to the name of the alternate font + @@ -3726,7 +3692,7 @@ - 0x5 + 42 @@ -3734,7 +3700,7 @@ - 0 + @@ -3758,14 +3724,14 @@ - rtf:IXCHSZALT + rtf:cCh - + @@ -3773,10 +3739,10 @@ - + - ? This is supposed to be of type PANOSE. + @@ -3784,7 +3750,7 @@ - 0x6 + 46 @@ -3792,7 +3758,7 @@ - 0 + @@ -3816,33 +3782,83 @@ - rtf:PANOSE + rtf:cPg + + + + + + + + + + - 10 + - + + + + + + + 48 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:cParas + + - + - + - + - ? This is supposed to be of type FONTSIGNATURE. + @@ -3850,7 +3866,7 @@ - 0x10 + 52 @@ -3858,7 +3874,7 @@ - 0 + 30 @@ -3866,7 +3882,7 @@ - + 0xc0000000 @@ -3874,7 +3890,7 @@ - + 2 @@ -3882,54 +3898,83 @@ - rtf:FS + rtf:rncEdn + + + + + + + + + + - 24 + - + + + + + + + 52 + + + + + + + + 16 + + + + + + + + 0x3fff0000 + + + + + + + + 14 + + + + + + + + rtf: + + - + - + - - - - - - - - - - - - - - - - - - - - - - + - invariant style identifier + @@ -3937,7 +3982,7 @@ - 0x2 + 52 @@ -3945,7 +3990,7 @@ - 0 + 14 @@ -3953,7 +3998,7 @@ - 0FFF + 0xc000 @@ -3961,7 +4006,7 @@ - :12 + 2 @@ -3969,14 +4014,14 @@ - rtf:STI + rtf: - + @@ -3984,11 +4029,10 @@ - + - spare field for any temporary use, always reset back to - zero! + @@ -3996,7 +4040,7 @@ - 0x2 + 52 @@ -4004,7 +4048,7 @@ - 12 + 10 @@ -4012,7 +4056,7 @@ - 1000 + 0x3c00 @@ -4020,7 +4064,7 @@ - :1 + 4 @@ -4028,14 +4072,14 @@ - rtf:FSCRATCH + rtf:unused14 - + @@ -4043,10 +4087,10 @@ - + - PHEs of all text with this style are wrong + @@ -4054,7 +4098,7 @@ - 0x2 + 52 @@ -4062,7 +4106,7 @@ - 13 + 6 @@ -4070,7 +4114,7 @@ - 2000 + 0x3c0 @@ -4078,7 +4122,7 @@ - :1 + 4 @@ -4086,14 +4130,14 @@ - rtf:FINVALHEIGHT + rtf:unused15 - + @@ -4101,10 +4145,10 @@ - + - UPEs have been generated + @@ -4112,7 +4156,7 @@ - 0x2 + 52 @@ -4120,7 +4164,7 @@ - 14 + 5 @@ -4128,7 +4172,7 @@ - 4000 + 0x20 @@ -4136,7 +4180,7 @@ - :1 + 1 @@ -4144,14 +4188,14 @@ - rtf:FHASUPE + rtf:fPrintFormData - + @@ -4159,11 +4203,10 @@ - + - std has been mass-copied; if unused at save time, style should - be deleted + @@ -4171,7 +4214,7 @@ - 0x2 + 52 @@ -4179,7 +4222,7 @@ - 15 + 4 @@ -4187,7 +4230,7 @@ - 8000 + 0x0 @@ -4195,7 +4238,7 @@ - :1 + 1 @@ -4203,14 +4246,14 @@ - rtf:FMASSCOPY + rtf:fSaveFormData - + @@ -4218,10 +4261,10 @@ - + - style type code + @@ -4229,7 +4272,7 @@ - 0x4 + 52 @@ -4237,7 +4280,7 @@ - 0 + 3 @@ -4245,7 +4288,7 @@ - 000F + 0x8 @@ -4253,7 +4296,7 @@ - :4 + 1 @@ -4261,14 +4304,14 @@ - rtf:SGC + rtf:fShadeFormData - + @@ -4276,10 +4319,10 @@ - + - base style + @@ -4287,7 +4330,7 @@ - 0x4 + 52 @@ -4295,7 +4338,7 @@ - 4 + 2 @@ -4303,7 +4346,7 @@ - FFF0 + 0x4 @@ -4311,7 +4354,7 @@ - :12 + 1 @@ -4319,14 +4362,14 @@ - rtf:ISTDBASE + rtf:fShadeMergeFields - + @@ -4334,10 +4377,10 @@ - + - # of UPXs (and UPEs) + @@ -4345,7 +4388,7 @@ - 0x6 + 52 @@ -4353,7 +4396,7 @@ - 0 + 1 @@ -4361,7 +4404,7 @@ - 000F + 0x2 @@ -4369,7 +4412,7 @@ - :4 + 1 @@ -4377,14 +4420,14 @@ - rtf:CUPX + rtf:reserved2 - + @@ -4392,10 +4435,10 @@ - + - next style + @@ -4403,7 +4446,7 @@ - 0x6 + 52 @@ -4411,7 +4454,7 @@ - 4 + 0 @@ -4419,7 +4462,7 @@ - FFF0 + 0x1 @@ -4427,7 +4470,7 @@ - :12 + 1 @@ -4435,14 +4478,14 @@ - rtf:ISTDNEXT + rtf:fIncludeSubdocsInStats - + @@ -4450,10 +4493,10 @@ - + - offset to end of upx's, start of upe's + @@ -4461,7 +4504,7 @@ - 0x8 + 56 @@ -4469,7 +4512,7 @@ - 0 + @@ -4493,14 +4536,14 @@ - rtf:BCHUPE + rtf:cLines - + @@ -4508,10 +4551,10 @@ - + - auto redefine style when appropriate + @@ -4519,7 +4562,7 @@ - 0xa + 60 @@ -4527,7 +4570,7 @@ - 0 + @@ -4535,7 +4578,7 @@ - 0001 + @@ -4543,7 +4586,7 @@ - :1 + @@ -4551,14 +4594,14 @@ - rtf:FAUTOREDEF + rtf:cWordsWithSubdocs - + @@ -4566,10 +4609,10 @@ - + - hidden from UI? + @@ -4577,7 +4620,7 @@ - 0xa + 64 @@ -4585,7 +4628,7 @@ - 1 + @@ -4593,7 +4636,7 @@ - 0002 + @@ -4601,7 +4644,7 @@ - :1 + @@ -4609,14 +4652,14 @@ - rtf:FHIDDEN + rtf:cChWithSubdocs - + @@ -4624,10 +4667,10 @@ - + - unused bits + @@ -4635,7 +4678,7 @@ - 0xa + 68 @@ -4643,7 +4686,7 @@ - 2 + @@ -4651,7 +4694,7 @@ - FFFC + @@ -4659,7 +4702,7 @@ - :14 + @@ -4667,7 +4710,7 @@ - rtf:UNUSED8_3 + rtf:cPgWithSubdocs @@ -4682,113 +4725,68 @@ - + - rtf:XSTZNAME + - + - - - - - - - - - - - - - rtf:XSTZNAME1 + 70 - + - - - - - - - - - - - - - rtf:UPXSTART + - + - - - - - - - - - - - - - - - - rtf:UPX + - + - - - - - - - + + + + + + + + + + + rtf:cParasWithSubdocs + + + + + + + + - + - + - - - - - - - - - - - - - - - - - - - + - Size of style sheet info + @@ -4796,7 +4794,7 @@ - 0x0 + 74 @@ -4804,7 +4802,7 @@ - 0 + @@ -4828,23 +4826,25 @@ - rtf:CSTD + rtf:cLinesWithSubdocs - + - + + + - Count of styles in stylesheet + @@ -4852,7 +4852,7 @@ - 0x2 + 78 @@ -4860,7 +4860,7 @@ - 0 + @@ -4884,14 +4884,14 @@ - rtf:CSTD + rtf:lKeyProtDoc - + @@ -4899,10 +4899,10 @@ - + - Length of STD Base as stored in a file + @@ -4910,7 +4910,7 @@ - 0x4 + 82 @@ -4918,7 +4918,7 @@ - 0 + 13 @@ -4926,7 +4926,7 @@ - + 0xe000 @@ -4934,7 +4934,7 @@ - + 3 @@ -4942,7 +4942,7 @@ - rtf:CBSTDBASEINFILE + rtf:wvkoSaved @@ -4957,10 +4957,10 @@ - + - Are built-in stylenames stored? + @@ -4968,7 +4968,7 @@ - 0x6 + 82 @@ -4976,7 +4976,7 @@ - 0 + 4 @@ -4984,7 +4984,7 @@ - 0001 + 0x1ff0 @@ -4992,7 +4992,7 @@ - :1 + 9 @@ -5000,7 +5000,7 @@ - rtf:FSTDSTYLENAMESWRITTEN + rtf:pctWwdSaved @@ -5015,10 +5015,10 @@ - + - Spare flags + @@ -5026,7 +5026,7 @@ - 0x6 + 82 @@ -5034,7 +5034,7 @@ - 1 + 2 @@ -5042,7 +5042,7 @@ - FFFE + 0xc @@ -5050,7 +5050,7 @@ - :15 + 2 @@ -5058,7 +5058,7 @@ - rtf:UNUSED4_2 + rtf:zkSaved @@ -5073,10 +5073,10 @@ - + - Max sti known when this file was written + @@ -5084,7 +5084,7 @@ - 0x8 + 82 @@ -5092,7 +5092,7 @@ - 0 + 1 @@ -5100,7 +5100,7 @@ - + 0x2 @@ -5108,7 +5108,7 @@ - + 1 @@ -5116,7 +5116,7 @@ - rtf:STIMAXWHENSAVED + rtf:unused16 @@ -5131,10 +5131,10 @@ - + - How many fixed-index istds are there? + @@ -5142,7 +5142,7 @@ - 0xA + 82 @@ -5158,7 +5158,7 @@ - + 0x1 @@ -5166,7 +5166,7 @@ - + 1 @@ -5174,7 +5174,7 @@ - rtf:ISTDMAXFIXEDWHENSAVED + rtf:iGutterPos @@ -5188,11 +5188,37 @@ + + + + + + + + + + + + + + + + + + + + + 28 + + + + + - + - Current version of built-in stylenames + @@ -5200,7 +5226,7 @@ - 0xC + 0 @@ -5208,7 +5234,7 @@ - 0 + @@ -5232,14 +5258,14 @@ - rtf:NVERBUILTINNAMESWHENSAVED + rtf:ISTARTAT - + @@ -5247,10 +5273,10 @@ - + - ftc used by StandardChpStsh for this document + @@ -5258,7 +5284,7 @@ - 0xE + 4 @@ -5266,7 +5292,7 @@ - 0 + @@ -5290,67 +5316,25 @@ - rtf:RGFTCSTANDARDCHPSTSH + rtf:NFC - - - 3 - - - - - - + - + - - - rtf:STYLESHEET - - - - - - - - - - - - - - - - - - - - - - - - - - 898 - - - - - - + - (fibh) FIBH Beginning of the FIB header magic number + @@ -5358,7 +5342,7 @@ - 0x0000 + 5 @@ -5366,7 +5350,7 @@ - 0 + 6 @@ -5374,7 +5358,7 @@ - + 0xc0 @@ -5382,7 +5366,7 @@ - + 2 @@ -5390,14 +5374,14 @@ - rtf:WIDENT + rtf:JC - + @@ -5405,11 +5389,10 @@ - + - FIB version written. This will be >= 101 for all Word 6.0 - for Windows and after documents. + @@ -5417,7 +5400,7 @@ - 0x0002 + 5 @@ -5425,7 +5408,7 @@ - 0 + 5 @@ -5433,7 +5416,7 @@ - + 0x20 @@ -5441,7 +5424,7 @@ - + 1 @@ -5449,14 +5432,14 @@ - rtf:NFIB + rtf:FLEGAL - + @@ -5464,10 +5447,10 @@ - + - product version written by + @@ -5475,7 +5458,7 @@ - 0x0004 + 5 @@ -5483,7 +5466,7 @@ - 0 + 4 @@ -5491,7 +5474,7 @@ - + 0x0 @@ -5499,7 +5482,7 @@ - + 1 @@ -5507,14 +5490,14 @@ - rtf:NPRODUCT + rtf:FNORESTART - + @@ -5522,12 +5505,10 @@ - + - language stamp -- localized version - In pre-WinWord 2.0 files this value was the nLocale. If value is - < 999, then it is the nLocale, otherwise it is the lid. + @@ -5535,7 +5516,7 @@ - 0x0006 + 5 @@ -5543,7 +5524,7 @@ - 0 + 3 @@ -5551,7 +5532,7 @@ - + 0x8 @@ -5559,7 +5540,7 @@ - + 1 @@ -5567,14 +5548,14 @@ - rtf:LID + rtf:FIDENTSAV - + @@ -5582,7 +5563,7 @@ - + @@ -5593,7 +5574,7 @@ - 0x0008 + 5 @@ -5601,7 +5582,7 @@ - 0 + 2 @@ -5609,7 +5590,7 @@ - + 0x4 @@ -5617,7 +5598,7 @@ - + 1 @@ -5625,14 +5606,14 @@ - rtf:PNNEXT + rtf:FCONVERTED - + @@ -5640,10 +5621,10 @@ - + - Set if this document is a template + @@ -5651,7 +5632,7 @@ - 0x000A + 5 @@ -5667,7 +5648,7 @@ - 0001 + 0x1 @@ -5675,7 +5656,7 @@ - :1 + 1 @@ -5683,14 +5664,14 @@ - rtf:FDOT + rtf:FTENTATIVE - + @@ -5698,10 +5679,10 @@ - + - Set if this document is a glossary + @@ -5709,7 +5690,7 @@ - 0x000A + 6 @@ -5717,7 +5698,7 @@ - 1 + @@ -5725,7 +5706,7 @@ - 0002 + @@ -5733,7 +5714,7 @@ - :1 + @@ -5741,25 +5722,33 @@ - rtf:FGLSY + rtf:RGBXCHNUMS + + + 9 + + + + + - + - + - + - when 1, file is in complex, fast-saved format. + @@ -5767,7 +5756,7 @@ - 0x000A + 15 @@ -5775,7 +5764,7 @@ - 2 + @@ -5783,7 +5772,7 @@ - 0004 + @@ -5791,7 +5780,7 @@ - :1 + @@ -5799,14 +5788,14 @@ - rtf:FCOMPLEX + rtf:IXCHFOLLOW - + @@ -5814,10 +5803,10 @@ - + - set if file contains 1 or more pictures + @@ -5825,7 +5814,7 @@ - 0x000A + 16 @@ -5833,7 +5822,7 @@ - 3 + @@ -5841,7 +5830,7 @@ - 0008 + @@ -5849,7 +5838,7 @@ - :1 + @@ -5857,14 +5846,14 @@ - rtf:FHASPIC + rtf:DXASPACE - + @@ -5872,10 +5861,10 @@ - + - count of times file was quicksaved + @@ -5883,7 +5872,7 @@ - 0x000A + 20 @@ -5891,7 +5880,7 @@ - 4 + @@ -5899,7 +5888,7 @@ - 00F0 + @@ -5907,7 +5896,7 @@ - :4 + @@ -5915,14 +5904,14 @@ - rtf:CQUICKSAVES + rtf:DXAINDENT - + @@ -5930,10 +5919,10 @@ - + - Set if file is encrypted + @@ -5941,7 +5930,7 @@ - 0x000A + 24 @@ -5949,7 +5938,7 @@ - 8 + @@ -5957,7 +5946,7 @@ - 0100 + @@ -5965,7 +5954,7 @@ - :1 + @@ -5973,14 +5962,14 @@ - rtf:FENCRYPTED + rtf:CBGRPPRLCHPX - + @@ -5988,15 +5977,10 @@ - + - When 0, this fib refers to the table stream named "0Table", - when 1, this fib refers to the table stream named "1Table". - Normally, a file will have only one table stream, but under unusual - circumstances a file may have table streams with both names. In - that case, this flag must be used to decide which table stream is - valid. + @@ -6004,7 +5988,7 @@ - 0x000A + 25 @@ -6012,7 +5996,7 @@ - 9 + @@ -6020,7 +6004,7 @@ - 0200 + @@ -6028,7 +6012,7 @@ - :1 + @@ -6036,14 +6020,14 @@ - rtf:FWHICHTBLSTM + rtf:CBGRPPRLPAPX - + @@ -6051,10 +6035,10 @@ - + - Set when user has recommended that file be read read-only + @@ -6062,7 +6046,7 @@ - 0x000A + 26 @@ -6070,7 +6054,7 @@ - 10 + @@ -6078,7 +6062,7 @@ - 0400 + @@ -6086,7 +6070,7 @@ - :1 + @@ -6094,14 +6078,14 @@ - rtf:FREADONLYRECOMMENDED + rtf:ilvlRestartLim - + @@ -6109,10 +6093,10 @@ - + - Set when file owner has made the file write reserved + @@ -6120,7 +6104,7 @@ - 0x000A + 27 @@ -6128,7 +6112,7 @@ - 11 + @@ -6136,7 +6120,7 @@ - 0800 + @@ -6144,7 +6128,7 @@ - :1 + @@ -6152,14 +6136,14 @@ - rtf:FWRITERESERVATION + rtf:grfhic - + @@ -6167,10 +6151,80 @@ - + - Set when using extended character set in file + rtf:xst + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 28 + + + + + + + + + + rtf:LISTLEVEL + + + + + + + + + + + + + + + + + + + + + + @@ -6178,7 +6232,7 @@ - 0x000A + 0 @@ -6186,7 +6240,7 @@ - 12 + @@ -6194,7 +6248,7 @@ - 1000 + @@ -6202,7 +6256,7 @@ - :1 + @@ -6210,14 +6264,14 @@ - rtf:FEXTCHAR + rtf:LSID - + @@ -6225,10 +6279,10 @@ - + - REVIEW + @@ -6236,7 +6290,7 @@ - 0x000A + 4 @@ -6244,7 +6298,7 @@ - 13 + @@ -6252,7 +6306,7 @@ - 2000 + @@ -6260,7 +6314,7 @@ - :1 + @@ -6268,14 +6322,14 @@ - rtf:FLOADOVERRIDE + rtf:TPLC - + @@ -6283,10 +6337,10 @@ - + - REVIEW + @@ -6294,7 +6348,7 @@ - 0x000A + 4 @@ -6302,7 +6356,7 @@ - 14 + 31 @@ -6310,7 +6364,7 @@ - 4000 + 0x80000000 @@ -6318,7 +6372,7 @@ - :1 + 1 @@ -6326,14 +6380,14 @@ - rtf:FFAREAST + rtf:fBuildIn - + @@ -6341,10 +6395,10 @@ - + - REVIEW + @@ -6352,7 +6406,7 @@ - 0x000A + 4 @@ -6360,7 +6414,7 @@ - 15 + 16 @@ -6368,7 +6422,7 @@ - 8000 + 0x7fff0000 @@ -6376,7 +6430,7 @@ - :1 + 15 @@ -6384,14 +6438,14 @@ - rtf:FCRYPTO + rtf:ilgpdM1 - + @@ -6399,11 +6453,10 @@ - + - This file format it compatible with readers that understand - nFib at or above this value. + @@ -6411,7 +6464,7 @@ - 0x000C + 4 @@ -6427,7 +6480,7 @@ - + 0xffff @@ -6435,7 +6488,7 @@ - + 16 @@ -6443,14 +6496,14 @@ - rtf:NFIBBACK + rtf:lid - + @@ -6458,10 +6511,10 @@ - + - File encrypted key, only valid if fEncrypted. + @@ -6469,7 +6522,7 @@ - 0x000E + 4 @@ -6485,7 +6538,7 @@ - + 0x7fffffff @@ -6493,7 +6546,7 @@ - + 31 @@ -6501,7 +6554,7 @@ - rtf:LKEY + rtf:random @@ -6516,12 +6569,10 @@ - + - environment in which file was created - 0 created by Win Word - 1 created by Mac Word + @@ -6529,7 +6580,7 @@ - 0x0012 + 8 @@ -6537,7 +6588,7 @@ - 0 + @@ -6561,25 +6612,33 @@ - rtf:ENVR + rtf:RGISTD + + + 9 + + + + + - + - + - + - when 1, this file was last saved in the Mac environment + @@ -6587,7 +6646,7 @@ - 0x0013 + 14 @@ -6595,7 +6654,7 @@ - 0 + 7 @@ -6603,7 +6662,7 @@ - 01 + 0x80 @@ -6611,7 +6670,7 @@ - :1 + 1 @@ -6619,7 +6678,7 @@ - rtf:FMAC + rtf:FSIMPLELIST @@ -6634,7 +6693,7 @@ - + @@ -6645,7 +6704,7 @@ - 0x0013 + 14 @@ -6653,7 +6712,7 @@ - 1 + 5 @@ -6661,7 +6720,7 @@ - 02 + 0x20 @@ -6669,7 +6728,7 @@ - :1 + 1 @@ -6677,7 +6736,7 @@ - rtf:FEMPTYSPECIAL + rtf:fAutoNum @@ -6692,7 +6751,7 @@ - + @@ -6703,7 +6762,7 @@ - 0x0013 + 14 @@ -6711,7 +6770,7 @@ - 2 + 3 @@ -6719,7 +6778,7 @@ - 04 + 0x8 @@ -6727,7 +6786,7 @@ - :1 + 1 @@ -6735,7 +6794,7 @@ - rtf:FLOADOVERRIDEPAGE + rtf:fHybrid @@ -6750,7 +6809,7 @@ - + @@ -6761,7 +6820,7 @@ - 0x0013 + 14 @@ -6769,7 +6828,7 @@ - 3 + 0 @@ -6777,7 +6836,7 @@ - 08 + 0x7 @@ -6785,7 +6844,7 @@ - :1 + 3 @@ -6793,7 +6852,7 @@ - rtf:FFUTURESAVEDUNDO + rtf:reserved1 @@ -6808,7 +6867,7 @@ - + @@ -6819,7 +6878,7 @@ - 0x0013 + 27 @@ -6827,7 +6886,7 @@ - 4 + @@ -6835,7 +6894,7 @@ - 10 + @@ -6843,7 +6902,7 @@ - :1 + @@ -6851,7 +6910,7 @@ - rtf:FWORD97SAVED + rtf:grfhic @@ -6865,11 +6924,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + rtf:LISTTABLE + + + + + + + + + + + + + + + + + + + + + + + + + + 8 + + + + + - + + + + start-at value if fFormatting == false and fStartAt == true. + (if fFormatting == true, the start-at is stored in the LVL) + + + + + + + + 0x0 + + + + + + + + 0 + + + + + + + + + + + + + 4 + + + + + + + + rtf:ISTARTAT + + + + + + + + + + + + + + + + + + the level to be overridden @@ -6877,7 +7050,7 @@ - 0x0013 + 0x4 @@ -6885,7 +7058,7 @@ - 5 + 0 @@ -6893,7 +7066,7 @@ - FE + 0x0F @@ -6901,7 +7074,7 @@ - :3 + :4 @@ -6909,7 +7082,7 @@ - rtf:FSPARE0 + rtf:ILVL @@ -6924,15 +7097,10 @@ - + - Default extended character set id for text in document stream. - (overridden by chp.chse) - 0 by default characters in doc stream should be interpreted using - the ANSI character set used by Windows - 256 characters in doc stream should be interpreted using the - Macintosh character set. + true if the start-at value is overridden @@ -6940,7 +7108,7 @@ - 0x0014 + 0x4 @@ -6948,7 +7116,7 @@ - 0 + 4 @@ -6956,7 +7124,7 @@ - + 0x10 @@ -6964,7 +7132,7 @@ - + :1 @@ -6972,14 +7140,14 @@ - rtf:CHS + rtf:FSTARTAT - + @@ -6987,15 +7155,11 @@ - + - Default extended character set id for text in internal data - structures - 0 by default characters stored in internal data structures should - be interpreted using the ANSI character set used by Windows - 256 characters stored in internal data structures should be - interpreted using the Macintosh character set. + true if the formatting is overriden (in which case the LFOLVL + should contain a pointer to a LVL) @@ -7003,7 +7167,7 @@ - 0x0016 + 0x4 @@ -7011,7 +7175,7 @@ - 0 + 5 @@ -7019,7 +7183,7 @@ - + 0x20 @@ -7027,7 +7191,7 @@ - + :1 @@ -7035,14 +7199,14 @@ - rtf:CHSTABLES + rtf:FFORMATTING - + @@ -7050,13 +7214,10 @@ - + - file offset of first character of text. In non-complex - files a CP can be transformed into an FC by the - following transformation: - fc = cp + fib.fcMin. + reserved @@ -7064,7 +7225,7 @@ - 0x0018 + 0x4 @@ -7072,7 +7233,7 @@ - 0 + 6 @@ -7080,7 +7241,7 @@ - + 0xC0 @@ -7088,7 +7249,7 @@ - + :2 @@ -7096,14 +7257,14 @@ - rtf:FCMIN + rtf:UNSIGNED4_6 - + @@ -7111,11 +7272,10 @@ - + - file offset of last character of text in document text stream + - 1 + reserved @@ -7123,7 +7283,7 @@ - 0x001C + 0x5 @@ -7147,7 +7307,7 @@ - + 3 @@ -7155,25 +7315,59 @@ - rtf:FCMAC + rtf:RESERVED + + + 3 + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + 15 + + + + + - + - Count of fields in the array of "shorts" + @@ -7181,7 +7375,7 @@ - 0x0020 + 0 @@ -7189,7 +7383,7 @@ - 0 + @@ -7213,14 +7407,14 @@ - rtf:CSW + rtf:lsid - + @@ -7228,13 +7422,10 @@ - + - [Beginning of the array of shorts, rgls] - Unique number Identifying the File's creator 6A62 is the creator ID - for Word and is reserved. Other creators should choose a different - value. + @@ -7242,7 +7433,7 @@ - 0x0022 + 12 @@ -7250,7 +7441,7 @@ - 0 + @@ -7274,14 +7465,14 @@ - rtf:WMAGICCREATED + rtf:clfolvl - + @@ -7289,10 +7480,10 @@ - + - identifies the File's last modifier + @@ -7300,7 +7491,7 @@ - 0x0024 + 13 @@ -7308,7 +7499,7 @@ - 0 + @@ -7332,14 +7523,14 @@ - rtf:WMAGICREVISED + rtf:ibstFltAutoNum - + @@ -7347,10 +7538,10 @@ - + - private data + @@ -7358,7 +7549,7 @@ - 0x0026 + 14 @@ -7366,7 +7557,7 @@ - 0 + @@ -7390,14 +7581,14 @@ - rtf:WMAGICCREATEDPRIVATE + rtf:grfhic - + @@ -7405,10 +7596,78 @@ - + - private data + rtf:LFOData + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:SttbRgtplc + + + + + + + + + + + + + + + + + + + + + + + 4 + + + + + + + + + + @@ -7416,7 +7675,7 @@ - 0x0028 + 0 @@ -7424,7 +7683,7 @@ - 0 + @@ -7448,83 +7707,183 @@ - rtf:WMAGICREVISEDPRIVATE + rtf:cp - + + + + + + + + + + + + + + + + + + + + + + + + + rtf:LFOTABLE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:FONTTABLE + + + + + + + + + + + + + + + + + + + + + + + + + + 40 + + + + + - - - - not used - - - - - - - - 0x002A - - - - - + - 0 + rtf:F - + + + + + + + + + + + + + - + rtf:ALTFONTNAME - + + + + + + + + + + + + + - + rtf:XSZFFN - + + + + + + + + + + + - rtf:PNFBPCHPFIRST_W6 + zero terminated string that records name of font. Possibly + followed by a second xsz which records the name of an alternate + font to use if the first named font does not exist on this system. + Maximal size of xszFfn is 65 characters. - + - - - - - - - + + - not used + total length of FFN - 1. @@ -7532,7 +7891,7 @@ - 0x002C + 0x0 @@ -7564,14 +7923,14 @@ - rtf:PNCHPFIRST_W6 + rtf:CBFFNM1 - + @@ -7579,10 +7938,10 @@ - + - not used + pitch request @@ -7590,7 +7949,7 @@ - 0x002E + 0x1 @@ -7606,7 +7965,7 @@ - + 03 @@ -7614,7 +7973,7 @@ - + :2 @@ -7622,14 +7981,14 @@ - rtf:CPNBTECHP_W6 + rtf:PRQ - + @@ -7637,10 +7996,10 @@ - + - not used + when 1, font is a TrueType font @@ -7648,7 +8007,7 @@ - 0x0030 + 0x1 @@ -7656,7 +8015,7 @@ - 0 + 2 @@ -7664,7 +8023,7 @@ - + 04 @@ -7672,7 +8031,7 @@ - + :1 @@ -7680,14 +8039,14 @@ - rtf:PNFBPPAPFIRST_W6 + rtf:FTRUETYPE - + @@ -7695,10 +8054,10 @@ - + - not used + reserved @@ -7706,7 +8065,7 @@ - 0x0032 + 0x1 @@ -7714,7 +8073,7 @@ - 0 + 3 @@ -7722,7 +8081,7 @@ - + 08 @@ -7730,7 +8089,7 @@ - + :1 @@ -7738,14 +8097,14 @@ - rtf:PNPAPFIRST_W6 + rtf:UNUSED1_3 - + @@ -7753,10 +8112,10 @@ - + - not used + font family id @@ -7764,7 +8123,7 @@ - 0x0034 + 0x1 @@ -7772,7 +8131,7 @@ - 0 + 4 @@ -7780,7 +8139,7 @@ - + 70 @@ -7788,7 +8147,7 @@ - + :3 @@ -7796,14 +8155,14 @@ - rtf:CPNBTEPAP_W6 + rtf:FF - + @@ -7811,10 +8170,10 @@ - + - not used + reserved @@ -7822,7 +8181,7 @@ - 0x0036 + 0x1 @@ -7830,7 +8189,7 @@ - 0 + 7 @@ -7838,7 +8197,7 @@ - + 80 @@ -7846,7 +8205,7 @@ - + :1 @@ -7854,14 +8213,14 @@ - rtf:PNFBPLVCFIRST_W6 + rtf:UNUSED1_7 - + @@ -7869,10 +8228,10 @@ - + - not used + base weight of font @@ -7880,7 +8239,7 @@ - 0x0038 + 0x2 @@ -7912,14 +8271,14 @@ - rtf:PNLVCFIRST_W6 + rtf:WWEIGHT - + @@ -7927,10 +8286,10 @@ - + - not used + character set identifier @@ -7938,7 +8297,7 @@ - 0x003A + 0x4 @@ -7970,14 +8329,14 @@ - rtf:CPNBTELVC_W6 + rtf:CHS - + @@ -7985,11 +8344,10 @@ - + - Language id if document was written by Far East version of Word - (i.e. FIB.fFarEast is on) + index into ffn.szFfn to the name of the alternate font @@ -7997,7 +8355,7 @@ - 0x003C + 0x5 @@ -8029,14 +8387,14 @@ - rtf:LIDFE + rtf:IXCHSZALT - + @@ -8044,10 +8402,10 @@ - + - Number of fields in the array of longs + ? This is supposed to be of type PANOSE. @@ -8055,7 +8413,7 @@ - 0x003E + 0x6 @@ -8087,85 +8445,33 @@ - rtf:CLW + rtf:PANOSE - - - - - - - - - - - - - [Beginning of the array of longs, rglw] - file offset of last byte written to file + 1. - - - - - - - - 0x0040 - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - rtf:CBMAC + 10 - + - + - + - + - contains the build date of the creator. 10695 indicates the - creator program was compiled on Jan 6, 1995 + ? This is supposed to be of type FONTSIGNATURE. @@ -8173,7 +8479,7 @@ - 0x0044 + 0x10 @@ -8205,83 +8511,54 @@ - rtf:LPRODUCTCREATED + rtf:FS - - - - - - - - - - - - - contains the build date of the File's last modifier - - - - - - - - 0x0048 - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - rtf:LPRODUCTREVISED + 24 - + - + - + + + + + + + + + + + + + + + + + + + + + + - + - length of main document text stream + invariant style identifier @@ -8289,7 +8566,7 @@ - 0x004C + 0x2 @@ -8305,7 +8582,7 @@ - + 0FFF @@ -8313,7 +8590,7 @@ - + :12 @@ -8321,14 +8598,14 @@ - rtf:CCPTEXT + rtf:STI - + @@ -8336,10 +8613,11 @@ - + - length of footnote subdocument text stream + spare field for any temporary use, always reset back to + zero! @@ -8347,7 +8625,7 @@ - 0x0050 + 0x2 @@ -8355,7 +8633,7 @@ - 0 + 12 @@ -8363,7 +8641,7 @@ - + 1000 @@ -8371,7 +8649,7 @@ - + :1 @@ -8379,14 +8657,14 @@ - rtf:CCPFTN + rtf:FSCRATCH - + @@ -8394,10 +8672,10 @@ - + - length of header subdocument text stream + PHEs of all text with this style are wrong @@ -8405,7 +8683,7 @@ - 0x0054 + 0x2 @@ -8413,7 +8691,7 @@ - 0 + 13 @@ -8421,7 +8699,7 @@ - + 2000 @@ -8429,7 +8707,7 @@ - + :1 @@ -8437,14 +8715,14 @@ - rtf:CCPHDD + rtf:FINVALHEIGHT - + @@ -8452,11 +8730,10 @@ - + - length of macro subdocument text stream, which should now - always be 0. + UPEs have been generated @@ -8464,7 +8741,7 @@ - 0x0058 + 0x2 @@ -8472,7 +8749,7 @@ - 0 + 14 @@ -8480,7 +8757,7 @@ - + 4000 @@ -8488,7 +8765,7 @@ - + :1 @@ -8496,14 +8773,14 @@ - rtf:CCPMCR + rtf:FHASUPE - + @@ -8511,10 +8788,11 @@ - + - length of annotation subdocument text stream + std has been mass-copied; if unused at save time, style should + be deleted @@ -8522,7 +8800,7 @@ - 0x005C + 0x2 @@ -8530,7 +8808,7 @@ - 0 + 15 @@ -8538,7 +8816,7 @@ - + 8000 @@ -8546,7 +8824,7 @@ - + :1 @@ -8554,14 +8832,14 @@ - rtf:CCPATN + rtf:FMASSCOPY - + @@ -8569,10 +8847,10 @@ - + - length of endnote subdocument text stream + style type code @@ -8580,7 +8858,7 @@ - 0x0060 + 0x4 @@ -8596,7 +8874,7 @@ - + 000F @@ -8604,7 +8882,7 @@ - + :4 @@ -8612,14 +8890,14 @@ - rtf:CCPEDN + rtf:SGC - + @@ -8627,10 +8905,10 @@ - + - length of textbox subdocument text stream + base style @@ -8638,7 +8916,7 @@ - 0x0064 + 0x4 @@ -8646,7 +8924,7 @@ - 0 + 4 @@ -8654,7 +8932,7 @@ - + FFF0 @@ -8662,7 +8940,7 @@ - + :12 @@ -8670,14 +8948,14 @@ - rtf:CCPTXBX + rtf:ISTDBASE - + @@ -8685,10 +8963,10 @@ - + - length of header textbox subdocument text stream. + # of UPXs (and UPEs) @@ -8696,7 +8974,7 @@ - 0x0068 + 0x6 @@ -8712,7 +8990,7 @@ - + 000F @@ -8720,7 +8998,7 @@ - + :4 @@ -8728,14 +9006,14 @@ - rtf:CCPHDRTXBX + rtf:CUPX - + @@ -8743,12 +9021,10 @@ - + - when there was insufficient memory for Word to expand the - plcfbte at save time, the plcfbte is written to the file in a - linked list of 512-byte pieces starting with this pn + next style @@ -8756,7 +9032,7 @@ - 0x006C + 0x6 @@ -8764,7 +9040,7 @@ - 0 + 4 @@ -8772,7 +9048,7 @@ - + FFF0 @@ -8780,7 +9056,7 @@ - + :12 @@ -8788,14 +9064,14 @@ - rtf:PNFBPCHPFIRST + rtf:ISTDNEXT - + @@ -8803,11 +9079,10 @@ - + - the page number of the lowest numbered page in the document - that records CHPX FKP information + offset to end of upx's, start of upe's @@ -8815,7 +9090,7 @@ - 0x0070 + 0x8 @@ -8847,14 +9122,14 @@ - rtf:PNCHPFIRST + rtf:BCHUPE - + @@ -8862,12 +9137,10 @@ - + - count of CHPX FKPs recorded in file. In non-complex files if - the number of entries in the plcfbteChpx is less than this, the - plcfbteChpx is incomplete. + auto redefine style when appropriate @@ -8875,7 +9148,7 @@ - 0x0074 + 0xa @@ -8891,7 +9164,7 @@ - + 0001 @@ -8899,7 +9172,7 @@ - + :1 @@ -8907,14 +9180,14 @@ - rtf:CPNBTECHP + rtf:FAUTOREDEF - + @@ -8922,12 +9195,10 @@ - + - when there was insufficient memory for Word to expand the - plcfbte at save time, the plcfbte is written to the file in a - linked list of 512-byte pieces starting with this pn + hidden from UI? @@ -8935,7 +9206,7 @@ - 0x0078 + 0xa @@ -8943,7 +9214,7 @@ - 0 + 1 @@ -8951,7 +9222,7 @@ - + 0002 @@ -8959,7 +9230,7 @@ - + :1 @@ -8967,14 +9238,14 @@ - rtf:PNFBPPAPFIRST + rtf:FHIDDEN - + @@ -8982,11 +9253,10 @@ - + - the page number of the lowest numbered page in the document - that records PAPX FKP information + unused bits @@ -8994,7 +9264,7 @@ - 0x007C + 0xa @@ -9002,7 +9272,7 @@ - 0 + 2 @@ -9010,7 +9280,7 @@ - + FFFC @@ -9018,7 +9288,7 @@ - + :14 @@ -9026,14 +9296,14 @@ - rtf:PNPAPFIRST + rtf:UNUSED8_3 - + @@ -9041,72 +9311,119 @@ - - - - count of PAPX FKPs recorded in file. In non-complex files if - the number of entries in the plcfbtePapx is less than this, the - plcfbtePapx is incomplete. - - - - - - - - 0x0080 - - - - - + - 0 + rtf:XSTZNAME - + + + + + + + + + + + + + - + rtf:XSTZNAME1 - + + + + + + + + + + + + + - + rtf:UPXSTART - + + + + + + + + + + + + + + + + - rtf:CPNBTEPAP + rtf:UPX - + - - - + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + - + + + + - when there was insufficient memory for Word to expand the - plcfbte at save time, the plcfbte is written to the file in a - linked list of 512-byte pieces starting with this pn + Size of style sheet info @@ -9114,7 +9431,7 @@ - 0x0084 + 0x0 @@ -9146,26 +9463,23 @@ - rtf:PNFBPLVCFIRST + rtf:CSTD - + - - - + - the page number of the lowest numbered page in the document - that records LVC FKP information + Count of styles in stylesheet @@ -9173,7 +9487,7 @@ - 0x0088 + 0x2 @@ -9205,14 +9519,14 @@ - rtf:PNLVCFIRST + rtf:CSTD - + @@ -9220,12 +9534,10 @@ - + - count of LVC FKPs recorded in file. In non-complex files if the - number of entries in the plcfbtePapx is less than this, the - plcfbtePapx is incomplete. + Length of STD Base as stored in a file @@ -9233,7 +9545,7 @@ - 0x008C + 0x4 @@ -9265,14 +9577,14 @@ - rtf:CPNBTELVC + rtf:CBSTDBASEINFILE - + @@ -9280,10 +9592,10 @@ - + - + Are built-in stylenames stored? @@ -9291,7 +9603,7 @@ - 0x0090 + 0x6 @@ -9307,7 +9619,7 @@ - + 0001 @@ -9315,7 +9627,7 @@ - + :1 @@ -9323,14 +9635,14 @@ - rtf:FCISLANDFIRST + rtf:FSTDSTYLENAMESWRITTEN - + @@ -9338,10 +9650,10 @@ - + - + Spare flags @@ -9349,7 +9661,7 @@ - 0x0094 + 0x6 @@ -9357,7 +9669,7 @@ - 0 + 1 @@ -9365,7 +9677,7 @@ - + FFFE @@ -9373,7 +9685,7 @@ - + :15 @@ -9381,14 +9693,14 @@ - rtf:FCISLANDLIM + rtf:UNUSED4_2 - + @@ -9396,10 +9708,10 @@ - + - Number of fields in the array of FC/LCB pairs. + Max sti known when this file was written @@ -9407,7 +9719,7 @@ - 0x0098 + 0x8 @@ -9439,7 +9751,7 @@ - rtf:CFCLCB + rtf:STIMAXWHENSAVED @@ -9454,13 +9766,10 @@ - + - [Beginning of array of FC/LCB pairs, rgfclcb] - file offset of original allocation for STSH in table stream. During - fast save Word will attempt to reuse this allocation if STSH is - small enough to fit. + How many fixed-index istds are there? @@ -9468,7 +9777,7 @@ - 0x009A + 0xA @@ -9500,14 +9809,14 @@ - rtf:FCSTSHFORIG + rtf:ISTDMAXFIXEDWHENSAVED - + @@ -9515,10 +9824,10 @@ - + - count of bytes of original STSH allocation + Current version of built-in stylenames @@ -9526,7 +9835,7 @@ - 0x009E + 0xC @@ -9558,14 +9867,14 @@ - rtf:LCBSTSHFORIG + rtf:NVERBUILTINNAMESWHENSAVED - + @@ -9573,10 +9882,10 @@ - + - offset of STSH in table stream. + ftc used by StandardChpStsh for this document @@ -9584,7 +9893,7 @@ - 0x00A2 + 0xE @@ -9616,25 +9925,67 @@ - rtf:FCSTSHF + rtf:RGFTCSTANDARDCHPSTSH + + + 3 + + + + + - + - + + + + rtf:STYLESHEET + + + + + + + + + + + + + + + + + + + + + + + + + + 898 + + + + + - + - count of bytes of current STSH allocation + (fibh) FIBH Beginning of the FIB header magic number @@ -9642,7 +9993,7 @@ - 0x00A6 + 0x0000 @@ -9674,14 +10025,14 @@ - rtf:LCBSTSHF + rtf:WIDENT - + @@ -9689,12 +10040,11 @@ - + - offset in table stream of footnote reference PLCF of FRD - structures. CPs in PLC are relative to main document text stream - and give location of footnote references. + FIB version written. This will be >= 101 for all Word 6.0 + for Windows and after documents. @@ -9702,7 +10052,7 @@ - 0x00AA + 0x0002 @@ -9734,14 +10084,14 @@ - rtf:FCPLCFFNDREF + rtf:NFIB - + @@ -9749,11 +10099,10 @@ - + - count of bytes of footnote reference PLC== 0 if no footnotes - defined in document. + product version written by @@ -9761,7 +10110,7 @@ - 0x00AE + 0x0004 @@ -9793,14 +10142,14 @@ - rtf:LCBPLCFFNDREF + rtf:NPRODUCT - + @@ -9808,15 +10157,12 @@ - + - offset in table stream of footnote text PLC. CPs in PLC are - relative to footnote subdocument text stream and give location of - beginnings of footnote text for corresponding references recorded - in plcffndRef. No structure is stored in this plc. There will just - be n+1 FC entries in this PLC when there are n - footnotes + language stamp -- localized version + In pre-WinWord 2.0 files this value was the nLocale. If value is + < 999, then it is the nLocale, otherwise it is the lid. @@ -9824,7 +10170,7 @@ - 0x00B2 + 0x0006 @@ -9856,14 +10202,14 @@ - rtf:FCPLCFFNDTXT + rtf:LID - + @@ -9871,11 +10217,10 @@ - + - count of bytes of footnote text PLC. == 0 if no footnotes - defined in document + @@ -9883,7 +10228,7 @@ - 0x00B6 + 0x0008 @@ -9915,14 +10260,14 @@ - rtf:LCBPLCFFNDTXT + rtf:PNNEXT - + @@ -9930,12 +10275,10 @@ - + - offset in table stream of annotation reference ATRD PLC. The - CPs recorded in this PLC give the offset of annotation references - in the main document. + Set if this document is a template @@ -9943,7 +10286,7 @@ - 0x00BA + 0x000A @@ -9959,7 +10302,7 @@ - + 0001 @@ -9967,7 +10310,7 @@ - + :1 @@ -9975,14 +10318,14 @@ - rtf:FCPLCFANDREF + rtf:FDOT - + @@ -9990,10 +10333,10 @@ - + - count of bytes of annotation reference PLC. + Set if this document is a glossary @@ -10001,7 +10344,7 @@ - 0x00BE + 0x000A @@ -10009,7 +10352,7 @@ - 0 + 1 @@ -10017,7 +10360,7 @@ - + 0002 @@ -10025,7 +10368,7 @@ - + :1 @@ -10033,14 +10376,14 @@ - rtf:LCBPLCFANDREF + rtf:FGLSY - + @@ -10048,15 +10391,10 @@ - + - offset in table stream of annotation text PLC. The Cps recorded - in this PLC give the offset of the annotation text in the - annotation sub document corresponding to the references stored in - the plcfandRef. There is a 1 to 1 correspondence between entries - recorded in the plcfandTxt and the plcfandRef. No structure is - stored in this PLC. + when 1, file is in complex, fast-saved format. @@ -10064,7 +10402,7 @@ - 0x00C2 + 0x000A @@ -10072,7 +10410,7 @@ - 0 + 2 @@ -10080,7 +10418,7 @@ - + 0004 @@ -10088,7 +10426,7 @@ - + :1 @@ -10096,14 +10434,14 @@ - rtf:FCPLCFANDTXT + rtf:FCOMPLEX - + @@ -10111,10 +10449,10 @@ - + - count of bytes of the annotation text PLC + set if file contains 1 or more pictures @@ -10122,7 +10460,7 @@ - 0x00C6 + 0x000A @@ -10130,7 +10468,7 @@ - 0 + 3 @@ -10138,7 +10476,7 @@ - + 0008 @@ -10146,7 +10484,7 @@ - + :1 @@ -10154,14 +10492,14 @@ - rtf:LCBPLCFANDTXT + rtf:FHASPIC - + @@ -10169,11 +10507,10 @@ - + - offset in table stream of section descriptor SED PLC. CPs in - PLC are relative to main document. + count of times file was quicksaved @@ -10181,7 +10518,7 @@ - 0x00CA + 0x000A @@ -10189,7 +10526,7 @@ - 0 + 4 @@ -10197,7 +10534,7 @@ - + 00F0 @@ -10205,7 +10542,7 @@ - + :4 @@ -10213,14 +10550,14 @@ - rtf:FCPLCFSED + rtf:CQUICKSAVES - + @@ -10228,10 +10565,10 @@ - + - count of bytes of section descriptor PLC. + Set if file is encrypted @@ -10239,7 +10576,7 @@ - 0x00CE + 0x000A @@ -10247,7 +10584,7 @@ - 0 + 8 @@ -10255,7 +10592,7 @@ - + 0100 @@ -10263,7 +10600,7 @@ - + :1 @@ -10271,14 +10608,14 @@ - rtf:LCBPLCFSED + rtf:FENCRYPTED - + @@ -10286,10 +10623,15 @@ - + - no longer used + When 0, this fib refers to the table stream named "0Table", + when 1, this fib refers to the table stream named "1Table". + Normally, a file will have only one table stream, but under unusual + circumstances a file may have table streams with both names. In + that case, this flag must be used to decide which table stream is + valid. @@ -10297,7 +10639,7 @@ - 0x00D2 + 0x000A @@ -10305,7 +10647,7 @@ - 0 + 9 @@ -10313,7 +10655,7 @@ - + 0200 @@ -10321,7 +10663,7 @@ - + :1 @@ -10329,14 +10671,14 @@ - rtf:FCPLCFPAD + rtf:FWHICHTBLSTM - + @@ -10344,10 +10686,10 @@ - + - no longer used + Set when user has recommended that file be read read-only @@ -10355,7 +10697,7 @@ - 0x00D6 + 0x000A @@ -10363,7 +10705,7 @@ - 0 + 10 @@ -10371,7 +10713,7 @@ - + 0400 @@ -10379,7 +10721,7 @@ - + :1 @@ -10387,14 +10729,14 @@ - rtf:LCBPLCFPAD + rtf:FREADONLYRECOMMENDED - + @@ -10402,13 +10744,10 @@ - + - offset in table stream of PHE PLC of paragraph heights. CPs in - PLC are relative to main document text stream. Only written for - files in complex format. Should not be written by third - party creators of Word files. + Set when file owner has made the file write reserved @@ -10416,7 +10755,7 @@ - 0x00DA + 0x000A @@ -10424,7 +10763,7 @@ - 0 + 11 @@ -10432,7 +10771,7 @@ - + 0800 @@ -10440,7 +10779,7 @@ - + :1 @@ -10448,14 +10787,14 @@ - rtf:FCPLCFPHE + rtf:FWRITERESERVATION - + @@ -10463,11 +10802,10 @@ - + - count of bytes of paragraph height PLC. ==0 when file is - non-complex. + Set when using extended character set in file @@ -10475,7 +10813,7 @@ - 0x00DE + 0x000A @@ -10483,7 +10821,7 @@ - 0 + 12 @@ -10491,7 +10829,7 @@ - + 1000 @@ -10499,7 +10837,7 @@ - + :1 @@ -10507,14 +10845,14 @@ - rtf:LCBPLCFPHE + rtf:FEXTCHAR - + @@ -10522,12 +10860,10 @@ - + - offset in table stream of glossary string table. This table - consists of Pascal style strings (strings stored prefixed with a - length byte) concatenated one after another. + REVIEW @@ -10535,7 +10871,7 @@ - 0x00E2 + 0x000A @@ -10543,7 +10879,7 @@ - 0 + 13 @@ -10551,7 +10887,7 @@ - + 2000 @@ -10559,7 +10895,7 @@ - + :1 @@ -10567,14 +10903,14 @@ - rtf:FCSTTBFGLSY + rtf:FLOADOVERRIDE - + @@ -10582,11 +10918,10 @@ - + - count of bytes of glossary string table. == 0 for non-glossary - documents.!=0 for glossary documents. + REVIEW @@ -10594,7 +10929,7 @@ - 0x00E6 + 0x000A @@ -10602,7 +10937,7 @@ - 0 + 14 @@ -10610,7 +10945,7 @@ - + 4000 @@ -10618,7 +10953,7 @@ - + :1 @@ -10626,14 +10961,14 @@ - rtf:LCBSTTBFGLSY + rtf:FFAREAST - + @@ -10641,14 +10976,10 @@ - + - offset in table stream of glossary PLC. CPs in PLC are relative - to main document and mark the beginnings of glossary entries and - are in 1-1 correspondence with entries of sttbfglsy. No structure - is stored in this PLC. There will be n+1 FC entries - in this PLC when there are n glossary entries. + REVIEW @@ -10656,7 +10987,7 @@ - 0x00EA + 0x000A @@ -10664,7 +10995,7 @@ - 0 + 15 @@ -10672,7 +11003,7 @@ - + 8000 @@ -10680,7 +11011,7 @@ - + :1 @@ -10688,14 +11019,14 @@ - rtf:FCPLCFGLSY + rtf:FCRYPTO - + @@ -10703,11 +11034,11 @@ - + - count of bytes of glossary PLC.== 0 for non-glossary - documents.!=0 for glossary documents. + This file format it compatible with readers that understand + nFib at or above this value. @@ -10715,7 +11046,7 @@ - 0x00EE + 0x000C @@ -10747,14 +11078,14 @@ - rtf:LCBPLCFGLSY + rtf:NFIBBACK - + @@ -10762,14 +11093,10 @@ - + - byte offset in table stream of header HDD PLC. CPs are relative - to header subdocument and mark the beginnings of individual headers - in the header subdocument. No structure is stored in this PLC. - There will be n+1FC entries in this PLC when there are - n headers stored for the document. + File encrypted key, only valid if fEncrypted. @@ -10777,7 +11104,7 @@ - 0x00F2 + 0x000E @@ -10809,7 +11136,7 @@ - rtf:FCPLCFHDD + rtf:LKEY @@ -10824,11 +11151,12 @@ - + - count of bytes of header PLC. - == 0 if document contains no headers + environment in which file was created + 0 created by Win Word + 1 created by Mac Word @@ -10836,7 +11164,7 @@ - 0x00F6 + 0x0012 @@ -10868,14 +11196,14 @@ - rtf:LCBPLCFHDD + rtf:ENVR - + @@ -10883,12 +11211,10 @@ - + - offset in table stream of character property bin table.PLC. FCs - in PLC are file offsets in the main stream. Describes text of main - document and all subdocuments. + when 1, this file was last saved in the Mac environment @@ -10896,7 +11222,7 @@ - 0x00FA + 0x0013 @@ -10912,7 +11238,7 @@ - + 01 @@ -10920,7 +11246,7 @@ - + :1 @@ -10928,14 +11254,14 @@ - rtf:FCPLCFBTECHPX + rtf:FMAC - + @@ -10943,10 +11269,10 @@ - + - count of bytes of character property bin table PLC. + @@ -10954,7 +11280,7 @@ - 0x00FE + 0x0013 @@ -10962,7 +11288,7 @@ - 0 + 1 @@ -10970,7 +11296,7 @@ - + 02 @@ -10978,7 +11304,7 @@ - + :1 @@ -10986,14 +11312,14 @@ - rtf:LCBPLCFBTECHPX + rtf:FEMPTYSPECIAL - + @@ -11001,12 +11327,10 @@ - + - offset in table stream of paragraph property bin table.PLC. FCs - in PLC are file offsets in the main stream. Describes text of main - document and all subdocuments. + @@ -11014,7 +11338,7 @@ - 0x0102 + 0x0013 @@ -11022,7 +11346,7 @@ - 0 + 2 @@ -11030,7 +11354,7 @@ - + 04 @@ -11038,7 +11362,7 @@ - + :1 @@ -11046,14 +11370,14 @@ - rtf:FCPLCFBTEPAPX + rtf:FLOADOVERRIDEPAGE - + @@ -11061,10 +11385,10 @@ - + - count of bytes of paragraph property bin table PLC + @@ -11072,7 +11396,7 @@ - 0x0106 + 0x0013 @@ -11080,7 +11404,7 @@ - 0 + 3 @@ -11088,7 +11412,7 @@ - + 08 @@ -11096,7 +11420,7 @@ - + :1 @@ -11104,14 +11428,14 @@ - rtf:LCBPLCFBTEPAPX + rtf:FFUTURESAVEDUNDO - + @@ -11119,11 +11443,10 @@ - + - offset in table stream of PLC reserved for private use. The - SEA is 6 bytes long. + @@ -11131,7 +11454,7 @@ - 0x010A + 0x0013 @@ -11139,7 +11462,7 @@ - 0 + 4 @@ -11147,7 +11470,7 @@ - + 10 @@ -11155,7 +11478,7 @@ - + :1 @@ -11163,14 +11486,14 @@ - rtf:FCPLCFSEA + rtf:FWORD97SAVED - + @@ -11178,10 +11501,10 @@ - + - count of bytes of private use PLC. + @@ -11189,7 +11512,7 @@ - 0x010E + 0x0013 @@ -11197,7 +11520,7 @@ - 0 + 5 @@ -11205,7 +11528,7 @@ - + FE @@ -11213,7 +11536,7 @@ - + :3 @@ -11221,14 +11544,14 @@ - rtf:LCBPLCFSEA + rtf:FSPARE0 - + @@ -11236,14 +11559,15 @@ - + - offset in table stream of font information STTBF. The sttbfffn - is a STTBF where is string is actually an FFN structure. The - nth entry in the STTBF describes the font that will be - displayed when the chp.ftc for text is equal to n. See the - FFN file structure definition. + Default extended character set id for text in document stream. + (overridden by chp.chse) + 0 by default characters in doc stream should be interpreted using + the ANSI character set used by Windows + 256 characters in doc stream should be interpreted using the + Macintosh character set. @@ -11251,7 +11575,7 @@ - 0x0112 + 0x0014 @@ -11283,14 +11607,14 @@ - rtf:FCSTTBFFFN + rtf:CHS - + @@ -11298,10 +11622,15 @@ - + - count of bytes in sttbfffn. + Default extended character set id for text in internal data + structures + 0 by default characters stored in internal data structures should + be interpreted using the ANSI character set used by Windows + 256 characters stored in internal data structures should be + interpreted using the Macintosh character set. @@ -11309,7 +11638,7 @@ - 0x0116 + 0x0016 @@ -11341,14 +11670,14 @@ - rtf:LCBSTTBFFFN + rtf:CHSTABLES - + @@ -11356,14 +11685,13 @@ - + - offset in table stream to the FLD PLC of field positions in the - main document. The CPs point to the beginning CP of a field, the CP - of field separator character inside a field and the ending CP of - the field. A field may be nested within another field. 20 levels of - field nesting are allowed. + file offset of first character of text. In non-complex + files a CP can be transformed into an FC by the + following transformation: + fc = cp + fib.fcMin. @@ -11371,7 +11699,7 @@ - 0x011A + 0x0018 @@ -11403,7 +11731,7 @@ - rtf:FCPLCFFLDMOM + rtf:FCMIN @@ -11418,10 +11746,11 @@ - + - count of bytes in plcffldMom + file offset of last character of text in document text stream + + 1 @@ -11429,7 +11758,7 @@ - 0x011E + 0x001C @@ -11461,7 +11790,7 @@ - rtf:LCBPLCFFLDMOM + rtf:FCMAC @@ -11476,11 +11805,10 @@ - + - offset in table stream to the FLD PLC of field positions in the - header subdocument. + Count of fields in the array of "shorts" @@ -11488,7 +11816,7 @@ - 0x0122 + 0x0020 @@ -11520,14 +11848,14 @@ - rtf:FCPLCFFLDHDR + rtf:CSW - + @@ -11535,10 +11863,13 @@ - + - count of bytes in plcffldHdr + [Beginning of the array of shorts, rgls] + Unique number Identifying the File's creator 6A62 is the creator ID + for Word and is reserved. Other creators should choose a different + value. @@ -11546,7 +11877,7 @@ - 0x0126 + 0x0022 @@ -11578,14 +11909,14 @@ - rtf:LCBPLCFFLDHDR + rtf:WMAGICCREATED - + @@ -11593,11 +11924,10 @@ - + - offset in table stream to the FLD PLC of field positions in the - footnote subdocument. + identifies the File's last modifier @@ -11605,7 +11935,7 @@ - 0x012A + 0x0024 @@ -11637,14 +11967,14 @@ - rtf:FCPLCFFLDFTN + rtf:WMAGICREVISED - + @@ -11652,10 +11982,10 @@ - + - count of bytes in plcffldFtn + private data @@ -11663,7 +11993,7 @@ - 0x012E + 0x0026 @@ -11695,14 +12025,14 @@ - rtf:LCBPLCFFLDFTN + rtf:WMAGICCREATEDPRIVATE - + @@ -11710,11 +12040,10 @@ - + - offset in table stream to the FLD PLC of field positions in the - annotation subdocument. + private data @@ -11722,7 +12051,7 @@ - 0x0132 + 0x0028 @@ -11754,14 +12083,14 @@ - rtf:FCPLCFFLDATN + rtf:WMAGICREVISEDPRIVATE - + @@ -11769,10 +12098,10 @@ - + - count of bytes in plcffldAtn + not used @@ -11780,7 +12109,7 @@ - 0x0136 + 0x002A @@ -11812,14 +12141,14 @@ - rtf:LCBPLCFFLDATN + rtf:PNFBPCHPFIRST_W6 - + @@ -11827,10 +12156,10 @@ - + - no longer used + not used @@ -11838,7 +12167,7 @@ - 0x013A + 0x002C @@ -11870,14 +12199,14 @@ - rtf:FCPLCFFLDMCR + rtf:PNCHPFIRST_W6 - + @@ -11885,10 +12214,10 @@ - + - no longer used + not used @@ -11896,7 +12225,7 @@ - 0x013E + 0x002E @@ -11928,14 +12257,14 @@ - rtf:LCBPLCFFLDMCR + rtf:CPNBTECHP_W6 - + @@ -11943,11 +12272,10 @@ - + - offset in table stream of the STTBF that records bookmark names - in the main document + not used @@ -11955,7 +12283,7 @@ - 0x0142 + 0x0030 @@ -11987,14 +12315,14 @@ - rtf:FCSTTBFBKMK + rtf:PNFBPPAPFIRST_W6 - + @@ -12002,10 +12330,10 @@ - + - + not used @@ -12013,7 +12341,7 @@ - 0x0146 + 0x0032 @@ -12045,14 +12373,14 @@ - rtf:LCBSTTBFBKMK + rtf:PNPAPFIRST_W6 - + @@ -12060,12 +12388,10 @@ - + - offset in table stream of the PLCF that records the beginning - CP offsets of bookmarks in the main document. See BKF structure - definition + not used @@ -12073,7 +12399,7 @@ - 0x014A + 0x0034 @@ -12105,14 +12431,14 @@ - rtf:FCPLCFBKF + rtf:CPNBTEPAP_W6 - + @@ -12120,10 +12446,68 @@ - + + + + not used + + + + + + + + 0x0036 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + rtf:PNFBPLVCFIRST_W6 + + + + + + + + + + + + + + + + + + not used @@ -12131,7 +12515,7 @@ - 0x014E + 0x0038 @@ -12163,14 +12547,14 @@ - rtf:LCBPLCFBKF + rtf:PNLVCFIRST_W6 - + @@ -12178,12 +12562,10 @@ - + - offset in table stream of the PLCF that records the ending CP - offsets of bookmarks recorded in the main document. No structure is - stored in this PLCF. + not used @@ -12191,7 +12573,7 @@ - 0x0152 + 0x003A @@ -12223,14 +12605,14 @@ - rtf:FCPLCFBKL + rtf:CPNBTELVC_W6 - + @@ -12238,10 +12620,69 @@ - + + + + Language id if document was written by Far East version of Word + (i.e. FIB.fFarEast is on) + + + + + + + + 0x003C + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + rtf:LIDFE + + + + + + + + + + + + + + + + + + Number of fields in the array of longs @@ -12249,7 +12690,7 @@ - 0x0156 + 0x003E @@ -12281,14 +12722,14 @@ - rtf:LCBPLCFBKL + rtf:CLW - + @@ -12296,11 +12737,11 @@ - + - offset in table stream of the macro commands. These commands - are private and undocumented. + [Beginning of the array of longs, rglw] + file offset of last byte written to file + 1. @@ -12308,7 +12749,7 @@ - 0x015A + 0x0040 @@ -12340,7 +12781,7 @@ - rtf:FCCMDS + rtf:CBMAC @@ -12355,11 +12796,11 @@ - + - undocument size of undocument structure not documented - above + contains the build date of the creator. 10695 indicates the + creator program was compiled on Jan 6, 1995 @@ -12367,7 +12808,7 @@ - 0x015E + 0x0044 @@ -12399,7 +12840,7 @@ - rtf:LCBCMDS + rtf:LPRODUCTCREATED @@ -12414,10 +12855,10 @@ - + - no longer used + contains the build date of the File's last modifier @@ -12425,7 +12866,7 @@ - 0x0162 + 0x0048 @@ -12457,7 +12898,7 @@ - rtf:FCPLCMCR + rtf:LPRODUCTREVISED @@ -12472,10 +12913,10 @@ - + - + length of main document text stream @@ -12483,7 +12924,7 @@ - 0x0166 + 0x004C @@ -12515,7 +12956,7 @@ - rtf:LCBPLCMCR + rtf:CCPTEXT @@ -12530,10 +12971,10 @@ - + - no longer used + length of footnote subdocument text stream @@ -12541,7 +12982,7 @@ - 0x016A + 0x0050 @@ -12573,7 +13014,7 @@ - rtf:FCSTTBFMCR + rtf:CCPFTN @@ -12588,10 +13029,10 @@ - + - + length of header subdocument text stream @@ -12599,7 +13040,7 @@ - 0x016E + 0x0054 @@ -12631,7 +13072,7 @@ - rtf:LCBSTTBFMCR + rtf:CCPHDD @@ -12646,11 +13087,11 @@ - + - offset in table stream of the printer driver information (names - of drivers, port, etc.) + length of macro subdocument text stream, which should now + always be 0. @@ -12658,7 +13099,7 @@ - 0x0172 + 0x0058 @@ -12690,7 +13131,7 @@ - rtf:FCPRDRVR + rtf:CCPMCR @@ -12705,11 +13146,10 @@ - + - count of bytes of the printer driver information (names of - drivers, port, etc.) + length of annotation subdocument text stream @@ -12717,7 +13157,7 @@ - 0x0176 + 0x005C @@ -12749,7 +13189,7 @@ - rtf:LCBPRDRVR + rtf:CCPATN @@ -12764,11 +13204,10 @@ - + - offset in table stream of the print environment in portrait - mode. + length of endnote subdocument text stream @@ -12776,7 +13215,7 @@ - 0x017A + 0x0060 @@ -12808,7 +13247,7 @@ - rtf:FCPRENVPORT + rtf:CCPEDN @@ -12823,10 +13262,10 @@ - + - count of bytes of the print environment in portrait mode. + length of textbox subdocument text stream @@ -12834,7 +13273,7 @@ - 0x017E + 0x0064 @@ -12866,7 +13305,7 @@ - rtf:LCBPRENVPORT + rtf:CCPTXBX @@ -12881,11 +13320,10 @@ - + - offset in table stream of the print environment in landscape - mode. + length of header textbox subdocument text stream. @@ -12893,7 +13331,7 @@ - 0x0182 + 0x0068 @@ -12925,7 +13363,7 @@ - rtf:FCPRENVLAND + rtf:CCPHDRTXBX @@ -12940,10 +13378,12 @@ - + - count of bytes of the print environment in landscape mode. + when there was insufficient memory for Word to expand the + plcfbte at save time, the plcfbte is written to the file in a + linked list of 512-byte pieces starting with this pn @@ -12951,7 +13391,7 @@ - 0x0186 + 0x006C @@ -12983,7 +13423,7 @@ - rtf:LCBPRENVLAND + rtf:PNFBPCHPFIRST @@ -12998,13 +13438,11 @@ - + - offset in table stream of Window Save - State data structure. WSS contains dimensions of - document's main text window and the last selection made by Word - user. + the page number of the lowest numbered page in the document + that records CHPX FKP information @@ -13012,7 +13450,7 @@ - 0x018A + 0x0070 @@ -13044,7 +13482,7 @@ - rtf:FCWSS + rtf:PNCHPFIRST @@ -13059,11 +13497,12 @@ - + - count of bytes of WSS. ==0 if unable to store the window state. - Should not be written by third party creators of Word files. + count of CHPX FKPs recorded in file. In non-complex files if + the number of entries in the plcfbteChpx is less than this, the + plcfbteChpx is incomplete. @@ -13071,7 +13510,7 @@ - 0x018E + 0x0074 @@ -13103,7 +13542,7 @@ - rtf:LCBWSS + rtf:CPNBTECHP @@ -13118,11 +13557,12 @@ - + - offset in table stream of document property data - structure. + when there was insufficient memory for Word to expand the + plcfbte at save time, the plcfbte is written to the file in a + linked list of 512-byte pieces starting with this pn @@ -13130,7 +13570,7 @@ - 0x0192 + 0x0078 @@ -13162,7 +13602,7 @@ - rtf:FCDOP + rtf:PNFBPPAPFIRST @@ -13177,10 +13617,11 @@ - + - count of bytes of document properties. + the page number of the lowest numbered page in the document + that records PAPX FKP information @@ -13188,7 +13629,7 @@ - 0x0196 + 0x007C @@ -13220,7 +13661,7 @@ - rtf:LCBDOP + rtf:PNPAPFIRST @@ -13235,13 +13676,12 @@ - + - offset in table stream of STTBF of associated strings. The - strings in this table specify document summary info and the paths - to special documents related to this document. See documentation of - the STTBFASSOC. + count of PAPX FKPs recorded in file. In non-complex files if + the number of entries in the plcfbtePapx is less than this, the + plcfbtePapx is incomplete. @@ -13249,7 +13689,7 @@ - 0x019A + 0x0080 @@ -13281,7 +13721,7 @@ - rtf:FCSTTBFASSOC + rtf:CPNBTEPAP @@ -13296,10 +13736,12 @@ - + - + when there was insufficient memory for Word to expand the + plcfbte at save time, the plcfbte is written to the file in a + linked list of 512-byte pieces starting with this pn @@ -13307,7 +13749,7 @@ - 0x019E + 0x0084 @@ -13339,7 +13781,7 @@ - rtf:LCBSTTBFASSOC + rtf:PNFBPLVCFIRST @@ -13354,13 +13796,11 @@ - + - offset in table stream of beginning of information for - complex files. Consists of an encoding of all of the - prms quoted by the document followed by the plcpcd - (piece table) for the document. + the page number of the lowest numbered page in the document + that records LVC FKP information @@ -13368,7 +13808,7 @@ - 0x01A2 + 0x0088 @@ -13400,7 +13840,7 @@ - rtf:FCCLX + rtf:PNLVCFIRST @@ -13415,11 +13855,12 @@ - + - count of bytes of complex file information == 0 if file is - non-complex. + count of LVC FKPs recorded in file. In non-complex files if the + number of entries in the plcfbtePapx is less than this, the + plcfbtePapx is incomplete. @@ -13427,7 +13868,7 @@ - 0x01A6 + 0x008C @@ -13459,7 +13900,7 @@ - rtf:LCBCLX + rtf:CPNBTELVC @@ -13474,10 +13915,10 @@ - + - not used + @@ -13485,7 +13926,7 @@ - 0x01AA + 0x0090 @@ -13517,7 +13958,7 @@ - rtf:FCPLCFPGDFTN + rtf:FCISLANDFIRST @@ -13532,7 +13973,7 @@ - + @@ -13543,7 +13984,7 @@ - 0x01AE + 0x0094 @@ -13575,7 +14016,7 @@ - rtf:LCBPLCFPGDFTN + rtf:FCISLANDLIM @@ -13590,12 +14031,10 @@ - + - offset in table stream of the name of the original file. - fcAutosaveSource and cbAutosaveSource should both be 0 if autosave - is off. + Number of fields in the array of FC/LCB pairs. @@ -13603,7 +14042,7 @@ - 0x01B2 + 0x0098 @@ -13635,14 +14074,14 @@ - rtf:FCAUTOSAVESOURCE + rtf:CFCLCB - + @@ -13650,10 +14089,13 @@ - + - count of bytes of the name of the original file. + [Beginning of array of FC/LCB pairs, rgfclcb] + file offset of original allocation for STSH in table stream. During + fast save Word will attempt to reuse this allocation if STSH is + small enough to fit. @@ -13661,7 +14103,7 @@ - 0x01B6 + 0x009A @@ -13693,7 +14135,7 @@ - rtf:LCBAUTOSAVESOURCE + rtf:FCSTSHFORIG @@ -13708,11 +14150,10 @@ - + - offset in table stream of group of strings recording the names - of the owners of annotations stored in the document + count of bytes of original STSH allocation @@ -13720,7 +14161,7 @@ - 0x01BA + 0x009E @@ -13752,7 +14193,7 @@ - rtf:FCGRPXSTATNOWNERS + rtf:LCBSTSHFORIG @@ -13767,10 +14208,10 @@ - + - count of bytes of the group of strings + offset of STSH in table stream. @@ -13778,7 +14219,7 @@ - 0x01BE + 0x00A2 @@ -13810,7 +14251,7 @@ - rtf:LCBGRPXSTATNOWNERS + rtf:FCSTSHF @@ -13825,11 +14266,10 @@ - + - offset in table stream of the sttbf that records names of - bookmarks for the annotation subdocument + count of bytes of current STSH allocation @@ -13837,7 +14277,7 @@ - 0x01C2 + 0x00A6 @@ -13869,7 +14309,7 @@ - rtf:FCSTTBFATNBKMK + rtf:LCBSTSHF @@ -13884,11 +14324,12 @@ - + - length in bytes of the sttbf that records names of bookmarks - for the annotation subdocument + offset in table stream of footnote reference PLCF of FRD + structures. CPs in PLC are relative to main document text stream + and give location of footnote references. @@ -13896,7 +14337,7 @@ - 0x01C6 + 0x00AA @@ -13928,7 +14369,7 @@ - rtf:LCBSTTBFATNBKMK + rtf:FCPLCFFNDREF @@ -13943,10 +14384,11 @@ - + - no longer used + count of bytes of footnote reference PLC== 0 if no footnotes + defined in document. @@ -13954,7 +14396,7 @@ - 0x01CA + 0x00AE @@ -13986,7 +14428,7 @@ - rtf:FCPLCDOAMOM + rtf:LCBPLCFFNDREF @@ -14001,10 +14443,15 @@ - + - + offset in table stream of footnote text PLC. CPs in PLC are + relative to footnote subdocument text stream and give location of + beginnings of footnote text for corresponding references recorded + in plcffndRef. No structure is stored in this plc. There will just + be n+1 FC entries in this PLC when there are n + footnotes @@ -14012,7 +14459,7 @@ - 0x01CE + 0x00B2 @@ -14044,7 +14491,7 @@ - rtf:LCBPLCDOAMOM + rtf:FCPLCFFNDTXT @@ -14059,10 +14506,11 @@ - + - no longer used + count of bytes of footnote text PLC. == 0 if no footnotes + defined in document @@ -14070,7 +14518,7 @@ - 0x01D2 + 0x00B6 @@ -14102,7 +14550,7 @@ - rtf:FCPLCDOAHDR + rtf:LCBPLCFFNDTXT @@ -14117,10 +14565,12 @@ - + - + offset in table stream of annotation reference ATRD PLC. The + CPs recorded in this PLC give the offset of annotation references + in the main document. @@ -14128,7 +14578,7 @@ - 0x01D6 + 0x00BA @@ -14160,7 +14610,7 @@ - rtf:LCBPLCDOAHDR + rtf:FCPLCFANDREF @@ -14175,11 +14625,10 @@ - + - offset in table stream of the FSPA PLC for main - document. == 0 if document has no office art objects. + count of bytes of annotation reference PLC. @@ -14187,7 +14636,7 @@ - 0x01DA + 0x00BE @@ -14219,7 +14668,7 @@ - rtf:FCPLCSPAMOM + rtf:LCBPLCFANDREF @@ -14234,11 +14683,15 @@ - + - length in bytes of the FSPA PLC of the main - document. + offset in table stream of annotation text PLC. The Cps recorded + in this PLC give the offset of the annotation text in the + annotation sub document corresponding to the references stored in + the plcfandRef. There is a 1 to 1 correspondence between entries + recorded in the plcfandTxt and the plcfandRef. No structure is + stored in this PLC. @@ -14246,7 +14699,7 @@ - 0x01DE + 0x00C2 @@ -14278,7 +14731,7 @@ - rtf:LCBPLCSPAMOM + rtf:FCPLCFANDTXT @@ -14293,11 +14746,10 @@ - + - offset in table stream of the FSPA PLC for header - document. == 0 if document has no office art objects. + count of bytes of the annotation text PLC @@ -14305,7 +14757,7 @@ - 0x01E2 + 0x00C6 @@ -14337,7 +14789,7 @@ - rtf:FCPLCSPAHDR + rtf:LCBPLCFANDTXT @@ -14352,11 +14804,11 @@ - + - length in bytes of the FSPA PLC of the header - document. + offset in table stream of section descriptor SED PLC. CPs in + PLC are relative to main document. @@ -14364,7 +14816,7 @@ - 0x01E6 + 0x00CA @@ -14396,7 +14848,7 @@ - rtf:LCBPLCSPAHDR + rtf:FCPLCFSED @@ -14411,11 +14863,10 @@ - + - offset in table stream of BKF (bookmark first) PLC of the - annotation subdocument + count of bytes of section descriptor PLC. @@ -14423,7 +14874,7 @@ - 0x01EA + 0x00CE @@ -14455,7 +14906,7 @@ - rtf:FCPLCFATNBKF + rtf:LCBPLCFSED @@ -14470,11 +14921,10 @@ - + - length in bytes of BKF (bookmark first) PLC of the annotation - subdocument + no longer used @@ -14482,7 +14932,7 @@ - 0x01EE + 0x00D2 @@ -14514,7 +14964,7 @@ - rtf:LCBPLCFATNBKF + rtf:FCPLCFPAD @@ -14529,11 +14979,10 @@ - + - offset in table stream of BKL (bookmark last) PLC of the - annotation subdocument + no longer used @@ -14541,7 +14990,7 @@ - 0x01F2 + 0x00D6 @@ -14573,7 +15022,7 @@ - rtf:FCPLCFATNBKL + rtf:LCBPLCFPAD @@ -14588,11 +15037,13 @@ - + - length in bytes of PLC marking the CP limits of the annotation - bookmarks. No structure is stored in this PLC. + offset in table stream of PHE PLC of paragraph heights. CPs in + PLC are relative to main document text stream. Only written for + files in complex format. Should not be written by third + party creators of Word files. @@ -14600,7 +15051,7 @@ - 0x01F6 + 0x00DA @@ -14632,7 +15083,7 @@ - rtf:LCBPLCFATNBKL + rtf:FCPLCFPHE @@ -14647,12 +15098,11 @@ - + - offset in table stream of PMS (Print Merge State) information - block. This contains the current state of a print merge - operation + count of bytes of paragraph height PLC. ==0 when file is + non-complex. @@ -14660,7 +15110,7 @@ - 0x01FA + 0x00DE @@ -14692,7 +15142,7 @@ - rtf:FCPMS + rtf:LCBPLCFPHE @@ -14707,11 +15157,12 @@ - + - length in bytes of PMS. ==0 if no current print merge state. - Should not be written by third party creators of Word files. + offset in table stream of glossary string table. This table + consists of Pascal style strings (strings stored prefixed with a + length byte) concatenated one after another. @@ -14719,7 +15170,7 @@ - 0x01FE + 0x00E2 @@ -14751,7 +15202,7 @@ - rtf:LCBPMS + rtf:FCSTTBFGLSY @@ -14766,11 +15217,11 @@ - + - offset in table stream of form field Sttbf which contains - strings used in form field dropdown controls + count of bytes of glossary string table. == 0 for non-glossary + documents.!=0 for glossary documents. @@ -14778,7 +15229,7 @@ - 0x0202 + 0x00E6 @@ -14810,7 +15261,7 @@ - rtf:FCFORMFLDSTTBF + rtf:LCBSTTBFGLSY @@ -14825,10 +15276,14 @@ - + - length in bytes of form field Sttbf + offset in table stream of glossary PLC. CPs in PLC are relative + to main document and mark the beginnings of glossary entries and + are in 1-1 correspondence with entries of sttbfglsy. No structure + is stored in this PLC. There will be n+1 FC entries + in this PLC when there are n glossary entries. @@ -14836,7 +15291,7 @@ - 0x0206 + 0x00EA @@ -14868,7 +15323,7 @@ - rtf:LCBFORMFLDSTTBF + rtf:FCPLCFGLSY @@ -14883,12 +15338,11 @@ - + - offset in table stream of endnote reference PLCF of FRD - structures. CPs in PLCF are relative to main document text stream - and give location of endnote references. + count of bytes of glossary PLC.== 0 for non-glossary + documents.!=0 for glossary documents. @@ -14896,7 +15350,7 @@ - 0x020A + 0x00EE @@ -14928,7 +15382,7 @@ - rtf:FCPLCFENDREF + rtf:LCBPLCFGLSY @@ -14943,10 +15397,14 @@ - + - + byte offset in table stream of header HDD PLC. CPs are relative + to header subdocument and mark the beginnings of individual headers + in the header subdocument. No structure is stored in this PLC. + There will be n+1FC entries in this PLC when there are + n headers stored for the document. @@ -14954,7 +15412,7 @@ - 0x020E + 0x00F2 @@ -14986,7 +15444,7 @@ - rtf:LCBPLCFENDREF + rtf:FCPLCFHDD @@ -15001,12 +15459,11 @@ - + - offset in table stream of PlcfendRef which points to endnote - text in the endnote document stream which corresponds with the - plcfendRef. No structure is stored in this PLC. + count of bytes of header PLC. + == 0 if document contains no headers @@ -15014,7 +15471,7 @@ - 0x0212 + 0x00F6 @@ -15046,7 +15503,7 @@ - rtf:FCPLCFENDTXT + rtf:LCBPLCFHDD @@ -15061,10 +15518,12 @@ - + - + offset in table stream of character property bin table.PLC. FCs + in PLC are file offsets in the main stream. Describes text of main + document and all subdocuments. @@ -15072,7 +15531,7 @@ - 0x0216 + 0x00FA @@ -15104,7 +15563,7 @@ - rtf:LCBPLCFENDTXT + rtf:FCPLCFBTECHPX @@ -15119,11 +15578,10 @@ - + - offset in table stream to FLD PLCF of field positions in the - endnote subdoc + count of bytes of character property bin table PLC. @@ -15131,7 +15589,7 @@ - 0x021A + 0x00FE @@ -15163,7 +15621,7 @@ - rtf:FCPLCFFLDEDN + rtf:LCBPLCFBTECHPX @@ -15178,10 +15636,12 @@ - + - + offset in table stream of paragraph property bin table.PLC. FCs + in PLC are file offsets in the main stream. Describes text of main + document and all subdocuments. @@ -15189,7 +15649,7 @@ - 0x021E + 0x0102 @@ -15221,7 +15681,7 @@ - rtf:LCBPLCFFLDEDN + rtf:FCPLCFBTEPAPX @@ -15236,10 +15696,10 @@ - + - not used + count of bytes of paragraph property bin table PLC @@ -15247,7 +15707,7 @@ - 0x0222 + 0x0106 @@ -15279,7 +15739,7 @@ - rtf:FCPLCFPGDEDN + rtf:LCBPLCFBTEPAPX @@ -15294,10 +15754,69 @@ - + + + + offset in table stream of PLC reserved for private use. The + SEA is 6 bytes long. + + + + + + + + 0x010A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCFSEA + + + + + + + + + + + + + + + + + + count of bytes of private use PLC. @@ -15305,7 +15824,7 @@ - 0x0226 + 0x010E @@ -15337,7 +15856,7 @@ - rtf:LCBPLCFPGDEDN + rtf:LCBPLCFSEA @@ -15352,12 +15871,14 @@ - + - offset in table stream of the office art object table data. The - format of office art object table data is found in a separate - document. + offset in table stream of font information STTBF. The sttbfffn + is a STTBF where is string is actually an FFN structure. The + nth entry in the STTBF describes the font that will be + displayed when the chp.ftc for text is equal to n. See the + FFN file structure definition. @@ -15365,7 +15886,7 @@ - 0x022A + 0x0112 @@ -15397,7 +15918,7 @@ - rtf:FCDGGINFO + rtf:FCSTTBFFFN @@ -15412,10 +15933,10 @@ - + - length in bytes of the office art object table data + count of bytes in sttbfffn. @@ -15423,7 +15944,7 @@ - 0x022E + 0x0116 @@ -15455,7 +15976,7 @@ - rtf:LCBDGGINFO + rtf:LCBSTTBFFFN @@ -15470,12 +15991,14 @@ - + - offset in table stream to STTBF that records the author - abbreviations for authors who have made revisions in the - document. + offset in table stream to the FLD PLC of field positions in the + main document. The CPs point to the beginning CP of a field, the CP + of field separator character inside a field and the ending CP of + the field. A field may be nested within another field. 20 levels of + field nesting are allowed. @@ -15483,7 +16006,7 @@ - 0x0232 + 0x011A @@ -15515,7 +16038,7 @@ - rtf:FCSTTBFRMARK + rtf:FCPLCFFLDMOM @@ -15530,10 +16053,10 @@ - + - + count of bytes in plcffldMom @@ -15541,7 +16064,7 @@ - 0x0236 + 0x011E @@ -15573,7 +16096,7 @@ - rtf:LCBSTTBFRMARK + rtf:LCBPLCFFLDMOM @@ -15588,11 +16111,11 @@ - + - offset in table stream to STTBF that records caption titles - used in the document. + offset in table stream to the FLD PLC of field positions in the + header subdocument. @@ -15600,7 +16123,7 @@ - 0x023A + 0x0122 @@ -15632,7 +16155,7 @@ - rtf:FCSTTBFCAPTION + rtf:FCPLCFFLDHDR @@ -15647,10 +16170,10 @@ - + - + count of bytes in plcffldHdr @@ -15658,7 +16181,7 @@ - 0x023E + 0x0126 @@ -15690,7 +16213,7 @@ - rtf:LCBSTTBFCAPTION + rtf:LCBPLCFFLDHDR @@ -15705,12 +16228,11 @@ - + - offset in table stream to the STTBF that records the object - names and indices into the caption STTBF for objects which get auto - captions. + offset in table stream to the FLD PLC of field positions in the + footnote subdocument. @@ -15718,7 +16240,7 @@ - 0x0242 + 0x012A @@ -15750,7 +16272,7 @@ - rtf:FCSTTBFAUTOCAPTION + rtf:FCPLCFFLDFTN @@ -15765,10 +16287,10 @@ - + - + count of bytes in plcffldFtn @@ -15776,7 +16298,7 @@ - 0x0246 + 0x012E @@ -15808,7 +16330,7 @@ - rtf:LCBSTTBFAUTOCAPTION + rtf:LCBPLCFFLDFTN @@ -15823,11 +16345,11 @@ - + - offset in table stream to WKB PLCF that describes the - boundaries of contributing documents in a master document + offset in table stream to the FLD PLC of field positions in the + annotation subdocument. @@ -15835,7 +16357,7 @@ - 0x024A + 0x0132 @@ -15867,7 +16389,7 @@ - rtf:FCPLCFWKB + rtf:FCPLCFFLDATN @@ -15882,10 +16404,10 @@ - + - + count of bytes in plcffldAtn @@ -15893,7 +16415,7 @@ - 0x024E + 0x0136 @@ -15925,7 +16447,7 @@ - rtf:LCBPLCFWKB + rtf:LCBPLCFFLDATN @@ -15940,11 +16462,10 @@ - + - offset in table stream of PLCF (of SPLS structures) that - records spell check state + no longer used @@ -15952,7 +16473,7 @@ - 0x0252 + 0x013A @@ -15984,7 +16505,7 @@ - rtf:FCPLCFSPL + rtf:FCPLCFFLDMCR @@ -15999,10 +16520,10 @@ - + - + no longer used @@ -16010,7 +16531,7 @@ - 0x0256 + 0x013E @@ -16042,7 +16563,7 @@ - rtf:LCBPLCFSPL + rtf:LCBPLCFFLDMCR @@ -16057,12 +16578,11 @@ - + - offset in table stream of PLCF that records the beginning CP in - the text box subdoc of the text of individual text box entries. No - structure is stored in this PLCF + offset in table stream of the STTBF that records bookmark names + in the main document @@ -16070,7 +16590,7 @@ - 0x025A + 0x0142 @@ -16102,7 +16622,7 @@ - rtf:FCPLCFTXBXTXT + rtf:FCSTTBFBKMK @@ -16117,7 +16637,7 @@ - + @@ -16128,7 +16648,7 @@ - 0x025E + 0x0146 @@ -16160,7 +16680,7 @@ - rtf:LCBPLCFTXBXTXT + rtf:LCBSTTBFBKMK @@ -16175,11 +16695,12 @@ - + - offset in table stream of the FLD PLCF that records field - boundaries recorded in the textbox subdoc. + offset in table stream of the PLCF that records the beginning + CP offsets of bookmarks in the main document. See BKF structure + definition @@ -16187,7 +16708,7 @@ - 0x0262 + 0x014A @@ -16219,7 +16740,7 @@ - rtf:FCPLCFFLDTXBX + rtf:FCPLCFBKF @@ -16234,7 +16755,7 @@ - + @@ -16245,7 +16766,7 @@ - 0x0266 + 0x014E @@ -16277,7 +16798,7 @@ - rtf:LCBPLCFFLDTXBX + rtf:LCBPLCFBKF @@ -16292,12 +16813,12 @@ - + - offset in table stream of PLCF that records the beginning CP in - the header text box subdoc of the text of individual header text - box entries. No structure is stored in this PLC. + offset in table stream of the PLCF that records the ending CP + offsets of bookmarks recorded in the main document. No structure is + stored in this PLCF. @@ -16305,7 +16826,7 @@ - 0x026A + 0x0152 @@ -16337,7 +16858,7 @@ - rtf:FCPLCFHDRTXBXTXT + rtf:FCPLCFBKL @@ -16352,7 +16873,7 @@ - + @@ -16363,7 +16884,7 @@ - 0x026E + 0x0156 @@ -16395,7 +16916,7 @@ - rtf:LCBPLCFHDRTXBXTXT + rtf:LCBPLCFBKL @@ -16410,11 +16931,11 @@ - + - offset in table stream of the FLD PLCF that records field - boundaries recorded in the header textbox subdoc. + offset in table stream of the macro commands. These commands + are private and undocumented. @@ -16422,7 +16943,7 @@ - 0x0272 + 0x015A @@ -16454,7 +16975,7 @@ - rtf:FCPLCFFLDHDRTXBX + rtf:FCCMDS @@ -16469,10 +16990,11 @@ - + - + undocument size of undocument structure not documented + above @@ -16480,7 +17002,7 @@ - 0x0276 + 0x015E @@ -16512,7 +17034,7 @@ - rtf:LCBPLCFFLDHDRTXBX + rtf:LCBCMDS @@ -16527,10 +17049,10 @@ - + - Macro User storage + no longer used @@ -16538,7 +17060,7 @@ - 0x027A + 0x0162 @@ -16570,7 +17092,7 @@ - rtf:FCSTWUSER + rtf:FCPLCMCR @@ -16585,7 +17107,7 @@ - + @@ -16596,7 +17118,7 @@ - 0x027E + 0x0166 @@ -16628,7 +17150,7 @@ - rtf:LCBSTWUSER + rtf:LCBPLCMCR @@ -16643,10 +17165,10 @@ - + - offset in table stream of embedded true type font data. + no longer used @@ -16654,7 +17176,7 @@ - 0x0282 + 0x016A @@ -16686,7 +17208,7 @@ - rtf:FCSTTBTTMBD + rtf:FCSTTBFMCR @@ -16701,7 +17223,7 @@ - + @@ -16712,7 +17234,7 @@ - 0x0286 + 0x016E @@ -16744,7 +17266,7 @@ - rtf:LCBSTTBTTMBD + rtf:LCBSTTBFMCR @@ -16759,10 +17281,70 @@ - + + + + offset in table stream of the printer driver information (names + of drivers, port, etc.) + + + + + + + + 0x0172 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + rtf:FCPRDRVR + + + + + + + + + + + + + + + + + + count of bytes of the printer driver information (names of + drivers, port, etc.) @@ -16770,7 +17352,7 @@ - 0x028A + 0x0176 @@ -16802,65 +17384,7 @@ - rtf:FCUNUSED - - - - - - - - - - - - - - - - - - - - - - - - - - 0x028E - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - rtf:LCBUNUSED + rtf:LCBPRDRVR @@ -16875,13 +17399,11 @@ - + - (FCPGD, beginning of array of fcPgd / fcBkd pairs - rgpgdbkd). - offset in table stream of the PLF that records the page descriptors - for the main text of the doc. + offset in table stream of the print environment in portrait + mode. @@ -16889,7 +17411,7 @@ - 0x0292 + 0x017A @@ -16921,7 +17443,7 @@ - rtf:FCPGDMOTHER + rtf:FCPRENVPORT @@ -16936,10 +17458,10 @@ - + - + count of bytes of the print environment in portrait mode. @@ -16947,7 +17469,7 @@ - 0x0296 + 0x017E @@ -16979,7 +17501,7 @@ - rtf:LCBPGDMOTHER + rtf:LCBPRENVPORT @@ -16994,11 +17516,11 @@ - + - offset in table stream of the PLCF that records the break - descriptors for the main text of the doc. + offset in table stream of the print environment in landscape + mode. @@ -17006,7 +17528,7 @@ - 0x029A + 0x0182 @@ -17038,7 +17560,7 @@ - rtf:FCBKDMOTHER + rtf:FCPRENVLAND @@ -17053,10 +17575,10 @@ - + - + count of bytes of the print environment in landscape mode. @@ -17064,7 +17586,7 @@ - 0x029E + 0x0186 @@ -17096,7 +17618,7 @@ - rtf:LCBBKDMOTHER + rtf:LCBPRENVLAND @@ -17111,11 +17633,13 @@ - + - offset in table stream of the PLF that records the page - descriptors for the footnote text of the doc. + offset in table stream of Window Save + State data structure. WSS contains dimensions of + document's main text window and the last selection made by Word + user. @@ -17123,7 +17647,7 @@ - 0x02A2 + 0x018A @@ -17155,7 +17679,7 @@ - rtf:FCPGDFTN + rtf:FCWSS @@ -17170,10 +17694,11 @@ - + - + count of bytes of WSS. ==0 if unable to store the window state. + Should not be written by third party creators of Word files. @@ -17181,7 +17706,7 @@ - 0x02A6 + 0x018E @@ -17213,7 +17738,7 @@ - rtf:LCBPGDFTN + rtf:LCBWSS @@ -17228,11 +17753,11 @@ - + - offset in table stream of the PLCF that records the break - descriptors for the footnote text of the doc. + offset in table stream of document property data + structure. @@ -17240,7 +17765,7 @@ - 0x02AA + 0x0192 @@ -17272,7 +17797,7 @@ - rtf:FCBKDFTN + rtf:FCDOP @@ -17287,10 +17812,10 @@ - + - + count of bytes of document properties. @@ -17298,7 +17823,7 @@ - 0x02AE + 0x0196 @@ -17330,7 +17855,7 @@ - rtf:LCBBKDFTN + rtf:LCBDOP @@ -17345,11 +17870,13 @@ - + - offset in table stream of the PLF that records the page - descriptors for the endnote text of the doc. + offset in table stream of STTBF of associated strings. The + strings in this table specify document summary info and the paths + to special documents related to this document. See documentation of + the STTBFASSOC. @@ -17357,7 +17884,7 @@ - 0x02B2 + 0x019A @@ -17389,7 +17916,7 @@ - rtf:FCPGDEDN + rtf:FCSTTBFASSOC @@ -17404,7 +17931,7 @@ - + @@ -17415,7 +17942,7 @@ - 0x02B6 + 0x019E @@ -17447,7 +17974,7 @@ - rtf:LCBPGDEDN + rtf:LCBSTTBFASSOC @@ -17462,11 +17989,13 @@ - + - offset in table stream of the PLCF that records the break - descriptors for the endnote text of the doc. + offset in table stream of beginning of information for + complex files. Consists of an encoding of all of the + prms quoted by the document followed by the plcpcd + (piece table) for the document. @@ -17474,7 +18003,7 @@ - 0x02BA + 0x01A2 @@ -17506,7 +18035,7 @@ - rtf:FCBKDEDN + rtf:FCCLX @@ -17521,10 +18050,11 @@ - + - + count of bytes of complex file information == 0 if file is + non-complex. @@ -17532,7 +18062,7 @@ - 0x02BE + 0x01A6 @@ -17564,7 +18094,7 @@ - rtf:LCBBKDEDN + rtf:LCBCLX @@ -17579,13 +18109,10 @@ - + - offset in table stream of the STTBF containing field keywords. - This is only used in a small number of the international versions - of word. This field is no longer written to the file for nFib >= - 167. + not used @@ -17593,7 +18120,7 @@ - 0x02C2 + 0x01AA @@ -17625,7 +18152,7 @@ - rtf:FCSTTBFINTLFLD + rtf:FCPLCFPGDFTN @@ -17640,10 +18167,10 @@ - + - Always 0 for nFib >= 167. + @@ -17651,7 +18178,7 @@ - 0x02C6 + 0x01AE @@ -17683,7 +18210,7 @@ - rtf:LCBSTTBFINTLFLD + rtf:LCBPLCFPGDFTN @@ -17698,10 +18225,12 @@ - + - offset in table stream of a mailer routing slip. + offset in table stream of the name of the original file. + fcAutosaveSource and cbAutosaveSource should both be 0 if autosave + is off. @@ -17709,7 +18238,7 @@ - 0x02CA + 0x01B2 @@ -17741,7 +18270,7 @@ - rtf:FCROUTESLIP + rtf:FCAUTOSAVESOURCE @@ -17756,10 +18285,10 @@ - + - + count of bytes of the name of the original file. @@ -17767,7 +18296,7 @@ - 0x02CE + 0x01B6 @@ -17799,7 +18328,7 @@ - rtf:LCBROUTESLIP + rtf:LCBAUTOSAVESOURCE @@ -17814,12 +18343,11 @@ - + - offset in table stream of STTBF recording the names of the - users who have saved this document alternating with the save - locations. + offset in table stream of group of strings recording the names + of the owners of annotations stored in the document @@ -17827,7 +18355,7 @@ - 0x02D2 + 0x01BA @@ -17859,7 +18387,7 @@ - rtf:FCSTTBSAVEDBY + rtf:FCGRPXSTATNOWNERS @@ -17874,10 +18402,10 @@ - + - + count of bytes of the group of strings @@ -17885,7 +18413,7 @@ - 0x02D6 + 0x01BE @@ -17917,7 +18445,7 @@ - rtf:LCBSTTBSAVEDBY + rtf:LCBGRPXSTATNOWNERS @@ -17932,11 +18460,11 @@ - + - offset in table stream of STTBF recording filenames of - documents which are referenced by this document. + offset in table stream of the sttbf that records names of + bookmarks for the annotation subdocument @@ -17944,7 +18472,7 @@ - 0x02DA + 0x01C2 @@ -17976,7 +18504,7 @@ - rtf:FCSTTBFNM + rtf:FCSTTBFATNBKMK @@ -17991,10 +18519,11 @@ - + - + length in bytes of the sttbf that records names of bookmarks + for the annotation subdocument @@ -18002,7 +18531,7 @@ - 0x02DE + 0x01C6 @@ -18034,7 +18563,7 @@ - rtf:LCBSTTBFNM + rtf:LCBSTTBFATNBKMK @@ -18049,10 +18578,10 @@ - + - offset in the table stream of list format information. + no longer used @@ -18060,7 +18589,7 @@ - 0x02E2 + 0x01CA @@ -18092,7 +18621,7 @@ - rtf:FCPLCFLST + rtf:FCPLCDOAMOM @@ -18107,7 +18636,7 @@ - + @@ -18118,7 +18647,7 @@ - 0x02E6 + 0x01CE @@ -18150,7 +18679,7 @@ - rtf:LCBPLCFLST + rtf:LCBPLCDOAMOM @@ -18165,11 +18694,10 @@ - + - offset in the table stream of list format override - information. + no longer used @@ -18177,7 +18705,7 @@ - 0x02EA + 0x01D2 @@ -18209,7 +18737,7 @@ - rtf:FCPLFLFO + rtf:FCPLCDOAHDR @@ -18224,7 +18752,7 @@ - + @@ -18235,7 +18763,7 @@ - 0x02EE + 0x01D6 @@ -18267,7 +18795,7 @@ - rtf:LCBPLFLFO + rtf:LCBPLCDOAHDR @@ -18282,11 +18810,11 @@ - + - offset in the table stream of the textbox break table (a PLCF - of BKDs) for the main document + offset in table stream of the FSPA PLC for main + document. == 0 if document has no office art objects. @@ -18294,7 +18822,7 @@ - 0x02F2 + 0x01DA @@ -18326,7 +18854,7 @@ - rtf:FCPLCFTXBXBKD + rtf:FCPLCSPAMOM @@ -18341,10 +18869,11 @@ - + - + length in bytes of the FSPA PLC of the main + document. @@ -18352,7 +18881,7 @@ - 0x02F6 + 0x01DE @@ -18384,7 +18913,7 @@ - rtf:LCBPLCFTXBXBKD + rtf:LCBPLCSPAMOM @@ -18399,11 +18928,11 @@ - + - offset in the table stream of the textbox break table (a PLCF - of BKDs) for the header subdocument + offset in table stream of the FSPA PLC for header + document. == 0 if document has no office art objects. @@ -18411,7 +18940,7 @@ - 0x02FA + 0x01E2 @@ -18443,7 +18972,7 @@ - rtf:FCPLCFTXBXHDRBKD + rtf:FCPLCSPAHDR @@ -18458,10 +18987,11 @@ - + - + length in bytes of the FSPA PLC of the header + document. @@ -18469,7 +18999,7 @@ - 0x02FE + 0x01E6 @@ -18501,7 +19031,7 @@ - rtf:LCBPLCFTXBXHDRBKD + rtf:LCBPLCSPAHDR @@ -18516,11 +19046,11 @@ - + - offset in main stream of undocumented undo / versioning - data + offset in table stream of BKF (bookmark first) PLC of the + annotation subdocument @@ -18528,7 +19058,7 @@ - 0x0302 + 0x01EA @@ -18560,7 +19090,7 @@ - rtf:FCDOCUNDO + rtf:FCPLCFATNBKF @@ -18575,10 +19105,11 @@ - + - + length in bytes of BKF (bookmark first) PLC of the annotation + subdocument @@ -18586,7 +19117,7 @@ - 0x0306 + 0x01EE @@ -18618,7 +19149,7 @@ - rtf:LCBDOCUNDO + rtf:LCBPLCFATNBKF @@ -18633,11 +19164,11 @@ - + - offset in main stream of undocumented undo / versioning - data + offset in table stream of BKL (bookmark last) PLC of the + annotation subdocument @@ -18645,7 +19176,7 @@ - 0x030A + 0x01F2 @@ -18677,7 +19208,7 @@ - rtf:FCRGBUSE + rtf:FCPLCFATNBKL @@ -18692,10 +19223,71 @@ - + + + + length in bytes of PLC marking the CP limits of the annotation + bookmarks. No structure is stored in this PLC. + + + + + + + + 0x01F6 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCFATNBKL + + + + + + + + + + + + + + + + + + offset in table stream of PMS (Print Merge State) information + block. This contains the current state of a print merge + operation @@ -18703,7 +19295,7 @@ - 0x030E + 0x01FA @@ -18735,7 +19327,7 @@ - rtf:LCBRGBUSE + rtf:FCPMS @@ -18750,11 +19342,11 @@ - + - offset in main stream of undocumented undo / versioning - data + length in bytes of PMS. ==0 if no current print merge state. + Should not be written by third party creators of Word files. @@ -18762,7 +19354,7 @@ - 0x0312 + 0x01FE @@ -18794,7 +19386,7 @@ - rtf:FCUSP + rtf:LCBPMS @@ -18809,10 +19401,69 @@ - + + + + offset in table stream of form field Sttbf which contains + strings used in form field dropdown controls + + + + + + + + 0x0202 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + rtf:FCFORMFLDSTTBF + + + + + + + + + + + + + + + + + + length in bytes of form field Sttbf @@ -18820,7 +19471,7 @@ - 0x0316 + 0x0206 @@ -18852,7 +19503,7 @@ - rtf:LCBUSP + rtf:LCBFORMFLDSTTBF @@ -18867,11 +19518,12 @@ - + - offset in table stream of undocumented undo / versioning - data + offset in table stream of endnote reference PLCF of FRD + structures. CPs in PLCF are relative to main document text stream + and give location of endnote references. @@ -18879,7 +19531,7 @@ - 0x031A + 0x020A @@ -18911,7 +19563,7 @@ - rtf:FCUSKF + rtf:FCPLCFENDREF @@ -18926,7 +19578,7 @@ - + @@ -18937,7 +19589,7 @@ - 0x031E + 0x020E @@ -18969,7 +19621,7 @@ - rtf:LCBUSKF + rtf:LCBPLCFENDREF @@ -18984,11 +19636,12 @@ - + - offset in table stream of undocumented undo / versioning - data + offset in table stream of PlcfendRef which points to endnote + text in the endnote document stream which corresponds with the + plcfendRef. No structure is stored in this PLC. @@ -18996,7 +19649,7 @@ - 0x0322 + 0x0212 @@ -19028,7 +19681,7 @@ - rtf:FCPLCUPCRGBUSE + rtf:FCPLCFENDTXT @@ -19043,7 +19696,7 @@ - + @@ -19054,7 +19707,7 @@ - 0x0326 + 0x0216 @@ -19086,7 +19739,7 @@ - rtf:LCBPLCUPCRGBUSE + rtf:LCBPLCFENDTXT @@ -19101,11 +19754,11 @@ - + - offset in table stream of undocumented undo / versioning - data + offset in table stream to FLD PLCF of field positions in the + endnote subdoc @@ -19113,7 +19766,7 @@ - 0x032A + 0x021A @@ -19145,7 +19798,7 @@ - rtf:FCPLCUPCUSP + rtf:FCPLCFFLDEDN @@ -19160,7 +19813,7 @@ - + @@ -19171,7 +19824,7 @@ - 0x032E + 0x021E @@ -19203,7 +19856,7 @@ - rtf:LCBPLCUPCUSP + rtf:LCBPLCFFLDEDN @@ -19218,11 +19871,10 @@ - + - offset in table stream of string table of style names for - glossary entries + not used @@ -19230,7 +19882,7 @@ - 0x0332 + 0x0222 @@ -19262,7 +19914,7 @@ - rtf:FCSTTBGLSYSTYLE + rtf:FCPLCFPGDEDN @@ -19277,7 +19929,7 @@ - + @@ -19288,7 +19940,7 @@ - 0x0336 + 0x0226 @@ -19320,7 +19972,7 @@ - rtf:LCBSTTBGLSYSTYLE + rtf:LCBPLCFPGDEDN @@ -19335,10 +19987,12 @@ - + - offset in table stream of undocumented grammar options PL + offset in table stream of the office art object table data. The + format of office art object table data is found in a separate + document. @@ -19346,7 +20000,7 @@ - 0x033A + 0x022A @@ -19378,7 +20032,7 @@ - rtf:FCPLGOSL + rtf:FCDGGINFO @@ -19393,10 +20047,10 @@ - + - + length in bytes of the office art object table data @@ -19404,7 +20058,7 @@ - 0x033E + 0x022E @@ -19436,7 +20090,7 @@ - rtf:LCBPLGOSL + rtf:LCBDGGINFO @@ -19451,10 +20105,12 @@ - + - offset in table stream of undocumented ocx data + offset in table stream to STTBF that records the author + abbreviations for authors who have made revisions in the + document. @@ -19462,7 +20118,7 @@ - 0x0342 + 0x0232 @@ -19494,7 +20150,7 @@ - rtf:FCPLCOCX + rtf:FCSTTBFRMARK @@ -19509,7 +20165,7 @@ - + @@ -19520,7 +20176,7 @@ - 0x0346 + 0x0236 @@ -19552,7 +20208,7 @@ - rtf:LCBPLCOCX + rtf:LCBSTTBFRMARK @@ -19567,12 +20223,11 @@ - + - offset in table stream of character property bin table.PLC. FCs - in PLC are file offsets. Describes text of main document and all - subdocuments. + offset in table stream to STTBF that records caption titles + used in the document. @@ -19580,7 +20235,7 @@ - 0x034A + 0x023A @@ -19612,7 +20267,7 @@ - rtf:FCPLCFBTELVC + rtf:FCSTTBFCAPTION @@ -19627,7 +20282,7 @@ - + @@ -19638,65 +20293,7 @@ - 0x034E - - - - - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - rtf:LCBPLCFBTELVC - - - - - - - - - - - - - - - - - - (a.k.a FILETIME ftModified) - - - - - - - - 0x0352 + 0x023E @@ -19728,7 +20325,7 @@ - rtf:DWLOWDATETIME + rtf:LCBSTTBFCAPTION @@ -19743,10 +20340,12 @@ - + - + offset in table stream to the STTBF that records the object + names and indices into the caption STTBF for objects which get auto + captions. @@ -19754,7 +20353,7 @@ - 0x0356 + 0x0242 @@ -19786,7 +20385,7 @@ - rtf:DWHIGHDATETIME + rtf:FCSTTBFAUTOCAPTION @@ -19801,68 +20400,10 @@ - - - - offset in table stream of LVC PLCF - - - - - - - - 0x035A - - - - - - - - 0 - - - - - - - - - - - - - + - - - - - - - - rtf:FCPLCFLVC - - - - - - - - - - - - - - - - - - size of LVC PLCF, ==0 for non-complex files @@ -19870,7 +20411,7 @@ - 0x035E + 0x0246 @@ -19902,7 +20443,7 @@ - rtf:LCBPLCFLVC + rtf:LCBSTTBFAUTOCAPTION @@ -19917,10 +20458,11 @@ - + - offset in table stream of autosummary ASUMY PLCF. + offset in table stream to WKB PLCF that describes the + boundaries of contributing documents in a master document @@ -19928,7 +20470,7 @@ - 0x0362 + 0x024A @@ -19960,7 +20502,7 @@ - rtf:FCPLCASUMY + rtf:FCPLCFWKB @@ -19975,7 +20517,7 @@ - + @@ -19986,7 +20528,7 @@ - 0x0366 + 0x024E @@ -20018,7 +20560,7 @@ - rtf:LCBPLCASUMY + rtf:LCBPLCFWKB @@ -20033,11 +20575,11 @@ - + - offset in table stream of PLCF (of SPLS structures) which - records grammar check state + offset in table stream of PLCF (of SPLS structures) that + records spell check state @@ -20045,7 +20587,7 @@ - 0x036A + 0x0252 @@ -20077,7 +20619,7 @@ - rtf:FCPLCFGRAM + rtf:FCPLCFSPL @@ -20092,7 +20634,7 @@ - + @@ -20103,7 +20645,7 @@ - 0x036E + 0x0256 @@ -20135,7 +20677,7 @@ - rtf:LCBPLCFGRAM + rtf:LCBPLCFSPL @@ -20150,10 +20692,12 @@ - + - offset in table stream of list names string table + offset in table stream of PLCF that records the beginning CP in + the text box subdoc of the text of individual text box entries. No + structure is stored in this PLCF @@ -20161,7 +20705,7 @@ - 0x0372 + 0x025A @@ -20193,7 +20737,7 @@ - rtf:FCSTTBLISTNAMES + rtf:FCPLCFTXBXTXT @@ -20208,7 +20752,7 @@ - + @@ -20219,7 +20763,7 @@ - 0x0376 + 0x025E @@ -20251,7 +20795,7 @@ - rtf:LCBSTTBLISTNAMES + rtf:LCBPLCFTXBXTXT @@ -20266,11 +20810,11 @@ - + - offset in table stream of undocumented undo / versioning - data + offset in table stream of the FLD PLCF that records field + boundaries recorded in the textbox subdoc. @@ -20278,7 +20822,7 @@ - 0x037A + 0x0262 @@ -20310,7 +20854,7 @@ - rtf:FCSTTBFUSSR + rtf:FCPLCFFLDTXBX @@ -20325,7 +20869,7 @@ - + @@ -20336,7 +20880,7 @@ - 0x037E + 0x0266 @@ -20368,7 +20912,7 @@ - rtf:LCBSTTBFUSSR + rtf:LCBPLCFFLDTXBX @@ -20382,34 +20926,13 @@ - - - - - - - - - - - - - - - - - - 856 - - - - - - + - + offset in table stream of PLCF that records the beginning CP in + the header text box subdoc of the text of individual header text + box entries. No structure is stored in this PLC. @@ -20417,7 +20940,7 @@ - 744 + 0x026A @@ -20425,7 +20948,7 @@ - + 0 @@ -20449,7 +20972,7 @@ - rtf:fcPlcfTch + rtf:FCPLCFHDRTXBXTXT @@ -20464,7 +20987,7 @@ - + @@ -20475,7 +20998,7 @@ - 748 + 0x026E @@ -20483,7 +21006,7 @@ - + 0 @@ -20507,7 +21030,7 @@ - rtf:lcbPlcfTch + rtf:LCBPLCFHDRTXBXTXT @@ -20522,10 +21045,11 @@ - + - + offset in table stream of the FLD PLCF that records field + boundaries recorded in the header textbox subdoc. @@ -20533,7 +21057,7 @@ - 752 + 0x0272 @@ -20541,7 +21065,7 @@ - + 0 @@ -20565,7 +21089,7 @@ - rtf:fcRmdThreading + rtf:FCPLCFFLDHDRTXBX @@ -20580,7 +21104,7 @@ - + @@ -20591,7 +21115,7 @@ - 756 + 0x0276 @@ -20599,7 +21123,7 @@ - + 0 @@ -20623,7 +21147,7 @@ - rtf:lcbRmdThreading + rtf:LCBPLCFFLDHDRTXBX @@ -20638,10 +21162,10 @@ - + - + Macro User storage @@ -20649,7 +21173,7 @@ - 760 + 0x027A @@ -20657,7 +21181,7 @@ - + 0 @@ -20681,7 +21205,7 @@ - rtf:fcMid + rtf:FCSTWUSER @@ -20696,7 +21220,7 @@ - + @@ -20707,7 +21231,7 @@ - 764 + 0x027E @@ -20715,7 +21239,7 @@ - + 0 @@ -20739,7 +21263,7 @@ - rtf:lcbMid + rtf:LCBSTWUSER @@ -20754,10 +21278,10 @@ - + - + offset in table stream of embedded true type font data. @@ -20765,7 +21289,7 @@ - 768 + 0x0282 @@ -20773,7 +21297,7 @@ - + 0 @@ -20797,7 +21321,7 @@ - rtf:fcSttbRgtplc + rtf:FCSTTBTTMBD @@ -20812,7 +21336,7 @@ - + @@ -20823,7 +21347,7 @@ - 772 + 0x0286 @@ -20831,7 +21355,7 @@ - + 0 @@ -20855,7 +21379,7 @@ - rtf:lcbSttbRgtplc + rtf:LCBSTTBTTMBD @@ -20870,7 +21394,7 @@ - + @@ -20881,7 +21405,7 @@ - 776 + 0x028A @@ -20889,7 +21413,7 @@ - + 0 @@ -20913,7 +21437,7 @@ - rtf:fcMsoEnvelope + rtf:FCUNUSED @@ -20928,7 +21452,7 @@ - + @@ -20939,7 +21463,7 @@ - 780 + 0x028E @@ -20947,7 +21471,7 @@ - + 0 @@ -20971,7 +21495,7 @@ - rtf:flcbMsoEnvelope + rtf:LCBUNUSED @@ -20986,10 +21510,13 @@ - + - + (FCPGD, beginning of array of fcPgd / fcBkd pairs + rgpgdbkd). + offset in table stream of the PLF that records the page descriptors + for the main text of the doc. @@ -20997,7 +21524,7 @@ - 784 + 0x0292 @@ -21005,7 +21532,7 @@ - + 0 @@ -21029,7 +21556,7 @@ - rtf:fcPlcfLad + rtf:FCPGDMOTHER @@ -21044,7 +21571,7 @@ - + @@ -21055,7 +21582,7 @@ - 788 + 0x0296 @@ -21063,7 +21590,7 @@ - + 0 @@ -21087,7 +21614,7 @@ - rtf:lcbPlcfLad + rtf:LCBPGDMOTHER @@ -21102,10 +21629,11 @@ - + - + offset in table stream of the PLCF that records the break + descriptors for the main text of the doc. @@ -21113,7 +21641,7 @@ - 792 + 0x029A @@ -21121,7 +21649,7 @@ - + 0 @@ -21145,7 +21673,7 @@ - rtf:fcRgDofr + rtf:FCBKDMOTHER @@ -21160,7 +21688,7 @@ - + @@ -21171,7 +21699,7 @@ - 796 + 0x029E @@ -21179,7 +21707,7 @@ - + 0 @@ -21203,7 +21731,7 @@ - rtf:lcbRgDofr + rtf:LCBBKDMOTHER @@ -21218,10 +21746,11 @@ - + - + offset in table stream of the PLF that records the page + descriptors for the footnote text of the doc. @@ -21229,7 +21758,7 @@ - 800 + 0x02A2 @@ -21237,7 +21766,7 @@ - + 0 @@ -21261,7 +21790,7 @@ - rtf:fcPlcosl + rtf:FCPGDFTN @@ -21276,7 +21805,7 @@ - + @@ -21287,15 +21816,74 @@ - 804 + 0x02A6 + + + 0 + + + + + + + + + + + + + + + + + + + + + rtf:LCBPGDFTN + + + + + + + + + + + + + + + + + + offset in table stream of the PLCF that records the break + descriptors for the footnote text of the doc. + + + + + + + + 0x02AA + + + + + + + + 0 @@ -21319,7 +21907,7 @@ - rtf:lcbPlcosl + rtf:FCBKDFTN @@ -21334,7 +21922,7 @@ - + @@ -21345,7 +21933,7 @@ - 808 + 0x02AE @@ -21353,7 +21941,7 @@ - + 0 @@ -21377,7 +21965,7 @@ - rtf:fcPlcfCookieOld + rtf:LCBBKDFTN @@ -21392,10 +21980,11 @@ - + - + offset in table stream of the PLF that records the page + descriptors for the endnote text of the doc. @@ -21403,7 +21992,7 @@ - 812 + 0x02B2 @@ -21411,7 +22000,7 @@ - + 0 @@ -21435,7 +22024,7 @@ - rtf:lcbPlcfCookieOld + rtf:FCPGDEDN @@ -21450,7 +22039,7 @@ - + @@ -21461,7 +22050,7 @@ - 816 + 0x02B6 @@ -21469,7 +22058,7 @@ - + 0 @@ -21493,7 +22082,7 @@ - rtf:fcPgdMotherOld + rtf:LCBPGDEDN @@ -21508,10 +22097,11 @@ - + - + offset in table stream of the PLCF that records the break + descriptors for the endnote text of the doc. @@ -21519,7 +22109,7 @@ - 820 + 0x02BA @@ -21527,7 +22117,7 @@ - + 0 @@ -21551,7 +22141,7 @@ - rtf:flcbPgdMotherOld + rtf:FCBKDEDN @@ -21566,7 +22156,7 @@ - + @@ -21577,7 +22167,7 @@ - 824 + 0x02BE @@ -21585,7 +22175,7 @@ - + 0 @@ -21609,7 +22199,7 @@ - rtf:fcPgdFtnOld + rtf:LCBBKDEDN @@ -21624,10 +22214,13 @@ - + - + offset in table stream of the STTBF containing field keywords. + This is only used in a small number of the international versions + of word. This field is no longer written to the file for nFib >= + 167. @@ -21635,7 +22228,7 @@ - 828 + 0x02C2 @@ -21643,7 +22236,7 @@ - + 0 @@ -21667,7 +22260,7 @@ - rtf:lcbPgdFtnOld + rtf:FCSTTBFINTLFLD @@ -21682,10 +22275,10 @@ - + - + Always 0 for nFib >= 167. @@ -21693,7 +22286,7 @@ - 832 + 0x02C6 @@ -21701,7 +22294,7 @@ - + 0 @@ -21725,7 +22318,7 @@ - rtf:fcBkdFtnOld + rtf:LCBSTTBFINTLFLD @@ -21740,10 +22333,10 @@ - + - + offset in table stream of a mailer routing slip. @@ -21751,7 +22344,7 @@ - 836 + 0x02CA @@ -21759,7 +22352,7 @@ - + 0 @@ -21783,7 +22376,7 @@ - rtf:lcbBkdFtnOld + rtf:FCROUTESLIP @@ -21798,7 +22391,7 @@ - + @@ -21809,7 +22402,7 @@ - 840 + 0x02CE @@ -21817,7 +22410,7 @@ - + 0 @@ -21841,7 +22434,7 @@ - rtf:fcPgdEdnOld + rtf:LCBROUTESLIP @@ -21856,10 +22449,12 @@ - + - + offset in table stream of STTBF recording the names of the + users who have saved this document alternating with the save + locations. @@ -21867,7 +22462,7 @@ - 844 + 0x02D2 @@ -21875,7 +22470,7 @@ - + 0 @@ -21899,7 +22494,7 @@ - rtf:lcbPgdEdnOld + rtf:FCSTTBSAVEDBY @@ -21914,7 +22509,7 @@ - + @@ -21925,7 +22520,7 @@ - 848 + 0x02D6 @@ -21933,7 +22528,7 @@ - + 0 @@ -21957,7 +22552,7 @@ - rtf:fcBkdEdnOld + rtf:LCBSTTBSAVEDBY @@ -21972,10 +22567,11 @@ - + - + offset in table stream of STTBF recording filenames of + documents which are referenced by this document. @@ -21983,7 +22579,7 @@ - 852 + 0x02DA @@ -21991,7 +22587,7 @@ - + 0 @@ -22015,7 +22611,7 @@ - rtf:lcbBkdEdnOld + rtf:FCSTTBFNM @@ -22029,35 +22625,11 @@ - - - - - - - - - - - - - - - - - - 6 - - - - - - + - index to BKL entry in plcfbkl that describes the - ending position of this bookmark in the CP stream. + @@ -22065,7 +22637,7 @@ - 0x0 + 0x02DE @@ -22097,14 +22669,14 @@ - rtf:IBKL + rtf:LCBSTTBFNM - + @@ -22112,11 +22684,10 @@ - + - when bkf.fCol is 1, this is the index to the first column of a - table column bookmark. + offset in the table stream of list format information. @@ -22124,7 +22695,7 @@ - 0x2 + 0x02E2 @@ -22140,7 +22711,7 @@ - 007F + @@ -22148,7 +22719,7 @@ - :7 + @@ -22156,14 +22727,14 @@ - rtf:ITCFIRST + rtf:FCPLCFLST - + @@ -22171,11 +22742,10 @@ - + - when 1, this indicates that this bookmark is marking the range - of a Macintosh Publisher section. + @@ -22183,7 +22753,7 @@ - 0x2 + 0x02E6 @@ -22191,7 +22761,7 @@ - 7 + 0 @@ -22199,7 +22769,7 @@ - 0080 + @@ -22207,7 +22777,7 @@ - :1 + @@ -22215,14 +22785,14 @@ - rtf:FPUB + rtf:LCBPLCFLST - + @@ -22230,11 +22800,11 @@ - + - when bkf.fCol is 1, this is the index to limit column of a - table column bookmark. + offset in the table stream of list format override + information. @@ -22242,7 +22812,7 @@ - 0x2 + 0x02EA @@ -22250,7 +22820,7 @@ - 8 + 0 @@ -22258,7 +22828,7 @@ - 7F00 + @@ -22266,7 +22836,7 @@ - :7 + @@ -22274,14 +22844,14 @@ - rtf:ITCLIM + rtf:FCPLFLFO - + @@ -22289,11 +22859,10 @@ - + - when 1, this bookmark marks a range of columns in a table - specified by [bkf.itcFirst, bkf.itcLim). + @@ -22301,7 +22870,7 @@ - 0x2 + 0x02EE @@ -22309,7 +22878,7 @@ - 15 + 0 @@ -22317,7 +22886,7 @@ - 8000 + @@ -22325,7 +22894,7 @@ - :1 + @@ -22333,51 +22902,26 @@ - rtf:FCOL + rtf:LCBPLFLFO - + - - - - - - - - - - - - - - - - - - - - - 12 - - - - - - + - used internally by Word + offset in the table stream of the textbox break table (a PLCF + of BKDs) for the main document @@ -22385,7 +22929,7 @@ - 0x0 + 0x02F2 @@ -22417,14 +22961,14 @@ - rtf:FN + rtf:FCPLCFTXBXBKD - + @@ -22432,13 +22976,10 @@ - + - file offset in main stream to beginning of SEPX stored for - section. If sed.fcSepx == 0xFFFFFFFF, the section properties for - the section are equal to the standard SEP (see SEP - definition). + @@ -22446,7 +22987,4101 @@ - 0x2 + 0x02F6 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCFTXBXBKD + + + + + + + + + + + + + + + + + + offset in the table stream of the textbox break table (a PLCF + of BKDs) for the header subdocument + + + + + + + + 0x02FA + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCFTXBXHDRBKD + + + + + + + + + + + + + + + + + + + + + + + + + + 0x02FE + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCFTXBXHDRBKD + + + + + + + + + + + + + + + + + + offset in main stream of undocumented undo / versioning + data + + + + + + + + 0x0302 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCDOCUNDO + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0306 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBDOCUNDO + + + + + + + + + + + + + + + + + + offset in main stream of undocumented undo / versioning + data + + + + + + + + 0x030A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCRGBUSE + + + + + + + + + + + + + + + + + + + + + + + + + + 0x030E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBRGBUSE + + + + + + + + + + + + + + + + + + offset in main stream of undocumented undo / versioning + data + + + + + + + + 0x0312 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCUSP + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0316 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBUSP + + + + + + + + + + + + + + + + + + offset in table stream of undocumented undo / versioning + data + + + + + + + + 0x031A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCUSKF + + + + + + + + + + + + + + + + + + + + + + + + + + 0x031E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBUSKF + + + + + + + + + + + + + + + + + + offset in table stream of undocumented undo / versioning + data + + + + + + + + 0x0322 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCUPCRGBUSE + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0326 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCUPCRGBUSE + + + + + + + + + + + + + + + + + + offset in table stream of undocumented undo / versioning + data + + + + + + + + 0x032A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCUPCUSP + + + + + + + + + + + + + + + + + + + + + + + + + + 0x032E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCUPCUSP + + + + + + + + + + + + + + + + + + offset in table stream of string table of style names for + glossary entries + + + + + + + + 0x0332 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCSTTBGLSYSTYLE + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0336 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBSTTBGLSYSTYLE + + + + + + + + + + + + + + + + + + offset in table stream of undocumented grammar options PL + + + + + + + + 0x033A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLGOSL + + + + + + + + + + + + + + + + + + + + + + + + + + 0x033E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLGOSL + + + + + + + + + + + + + + + + + + offset in table stream of undocumented ocx data + + + + + + + + 0x0342 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCOCX + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0346 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCOCX + + + + + + + + + + + + + + + + + + offset in table stream of character property bin table.PLC. FCs + in PLC are file offsets. Describes text of main document and all + subdocuments. + + + + + + + + 0x034A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCFBTELVC + + + + + + + + + + + + + + + + + + + + + + + + + + 0x034E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCFBTELVC + + + + + + + + + + + + + + + + + + (a.k.a FILETIME ftModified) + + + + + + + + 0x0352 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:DWLOWDATETIME + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0356 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:DWHIGHDATETIME + + + + + + + + + + + + + + + + + + offset in table stream of LVC PLCF + + + + + + + + 0x035A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCFLVC + + + + + + + + + + + + + + + + + + size of LVC PLCF, ==0 for non-complex files + + + + + + + + 0x035E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCFLVC + + + + + + + + + + + + + + + + + + offset in table stream of autosummary ASUMY PLCF. + + + + + + + + 0x0362 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCASUMY + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0366 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCASUMY + + + + + + + + + + + + + + + + + + offset in table stream of PLCF (of SPLS structures) which + records grammar check state + + + + + + + + 0x036A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCPLCFGRAM + + + + + + + + + + + + + + + + + + + + + + + + + + 0x036E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBPLCFGRAM + + + + + + + + + + + + + + + + + + offset in table stream of list names string table + + + + + + + + 0x0372 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCSTTBLISTNAMES + + + + + + + + + + + + + + + + + + + + + + + + + + 0x0376 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBSTTBLISTNAMES + + + + + + + + + + + + + + + + + + offset in table stream of undocumented undo / versioning + data + + + + + + + + 0x037A + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FCSTTBFUSSR + + + + + + + + + + + + + + + + + + + + + + + + + + 0x037E + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:LCBSTTBFUSSR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 856 + + + + + + + + + + + + + + + + + + 744 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPlcfTch + + + + + + + + + + + + + + + + + + + + + + + + + + 748 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPlcfTch + + + + + + + + + + + + + + + + + + + + + + + + + + 752 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcRmdThreading + + + + + + + + + + + + + + + + + + + + + + + + + + 756 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbRmdThreading + + + + + + + + + + + + + + + + + + + + + + + + + + 760 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcMid + + + + + + + + + + + + + + + + + + + + + + + + + + 764 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbMid + + + + + + + + + + + + + + + + + + + + + + + + + + 768 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcSttbRgtplc + + + + + + + + + + + + + + + + + + + + + + + + + + 772 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbSttbRgtplc + + + + + + + + + + + + + + + + + + + + + + + + + + 776 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcMsoEnvelope + + + + + + + + + + + + + + + + + + + + + + + + + + 780 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:flcbMsoEnvelope + + + + + + + + + + + + + + + + + + + + + + + + + + 784 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPlcfLad + + + + + + + + + + + + + + + + + + + + + + + + + + 788 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPlcfLad + + + + + + + + + + + + + + + + + + + + + + + + + + 792 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcRgDofr + + + + + + + + + + + + + + + + + + + + + + + + + + 796 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbRgDofr + + + + + + + + + + + + + + + + + + + + + + + + + + 800 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPlcosl + + + + + + + + + + + + + + + + + + + + + + + + + + 804 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPlcosl + + + + + + + + + + + + + + + + + + + + + + + + + + 808 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPlcfCookieOld + + + + + + + + + + + + + + + + + + + + + + + + + + 812 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPlcfCookieOld + + + + + + + + + + + + + + + + + + + + + + + + + + 816 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPgdMotherOld + + + + + + + + + + + + + + + + + + + + + + + + + + 820 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:flcbPgdMotherOld + + + + + + + + + + + + + + + + + + + + + + + + + + 824 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPgdFtnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 828 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPgdFtnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 832 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcBkdFtnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 836 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbBkdFtnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 840 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcPgdEdnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 844 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbPgdEdnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 848 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:fcBkdEdnOld + + + + + + + + + + + + + + + + + + + + + + + + + + 852 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rtf:lcbBkdEdnOld + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + + + + + + + + + + index to BKL entry in plcfbkl that describes the + ending position of this bookmark in the CP stream. + + + + + + + + 0x0 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:IBKL + + + + + + + + + + + + + + + + + + when bkf.fCol is 1, this is the index to the first column of a + table column bookmark. + + + + + + + + 0x2 + + + + + + + + 0 + + + + + + + + 007F + + + + + + + + :7 + + + + + + + + rtf:ITCFIRST + + + + + + + + + + + + + + + + + + when 1, this indicates that this bookmark is marking the range + of a Macintosh Publisher section. + + + + + + + + 0x2 + + + + + + + + 7 + + + + + + + + 0080 + + + + + + + + :1 + + + + + + + + rtf:FPUB + + + + + + + + + + + + + + + + + + when bkf.fCol is 1, this is the index to limit column of a + table column bookmark. + + + + + + + + 0x2 + + + + + + + + 8 + + + + + + + + 7F00 + + + + + + + + :7 + + + + + + + + rtf:ITCLIM + + + + + + + + + + + + + + + + + + when 1, this bookmark marks a range of columns in a table + specified by [bkf.itcFirst, bkf.itcLim). + + + + + + + + 0x2 + + + + + + + + 15 + + + + + + + + 8000 + + + + + + + + :1 + + + + + + + + rtf:FCOL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 12 + + + + + + + + + + used internally by Word + + + + + + + + 0x0 + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + rtf:FN + + + + + + + + + + + + + + + + + + file offset in main stream to beginning of SEPX stored for + section. If sed.fcSepx == 0xFFFFFFFF, the section properties for + the section are equal to the standard SEP (see SEP + definition). + + + + + + + + 0x2 @@ -22897,6 +27532,9 @@ + + + 10 @@ -32214,6 +36852,9 @@ + + + 0xC60D @@ -38863,6 +43504,9 @@ + + + 0xD609 @@ -40194,6 +44838,9 @@ + + + 0xD61A @@ -40258,6 +44905,9 @@ + + + 0xD61B @@ -40322,6 +44972,9 @@ + + + 0xD61C @@ -40386,6 +45039,9 @@ + + + 0xD61D @@ -40450,6 +45106,9 @@ + + + 0xD613 @@ -40963,6 +45622,9 @@ + + + 0xd670 @@ -43371,7 +48033,7 @@ - 0 + 2 @@ -43429,7 +48091,7 @@ - 0 + 2 @@ -43487,7 +48149,7 @@ - 0 + 2 diff --git a/writerfilter/source/doctok/resources.xsl b/writerfilter/source/doctok/resources.xsl index e1fc68ba5323..5ff0efe0edd1 100644 --- a/writerfilter/source/doctok/resources.xsl +++ b/writerfilter/source/doctok/resources.xsl @@ -301,14 +301,15 @@ class */ static sal_uInt32 getSize() { return - ; } - + ; } + + /** Calculate actual size. */ - sal_uInt32 calcSize(); - - + sal_uInt32 calcSize(); + + /** @@ -319,13 +320,15 @@ class sal_uInt32 getEntryOffset(sal_uInt32 nIndex) { return entryOffsets[nIndex]; - } - + } + + /** Calculate offset for payload. */ - sal_uInt32 calcPayloadOffset(); - + sal_uInt32 calcPayloadOffset(); + + /** Set offset for payloads. diff --git a/writerfilter/source/doctok/util.hxx b/writerfilter/source/doctok/util.hxx deleted file mode 100644 index df534b28a5bc..000000000000 --- a/writerfilter/source/doctok/util.hxx +++ /dev/null @@ -1,57 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef INCLUDED_UTIL_HXX -#define INCLUDED_UTIL_HXX - -#include -#include - -namespace writerfilter { -namespace doctok { -using namespace ::std; - -/** - Assertion - - @bTest if false the assertion is raised -*/ -void util_assert(bool bTest); - -/** - Print string to ostream. - - Printable characters are passed without change. Non-printable - characters are replaced by '.'. - - @param o ostream for output - @param str string to print - */ -void printBytes(ostream & o, const string & str); -}} - -#endif // INCLUDED_UTIL_HXX diff --git a/writerfilter/source/doctok/xmigen.xsl b/writerfilter/source/doctok/xmigen.xsl index d6eab5846fd4..f184dcfed4d2 100644 --- a/writerfilter/source/doctok/xmigen.xsl +++ b/writerfilter/source/doctok/xmigen.xsl @@ -184,6 +184,76 @@ + + + + YES + NO + + + + + + + + + + + + + + + + + + + sprmcode + + + + sprmid + + + + kind + + + + + + + Properties + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + @@ -278,7 +348,7 @@ - + diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx index 911689996b07..10e7cefa591f 100644 --- a/writerfilter/source/filter/ImportFilter.cxx +++ b/writerfilter/source/filter/ImportFilter.cxx @@ -87,13 +87,18 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes } #ifdef DEBUG_ELEMENT - writerfilter::TagLogger::Pointer_t debugLogger - (writerfilter::TagLogger::getInstance("DEBUG")); - debugLogger->startDocument(); - - writerfilter::TagLogger::Pointer_t dmapperLogger - (writerfilter::TagLogger::getInstance("DOMAINMAPPER")); - dmapperLogger->startDocument(); + OUString sURL = aMediaDesc.getUnpackedValueOrDefault( MediaDescriptor::PROP_URL(), OUString() ); + ::std::string sURLc = OUStringToOString(sURL, RTL_TEXTENCODING_ASCII_US).getStr(); + + writerfilter::TagLogger::Pointer_t debugLogger + (writerfilter::TagLogger::getInstance("DEBUG")); + debugLogger->setFileName(sURLc); + debugLogger->startDocument(); + + writerfilter::TagLogger::Pointer_t dmapperLogger + (writerfilter::TagLogger::getInstance("DOMAINMAPPER")); + dmapperLogger->setFileName(sURLc); + dmapperLogger->startDocument(); #endif writerfilter::dmapper::SourceDocumentType eType = diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index 2700a28959cc..248334136de5 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -42,7 +42,11 @@ using ::com::sun::star::xml::sax::SAXException; namespace writerfilter { namespace ooxml { + +#ifdef DEBUG TagLogger::Pointer_t debug_logger(TagLogger::getInstance("DEBUG")); +#endif + using namespace ::std; OOXMLDocumentImpl::OOXMLDocumentImpl diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx index 6fac03898e42..964d9e1cb5ee 100755 --- a/writerfilter/source/ooxml/OOXMLFactory.cxx +++ b/writerfilter/source/ooxml/OOXMLFactory.cxx @@ -263,7 +263,13 @@ OOXMLFactory::createFastChildContext(OOXMLFastContextHandler * pHandler, OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine); - return createFastChildContextFromFactory(pHandler, pFactory, Element); + uno::Reference< xml::sax::XFastContextHandler> ret; + + //Avoid handling unknown tokens and recursing to death + if ((Element & 0xffff) < OOXML_FAST_TOKENS_END) + ret = createFastChildContextFromFactory(pHandler, pFactory, Element); + + return ret; } void OOXMLFactory::characters(OOXMLFastContextHandler * pHandler, diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 4fbcff0de0a7..20ee49258c00 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -100,7 +100,7 @@ static string resourceToString set aSetContexts; - +#ifdef DEBUG class OOXMLIdToString : public IdToString { public: @@ -119,6 +119,7 @@ public: return s; } }; +#endif /* class OOXMLFastContextHandler @@ -136,8 +137,7 @@ OOXMLFastContextHandler::OOXMLFastContextHandler mnTableDepth(0), mnInstanceNumber(mnInstanceCount), mnRefCount(0), - m_xContext(context), - mbFallback(false) + m_xContext(context) { mnInstanceCount++; aSetContexts.insert(this); @@ -159,7 +159,7 @@ OOXMLFastContextHandler::OOXMLFastContextHandler mnTableDepth(0), mnInstanceNumber(mnInstanceCount), mnRefCount(0), - mbFallback(false) + m_xContext(pContext->m_xContext) { if (pContext != NULL) { @@ -182,29 +182,6 @@ OOXMLFastContextHandler::~OOXMLFastContextHandler() aSetContexts.erase(this); } -void OOXMLFastContextHandler::dumpOpenContexts() -{ - debug_logger->startElement("open-contexts"); - XMLTag aTag("open-contexts"); - - set::iterator aIt(aSetContexts.begin()); - while (aIt != aSetContexts.end()) - { - debug_logger->startElement("open-context"); - debug_logger->addTag((*aIt)->toTag()); - debug_logger->endElement("open-context"); - - aIt++; - } - - static char buffer[256]; - snprintf(buffer, sizeof(buffer), "%" SAL_PRI_SIZET "u", - aSetContexts.size()); - - debug_logger->attribute("count", buffer); - debug_logger->endElement("open-contexts"); -} - #ifdef DEBUG_MEMORY void SAL_CALL OOXMLFastContextHandler::acquire() throw () @@ -232,11 +209,6 @@ void SAL_CALL OOXMLFastContextHandler::release() } #endif -sal_uInt32 OOXMLFastContextHandler::getInstanceNumber() const -{ - return mnInstanceNumber; -} - // ::com::sun::star::xml::sax::XFastContextHandler: void SAL_CALL OOXMLFastContextHandler::startFastElement (Token_t Element, @@ -462,6 +434,7 @@ void OOXMLFastContextHandler::lcl_endAction(Token_t Element) OOXMLFactory::getInstance()->endAction(this, Element); } +#ifdef DEBUG XMLTag::Pointer_t OOXMLFastContextHandler::toPropertiesTag (OOXMLPropertySet::Pointer_t pProps) { @@ -511,6 +484,7 @@ string OOXMLFastContextHandler::toString() const { return toTag()->toString(); } +#endif string OOXMLFastContextHandler::getResourceString() const { @@ -548,16 +522,6 @@ Id OOXMLFastContextHandler::getDefine() const return mnDefine; } -void OOXMLFastContextHandler::setFallback(bool bFallback) -{ - mbFallback = bFallback; -} - -bool OOXMLFastContextHandler::isFallback() const -{ - return mbFallback; -} - OOXMLParserState::Pointer_t OOXMLFastContextHandler::getParserState() const { return mpParserState; @@ -1030,26 +994,6 @@ void OOXMLFastContextHandler::sendTableProperties() #endif } -void OOXMLFastContextHandler::clearCellProps() -{ -#ifdef DEBUG_ELEMENT - debug_logger->element("clearCellProps"); -#endif - - mpParserState->setCellProperties(OOXMLPropertySet::Pointer_t - (new OOXMLPropertySetImpl())); -} - -void OOXMLFastContextHandler::clearRowProps() -{ -#ifdef DEBUG_ELEMENT - debug_logger->element("clearRowProps"); -#endif - - mpParserState->setRowProperties(OOXMLPropertySet::Pointer_t - (new OOXMLPropertySetImpl())); -} - void OOXMLFastContextHandler::clearTableProps() { #ifdef DEBUG_ELEMENT @@ -1107,11 +1051,6 @@ void OOXMLFastContextHandler::setDefaultStringValue() { } -const ::rtl::OUString & OOXMLFastContextHandler::getText() const -{ - return aEmptyStr; -} - void OOXMLFastContextHandler::setDocument(OOXMLDocument * pDocument) { mpParserState->setDocument(pDocument); @@ -1295,19 +1234,6 @@ OOXMLFastContextHandler::getComponentContext() return m_xContext; } -/* - class OOXMLFastContextHandlerNoResource - */ -OOXMLFastContextHandlerNoResource::OOXMLFastContextHandlerNoResource -(OOXMLFastContextHandler * pContext) -: OOXMLFastContextHandler(pContext) -{ -} - -OOXMLFastContextHandlerNoResource::~OOXMLFastContextHandlerNoResource() -{ -} - /* class OOXMLFastContextHandlerStream */ @@ -1352,12 +1278,6 @@ void OOXMLFastContextHandlerStream::sendProperty(Id nId) sText.getLength()); } -void OOXMLFastContextHandlerStream::setPropertySetAttrs -(OOXMLPropertySet::Pointer_t pPropertySetAttrs) -{ - mpPropertySetAttrs = pPropertySetAttrs; -} - OOXMLPropertySet::Pointer_t OOXMLFastContextHandlerStream::getPropertySetAttrs() const { @@ -1439,6 +1359,7 @@ OOXMLValue::Pointer_t OOXMLFastContextHandlerProperties::getValue() const return OOXMLValue::Pointer_t(new OOXMLPropertySetValue(mpPropertySet)); } +#ifdef DEBUG XMLTag::Pointer_t OOXMLFastContextHandlerProperties::toTag() const { XMLTag::Pointer_t pTag(OOXMLFastContextHandler::toTag()); @@ -1446,6 +1367,7 @@ XMLTag::Pointer_t OOXMLFastContextHandlerProperties::toTag() const return pTag; } +#endif void OOXMLFastContextHandlerProperties::newProperty (const Id & rId, OOXMLValue::Pointer_t pVal) @@ -1980,72 +1902,6 @@ void OOXMLFastContextHandlerTextTable::lcl_endFastElement class OOXMLFastContextHandlerShape */ -class ShapesNoAdd: - public ::cppu::WeakImplHelper1< - drawing::XShapes> -{ -public: - explicit ShapesNoAdd(uno::Reference< uno::XComponentContext > const & context, uno::Reference< drawing::XShapes> const & xShapes); - -private: - // container::XElementAccess: - virtual uno::Type SAL_CALL getElementType() throw (uno::RuntimeException); - virtual ::sal_Bool SAL_CALL hasElements() throw (uno::RuntimeException); - - // container::XIndexAccess: - virtual ::sal_Int32 SAL_CALL getCount() throw (uno::RuntimeException); - virtual uno::Any SAL_CALL getByIndex(::sal_Int32 Index) throw (uno::RuntimeException, lang::IndexOutOfBoundsException, lang::WrappedTargetException); - - // drawing::XShapes: - virtual void SAL_CALL add(const uno::Reference< drawing::XShape > & xShape) throw (uno::RuntimeException); - virtual void SAL_CALL remove(const uno::Reference< drawing::XShape > & xShape) throw (uno::RuntimeException); - - ShapesNoAdd(ShapesNoAdd &); // not defined - void operator =(ShapesNoAdd &); // not defined - - virtual ~ShapesNoAdd() {} - - uno::Reference< uno::XComponentContext > m_xContext; - uno::Reference< drawing::XShapes > m_xShapes; -}; - -ShapesNoAdd::ShapesNoAdd(uno::Reference< uno::XComponentContext > const & context, uno::Reference< drawing::XShapes> const & xShapes) : -m_xContext(context), m_xShapes(xShapes) -{} - -// container::XElementAccess: -uno::Type SAL_CALL ShapesNoAdd::getElementType() throw (uno::RuntimeException) -{ - return m_xShapes->getElementType(); -} - -::sal_Bool SAL_CALL ShapesNoAdd::hasElements() throw (uno::RuntimeException) -{ - return m_xShapes->hasElements(); -} - -// container::XIndexAccess: -::sal_Int32 SAL_CALL ShapesNoAdd::getCount() throw (uno::RuntimeException) -{ - return m_xShapes->getCount(); -} - -uno::Any SAL_CALL ShapesNoAdd::getByIndex(::sal_Int32 Index) throw (uno::RuntimeException, lang::IndexOutOfBoundsException, lang::WrappedTargetException) -{ - return m_xShapes->getByIndex(Index); -} - -// drawing::XShapes: -void SAL_CALL ShapesNoAdd::add(const uno::Reference< drawing::XShape > & - ) throw (uno::RuntimeException) -{ -} - -void SAL_CALL ShapesNoAdd::remove(const uno::Reference< drawing::XShape > & xShape) throw (uno::RuntimeException) -{ - m_xShapes->remove(xShape); -} - OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape (OOXMLFastContextHandler * pContext) : OOXMLFastContextHandlerProperties(pContext), m_bShapeSent( false ), diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx index b67f86fda3e7..0c441f62a180 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.hxx @@ -132,10 +132,6 @@ public: virtual ResourceEnum_t getResource() const { return STREAM; } - static XMLTag::Pointer_t toPropertiesTag(OOXMLPropertySet::Pointer_t); - virtual XMLTag::Pointer_t toTag() const; - virtual string toString() const; - virtual void attributes (const uno::Reference< xml::sax::XFastAttributeList > & Attribs) throw (uno::RuntimeException, xml::sax::SAXException); @@ -179,18 +175,9 @@ public: void setDefine(Id nDefine); Id getDefine() const; - void setFallback(bool bFallbac); - bool isFallback() const; OOXMLParserState::Pointer_t getParserState() const; -#ifdef DEBUG_MEMORY - virtual void SAL_CALL acquire() throw(); - virtual void SAL_CALL release() throw(); -#endif - - sal_uInt32 getInstanceNumber() const; - void sendTableDepth() const; void setHandle(); @@ -227,8 +214,6 @@ public: void sendCellProperties(); void sendRowProperties(); void sendTableProperties(); - void clearCellProps(); - void clearRowProps(); void clearTableProps(); void clearProps(); @@ -237,10 +222,18 @@ public: virtual void setDefaultHexValue(); virtual void setDefaultStringValue(); - const ::rtl::OUString & getText() const; - void sendPropertyToParent(); - static void dumpOpenContexts(); + +#ifdef DEBUG + static XMLTag::Pointer_t toPropertiesTag(OOXMLPropertySet::Pointer_t); + virtual XMLTag::Pointer_t toTag() const; + virtual string toString() const; +#endif + +#ifdef DEBUG_MEMORY + virtual void SAL_CALL acquire() throw(); + virtual void SAL_CALL release() throw(); +#endif protected: OOXMLFastContextHandler * mpParent; @@ -302,14 +295,6 @@ private: static sal_uInt32 mnInstanceCount; - bool mbFallback; -}; - -class OOXMLFastContextHandlerNoResource : public OOXMLFastContextHandler -{ -public: - OOXMLFastContextHandlerNoResource(OOXMLFastContextHandler * pContext); - virtual ~OOXMLFastContextHandlerNoResource(); }; class OOXMLFastContextHandlerStream : public OOXMLFastContextHandler @@ -329,10 +314,10 @@ public: void handleHyperlink(); protected: - void setPropertySetAttrs(OOXMLPropertySet::Pointer_t pPropertySetAttrs); virtual void resolvePropertySetAttrs(); virtual void lcl_characters(const ::rtl::OUString & aChars) throw (uno::RuntimeException, xml::sax::SAXException); + private: mutable OOXMLPropertySet::Pointer_t mpPropertySetAttrs; }; @@ -346,8 +331,6 @@ public: virtual OOXMLValue::Pointer_t getValue() const; virtual ResourceEnum_t getResource() const { return PROPERTIES; } - virtual XMLTag::Pointer_t toTag() const; - virtual void newProperty(const Id & nId, OOXMLValue::Pointer_t pVal); void handleXNotes(); @@ -360,6 +343,10 @@ public: virtual void setPropertySet(OOXMLPropertySet::Pointer_t pPropertySet); virtual OOXMLPropertySet::Pointer_t getPropertySet() const; +#ifdef DEBUG + virtual XMLTag::Pointer_t toTag() const; +#endif + protected: /// the properties OOXMLPropertySet::Pointer_t mpPropertySet; diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx index 7007a2b6c436..1768d486c80d 100644 --- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.cxx @@ -152,13 +152,6 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL return OOXMLFactory::getInstance()->createFastChildContextFromStart(getContextHandler().get(), Element); } -OOXMLParserState::Pointer_t OOXMLFastDocumentHandler::getParserState() const -{ - OOXMLParserState::Pointer_t pParserState; - - return getContextHandler()->getParserState(); -} - uno::Reference< xml::sax::XFastContextHandler > SAL_CALL OOXMLFastDocumentHandler::createUnknownChildContext (const ::rtl::OUString & diff --git a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx index 9a7fc611e3a9..ca322e0c2098 100644 --- a/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx +++ b/writerfilter/source/ooxml/OOXMLFastDocumentHandler.hxx @@ -95,8 +95,6 @@ public: void setDocument(OOXMLDocument * pDocument); void setXNoteId(const ::rtl::OUString & rXNoteId); - OOXMLParserState::Pointer_t getParserState() const; - void setIsSubstream( bool bSubstream ); private: diff --git a/writerfilter/source/ooxml/OOXMLFastHelper.hxx b/writerfilter/source/ooxml/OOXMLFastHelper.hxx index 2d21083487ff..5d4587922a54 100644 --- a/writerfilter/source/ooxml/OOXMLFastHelper.hxx +++ b/writerfilter/source/ooxml/OOXMLFastHelper.hxx @@ -84,8 +84,6 @@ OOXMLFastHelper::createAndSetParent debug_logger->attribute("context", pHandler->getType()); debug_logger->attribute("token", fastTokenToId(pTmp->getToken())); debug_logger->attribute("id", (*QNameToString::Instance())(nId)); - if (pTmp->isFallback()) - debug_logger->attribute("fallback", "yes"); debug_logger->startElement("created"); debug_logger->addTag(pTmp->toTag()); @@ -119,8 +117,6 @@ OOXMLFastHelper::createAndSetParentAndDefine snprintf(buffer, sizeof(buffer), "0x%08" SAL_PRIxUINT32, nId); debug_logger->attribute("idnum", buffer); - if (pTmp->isFallback()) - debug_logger->attribute("fallback", "yes"); debug_logger->startElement("created"); debug_logger->addTag(pTmp->toTag()); @@ -158,9 +154,6 @@ OOXMLFastHelper::createAndSetParentRef debug_logger->attribute("context", pHandler->getType()); debug_logger->attribute("type", fastTokenToId(nToken)); - if (pTmp->isFallback()) - debug_logger->attribute("fallback", "yes"); - debug_logger->startElement("created"); debug_logger->chars(pTmp->getType()); debug_logger->endElement("created"); diff --git a/writerfilter/source/ooxml/OOXMLParserState.cxx b/writerfilter/source/ooxml/OOXMLParserState.cxx index e38593777a55..fb347d02048e 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.cxx +++ b/writerfilter/source/ooxml/OOXMLParserState.cxx @@ -103,11 +103,6 @@ bool OOXMLParserState::isForwardEvents() const return mbForwardEvents; } -void OOXMLParserState::incContextCount() -{ - mnContexts++; -} - const string OOXMLParserState::getHandle() const { char sBuffer[256]; @@ -122,11 +117,6 @@ void OOXMLParserState::setHandle() mnHandle = mnContexts; } -unsigned int OOXMLParserState::getContextCount() const -{ - return mnContexts; -} - void OOXMLParserState::setDocument(OOXMLDocument * pDocument) { mpDocument = pDocument; @@ -147,44 +137,11 @@ const rtl::OUString & OOXMLParserState::getXNoteId() const return mpDocument->getXNoteId(); } -void OOXMLParserState::setXNoteType(const Id & rId) -{ - mpDocument->setXNoteType(rId); -} - -const Id & OOXMLParserState::getXNoteType() const -{ - return mpDocument->getXNoteType(); -} - const ::rtl::OUString & OOXMLParserState::getTarget() const { return mpDocument->getTarget(); } -void OOXMLParserState::newCharacterProperty(const Id & rId, - OOXMLValue::Pointer_t pVal) -{ - if (rId != 0x0) - { - if (mpCharacterProps.get() == NULL) - mpCharacterProps = - OOXMLPropertySet::Pointer_t(new OOXMLPropertySetImpl()); - - OOXMLPropertyImpl::Pointer_t pProperty - (new OOXMLPropertyImpl(rId, pVal, OOXMLPropertyImpl::ATTRIBUTE)); - -#ifdef DEBUG_PROPERTIES - debug_logger->startElement("chars(pProperty->toString()); - debug_logger->endElement("newCharacterProperty"); -#endif - - mpCharacterProps->add(pProperty); - } - -} - void OOXMLParserState::resolveCharacterProperties(Stream & rStream) { if (mpCharacterProps.get() != NULL) @@ -202,11 +159,6 @@ void OOXMLParserState::resolveCharacterProperties(Stream & rStream) } } -OOXMLPropertySet::Pointer_t OOXMLParserState::getCharacterProperties() const -{ - return mpCharacterProps; -} - void OOXMLParserState::setCharacterProperties (OOXMLPropertySet::Pointer_t pProps) { @@ -317,6 +269,22 @@ void OOXMLParserState::endTable() mTableProps.pop(); } +void OOXMLParserState::incContextCount() +{ + mnContexts++; +} + +#ifdef DEBUG +unsigned int OOXMLParserState::getContextCount() const +{ + return mnContexts; +} + +string OOXMLParserState::toString() const +{ + return toTag()->toString(); +} + XMLTag::Pointer_t OOXMLParserState::toTag() const { XMLTag::Pointer_t pTag(new XMLTag("parserstate")); @@ -352,10 +320,6 @@ XMLTag::Pointer_t OOXMLParserState::toTag() const return pTag; } - -string OOXMLParserState::toString() const -{ - return toTag()->toString(); -} +#endif }} diff --git a/writerfilter/source/ooxml/OOXMLParserState.hxx b/writerfilter/source/ooxml/OOXMLParserState.hxx index affdd7dbe61c..2dd118a5b96b 100644 --- a/writerfilter/source/ooxml/OOXMLParserState.hxx +++ b/writerfilter/source/ooxml/OOXMLParserState.hxx @@ -29,9 +29,12 @@ #include #include -#include #include "OOXMLPropertySetImpl.hxx" +#ifdef DEBUG +#include +#endif + namespace writerfilter { namespace ooxml { @@ -76,24 +79,18 @@ public: void setForwardEvents(bool bForwardEvents); bool isForwardEvents() const; - void incContextCount(); const string getHandle() const; void setHandle(); - unsigned int getContextCount() const; void setDocument(OOXMLDocument * pDocument); OOXMLDocument * getDocument() const; void setXNoteId(const rtl::OUString & rId); const rtl::OUString & getXNoteId() const; - void setXNoteType(const Id & rId); - const Id & getXNoteType() const; const rtl::OUString & getTarget() const; - void newCharacterProperty(const Id & rId, OOXMLValue::Pointer_t pVal); void resolveCharacterProperties(Stream & rStream); - OOXMLPropertySet::Pointer_t getCharacterProperties() const; void setCharacterProperties(OOXMLPropertySet::Pointer_t pProps); void resolveCellProperties(Stream & rStream); void setCellProperties(OOXMLPropertySet::Pointer_t pProps); @@ -105,8 +102,15 @@ public: void startTable(); void endTable(); + void incContextCount(); + +#ifdef DEBUG +public: + unsigned int getContextCount() const; string toString() const; XMLTag::Pointer_t toTag() const; +#endif + }; }} diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx index 2f8844f1af01..f106972b23c0 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.cxx @@ -198,10 +198,6 @@ OOXMLValue::OOXMLValue() { } -OOXMLValue::OOXMLValue(const rtl::OUString & /*rValue*/) -{ -} - OOXMLValue::~OOXMLValue() { } @@ -658,24 +654,6 @@ string OOXMLHexValue::toString() const return buffer; } -/* - class OOXMLListValue -*/ -OOXMLListValue::OOXMLListValue() -: OOXMLIntegerValue(0) -{ -} - -OOXMLListValue::OOXMLListValue(sal_Int32 nValue) -: OOXMLIntegerValue(nValue) -{ -} - - -OOXMLListValue::~OOXMLListValue() -{ -} - /* class OOXMLShapeValue */ diff --git a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx index 78c39b79d515..a04fc5f5d1af 100644 --- a/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLPropertySetImpl.hxx @@ -48,7 +48,6 @@ class OOXMLValue : public Value { public: typedef boost::shared_ptr Pointer_t; - OOXMLValue(const rtl::OUString & rValue); OOXMLValue(); virtual ~OOXMLValue(); @@ -222,14 +221,6 @@ public: virtual OOXMLValue * clone() const; }; -class OOXMLListValue : public OOXMLIntegerValue -{ -public: - OOXMLListValue(); - OOXMLListValue(sal_Int32 nValue); - virtual ~OOXMLListValue(); -}; - class OOXMLShapeValue : public OOXMLValue { protected: diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx index 91188eeda701..8b879f4b0aec 100644 --- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx @@ -68,22 +68,6 @@ OOXMLStreamImpl::OOXMLStreamImpl init(); } -OOXMLStreamImpl::OOXMLStreamImpl -(uno::Reference xContext, - uno::Reference xStorageStream, const rtl::OUString & rId) -: mxContext(xContext), - mxStorageStream(xStorageStream), - mnStreamType(UNKNOWN), - msId(rId) -{ - mxStorage.set - (comphelper::OStorageHelper::GetStorageOfFormatFromInputStream - (OFOPXML_STORAGE_FORMAT_STRING, mxStorageStream)); - mxRelationshipAccess.set(mxStorage, uno::UNO_QUERY_THROW); - - init(); -} - OOXMLStreamImpl::OOXMLStreamImpl (OOXMLStreamImpl & rOOXMLStream, const rtl::OUString & rId) : mxContext(rOOXMLStream.mxContext), diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.hxx b/writerfilter/source/ooxml/OOXMLStreamImpl.hxx index 64682fab250c..15409fe8ae2a 100644 --- a/writerfilter/source/ooxml/OOXMLStreamImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLStreamImpl.hxx @@ -71,10 +71,6 @@ public: uno::Reference xStorageStream, StreamType_t nType); OOXMLStreamImpl(OOXMLStreamImpl & rStream, const rtl::OUString & rId); - OOXMLStreamImpl - (uno::Reference xContext, - uno::Reference xStorageStream, - const rtl::OUString & rId); virtual ~OOXMLStreamImpl(); diff --git a/writerfilter/source/ooxml/attrsprm.xsl b/writerfilter/source/ooxml/attrsprm.xsl new file mode 100644 index 000000000000..9351b1b874c9 --- /dev/null +++ b/writerfilter/source/ooxml/attrsprm.xsl @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + resolve + + + set + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + : + + + + + + + + + + + + + + + + + + + + + + + + + + : + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/writerfilter/source/ooxml/dummyannotate.xsl b/writerfilter/source/ooxml/dummyannotate.xsl index 029fd6aef569..0fcc1e0dcbc7 100644 --- a/writerfilter/source/ooxml/dummyannotate.xsl +++ b/writerfilter/source/ooxml/dummyannotate.xsl @@ -838,7 +838,7 @@ sed "s/wml/ - diff --git a/writerfilter/source/ooxml/factoryimpl_ns.xsl b/writerfilter/source/ooxml/factoryimpl_ns.xsl index 55d986932aec..533c3d16ae23 100644 --- a/writerfilter/source/ooxml/factoryimpl_ns.xsl +++ b/writerfilter/source/ooxml/factoryimpl_ns.xsl @@ -150,7 +150,20 @@ for a rng:define --> + + + + + + + + + + + // + + @@ -161,6 +174,9 @@ for a rng:define String + + String + @@ -201,13 +217,6 @@ for a rng:define - - - - - - - @@ -283,25 +292,6 @@ ListValueMapPointer - - - - - - - - - (*pMap)[ - - ] = CreateElement(RT_ - - , - - - - ); - - @@ -329,6 +319,25 @@ ListValueMapPointer + + + + + + + + + (*pMap)[ + + ] = CreateElement(RT_ + + , + + + + ); + + @@ -610,6 +619,25 @@ string + + + + + + + + + + + + + + + + + + @@ -630,25 +658,6 @@ string - - - - - - - - - - - - - - - - - - diff --git a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl b/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl deleted file mode 100644 index 9904907317cc..000000000000 --- a/writerfilter/source/ooxml/fastresourcesimpl_dml-shapeProperties.xsl +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - -#include <iostream> -#include <doctok/resourceids.hxx> -#include <ooxml/resourceids.hxx> -#include "OOXMLfastresources.hxx" -#include "OOXMLFastTokens.hxx" -#include "OOXMLFastHelper.hxx" -#include "OOXMLvalues.hxx" -#include "Handler.hxx" - -/// @cond GENERATED - -namespace writerfilter { -namespace ooxml { -using namespace ::std; - - - dml-shapeProperties - -}} -/// @endcond GENERATED - - - - diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index 15bb57e18087..b7046a495bd8 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -19,6 +19,7 @@ + @@ -14105,7 +14106,7 @@ Cryptographic Hashing Algorithm - + Iterations to Run Hashing Algorithm @@ -15079,7 +15080,7 @@ - + Text Box Form Field Type Values @@ -15206,7 +15207,7 @@ - + Help Text Type @@ -15216,7 +15217,7 @@ - + Status Text Type @@ -15750,15 +15751,15 @@ - + Document Grid Type - + Document Grid Line Pitch - + Document Grid Character Pitch @@ -21754,11 +21755,11 @@ - lrTb - tbRl - btLr - lrTbV - tbRlV + lrTb + tbRl + btLr + lrTbV + tbRlV tbLrV @@ -21855,6 +21856,24 @@ + + + + + + + + + + + + + + + + + + @@ -22037,6 +22056,8 @@ + + @@ -22046,6 +22067,23 @@ + + + + + + + + + + + + + + + + + continuous nextColumn @@ -22209,6 +22247,11 @@ linesAndChars snapToChars + + + + + even default @@ -22429,10 +22472,10 @@ - + - + diff --git a/writerfilter/source/ooxml/ooxmlLoggers.hxx b/writerfilter/source/ooxml/ooxmlLoggers.hxx index b58a41bdabcd..54191244b968 100644 --- a/writerfilter/source/ooxml/ooxmlLoggers.hxx +++ b/writerfilter/source/ooxml/ooxmlLoggers.hxx @@ -28,6 +28,8 @@ #ifndef INCLUDED_OOXML_LOGGERS_HXX #define INCLUDED_OOXML_LOGGERS_HXX +#ifdef DEBUG + #include namespace writerfilter { @@ -35,4 +37,5 @@ namespace writerfilter { extern TagLogger::Pointer_t debug_logger; } } +#endif #endif // INCLUDED_OOXML_LOGGERS_HXX diff --git a/writerfilter/source/ooxml/status.sh b/writerfilter/source/ooxml/status.sh index e06382b13aa1..c36ad0d65a37 100755 --- a/writerfilter/source/ooxml/status.sh +++ b/writerfilter/source/ooxml/status.sh @@ -8,15 +8,13 @@ echo "" xsltproc analyzemodel.xsl model.xml | tail -n +2 -mdfind -onlyin $SEARCHIN "case NS_" | -xargs -J % grep -A 1 -n "case NS_" % | -grep "cxx" | +find $SEARCHIN -name "*.cxx" -exec grep -nH -A 1 "case NS_" {} \; | grep -v "//.*case NS_" | sed 's#'$SEARCHIN'##' | sed 's#\(^[^:]*\):\([0-9]*\):##' | sed 's#.*WRITERFILTERSTATUS: done: \([0-9]*\), planned: \([0-9.]*\), spent: \([0-9.]*\).*##' | -grep -v "WRITERFILTERSTATUS:" | +sed 's#.*WRITERFILTERSTATUS:.*##' | sed 's#^.*-[0-9][0-9]*-.*$##' | grep -v "^--" diff --git a/writerfilter/source/resourcemodel/Protocol.cxx b/writerfilter/source/resourcemodel/Protocol.cxx index 7ae3c06f2675..51d12eb4f2d6 100644 --- a/writerfilter/source/resourcemodel/Protocol.cxx +++ b/writerfilter/source/resourcemodel/Protocol.cxx @@ -28,6 +28,7 @@ * ************************************************************************/ +#ifdef DEBUG #include #include #include @@ -214,3 +215,4 @@ void TableProtocol::entry(int pos, } } +#endif // DEBUG diff --git a/writerfilter/source/resourcemodel/ResourceModelHelper.cxx b/writerfilter/source/resourcemodel/ResourceModelHelper.cxx new file mode 100644 index 000000000000..fee286fb4570 --- /dev/null +++ b/writerfilter/source/resourcemodel/ResourceModelHelper.cxx @@ -0,0 +1,48 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#include "resourcemodel/ResourceModelHelper.hxx" + +namespace writerfilter { +namespace resourcemodel { + +void resolveSprmProps(Properties & rHandler, Sprm & rSprm) +{ + writerfilter::Reference::Pointer_t pProperties = rSprm.getProps(); + if( pProperties.get()) + pProperties->resolve(rHandler); +} + +void resolveAttributeProperties(Properties & rHandler, Value & val) +{ + writerfilter::Reference::Pointer_t pProperties = val.getProperties(); + if( pProperties.get()) + pProperties->resolve(rHandler); +} + + +}} diff --git a/writerfilter/source/resourcemodel/TagLogger.cxx b/writerfilter/source/resourcemodel/TagLogger.cxx index 1d9b23623e56..f19bef7c01d1 100644 --- a/writerfilter/source/resourcemodel/TagLogger.cxx +++ b/writerfilter/source/resourcemodel/TagLogger.cxx @@ -25,6 +25,7 @@ * ************************************************************************/ +#ifdef DEBUG #include #include #include @@ -51,11 +52,65 @@ namespace writerfilter void XMLTag::addAttr(string sName, sal_uInt32 nValue) { - char buffer[256]; + static char buffer[256]; snprintf(buffer, sizeof(buffer), "%" SAL_PRIdINT32, nValue); addAttr(sName, buffer); } +void XMLTag::addAttr(string sName, uno::Any aAny) +{ + string aTmpStrInt; + string aTmpStrFloat; + string aTmpStrString; + + static char buffer[256]; + + try + { + sal_Int32 nInt = 0; + aAny >>= nInt; + + snprintf(buffer, sizeof(buffer), "%" SAL_PRIdINT32, + nInt); + + aTmpStrInt = buffer; + } + catch (uno::Exception aExcept) + { + aTmpStrInt = "exception"; + } + + try + { + float nFloat = 0.0; + aAny >>= nFloat; + + snprintf(buffer, sizeof(buffer), "%f", + nFloat); + + aTmpStrFloat = buffer; + } + catch (uno::Exception aExcept) + { + aTmpStrFloat = "exception"; + } + + try + { + ::rtl::OUString aStr; + aAny >>= aStr; + + aTmpStrString = OUStringToOString(aStr, RTL_TEXTENCODING_ASCII_US).getStr(); + } + catch (uno::Exception aExcept) + { + aTmpStrString = "exception"; + } + + addAttr(sName, "i:" + aTmpStrInt + " f:" + aTmpStrFloat + " s:" + + aTmpStrString); +} + void XMLTag::addTag(XMLTag::Pointer_t pTag) { if (pTag != XMLTag::Pointer_t()) @@ -64,9 +119,14 @@ namespace writerfilter void XMLTag::chars(const string & rChars) { - mChars = rChars; + mChars += rChars; } +void XMLTag::chars(const ::rtl::OUString & rChars) +{ + chars(OUStringToOString(rChars, RTL_TEXTENCODING_ASCII_US).getStr()); +} + const string & XMLTag::getTag() const { return mTag; @@ -162,6 +222,7 @@ namespace writerfilter static TagLoggerHashMap_t * tagLoggers = NULL; TagLogger::TagLogger() + : mFileName("writerfilter") { } @@ -169,6 +230,11 @@ namespace writerfilter { } + void TagLogger::setFileName(const string & rName) + { + mFileName = rName; + } + TagLogger::Pointer_t TagLogger::getInstance(const char * name) { if (tagLoggers == NULL) @@ -233,6 +299,11 @@ namespace writerfilter currentTag()->addAttr(name, value); } +void TagLogger::attribute(const string & name, const uno::Any aAny) +{ + currentTag()->addAttr(name, aAny); +} + void TagLogger::addTag(XMLTag::Pointer_t pTag) { currentTag()->addTag(pTag); @@ -287,7 +358,18 @@ namespace writerfilter else fileName += "/tmp"; - fileName += "/writerfilter."; + string sPrefix = aIt->second->mFileName; + size_t nLastSlash = sPrefix.find_last_of('/'); + size_t nLastBackslash = sPrefix.find_last_of('\\'); + size_t nCutPos = nLastSlash; + if (nLastBackslash < nCutPos) + nCutPos = nLastBackslash; + if (nCutPos < sPrefix.size()) + sPrefix = sPrefix.substr(nCutPos + 1); + + fileName += "/"; + fileName += sPrefix; + fileName +="."; fileName += name; fileName += ".xml"; @@ -336,7 +418,7 @@ namespace writerfilter static char sBuffer[256]; snprintf(sBuffer, sizeof(sBuffer), - "0x%" SAL_PRIxUINT32 "x, %" SAL_PRIxUINT32 "d", rSprm.getId(), + "0x%" SAL_PRIxUINT32 ", %" SAL_PRIuUINT32, rSprm.getId(), rSprm.getId()); pTag->addAttr("id", sBuffer); pTag->addAttr("value", rSprm.getValue()->toString()); @@ -347,4 +429,39 @@ namespace writerfilter } +XMLTag::Pointer_t unoPropertySetToTag(uno::Reference rPropSet) +{ + uno::Reference xPropSetInfo(rPropSet->getPropertySetInfo()); + uno::Sequence aProps(xPropSetInfo->getProperties()); + + XMLTag::Pointer_t pResult(new XMLTag("unoPropertySet")); + + for (int i = 0; i < aProps.getLength(); ++i) + { + XMLTag::Pointer_t pPropTag(new XMLTag("property")); + + ::rtl::OUString sName(aProps[i].Name); + + pPropTag->addAttr("name", sName); + try + { + pPropTag->addAttr("value", rPropSet->getPropertyValue(sName)); + } + catch (uno::Exception aException) + { + XMLTag::Pointer_t pException(new XMLTag("exception")); + + pException->chars("getPropertyValue(\""); + pException->chars(sName); + pException->chars("\")"); + pPropTag->addTag(pException); + } + + pResult->addTag(pPropTag); + } + + return pResult; +} + } +#endif // DEBUG diff --git a/writerfilter/source/resourcemodel/makefile.mk b/writerfilter/source/resourcemodel/makefile.mk index f3869f30611b..bb5bc05ac1bd 100644 --- a/writerfilter/source/resourcemodel/makefile.mk +++ b/writerfilter/source/resourcemodel/makefile.mk @@ -54,6 +54,7 @@ SLOFILES= \ $(SLO)$/resourcemodel.obj \ $(SLO)$/util.obj \ $(SLO)$/TagLogger.obj \ + $(SLO)$/ResourceModelHelper.obj \ $(SLO)$/WW8Analyzer.obj \ $(SLO)$/Protocol.obj diff --git a/writerfilter/source/resourcemodel/resourcemodel.cxx b/writerfilter/source/resourcemodel/resourcemodel.cxx index 9b45834c5ce3..096792c76b8e 100644 --- a/writerfilter/source/resourcemodel/resourcemodel.cxx +++ b/writerfilter/source/resourcemodel/resourcemodel.cxx @@ -481,12 +481,6 @@ void WW8PropertiesHandler::attribute(Id name, Value & val) output.addItem(""); } -bool WW8PropertiesHandler::compare(SprmSharedPointer_t sprm1, - SprmSharedPointer_t sprm2) -{ - return sprm1->getId() < sprm2->getId(); -} - void WW8PropertiesHandler::sprm(Sprm & sprm_) { string tmpStr = "') + result += ">"; + else if (c == '&') + result += "&"; + else + result += c; + } + else + { + snprintf(sBuffer, sizeof(sBuffer), "\\%03d", c); + result += sBuffer; + } + } + + return result; + } + +#ifdef DEBUG string propertysetToString(uno::Reference const & xPropSet) { string sResult; @@ -368,57 +399,29 @@ string propertysetToString(uno::Reference const & xPropSet) return sResult; } - string xmlify(const string & str) - { - string result = ""; - char sBuffer[16]; - - for (string::const_iterator aIt = str.begin(); aIt != str.end(); ++aIt) - { - char c = *aIt; - - if (isprint(c) && c != '\"') - { - if (c == '<') - result += "<"; - else if (c == '>') - result += ">"; - else if (c == '&') - result += "&"; - else - result += c; - } - else - { - snprintf(sBuffer, sizeof(sBuffer), "\\%03d", c); - result += sBuffer; - } - } - return result; - } +string toString(uno::Reference< text::XTextRange > textRange) +{ + string result; - string toString(uno::Reference< text::XTextRange > textRange) + if (textRange.get()) { - string result; - - if (textRange.get()) - { - rtl::OUString aOUStr = textRange->getString(); - rtl::OString aOStr(aOUStr.getStr(), aOUStr.getLength(), RTL_TEXTENCODING_ASCII_US ); - - result = aOStr.getStr(); - } - else - { - result="(nil)"; - } + rtl::OUString aOUStr = textRange->getString(); + rtl::OString aOStr(aOUStr.getStr(), aOUStr.getLength(), RTL_TEXTENCODING_ASCII_US ); - return result; + result = aOStr.getStr(); } - - string toString(const string & rString) + else { - return rString; + result="(nil)"; } + + return result; +} + +string toString(const string & rString) +{ + return rString; +} +#endif } -- cgit v1.2.3 From 2cc43864289c5f0d5e37425dd227c068a7a3d36b Mon Sep 17 00:00:00 2001 From: Henning Brinkmann Date: Wed, 28 Jul 2010 14:17:26 +0200 Subject: writerfilter08ooo330: applied patch for writerfilter08 --- package/source/zipapi/ZipFile.cxx | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index 2238cf870d02..f01b7ce06f4b 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -1051,11 +1051,7 @@ void ZipFile::getSizeAndCRC( sal_Int32 nOffset, sal_Int32 nCompressedSize, sal_I nRealSize += nInBlock; } - if( aInflaterLocal.finished() ) - { - *nSize = nRealSize; - *nCRC = aCRC.getValue(); - } - else - *nSize = *nCRC = 0; + *nSize = nRealSize; + *nCRC = aCRC.getValue(); } + -- cgit v1.2.3 From b1554766bf429bb1270e4aabb63f8cb91e819ebc Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Wed, 28 Jul 2010 15:40:32 +0200 Subject: cws tl83: warning-free code --- starmath/source/cfgitem.cxx | 1 - starmath/source/makefile.mk | 20 ++------------------ starmath/source/node.cxx | 6 +++--- 3 files changed, 5 insertions(+), 22 deletions(-) diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 8066b88fd80d..43c0fbe27dd0 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -42,7 +42,6 @@ using namespace com::sun::star; using namespace com::sun::star::uno; using namespace com::sun::star::beans; -#define A2OU(x) rtl::OUString::createFromAscii( x ) static const char* aRootName = "Office.Math"; diff --git a/starmath/source/makefile.mk b/starmath/source/makefile.mk index 596060397e18..a409e55d2462 100644 --- a/starmath/source/makefile.mk +++ b/starmath/source/makefile.mk @@ -36,6 +36,8 @@ LIBTARGET=NO # --- Settings ----------------------------------------------------- +ENABLE_EXCEPTIONS=TRUE + .INCLUDE : settings.mk # --- Files -------------------------------------------------------- @@ -84,24 +86,6 @@ SLOFILES = \ $(SLO1FILES) \ $(SLO2FILES) -EXCEPTIONSFILES = \ - $(SLO)$/register.obj \ - $(SLO)$/accessibility.obj \ - $(SLO)$/cfgitem.obj \ - $(SLO)$/dialog.obj \ - $(SLO)$/document.obj \ - $(SLO)$/node.obj \ - $(SLO)$/parse.obj \ - $(SLO)$/mathmlimport.obj \ - $(SLO)$/mathmlexport.obj \ - $(SLO)$/mathtype.obj \ - $(SLO)$/smdll.obj \ - $(SLO)$/view.obj \ - $(SLO)$/unomodel.obj \ - $(SLO)$/smdetect.obj \ - $(SLO)$/symbol.obj \ - $(SLO)$/unodoc.obj - LIB1TARGET = \ $(SLB)$/$(TARGET).lib diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 2747d994a7eb..b986a046b205 100755 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -2886,12 +2886,12 @@ void SmSpecialNode::Prepare(const SmFormat &rFormat, const SmDocShell &rDocShell bItalic = true; else if (nStyle == 2) { - String aText( GetText() ); - if (aText.Len() > 0) + String aTmp( GetText() ); + if (aTmp.Len() > 0) { const sal_Unicode cUppercaseAlpha = 0x0391; const sal_Unicode cUppercaseOmega = 0x03A9; - sal_Unicode cChar = aText.GetBuffer()[0]; + sal_Unicode cChar = aTmp.GetBuffer()[0]; // uppercase letters should be straight and lowercase letters italic bItalic = !(cUppercaseAlpha <= cChar && cChar <= cUppercaseOmega); } -- cgit v1.2.3 From f7a8aabd4244980ddfa9fad71bc1f2892e391420 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 28 Jul 2010 17:18:56 +0200 Subject: calc57: #i113432# restore fix for i94951: catch IndexOutOfBoundsException in ScXMLTableRowCellContext::DoMerge --- sc/source/filter/xml/xmlcelli.cxx | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 8e78f64b2090..ae5a7bcebe66 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -487,21 +487,31 @@ void ScXMLTableRowCellContext::DoMerge(const com::sun::star::table::CellAddress& uno::Reference xCellRange(rXMLImport.GetTables().GetCurrentXCellRange()); if ( xCellRange.is() ) { - table::CellRangeAddress aCellAddress; - if (IsMerged(xCellRange, aCellPos.Column, aCellPos.Row, aCellAddress)) + // Stored merge range may actually be of a larger extend than what + // we support, in which case getCellRangeByPosition() throws + // IndexOutOfBoundsException. Do nothing then. + try { - //unmerge + table::CellRangeAddress aCellAddress; + if (IsMerged(xCellRange, aCellPos.Column, aCellPos.Row, aCellAddress)) + { + //unmerge + uno::Reference xMergeable (xCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow, + aCellAddress.EndColumn, aCellAddress.EndRow), uno::UNO_QUERY); + if (xMergeable.is()) + xMergeable->merge(sal_False); + } + + //merge uno::Reference xMergeable (xCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow, - aCellAddress.EndColumn, aCellAddress.EndRow), uno::UNO_QUERY); + aCellAddress.EndColumn + nCols, aCellAddress.EndRow + nRows), uno::UNO_QUERY); if (xMergeable.is()) - xMergeable->merge(sal_False); + xMergeable->merge(sal_True); + } + catch ( lang::IndexOutOfBoundsException & ) + { + DBG_ERRORFILE("ScXMLTableRowCellContext::DoMerge: range to be merged larger than what we support"); } - - //merge - uno::Reference xMergeable (xCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow, - aCellAddress.EndColumn + nCols, aCellAddress.EndRow + nRows), uno::UNO_QUERY); - if (xMergeable.is()) - xMergeable->merge(sal_True); } } } -- cgit v1.2.3 From dcb62dab138731367c71614eeba3f3962cdf5325 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 28 Jul 2010 17:38:30 +0200 Subject: calc57: #i110370# don't accidentally throw away print settings stored in the file (patch from cloph) --- sc/source/ui/unoobj/confuno.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx index 75e415b8f018..a680185a1d1c 100644 --- a/sc/source/ui/unoobj/confuno.cxx +++ b/sc/source/ui/unoobj/confuno.cxx @@ -193,11 +193,14 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( if (pPrinter) { String aString(sPrinterName); - SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aString ); - if (pNewPrinter->IsKnown()) - pDocShell->SetPrinter( pNewPrinter, SFX_PRINTER_PRINTER ); - else - delete pNewPrinter; + if (pPrinter->GetName() != aString) + { + SfxPrinter* pNewPrinter = new SfxPrinter( pPrinter->GetOptions().Clone(), aString ); + if (pNewPrinter->IsKnown()) + pDocShell->SetPrinter( pNewPrinter, SFX_PRINTER_PRINTER ); + else + delete pNewPrinter; + } } else throw uno::RuntimeException(); -- cgit v1.2.3 From b6f0843e33328b7ddd50ed50dc1449fc1715dd20 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 28 Jul 2010 17:58:52 +0200 Subject: calc57: #i113390# handle filter options in ScExternalRefManager::loadSrcDocument --- sc/source/ui/docshell/externalrefmgr.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index 0569e95605b1..7fa31246275a 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -2024,7 +2024,7 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri if (!isFileLoadable(aFile)) return NULL; - String aOptions; + String aOptions( pFileData->maFilterOptions ); ScDocumentLoader::GetFilterName(aFile, rFilter, aOptions, true, false); const SfxFilter* pFilter = ScDocShell::Factory().GetFilterContainer()->GetFilter4FilterName(rFilter); @@ -2040,9 +2040,6 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri setRelativeFileName(nFileId, aStr); } - // Update the filter data now that we are loading it again. - setFilterData(nFileId, rFilter, aOptions); - SfxItemSet* pSet = new SfxAllItemSet(SFX_APP()->GetPool()); if (aOptions.Len()) pSet->Put(SfxStringItem(SID_FILE_FILTEROPTIONS, aOptions)); @@ -2077,6 +2074,13 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, Stri pExtOptNew->GetDocSettings().mnLinkCnt = nLinkCount + 1; pNewShell->DoLoad(pMedium.release()); + + // with UseInteractionHandler, options may be set by dialog during DoLoad + String aNew = ScDocumentLoader::GetOptions(*pNewShell->GetMedium()); + if (aNew.Len() && aNew != aOptions) + aOptions = aNew; + setFilterData(nFileId, rFilter, aOptions); // update the filter data, including the new options + return aRef; } -- cgit v1.2.3 From a18c6fe8f3f353d78f58563d8d39bf4c922712ac Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Thu, 29 Jul 2010 13:49:40 +0200 Subject: writerfilter08ooo300: #i112415# on reload the filter should not set document readonly --- sfx2/source/view/viewfrm.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index feced28efb11..ed924623c700 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -813,6 +813,13 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) xNewObj->SetModifyPasswordEntered( sal_False ); xNewObj->SetReadOnly(); } + else if ( rReq.GetSlot() == SID_EDITDOC && bForEdit && !xNewObj->IsReadOnlyMedium() ) + { + // the filter might request setting of the document to readonly state + // but in case of SID_EDITDOC it should not happen if the document + // can be opened for editing + xNewObj->SetReadOnlyUI( sal_False ); + } if ( xNewObj->IsDocShared() ) { -- cgit v1.2.3 From 705af29850ea12bd23783ec2a6937a2bb0c25f12 Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 29 Jul 2010 13:51:02 +0200 Subject: cws tl83: #i113276# auto-update for right context menu and 'Elements' window fixed --- starmath/source/dialog.cxx | 1 + starmath/source/edit.cxx | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 6067daa797dc..0dc58c8ed640 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1485,6 +1485,7 @@ IMPL_LINK( SmSymbolDialog, GetClickHdl, Button *, EMPTYARG pButton ) { XubString aText ('%'); aText += pSym->GetName(); + aText += (sal_Unicode)' '; rViewSh.GetViewFrame()->GetDispatcher()->Execute( SID_INSERTTEXT, SFX_CALLMODE_STANDARD, diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index fe849a36e358..020376c05dfb 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -251,10 +251,8 @@ IMPL_LINK( SmEditWindow, ModifyTimerHdl, Timer *, EMPTYARG /*pTimer*/ ) { SmModule *pp = SM_MOD(); if (pp->GetConfig()->IsAutoRedraw()) - { Flush(); - aModifyTimer.Stop(); - } + aModifyTimer.Stop(); return 0; } @@ -282,6 +280,7 @@ IMPL_LINK(SmEditWindow, CursorMoveTimerHdl, Timer *, EMPTYARG /*pTimer*/) aOldSelection = aNewSelection; } } + aCursorMoveTimer.Stop(); return 0; } @@ -438,7 +437,7 @@ void SmEditWindow::KeyInput(const KeyEvent& rKEvt) SmViewShell *pView = GetView(); if ( pView && !pView->KeyInput(rKEvt) ) { - /* fuert bei F1 (Hilfe) zum Zerstoeren von this! */ + /* fuert bei F1 (Hilfe) zum Zerstoeren von this! */ Flush(); if ( aModifyTimer.IsActive() ) aModifyTimer.Stop(); @@ -737,6 +736,9 @@ void SmEditWindow::InsertCommand(USHORT nCommand) pEditView->SetSelection(aSelection); } + aModifyTimer.Start(); + aCursorMoveTimer.Start(); + GrabFocus(); } } @@ -923,6 +925,7 @@ void SmEditWindow::InsertText(const String& Text) { pEditView->InsertText(Text); aModifyTimer.Start(); + aCursorMoveTimer.Start(); } } -- cgit v1.2.3 From ee7fa0323dc78d994a79f41dfc5d5f41bebdc5f7 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Thu, 29 Jul 2010 16:04:40 +0200 Subject: vgbugs10: #i162450# fix for regression --- solenv/bin/modules/SourceConfig.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/solenv/bin/modules/SourceConfig.pm b/solenv/bin/modules/SourceConfig.pm index c4b9cc01ec67..dfaa797d8f48 100644 --- a/solenv/bin/modules/SourceConfig.pm +++ b/solenv/bin/modules/SourceConfig.pm @@ -307,6 +307,9 @@ sub read_config_file { my $repository_source_path = $self->{SOURCE_ROOT} . "/$1"; if (defined $ENV{UPDMINOREXT}) { $repository_source_path .= $ENV{UPDMINOREXT}; + if (defined ${$self->{REPOSITORIES}}{$1.$ENV{UPDMINOREXT}}) { + delete ${$self->{REPOSITORIES}}{$1.$ENV{UPDMINOREXT}}; + }; }; ${$self->{REPOSITORIES}}{$1} = $repository_source_path; ${$self->{ACTIVATED_REPOSITORIES}}{$1}++; -- cgit v1.2.3 From 3af0508b1002b38c2a4e452a23fc9b88a9b953db Mon Sep 17 00:00:00 2001 From: "Eike Rathke [er]" Date: Thu, 29 Jul 2010 18:29:52 +0200 Subject: calc57: #i113429# adapt manual row/column breaks when inserting/deleting rows/columns and undo/redo --- sc/inc/table.hxx | 2 ++ sc/source/core/data/table2.cxx | 68 +++++++++++++++++++++++++++++++++++++++++- sc/source/core/data/table5.cxx | 16 ++++++++++ 3 files changed, 85 insertions(+), 1 deletion(-) diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 78e5875b6879..c797d6fa3d37 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -683,6 +683,8 @@ public: void UpdatePageBreaks( const ScRange* pUserArea ); void RemoveManualBreaks(); BOOL HasManualBreaks() const; + void SetRowManualBreaks( const ::std::set& rBreaks ); + void SetColManualBreaks( const ::std::set& rBreaks ); void GetAllRowBreaks(::std::set& rBreaks, bool bPage, bool bManual) const; void GetAllColBreaks(::std::set& rBreaks, bool bPage, bool bManual) const; diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 9bd5b031fde5..8b7277ff1b41 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -155,6 +155,22 @@ void ScTable::InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE mpFilteredRows->insertSegment(nStartRow, nSize, true); mpHiddenRows->insertSegment(nStartRow, nSize, true); + + if (!maRowManualBreaks.empty()) + { + std::set::reverse_iterator rit = maRowManualBreaks.rbegin(); + while (rit != maRowManualBreaks.rend()) + { + SCROW nRow = *rit; + if (nRow < nStartRow) + break; // while + else + { + maRowManualBreaks.erase( (++rit).base()); + maRowManualBreaks.insert( nRow + nSize); + } + } + } } for (SCCOL j=nStartCol; j<=nEndCol; j++) @@ -185,6 +201,18 @@ void ScTable::DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE mpFilteredRows->removeSegment(nStartRow, nStartRow+nSize); mpHiddenRows->removeSegment(nStartRow, nStartRow+nSize); + + if (!maRowManualBreaks.empty()) + { + std::set::iterator it = maRowManualBreaks.upper_bound( nStartRow + nSize - 1); + maRowManualBreaks.erase( maRowManualBreaks.lower_bound( nStartRow), it); + while (it != maRowManualBreaks.end()) + { + SCROW nRow = *it; + maRowManualBreaks.erase( it++); + maRowManualBreaks.insert( nRow - nSize); + } + } } { // scope for bulk broadcast @@ -233,6 +261,22 @@ void ScTable::InsertCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE mpHiddenCols->insertSegment(nStartCol, static_cast(nSize), true); mpFilteredCols->insertSegment(nStartCol, static_cast(nSize), true); + + if (!maColManualBreaks.empty()) + { + std::set::reverse_iterator rit = maColManualBreaks.rbegin(); + while (rit != maColManualBreaks.rend()) + { + SCCOL nCol = *rit; + if (nCol < nStartCol) + break; // while + else + { + maColManualBreaks.erase( (++rit).base()); + maColManualBreaks.insert( nCol + nSize); + } + } + } } @@ -291,6 +335,18 @@ void ScTable::DeleteCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE SCCOL nRmSize = nStartCol + static_cast(nSize); mpHiddenCols->removeSegment(nStartCol, nRmSize); mpFilteredCols->removeSegment(nStartCol, nRmSize); + + if (!maColManualBreaks.empty()) + { + std::set::iterator it = maColManualBreaks.upper_bound( nStartCol + nSize - 1); + maColManualBreaks.erase( maColManualBreaks.lower_bound( nStartCol), it); + while (it != maColManualBreaks.end()) + { + SCCOL nCol = *it; + maColManualBreaks.erase( it++); + maColManualBreaks.insert( nCol - nSize); + } + } } @@ -688,6 +744,7 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, pDestTab->IncRecalcLevel(); if (bWidth) + { for (SCCOL i=nCol1; i<=nCol2; i++) { bool bThisHidden = ColHidden(i); @@ -703,6 +760,8 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, if (bChange) bFlagChange = true; } + pDestTab->SetColManualBreaks( maColManualBreaks); + } if (bHeight) { @@ -754,6 +813,7 @@ void ScTable::CopyToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, pDestTab->SetRowFiltered(i, nLastRow, bFiltered); i = nLastRow; } + pDestTab->SetRowManualBreaks( maRowManualBreaks); } pDestTab->DecRecalcLevel(); } @@ -791,11 +851,17 @@ void ScTable::UndoToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, if (bWidth||bHeight) { if (bWidth) + { for (SCCOL i=nCol1; i<=nCol2; i++) pDestTab->pColWidth[i] = pColWidth[i]; + pDestTab->SetColManualBreaks( maColManualBreaks); + } if (bHeight) + { pDestTab->CopyRowHeight(*this, nRow1, nRow2, 0); - DecRecalcLevel(); + pDestTab->SetRowManualBreaks( maRowManualBreaks); + } + DecRecalcLevel(); } } } diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx index 2635b5821e4f..3916ab6ab559 100644 --- a/sc/source/core/data/table5.cxx +++ b/sc/source/core/data/table5.cxx @@ -326,6 +326,22 @@ BOOL ScTable::HasManualBreaks() const return !maRowManualBreaks.empty() || !maColManualBreaks.empty(); } +void ScTable::SetRowManualBreaks( const ::std::set& rBreaks ) +{ + maRowManualBreaks = rBreaks; + InvalidatePageBreaks(); + if (IsStreamValid()) + SetStreamValid(FALSE); +} + +void ScTable::SetColManualBreaks( const ::std::set& rBreaks ) +{ + maColManualBreaks = rBreaks; + InvalidatePageBreaks(); + if (IsStreamValid()) + SetStreamValid(FALSE); +} + void ScTable::GetAllRowBreaks(set& rBreaks, bool bPage, bool bManual) const { if (bPage) -- cgit v1.2.3 From d505716fb2df2fcadd050f9e90e27327931a375a Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Fri, 30 Jul 2010 13:42:03 +0200 Subject: l10nfixer01: back out of last changeset --- sfx2/source/dialog/securitypage.src | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sfx2/source/dialog/securitypage.src b/sfx2/source/dialog/securitypage.src index ee334234c802..fee60404d01c 100755 --- a/sfx2/source/dialog/securitypage.src +++ b/sfx2/source/dialog/securitypage.src @@ -79,9 +79,9 @@ TabPage TP_DOCINFOSECURITY Pos = MAP_APPFONT( 12, 48 ); Size = MAP_APPFONT( 236, 3 * RSC_CD_FIXEDTEXT_HEIGHT ); Text [ en-US ] = - "Note: After a password has been set, the document will only open " - "with the password. Should you lose the password, there will be " - "no way to recover the document. Please also note that this password " + "Note: After a password has been set, the document will only open "\ + "with the password. Should you lose the password, there will be "\ + "no way to recover the document. Please also note that this password "\ "is case-sensitive."; WordBreak = TRUE; }; -- cgit v1.2.3 From 3262dedec5adc4c5ed1ef6c864811d4f6b6c5f19 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 30 Jul 2010 13:44:58 +0200 Subject: ooo33gsl04: #i113479# handle collation correctly on printers supporting only a copycount of 1 --- vcl/source/gdi/print3.cxx | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) mode change 100644 => 100755 vcl/source/gdi/print3.cxx diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx old mode 100644 new mode 100755 index 191f8f26dc75..0aeb928856fc --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -594,12 +594,20 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptrjobStarted(); int nJobs = 1; - int nRepeatCount = bUserCopy ? mnCopyCount : 1; + int nOuterRepeatCount = 1; + int nInnerRepeatCount = 1; + if( bUserCopy ) + { + if( mbCollateCopy ) + nOuterRepeatCount = mnCopyCount; + else + nInnerRepeatCount = mnCopyCount; + } if( bSinglePrintJobs ) { nJobs = mnCopyCount; nCopies = 1; - nRepeatCount = 1; + nOuterRepeatCount = nInnerRepeatCount = 1; } for( int nJobIteration = 0; nJobIteration < nJobs; nJobIteration++ ) @@ -616,13 +624,21 @@ bool Printer::StartJob( const rtl::OUString& i_rJobName, boost::shared_ptrcreateProgressDialog(); int nPages = i_pController->getFilteredPageCount(); - for( int nIteration = 0; nIteration < nRepeatCount; nIteration++ ) + for( int nOuterIteration = 0; nOuterIteration < nOuterRepeatCount; nOuterIteration++ ) { for( int nPage = 0; nPage < nPages; nPage++ ) { - if( nPage == nPages-1 && nIteration == nRepeatCount-1 && nJobIteration == nJobs-1 ) - i_pController->setLastPage( sal_True ); - i_pController->printFilteredPage( nPage ); + for( int nInnerIteration = 0; nInnerIteration < nInnerRepeatCount; nInnerIteration++ ) + { + if( nPage == nPages-1 && + nOuterIteration == nOuterRepeatCount-1 && + nInnerIteration == nInnerRepeatCount-1 && + nJobIteration == nJobs-1 ) + { + i_pController->setLastPage( sal_True ); + } + i_pController->printFilteredPage( nPage ); + } } // FIXME: duplex ? } -- cgit v1.2.3 From 9508308e2a25be243ec8e65147b0b407f3dbe846 Mon Sep 17 00:00:00 2001 From: "Philipp Lohmann [pl]" Date: Fri, 30 Jul 2010 14:47:09 +0200 Subject: ooo33gsl04: #i113479# fix collate handling with not native dialog --- vcl/aqua/source/gdi/salprn.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx index 1c0401f769b5..ff4edcbf83f9 100644 --- a/vcl/aqua/source/gdi/salprn.cxx +++ b/vcl/aqua/source/gdi/salprn.cxx @@ -445,7 +445,7 @@ ULONG AquaSalInfoPrinter::GetCapabilities( const ImplJobSetup* i_pSetupData, USH case PRINTER_CAPABILITIES_COPIES: return 0xffff; case PRINTER_CAPABILITIES_COLLATECOPIES: - return 0; + return 0xffff; case PRINTER_CAPABILITIES_SETORIENTATION: return 1; case PRINTER_CAPABILITIES_SETDUPLEX: @@ -634,6 +634,8 @@ BOOL AquaSalInfoPrinter::StartJob( const String* i_pFileName, } [pPrintDict setObject: [[NSNumber numberWithInt: nCopies] autorelease] forKey: NSPrintCopies]; + if( nCopies > 1 ) + [pPrintDict setObject: [[NSNumber numberWithBool: pPrinter->IsCollateCopy()] autorelease] forKey: NSPrintMustCollate]; [pPrintDict setObject: [[NSNumber numberWithBool: YES] autorelease] forKey: NSPrintDetailedErrorReporting]; [pPrintDict setObject: [[NSNumber numberWithInt: 1] autorelease] forKey: NSPrintFirstPage]; // #i103253# weird: for some reason, autoreleasing the value below like the others above -- cgit v1.2.3 From 09bef4bf9ec8b77c55f4fa8ace4650bf1bfcd017 Mon Sep 17 00:00:00 2001 From: "Eike Rathke [er]" Date: Fri, 30 Jul 2010 21:31:39 +0200 Subject: calc57: #i113485# Uyghur is CTL --- i18npool/source/isolang/mslangid.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/i18npool/source/isolang/mslangid.cxx b/i18npool/source/isolang/mslangid.cxx index da9da0ff8646..a03d24e6fcdb 100644 --- a/i18npool/source/isolang/mslangid.cxx +++ b/i18npool/source/isolang/mslangid.cxx @@ -373,6 +373,7 @@ sal_Int16 MsLangId::getScriptType( LanguageType nLang ) case LANGUAGE_USER_BODO_INDIA: case LANGUAGE_USER_DOGRI_INDIA: case LANGUAGE_USER_MAITHILI_INDIA: + case LANGUAGE_UIGHUR_CHINA: nScript = ::com::sun::star::i18n::ScriptType::COMPLEX; break; -- cgit v1.2.3 From 994b8b72cd0b9361f03e4a33d3e4d1ebcb82f9cb Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Mon, 2 Aug 2010 17:20:44 +0200 Subject: calc57: wntmsci12 compiler warnings --- sc/source/core/data/table2.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 8b7277ff1b41..4a92e9735279 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -167,7 +167,7 @@ void ScTable::InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE else { maRowManualBreaks.erase( (++rit).base()); - maRowManualBreaks.insert( nRow + nSize); + maRowManualBreaks.insert( static_cast( nRow + nSize)); } } } @@ -204,13 +204,13 @@ void ScTable::DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE if (!maRowManualBreaks.empty()) { - std::set::iterator it = maRowManualBreaks.upper_bound( nStartRow + nSize - 1); + std::set::iterator it = maRowManualBreaks.upper_bound( static_cast( nStartRow + nSize - 1)); maRowManualBreaks.erase( maRowManualBreaks.lower_bound( nStartRow), it); while (it != maRowManualBreaks.end()) { SCROW nRow = *it; maRowManualBreaks.erase( it++); - maRowManualBreaks.insert( nRow - nSize); + maRowManualBreaks.insert( static_cast( nRow - nSize)); } } } @@ -273,7 +273,7 @@ void ScTable::InsertCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE else { maColManualBreaks.erase( (++rit).base()); - maColManualBreaks.insert( nCol + nSize); + maColManualBreaks.insert( static_cast( nCol + nSize)); } } } @@ -338,13 +338,13 @@ void ScTable::DeleteCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE if (!maColManualBreaks.empty()) { - std::set::iterator it = maColManualBreaks.upper_bound( nStartCol + nSize - 1); + std::set::iterator it = maColManualBreaks.upper_bound( static_cast( nStartCol + nSize - 1)); maColManualBreaks.erase( maColManualBreaks.lower_bound( nStartCol), it); while (it != maColManualBreaks.end()) { SCCOL nCol = *it; maColManualBreaks.erase( it++); - maColManualBreaks.insert( nCol - nSize); + maColManualBreaks.insert( static_cast( nCol - nSize)); } } } -- cgit v1.2.3 From 80547560b9221936e1f41dc9ffcf3edb07c929c3 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Mon, 2 Aug 2010 17:21:23 +0200 Subject: calc57: #i113442# increase width of 'Import Options' dialog --- sc/source/ui/dbgui/textimportoptions.src | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/sc/source/ui/dbgui/textimportoptions.src b/sc/source/ui/dbgui/textimportoptions.src index fff3c4b40749..69e2d69b3142 100644 --- a/sc/source/ui/dbgui/textimportoptions.src +++ b/sc/source/ui/dbgui/textimportoptions.src @@ -33,34 +33,34 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS { Text [ en-US ] = "Import Options" ; - Size = MAP_APPFONT ( 190 , 101 ) ; + Size = MAP_APPFONT ( 230 , 101 ) ; Moveable = TRUE ; Closeable = TRUE ; OutputSize = TRUE ; OKButton BTN_OK { - Pos = MAP_APPFONT ( 135, 6 ) ; + Pos = MAP_APPFONT ( 175, 6 ) ; Size = MAP_APPFONT ( 50, 14 ) ; DefButton = TRUE ; }; CancelButton BTN_CANCEL { - Pos = MAP_APPFONT ( 135, 23 ) ; + Pos = MAP_APPFONT ( 175, 23 ) ; Size = MAP_APPFONT ( 50, 14 ) ; }; HelpButton BTN_HELP { - Pos = MAP_APPFONT ( 135, 43 ) ; + Pos = MAP_APPFONT ( 175, 43 ) ; Size = MAP_APPFONT ( 50, 14 ) ; }; FixedLine FL_CHOOSE_LANG { Pos = MAP_APPFONT( 6, 3 ) ; - Size = MAP_APPFONT( 125, 14 ) ; + Size = MAP_APPFONT( 165, 14 ) ; Text [ en-US ] = "Select the language to use for import" ; }; @@ -68,7 +68,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS RadioButton RB_AUTOMATIC { Pos = MAP_APPFONT( 12, 20 ) ; - Size = MAP_APPFONT( 50, 10 ) ; + Size = MAP_APPFONT( 159, 10 ) ; TabStop = TRUE ; Text [ en-US ] = "Automatic" ; @@ -77,7 +77,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS RadioButton RB_CUSTOM { Pos = MAP_APPFONT( 12, 34 ) ; - Size = MAP_APPFONT( 50, 10 ) ; + Size = MAP_APPFONT( 159, 10 ) ; TabStop = TRUE ; Text [ en-US ] = "Custom" ; @@ -86,7 +86,7 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS ListBox LB_CUSTOM_LANG { Pos = MAP_APPFONT( 20, 50 ) ; - Size = MAP_APPFONT( 100, 55 ) ; + Size = MAP_APPFONT( 140, 120 ) ; TabStop = TRUE ; DropDown = TRUE ; Sort = TRUE ; @@ -94,19 +94,17 @@ ModalDialog RID_SCDLG_TEXT_IMPORT_OPTIONS FixedLine FL_OPTION { - Pos = MAP_APPFONT( 6, 70 ); - Size = MAP_APPFONT( 125, 14 ); - - Text [ en-US ] = "Options" ; + Pos = MAP_APPFONT( 6, 70 ); + Size = MAP_APPFONT( 165, 14 ); + Text [ en-US ] = "Options" ; }; CheckBox BTN_CONVERT_DATE { Pos = MAP_APPFONT( 12, 86 ); - Size = MAP_APPFONT( 125, 10 ); - TabStop = TRUE ; - - Text [ en-US ] = "Detect special numbers (such as dates)." ; + Size = MAP_APPFONT( 159, 10 ); + TabStop = TRUE ; + Text [ en-US ] = "Detect special numbers (such as dates)." ; }; }; -- cgit v1.2.3 From 1d0220bd674b04559dd7f76f4187fabb90c09d85 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Mon, 2 Aug 2010 17:38:06 +0200 Subject: calc57: #i113446# reduce indentation of child elements to make the words fit into the available space --- vcl/source/window/printdlg.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 52f54db0e50e..d0fae33acf3b 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -498,8 +498,10 @@ void PrintDialog::NUpTabPage::showAdvancedControls( bool i_bShow ) void PrintDialog::NUpTabPage::setupLayout() { - Size aBorder( LogicToPixel( Size( 5, 5 ), MapMode( MAP_APPFONT ) ) ); - long nIndent = 3*aBorder.Width(); + Size aBorder( LogicToPixel( Size( 6, 6 ), MapMode( MAP_APPFONT ) ) ); + /* According to OOo style guide, the horizontal indentation of child + elements to their parent element should always be 6 map units. */ + long nIndent = aBorder.Width(); maLayout.setParentWindow( this ); maLayout.setOuterBorder( aBorder.Width() ); -- cgit v1.2.3 From 66f50b2d32ec65268bb7d52c51a4d2a01ad1c094 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Mon, 2 Aug 2010 17:57:44 +0200 Subject: calc57: #i113469# increase width of DataPilot field popup --- sc/source/ui/cctrl/dpcontrol.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx index 6e7cfed9d95c..9a3a5f4219ec 100644 --- a/sc/source/ui/cctrl/dpcontrol.cxx +++ b/sc/source/ui/cctrl/dpcontrol.cxx @@ -959,7 +959,7 @@ ScDPFieldPopupWindow::ScDPFieldPopupWindow(Window* pParent, ScDocument* pDoc) : mnCurTabStop(0), mpExtendedData(NULL), mpOKAction(NULL), - maWndSize(160, 330), + maWndSize(240, 330), mePrevToggleAllState(STATE_DONTKNOW) { maTabStopCtrls.reserve(7); @@ -1032,7 +1032,7 @@ void ScDPFieldPopupWindow::getSectionPosSize(Point& rPos, Size& rSize, SectionTy const sal_uInt16 nMenuHeight = 60; const sal_uInt16 nSingleItemBtnAreaHeight = 32; // height of the middle area below the list box where the single-action buttons are. const sal_uInt16 nBottomBtnAreaHeight = 50; // height of the bottom area where the OK and Cancel buttons are. - const sal_uInt16 nBtnWidth = 60; + const sal_uInt16 nBtnWidth = 90; const sal_uInt16 nLabelHeight = static_cast< sal_uInt16 >( getLabelFont().GetHeight() ); const sal_uInt16 nBtnHeight = nLabelHeight*2; const sal_uInt16 nBottomMargin = 10; @@ -1089,7 +1089,7 @@ void ScDPFieldPopupWindow::getSectionPosSize(Point& rPos, Size& rSize, SectionTy { long h = 26; rPos = Point(nListBoxMargin, nSingleBtnAreaY); - rPos.X() += 75; + rPos.X() += 150; rPos.Y() += (nSingleItemBtnAreaHeight - h)/2; rSize = Size(h, h); } @@ -1098,7 +1098,7 @@ void ScDPFieldPopupWindow::getSectionPosSize(Point& rPos, Size& rSize, SectionTy { long h = 26; rPos = Point(nListBoxMargin, nSingleBtnAreaY); - rPos.X() += 75 + h + 10; + rPos.X() += 150 + h + 10; rPos.Y() += (nSingleItemBtnAreaHeight - h)/2; rSize = Size(h, h); } -- cgit v1.2.3 From 2c9ce1518a8a096bf0cb0836e83fa521379a5e22 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Thu, 5 Aug 2010 13:54:47 +0200 Subject: calc57: #i113529# expand text fields to allow to fit for all languages --- sc/source/ui/src/optdlg.src | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src index ea7cabf7716d..1a8f36af6ccf 100644 --- a/sc/source/ui/src/optdlg.src +++ b/sc/source/ui/src/optdlg.src @@ -147,18 +147,18 @@ TabPage RID_SCPAGE_CALC { Pos = MAP_APPFONT ( 12 , 133 ) ; Size = MAP_APPFONT ( 239 , 10 ) ; - Text [ en-US ] = "~Automatically find column and row labels " ; + Text [ en-US ] = "~Automatically find column and row labels" ; }; CheckBox BTN_GENERAL_PREC { Pos = MAP_APPFONT ( 12 , 147 ) ; - Size = MAP_APPFONT ( 136 , 10 ) ; - Text [ en-US ] = "Limit decimals for general number format" ; + Size = MAP_APPFONT ( 148 , 10 ) ; + Text [ en-US ] = "~Limit decimals for general number format" ; }; FixedText FT_PREC { - Pos = MAP_APPFONT ( 150 , 148 ) ; - Size = MAP_APPFONT ( 72 , 8 ) ; + Pos = MAP_APPFONT ( 138 , 148 ) ; + Size = MAP_APPFONT ( 84 , 8 ) ; Text [ en-US ] = "~Decimal places" ; Right = TRUE ; }; -- cgit v1.2.3 From 86b36edc50929b3d42c63d3f78bf8812282cd7c2 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Thu, 5 Aug 2010 15:07:51 +0200 Subject: calc57: #i113529# do not touch res strings in ooo330 --- sc/source/ui/src/optdlg.src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src index 1a8f36af6ccf..4c64e312bc2d 100644 --- a/sc/source/ui/src/optdlg.src +++ b/sc/source/ui/src/optdlg.src @@ -147,13 +147,13 @@ TabPage RID_SCPAGE_CALC { Pos = MAP_APPFONT ( 12 , 133 ) ; Size = MAP_APPFONT ( 239 , 10 ) ; - Text [ en-US ] = "~Automatically find column and row labels" ; + Text [ en-US ] = "~Automatically find column and row labels " ; }; CheckBox BTN_GENERAL_PREC { Pos = MAP_APPFONT ( 12 , 147 ) ; Size = MAP_APPFONT ( 148 , 10 ) ; - Text [ en-US ] = "~Limit decimals for general number format" ; + Text [ en-US ] = "Limit decimals for general number format" ; }; FixedText FT_PREC { -- cgit v1.2.3 From 52315eb71aeb56d0f633581f8d8b170311bceced Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Wed, 11 Aug 2010 14:52:58 +0200 Subject: OOO330 --- solenv/inc/minor.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/solenv/inc/minor.mk b/solenv/inc/minor.mk index a4d473a07001..f2458486a3b1 100644 --- a/solenv/inc/minor.mk +++ b/solenv/inc/minor.mk @@ -1,5 +1,5 @@ RSCVERSION=330 -RSCREVISION=330m3(Build:9519) -BUILD=9519 -LAST_MINOR=m3 +RSCREVISION=330m4(Build:9520) +BUILD=9520 +LAST_MINOR=m4 SOURCEVERSION=OOO330 -- cgit v1.2.3 From ce36f29b1f93dc4cd000289b7e23c47be65147b2 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Wed, 11 Aug 2010 15:25:13 +0200 Subject: masterfix: #i10000# switch back packing --- instsetoo_native/util/pack.lst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/instsetoo_native/util/pack.lst b/instsetoo_native/util/pack.lst index fc835cfcca76..c19039118909 100755 --- a/instsetoo_native/util/pack.lst +++ b/instsetoo_native/util/pack.lst @@ -9,16 +9,16 @@ OpenOffice unxlngi6.pro,unxmacxi.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro en-US openoffice OpenOffice unxlngi6,unxmacxi,unxsoli4,unxsols4,wntmsci12 en-US openoffice -BrOffice pt-BR broffice +#BrOffice pt-BR broffice #OpenOffice_wJRE unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,wntmsci12 en-US openofficewithjre #BrOffice_wJRE pt-BR brofficewithjre OpenOffice_Dev unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxmacxi.pro,unxlngx6.pro en-US openofficedev #BrOffice_Dev pt-BR brofficedev -OpenOffice_SDK unxlngi6.pro,unxmacxi.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro en-US sdkoo -OpenOffice_Dev_SDK unxlngi6.pro,unxmacxi.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro en-US sdkoodev +#OpenOffice_SDK unxlngi6.pro,unxmacxi.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro,unxlngi6,unxmacxi,unxsoli4,unxsols4,wntmsci12 en-US sdkoo +OpenOffice_Dev_SDK unxlngi6.pro,unxmacxi.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro,unxlngi6,unxmacxi,unxsoli4,unxsols4,wntmsci12 en-US sdkoodev #URE unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngi6,unxsoli4,unxsols4,wntmsci12 en-US ure -OpenOfficeLanguagepack unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro,unxmacxi.pro de|ja ooolanguagepack -#OpenOfficeLanguagepack unxlngi6,unxsoli4,unxsols4,wntmsci12,unxmacxi de ooolanguagepack -OpenOfficeDevLanguagepack unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro,unxmacxi.pro ar|as|ast|bg|bn|ca|ca-XV|cs|da|de|dz|el|en-GB|es|et|eu|fi|fr|ga|gl|gu|he|hi|hu|id|is|it|ja|km|kn|ko|lt|lv|mk|ml|mr|my|nb|nl|nn|oc|om|or|pa-IN|pl|pt|pt-BR|ru|sh|si|sk|sl|sr|sv|ta|te|th|tr|ug|uk|vi|zh-CN|zh-TW ooodevlanguagepack +OpenOfficeLanguagepack unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro,unxmacxi.pro de ooolanguagepack +OpenOfficeLanguagepack unxlngi6,unxsoli4,unxsols4,wntmsci12,unxmacxi de ooolanguagepack +OpenOfficeDevLanguagepack unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro,unxmacxi.pro de|fr|ja|ar|ru ooodevlanguagepack #BrOfficeLanguagepack unxlngi6.pro,unxsoli4.pro,unxsols4.pro,wntmsci12.pro,unxlngx6.pro pt-BR broolanguagepack -- cgit v1.2.3