From 2b4ae281f57a364581dbfa71d91de7377529dcae Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 16 Nov 2009 11:40:47 -0500 Subject: #i26826# #i46511# initial implementation of automatic decimal adjustment. Just applied patches from ooo-build. There still may be issues that need to be worked out. --- officecfg/registry/schema/org/openoffice/Office/Calc.xcs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs index 1ab6b58b4d13..ee24f8ff09b3 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs @@ -1118,7 +1118,7 @@ Specifies the number of decimals to be displayed for the Standard number format. - 2 + -1 -- cgit From c0ca967646933abbe6603810e52140a26f6caa2a Mon Sep 17 00:00:00 2001 From: Uwe Fischer Date: Fri, 20 Nov 2009 16:11:07 +0100 Subject: hcshared25: #i107086# removed one autocorr trigger ID --- .../registry/data/org/openoffice/Office/SFX.xcu | 42 +++++++++++----------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/Office/SFX.xcu b/officecfg/registry/data/org/openoffice/Office/SFX.xcu index 52b322c750a3..0c3027993498 100644 --- a/officecfg/registry/data/org/openoffice/Office/SFX.xcu +++ b/officecfg/registry/data/org/openoffice/Office/SFX.xcu @@ -33,27 +33,27 @@ - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 - 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34119,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 + 956368385,956368385,26220,26235,2567291937,2567291938,26272,26273,26063,957028378,26153,26312,958170133,958186547,958202951,26320,26321,956419588,956433419,26323,26324,20309,20308,20226,10371,27015,10087,10156,10350,27002,700810288,700810324,700730881,703778354,700777567,701124116,701124158,541248011,541249030,541249032,700763681,34023,957235721,3388501505,3388501506,3388501507,3388501508,3388501509,3388501510,10416,10297,5573,5573,5573,34099,34100,34101,34102,34104,34106,34107,34108,34109,34110,34112,34114,34115,34116,34117,34118,34120,33368,10296,54946 -- cgit From 0eb1dc13a52d83ea03a7731876172485c6aa2671 Mon Sep 17 00:00:00 2001 From: Oliver-Rainer Wittmann Date: Fri, 19 Feb 2010 14:17:41 +0100 Subject: sw33bf03: #i108851# reintroduction of by accident removed parts of fix for issue i59051 --- svx/source/unodraw/unoshape.cxx | 81 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index bd1d71d36612..ca7ee8fa84fd 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -606,6 +606,37 @@ void SvxShape::ForceMetricToItemPoolMetric(Pair& rPoint) const throw() } } +//---------------------------------------------------------------------- +// --> OD 2010-02-19 #i108851# - reintroduction of fix for issue i59051 +void SvxShape::ForceMetricToItemPoolMetric(basegfx::B2DPolyPolygon& rPolyPolygon) const throw() +{ + DBG_TESTSOLARMUTEX(); + if(mpModel) + { + SfxMapUnit eMapUnit = mpModel->GetItemPool().GetMetric(0); + if(eMapUnit != SFX_MAPUNIT_100TH_MM) + { + switch(eMapUnit) + { + case SFX_MAPUNIT_TWIP : + { + basegfx::B2DHomMatrix aTransform; + const double fMMToTWIPS(72.0 / 127.0); + + aTransform.scale(fMMToTWIPS, fMMToTWIPS); + rPolyPolygon.transform(aTransform); + break; + } + default: + { + DBG_ERROR("Missing unit translation to PoolMetric!"); + } + } + } + } +} +// <-- + //---------------------------------------------------------------------- void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw() { @@ -633,6 +664,37 @@ void SvxShape::ForceMetricTo100th_mm(Pair& rPoint) const throw() } } +//---------------------------------------------------------------------- +// --> OD 2010-02-19 #i108851# - reintroduction of fix for issue i59051 +void SvxShape::ForceMetricTo100th_mm(basegfx::B2DPolyPolygon& rPolyPolygon) const throw() +{ + DBG_TESTSOLARMUTEX(); + SfxMapUnit eMapUnit = SFX_MAPUNIT_100TH_MM; + if(mpModel) + { + eMapUnit = mpModel->GetItemPool().GetMetric(0); + if(eMapUnit != SFX_MAPUNIT_100TH_MM) + { + switch(eMapUnit) + { + case SFX_MAPUNIT_TWIP : + { + basegfx::B2DHomMatrix aTransform; + const double fTWIPSToMM(127.0 / 72.0); + + aTransform.scale(fTWIPSToMM, fTWIPSToMM); + rPolyPolygon.transform(aTransform); + break; + } + default: + { + DBG_ERROR("Missing unit translation to 100th mm!"); + } + } + } + } +} +// <-- //---------------------------------------------------------------------- void SvxShape::ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet) { @@ -2489,10 +2551,15 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper if( rValue >>= aUnoPoint ) { Point aPoint( aUnoPoint.X, aUnoPoint.Y ); + + // --> OD 2010-02-19 #i108851# - reintroduction of fix for issue i59051 + // perform metric change before applying anchor position, + // because the anchor position is in pool metric. + ForceMetricToItemPoolMetric( aPoint ); + // <-- if( mpModel->IsWriter() ) aPoint += mpObj->GetAnchorPos(); - ForceMetricToItemPoolMetric( aPoint ); pEdgeObj->SetTailPoint( pProperty->nWID == OWN_ATTR_EDGE_START_POS, aPoint ); return true; } @@ -2516,6 +2583,9 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper if ( rValue >>= aPolyPoly ) { basegfx::B2DPolyPolygon aNewPolyPolygon( SvxConvertPolyPolygonBezierToB2DPolyPolygon( &aPolyPoly ) ); + // --> OD 2010-02-19 #i108851# - reintroduction of fix for issue i59051 + ForceMetricToItemPoolMetric( aNewPolyPolygon ); + // <-- if( mpModel->IsWriter() ) { Point aPoint( mpObj->GetAnchorPos() ); @@ -2538,6 +2608,9 @@ bool SvxShape::setPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper { Point aPoint( aUnoPoint.X, aUnoPoint.Y ); + // --> OD 2010-02-19 #i108851# - reintroduction of fix for issue i59051 + ForceMetricToItemPoolMetric( aPoint ); + // <-- if( mpModel->IsWriter() ) aPoint += mpObj->GetAnchorPos(); @@ -2954,6 +3027,9 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper Point aPoint( mpObj->GetAnchorPos() ); aPolyPoly.transform(basegfx::tools::createTranslateB2DHomMatrix(-aPoint.X(), -aPoint.Y())); } + // --> OD 2010-02-19 #i108851# - reintroduction of fix for issue 59051 + ForceMetricTo100th_mm( aPolyPoly ); + // <-- drawing::PolyPolygonBezierCoords aRetval; SvxConvertB2DPolyPolygonToPolyPolygonBezier( aPolyPoly, aRetval); rValue <<= aRetval; @@ -2974,6 +3050,9 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper if( mpModel->IsWriter() ) aPoint -= mpObj->GetAnchorPos(); + // --> OD 2010-02-19 #i108851# - reintroduction of fix for issue 59051 + ForceMetricTo100th_mm( aPoint ); + // <-- awt::Point aUnoPoint( aPoint.X(), aPoint.Y() ); rValue <<= aUnoPoint; -- cgit From da0a3a0e7f71bc56a6e4e49b4d0645de6903739c Mon Sep 17 00:00:00 2001 From: npower Developer Date: Tue, 2 Mar 2010 12:39:31 +0000 Subject: npower13_objectmodule: #i109734# object module stuff --- basic/inc/basic/sbmod.hxx | 12 +- basic/inc/basic/sbstar.hxx | 5 + basic/source/basmgr/basmgr.cxx | 40 ++- basic/source/classes/eventatt.cxx | 108 +++++-- basic/source/classes/sb.cxx | 42 ++- basic/source/classes/sbxmod.cxx | 422 ++++++++++++++++++++++++++- basic/source/comp/codegen.cxx | 10 +- basic/source/comp/parser.cxx | 12 +- basic/source/inc/codegen.hxx | 1 + basic/source/inc/image.hxx | 1 - basic/source/inc/namecont.hxx | 9 +- basic/source/inc/runtime.hxx | 2 +- basic/source/inc/scriptcont.hxx | 17 ++ basic/source/runtime/methods.cxx | 18 +- basic/source/runtime/methods1.cxx | 8 +- basic/source/runtime/runtime.cxx | 27 +- basic/source/uno/namecont.cxx | 25 +- basic/source/uno/scriptcont.cxx | 39 +++ oovbaapi/ooo/vba/excel/XWorksheet.idl | 5 +- vbahelper/source/vbahelper/vbaglobalbase.cxx | 7 +- 20 files changed, 745 insertions(+), 65 deletions(-) diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx index d73c9780b1bb..81548198726b 100644 --- a/basic/inc/basic/sbmod.hxx +++ b/basic/inc/basic/sbmod.hxx @@ -34,6 +34,7 @@ #ifndef _RTL_USTRING_HXX #include #endif +#include class SbMethod; class SbProperty; @@ -63,6 +64,10 @@ protected: SbiImage* pImage; // the Image SbiBreakpoints* pBreaks; // Breakpoints SbClassData* pClassData; + bool mbVBACompat; + INT32 mnType; + SbxObjectRef pDocObject; // an impl object ( used by Document Modules ) + bool bIsProxyModule; void StartDefinitions(); SbMethod* GetMethod( const String&, SbxDataType ); @@ -87,7 +92,7 @@ protected: public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMOD,2); TYPEINFO(); - SbModule( const String& ); + SbModule( const String&, bool bCompat = false ); virtual void SetParent( SbxObject* ); virtual void Clear(); @@ -123,6 +128,11 @@ public: BOOL LoadBinaryData( SvStream& ); BOOL ExceedsLegacyModuleSize(); void fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg = NULL ) const; + bool IsVBACompat(); + void SetVBACompat( bool bCompat ); + INT32 GetModuleType() { return mnType; } + void SetModuleType( INT32 nType ) { mnType = nType; } + bool GetIsProxyModule() { return bIsProxyModule; } }; #ifndef __SB_SBMODULEREF_HXX diff --git a/basic/inc/basic/sbstar.hxx b/basic/inc/basic/sbstar.hxx index bdc4aa011cc9..a234dc206ec7 100644 --- a/basic/inc/basic/sbstar.hxx +++ b/basic/inc/basic/sbstar.hxx @@ -37,6 +37,7 @@ #include #include +#include class SbModule; // completed module class SbiInstance; // runtime instance @@ -69,6 +70,7 @@ class StarBASIC : public SbxObject BOOL bNoRtl; // if TRUE: do not search RTL BOOL bBreak; // if TRUE: Break, otherwise Step BOOL bDocBasic; + BOOL bVBAEnabled; BasicLibInfo* pLibInfo; // Info block for basic manager SbLanguageMode eLanguageMode; // LanguageMode of the basic object BOOL bQuit; @@ -117,6 +119,7 @@ public: // Compiler-Interface SbModule* MakeModule( const String& rName, const String& rSrc ); SbModule* MakeModule32( const String& rName, const ::rtl::OUString& rSrc ); + SbModule* MakeModule32( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, const ::rtl::OUString& rSrc ); BOOL Compile( SbModule* ); BOOL Disassemble( SbModule*, String& rText ); static void Stop(); @@ -189,6 +192,8 @@ public: ( const String& rName, USHORT& rStatus ); static SbMethod* GetActiveMethod( USHORT nLevel = 0 ); static SbModule* GetActiveModule(); + void SetVBAEnabled( BOOL bEnabled ); + BOOL isVBAEnabled(); // #60175 TRUE: SFX-Resource is not displayed on basic errors static void StaticSuppressSfxResource( BOOL bSuppress ); diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index da792f269fc9..ac7812fd6c66 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -65,6 +66,10 @@ #include #include #include +#include +#include +#include +#include #include @@ -243,7 +248,15 @@ void BasMgrContainerListenerImpl::addLibraryModulesImpl( BasicManager* pMgr, Any aElement = xLibNameAccess->getByName( aModuleName ); ::rtl::OUString aMod; aElement >>= aMod; - pLib->MakeModule32( aModuleName, aMod ); + Reference< XVBAModuleInfo > xVBAModuleInfo( xLibNameAccess, UNO_QUERY ); + if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( aModuleName ) ) + { + ModuleInfo mInfo = xVBAModuleInfo->getModuleInfo( aModuleName ); + OSL_TRACE("#addLibraryModulesImpl - aMod"); + pLib->MakeModule32( aModuleName, mInfo, aMod ); + } + else + pLib->MakeModule32( aModuleName, aMod ); } } @@ -277,11 +290,16 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent { Reference< XLibraryContainer > xScriptCont( Event.Source, UNO_QUERY ); insertLibraryImpl( xScriptCont, mpMgr, Event.Element, aName ); + StarBASIC* pLib = mpMgr->GetLib( aName ); + if ( pLib ) + { + Reference xVBACompat( xScriptCont, UNO_QUERY ); + if ( xVBACompat.is() ) + pLib->SetVBAEnabled( xVBACompat->getVBACompatModeOn() ); + } } else { - ::rtl::OUString aMod; - Event.Element >>= aMod; StarBASIC* pLib = mpMgr->GetLib( maLibName ); DBG_ASSERT( pLib, "BasMgrContainerListenerImpl::elementInserted: Unknown lib!"); @@ -290,7 +308,16 @@ void SAL_CALL BasMgrContainerListenerImpl::elementInserted( const ContainerEvent SbModule* pMod = pLib->FindModule( aName ); if( !pMod ) { - pLib->MakeModule32( aName, aMod ); + ::rtl::OUString aMod; + Event.Element >>= aMod; + Reference< XVBAModuleInfo > xVBAModuleInfo( Event.Source, UNO_QUERY ); + if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo( aName ) ) + { + ModuleInfo mInfo = xVBAModuleInfo->getModuleInfo( aName ); + pLib->MakeModule32( aName, mInfo, aMod ); + } + else + pLib->MakeModule32( aName, aMod ); pLib->SetModified( FALSE ); } } @@ -319,10 +346,11 @@ void SAL_CALL BasMgrContainerListenerImpl::elementReplaced( const ContainerEvent SbModule* pMod = pLib->FindModule( aName ); ::rtl::OUString aMod; Event.Element >>= aMod; + if( pMod ) - pMod->SetSource32( aMod ); + pMod->SetSource32( aMod ); else - pLib->MakeModule32( aName, aMod ); + pLib->MakeModule32( aName, aMod ); pLib->SetModified( FALSE ); } diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index 5c57af5b6ce8..1ffa6e374b9a 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -55,7 +55,10 @@ #include #include - +#include +#include +#include +#include //================================================================================================== #include @@ -450,6 +453,43 @@ Any implFindDialogLibForDialog( const Any& rDlgAny, SbxObject* pBasic ) return aRetDlgLibAny; } +Any implFindDialogLibForDialogBasic( const Any& aAnyISP, SbxObject* pBasic, StarBASIC*& pFoundBasic ) +{ + Any aDlgLibAny; + // Find dialog library for dialog, direct access is not possible here + StarBASIC* pStartedBasic = (StarBASIC*)pBasic; + SbxObject* pParentBasic = pStartedBasic ? pStartedBasic->GetParent() : NULL; + SbxObject* pParentParentBasic = pParentBasic ? pParentBasic->GetParent() : NULL; + + SbxObject* pSearchBasic1 = NULL; + SbxObject* pSearchBasic2 = NULL; + if( pParentParentBasic ) + { + pSearchBasic1 = pParentBasic; + pSearchBasic2 = pParentParentBasic; + } + else + { + pSearchBasic1 = pStartedBasic; + pSearchBasic2 = pParentBasic; + } + if( pSearchBasic1 ) + { + aDlgLibAny = implFindDialogLibForDialog( aAnyISP, pSearchBasic1 ); + + if ( aDlgLibAny.hasValue() ) + pFoundBasic = (StarBASIC*)pSearchBasic1; + + else if( pSearchBasic2 ) + { + aDlgLibAny = implFindDialogLibForDialog( aAnyISP, pSearchBasic2 ); + if ( aDlgLibAny.hasValue() ) + pFoundBasic = (StarBASIC*)pSearchBasic2; + } + } + return aDlgLibAny; +} + static ::rtl::OUString aDecorationPropName = ::rtl::OUString::createFromAscii( "Decoration" ); static ::rtl::OUString aTitlePropName = @@ -529,39 +569,51 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) {} } - // Find dialog library for dialog, direct access is not possible here - StarBASIC* pStartedBasic = pINST->GetBasic(); - SbxObject* pParentBasic = pStartedBasic ? pStartedBasic->GetParent() : NULL; - SbxObject* pParentParentBasic = pParentBasic ? pParentBasic->GetParent() : NULL; - - SbxObject* pSearchBasic1 = NULL; - SbxObject* pSearchBasic2 = NULL; - if( pParentParentBasic ) + Any aDlgLibAny; + bool bDocDialog = false; + StarBASIC* pFoundBasic = NULL; + OSL_TRACE("About to try get a hold of ThisComponent"); + Reference< frame::XModel > xModel = getModelFromBasic( pINST->GetBasic() ) ; + aDlgLibAny = implFindDialogLibForDialogBasic( aAnyISP, pINST->GetBasic(), pFoundBasic ); + // If we found the dialog then it belongs to the Search basic + if ( !pFoundBasic ) { - pSearchBasic1 = pParentBasic; - pSearchBasic2 = pParentParentBasic; - } - else + Reference< frame::XDesktop > xDesktop( xMSF->createInstance + ( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ) ) ), + UNO_QUERY ); + Reference< container::XEnumeration > xModels; + if ( xDesktop.is() ) { - pSearchBasic1 = pStartedBasic; - pSearchBasic2 = pParentBasic; - } - - Any aDlgLibAny; - if( pSearchBasic1 ) + Reference< container::XEnumerationAccess > xComponents( xDesktop->getComponents(), UNO_QUERY ); + if ( xComponents.is() ) + xModels.set( xComponents->createEnumeration(), UNO_QUERY ); + if ( xModels.is() ) + { + while ( xModels->hasMoreElements() ) + { + Reference< frame::XModel > xNextModel( xModels->nextElement(), UNO_QUERY ); + if ( xNextModel.is() ) + { + BasicManager* pMgr = basic::BasicManagerRepository::getDocumentBasicManager( xNextModel ); + if ( pMgr ) + aDlgLibAny = implFindDialogLibForDialogBasic( aAnyISP, pMgr->GetLib(0), pFoundBasic ); + if ( aDlgLibAny.hasValue() ) { - aDlgLibAny = implFindDialogLibForDialog( aAnyISP, pSearchBasic1 ); - if( pSearchBasic2 && aDlgLibAny.getValueType().getTypeClass() == TypeClass_VOID ) - aDlgLibAny = implFindDialogLibForDialog( aAnyISP, pSearchBasic2 ); + bDocDialog = true; + xModel = xNextModel; + break; } - - - OSL_TRACE("About to try get a hold of ThisComponent"); - Reference< frame::XModel > xModel = getModelFromBasic( pStartedBasic ) ; - Reference< XScriptListener > xScriptListener = new BasicScriptListener_Impl( pStartedBasic, xModel ); + } + } + } + } + } + if ( pFoundBasic ) + bDocDialog = pFoundBasic->IsDocBasic(); + Reference< XScriptListener > xScriptListener = new BasicScriptListener_Impl( pINST->GetBasic(), xModel ); Sequence< Any > aArgs( 4 ); - aArgs[ 0 ] <<= xModel; + aArgs[ 0 ] <<= bDocDialog ? xModel : uno::Reference< uno::XInterface >(); aArgs[ 1 ] <<= xInput; aArgs[ 2 ] = aDlgLibAny; aArgs[ 3 ] <<= xScriptListener; diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index c5ac53c43092..7f7ac8784742 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -49,12 +49,17 @@ #include "disas.hxx" #include "runtime.hxx" #include +#include #include "stdobj.hxx" #include "filefmt.hxx" #include "sb.hrc" #include #include +#include +#include +using namespace ::com::sun::star::script; + // #pragma SW_SEGMENT_CLASS( SBASIC, SBASIC_CODE ) SV_IMPL_VARARR(SbTextPortions,SbTextPortion) @@ -485,6 +490,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) } } } + SetModuleType( com::sun::star::script::ModuleType::Class ); } SbClassModuleObject::~SbClassModuleObject() @@ -682,6 +688,7 @@ StarBASIC::StarBASIC( StarBASIC* p, BOOL bIsDocBasic ) SetParent( p ); pLibInfo = NULL; bNoRtl = bBreak = FALSE; + bVBAEnabled = FALSE; pModules = new SbxArray; if( !GetSbData()->nInst++ ) @@ -782,7 +789,34 @@ SbModule* StarBASIC::MakeModule( const String& rName, const String& rSrc ) SbModule* StarBASIC::MakeModule32( const String& rName, const ::rtl::OUString& rSrc ) { - SbModule* p = new SbModule( rName ); + ModuleInfo mInfo; + mInfo.ModuleType = ModuleType::Normal; + return MakeModule32( rName, mInfo, rSrc ); +} +SbModule* StarBASIC::MakeModule32( const String& rName, const ModuleInfo& mInfo, const rtl::OUString& rSrc ) +{ + + OSL_TRACE("create module %s type mInfo %d", rtl::OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr(), mInfo.ModuleType ); + SbModule* p = NULL; + switch ( mInfo.ModuleType ) + { + case ModuleType::Document: + // In theory we should be able to create Object modules + // in ordinary basic ( in vba mode thought these are create + // by the application/basic and not by the user ) + p = new SbObjModule( rName, mInfo, isVBAEnabled() ); + break; + case ModuleType::Class: + p = new SbModule( rName, isVBAEnabled() ); + p->SetModuleType( com::sun::star::script::ModuleType::Class ); + break; + case ModuleType::Form: + p = new SbUserFormModule( rName, mInfo, isVBAEnabled() ); + break; + default: + p = new SbModule( rName, isVBAEnabled() ); + + } p->SetSource32( rSrc ); p->SetParent( this ); pModules->Insert( p, pModules->Count() ); @@ -958,6 +992,12 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t ) } pNamed = p; } + // Only variables qualified by the Module Name e.g. Sheet1.foo + // should work for Documant && Class type Modules + INT32 nType = p->GetModuleType(); + if ( nType == com::sun::star::script::ModuleType::Document || nType == com::sun::star::script::ModuleType::Form ) + continue; + // otherwise check if the element is available // unset GBLSEARCH-Flag (due to Rekursion) USHORT nGblFlag = p->GetFlags() & SBX_GBLSEARCH; diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 092ef458041e..fceda108bbd8 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -52,6 +52,8 @@ #include #include +#include +#include // for the bsearch @@ -72,6 +74,13 @@ #include using namespace ::com::sun::star; +#include +#include +#include +#include +#include +#include +#include TYPEINIT1(SbModule,SbxObject) TYPEINIT1(SbMethod,SbxMethod) @@ -79,6 +88,8 @@ TYPEINIT1(SbProperty,SbxProperty) TYPEINIT1(SbProcedureProperty,SbxProperty) TYPEINIT1(SbJScriptModule,SbModule) TYPEINIT1(SbJScriptMethod,SbMethod) +TYPEINIT1(SbObjModule,SbModule) +TYPEINIT1(SbUserFormModule,SbObjModule) SV_DECL_VARARR(SbiBreakpoints,USHORT,4,4) SV_IMPL_VARARR(SbiBreakpoints,USHORT) @@ -148,12 +159,13 @@ bool UnlockControllerHack( StarBASIC* pBasic ) // Ein BASIC-Modul hat EXTSEARCH gesetzt, damit die im Modul enthaltenen // Elemente von anderen Modulen aus gefunden werden koennen. -SbModule::SbModule( const String& rName ) +SbModule::SbModule( const String& rName, bool bVBACompat ) : SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASICModule") ) ), - pImage( NULL ), pBreaks( NULL ), pClassData( NULL ) + pImage( NULL ), pBreaks( NULL ), pClassData( NULL ), mbVBACompat( bVBACompat ), pDocObject( NULL ), bIsProxyModule( false ) { SetName( rName ); SetFlag( SBX_EXTSEARCH | SBX_GBLSEARCH ); + SetModuleType( com::sun::star::script::ModuleType::Normal ); } SbModule::~SbModule() @@ -328,7 +340,10 @@ void SbModule::Clear() SbxVariable* SbModule::Find( const XubString& rName, SbxClassType t ) { + // make sure a search in an uninstatiated class module will fail SbxVariable* pRes = SbxObject::Find( rName, t ); + if ( bIsProxyModule ) + return NULL; if( !pRes && pImage ) { SbiInstance* pInst = pINST; @@ -430,6 +445,7 @@ void SbModule::SetSource32( const ::rtl::OUString& r ) aOUSource = r; StartDefinitions(); SbiTokenizer aTok( r ); + aTok.SetCompatible( IsVBACompat() ); while( !aTok.IsEof() ) { SbiToken eEndTok = NIL; @@ -454,13 +470,6 @@ void SbModule::SetSource32( const ::rtl::OUString& r ) { eEndTok = ENDPROPERTY; break; } - if( eCurTok == OPTION ) - { - eCurTok = aTok.Next(); - if( eCurTok == COMPATIBLE - || ( ( eCurTok == VBASUPPORT ) && ( aTok.Next() == NUMBER ) && ( aTok.GetDbl()== 1 ) ) ) - aTok.SetCompatible( true ); - } } eLastTok = eCurTok; } @@ -600,7 +609,15 @@ void ClearUnoObjectsInRTL_Impl( StarBASIC* pBasic ) if( ((StarBASIC*)p) != pBasic ) ClearUnoObjectsInRTL_Impl_Rek( (StarBASIC*)p ); } +bool SbModule::IsVBACompat() +{ + return mbVBACompat; +} +void SbModule::SetVBACompat( bool bCompat ) +{ + mbVBACompat = bCompat; +} // Ausfuehren eines BASIC-Unterprogramms USHORT SbModule::Run( SbMethod* pMeth ) { @@ -695,10 +712,9 @@ USHORT SbModule::Run( SbMethod* pMeth ) if( pRt->pNext ) pRt->pNext->block(); pINST->pRun = pRt; - if ( SbiRuntime ::isVBAEnabled() ) + if ( mbVBACompat ) { pINST->EnableCompatibility( TRUE ); - pRt->SetVBAEnabled( true ); } while( pRt->Step() ) {} if( pRt->pNext ) @@ -1482,6 +1498,390 @@ SbJScriptMethod::~SbJScriptMethod() {} +///////////////////////////////////////////////////////////////////////// +SbObjModule::SbObjModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible ) + : SbModule( rName, bIsVbaCompatible ) +{ + SetModuleType( mInfo.ModuleType ); + if ( mInfo.ModuleType == script::ModuleType::Form ) + { + SetClassName( rtl::OUString::createFromAscii( "Form" ) ); + } + else if ( mInfo.ModuleObject.is() ) + SetUnoObject( uno::makeAny( mInfo.ModuleObject ) ); +} +void +SbObjModule::SetUnoObject( const uno::Any& aObj ) throw ( uno::RuntimeException ) +{ + SbUnoObject* pUnoObj = PTR_CAST(SbUnoObject,(SbxVariable*)pDocObject); + if ( pUnoObj && pUnoObj->getUnoAny() == aObj ) // object is equal, nothing to do + return; + pDocObject = new SbUnoObject( GetName(), uno::makeAny( aObj ) ); + + com::sun::star::uno::Reference< com::sun::star::lang::XServiceInfo > xServiceInfo( aObj, com::sun::star::uno::UNO_QUERY_THROW ); + if( xServiceInfo->supportsService( rtl::OUString::createFromAscii( "ooo.vba.excel.Worksheet" ) ) ) + { + SetClassName( rtl::OUString::createFromAscii( "Worksheet" ) ); + } + else if( xServiceInfo->supportsService( rtl::OUString::createFromAscii( "ooo.vba.excel.Workbook" ) ) ) + { + SetClassName( rtl::OUString::createFromAscii( "Workbook" ) ); + } +} + +SbxVariable* +SbObjModule::GetObject() +{ + return pDocObject; +} +SbxVariable* +SbObjModule::Find( const XubString& rName, SbxClassType t ) +{ + //OSL_TRACE("SbObjectModule find for %s", rtl::OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr() ); + SbxVariable* pVar = NULL; + if ( !pVar && pDocObject) + pVar = pDocObject->Find( rName, t ); + if ( !pVar ) + pVar = SbModule::Find( rName, t ); + return pVar; +} + +typedef ::cppu::WeakImplHelper1< awt::XTopWindowListener > EventListener_BASE; + +class FormObjEventListenerImpl : public EventListener_BASE +{ + SbUserFormModule* mpUserForm; + uno::Reference< lang::XComponent > mxComponent; + bool mbDisposed; + sal_Bool mbOpened; + sal_Bool mbActivated; + sal_Bool mbShowing; + FormObjEventListenerImpl(); // not defined + FormObjEventListenerImpl(const FormObjEventListenerImpl&); // not defined +public: + FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent ) : mpUserForm( pUserForm ), mxComponent( xComponent) , mbDisposed( false ), mbOpened( sal_False ), mbActivated( sal_False ), mbShowing( sal_False ) + { + if ( mxComponent.is() ); + { + uno::Reference< awt::XTopWindow > xList( mxComponent, uno::UNO_QUERY_THROW );; + //uno::Reference< awt::XWindow > xList( mxComponent, uno::UNO_QUERY_THROW );; + OSL_TRACE("*********** Registering the listener"); + xList->addTopWindowListener( this ); + } + } + + ~FormObjEventListenerImpl() + { + removeListener(); + } + sal_Bool isShowing() { return mbShowing; } + void removeListener() + { + try + { + if ( mxComponent.is() && !mbDisposed ) + { + uno::Reference< awt::XTopWindow > xList( mxComponent, uno::UNO_QUERY_THROW );; + OSL_TRACE("*********** Removing the listener"); + xList->removeTopWindowListener( this ); + mxComponent = NULL; + } + } + catch( uno::Exception& ) {} + } + virtual void SAL_CALL windowOpened( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) + { + if ( mpUserForm ) + { + mbOpened = sal_True; + mbShowing = sal_True; + if ( mbActivated ) + { + mbOpened = mbActivated = sal_False; + mpUserForm->triggerActivateEvent(); + } + } + } + + //liuchen 2009-7-21, support Excel VBA Form_QueryClose event + virtual void SAL_CALL windowClosing( const lang::EventObject& e ) throw (uno::RuntimeException) + { +#if IN_THE_FUTURE + uno::Reference< awt::XDialog > xDialog( e.Source, uno::UNO_QUERY ); + if ( xDialog.is() ) + { + uno::Reference< awt::XControl > xControl( xDialog, uno::UNO_QUERY ); + if ( xControl->getPeer().is() ) + { + uno::Reference< document::XVbaMethodParameter > xVbaMethodParameter( xControl->getPeer(), uno::UNO_QUERY ); + if ( xVbaMethodParameter.is() ) + { + sal_Int8 nCancel = 0; + sal_Int8 nCloseMode = 0; + + Sequence< Any > aParams; + aParams.realloc(2); + aParams[0] <<= nCancel; + aParams[1] <<= nCloseMode; + + mpUserForm->triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_QueryClose") ), + aParams); + xVbaMethodParameter->setVbaMethodParameter( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Cancel")), aParams[0]); + return; + + } + } + } + + mpUserForm->triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_QueryClose") ) ); +#endif + } + //liuchen 2009-7-21 + + virtual void SAL_CALL windowClosed( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) { mbOpened = sal_False; mbShowing = sal_False; } + virtual void SAL_CALL windowMinimized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) {} + virtual void SAL_CALL windowNormalized( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException){} + virtual void SAL_CALL windowActivated( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) + { + if ( mpUserForm ) + { + mbActivated = sal_True; + if ( mbOpened ) + { + mbOpened = mbActivated = sal_False; + mpUserForm->triggerActivateEvent(); + } + } + } + + virtual void SAL_CALL windowDeactivated( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) + { + if ( mpUserForm ) + mpUserForm->triggerDeActivateEvent(); + } + + + virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw (uno::RuntimeException) + { + OSL_TRACE("** Userform/Dialog disposing"); + mbDisposed = true; + uno::Any aSource; + aSource <<= Source; + mxComponent = NULL; + if ( mpUserForm ) + mpUserForm->ResetApiObj(); + } +}; + +SbUserFormModule::SbUserFormModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsCompat ) + :SbObjModule( rName, mInfo, bIsCompat ), mbInit( false ) +{ + m_xModel.set( mInfo.ModuleObject, uno::UNO_QUERY_THROW ); +} + +void SbUserFormModule::ResetApiObj() +{ + if ( m_xDialog.is() ) // probably someone close the dialog window + { + triggerTerminateEvent(); + } + pDocObject = NULL; + m_xDialog = NULL; +} + +void SbUserFormModule::triggerMethod( const String& aMethodToRun ) +{ + Sequence< Any > aArguments; + triggerMethod( aMethodToRun, aArguments ); +} +void SbUserFormModule::triggerMethod( const String& aMethodToRun, Sequence< Any >& aArguments) +{ + OSL_TRACE("*** trigger %s ***", rtl::OUStringToOString( aMethodToRun, RTL_TEXTENCODING_UTF8 ).getStr() ); + // Search method + SbxVariable* pMeth = SbObjModule::Find( aMethodToRun, SbxCLASS_METHOD ); + if( pMeth ) + { +#if IN_THE_FUTURE + //liuchen 2009-7-21, support Excel VBA UserForm_QueryClose event with parameters + if ( aArguments.getLength() > 0 ) // Setup parameters + { + SbxArrayRef xArray = new SbxArray; + xArray->Put( pMeth, 0 ); // Method as parameter 0 + + for ( sal_Int32 i = 0; i < aArguments.getLength(); ++i ) + { + SbxVariableRef xSbxVar = new SbxVariable( SbxVARIANT ); + unoToSbxValue( static_cast< SbxVariable* >( xSbxVar ), aArguments[i] ); + xArray->Put( xSbxVar, static_cast< USHORT >( i ) + 1 ); + + // Enable passing by ref + if ( xSbxVar->GetType() != SbxVARIANT ) + xSbxVar->SetFlag( SBX_FIXED ); + } + pMeth->SetParameters( xArray ); + + SbxValues aVals; + pMeth->Get( aVals ); + + for ( sal_Int32 i = 0; i < aArguments.getLength(); ++i ) + { + aArguments[i] = sbxToUnoValue( xArray->Get( static_cast< USHORT >(i) + 1) ); + } + pMeth->SetParameters( NULL ); + } + else +//liuchen 2009-7-21 +#endif + { + SbxValues aVals; + pMeth->Get( aVals ); + } + } +} + +void SbUserFormModule::triggerActivateEvent( void ) +{ + OSL_TRACE("**** entering SbUserFormModule::triggerActivate"); + triggerMethod( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UserForm_activate") ) ); + OSL_TRACE("**** leaving SbUserFormModule::triggerActivate"); +} + +void SbUserFormModule::triggerDeActivateEvent( void ) +{ + OSL_TRACE("**** SbUserFormModule::triggerDeActivate"); + triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_DeActivate") ) ); +} + +void SbUserFormModule::triggerInitializeEvent( void ) + +{ + if ( mbInit ) + return; + OSL_TRACE("**** SbUserFormModule::triggerInitializeEvent"); + static String aInitMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Initialize") ); + triggerMethod( aInitMethodName ); + mbInit = true; +} + +void SbUserFormModule::triggerTerminateEvent( void ) +{ + OSL_TRACE("**** SbUserFormModule::triggerTerminateEvent"); + static String aTermMethodName( RTL_CONSTASCII_USTRINGPARAM("Userform_Terminate") ); + triggerMethod( aTermMethodName ); + mbInit=false; +} + +void SbUserFormModule::load() +{ + OSL_TRACE("** load() "); + // forces a load + if ( !pDocObject ) + InitObject(); +} + +//liuchen 2009-7-21 change to accmordate VBA's beheavior +void SbUserFormModule::Unload() +{ + OSL_TRACE("** Unload() "); + + sal_Int8 nCancel = 0; + sal_Int8 nCloseMode = 1; + + Sequence< Any > aParams; + aParams.realloc(2); + aParams[0] <<= nCancel; + aParams[1] <<= nCloseMode; + + triggerMethod( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Userform_QueryClose") ), aParams); + + aParams[0] >>= nCancel; + if (nCancel == 1) + { + return; + } + + if ( m_xDialog.is() ) + { + triggerTerminateEvent(); + } + // Search method + SbxVariable* pMeth = SbObjModule::Find( String( RTL_CONSTASCII_USTRINGPARAM( "UnloadObject" ) ), SbxCLASS_METHOD ); + if( pMeth ) + { + OSL_TRACE("Attempting too run the UnloadObjectMethod"); + m_xDialog = NULL; //release ref to the uno object + SbxValues aVals; + FormObjEventListenerImpl* pFormListener = dynamic_cast< FormObjEventListenerImpl* >( m_DialogListener.get() ); + bool bWaitForDispose = true; // assume dialog is showing + if ( pFormListener ) + { + bWaitForDispose = pFormListener->isShowing(); + OSL_TRACE("Showing %d", bWaitForDispose ); + } + pMeth->Get( aVals); + if ( !bWaitForDispose ) + { + // we've either already got a dispose or we'er never going to get one + ResetApiObj(); + } // else wait for dispose + OSL_TRACE("UnloadObject completed ( we hope )"); + } +} +//liuchen + +void SbUserFormModule::InitObject() +{ + try + { + + String aHook( RTL_CONSTASCII_USTRINGPARAM( "VBAGlobals" ) ); + SbUnoObject* pGlobs = (SbUnoObject*)GetParent()->Find( aHook, SbxCLASS_DONTCARE ); + if ( m_xModel.is() && pGlobs ) + { + + uno::Reference< lang::XMultiServiceFactory > xVBAFactory( pGlobs->getUnoAny(), uno::UNO_QUERY_THROW ); + uno::Reference< lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory(); + uno::Sequence< uno::Any > aArgs(1); + aArgs[ 0 ] <<= m_xModel; + rtl::OUString sDialogUrl( RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.script:" ) ); + rtl::OUString sProjectName( RTL_CONSTASCII_USTRINGPARAM("Standard") ); + if ( this->GetParent()->GetName().Len() ) + sProjectName = this->GetParent()->GetName(); + sDialogUrl = sDialogUrl.concat( sProjectName ).concat( rtl::OUString( '.') ).concat( GetName() ).concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("?location=document") ) ); + + uno::Reference< awt::XDialogProvider > xProvider( xFactory->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.DialogProvider")), aArgs ), uno::UNO_QUERY_THROW ); + m_xDialog = xProvider->createDialog( sDialogUrl ); + + // create vba api object + aArgs.realloc( 4 ); + aArgs[ 0 ] = uno::Any(); + aArgs[ 1 ] <<= m_xDialog; + aArgs[ 2 ] <<= m_xModel; + aArgs[ 3 ] <<= rtl::OUString( GetParent()->GetName() ); + pDocObject = new SbUnoObject( GetName(), uno::makeAny( xVBAFactory->createInstanceWithArguments( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.msforms.UserForm")), aArgs ) ) ); + uno::Reference< lang::XComponent > xComponent( aArgs[ 1 ], uno::UNO_QUERY_THROW ); + // remove old listener if it exists + FormObjEventListenerImpl* pFormListener = dynamic_cast< FormObjEventListenerImpl* >( m_DialogListener.get() ); + if ( pFormListener ) + pFormListener->removeListener(); + m_DialogListener = new FormObjEventListenerImpl( this, xComponent ); + + triggerInitializeEvent(); + } + } + catch( uno::Exception& e ) + { + } + +} + +SbxVariable* +SbUserFormModule::Find( const XubString& rName, SbxClassType t ) +{ + if ( !pDocObject && !GetSbData()->bRunInit && pINST ) + InitObject(); + return SbObjModule::Find( rName, t ); +} ///////////////////////////////////////////////////////////////////////// SbProperty::SbProperty( const String& r, SbxDataType t, SbModule* p ) diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index c7a63b6d7fbb..1cf38f171e8b 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -127,12 +127,12 @@ void SbiCodeGen::Save() // OPTION EXPLICIT-Flag uebernehmen if( pParser->bExplicit ) p->SetFlag( SBIMG_EXPLICIT ); - if( pParser->IsVBASupportOn() ) - p->SetFlag( SBIMG_VBASUPPORT ); int nIfaceCount = 0; - if( pParser->bClassModule ) + if( rMod.mnType == com::sun::star::script::ModuleType::Class ) { + OSL_TRACE("COdeGen::save() classmodule processing"); + rMod.bIsProxyModule = true; p->SetFlag( SBIMG_CLASSMODULE ); pCLASSFAC->AddClassModule( &rMod ); @@ -155,6 +155,10 @@ void SbiCodeGen::Save() else { pCLASSFAC->RemoveClassModule( &rMod ); + // Only a ClassModule can revert to Normal + if ( rMod.mnType == com::sun::star::script::ModuleType::Class ) + rMod.mnType = com::sun::star::script::ModuleType::Normal; + rMod.bIsProxyModule = false; } if( pParser->bText ) p->SetFlag( SBIMG_COMPARETEXT ); diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index 400e77a94b16..9fbd1035fa5f 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -140,7 +140,8 @@ SbiParser::SbiParser( StarBASIC* pb, SbModule* pm ) bNewGblDefs = bSingleLineIf = bExplicit = FALSE; - bClassModule = FALSE; + bClassModule = ( pm->GetModuleType() == com::sun::star::script::ModuleType::Class ); + OSL_TRACE("Parser - %s, bClassModule %d", rtl::OUStringToOString( pm->GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), bClassModule ); pPool = &aPublics; for( short i = 0; i < 26; i++ ) eDefTypes[ i ] = SbxVARIANT; // Kein expliziter Defaulttyp @@ -153,6 +154,10 @@ SbiParser::SbiParser( StarBASIC* pb, SbModule* pm ) rTypeArray = new SbxArray; // Array fuer Benutzerdefinierte Typen rEnumArray = new SbxArray; // Array for Enum types + bVBASupportOn = pm->IsVBACompat(); + if ( bVBASupportOn ) + EnableCompatibility(); + } @@ -751,6 +756,7 @@ void SbiParser::Option() case CLASSMODULE: bClassModule = TRUE; + aGen.GetModule().SetModuleType( com::sun::star::script::ModuleType::Class ); break; case VBASUPPORT: if( Next() == NUMBER ) @@ -760,6 +766,10 @@ void SbiParser::Option() bVBASupportOn = ( nVal == 1 ); if ( bVBASupportOn ) EnableCompatibility(); + // if the module setting is different + // reset it to what the Option tells us + if ( bVBASupportOn != aGen.GetModule().IsVBACompat() ) + aGen.GetModule().SetVBACompat( bVBASupportOn ); break; } } diff --git a/basic/source/inc/codegen.hxx b/basic/source/inc/codegen.hxx index d0a613eabebc..3d90d16bdcbe 100644 --- a/basic/source/inc/codegen.hxx +++ b/basic/source/inc/codegen.hxx @@ -53,6 +53,7 @@ public: void GenStmnt(); // evtl. Statement-Opcode erzeugen UINT32 GetPC(); UINT32 GetOffset() { return GetPC() + 1; } + SbModule& GetModule() { return rMod; } void Save(); // #29955 for-Schleifen-Ebene pflegen diff --git a/basic/source/inc/image.hxx b/basic/source/inc/image.hxx index 7347efe288f3..d674b91faf71 100644 --- a/basic/source/inc/image.hxx +++ b/basic/source/inc/image.hxx @@ -106,6 +106,5 @@ public: #define SBIMG_COMPARETEXT 0x0002 // OPTION COMPARE TEXT ist aktiv #define SBIMG_INITCODE 0x0004 // Init-Code vorhanden #define SBIMG_CLASSMODULE 0x0008 // OPTION ClassModule is active -#define SBIMG_VBASUPPORT 0x0020 // OPTION VBASupport is 1 #endif diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx index 1f7e77170d44..1f4084db1d0d 100644 --- a/basic/source/inc/namecont.hxx +++ b/basic/source/inc/namecont.hxx @@ -58,19 +58,22 @@ #include #include +#include #include +#include class BasicManager; namespace basic { -typedef ::cppu::WeakComponentImplHelper6< +typedef ::cppu::WeakComponentImplHelper7< ::com::sun::star::lang::XInitialization, ::com::sun::star::script::XStorageBasedLibraryContainer, ::com::sun::star::script::XLibraryContainerPassword, ::com::sun::star::script::XLibraryContainerExport, ::com::sun::star::container::XContainer, + ::com::sun::star::script::XVBACompat, ::com::sun::star::lang::XServiceInfo > LibraryContainerHelper; typedef ::cppu::WeakImplHelper2< ::com::sun::star::container::XNameContainer, @@ -216,6 +219,7 @@ public: class SfxLibraryContainer :public LibraryContainerHelper ,public ::utl::OEventListenerAdapter { + sal_Bool mbVBACompat; protected: ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF; ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > mxSFI; @@ -493,6 +497,9 @@ public: throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException) = 0; + // Methods XVBACompat + virtual ::sal_Bool SAL_CALL getVBACompatModeOn() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setVBACompatModeOn( ::sal_Bool _vbacompatmodeon ) throw (::com::sun::star::uno::RuntimeException); }; class LibraryContainerMethodGuard diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index 4a3f38c51027..b831a0ba57d5 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -433,7 +433,7 @@ class SbiRuntime void StepFIND_CM( UINT32, UINT32 ); void StepFIND_STATIC( UINT32, UINT32 ); public: - void SetVBAEnabled( bool bEnabled ) { bVBAEnabled = bEnabled; }; + void SetVBAEnabled( bool bEnabled ); USHORT GetImageFlag( USHORT n ) const; USHORT GetBase(); xub_StrLen nLine,nCol1,nCol2; // aktuelle Zeile, Spaltenbereich diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx index 19b0698d22a9..31025c48c4a4 100644 --- a/basic/source/inc/scriptcont.hxx +++ b/basic/source/inc/scriptcont.hxx @@ -30,6 +30,8 @@ #include "namecont.hxx" #include +#include +#include class BasicManager; @@ -134,13 +136,19 @@ public: }; //============================================================================ +typedef std::hash_map< ::rtl::OUString, ::com::sun::star::script::ModuleInfo, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > ModuleInfoMap; + +typedef ::cppu::ImplHelper1 < ::com::sun::star::script::XVBAModuleInfo + > SfxScriptLibrary_BASE; class SfxScriptLibrary : public SfxLibrary + , public SfxScriptLibrary_BASE { friend class SfxScriptLibraryContainer; sal_Bool mbLoadedSource; sal_Bool mbLoadedBinary; + ModuleInfoMap mModuleInfos; // Provide modify state including resources virtual sal_Bool isModified( void ); @@ -167,6 +175,15 @@ public: const ::rtl::OUString& aLibInfoFileURL, const ::rtl::OUString& aStorageURL, sal_Bool ReadOnly ); + DECLARE_XINTERFACE() + DECLARE_XTYPEPROVIDER() + + // XVBAModuleInfo + virtual ::com::sun::star::script::ModuleInfo SAL_CALL getModuleInfo( const ::rtl::OUString& ModuleName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual sal_Bool SAL_CALL hasModuleInfo( const ::rtl::OUString& ModuleName ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL insertModuleInfo( const ::rtl::OUString& ModuleName, const ::com::sun::star::script::ModuleInfo& ModuleInfo ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeModuleInfo( const ::rtl::OUString& ModuleName ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + static bool containsValidModule( const ::com::sun::star::uno::Any& _rElement ); protected: diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 9a21e488d4aa..e1b704cb8918 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -120,6 +120,10 @@ using namespace com::sun::star::io; #include #endif +using namespace rtl; + +#include + static void FilterWhiteSpace( String& rStr ) { rStr.EraseAllChars( ' ' ); @@ -4106,7 +4110,12 @@ RTLFUNC(Load) // Diesen Call einfach an das Object weiterreichen SbxBase* pObj = (SbxObject*)rPar.Get(1)->GetObject(); - if( pObj && pObj->IsA( TYPE( SbxObject ) ) ) + if( pObj && pObj->IsA( TYPE( SbUserFormModule ) ) ) + { + SbUserFormModule* pFormModule = ( SbUserFormModule* )pObj; + pFormModule->load(); + } + else if( pObj && pObj->IsA( TYPE( SbxObject ) ) ) { SbxVariable* pVar = ((SbxObject*)pObj)-> Find( String( RTL_CONSTASCII_USTRINGPARAM("Load") ), SbxCLASS_METHOD ); @@ -4129,7 +4138,12 @@ RTLFUNC(Unload) // Diesen Call einfach an das Object weitereichen SbxBase* pObj = (SbxObject*)rPar.Get(1)->GetObject(); - if( pObj && pObj->IsA( TYPE( SbxObject ) ) ) + if( pObj && pObj->IsA( TYPE( SbUserFormModule ) ) ) + { + SbUserFormModule* pFormModule = ( SbUserFormModule* )pObj; + pFormModule->Unload(); + } + else if( pObj && pObj->IsA( TYPE( SbxObject ) ) ) { SbxVariable* pVar = ((SbxObject*)pObj)-> Find( String( RTL_CONSTASCII_USTRINGPARAM("Unload") ), SbxCLASS_METHOD ); diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index e0501e5c0d94..3a234b78e1df 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -61,6 +61,7 @@ #endif #include +#include #include "sbintern.hxx" #include "runtime.hxx" @@ -2594,14 +2595,15 @@ RTLFUNC(Me) SbModule* pActiveModule = pINST->GetActiveModule(); SbClassModuleObject* pClassModuleObject = PTR_CAST(SbClassModuleObject,pActiveModule); + SbxVariableRef refVar = rPar.Get(0); if( pClassModuleObject == NULL ) { StarBASIC::Error( SbERR_INVALID_USAGE_OBJECT ); + SbObjModule* pMod = PTR_CAST(SbObjModule,pActiveModule); + if ( pMod ) + refVar->PutObject( pMod ); } else - { - SbxVariableRef refVar = rPar.Get(0); refVar->PutObject( pClassModuleObject ); - } } diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 52aa76e2f2df..4c80d2683e1c 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -49,7 +49,7 @@ bool SbiRuntime::isVBAEnabled() bool result = false; SbiInstance* pInst = pINST; if ( pInst && pINST->pRun ) - result = pInst->pRun->GetImageFlag( SBIMG_VBASUPPORT ); + result = pInst->pRun->bVBAEnabled; return result; } @@ -60,6 +60,24 @@ void StarBASIC::StaticEnableReschedule( BOOL bReschedule ) { bStaticGlobalEnableReschedule = bReschedule; } +void StarBASIC::SetVBAEnabled( BOOL bEnabled ) +{ + if ( bDocBasic ) + { + bVBAEnabled = bEnabled; + } +} + +BOOL StarBASIC::isVBAEnabled() +{ + if ( bDocBasic ) + { + if( SbiRuntime::isVBAEnabled() ) + return TRUE; + return bVBAEnabled; + } + return FALSE; +} struct SbiArgvStack { // Argv stack: @@ -520,6 +538,7 @@ SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, UINT32 nStart ) nForLvl = 0; nOps = 0; refExprStk = new SbxArray; + SetVBAEnabled( pMod->IsVBACompat() ); #if defined GCC SetParameters( pe ? pe->GetParameters() : (class SbxArray *)NULL ); #else @@ -527,7 +546,6 @@ SbiRuntime::SbiRuntime( SbModule* pm, SbMethod* pe, UINT32 nStart ) #endif pRefSaveList = NULL; pItemStoreList = NULL; - bVBAEnabled = isVBAEnabled(); } SbiRuntime::~SbiRuntime() @@ -546,6 +564,11 @@ SbiRuntime::~SbiRuntime() } } +void SbiRuntime::SetVBAEnabled(bool bEnabled ) +{ + bVBAEnabled = bEnabled; +} + // Aufbau der Parameterliste. Alle ByRef-Parameter werden direkt // uebernommen; von ByVal-Parametern werden Kopien angelegt. Falls // ein bestimmter Datentyp verlangt wird, wird konvertiert. diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 6ccb7e81d2c4..05134620f173 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -73,7 +73,6 @@ #include #include - namespace basic { @@ -332,7 +331,7 @@ SfxLibraryContainer::SfxLibraryContainer( void ) , mbOldInfoFormat( sal_False ) , mbOasis2OOoFormat( sal_False ) , mpBasMgr( NULL ) - , mbOwnBasMgr( sal_False ) + , mbOwnBasMgr( sal_False ), mbVBACompat( sal_False ) { DBG_CTOR( SfxLibraryContainer, NULL ); @@ -2726,6 +2725,28 @@ OUString SfxLibraryContainer::expand_url( const OUString& url ) } } +::sal_Bool SAL_CALL SfxLibraryContainer::getVBACompatModeOn() throw (RuntimeException) +{ + return mbVBACompat; +} + +void SAL_CALL SfxLibraryContainer::setVBACompatModeOn( ::sal_Bool _vbacompatmodeon ) throw (RuntimeException) +{ + BasicManager* pBasMgr = getBasicManager(); + if( pBasMgr ) + { + // get the standard library + String aLibName( RTL_CONSTASCII_USTRINGPARAM( "Standard" ) ); + if ( pBasMgr->GetName().Len() ) + aLibName = pBasMgr->GetName(); + + StarBASIC* pBasic = pBasMgr->GetLib( aLibName ); + if( pBasic ) + pBasic->SetVBAEnabled( _vbacompatmodeon ); + } + mbVBACompat = _vbacompatmodeon; +} + // Methods XServiceInfo ::sal_Bool SAL_CALL SfxLibraryContainer::supportsService( const ::rtl::OUString& _rServiceName ) throw (RuntimeException) diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 096d497a4c50..6e8e1e7eff7b 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -1166,6 +1166,45 @@ bool SAL_CALL SfxScriptLibrary::isLibraryElementValid( ::com::sun::star::uno::An return SfxScriptLibrary::containsValidModule( aElement ); } +IMPLEMENT_FORWARD_XINTERFACE2( SfxScriptLibrary, SfxLibrary, SfxScriptLibrary_BASE ); +IMPLEMENT_FORWARD_XTYPEPROVIDER2( SfxScriptLibrary, SfxLibrary, SfxScriptLibrary_BASE ); + +script::ModuleInfo SAL_CALL +SfxScriptLibrary::getModuleInfo( const ::rtl::OUString& ModuleName ) throw (NoSuchElementException, WrappedTargetException, RuntimeException) +{ + if ( !hasModuleInfo( ModuleName ) ) + throw NoSuchElementException(); + return mModuleInfos[ ModuleName ]; +} + +sal_Bool SAL_CALL +SfxScriptLibrary::hasModuleInfo( const ::rtl::OUString& ModuleName ) throw (RuntimeException) +{ + sal_Bool bRes = sal_False; + ModuleInfoMap::iterator it = mModuleInfos.find( ModuleName ); + + if ( it != mModuleInfos.end() ) + bRes = sal_True; + + return bRes; +} + +void SAL_CALL SfxScriptLibrary::insertModuleInfo( const ::rtl::OUString& ModuleName, const script::ModuleInfo& ModuleInfo ) throw (IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException) +{ + if ( hasModuleInfo( ModuleName ) ) + throw ElementExistException(); + mModuleInfos[ ModuleName ] = ModuleInfo; +} + +void SAL_CALL SfxScriptLibrary::removeModuleInfo( const ::rtl::OUString& ModuleName ) throw (NoSuchElementException, WrappedTargetException, RuntimeException) +{ + // #FIXME add NoSuchElementException to the spec + if ( !hasModuleInfo( ModuleName ) ) + throw NoSuchElementException(); + mModuleInfos.erase( mModuleInfos.find( ModuleName ) ); +} + + //============================================================================ } // namespace basic diff --git a/oovbaapi/ooo/vba/excel/XWorksheet.idl b/oovbaapi/ooo/vba/excel/XWorksheet.idl index 2f66b7d0826f..3620c899de83 100644 --- a/oovbaapi/ooo/vba/excel/XWorksheet.idl +++ b/oovbaapi/ooo/vba/excel/XWorksheet.idl @@ -39,6 +39,9 @@ #include #endif +#ifndef __com_sun_star_container_XNamed_idl__ +#include +#endif //============================================================================= module ooo { module vba { module excel { @@ -55,8 +58,8 @@ interface XWorksheet { interface ::ooo::vba::XHelperInterface; interface ::com::sun::star::script::XInvocation; + interface ::com::sun::star::container::XNamed; - [attribute] string Name; [attribute] boolean Visible; [attribute, readonly] long StandardHeight; [attribute, readonly] long StandardWidth; diff --git a/vbahelper/source/vbahelper/vbaglobalbase.cxx b/vbahelper/source/vbahelper/vbaglobalbase.cxx index 4226a6bfbf53..2bb9d2f4a7ad 100644 --- a/vbahelper/source/vbahelper/vbaglobalbase.cxx +++ b/vbahelper/source/vbahelper/vbaglobalbase.cxx @@ -85,9 +85,14 @@ VbaGlobalsBase::createInstanceWithArguments( const ::rtl::OUString& ServiceSpeci { uno::Reference< uno::XInterface > xReturn; - + OSL_TRACE("VbaGlobalsBase::createInstanceWithArguments(%s)", rtl::OUStringToOString( ServiceSpecifier, RTL_TEXTENCODING_UTF8 ).getStr() ); if ( hasServiceName( ServiceSpecifier ) ) + { + OSL_TRACE("VbaGlobalsBase::hasServiceName(%s) - true", rtl::OUStringToOString( ServiceSpecifier, RTL_TEXTENCODING_UTF8 ).getStr() ); xReturn = mxContext->getServiceManager()->createInstanceWithArgumentsAndContext( ServiceSpecifier, Arguments, mxContext ); + } + else + OSL_TRACE("VbaGlobalsBase::hasServiceName(%s) - false", rtl::OUStringToOString( ServiceSpecifier, RTL_TEXTENCODING_UTF8 ).getStr() ); return xReturn; } -- cgit From dce859e723f91c9f693a75d146c26dea22634304 Mon Sep 17 00:00:00 2001 From: npower Developer Date: Tue, 2 Mar 2010 12:44:46 +0000 Subject: npower13_objectmodule: #i109734# object module stuff new files --- basic/inc/basic/sbobjmod.hxx | 96 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 basic/inc/basic/sbobjmod.hxx diff --git a/basic/inc/basic/sbobjmod.hxx b/basic/inc/basic/sbobjmod.hxx new file mode 100644 index 000000000000..ad83e4fbc44b --- /dev/null +++ b/basic/inc/basic/sbobjmod.hxx @@ -0,0 +1,96 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: sbobjmod.hxx,v $ + * + * $Revision: 1.4 $ + * + * last change: $Author: $ $Date: 2007/08/27 16:31:39 $ + * + * The Contents of this file are made available subject to + * the terms of GNU Lesser General Public License Version 2.1. + * + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2005 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + ************************************************************************/ + +#ifndef _SB_OBJMOD_HXX +#define _SB_OBJMOD_HXX + +#include +#include +#include +#include +#include +#include + +namespace css = ::com::sun::star; + +// Basic-Module for excel object. + +class SbObjModule : public SbModule +{ + SbObjModule( const SbObjModule& ); + SbObjModule(); +public: + TYPEINFO(); + SbObjModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible ); + virtual SbxVariable* Find( const XubString& rName, SbxClassType t ); + SbxVariable* GetObject(); + void SetUnoObject( const com::sun::star::uno::Any& aObj )throw ( com::sun::star::uno::RuntimeException ) ; +}; + +class SbUserFormModule : public SbObjModule +{ + css::uno::Reference m_DialogListener; + css::uno::Reference m_xDialog; + css::uno::Reference m_xModel; + String sFormName; + bool mbInit; + SbUserFormModule( const SbUserFormModule& ); + SbUserFormModule(); + +protected: + virtual void InitObject(); +public: + TYPEINFO(); + SbUserFormModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVBACompat ); + virtual SbxVariable* Find( const XubString& rName, SbxClassType t ); + void ResetApiObj(); + void Unload(); + void load(); + void triggerMethod( const String& ); + void triggerMethod( const String&, css::uno::Sequence< css::uno::Any >& ); + void triggerActivateEvent(); + void triggerDeActivateEvent(); + void triggerInitializeEvent(); + void triggerTerminateEvent(); +}; + +#ifndef __SB_SBOBJMODULEREF_HXX +#define __SB_SBOBJMODULEREF_HXX + +SV_DECL_IMPL_REF(SbObjModule); + +#endif +#endif + -- cgit From 9f7b39fd2ef894846e9d4532272edeb2c11cc208 Mon Sep 17 00:00:00 2001 From: npower Developer Date: Tue, 2 Mar 2010 15:04:15 +0000 Subject: npower14miscfixes: #i109706# move back msvbahelper to the filter module --- vbahelper/inc/vbahelper/msvbahelper.hxx | 55 --- vbahelper/source/vbahelper/makefile.mk | 1 - vbahelper/source/vbahelper/msvbahelper.cxx | 381 --------------------- vbahelper/source/vbahelper/vbaapplicationbase.cxx | 2 +- .../source/vbahelper/vbacommandbarcontrol.cxx | 2 +- vbahelper/util/makefile.mk | 1 + 6 files changed, 3 insertions(+), 439 deletions(-) delete mode 100644 vbahelper/inc/vbahelper/msvbahelper.hxx delete mode 100644 vbahelper/source/vbahelper/msvbahelper.cxx diff --git a/vbahelper/inc/vbahelper/msvbahelper.hxx b/vbahelper/inc/vbahelper/msvbahelper.hxx deleted file mode 100644 index 898c44c349bc..000000000000 --- a/vbahelper/inc/vbahelper/msvbahelper.hxx +++ /dev/null @@ -1,55 +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 _MSVBAHELPER_HXX -#define _MSVBAHELPER_HXX - -#include -#include - -namespace ooo { namespace vba -{ - class VBAHELPER_DLLPUBLIC VBAMacroResolvedInfo - { - SfxObjectShell* mpDocContext; - bool mbFound; - String msResolvedMacro; - public: - VBAMacroResolvedInfo() : mpDocContext(NULL), mbFound( false ){} - void SetResolved( bool bRes ) { mbFound = bRes; } - bool IsResolved() { return mbFound; } - void SetMacroDocContext(SfxObjectShell* pShell ) { mpDocContext = pShell; } - SfxObjectShell* MacroDocContext() { return mpDocContext; } - String ResolvedMacro() { return msResolvedMacro; } - void SetResolvedMacro(const String& sMacro ) { msResolvedMacro = sMacro; } - }; - - VBAHELPER_DLLPUBLIC String makeMacroURL( const String& sMacroName ); - VBAHELPER_DLLPUBLIC VBAMacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUString& sMod, bool bSearchGlobalTemplates = false ); - VBAHELPER_DLLPUBLIC sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArgs, com::sun::star::uno::Any& aRet, const com::sun::star::uno::Any& aCaller ); -} } - -#endif diff --git a/vbahelper/source/vbahelper/makefile.mk b/vbahelper/source/vbahelper/makefile.mk index 88f8f53bd5bf..791a3ebdcb76 100644 --- a/vbahelper/source/vbahelper/makefile.mk +++ b/vbahelper/source/vbahelper/makefile.mk @@ -36,7 +36,6 @@ VISIBILITY_HIDDEN=TRUE .INCLUDE : settings.mk SLOFILES=\ - $(SLO)$/msvbahelper.obj \ $(SLO)$/vbahelper.obj \ $(SLO)$/vbapropvalue.obj \ $(SLO)$/vbacommandbars.obj \ diff --git a/vbahelper/source/vbahelper/msvbahelper.cxx b/vbahelper/source/vbahelper/msvbahelper.cxx deleted file mode 100644 index f0d721529b2c..000000000000 --- a/vbahelper/source/vbahelper/msvbahelper.cxx +++ /dev/null @@ -1,381 +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. - * - ************************************************************************/ - -#define VBAHELPER_DLLIMPLEMENTATION -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace ::com::sun::star; - -const static rtl::OUString sUrlPart0 = rtl::OUString::createFromAscii( "vnd.sun.star.script:"); -const static rtl::OUString sUrlPart1 = rtl::OUString::createFromAscii( "?language=Basic&location=document"); - -namespace ooo { namespace vba { - -String makeMacroURL( const String& sMacroName ) -{ - return sUrlPart0.concat( sMacroName ).concat( sUrlPart1 ) ; -} - -SfxObjectShell* findShellForUrl( const rtl::OUString& sMacroURLOrPath ) -{ - SfxObjectShell* pFoundShell=NULL; - SfxObjectShell* pShell = SfxObjectShell::GetFirst(); - INetURLObject aObj; - aObj.SetURL( sMacroURLOrPath ); - bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID; - rtl::OUString aURL; - if ( bIsURL ) - aURL = sMacroURLOrPath; - else - { - osl::FileBase::getFileURLFromSystemPath( sMacroURLOrPath, aURL ); - aObj.SetURL( aURL ); - } - OSL_TRACE("Trying to find shell for url %s", rtl::OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ).getStr() ); - while ( pShell ) - { - - uno::Reference< frame::XModel > xModel = pShell->GetModel(); - // are we searching for a template? if so we have to cater for the - // fact that in openoffice a document opened from a template is always - // a new document :/ - if ( xModel.is() ) - { - OSL_TRACE("shell 0x%x has model with url %s and we look for %s", pShell - , rtl::OUStringToOString( xModel->getURL(), RTL_TEXTENCODING_UTF8 ).getStr() - , rtl::OUStringToOString( aURL, RTL_TEXTENCODING_UTF8 ).getStr() - ); - if ( sMacroURLOrPath.endsWithIgnoreAsciiCaseAsciiL( ".dot", 4 ) ) - { - uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( xModel, uno::UNO_QUERY ); - if( xDocInfoSupp.is() ) - { - uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW ); - uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW ); - rtl::OUString sCurrName = xDocProps->getTemplateName(); - if( sMacroURLOrPath.lastIndexOf( sCurrName ) >= 0 ) - { - pFoundShell = pShell; - break; - } - } - } - else - { - if ( aURL.equals( xModel->getURL() ) ) - { - pFoundShell = pShell; - break; - } - } - } - pShell = SfxObjectShell::GetNext( *pShell ); - } - return pFoundShell; -} - -// sMod can be empty ( but we really need the library to search in ) -// if sMod is empty and a macro is found then sMod is updated -bool hasMacro( SfxObjectShell* pShell, const String& sLibrary, String& sMod, const String& sMacro ) -{ - bool bFound = false; - if ( sLibrary.Len() && sMacro.Len() ) - { - OSL_TRACE("** Searching for %s.%s in library %s" - ,rtl::OUStringToOString( sMod, RTL_TEXTENCODING_UTF8 ).getStr() - ,rtl::OUStringToOString( sMacro, RTL_TEXTENCODING_UTF8 ).getStr() - ,rtl::OUStringToOString( sLibrary, RTL_TEXTENCODING_UTF8 ).getStr() ); - BasicManager* pBasicMgr = pShell-> GetBasicManager(); - if ( pBasicMgr ) - { - StarBASIC* pBasic = pBasicMgr->GetLib( sLibrary ); - if ( !pBasic ) - { - USHORT nId = pBasicMgr->GetLibId( sLibrary ); - pBasicMgr->LoadLib( nId ); - pBasic = pBasicMgr->GetLib( sLibrary ); - } - if ( pBasic ) - { - if ( sMod.Len() ) // we wish to find the macro is a specific module - { - SbModule* pModule = pBasic->FindModule( sMod ); - if ( pModule ) - { - SbxArray* pMethods = pModule->GetMethods(); - if ( pMethods ) - { - SbMethod* pMethod = static_cast< SbMethod* >( pMethods->Find( sMacro, SbxCLASS_METHOD ) ); - if ( pMethod ) - bFound = true; - } - } - } - else if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pBasic->Find( sMacro, SbxCLASS_METHOD ) ) ) - { - if( SbModule* pModule = pMethod->GetModule() ) - { - sMod = pModule->GetName(); - bFound = true; - } - } - } - } - } - return bFound; -} -void parseMacro( const rtl::OUString& sMacro, String& sContainer, String& sModule, String& sProcedure ) -{ - sal_Int32 nMacroDot = sMacro.lastIndexOf( '.' ); - - if ( nMacroDot != -1 ) - { - sProcedure = sMacro.copy( nMacroDot + 1 ); - - sal_Int32 nContainerDot = sMacro.lastIndexOf( '.', nMacroDot - 1 ); - if ( nContainerDot != -1 ) - { - sModule = sMacro.copy( nContainerDot + 1, nMacroDot - nContainerDot - 1 ); - sContainer = sMacro.copy( 0, nContainerDot ); - } - else - sModule = sMacro.copy( 0, nMacroDot ); - } - else - sProcedure = sMacro; -} - -VBAMacroResolvedInfo resolveVBAMacro( SfxObjectShell* pShell, const rtl::OUString& MacroName, bool bSearchGlobalTemplates ) -{ - VBAMacroResolvedInfo aRes; - if ( !pShell ) - return aRes; - aRes.SetMacroDocContext( pShell ); - // parse the macro name - sal_Int32 nDocSepIndex = MacroName.indexOfAsciiL( "!", 1 ); - String sMacroUrl = MacroName; - - String sContainer; - String sModule; - String sProcedure; - - if( nDocSepIndex > 0 ) - { - // macro specified by document name - // find document shell for document name and call ourselves - // recursively - - // assume for now that the document name is *this* document - String sDocUrlOrPath = MacroName.copy( 0, nDocSepIndex ); - sMacroUrl = MacroName.copy( nDocSepIndex + 1 ); - OSL_TRACE("doc search, current shell is 0x%x", pShell ); - SfxObjectShell* pFoundShell = findShellForUrl( sDocUrlOrPath ); - OSL_TRACE("doc search, after find, found shell is 0x%x", pFoundShell ); - aRes = resolveVBAMacro( pFoundShell, sMacroUrl ); - } - else - { - // macro is contained in 'this' document ( or code imported from a template - // where that template is a global template or perhaps the template this - // document is created from ) - - // macro format = Container.Module.Procedure - parseMacro( MacroName, sContainer, sModule, sProcedure ); - uno::Reference< lang::XMultiServiceFactory> xSF( pShell->GetModel(), uno::UNO_QUERY); - uno::Reference< container::XNameContainer > xPrjNameCache; - if ( xSF.is() ) - xPrjNameCache.set( xSF->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.VBAProjectNameProvider" ) ) ), uno::UNO_QUERY ); - - std::vector< rtl::OUString > sSearchList; - - if ( sContainer.Len() > 0 ) - { - // get the Project associated with the Container - if ( xPrjNameCache.is() ) - { - if ( xPrjNameCache->hasByName( sContainer ) ) - { - rtl::OUString sProject; - xPrjNameCache->getByName( sContainer ) >>= sProject; - sContainer = sProject; - } - } - sSearchList.push_back( sContainer ); // First Lib to search - } - else - { - // Ok, if we have no Container specified then we need to search them in order, this document, template this document created from, global templates, - // get the name of Project/Library for 'this' document - rtl::OUString sThisProject; - BasicManager* pBasicMgr = pShell-> GetBasicManager(); - if ( pBasicMgr ) - { - if ( pBasicMgr->GetName().Len() ) - sThisProject = pBasicMgr->GetName(); - else // cater for the case where VBA is not enabled - sThisProject = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Standard") ); - } - sSearchList.push_back( sThisProject ); // First Lib to search - if ( xPrjNameCache.is() ) - { - // is this document created from a template? - uno::Reference< document::XDocumentInfoSupplier > xDocInfoSupp( pShell->GetModel(), uno::UNO_QUERY_THROW ); - uno::Reference< document::XDocumentPropertiesSupplier > xDocPropSupp( xDocInfoSupp->getDocumentInfo(), uno::UNO_QUERY_THROW ); - uno::Reference< document::XDocumentProperties > xDocProps( xDocPropSupp->getDocumentProperties(), uno::UNO_QUERY_THROW ); - - rtl::OUString sCreatedFrom = xDocProps->getTemplateURL(); - if ( sCreatedFrom.getLength() ) - { - INetURLObject aObj; - aObj.SetURL( sCreatedFrom ); - bool bIsURL = aObj.GetProtocol() != INET_PROT_NOT_VALID; - rtl::OUString aURL; - if ( bIsURL ) - aURL = sCreatedFrom; - else - { - osl::FileBase::getFileURLFromSystemPath( sCreatedFrom, aURL ); - aObj.SetURL( aURL ); - } - sCreatedFrom = aObj.GetLastName(); - } - - sal_Int32 nIndex = sCreatedFrom.lastIndexOf( '.' ); - if ( nIndex != -1 ) - sCreatedFrom = sCreatedFrom.copy( 0, nIndex ); - - rtl::OUString sPrj; - if ( sCreatedFrom.getLength() && xPrjNameCache->hasByName( sCreatedFrom ) ) - { - xPrjNameCache->getByName( sCreatedFrom ) >>= sPrj; - // Make sure we don't double up with this project - if ( !sPrj.equals( sThisProject ) ) - sSearchList.push_back( sPrj ); - } - - // get list of global template Names - uno::Sequence< rtl::OUString > sTemplateNames = xPrjNameCache->getElementNames(); - sal_Int32 nLen = sTemplateNames.getLength(); - for ( sal_Int32 index = 0; ( bSearchGlobalTemplates && index < nLen ); ++index ) - { - - if ( !sCreatedFrom.equals( sTemplateNames[ index ] ) ) - { - if ( xPrjNameCache->hasByName( sTemplateNames[ index ] ) ) - { - xPrjNameCache->getByName( sTemplateNames[ index ] ) >>= sPrj; - // Make sure we don't double up with this project - if ( !sPrj.equals( sThisProject ) ) - sSearchList.push_back( sPrj ); - } - } - - } - } - } - std::vector< rtl::OUString >::iterator it_end = sSearchList.end(); - for ( std::vector< rtl::OUString >::iterator it = sSearchList.begin(); it != it_end; ++it ) - { - bool bRes = hasMacro( pShell, *it, sModule, sProcedure ); - if ( bRes ) - { - aRes.SetResolved( true ); - aRes.SetMacroDocContext( pShell ); - sContainer = *it; - break; - } - } - } - aRes.SetResolvedMacro( sProcedure.Insert( '.', 0 ).Insert( sModule, 0).Insert( '.', 0 ).Insert( sContainer, 0 ) ); - - return aRes; -} - -// Treat the args as possible inouts ( convertion at bottom of method ) -sal_Bool executeMacro( SfxObjectShell* pShell, const String& sMacroName, uno::Sequence< uno::Any >& aArgs, uno::Any& /*aRet*/, const uno::Any& aCaller ) -{ - sal_Bool bRes = sal_False; - if ( !pShell ) - return bRes; - rtl::OUString sUrl = makeMacroURL( sMacroName ); - - uno::Sequence< sal_Int16 > aOutArgsIndex; - uno::Sequence< uno::Any > aOutArgs; - - try - { - uno::Reference< script::provider::XScriptProvider > xScriptProvider; - uno::Reference< script::provider::XScriptProviderSupplier > xSPS( pShell->GetModel(), uno::UNO_QUERY_THROW ); - - xScriptProvider.set( xSPS->getScriptProvider(), uno::UNO_QUERY_THROW ); - - uno::Reference< script::provider::XScript > xScript( xScriptProvider->getScript( sUrl ), uno::UNO_QUERY_THROW ); - - if ( aCaller.hasValue() ) - { - uno::Reference< beans::XPropertySet > xProps( xScript, uno::UNO_QUERY ); - if ( xProps.is() ) - { - uno::Sequence< uno::Any > aCallerHack(1); - aCallerHack[ 0 ] = aCaller; - xProps->setPropertyValue( rtl::OUString::createFromAscii( "Caller" ), uno::makeAny( aCallerHack ) ); - } - } - - - xScript->invoke( aArgs, aOutArgsIndex, aOutArgs ); - - sal_Int32 nLen = aOutArgs.getLength(); - // convert any out params to seem like they were inouts - if ( nLen ) - { - for ( sal_Int32 index=0; index < nLen; ++index ) - { - sal_Int32 nOutIndex = aOutArgsIndex[ index ]; - aArgs[ nOutIndex ] = aOutArgs[ index ]; - } - } - - bRes = sal_True; - } - catch ( uno::Exception& e ) - { - bRes = sal_False; - } - return bRes; -} -} } // vba // ooo diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index 7f8e563cbab6..54b635d2f08d 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -34,7 +34,7 @@ #include #include "vbacommandbars.hxx" -#include +#include // start basic includes #include diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx index e081a723db04..a4bb3adc7dbf 100644 --- a/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx +++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.cxx @@ -27,7 +27,7 @@ #include "vbacommandbarcontrol.hxx" #include "vbacommandbarcontrols.hxx" #include -#include +#include using namespace com::sun::star; using namespace ooo::vba; diff --git a/vbahelper/util/makefile.mk b/vbahelper/util/makefile.mk index 09f3866c5439..7af48db00aff 100644 --- a/vbahelper/util/makefile.mk +++ b/vbahelper/util/makefile.mk @@ -56,6 +56,7 @@ SHL1STDLIBS= \ $(SVLLIB) \ $(VCLLIB) \ $(SVTOOLLIB) \ + $(MSFILTERLIB) \ $(TKLIB) SHL1DEPN= -- cgit From c0ae58c88aa461c9c26cddb89b071151b2d41361 Mon Sep 17 00:00:00 2001 From: npower Developer Date: Tue, 2 Mar 2010 16:13:21 +0000 Subject: npower13_objectmodule: #i109734# resolve macros after basic is loaded, fix error with 'Me' rtlfunc --- basic/source/runtime/methods1.cxx | 1 - 1 file changed, 1 deletion(-) diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 3a234b78e1df..dbdeee8197c2 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -2598,7 +2598,6 @@ RTLFUNC(Me) SbxVariableRef refVar = rPar.Get(0); if( pClassModuleObject == NULL ) { - StarBASIC::Error( SbERR_INVALID_USAGE_OBJECT ); SbObjModule* pMod = PTR_CAST(SbObjModule,pActiveModule); if ( pMod ) refVar->PutObject( pMod ); -- cgit From 5463a4524594257bbbec5d953d97ab668310493e Mon Sep 17 00:00:00 2001 From: npower Developer Date: Wed, 3 Mar 2010 16:47:55 +0000 Subject: npower13_objectmodule: some cleanup --- vbahelper/source/vbahelper/vbaglobalbase.cxx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/vbahelper/source/vbahelper/vbaglobalbase.cxx b/vbahelper/source/vbahelper/vbaglobalbase.cxx index 2bb9d2f4a7ad..c7c33b93b1a3 100644 --- a/vbahelper/source/vbahelper/vbaglobalbase.cxx +++ b/vbahelper/source/vbahelper/vbaglobalbase.cxx @@ -85,14 +85,8 @@ VbaGlobalsBase::createInstanceWithArguments( const ::rtl::OUString& ServiceSpeci { uno::Reference< uno::XInterface > xReturn; - OSL_TRACE("VbaGlobalsBase::createInstanceWithArguments(%s)", rtl::OUStringToOString( ServiceSpecifier, RTL_TEXTENCODING_UTF8 ).getStr() ); if ( hasServiceName( ServiceSpecifier ) ) - { - OSL_TRACE("VbaGlobalsBase::hasServiceName(%s) - true", rtl::OUStringToOString( ServiceSpecifier, RTL_TEXTENCODING_UTF8 ).getStr() ); xReturn = mxContext->getServiceManager()->createInstanceWithArgumentsAndContext( ServiceSpecifier, Arguments, mxContext ); - } - else - OSL_TRACE("VbaGlobalsBase::hasServiceName(%s) - false", rtl::OUStringToOString( ServiceSpecifier, RTL_TEXTENCODING_UTF8 ).getStr() ); return xReturn; } -- cgit From ce38eff222baa68d1eb31c4e72da381453d9fd0f Mon Sep 17 00:00:00 2001 From: npower Developer Date: Fri, 5 Mar 2010 20:14:25 +0000 Subject: npower13_objectmodule: wae fixes --- basic/source/classes/sbxmod.cxx | 7 +++---- basic/source/uno/namecont.cxx | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index fceda108bbd8..622083bd58cc 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1561,10 +1561,9 @@ class FormObjEventListenerImpl : public EventListener_BASE public: FormObjEventListenerImpl( SbUserFormModule* pUserForm, const uno::Reference< lang::XComponent >& xComponent ) : mpUserForm( pUserForm ), mxComponent( xComponent) , mbDisposed( false ), mbOpened( sal_False ), mbActivated( sal_False ), mbShowing( sal_False ) { - if ( mxComponent.is() ); + if ( mxComponent.is() ) { uno::Reference< awt::XTopWindow > xList( mxComponent, uno::UNO_QUERY_THROW );; - //uno::Reference< awt::XWindow > xList( mxComponent, uno::UNO_QUERY_THROW );; OSL_TRACE("*********** Registering the listener"); xList->addTopWindowListener( this ); } @@ -1604,7 +1603,7 @@ public: } //liuchen 2009-7-21, support Excel VBA Form_QueryClose event - virtual void SAL_CALL windowClosing( const lang::EventObject& e ) throw (uno::RuntimeException) + virtual void SAL_CALL windowClosing( const lang::EventObject& /*e*/ ) throw (uno::RuntimeException) { #if IN_THE_FUTURE uno::Reference< awt::XDialog > xDialog( e.Source, uno::UNO_QUERY ); @@ -1694,7 +1693,7 @@ void SbUserFormModule::triggerMethod( const String& aMethodToRun ) Sequence< Any > aArguments; triggerMethod( aMethodToRun, aArguments ); } -void SbUserFormModule::triggerMethod( const String& aMethodToRun, Sequence< Any >& aArguments) +void SbUserFormModule::triggerMethod( const String& aMethodToRun, Sequence< Any >& /*aArguments*/) { OSL_TRACE("*** trigger %s ***", rtl::OUStringToOString( aMethodToRun, RTL_TEXTENCODING_UTF8 ).getStr() ); // Search method diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 05134620f173..7b1839089bf9 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -326,12 +326,13 @@ DBG_NAME( SfxLibraryContainer ) // Ctor SfxLibraryContainer::SfxLibraryContainer( void ) : LibraryContainerHelper( maMutex ) + , mbVBACompat( sal_False ) , maModifiable( *this, maMutex ) , maNameContainer( getCppuType( (Reference< XNameAccess >*) NULL ) ) , mbOldInfoFormat( sal_False ) , mbOasis2OOoFormat( sal_False ) , mpBasMgr( NULL ) - , mbOwnBasMgr( sal_False ), mbVBACompat( sal_False ) + , mbOwnBasMgr( sal_False ) { DBG_CTOR( SfxLibraryContainer, NULL ); -- cgit From 9f499571a0c9956800be594af064e3ae7832f2ac Mon Sep 17 00:00:00 2001 From: npower Developer Date: Mon, 8 Mar 2010 23:24:53 +0000 Subject: npower13objectmodules: clean build breaks vbahelper/filter --- vbahelper/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vbahelper/prj/build.lst b/vbahelper/prj/build.lst index 0db5274b7ad3..20001db859c8 100644 --- a/vbahelper/prj/build.lst +++ b/vbahelper/prj/build.lst @@ -1,4 +1,4 @@ -vba vbahelper : oovbaapi basic sfx2 svx cppuhelper vcl comphelper svtools tools sal NULL +vba vbahelper : oovbaapi basic sfx2 svx filter cppuhelper vcl comphelper svtools tools sal NULL vba vbahelper usr1 - all vba_mkout NULL #vba vbahelper\inc nmake - all vba_inc NULL vba vbahelper\source\vbahelper nmake - all vba_vbahelper NULL -- cgit From caca8795c922c99729d2547c38277f46a7241453 Mon Sep 17 00:00:00 2001 From: npower Developer Date: Tue, 9 Mar 2010 10:00:03 +0000 Subject: npower13objectmodules: wae (wntmsci12.pro) --- basic/inc/basic/sbmod.hxx | 8 ++++---- basic/source/classes/sbxmod.cxx | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx index 81548198726b..ba468b252d2a 100644 --- a/basic/inc/basic/sbmod.hxx +++ b/basic/inc/basic/sbmod.hxx @@ -64,7 +64,7 @@ protected: SbiImage* pImage; // the Image SbiBreakpoints* pBreaks; // Breakpoints SbClassData* pClassData; - bool mbVBACompat; + BOOL mbVBACompat; INT32 mnType; SbxObjectRef pDocObject; // an impl object ( used by Document Modules ) bool bIsProxyModule; @@ -92,7 +92,7 @@ protected: public: SBX_DECL_PERSIST_NODATA(SBXCR_SBX,SBXID_BASICMOD,2); TYPEINFO(); - SbModule( const String&, bool bCompat = false ); + SbModule( const String&, BOOL bCompat = FALSE ); virtual void SetParent( SbxObject* ); virtual void Clear(); @@ -128,8 +128,8 @@ public: BOOL LoadBinaryData( SvStream& ); BOOL ExceedsLegacyModuleSize(); void fixUpMethodStart( bool bCvtToLegacy, SbiImage* pImg = NULL ) const; - bool IsVBACompat(); - void SetVBACompat( bool bCompat ); + BOOL IsVBACompat(); + void SetVBACompat( BOOL bCompat ); INT32 GetModuleType() { return mnType; } void SetModuleType( INT32 nType ) { mnType = nType; } bool GetIsProxyModule() { return bIsProxyModule; } diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 622083bd58cc..87855035eb2e 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -159,7 +159,7 @@ bool UnlockControllerHack( StarBASIC* pBasic ) // Ein BASIC-Modul hat EXTSEARCH gesetzt, damit die im Modul enthaltenen // Elemente von anderen Modulen aus gefunden werden koennen. -SbModule::SbModule( const String& rName, bool bVBACompat ) +SbModule::SbModule( const String& rName, BOOL bVBACompat ) : SbxObject( String( RTL_CONSTASCII_USTRINGPARAM("StarBASICModule") ) ), pImage( NULL ), pBreaks( NULL ), pClassData( NULL ), mbVBACompat( bVBACompat ), pDocObject( NULL ), bIsProxyModule( false ) { @@ -609,12 +609,12 @@ void ClearUnoObjectsInRTL_Impl( StarBASIC* pBasic ) if( ((StarBASIC*)p) != pBasic ) ClearUnoObjectsInRTL_Impl_Rek( (StarBASIC*)p ); } -bool SbModule::IsVBACompat() +BOOL SbModule::IsVBACompat() { return mbVBACompat; } -void SbModule::SetVBACompat( bool bCompat ) +void SbModule::SetVBACompat( BOOL bCompat ) { mbVBACompat = bCompat; } -- cgit From c3abbdcbdea614005f77fb0276dfa9da69f31878 Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 9 Mar 2010 17:31:37 +0100 Subject: sb120: #i109978# removed --disable-qadevooo --- connectivity/prj/build.lst | 2 +- connectivity/qa/connectivity/tools/makefile.mk | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/connectivity/prj/build.lst b/connectivity/prj/build.lst index dd386c7c7161..0b15c06acf15 100644 --- a/connectivity/prj/build.lst +++ b/connectivity/prj/build.lst @@ -1,4 +1,4 @@ -cn connectivity : shell l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb QADEVOOO:qadevOOo officecfg NSS:nss NULL +cn connectivity : shell l10n comphelper MOZ:moz SO:moz_prebuilt svl UNIXODBC:unixODBC unoil javaunohelper HSQLDB:hsqldb qadevOOo officecfg NSS:nss NULL cn connectivity usr1 - all cn_mkout NULL cn connectivity\inc nmake - all cn_inc NULL cn connectivity\com\sun\star\sdbcx\comp\hsqldb nmake - all cn_jhsqldbdb cn_hsqldb cn_inc NULL diff --git a/connectivity/qa/connectivity/tools/makefile.mk b/connectivity/qa/connectivity/tools/makefile.mk index 0f3c9c84b92e..07490532a1b1 100644 --- a/connectivity/qa/connectivity/tools/makefile.mk +++ b/connectivity/qa/connectivity/tools/makefile.mk @@ -38,7 +38,6 @@ all: @echo "Java not available. Build skipped" .ELSE -.IF "$(BUILD_QADEVOOO)" == "YES" #----- compile .java files ----------------------------------------- JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunnerLight.jar @@ -61,8 +60,6 @@ ALL : ALLTAR ALL: ALLDEP .ENDIF -.ENDIF - .ENDIF # "$(SOLAR_JAVA)" == "" .INCLUDE : target.mk -- cgit From d9cc9a33542bee1e661f4b8edbc1a56175a01120 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 11 Mar 2010 11:16:48 +0000 Subject: sdfindall: #i46270# remove find all button in draw/impress --- svx/source/dialog/srchdlg.cxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 5f3aa24394a3..01dc2c0591cc 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -831,6 +831,18 @@ void SvxSearchDialog::CalculateDelta_Impl() pMoreBtn->AddWindow( &aNoFormatBtn ); } + if (bDrawApp || bImpressApp) + { + // "Find All" button is hidden--align "Find" vertically to the + // search listbox + Point aNewPt(aSearchBtn.GetPosPixel()); + const Size aBtnSz(aSearchBtn.GetSizePixel()); + const Size aLBSz(aSearchLB.GetSizePixel()); + const int nOff((aLBSz.Height() - aBtnSz.Height()) / 2); + aNewPt.Y() = aSearchLB.GetPosPixel().Y() + nOff; + aSearchBtn.SetPosPixel(aNewPt); + } + if ( bDrawApp ) { // Draw App: "Regular expressions" and "Search for Styles" check boxes are hidden @@ -1016,6 +1028,8 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) if ( pSearchItem->GetAppFlag() == SVX_SEARCHAPP_DRAW ) { + aSearchAllBtn.Hide(); + aRegExpBtn.Hide(); aLayoutBtn.Hide(); -- cgit From fbf42f650eca6002756deb47d051257a4672c680 Mon Sep 17 00:00:00 2001 From: Mikhail Voytenko Date: Wed, 17 Mar 2010 11:59:34 +0100 Subject: #i109668# let the default filter be used for export --- sfx2/source/doc/guisaveas.cxx | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index cbd269b41516..6ee4d7f78e17 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -836,9 +836,16 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode, ::rtl::OUString aAdjustToType; - // bSetStandardName == true means that user agreed to store document in the default (default default ;-)) format - if ( !(( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED )) && - ( bSetStandardName || GetStorable()->hasLocation() )) + if ( ( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED ) ) + { + // it is export, set the preselected filter + ::rtl::OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault( + ::rtl::OUString::createFromAscii( "UIName" ), + ::rtl::OUString() ); + pFileDlg->SetCurrentFilter( aFilterUIName ); + } + // it is no export, bSetStandardName == true means that user agreed to store document in the default (default default ;-)) format + else if ( bSetStandardName || GetStorable()->hasLocation() ) { uno::Sequence< beans::PropertyValue > aOldFilterProps; ::rtl::OUString aOldFilterName = GetDocProps().getUnpackedValueOrDefault( @@ -1570,8 +1577,10 @@ uno::Sequence< beans::PropertyValue > SfxStoringHelper::SearchForFilter( uno::Reference< container::XEnumeration > xFilterEnum = xFilterQuery->createSubSetEnumerationByProperties( aSearchRequest ); - // use the first filter that is found + // the first default filter will be taken, + // if there is no filter with flag default the first acceptable filter will be taken if ( xFilterEnum.is() ) + { while ( xFilterEnum->hasMoreElements() ) { uno::Sequence< beans::PropertyValue > aProps; @@ -1582,11 +1591,17 @@ uno::Sequence< beans::PropertyValue > SfxStoringHelper::SearchForFilter( (sal_Int32)0 ); if ( ( ( nFlags & nMustFlags ) == nMustFlags ) && !( nFlags & nDontFlags ) ) { - aFilterProps = aProps; - break; + if ( ( nFlags & SFX_FILTER_DEFAULT ) == SFX_FILTER_DEFAULT ) + { + aFilterProps = aProps; + break; + } + else if ( !aFilterProps.getLength() ) + aFilterProps = aProps; } } } + } return aFilterProps; } -- cgit From de4206aebc147755cda52f369571a2a4c212e4df Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 26 Mar 2010 19:05:51 +0100 Subject: sw33bf03: #i107240#: SvXMLMetaExport: export elements without whitespace --- xmloff/source/meta/xmlmetae.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xmloff/source/meta/xmlmetae.cxx b/xmloff/source/meta/xmlmetae.cxx index a124a7c016d1..7b6ab702875c 100644 --- a/xmloff/source/meta/xmlmetae.cxx +++ b/xmloff/source/meta/xmlmetae.cxx @@ -478,7 +478,9 @@ SvXMLMetaExport::startElement(const ::rtl::OUString & i_rName, } // finally, start the element - mrExport.StartElement(i_rName, sal_True); //FIXME:whitespace? + // #i107240# no whitespace here, because the DOM may already contain + // whitespace, which is not cleared when loading and thus accumulates. + mrExport.StartElement(i_rName, (m_level > 1) ? sal_False : sal_True); ++m_level; } -- cgit From da50ceb5c035c8b70b4483d32e02851902bd7421 Mon Sep 17 00:00:00 2001 From: npower Developer Date: Mon, 29 Mar 2010 09:39:35 +0100 Subject: ab75: #i110417# initial ( untested ) implementation --- basic/inc/basic/sberrors.hxx | 3 + basic/source/classes/errobject.cxx | 181 +++++++++++++++++++++++++++++++++++++ basic/source/classes/makefile.mk | 18 +++- basic/source/classes/sb.cxx | 1 + basic/source/classes/sb.src | 6 ++ basic/source/inc/errobject.hxx | 16 ++++ basic/source/runtime/runtime.cxx | 32 +++++++ basic/source/runtime/stdobj.cxx | 6 ++ basic/source/runtime/step0.cxx | 8 +- basic/source/runtime/step1.cxx | 4 + 10 files changed, 270 insertions(+), 5 deletions(-) create mode 100644 basic/source/classes/errobject.cxx create mode 100644 basic/source/inc/errobject.hxx diff --git a/basic/inc/basic/sberrors.hxx b/basic/inc/basic/sberrors.hxx index c21b3b0237b8..c34176e0bde7 100644 --- a/basic/inc/basic/sberrors.hxx +++ b/basic/inc/basic/sberrors.hxx @@ -287,6 +287,8 @@ typedef ULONG SbError; #define ERRCODE_BASIC_LOOP_NOT_INIT ((LAST_SBX_ERROR_ID+109UL) | ERRCODE_AREA_SBX | \ ERRCODE_CLASS_COMPILER) // For loop not initialized +#define ERRCODE_BASIC_COMPAT ((LAST_SBX_ERROR_ID+103UL)| ERRCODE_AREA_SBX | ERRCODE_CLASS_RUNTIME) + // Map old codes to new codes #define SbERR_SYNTAX ERRCODE_BASIC_SYNTAX #define SbERR_NO_GOSUB ERRCODE_BASIC_NO_GOSUB @@ -410,6 +412,7 @@ typedef ULONG SbError; #define SbERR_PROG_TOO_LARGE ERRCODE_BASIC_PROG_TOO_LARGE #define SbERR_NO_STRINGS_ARRAYS ERRCODE_BASIC_NO_STRINGS_ARRAYS #define SbERR_BASIC_EXCEPTION ERRCODE_BASIC_EXCEPTION +#define SbERR_BASIC_COMPAT ERRCODE_BASIC_COMPAT #define SbERR_BASIC_ARRAY_FIX ERRCODE_BASIC_ARRAY_FIX #define SbERR_BASIC_STRING_OVERFLOW ERRCODE_BASIC_STRING_OVERFLOW #define SbERR_BASIC_EXPR_TOO_COMPLEX ERRCODE_BASIC_EXPR_TOO_COMPLEX diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx new file mode 100644 index 000000000000..dc62e65b6945 --- /dev/null +++ b/basic/source/classes/errobject.cxx @@ -0,0 +1,181 @@ +// MARKER(update_precomp.py): autogen include statement, do not remove +#include "precompiled_basic.hxx" +#include "errobject.hxx" + +#include +#include +#include "sbintern.hxx" +#include "runtime.hxx" + +using namespace ::com::sun::star; +using namespace ::ooo; + +typedef ::cppu::WeakImplHelper2< vba::XErrObject, script::XDefaultProperty > ErrObjectImpl_BASE; + +class ErrObject : public ErrObjectImpl_BASE +{ + rtl::OUString m_sHelpFile; + rtl::OUString m_sSource; + rtl::OUString m_sDescription; + sal_Int32 m_nNumber; + sal_Int32 m_nHelpContext; + +public: + ErrObject(); + ~ErrObject(); + // Attributes + virtual ::sal_Int32 SAL_CALL getNumber() throw (uno::RuntimeException); + virtual void SAL_CALL setNumber( ::sal_Int32 _number ) throw (uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getHelpContext() throw (uno::RuntimeException); + virtual void SAL_CALL setHelpContext( ::sal_Int32 _helpcontext ) throw (uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getHelpFile() throw (uno::RuntimeException); + virtual void SAL_CALL setHelpFile( const ::rtl::OUString& _helpfile ) throw (uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getDescription() throw (uno::RuntimeException); + virtual void SAL_CALL setDescription( const ::rtl::OUString& _description ) throw (uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getSource() throw (uno::RuntimeException); + virtual void SAL_CALL setSource( const ::rtl::OUString& _source ) throw (uno::RuntimeException); + + // Methods + virtual void SAL_CALL Clear( ) throw (uno::RuntimeException); + virtual void SAL_CALL Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) throw (uno::RuntimeException); + // XDefaultProperty + virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (uno::RuntimeException); +}; + + +ErrObject::~ErrObject() +{ +} + +ErrObject::ErrObject() : m_nNumber(0), m_nHelpContext(0) +{ +} + +sal_Int32 SAL_CALL +ErrObject::getNumber() throw (uno::RuntimeException) +{ + return m_nNumber; +} + +void SAL_CALL +ErrObject::setNumber( ::sal_Int32 _number ) throw (uno::RuntimeException) +{ + m_nNumber = _number; + + +} + +::sal_Int32 SAL_CALL +ErrObject::getHelpContext() throw (uno::RuntimeException) +{ + return m_nHelpContext; +} +void SAL_CALL +ErrObject::setHelpContext( ::sal_Int32 _helpcontext ) throw (uno::RuntimeException) +{ + m_nHelpContext = _helpcontext; +} + +::rtl::OUString SAL_CALL +ErrObject::getHelpFile() throw (uno::RuntimeException) +{ + return m_sHelpFile; +} + +void SAL_CALL +ErrObject::setHelpFile( const ::rtl::OUString& _helpfile ) throw (uno::RuntimeException) +{ + m_sHelpFile = _helpfile; +} + +::rtl::OUString SAL_CALL +ErrObject::getDescription() throw (uno::RuntimeException) +{ + return m_sDescription; +} + +void SAL_CALL +ErrObject::setDescription( const ::rtl::OUString& _description ) throw (uno::RuntimeException) +{ + m_sDescription = _description; +} + +::rtl::OUString SAL_CALL +ErrObject::getSource() throw (uno::RuntimeException) +{ + return m_sSource; +} + +void SAL_CALL +ErrObject::setSource( const ::rtl::OUString& _source ) throw (uno::RuntimeException) +{ + m_sSource = _source; +} + +// Methods +void SAL_CALL +ErrObject::Clear( ) throw (uno::RuntimeException) +{ + m_sHelpFile = rtl::OUString(); + m_sSource = m_sHelpFile; + m_sDescription = m_sSource; + m_nNumber = 0; + m_nHelpContext = 0; +} + +void SAL_CALL +ErrObject::Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) throw (uno::RuntimeException) +{ + if ( !Number.hasValue() ) + throw uno::RuntimeException( rtl::OUString::createFromAscii("Missing Required Paramater"), uno::Reference< uno::XInterface >() ); + Description >>= m_sDescription; + Source >>= m_sSource; + HelpFile >>= m_sHelpFile; + HelpContext >>= m_nHelpContext; + Number >>= m_nNumber; + if ( m_nNumber ) + { + SbError n = StarBASIC::GetSfxFromVBError( m_nNumber ); + if ( !n ) + n = m_nNumber; // force orig number, probably should have a specific table of vb ( localized ) errors + pINST->Error( n, m_sDescription ); + } +} + +// XDefaultProperty +::rtl::OUString SAL_CALL +ErrObject::getDefaultPropertyName( ) throw (uno::RuntimeException) +{ + static rtl::OUString sDfltPropName( RTL_CONSTASCII_USTRINGPARAM("Number") ); + return sDfltPropName; +} + +// SbxErrObject +SbxErrObject::SbxErrObject( const String& rName, const Any& rUnoObj ): SbUnoObject( rName, rUnoObj ) +{ + OSL_TRACE("SbxErrObject::SbxErrObject ctor"); + rUnoObj >>= m_xErr; + if ( m_xErr.is() ) + SetDfltProperty( uno::Reference< script::XDefaultProperty >( m_xErr, uno::UNO_QUERY_THROW )->getDefaultPropertyName() ) ; +} + +SbxErrObject::~SbxErrObject() +{ + OSL_TRACE("SbxErrObject::~SbxErrObject dtor"); +} + +uno::Reference< vba::XErrObject > +SbxErrObject::getUnoErrObject() +{ + SbxVariable* pVar = getErrObject(); + SbxErrObject* pGlobErr = static_cast< SbxErrObject* >( pVar ); + return pGlobErr->m_xErr; +} + +SbxVariableRef +SbxErrObject::getErrObject() +{ + static SbxVariableRef pGlobErr = new SbxErrObject( String( RTL_CONSTASCII_USTRINGPARAM("Err")), uno::makeAny( uno::Reference< vba::XErrObject >( new ErrObject() ) ) ); + return pGlobErr; +} + diff --git a/basic/source/classes/makefile.mk b/basic/source/classes/makefile.mk index eb5486f02abf..e00ed4674cc1 100644 --- a/basic/source/classes/makefile.mk +++ b/basic/source/classes/makefile.mk @@ -37,18 +37,28 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk +ALLTAR .SEQUENTIAL : \ + $(MISC)$/$(TARGET).don \ + $(MISC)$/$(TARGET).slo + +$(MISC)$/$(TARGET).don : $(SOLARBINDIR)$/oovbaapi.rdb + +$(CPPUMAKER) -O$(OUT)$/inc -BUCR $(SOLARBINDIR)$/oovbaapi.rdb -X$(SOLARBINDIR)$/types.rdb && echo > $@ + echo $@ + +$(MISC)$/$(TARGET).slo : $(SLOTARGET) + echo $@ + # --- Allgemein ----------------------------------------------------------- -COMMON_SLOFILES= \ +SLOFILES= \ $(SLO)$/sb.obj \ $(SLO)$/sbxmod.obj \ $(SLO)$/image.obj \ $(SLO)$/sbintern.obj \ $(SLO)$/sbunoobj.obj \ $(SLO)$/propacc.obj \ - $(SLO)$/disas.obj - -SLOFILES= $(COMMON_SLOFILES) \ + $(SLO)$/disas.obj \ + $(SLO)$/errobject.obj \ $(SLO)$/eventatt.obj OBJFILES= \ diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index c5ac53c43092..60f4de70c2be 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -215,6 +215,7 @@ const SFX_VB_ErrorItem __FAR_DATA SFX_VB_ErrorTab[] = { 1004, SbERR_METHOD_FAILED }, { 1005, SbERR_SETPROP_FAILED }, { 1006, SbERR_GETPROP_FAILED }, + { 1007, SbERR_BASIC_COMPAT }, { 0xFFFF, 0xFFFFFFFFL } // End mark }; diff --git a/basic/source/classes/sb.src b/basic/source/classes/sb.src index 926da0359d7e..41ae03d9934f 100644 --- a/basic/source/classes/sb.src +++ b/basic/source/classes/sb.src @@ -588,6 +588,12 @@ Resource RID_BASIC_START { Text [ en-US ] = "For loop not initialized." ; }; + String ERRCODE_BASIC_COMPAT & ERRCODE_RES_MASK + { + Text [ de ] = "$(ARG1)." ; + Text [ en-US ] = "$(ARG1)." ; + Text [ x-comment ] = " "; + }; }; // Hinweis: IDS_SBERR_TERMINATED = IDS_SBERR_START+2000. String IDS_SBERR_TERMINATED diff --git a/basic/source/inc/errobject.hxx b/basic/source/inc/errobject.hxx new file mode 100644 index 000000000000..51d4b6caa4f9 --- /dev/null +++ b/basic/source/inc/errobject.hxx @@ -0,0 +1,16 @@ +#ifndef ERROBJECT_HXX +#define ERROBJECT_HXX +#include "sbunoobj.hxx" +#include + + +class SbxErrObject : public SbUnoObject +{ + com::sun::star::uno::Reference< ooo::vba::XErrObject > m_xErr; + SbxErrObject( const String& aName_, const com::sun::star::uno::Any& aUnoObj_ ); + ~SbxErrObject(); +public: + static SbxVariableRef getErrObject(); + static com::sun::star::uno::Reference< ooo::vba::XErrObject > getUnoErrObject(); +}; +#endif diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 52aa76e2f2df..75ff47c73486 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -43,6 +43,7 @@ #include #include #include "sbunoobj.hxx" +#include "errobject.hxx" bool SbiRuntime::isVBAEnabled() { @@ -794,7 +795,38 @@ BOOL SbiRuntime::Step() void SbiRuntime::Error( SbError n ) { if( n ) + { nError = n; + if ( isVBAEnabled() ) + { + String aMsg = pInst->GetErrorMsg(); + // If a message is defined use that ( in preference to + // the defined one for the error ) NB #TODO + // if there is an error defined it more than likely + // is not the one you want ( some are the same though ) + // we really need a new vba compatible error list + if ( !aMsg.Len() ) + { + StarBASIC::MakeErrorText( n, aMsg ); + aMsg = StarBASIC::GetErrorText(); + if ( !aMsg.Len() ) // no message for err no. + // need localized resource here + aMsg = String( RTL_CONSTASCII_USTRINGPARAM("Internal Object Error:") ); + } + // no num? most likely then it *is* really a vba err + SbxErrObject::getUnoErrObject()->setNumber( ( StarBASIC::GetVBErrorCode( n ) == 0 ) ? n : StarBASIC::GetVBErrorCode( n ) ); + SbxErrObject::getUnoErrObject()->setDescription( aMsg ); + + // prepend an error number to the message. + String aTmp = '\''; + aTmp += String::CreateFromInt32( SbxErrObject::getUnoErrObject()->getNumber() ); + aTmp += String( RTL_CONSTASCII_USTRINGPARAM("\'\n") ); + aTmp += aMsg; + + pInst->aErrorMsg = aTmp; + nError = SbERR_BASIC_COMPAT; + } + } } void SbiRuntime::Error( SbError _errCode, const String& _details ) diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx index c0b4ffa3cd59..d2585501c826 100644 --- a/basic/source/runtime/stdobj.cxx +++ b/basic/source/runtime/stdobj.cxx @@ -33,6 +33,7 @@ #include #include "rtlproto.hxx" #include "sbintern.hxx" +#include "errobject.hxx" // Das nArgs-Feld eines Tabelleneintrags ist wie folgt verschluesselt: // Zur Zeit wird davon ausgegangen, dass Properties keine Parameter @@ -652,6 +653,11 @@ SbiStdObject::~SbiStdObject() SbxVariable* SbiStdObject::Find( const String& rName, SbxClassType t ) { + // #TODO #FIXME hack for substituting ooo-basic Err with vba-ish + // ErrObject object + static String sErr( RTL_CONSTASCII_USTRINGPARAM("Err") ); + if ( rName.EqualsIgnoreCaseAscii( sErr ) ) + return SbxErrObject::getErrObject(); // Bereits eingetragen? SbxVariable* pVar = SbxObject::Find( rName, t ); if( !pVar ) diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index 33df854a4499..b432d1851ed5 100644 --- a/basic/source/runtime/step0.cxx +++ b/basic/source/runtime/step0.cxx @@ -30,6 +30,7 @@ #include #include +#include "errobject.hxx" #include "runtime.hxx" #include "sbintern.hxx" #include "iosys.hxx" @@ -1116,6 +1117,7 @@ void SbiRuntime::StepSTDERROR() pInst->nErr = 0L; pInst->nErl = 0; nError = 0L; + SbxErrObject::getUnoErrObject()->Clear(); } void SbiRuntime::StepNOERROR() @@ -1124,6 +1126,7 @@ void SbiRuntime::StepNOERROR() pInst->nErr = 0L; pInst->nErl = 0; nError = 0L; + SbxErrObject::getUnoErrObject()->Clear(); bError = FALSE; } @@ -1132,6 +1135,9 @@ void SbiRuntime::StepNOERROR() void SbiRuntime::StepLEAVE() { bRun = FALSE; + // If VBA and we are leaving an ErrorHandler then clear the error ( it's been processed ) + if ( bInError && pError ) + SbxErrObject::getUnoErrObject()->Clear(); } void SbiRuntime::StepCHANNEL() // TOS = Kanalnummer @@ -1265,6 +1271,6 @@ void SbiRuntime::StepERROR() SbxVariableRef refCode = PopVar(); USHORT n = refCode->GetUShort(); SbError error = StarBASIC::GetSfxFromVBError( n ); - Error( error ); + pInst->Error( error ); } diff --git a/basic/source/runtime/step1.cxx b/basic/source/runtime/step1.cxx index 399257cf6ad3..2161f3d1dd09 100644 --- a/basic/source/runtime/step1.cxx +++ b/basic/source/runtime/step1.cxx @@ -35,6 +35,7 @@ #include "iosys.hxx" #include "image.hxx" #include "sbunoobj.hxx" +#include "errobject.hxx" bool checkUnoObjectType( SbUnoObject* refVal, const String& aClass ); @@ -360,6 +361,7 @@ void SbiRuntime::StepERRHDL( UINT32 nOp1 ) pInst->nErr = 0; pInst->nErl = 0; nError = 0; + SbxErrObject::getUnoErrObject()->Clear(); } // Resume nach Fehlern (+0=statement, 1=next or Label) @@ -380,6 +382,8 @@ void SbiRuntime::StepRESUME( UINT32 nOp1 ) } else pCode = pErrStmnt; + if ( pError ) // current in error handler ( and got a Resume Next statment ) + SbxErrObject::getUnoErrObject()->Clear(); if( nOp1 > 1 ) StepJUMP( nOp1 ); -- cgit From 7a9501c430ba465163b9b97c7ccec032eb6c9fc3 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 30 Mar 2010 18:37:32 +0200 Subject: fwk138: #i97378#: publish DocumentProperties: publish css.document.{,X}DocumentProperties{,Supplier}. css.document.OfficeDocument: add XDocumentPropertiesSupplier. css.document.XDocumentProperties: remove css.uno.Exception from signatures. --- sfx2/source/doc/SfxDocumentMetaData.cxx | 37 +++++++++++++-------------------- 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index adad9cbcbf51..bde5ef6efae7 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -38,7 +38,6 @@ #include "com/sun/star/util/XModifiable.hpp" #include "com/sun/star/xml/sax/XSAXSerializable.hpp" -#include "com/sun/star/lang/NullPointerException.hpp" #include "com/sun/star/lang/WrappedTargetRuntimeException.hpp" #include "com/sun/star/lang/EventObject.hpp" #include "com/sun/star/beans/XPropertySet.hpp" @@ -248,25 +247,21 @@ public: const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::io::WrongFormatException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception); + css::lang::WrappedTargetException, css::io::IOException); virtual void SAL_CALL loadFromMedium(const ::rtl::OUString & URL, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::io::WrongFormatException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception); + css::lang::WrappedTargetException, css::io::IOException); virtual void SAL_CALL storeToStorage( const css::uno::Reference< css::embed::XStorage > & Storage, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception); + css::lang::WrappedTargetException, css::io::IOException); virtual void SAL_CALL storeToMedium(const ::rtl::OUString & URL, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception); + css::lang::WrappedTargetException, css::io::IOException); // ::com::sun::star::lang::XInitialization: virtual void SAL_CALL initialize( @@ -1862,8 +1857,7 @@ SfxDocumentMetaData::loadFromStorage( const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, css::io::WrongFormatException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception) + css::lang::WrappedTargetException, css::io::IOException) { if (!xStorage.is()) throw css::lang::IllegalArgumentException( ::rtl::OUString::createFromAscii("SfxDocumentMetaData::loadFromStorage:" @@ -1875,10 +1869,10 @@ SfxDocumentMetaData::loadFromStorage( xStorage->openStreamElement( ::rtl::OUString::createFromAscii(s_metaXml), css::embed::ElementModes::READ) ); - if (!xStream.is()) throw css::lang::NullPointerException(); + if (!xStream.is()) throw css::uno::RuntimeException(); css::uno::Reference xInStream = xStream->getInputStream(); - if (!xInStream.is()) throw css::lang::NullPointerException(); + if (!xInStream.is()) throw css::uno::RuntimeException(); // create DOM parser service css::uno::Reference xMsf ( @@ -1942,8 +1936,7 @@ SfxDocumentMetaData::storeToStorage( const css::uno::Reference< css::embed::XStorage > & xStorage, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception) + css::lang::WrappedTargetException, css::io::IOException) { if (!xStorage.is()) throw css::lang::IllegalArgumentException( ::rtl::OUString::createFromAscii("SfxDocumentMetaData::storeToStorage:" @@ -1959,7 +1952,7 @@ SfxDocumentMetaData::storeToStorage( xStorage->openStreamElement(::rtl::OUString::createFromAscii(s_metaXml), css::embed::ElementModes::WRITE | css::embed::ElementModes::TRUNCATE); - if (!xStream.is()) throw css::lang::NullPointerException(); + if (!xStream.is()) throw css::uno::RuntimeException(); css::uno::Reference< css::beans::XPropertySet > xStreamProps(xStream, css::uno::UNO_QUERY_THROW); xStreamProps->setPropertyValue( @@ -1973,7 +1966,7 @@ SfxDocumentMetaData::storeToStorage( css::uno::makeAny(static_cast (sal_False))); css::uno::Reference xOutStream = xStream->getOutputStream(); - if (!xOutStream.is()) throw css::lang::NullPointerException(); + if (!xOutStream.is()) throw css::uno::RuntimeException(); css::uno::Reference xMsf ( m_xContext->getServiceManager()); css::uno::Reference xSaxWriter( @@ -2021,8 +2014,7 @@ void SAL_CALL SfxDocumentMetaData::loadFromMedium(const ::rtl::OUString & URL, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, css::io::WrongFormatException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception) + css::lang::WrappedTargetException, css::io::IOException) { css::uno::Reference xIn; ::comphelper::MediaDescriptor md(Medium); @@ -2056,7 +2048,7 @@ SfxDocumentMetaData::loadFromMedium(const ::rtl::OUString & URL, css::uno::makeAny(e)); } if (!xStorage.is()) { - throw css::lang::NullPointerException(::rtl::OUString::createFromAscii( + throw css::uno::RuntimeException(::rtl::OUString::createFromAscii( "SfxDocumentMetaData::loadFromMedium: cannot get Storage"), *this); } @@ -2067,8 +2059,7 @@ void SAL_CALL SfxDocumentMetaData::storeToMedium(const ::rtl::OUString & URL, const css::uno::Sequence< css::beans::PropertyValue > & Medium) throw (css::uno::RuntimeException, - css::lang::WrappedTargetException, css::io::IOException, - css::uno::Exception) + css::lang::WrappedTargetException, css::io::IOException) { ::comphelper::MediaDescriptor md(Medium); if (!URL.equalsAscii("")) { @@ -2080,7 +2071,7 @@ SfxDocumentMetaData::storeToMedium(const ::rtl::OUString & URL, if (!xStorage.is()) { - throw css::lang::NullPointerException(::rtl::OUString::createFromAscii( + throw css::uno::RuntimeException(::rtl::OUString::createFromAscii( "SfxDocumentMetaData::storeToMedium: cannot get Storage"), *this); } -- cgit From 854ee977ae497cf9229069bf10e4753133ce178e Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 6 Apr 2010 16:53:43 +0200 Subject: sb122: #i110548# extension native libraries linking against basis layer; new extension dependency deployment-repositories --- desktop/inc/deployment.hrc | 3 + .../source/deployment/gui/dp_gui_updatedialog.cxx | 2 +- desktop/source/deployment/inc/dp_dependencies.hxx | 7 +- .../deployment/manager/dp_informationprovider.cxx | 2 +- desktop/source/deployment/misc/dp_dependencies.cxx | 88 +++++++- desktop/source/deployment/misc/dp_misc.src | 12 ++ .../source/deployment/registry/inc/dp_backend.h | 2 + .../deployment/registry/package/dp_package.cxx | 3 +- desktop/test/deployment/boxt/Addons.xcu | 50 +++++ desktop/test/deployment/boxt/ProtocolHandler.xcu | 38 ++++ desktop/test/deployment/boxt/boxt.cxx | 235 +++++++++++++++++++++ desktop/test/deployment/boxt/description.xml | 40 ++++ desktop/test/deployment/boxt/makefile.mk | 78 +++++++ desktop/test/deployment/boxt/manifest.xml | 37 ++++ 14 files changed, 592 insertions(+), 5 deletions(-) create mode 100644 desktop/test/deployment/boxt/Addons.xcu create mode 100644 desktop/test/deployment/boxt/ProtocolHandler.xcu create mode 100644 desktop/test/deployment/boxt/boxt.cxx create mode 100644 desktop/test/deployment/boxt/description.xml create mode 100644 desktop/test/deployment/boxt/makefile.mk create mode 100644 desktop/test/deployment/boxt/manifest.xml diff --git a/desktop/inc/deployment.hrc b/desktop/inc/deployment.hrc index 7e4c21d3c5a4..6b51376d8524 100644 --- a/desktop/inc/deployment.hrc +++ b/desktop/inc/deployment.hrc @@ -79,6 +79,9 @@ #define RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN RID_DEPLOYMENT_DEPENDENCIES_START #define RID_DEPLYOMENT_DEPENDENCIES_MIN (RID_DEPLOYMENT_DEPENDENCIES_START+1) #define RID_DEPLYOMENT_DEPENDENCIES_MAX (RID_DEPLOYMENT_DEPENDENCIES_START+2) +#define RID_DEPLOYMENT_DEPENDENCIES_REPO_POS (RID_DEPLOYMENT_DEPENDENCIES_START + 3) +#define RID_DEPLOYMENT_DEPENDENCIES_REPO_NEG (RID_DEPLOYMENT_DEPENDENCIES_START + 4) +#define RID_DEPLOYMENT_DEPENDENCIES_REPO_BOTH (RID_DEPLOYMENT_DEPENDENCIES_START + 5) #define RID_DEPLOYMENT_LICENSE_START (RID_DEPLOYMENT_START+4500) diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 61479f799e6f..9097cdcf63a4 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -521,7 +521,7 @@ bool UpdateDialog::Thread::update( dp_misc::DescriptionInfoset infoset(m_context, updateInfo); OSL_ASSERT(infoset.getVersion().getLength() != 0); css::uno::Sequence< css::uno::Reference< css::xml::dom::XElement > > ds( - dp_misc::Dependencies::check(infoset)); + dp_misc::Dependencies::check(infoset, packageManager->getContext())); UpdateDialog::DisabledUpdate du; du.aUpdateInfo = updateInfo; diff --git a/desktop/source/deployment/inc/dp_dependencies.hxx b/desktop/source/deployment/inc/dp_dependencies.hxx index 13be1e8612fb..65e9c9dd6b4a 100644 --- a/desktop/source/deployment/inc/dp_dependencies.hxx +++ b/desktop/source/deployment/inc/dp_dependencies.hxx @@ -53,6 +53,9 @@ namespace Dependencies { @param infoset the infoset containing the dependencies to check + @param repository + the repository into which to deploy + @return a list of the unsatisfied dependencies from infoset (in no specific order) @@ -60,7 +63,9 @@ namespace Dependencies { DESKTOP_DEPLOYMENTMISC_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::xml::dom::XElement > > - check(::dp_misc::DescriptionInfoset const & infoset); + check( + ::dp_misc::DescriptionInfoset const & infoset, + ::rtl::OUString const & repository); /** Obtain the (human-readable) error message of a failed dependency. diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx index 9f2e0c9e1177..6267135e0d55 100644 --- a/desktop/source/deployment/manager/dp_informationprovider.cxx +++ b/desktop/source/deployment/manager/dp_informationprovider.cxx @@ -387,7 +387,7 @@ uno::Sequence< uno::Sequence< rtl::OUString > > if (*id2 == id) { // check, if there are unsatisfied dependencies and ignore those updates - uno::Sequence< uno::Reference< xml::dom::XElement > > ds( dp_misc::Dependencies::check( infoset ) ); + uno::Sequence< uno::Reference< xml::dom::XElement > > ds( dp_misc::Dependencies::check( infoset, _xManager->getContext() ) ); if ( ds.getLength() ) continue; diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx index 63badbb0c211..49720c861092 100644 --- a/desktop/source/deployment/misc/dp_dependencies.cxx +++ b/desktop/source/deployment/misc/dp_dependencies.cxx @@ -69,6 +69,37 @@ bool satisfiesMinimalVersion(::rtl::OUString const & version) { return compareWithVersion(version) != ::dp_misc::LESS; } +bool contains(::rtl::OUString const & list, ::rtl::OUString const & element) { + for (::sal_Int32 i = 0;;) { + ::sal_Int32 n = i; + i = list.indexOf(',', i); + if (i == -1) { + i = list.getLength(); + } + if (list.copy(n, i) == element) { + return true; + } + if (i == list.getLength()) { + return false; + } + ++i; + } +} + +bool checkDeploymentRepositories( + css::uno::Reference< css::xml::dom::XElement > const & dependency, + ::rtl::OUString const & repository) +{ + css::uno::Reference< css::xml::dom::XAttr > sup( + dependency->getAttributeNode( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("supported")))); + css::uno::Reference< css::xml::dom::XAttr > notSup( + dependency->getAttributeNode( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("not-supported")))); + return (!sup.is() || contains(sup->getValue(), repository)) && + !(notSup.is() && contains(notSup->getValue(), repository)); +} + } namespace dp_misc { @@ -76,7 +107,10 @@ namespace dp_misc { namespace Dependencies { css::uno::Sequence< css::uno::Reference< css::xml::dom::XElement > > -check(::dp_misc::DescriptionInfoset const & infoset) { +check( + ::dp_misc::DescriptionInfoset const & infoset, + ::rtl::OUString const & repository) +{ css::uno::Reference< css::xml::dom::XNodeList > deps( infoset.getDependencies()); ::sal_Int32 n = deps->getLength(); @@ -107,6 +141,12 @@ check(::dp_misc::DescriptionInfoset const & infoset) { e->getAttribute( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")))) != ::dp_misc::GREATER; + } else if (e->getNamespaceURI().equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM(xmlNamespace)) + && e->getTagName().equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("deployment-repositories"))) + { + sat = checkDeploymentRepositories(e, repository); } else if (e->hasAttributeNS( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(xmlNamespace)), @@ -145,6 +185,52 @@ check(::dp_misc::DescriptionInfoset const & infoset) { sValue = dependency->getAttribute( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value") ) ); sReason = ::rtl::OUString( ::String(::dp_misc::getResId(RID_DEPLYOMENT_DEPENDENCIES_MAX)) ); } + else if (dependency->getNamespaceURI().equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM(xmlNamespace)) && + dependency->getTagName().equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("deployment-repositories"))) + { + css::uno::Reference< css::xml::dom::XAttr > sup( + dependency->getAttributeNode( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("supported")))); + css::uno::Reference< css::xml::dom::XAttr > notSup( + dependency->getAttributeNode( + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("not-supported")))); + sValue = ::String( + ::dp_misc::getResId( + sup.is() + ? (notSup.is() + ? RID_DEPLOYMENT_DEPENDENCIES_REPO_BOTH + : RID_DEPLOYMENT_DEPENDENCIES_REPO_POS) + : (notSup.is() + ? RID_DEPLOYMENT_DEPENDENCIES_REPO_NEG + : RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN))); + ::rtl::OUStringBuffer buf; + for (::sal_Int32 i = 0;;) { + ::sal_Int32 j = sValue.indexOf('%', i); + if (j == -1) { + buf.append(sValue.copy(i)); + break; + } + if (sup.is() && + sValue.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("POS"), j + 1)) + { + buf.append(sValue.copy(i, j - i)); + buf.append(sup->getValue()); + i = j + RTL_CONSTASCII_LENGTH("%POS"); + } else if (notSup.is() && + sValue.matchAsciiL( + RTL_CONSTASCII_STRINGPARAM("NEG"), j + 1)) + { + buf.append(sValue.copy(i, j - i)); + buf.append(notSup->getValue()); + i = j + RTL_CONSTASCII_LENGTH("%NEG"); + } else { + i = j + 1; + } + } + return buf.makeStringAndClear(); + } else if ( dependency->hasAttributeNS( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( xmlNamespace ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenOffice.org-minimal-version" )))) { diff --git a/desktop/source/deployment/misc/dp_misc.src b/desktop/source/deployment/misc/dp_misc.src index 0d341122af16..6dada0178978 100644 --- a/desktop/source/deployment/misc/dp_misc.src +++ b/desktop/source/deployment/misc/dp_misc.src @@ -38,3 +38,15 @@ String RID_DEPLYOMENT_DEPENDENCIES_MIN { String RID_DEPLYOMENT_DEPENDENCIES_MAX { Text[en-US] = "Extension doesn't support versions greater than: OpenOffice.org %VERSION"; }; + +String RID_DEPLOYMENT_DEPENDENCIES_REPO_POS { + Text[en-US] = "Extension can only be deployed to repositories \"%POS\""; +}; + +String RID_DEPLOYMENT_DEPENDENCIES_REPO_NEG { + Text[en-US] = "Extension can not be deployed to repositories \"%NEG\""; +}; + +String RID_DEPLOYMENT_DEPENDENCIES_REPO_BOTH { + Text[en-US] = "Extension can be deployed to repositories \"%POS\" but not to \"%NEG\""; +}; diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h index fe52c8ffc7e3..fdf950434395 100644 --- a/desktop/source/deployment/registry/inc/dp_backend.h +++ b/desktop/source/deployment/registry/inc/dp_backend.h @@ -299,6 +299,8 @@ public: inline ::rtl::OUString const & getCachePath() const { return m_cachePath; } inline bool transientMode() const { return m_cachePath.getLength() == 0; } + inline ::rtl::OUString getContext() const {return m_context; } + // XEventListener virtual void SAL_CALL disposing( css::lang::EventObject const & evt ) throw (css::uno::RuntimeException); diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index cfe5be59dad0..f87b3e059994 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -553,7 +553,8 @@ bool BackendImpl::PackageImpl::checkDependencies( dp_misc::Dependencies::check( DescriptionInfoset( getMyBackend()->getComponentContext(), - description.getRootElement()))); + description.getRootElement()), + getMyBackend()->getContext())); if (unsatisfied.getLength() == 0) { return true; } else { diff --git a/desktop/test/deployment/boxt/Addons.xcu b/desktop/test/deployment/boxt/Addons.xcu new file mode 100644 index 000000000000..3df7e2de274c --- /dev/null +++ b/desktop/test/deployment/boxt/Addons.xcu @@ -0,0 +1,50 @@ + + + + + + + + + boxt + + + + + vnd.org.openoffice.test.desktop.deployment.boxt: + + + boxt + + + + + + + diff --git a/desktop/test/deployment/boxt/ProtocolHandler.xcu b/desktop/test/deployment/boxt/ProtocolHandler.xcu new file mode 100644 index 000000000000..fe448aedbe17 --- /dev/null +++ b/desktop/test/deployment/boxt/ProtocolHandler.xcu @@ -0,0 +1,38 @@ + + + + + + + + vnd.org.openoffice.test.desktop.deployment.boxt:* + + + + diff --git a/desktop/test/deployment/boxt/boxt.cxx b/desktop/test/deployment/boxt/boxt.cxx new file mode 100644 index 000000000000..dc82c0c004d6 --- /dev/null +++ b/desktop/test/deployment/boxt/boxt.cxx @@ -0,0 +1,235 @@ +/************************************************************************* +* +* 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 "precompiled_desktop.hxx" +#include "sal/config.h" + +#include "boost/noncopyable.hpp" +#include "com/sun/star/beans/PropertyValue.hpp" +#include "com/sun/star/frame/DispatchDescriptor.hpp" +#include "com/sun/star/frame/XDispatch.hpp" +#include "com/sun/star/frame/XDispatchProvider.hpp" +#include "com/sun/star/frame/XStatusListener.hpp" +#include "com/sun/star/lang/XServiceInfo.hpp" +#include "com/sun/star/lang/XSingleComponentFactory.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "com/sun/star/util/URL.hpp" +#include "cppuhelper/factory.hxx" +#include "cppuhelper/implbase1.hxx" +#include "cppuhelper/implbase3.hxx" +#include "cppuhelper/implementationentry.hxx" +#include "cppuhelper/weak.hxx" +#include "filter/msfilter/countryid.hxx" +#include "osl/diagnose.h" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" +#include "sal/types.h" +#include "uno/lbnames.h" +#include "vcl/svapp.hxx" + +namespace { + +namespace css = com::sun::star; + +namespace service { + +rtl::OUString getImplementationName() { + return rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.test.deployment.boxt")); +} + +css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { + rtl::OUString name( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.test.deployment.boxt")); + return css::uno::Sequence< rtl::OUString >(&name, 1); +} + +} + +class Service: + public cppu::WeakImplHelper3< + css::lang::XServiceInfo, css::frame::XDispatchProvider, + css::frame::XDispatch >, + private boost::noncopyable +{ +public: + Service() {} + +private: + virtual ~Service() {} + + virtual rtl::OUString SAL_CALL getImplementationName() + throw (css::uno::RuntimeException) + { return service::getImplementationName(); } + + virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) + throw (css::uno::RuntimeException) + { return ServiceName == getSupportedServiceNames()[0]; } //TODO + + virtual css::uno::Sequence< rtl::OUString > SAL_CALL + getSupportedServiceNames() throw (css::uno::RuntimeException) + { return service::getSupportedServiceNames(); } + + virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch( + css::util::URL const &, rtl::OUString const &, sal_Int32) + throw (css::uno::RuntimeException) + { return this; } + + virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > + SAL_CALL queryDispatches( + css::uno::Sequence< css::frame::DispatchDescriptor > const & Requests) + throw (css::uno::RuntimeException); + + virtual void SAL_CALL dispatch( + css::util::URL const &, + css::uno::Sequence< css::beans::PropertyValue > const &) + throw (css::uno::RuntimeException); + + virtual void SAL_CALL addStatusListener( + css::uno::Reference< css::frame::XStatusListener > const &, + css::util::URL const &) + throw (css::uno::RuntimeException) + {} + + virtual void SAL_CALL removeStatusListener( + css::uno::Reference< css::frame::XStatusListener > const &, + css::util::URL const &) + throw (css::uno::RuntimeException) + {} +}; + +css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > +Service::queryDispatches( + css::uno::Sequence< css::frame::DispatchDescriptor > const & Requests) + throw (css::uno::RuntimeException) +{ + css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > s( + Requests.getLength()); + for (sal_Int32 i = 0; i < s.getLength(); ++i) { + s[i] = queryDispatch( + Requests[i].FeatureURL, Requests[i].FrameName, + Requests[i].SearchFlags); + } + return s; +} + +void Service::dispatch( + css::util::URL const &, + css::uno::Sequence< css::beans::PropertyValue > const &) + throw (css::uno::RuntimeException) +{ + msfilter::ConvertCountryToLanguage(msfilter::COUNTRY_DONTKNOW); + // link against some obscure library that is unlikely already loaded + Application::ShowNativeErrorBox( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("boxt")), + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("test"))); +} + +class Factory: + public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >, + private boost::noncopyable +{ +public: + Factory() {} + +private: + virtual ~Factory() {} + + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL + createInstanceWithContext( + css::uno::Reference< css::uno::XComponentContext > const &) + throw (css::uno::Exception, css::uno::RuntimeException) + { return static_cast< cppu::OWeakObject * >(new Service); } + + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL + createInstanceWithArgumentsAndContext( + css::uno::Sequence< css::uno::Any > const &, + css::uno::Reference< css::uno::XComponentContext > const & Context) + throw (css::uno::Exception, css::uno::RuntimeException) + { return createInstanceWithContext(Context); } +}; + +css::uno::Reference< css::uno::XInterface > SAL_CALL dummy( + css::uno::Reference< css::uno::XComponentContext > const &) + SAL_THROW((css::uno::Exception)) +{ + OSL_ASSERT(false); + return css::uno::Reference< css::uno::XInterface >(); +} + +rtl::OUString SAL_CALL getImplementationName() { + return rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.test.deployment.boxt")); +} + +css::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() { + rtl::OUString name( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.test.deployment.boxt")); + return css::uno::Sequence< rtl::OUString >(&name, 1); +} + +css::uno::Reference< css::lang::XSingleComponentFactory > SAL_CALL +createFactory( + cppu::ComponentFactoryFunc, rtl::OUString const &, + css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) + SAL_THROW(()) +{ + return new Factory; +} + +static cppu::ImplementationEntry const services[] = { + { &dummy, &service::getImplementationName, + &service::getSupportedServiceNames, &createFactory, 0, 0 }, + { 0, 0, 0, 0, 0, 0 } +}; + +} + +extern "C" void * SAL_CALL component_getFactory( + char const * pImplName, void * pServiceManager, void * pRegistryKey) +{ + return cppu::component_getFactoryHelper( + pImplName, pServiceManager, pRegistryKey, services); +} + +extern "C" void SAL_CALL component_getImplementationEnvironment( + char const ** ppEnvTypeName, uno_Environment **) +{ + *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; +} + +extern "C" sal_Bool SAL_CALL component_writeInfo( + void * pServiceManager, void * pRegistryKey) +{ + return component_writeInfoHelper(pServiceManager, pRegistryKey, services); +} diff --git a/desktop/test/deployment/boxt/description.xml b/desktop/test/deployment/boxt/description.xml new file mode 100644 index 000000000000..bb574cb3c022 --- /dev/null +++ b/desktop/test/deployment/boxt/description.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + @DEPENDENCY@ + + diff --git a/desktop/test/deployment/boxt/makefile.mk b/desktop/test/deployment/boxt/makefile.mk new file mode 100644 index 000000000000..5dbf6f899b68 --- /dev/null +++ b/desktop/test/deployment/boxt/makefile.mk @@ -0,0 +1,78 @@ +#************************************************************************* +# +# 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. +# +#***********************************************************************/ + +PRJ = ../../.. +PRJNAME = desktop +TARGET = test_deployment_boxt + +ENABLE_EXCEPTIONS = TRUE + +.INCLUDE: settings.mk +.INCLUDE: rtlbootstrap.mk + +#TODO: The underlying OOo base version needed here is currently only available +# as instsetoo_native/util/openoffice.lst OOOBASEVERSION, so hard-coding it here +# for now (see issue 110653): +my_version = 3.3 + +.IF "$(OS)" == "LINUX" || "$(OS)" == "MACOSX" || "$(OS)" == "SOLARIS" +my_dependency = +.ELSE +my_dependency = +.END + +DLLPRE = + +SLOFILES = $(SHL1OBJS) + +SHL1TARGET = boxt.uno +SHL1OBJS = $(SLO)/boxt.obj +SHL1RPATH = BOXT +SHL1STDLIBS = \ + $(CPPUHELPERLIB) $(CPPULIB) $(MSFILTERLIB) $(SALLIB) $(TOOLSLIB) $(VCLLIB) +SHL1VERSIONMAP = $(SOLARENV)/src/component.map +DEF1NAME = $(SHL1TARGET) + +.INCLUDE: target.mk + +ALLTAR : $(MISC)/boxt.oxt + +$(MISC)/boxt.oxt .ERRREMOVE : manifest.xml description.xml Addons.xcu \ + ProtocolHandler.xcu $(SHL1TARGETN) + $(RM) -r $@ $(MISC)/$(TARGET).zip + $(MKDIR) $(MISC)/$(TARGET).zip + $(MKDIR) $(MISC)/$(TARGET).zip/META-INF + $(SED) -e 's|@PATH@|$(SHL1TARGETN:f)|g' < manifest.xml \ + > $(MISC)/$(TARGET).zip/META-INF/manifest.xml + $(SED) -e 's|@PLATFORM@|$(RTL_OS:l)_$(RTL_ARCH:l)|g' \ + -e 's|@VERSION@|$(my_version)|g' \ + -e 's|@DEPENDENCY@|$(my_dependency)|g' < description.xml \ + > $(MISC)/$(TARGET).zip/description.xml + $(COPY) Addons.xcu ProtocolHandler.xcu $(SHL1TARGETN) $(MISC)/$(TARGET).zip + cd $(MISC)/$(TARGET).zip && zip ../boxt.oxt META-INF/manifest.xml \ + description.xml Addons.xcu ProtocolHandler.xcu $(SHL1TARGETN:f) diff --git a/desktop/test/deployment/boxt/manifest.xml b/desktop/test/deployment/boxt/manifest.xml new file mode 100644 index 000000000000..73ebfc306e30 --- /dev/null +++ b/desktop/test/deployment/boxt/manifest.xml @@ -0,0 +1,37 @@ + + + + + + + + -- cgit From 3a08c284e3128ef8ee5f5a3b4387bb9ee32ba97b Mon Sep 17 00:00:00 2001 From: sb Date: Tue, 6 Apr 2010 17:40:33 +0200 Subject: sb122: silently ignore unknown files in Components::parseFileList (the extension manager's file lists can accrue garbage when extension deployment fails mid-way through) --- configmgr/source/components.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx index 51a1a6547d9b..58e8c68d636a 100644 --- a/configmgr/source/components.cxx +++ b/configmgr/source/components.cxx @@ -473,12 +473,10 @@ void Components::parseFileList( try { (*parseFile)(url, layer, &data_, 0); } catch (css::container::NoSuchElementException & e) { - throw css::uno::RuntimeException( - (rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "stat'ed file does not exist: ")) + - e.Message), - css::uno::Reference< css::uno::XInterface >()); + OSL_TRACE( + "configmgr file does not exist: %s", + rtl::OUStringToOString( + e.Message, RTL_TEXTENCODING_UTF8).getStr()); } } if (i == -1) { -- cgit From d4f743659e1377d48f9ecf23b5092b848798bfb9 Mon Sep 17 00:00:00 2001 From: sb Date: Wed, 7 Apr 2010 16:22:36 +0200 Subject: sb122: #i110467# back out dubious change again --- desktop/util/makefile.mk | 73 ++---------------------------------------------- 1 file changed, 2 insertions(+), 71 deletions(-) diff --git a/desktop/util/makefile.mk b/desktop/util/makefile.mk index b04162cf0ad1..4365c6d8fcce 100644 --- a/desktop/util/makefile.mk +++ b/desktop/util/makefile.mk @@ -83,42 +83,7 @@ APP1TARGET=so$/$(TARGET) APP1NOSAL=TRUE APP1RPATH=BRAND APP1OBJS=$(OBJ)$/copyright_ascii_sun.obj $(OBJ)$/main.obj -APP1STDLIBS = \ - $(SALLIB) \ - $(SOFFICELIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(I18NISOLANGLIB) \ - $(SALLIB) \ - $(SFXLIB) \ - $(SVLLIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(TOOLSLIB) \ - $(UCBHELPERLIB) \ - $(UNOTOOLSLIB) \ - $(VCLLIB) \ - $(FWELIB) \ - $(BASICLIB) \ - $(XMLSCRIPTLIB) \ - $(SALHELPERLIB) \ - $(SOTLIB) \ - $(SAXLIB) \ - $(FWILIB) \ - $(ICUUCLIB) \ - $(SJLIB) \ - $(I18NUTILLIB) \ - $(ICULIB) \ - $(JVMFWKLIB) \ - $(BASEGFXLIB) \ - $(ICUDATALIB) \ - $(ICULELIB) \ - $(JVMACCESSLIB) \ - $(SALHELPERLIB) \ - $(VOSLIB) - - +APP1STDLIBS = $(SALLIB) $(SOFFICELIB) .IF "$(GUI)" == "UNX" .IF "$(OS)" == "LINUX" || "$(OS)" == "FREEBSD" APP1STDLIBS+= -lXext -lSM -lICE @@ -147,41 +112,7 @@ APP5TARGET=soffice APP5NOSAL=TRUE APP5RPATH=BRAND APP5OBJS=$(OBJ)$/copyright_ascii_ooo.obj $(OBJ)$/main.obj -APP5STDLIBS = \ - $(SALLIB) \ - $(SOFFICELIB) \ - $(COMPHELPERLIB) \ - $(CPPUHELPERLIB) \ - $(CPPULIB) \ - $(I18NISOLANGLIB) \ - $(SALLIB) \ - $(SFXLIB) \ - $(SVLLIB) \ - $(SVTOOLLIB) \ - $(TKLIB) \ - $(TOOLSLIB) \ - $(UCBHELPERLIB) \ - $(UNOTOOLSLIB) \ - $(VCLLIB) \ - $(FWELIB) \ - $(BASICLIB) \ - $(XMLSCRIPTLIB) \ - $(SALHELPERLIB) \ - $(SOTLIB) \ - $(SAXLIB) \ - $(FWILIB) \ - $(ICUUCLIB) \ - $(SJLIB) \ - $(I18NUTILLIB) \ - $(ICULIB) \ - $(JVMFWKLIB) \ - $(BASEGFXLIB) \ - $(ICUDATALIB) \ - $(ICULELIB) \ - $(JVMACCESSLIB) \ - $(SALHELPERLIB) \ - $(VOSLIB) - +APP5STDLIBS = $(SALLIB) $(SOFFICELIB) .IF "$(OS)" == "LINUX" APP5STDLIBS+= -lXext -lSM -lICE .ENDIF # LINUX -- cgit From 6302434c682f559337bb3b4efc8e2d6ceadd9341 Mon Sep 17 00:00:00 2001 From: npower Developer Date: Wed, 7 Apr 2010 17:00:09 +0100 Subject: npower13_objectmodule: fold in review comments from ab --- basic/source/classes/sbxmod.cxx | 2 +- basic/source/runtime/methods.cxx | 46 ++++++++++++++++++++++----------------- basic/source/runtime/methods1.cxx | 2 ++ 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 87855035eb2e..ab655c88ce10 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1539,7 +1539,7 @@ SbObjModule::Find( const XubString& rName, SbxClassType t ) { //OSL_TRACE("SbObjectModule find for %s", rtl::OUStringToOString( rName, RTL_TEXTENCODING_UTF8 ).getStr() ); SbxVariable* pVar = NULL; - if ( !pVar && pDocObject) + if ( pDocObject) pVar = pDocObject->Find( rName, t ); if ( !pVar ) pVar = SbModule::Find( rName, t ); diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index e1b704cb8918..816576d173e8 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -4110,17 +4110,20 @@ RTLFUNC(Load) // Diesen Call einfach an das Object weiterreichen SbxBase* pObj = (SbxObject*)rPar.Get(1)->GetObject(); - if( pObj && pObj->IsA( TYPE( SbUserFormModule ) ) ) + if ( pObj ) { - SbUserFormModule* pFormModule = ( SbUserFormModule* )pObj; - pFormModule->load(); - } - else if( pObj && pObj->IsA( TYPE( SbxObject ) ) ) - { - SbxVariable* pVar = ((SbxObject*)pObj)-> - Find( String( RTL_CONSTASCII_USTRINGPARAM("Load") ), SbxCLASS_METHOD ); - if( pVar ) - pVar->GetInteger(); + if( pObj->IsA( TYPE( SbUserFormModule ) ) ) + { + SbUserFormModule* pFormModule = ( SbUserFormModule* )pObj; + pFormModule->load(); + } + else if( pObj->IsA( TYPE( SbxObject ) ) ) + { + SbxVariable* pVar = ((SbxObject*)pObj)-> + Find( String( RTL_CONSTASCII_USTRINGPARAM("Load") ), SbxCLASS_METHOD ); + if( pVar ) + pVar->GetInteger(); + } } } @@ -4138,17 +4141,20 @@ RTLFUNC(Unload) // Diesen Call einfach an das Object weitereichen SbxBase* pObj = (SbxObject*)rPar.Get(1)->GetObject(); - if( pObj && pObj->IsA( TYPE( SbUserFormModule ) ) ) + if ( pObj ) { - SbUserFormModule* pFormModule = ( SbUserFormModule* )pObj; - pFormModule->Unload(); - } - else if( pObj && pObj->IsA( TYPE( SbxObject ) ) ) - { - SbxVariable* pVar = ((SbxObject*)pObj)-> - Find( String( RTL_CONSTASCII_USTRINGPARAM("Unload") ), SbxCLASS_METHOD ); - if( pVar ) - pVar->GetInteger(); + if( pObj->IsA( TYPE( SbUserFormModule ) ) ) + { + SbUserFormModule* pFormModule = ( SbUserFormModule* )pObj; + pFormModule->Unload(); + } + else if( pObj->IsA( TYPE( SbxObject ) ) ) + { + SbxVariable* pVar = ((SbxObject*)pObj)-> + Find( String( RTL_CONSTASCII_USTRINGPARAM("Unload") ), SbxCLASS_METHOD ); + if( pVar ) + pVar->GetInteger(); + } } } diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index dbdeee8197c2..b25c213a493d 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -2601,6 +2601,8 @@ RTLFUNC(Me) SbObjModule* pMod = PTR_CAST(SbObjModule,pActiveModule); if ( pMod ) refVar->PutObject( pMod ); + else + StarBASIC::Error( SbERR_INVALID_USAGE_OBJECT ); } else refVar->PutObject( pClassModuleObject ); -- cgit From 708b462a826eef5634275fa0400ec003c310619f Mon Sep 17 00:00:00 2001 From: npower Developer Date: Wed, 7 Apr 2010 17:02:52 +0100 Subject: npower13_objectmodule: #i110672# fix Application.ThisWorkbook ( from dr ) --- oovbaapi/ooo/vba/excel/XApplication.idl | 4 ---- vbahelper/inc/vbahelper/vbahelper.hxx | 2 ++ vbahelper/source/vbahelper/vbahelper.cxx | 16 ++++++++++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/oovbaapi/ooo/vba/excel/XApplication.idl b/oovbaapi/ooo/vba/excel/XApplication.idl index 1a29a0d0c459..e4c063d161cf 100644 --- a/oovbaapi/ooo/vba/excel/XApplication.idl +++ b/oovbaapi/ooo/vba/excel/XApplication.idl @@ -61,10 +61,6 @@ interface XApplication : com::sun::star::uno::XInterface [attribute, readonly] XWorksheet ActiveSheet; [attribute, readonly] ooo::vba::XAssistant Assistant; [attribute] long Calculation; - //#TODO #FIXME this is more of a placeholder, will return - // the value of activeworkbook, in xl 'ThisWorkbook' should return the - // workbook in which the 'calling' macro is running. Should be possible - // to determine this [attribute, readonly] XWorkbook ThisWorkbook; [attribute, readonly] string Name; [attribute] boolean DisplayAlerts; diff --git a/vbahelper/inc/vbahelper/vbahelper.hxx b/vbahelper/inc/vbahelper/vbahelper.hxx index 315ddb19b7ca..83b9737315ea 100644 --- a/vbahelper/inc/vbahelper/vbahelper.hxx +++ b/vbahelper/inc/vbahelper/vbahelper.hxx @@ -64,6 +64,8 @@ namespace ooo VBAHELPER_DLLPUBLIC css::uno::Reference< css::uno::XInterface > createVBAUnoAPIService( SfxObjectShell* pShell, const sal_Char* _pAsciiName ) throw (css::uno::RuntimeException); VBAHELPER_DLLPUBLIC css::uno::Reference< css::uno::XInterface > createVBAUnoAPIServiceWithArgs( SfxObjectShell* pShell, const sal_Char* _pAsciiName, const css::uno::Sequence< css::uno::Any >& aArgs ) throw (css::uno::RuntimeException); css::uno::Reference< css::frame::XModel > getCurrentDoc( const rtl::OUString& sKey ) throw (css::uno::RuntimeException); + VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getThisExcelDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); + VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getThisWordDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getCurrentExcelDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getCurrentWordDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index 83bd677dd7de..ac8423d2ce3a 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -464,6 +464,18 @@ getCurrentDocCtx( const rtl::OUString& ctxName, const uno::Reference< uno::XComp return xModel; } +uno::Reference< frame::XModel > +getThisExcelDoc( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException) +{ + return getCurrentDocCtx( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ExcelDocumentContext" ) ), xContext ); +} + +uno::Reference< frame::XModel > +getThisWordDoc( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException) +{ + return getCurrentDocCtx( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("WordDocumentContext" ) ), xContext ); +} + uno::Reference< frame::XModel > getCurrentExcelDoc( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException) { @@ -475,7 +487,7 @@ getCurrentExcelDoc( const uno::Reference< uno::XComponentContext >& xContext ) t } catch( uno::Exception& e ) { - xModel = getCurrentDocCtx( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ExcelDocumentContext" ) ), xContext ); + xModel = getThisExcelDoc( xContext ); } return xModel; } @@ -491,7 +503,7 @@ getCurrentWordDoc( const uno::Reference< uno::XComponentContext >& xContext ) th } catch( uno::Exception& e ) { - xModel = getCurrentDocCtx( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("WordDocumentContext" ) ), xContext ); + xModel = getThisWordDoc( xContext ); } return xModel; } -- cgit From 10ce0c56de2072553e5cbe5ebbd422cd88e5fde6 Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 12 Apr 2010 13:13:16 +0200 Subject: sb122: #i110494# make OpenOffice.org-maximal-version dependency work for > 0 micro OOo versions again --- desktop/source/deployment/misc/dp_dependencies.cxx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx index 49720c861092..e5a81f4528f9 100644 --- a/desktop/source/deployment/misc/dp_dependencies.cxx +++ b/desktop/source/deployment/misc/dp_dependencies.cxx @@ -56,17 +56,13 @@ namespace css = ::com::sun::star; static char const xmlNamespace[] = "http://openoffice.org/extensions/description/2006"; -::dp_misc::Order compareWithVersion(::rtl::OUString const & version) { +bool satisfiesMinimalVersion(::rtl::OUString const & version) { ::rtl::OUString v( RTL_CONSTASCII_USTRINGPARAM( "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":Version:OOOPackageVersion}")); ::rtl::Bootstrap::expandMacros(v); - return ::dp_misc::compareVersions(v, version); -} - -bool satisfiesMinimalVersion(::rtl::OUString const & version) { - return compareWithVersion(version) != ::dp_misc::LESS; + return ::dp_misc::compareVersions(v, version) != ::dp_misc::LESS; } bool contains(::rtl::OUString const & list, ::rtl::OUString const & element) { @@ -136,8 +132,14 @@ check( RTL_CONSTASCII_STRINGPARAM( "OpenOffice.org-maximal-version"))) { + ::rtl::OUString v( + RTL_CONSTASCII_USTRINGPARAM( + "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") + ":Version:OOOBaseVersion}")); + ::rtl::Bootstrap::expandMacros(v); sat = - compareWithVersion( + ::dp_misc::compareVersions( + v, e->getAttribute( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")))) != ::dp_misc::GREATER; -- cgit From 3e41502e56c37991dd6e645fd1ff8fb7a325ff1b Mon Sep 17 00:00:00 2001 From: sb Date: Mon, 12 Apr 2010 15:12:26 +0200 Subject: sb122: #i110083# improve xcsparser.cxx merge function --- configmgr/source/xcsparser.cxx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx index 12e64ebbe171..8bda874cc5b3 100644 --- a/configmgr/source/xcsparser.cxx +++ b/configmgr/source/xcsparser.cxx @@ -78,19 +78,19 @@ void merge( case Node::KIND_LOCALIZED_VALUE: break; //TODO: merge certain parts? case Node::KIND_GROUP: - if (dynamic_cast< GroupNode * >(original.get())->isExtensible()) { - for (NodeMap::iterator i2(update->getMembers().begin()); - i2 != update->getMembers().end(); ++i2) - { - NodeMap::iterator i1( - original->getMembers().find(i2->first)); - if (i1 == original->getMembers().end()) { - if (i2->second->kind() == Node::KIND_PROPERTY) { - original->getMembers().insert(*i2); - } - } else if (i2->second->kind() == i1->second->kind()) { - merge(i1->second, i2->second); + for (NodeMap::iterator i2(update->getMembers().begin()); + i2 != update->getMembers().end(); ++i2) + { + NodeMap::iterator i1(original->getMembers().find(i2->first)); + if (i1 == original->getMembers().end()) { + if (i2->second->kind() == Node::KIND_PROPERTY && + dynamic_cast< GroupNode * >( + original.get())->isExtensible()) + { + original->getMembers().insert(*i2); } + } else if (i2->second->kind() == i1->second->kind()) { + merge(i1->second, i2->second); } } break; -- cgit From 7062641db71988f68a1e144375d3cda8d90d77b4 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 12 Apr 2010 15:34:14 +0100 Subject: cmcfixes74: #i110565 use radio buttons for mutually exclusive options in menus --- .../uielement/langselectionmenucontroller.cxx | 10 ++++++++-- .../uielement/langselectionstatusbarcontroller.cxx | 21 ++++++++++++++------- framework/source/uielement/menubarmanager.cxx | 11 ++++++++--- framework/source/xml/menudocumenthandler.cxx | 14 +++++++++++--- 4 files changed, 41 insertions(+), 15 deletions(-) diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index 9c8e68e24734..f2c905f237e8 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -344,6 +344,9 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup std::map< sal_Int16, ::rtl::OUString > LangTable; const ::rtl::OUString sAsterix(RTL_CONSTASCII_USTRINGPARAM("*")); + bool bMultipleLanguages = (eMode != MODE_SetLanguageSelectionMenu) || m_aCurLang.compareToAscii( "*" ) == 0; + bool bNothingSelected = true; + MenuItemBits nItemBits = !bMultipleLanguages ? MIB_RADIOCHECK : 0; for(std::map< ::rtl::OUString, ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it) { if(it->first != ::rtl::OUString( aLangTable.GetString( LANGUAGE_NONE ) )&& @@ -351,12 +354,13 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup it->first.getLength()) { ++nItemId; - pPopupMenu->InsertItem( nItemId,it->first); + pPopupMenu->InsertItem( nItemId,it->first,nItemBits ); LangTable[nItemId] = it->first; if(it->first == m_aCurLang && eMode == MODE_SetLanguageSelectionMenu ) { //make a sign for the current language pPopupMenu->CheckItem(nItemId,TRUE); + bNothingSelected = false; } aCmd=aCmd_Language; aCmd+=(String)it->first; @@ -366,7 +370,9 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup //7--none nItemId++; - pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_NONE )) ); + pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_NONE )), nItemBits ); + if (bNothingSelected && !bMultipleLanguages) + pPopupMenu->CheckItem(nItemId,TRUE); aCmd=aCmd_Language; aCmd+=String::CreateFromAscii("LANGUAGE_NONE"); pPopupMenu->SetItemCommand(nItemId,aCmd); diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index 953470314785..544597261852 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -272,6 +272,9 @@ void LangSelectionStatusbarController::LangMenu()throw (::com::sun::star::uno::R } } std::map< sal_Int16, ::rtl::OUString > LangTable; + bool bMultipleLanguages = m_aCurLang.compareToAscii( "*" ) == 0; + bool bNothingSelected = true; + sal_Int16 nMenuItemStyle = !bMultipleLanguages ? css::awt::MenuItemStyle::RADIOCHECK : 0; for( std::set< ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it ) { @@ -281,22 +284,26 @@ void LangSelectionStatusbarController::LangMenu()throw (::com::sun::star::uno::R { //nItemId = xPopupMenu->getItemCount()+1; nItemId++; - xPopupMenu->insertItem( nItemId, *it, css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + xPopupMenu->insertItem( nItemId, *it, nMenuItemStyle, nItemId ); LangTable[nItemId]=*it; if( *it == m_aCurLang ) { //make a sign for the current language xPopupMenu->checkItem( nItemId, TRUE ); + bNothingSelected = false; } } } //7--none nItemId++; - xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), nMenuItemStyle, nItemId ); + if (bNothingSelected && !bMultipleLanguages) + xPopupMenu->checkItem( nItemId, TRUE ); + //More... nItemId++; - xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + xPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), 0, nItemId ); for( ::std::set< ::rtl::OUString >::const_iterator it = LangItems.begin(); it != LangItems.end(); ++it ) { @@ -305,22 +312,22 @@ void LangSelectionStatusbarController::LangMenu()throw (::com::sun::star::uno::R *it != ::rtl::OUString::createFromAscii( "" )) { nItemId++; - subPopupMenu->insertItem( nItemId, *it, css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + subPopupMenu->insertItem( nItemId, *it, 0, nItemId ); LangTable[nItemId]=*it; } } //7--none nItemId++; - subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_NONE )), 0, nItemId ); //More nItemId++; - subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + subPopupMenu->insertItem( nItemId, String( FwkResId( STR_LANGSTATUS_MORE )), 0, nItemId ); nItemId++; xPopupMenu->insertSeparator(nItemId); nItemId++; - xPopupMenu->insertItem( nItemId, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), css::awt::MenuItemStyle::RADIOCHECK, nItemId ); + xPopupMenu->insertItem( nItemId, String( FwkResId( STR_SET_LANGUAGE_FOR_PARAGRAPH )), 0, nItemId ); xPopupMenu->setPopupMenu( nItemId, subPopupMenu ); //display the popup menu and execute every command diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 9fbdf87336cc..9d8aa9205c90 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -548,11 +548,14 @@ throw ( RuntimeException ) if ( Event.State >>= bCheckmark ) { - // Checkmark + // Checkmark or RadioButton m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, TRUE ); m_pVCLMenu->CheckItem( pMenuItemHandler->nItemId, bCheckmark ); - m_pVCLMenu->SetItemBits( pMenuItemHandler->nItemId, - m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId ) | MIB_CHECKABLE ); + + MenuItemBits nBits = m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId ); + //If not already designated RadioButton set as CheckMark + if (!(nBits & MIB_RADIOCHECK)) + m_pVCLMenu->SetItemBits( pMenuItemHandler->nItemId, nBits | MIB_CHECKABLE ); } else if ( Event.State >>= aItemText ) { @@ -1805,6 +1808,8 @@ void MenuBarManager::FillMenu( nBits |= MIB_ICON; if ( nStyle & ::com::sun::star::ui::ItemStyle::TEXT ) nBits |= MIB_TEXT; + if ( nStyle & ::com::sun::star::ui::ItemStyle::RADIO_CHECK ) + nBits |= MIB_RADIOCHECK; pMenu->SetItemBits( nId, nBits ); } if ( xIndexContainer.is() ) diff --git a/framework/source/xml/menudocumenthandler.cxx b/framework/source/xml/menudocumenthandler.cxx index 90f5fb25dec3..3fc5d1775be4 100644 --- a/framework/source/xml/menudocumenthandler.cxx +++ b/framework/source/xml/menudocumenthandler.cxx @@ -94,6 +94,7 @@ #define ATTRIBUTE_ITEMSTYLE_TEXT "text" #define ATTRIBUTE_ITEMSTYLE_IMAGE "image" +#define ATTRIBUTE_ITEMSTYLE_RADIO "radio" // Property names of a menu/menu item ItemDescriptor static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL"; @@ -134,6 +135,7 @@ struct MenuStyleItem MenuStyleItem MenuItemStyles[ ] = { { ::com::sun::star::ui::ItemStyle::ICON, ATTRIBUTE_ITEMSTYLE_IMAGE }, { ::com::sun::star::ui::ItemStyle::TEXT, ATTRIBUTE_ITEMSTYLE_TEXT }, + { ::com::sun::star::ui::ItemStyle::RADIO_CHECK, ATTRIBUTE_ITEMSTYLE_RADIO } }; @@ -437,8 +439,10 @@ throw( SAXException, RuntimeException ) { if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT; - if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::ICON; + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) ) + nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK; } } while ( nIndex >= 0 ); @@ -670,8 +674,10 @@ throw( SAXException, RuntimeException ) { if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT; - if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::ICON; + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) ) + nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK; } } while ( nIndex >= 0 ); @@ -725,8 +731,10 @@ throw( SAXException, RuntimeException ) { if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_TEXT ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::TEXT; - if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_IMAGE ) ) ) nItemBits |= ::com::sun::star::ui::ItemStyle::ICON; + else if ( aToken.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ATTRIBUTE_ITEMSTYLE_RADIO ) ) ) + nItemBits |= ::com::sun::star::ui::ItemStyle::RADIO_CHECK; } } while ( nIndex >= 0 ); -- cgit From fdd1c8f3861b366be58d9ffa3bf027ff3086b271 Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Tue, 13 Apr 2010 18:30:31 +0200 Subject: npower13_objectmodules: compiler warnings --- basic/inc/basic/sbobjmod.hxx | 1 + basic/source/classes/eventatt.cxx | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/basic/inc/basic/sbobjmod.hxx b/basic/inc/basic/sbobjmod.hxx index ad83e4fbc44b..ad804dcfab38 100644 --- a/basic/inc/basic/sbobjmod.hxx +++ b/basic/inc/basic/sbobjmod.hxx @@ -55,6 +55,7 @@ public: TYPEINFO(); SbObjModule( const String& rName, const com::sun::star::script::ModuleInfo& mInfo, bool bIsVbaCompatible ); virtual SbxVariable* Find( const XubString& rName, SbxClassType t ); + using SbxValue::GetObject; SbxVariable* GetObject(); void SetUnoObject( const com::sun::star::uno::Any& aObj )throw ( com::sun::star::uno::RuntimeException ) ; }; diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index 1ffa6e374b9a..b1170baa2010 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -613,7 +613,10 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, BOOL bWrite ) Reference< XScriptListener > xScriptListener = new BasicScriptListener_Impl( pINST->GetBasic(), xModel ); Sequence< Any > aArgs( 4 ); - aArgs[ 0 ] <<= bDocDialog ? xModel : uno::Reference< uno::XInterface >(); + if( bDocDialog ) + aArgs[ 0 ] <<= xModel; + else + aArgs[ 0 ] <<= uno::Reference< uno::XInterface >(); aArgs[ 1 ] <<= xInput; aArgs[ 2 ] = aDlgLibAny; aArgs[ 3 ] <<= xScriptListener; -- cgit From 130bbc98813c32460dc354dfa712de620cedecff Mon Sep 17 00:00:00 2001 From: Daniel Rentz Date: Wed, 14 Apr 2010 19:14:53 +0200 Subject: npower13_objectmodules: compiler errors --- xmlscript/source/xmldlg_imexp/exp_share.hxx | 2 +- xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx | 2 +- xmlscript/source/xmldlg_imexp/xmldlg_export.cxx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xmlscript/source/xmldlg_imexp/exp_share.hxx b/xmlscript/source/xmldlg_imexp/exp_share.hxx index d32d46698003..a53d02393ae6 100644 --- a/xmlscript/source/xmldlg_imexp/exp_share.hxx +++ b/xmlscript/source/xmldlg_imexp/exp_share.hxx @@ -117,7 +117,7 @@ public: inline bool readProp( T * ret, ::rtl::OUString const & rPropName ); css::uno::Any readProp( ::rtl::OUString const & rPropName ); // - void readDefaults( bool supportPrintable = true ); + void readDefaults( bool supportPrintable = true, bool supportVisible = true ); // void readStringAttr( ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName ); diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx index 55b46edc1392..b30c24b4b419 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx @@ -1138,7 +1138,7 @@ void ElementDescriptor::readDialogModel( StyleBag * all_styles ) } // collect elements - readDefaults( false ); + readDefaults( false, false ); readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Closeable") ), OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":closeable") ) ); diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index 088d6e841c94..365355375808 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx @@ -972,7 +972,7 @@ void ElementDescriptor::readSelectionTypeAttr( OUString const & rPropName, OUStr } } //__________________________________________________________________________________________________ -void ElementDescriptor::readDefaults( bool supportPrintable ) +void ElementDescriptor::readDefaults( bool supportPrintable, bool supportVisible ) { Any a( _xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ) ) ); addAttribute( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), @@ -995,7 +995,7 @@ void ElementDescriptor::readDefaults( bool supportPrintable ) } sal_Bool bVisible = sal_True; - try + if (supportVisible) try { if (_xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("EnableVisible") ) ) >>= bVisible) { -- cgit From 061fe208f31c6a2ea73c92a89ec85fcdca349985 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Fri, 16 Apr 2010 12:35:33 +0200 Subject: calc53: #i110937# html import: don't insert title into EditEngine --- editeng/source/editeng/eehtml.cxx | 21 +++++++++++++++------ editeng/source/editeng/eehtml.hxx | 1 + 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx index ddb82a06661d..569b80639b6b 100644 --- a/editeng/source/editeng/eehtml.cxx +++ b/editeng/source/editeng/eehtml.cxx @@ -60,6 +60,7 @@ EditHTMLParser::EditHTMLParser( SvStream& rIn, const String& rBaseURL, SvKeyValu bWasInPara = FALSE; nInTable = 0; nInCell = 0; + bInTitle = FALSE; nDefListLevel = 0; nBulletLevel = 0; nNumberingLevel = 0; @@ -179,11 +180,14 @@ void EditHTMLParser::NextToken( int nToken ) break; case HTML_TEXTTOKEN: { - if ( !bInPara ) - StartPara( FALSE ); - -// if ( bInPara || pCurAnchor ) + // #i110937# for content, call aImportHdl (no SkipGroup), but don't insert the text into the EditEngine + if (!bInTitle) { + if ( !bInPara ) + StartPara( FALSE ); + + // if ( bInPara || pCurAnchor ) + String aText = aToken; if ( aText.Len() && ( aText.GetChar( 0 ) == ' ' ) && ThrowAwayBlank() && !IsReadPRE() ) @@ -342,6 +346,13 @@ void EditHTMLParser::NextToken( int nToken ) // #58335# kein SkipGroup on/off auf inline markup etc. + case HTML_TITLE_ON: + bInTitle = TRUE; + break; + case HTML_TITLE_OFF: + bInTitle = FALSE; + break; + // globals case HTML_HTML_ON: case HTML_HTML_OFF: @@ -355,8 +366,6 @@ void EditHTMLParser::NextToken( int nToken ) case HTML_THEAD_OFF: case HTML_TBODY_ON: case HTML_TBODY_OFF: - case HTML_TITLE_ON: - case HTML_TITLE_OFF: // inline elements, structural markup // HTML 3.0 case HTML_BANNER_ON: diff --git a/editeng/source/editeng/eehtml.hxx b/editeng/source/editeng/eehtml.hxx index a9b20bcd652f..8d11e743755a 100644 --- a/editeng/source/editeng/eehtml.hxx +++ b/editeng/source/editeng/eehtml.hxx @@ -57,6 +57,7 @@ private: BOOL bFieldsInserted; BYTE nInTable; BYTE nInCell; + BOOL bInTitle; BYTE nDefListLevel; BYTE nBulletLevel; -- cgit From 3a8d3af3d9f9ba84156525c6737a4aa14eb8ccee Mon Sep 17 00:00:00 2001 From: Gregor Hartmann <gh <Gregor Hartmann<gh@openoffice.org> Date: Fri, 16 Apr 2010 14:10:50 +0200 Subject: add declaration of unoToSbxValue to header instead of in several cxx files --- basic/inc/basic/sbuno.hxx | 2 ++ basic/source/classes/eventatt.cxx | 6 +----- basic/source/classes/sbunoobj.cxx | 2 +- basic/source/runtime/step1.cxx | 3 +-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/basic/inc/basic/sbuno.hxx b/basic/inc/basic/sbuno.hxx index 68e2c6ab8778..d816d424313b 100644 --- a/basic/inc/basic/sbuno.hxx +++ b/basic/inc/basic/sbuno.hxx @@ -41,5 +41,7 @@ void createAllObjectProperties( SbxObject* pObj ); ::com::sun::star::uno::Any sbxToUnoValue( SbxVariable* pVar ); +void unoToSbxValue( SbxVariable* pVar, const ::com::sun::star::uno::Any& aValue ); + #endif diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index 5c57af5b6ce8..4bd9a981bddb 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -62,6 +62,7 @@ #include <sbunoobj.hxx> #include <basic/sbstar.hxx> #include <basic/sbmeth.hxx> +#include <basic/sbuno.hxx> #include <runtime.hxx> #include <sbintern.hxx> @@ -85,11 +86,6 @@ using namespace ::osl; -//=================================================================== -void unoToSbxValue( SbxVariable* pVar, const Any& aValue ); -Any sbxToUnoValue( SbxVariable* pVar ); - - Reference< frame::XModel > getModelFromBasic( SbxObject* pBasic ) { OSL_PRECOND( pBasic != NULL, "getModelFromBasic: illegal call!" ); diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 1e278bf583a7..476dfbc90686 100755 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -564,7 +564,7 @@ SbxDataType unoToSbxType( const Reference< XIdlClass >& xIdlClass ) } return eRetType; } -void unoToSbxValue( SbxVariable* pVar, const Any& aValue ); + static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int32 >& indices, Sequence< sal_Int32 >& sizes, const Any& aValue, sal_Int32& dimension, sal_Bool bIsZeroIndex, Type* pType = NULL ) { Type aType = aValue.getValueType(); diff --git a/basic/source/runtime/step1.cxx b/basic/source/runtime/step1.cxx index 399257cf6ad3..fafb71acfeb3 100644 --- a/basic/source/runtime/step1.cxx +++ b/basic/source/runtime/step1.cxx @@ -30,6 +30,7 @@ #include <stdlib.h> #include <rtl/math.hxx> +#include <basic/sbuno.hxx> #include "runtime.hxx" #include "sbintern.hxx" #include "iosys.hxx" @@ -230,8 +231,6 @@ void SbiRuntime::StepRETURN( UINT32 nOp1 ) // FOR-Variable testen (+Endlabel) -void unoToSbxValue( SbxVariable* pVar, const Any& aValue ); - void SbiRuntime::StepTESTFOR( UINT32 nOp1 ) { if( !pForStk ) -- cgit From 45cc8f5bd1f3f7bb3cb4e63088f280dc8e8b93fc Mon Sep 17 00:00:00 2001 From: Daniel Rentz <dr@openoffice.org> Date: Fri, 16 Apr 2010 17:28:52 +0200 Subject: npower13_objectmodules: uppercase UNO constants --- basic/inc/basic/sbmod.hxx | 3 --- basic/source/basmgr/basmgr.cxx | 1 - basic/source/classes/sb.cxx | 14 +++++++------- basic/source/classes/sbxmod.cxx | 5 +++-- basic/source/comp/codegen.cxx | 7 ++++--- basic/source/comp/parser.cxx | 5 +++-- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/basic/inc/basic/sbmod.hxx b/basic/inc/basic/sbmod.hxx index ba468b252d2a..63ffef6cdd61 100644 --- a/basic/inc/basic/sbmod.hxx +++ b/basic/inc/basic/sbmod.hxx @@ -31,10 +31,7 @@ #include <basic/sbdef.hxx> #include <basic/sbxobj.hxx> #include <basic/sbxdef.hxx> -#ifndef _RTL_USTRING_HXX #include <rtl/ustring.hxx> -#endif -#include <com/sun/star/script/ModuleType.hpp> class SbMethod; class SbProperty; diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index ac7812fd6c66..1caa22980f1b 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -67,7 +67,6 @@ #include <com/sun/star/script/XStarBasicLibraryInfo.hpp> #include <com/sun/star/script/XLibraryContainerPassword.hpp> #include <com/sun/star/script/ModuleInfo.hpp> -#include <com/sun/star/script/ModuleType.hpp> #include <com/sun/star/script/XVBAModuleInfo.hpp> #include <com/sun/star/script/XVBACompat.hpp> diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 7f7ac8784742..233b181757f0 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -490,7 +490,7 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule ) } } } - SetModuleType( com::sun::star::script::ModuleType::Class ); + SetModuleType( ModuleType::CLASS ); } SbClassModuleObject::~SbClassModuleObject() @@ -790,7 +790,7 @@ SbModule* StarBASIC::MakeModule( const String& rName, const String& rSrc ) SbModule* StarBASIC::MakeModule32( const String& rName, const ::rtl::OUString& rSrc ) { ModuleInfo mInfo; - mInfo.ModuleType = ModuleType::Normal; + mInfo.ModuleType = ModuleType::NORMAL; return MakeModule32( rName, mInfo, rSrc ); } SbModule* StarBASIC::MakeModule32( const String& rName, const ModuleInfo& mInfo, const rtl::OUString& rSrc ) @@ -800,17 +800,17 @@ SbModule* StarBASIC::MakeModule32( const String& rName, const ModuleInfo& mInfo, SbModule* p = NULL; switch ( mInfo.ModuleType ) { - case ModuleType::Document: + case ModuleType::DOCUMENT: // In theory we should be able to create Object modules // in ordinary basic ( in vba mode thought these are create // by the application/basic and not by the user ) p = new SbObjModule( rName, mInfo, isVBAEnabled() ); break; - case ModuleType::Class: + case ModuleType::CLASS: p = new SbModule( rName, isVBAEnabled() ); - p->SetModuleType( com::sun::star::script::ModuleType::Class ); + p->SetModuleType( ModuleType::CLASS ); break; - case ModuleType::Form: + case ModuleType::FORM: p = new SbUserFormModule( rName, mInfo, isVBAEnabled() ); break; default: @@ -995,7 +995,7 @@ SbxVariable* StarBASIC::Find( const String& rName, SbxClassType t ) // Only variables qualified by the Module Name e.g. Sheet1.foo // should work for Documant && Class type Modules INT32 nType = p->GetModuleType(); - if ( nType == com::sun::star::script::ModuleType::Document || nType == com::sun::star::script::ModuleType::Form ) + if ( nType == ModuleType::DOCUMENT || nType == ModuleType::FORM ) continue; // otherwise check if the element is available diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index ab655c88ce10..93705d05460e 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -54,6 +54,7 @@ #include <vos/mutex.hxx> #include <basic/sbobjmod.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/script/ModuleType.hpp> // for the bsearch @@ -165,7 +166,7 @@ SbModule::SbModule( const String& rName, BOOL bVBACompat ) { SetName( rName ); SetFlag( SBX_EXTSEARCH | SBX_GBLSEARCH ); - SetModuleType( com::sun::star::script::ModuleType::Normal ); + SetModuleType( script::ModuleType::NORMAL ); } SbModule::~SbModule() @@ -1503,7 +1504,7 @@ SbObjModule::SbObjModule( const String& rName, const com::sun::star::script::Mod : SbModule( rName, bIsVbaCompatible ) { SetModuleType( mInfo.ModuleType ); - if ( mInfo.ModuleType == script::ModuleType::Form ) + if ( mInfo.ModuleType == script::ModuleType::FORM ) { SetClassName( rtl::OUString::createFromAscii( "Form" ) ); } diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx index 1cf38f171e8b..46f829b382e8 100644 --- a/basic/source/comp/codegen.cxx +++ b/basic/source/comp/codegen.cxx @@ -32,6 +32,7 @@ #include "sbcomp.hxx" #include "image.hxx" #include <limits> +#include <com/sun/star/script/ModuleType.hpp> // nInc ist die Inkrementgroesse der Puffer @@ -129,7 +130,7 @@ void SbiCodeGen::Save() p->SetFlag( SBIMG_EXPLICIT ); int nIfaceCount = 0; - if( rMod.mnType == com::sun::star::script::ModuleType::Class ) + if( rMod.mnType == com::sun::star::script::ModuleType::CLASS ) { OSL_TRACE("COdeGen::save() classmodule processing"); rMod.bIsProxyModule = true; @@ -156,8 +157,8 @@ void SbiCodeGen::Save() { pCLASSFAC->RemoveClassModule( &rMod ); // Only a ClassModule can revert to Normal - if ( rMod.mnType == com::sun::star::script::ModuleType::Class ) - rMod.mnType = com::sun::star::script::ModuleType::Normal; + if ( rMod.mnType == com::sun::star::script::ModuleType::CLASS ) + rMod.mnType = com::sun::star::script::ModuleType::NORMAL; rMod.bIsProxyModule = false; } if( pParser->bText ) diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index 9fbd1035fa5f..8770dc8539f0 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -29,6 +29,7 @@ #include "precompiled_basic.hxx" #include <basic/sbx.hxx> #include "sbcomp.hxx" +#include <com/sun/star/script/ModuleType.hpp> struct SbiParseStack { // "Stack" fuer Statement-Blocks SbiParseStack* pNext; // Chain @@ -140,7 +141,7 @@ SbiParser::SbiParser( StarBASIC* pb, SbModule* pm ) bNewGblDefs = bSingleLineIf = bExplicit = FALSE; - bClassModule = ( pm->GetModuleType() == com::sun::star::script::ModuleType::Class ); + bClassModule = ( pm->GetModuleType() == com::sun::star::script::ModuleType::CLASS ); OSL_TRACE("Parser - %s, bClassModule %d", rtl::OUStringToOString( pm->GetName(), RTL_TEXTENCODING_UTF8 ).getStr(), bClassModule ); pPool = &aPublics; for( short i = 0; i < 26; i++ ) @@ -756,7 +757,7 @@ void SbiParser::Option() case CLASSMODULE: bClassModule = TRUE; - aGen.GetModule().SetModuleType( com::sun::star::script::ModuleType::Class ); + aGen.GetModule().SetModuleType( com::sun::star::script::ModuleType::CLASS ); break; case VBASUPPORT: if( Next() == NUMBER ) -- cgit From c72e885c09d39d03bf35f27614342f7660e9f357 Mon Sep 17 00:00:00 2001 From: Michael Stahl <mst@openoffice.org> Date: Mon, 19 Apr 2010 17:29:55 +0200 Subject: sw33bf03: xmloff: fonthdl.hxx: fix broken header guard --- xmloff/source/style/XMLFontAutoStylePool.cxx | 5 +++-- xmloff/source/style/XMLFontStylesContext.cxx | 15 +++++--------- xmloff/source/style/fonthdl.cxx | 2 -- xmloff/source/style/fonthdl.hxx | 6 +++--- xmloff/source/style/prhdlfac.cxx | 5 +++-- xmloff/source/style/xmlnume.cxx | 21 ++++++++++--------- xmloff/source/style/xmlnumi.cxx | 30 +++++++++++++--------------- 7 files changed, 40 insertions(+), 44 deletions(-) diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx index a5c662ef33a7..518cff949cbb 100644 --- a/xmloff/source/style/XMLFontAutoStylePool.cxx +++ b/xmloff/source/style/XMLFontAutoStylePool.cxx @@ -30,18 +30,19 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" + #include <tools/debug.hxx> #include <svl/cntnrsrt.hxx> #include <tools/fontenum.hxx> + #include "xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/xmluconv.hxx> -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include "fonthdl.hxx" -#endif #include <xmloff/xmlexp.hxx> #include <xmloff/XMLFontAutoStylePool.hxx> + using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx index 4de58bbf232e..faf003a72253 100644 --- a/xmloff/source/style/XMLFontStylesContext.cxx +++ b/xmloff/source/style/XMLFontStylesContext.cxx @@ -31,25 +31,20 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#ifndef _COM_SUN_STAR_AWT_FONTFAMILY_HPP #include <com/sun/star/awt/FontFamily.hpp> -#endif -#ifndef _COM_SUN_STAR_AWT_FONTPITCH_HPP #include <com/sun/star/awt/FontPitch.hpp> -#endif + +#include <rtl/logfile.hxx> + #include <xmloff/nmspmap.hxx> #include "xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include "fonthdl.hxx" -#endif #include <xmloff/xmlimp.hxx> #include <xmloff/maptype.hxx> - -#ifndef _XMLOFF_XMLFONTSTYLESCONTEXT_HXX #include <xmloff/XMLFontStylesContext.hxx> -#endif -#include <rtl/logfile.hxx> + + using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx index acfc846883e7..0c711ef590eb 100644 --- a/xmloff/source/style/fonthdl.cxx +++ b/xmloff/source/style/fonthdl.cxx @@ -31,9 +31,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include <fonthdl.hxx> -#endif #include <xmloff/xmltoken.hxx> #include <xmloff/xmluconv.hxx> #include <rtl/ustrbuf.hxx> diff --git a/xmloff/source/style/fonthdl.hxx b/xmloff/source/style/fonthdl.hxx index d5543c471cc1..177be725bc1b 100644 --- a/xmloff/source/style/fonthdl.hxx +++ b/xmloff/source/style/fonthdl.hxx @@ -28,8 +28,8 @@ * ************************************************************************/ -#ifndef _XMLOFF_PROPERTYHANDLER_FONTYPES_HXX -#define _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX +#ifndef XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX +#define XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include <xmloff/xmlprhdl.hxx> @@ -82,4 +82,4 @@ public: }; -#endif // _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX +#endif // XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX diff --git a/xmloff/source/style/prhdlfac.cxx b/xmloff/source/style/prhdlfac.cxx index b328f3dddc3e..173e3ac3b997 100644 --- a/xmloff/source/style/prhdlfac.cxx +++ b/xmloff/source/style/prhdlfac.cxx @@ -30,10 +30,13 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" + #include <com/sun/star/drawing/ColorMode.hpp> #include <com/sun/star/text/HorizontalAdjust.hpp> #include <com/sun/star/text/WritingMode2.hpp> + #include <tools/debug.hxx> + #include <xmloff/prhdlfac.hxx> #include <xmloff/xmltypes.hxx> #include <xmloff/xmltoken.hxx> @@ -42,9 +45,7 @@ #include <xmloff/XMLConstantsPropertyHandler.hxx> #include "cdouthdl.hxx" #include "csmaphdl.hxx" -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include "fonthdl.hxx" -#endif #include "kernihdl.hxx" #include <postuhdl.hxx> #include "shadwhdl.hxx" diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index 7233c0f7da8f..f84a67f23697 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -30,15 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include <rtl/ustrbuf.hxx> -#include <tools/debug.hxx> -#include <xmloff/nmspmap.hxx> -#include "xmlnmspe.hxx" -#include <xmloff/xmltoken.hxx> -#include <xmloff/xmluconv.hxx> -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX -#include "fonthdl.hxx" -#endif + #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #include <com/sun/star/style/NumberingType.hpp> #include <com/sun/star/style/XStyle.hpp> @@ -55,11 +47,22 @@ // <-- #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> + +#include <rtl/ustrbuf.hxx> + +#include <tools/debug.hxx> + +#include <xmloff/nmspmap.hxx> +#include "xmlnmspe.hxx" +#include <xmloff/xmltoken.hxx> +#include <xmloff/xmluconv.hxx> +#include "fonthdl.hxx" #include "XMLTextListAutoStylePool.hxx" #include <xmloff/xmlnume.hxx> #include <xmloff/xmlexp.hxx> #include <tools/fontenum.hxx> + using ::rtl::OUString; using ::rtl::OUStringBuffer; diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 66f10e7274c6..c7df4da6cad4 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -30,16 +30,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#include <rtl/ustrbuf.hxx> -#include <tools/urlobj.hxx> -#include <tools/debug.hxx> -#include <tools/fontenum.hxx> -#include <xmloff/xmltkmap.hxx> -#include <xmloff/nmspmap.hxx> -#include "xmlnmspe.hxx" -#include <xmloff/xmlimp.hxx> -#include <xmloff/XMLBase64ImportContext.hxx> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/awt/Size.hpp> @@ -54,26 +45,33 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/style/XStyle.hpp> #include <com/sun/star/io/XOutputStream.hpp> + +#include <rtl/ustrbuf.hxx> + +#include <tools/urlobj.hxx> +#include <tools/debug.hxx> +#include <tools/fontenum.hxx> + +#include <xmloff/xmltkmap.hxx> +#include <xmloff/nmspmap.hxx> +#include "xmlnmspe.hxx" +#include <xmloff/xmlimp.hxx> +#include <xmloff/XMLBase64ImportContext.hxx> #include <xmloff/xmltoken.hxx> #include "i18nmap.hxx" #include <xmloff/xmluconv.hxx> -#ifndef _XMLOFF_PROPERTYHANDLER_FONTTYPES_HXX #include "fonthdl.hxx" -#endif -#ifndef _XMLOFF_XMLFONTSTYLESCONTEXT_HXX #include <xmloff/XMLFontStylesContext.hxx> -#endif -#ifndef _XMLOFF_FAMILIES_HXX #include <xmloff/families.hxx> -#endif #include <xmloff/maptype.hxx> - #include <xmloff/xmlnumi.hxx> #define _SVSTDARR_USHORTS #include <svl/svstdarr.hxx> + + using ::rtl::OUString; using ::rtl::OUStringBuffer; -- cgit From 80fcc2da523bfae04094b105e67493f9d7679f8f Mon Sep 17 00:00:00 2001 From: Michael Stahl <mst@openoffice.org> Date: Mon, 19 Apr 2010 18:27:16 +0200 Subject: sw33bf03: #i110691#: import/export xml:id and {anim,draw,form,text}:id: in ODF 1.2, the ID attributes on many elements are deprecated, and must be used only in conjunction with xml:id. new method SvXMLExport::AddAttributeIdLegacy() should fix the export. --- xmloff/inc/xmloff/txtimp.hxx | 2 +- xmloff/inc/xmloff/xmlexp.hxx | 6 ++++ xmloff/source/chart/SchXMLExport.cxx | 21 ++++++++----- xmloff/source/chart/SchXMLParagraphContext.cxx | 18 +++++++++--- xmloff/source/core/xmlexp.cxx | 16 ++++++++++ xmloff/source/draw/animationexport.cxx | 22 +++----------- xmloff/source/draw/animationimport.cxx | 34 +++++++++++++--------- xmloff/source/draw/sdxmlexp.cxx | 4 ++- xmloff/source/draw/sdxmlimp.cxx | 4 +-- xmloff/source/draw/sdxmlimp_impl.hxx | 3 +- xmloff/source/draw/shapeexport.cxx | 6 ++-- xmloff/source/draw/ximpbody.cxx | 23 +++++++++++---- xmloff/source/draw/ximpshap.cxx | 4 ++- xmloff/source/forms/elementexport.cxx | 6 ++-- xmloff/source/forms/elementimport.cxx | 15 ++++++++-- xmloff/source/forms/formattributes.cxx | 2 +- .../source/text/XMLChangedRegionImportContext.cxx | 13 +++++++-- xmloff/source/text/XMLRedlineExport.cxx | 2 +- xmloff/source/text/txtimp.cxx | 2 +- xmloff/source/text/txtparae.cxx | 13 ++++++++- xmloff/source/text/txtparai.cxx | 15 ++++++---- xmloff/source/text/txtparai.hxx | 1 - 22 files changed, 157 insertions(+), 75 deletions(-) diff --git a/xmloff/inc/xmloff/txtimp.hxx b/xmloff/inc/xmloff/txtimp.hxx index 7e041d0bdc91..697c535d79fd 100644 --- a/xmloff/inc/xmloff/txtimp.hxx +++ b/xmloff/inc/xmloff/txtimp.hxx @@ -257,11 +257,11 @@ enum XMLTextPAttrTokens XML_TOK_TEXT_P_PROPERTY, XML_TOK_TEXT_P_CONTENT, XML_TOK_TEXT_P_DATATYPE, + XML_TOK_TEXT_P_TEXTID, XML_TOK_TEXT_P_STYLE_NAME, XML_TOK_TEXT_P_COND_STYLE_NAME, XML_TOK_TEXT_P_LEVEL, XML_TOK_TEXT_P_CLASS_NAMES, - XML_TOK_TEXT_P_ID, XML_TOK_TEXT_P_IS_LIST_HEADER, XML_TOK_TEXT_P_RESTART_NUMBERING, XML_TOK_TEXT_P_START_VALUE, diff --git a/xmloff/inc/xmloff/xmlexp.hxx b/xmloff/inc/xmloff/xmlexp.hxx index 2133a108da78..7b6054c37b55 100644 --- a/xmloff/inc/xmloff/xmlexp.hxx +++ b/xmloff/inc/xmloff/xmlexp.hxx @@ -593,6 +593,12 @@ public: /// name of stream in package, e.g., "content.xml" ::rtl::OUString GetStreamName() const; + // FIXME: this is only for legacy stuff that has not yet been adapted + // to implement XMetadatable; this can write duplicate IDs! + /// add xml:id and legacy namespace id + void SAL_DLLPRIVATE AddAttributeIdLegacy( + sal_uInt16 const nLegacyPrefix, ::rtl::OUString const& rValue); + /// add xml:id attribute (for RDF metadata) void AddAttributeXmlId(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> const & i_xIfc); diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index f7cf82abe974..43ab0b458ab5 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -44,9 +44,7 @@ #include <tools/globname.hxx> #include <sot/clsids.hxx> -#ifndef _SVTOOLS_NMSPMAP_HXX #include <xmloff/nmspmap.hxx> -#endif #include "xmlnmspe.hxx" #include <xmloff/xmltoken.hxx> #include <xmloff/families.hxx> @@ -1536,8 +1534,11 @@ void SchXMLExportHelper::exportTable() // to allow a correct re-association when copying via clipboard if( !bHasOwnData && aFirstRowRangeIter != aFirstRowRangeEndIter ) { - if( (*aFirstRowRangeIter).getLength()) - mrExport.AddAttribute( XML_NAMESPACE_TEXT, XML_ID, *aFirstRowRangeIter ); + if ((*aFirstRowRangeIter).getLength()) + { + mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT, + *aFirstRowRangeIter); + } ++aFirstRowRangeIter; } exportText( *aIt ); @@ -1561,7 +1562,10 @@ void SchXMLExportHelper::exportTable() // write the original range name as id into the local table // to allow a correct re-association when copying via clipboard if( !bHasOwnData && aFirstColumnRangeIter != aFirstColumnRangeEndIter ) - mrExport.AddAttribute( XML_NAMESPACE_TEXT, XML_ID, *aFirstColumnRangeIter++ ); + { + mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT, + *aFirstColumnRangeIter++); + } exportText( *aFirstColIt ); ++aFirstColIt; } @@ -1579,8 +1583,11 @@ void SchXMLExportHelper::exportTable() if( ( !bHasOwnData && aDataRangeIter != aDataRangeEndIter ) && ( mbRowSourceColumns || (aInnerIt == aColIt->begin())) ) { - if( (*aDataRangeIter).getLength()) - mrExport.AddAttribute( XML_NAMESPACE_TEXT, XML_ID, *aDataRangeIter ); + if ((*aDataRangeIter).getLength()) + { + mrExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT, + *aDataRangeIter); + } ++aDataRangeIter; } exportText( msString, false ); // do not convert tabs and lfs diff --git a/xmloff/source/chart/SchXMLParagraphContext.cxx b/xmloff/source/chart/SchXMLParagraphContext.cxx index 1d8a4e16bb8c..9e19c02437b8 100644 --- a/xmloff/source/chart/SchXMLParagraphContext.cxx +++ b/xmloff/source/chart/SchXMLParagraphContext.cxx @@ -63,6 +63,7 @@ void SchXMLParagraphContext::StartElement( const uno::Reference< xml::sax::XAttr { sal_Int16 nAttrCount = xAttrList.is()? xAttrList->getLength(): 0; rtl::OUString aValue; + bool bHaveXmlId( false ); for( sal_Int16 i = 0; i < nAttrCount; i++ ) { @@ -70,11 +71,20 @@ void SchXMLParagraphContext::StartElement( const uno::Reference< xml::sax::XAttr rtl::OUString aLocalName; USHORT nPrefix = GetImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); - if( nPrefix == XML_NAMESPACE_TEXT && - IsXMLToken( aLocalName, XML_ID ) ) + if (IsXMLToken(aLocalName, XML_ID)) { - (*mpId) = xAttrList->getValueByIndex( i ); - break; // we only need this attribute + if (nPrefix == XML_NAMESPACE_XML) + { + (*mpId) = xAttrList->getValueByIndex( i ); + bHaveXmlId = true; + } + if (nPrefix == XML_NAMESPACE_TEXT) + { // text:id shall be ignored if xml:id exists + if (!bHaveXmlId) + { + (*mpId) = xAttrList->getValueByIndex( i ); + } + } } } } diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index e96759c3e470..ab91e2e19ab6 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -2454,6 +2454,22 @@ SvtSaveOptions::ODFDefaultVersion SvXMLExport::getDefaultVersion() const return mpImpl->mStreamName; } +void +SvXMLExport::AddAttributeIdLegacy( + sal_uInt16 const nLegacyPrefix, ::rtl::OUString const& rValue) +{ + switch (getDefaultVersion()) { + case SvtSaveOptions::ODFVER_011: // fall thru + case SvtSaveOptions::ODFVER_010: break; + default: // ODF 1.2: xml:id + AddAttribute(XML_NAMESPACE_XML, XML_ID, rValue); + } + // in ODF 1.1 this was form:id, anim:id, draw:id, or text:id + // backward compatibility: in ODF 1.2 write _both_ id attrs + AddAttribute(nLegacyPrefix, XML_ID, rValue); + // FIXME: this function simply assumes that rValue is unique +} + void SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc) { diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx index 4d7a8af1a1e9..03bda0108b5c 100644 --- a/xmloff/source/draw/animationexport.cxx +++ b/xmloff/source/draw/animationexport.cxx @@ -31,24 +31,14 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_xmloff.hxx" -#ifndef _COM_SUN_STAR_ANIMATIONS_XAnimateColor_HPP_ #include <com/sun/star/animations/XAnimateColor.hpp> -#endif -#ifndef _COM_SUN_STAR_ANIMATIONS_XAnimateSet_HPP_ #include <com/sun/star/animations/XAnimateSet.hpp> -#endif #include <com/sun/star/animations/XCommand.hpp> #include <com/sun/star/animations/Timing.hpp> #include <com/sun/star/animations/Event.hpp> -#ifndef _COM_SUN_STAR_ANIMATIONS_XAnimateMotion_HPP_ #include <com/sun/star/animations/XAnimateMotion.hpp> -#endif -#ifndef _COM_SUN_STAR_ANIMATIONS_XAnimateTransform_HPP_ #include <com/sun/star/animations/XAnimateTransform.hpp> -#endif -#ifndef _COM_SUN_STAR_ANIMATIONS_XTransitionFilter_HPP_ #include <com/sun/star/animations/XTransitionFilter.hpp> -#endif #include <com/sun/star/animations/XIterateContainer.hpp> #include <com/sun/star/animations/XAudio.hpp> #include <com/sun/star/animations/AnimationColorSpace.hpp> @@ -67,19 +57,12 @@ #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/presentation/EffectNodeType.hpp> -#ifndef _COM_SUN_STAR_PRESENTATION_EffectPresetClass_HPP_ #include <com/sun/star/presentation/EffectPresetClass.hpp> -#endif -#ifndef _COM_SUN_STAR_PRESENTATION_ParagraphTarget_HPP_ #include <com/sun/star/presentation/ParagraphTarget.hpp> -#endif #include <com/sun/star/presentation/TextAnimationType.hpp> #include <com/sun/star/presentation/ShapeAnimationSubType.hpp> #include <com/sun/star/presentation/EffectCommands.hpp> - -#ifndef _COM_SUN_STAR_DRAWING_XShape_HPP_ #include <com/sun/star/drawing/XShape.hpp> -#endif #include <tools/debug.hxx> #include <tools/time.hxx> @@ -783,7 +766,10 @@ void AnimationsExporterImpl::exportNode( const Reference< XAnimationNode >& xNod const OUString& rExportIdentifier = mrExport.getInterfaceToIdentifierMapper().getIdentifier( xNode ); if( rExportIdentifier.getLength() ) - mrExport.AddAttribute( XML_NAMESPACE_ANIMATION, XML_ID, rExportIdentifier ); + { + mrExport.AddAttributeIdLegacy( + XML_NAMESPACE_ANIMATION, rExportIdentifier); + } Any aTemp( xNode->getBegin() ); if( aTemp.hasValue() ) diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 6569c9d5408d..e151d2752358 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -50,18 +50,14 @@ #include <com/sun/star/animations/XAudio.hpp> #include <com/sun/star/animations/ValuePair.hpp> #include <com/sun/star/animations/AnimationColorSpace.hpp> -#ifndef _COM_SUN_STAR_PRESENTATION_EffectPresetClass_HPP_ #include <com/sun/star/presentation/EffectPresetClass.hpp> -#endif #include <com/sun/star/animations/Timing.hpp> #include <com/sun/star/animations/Event.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/xml/sax/XAttributeList.hpp> #include <com/sun/star/text/XTextCursor.hpp> #include <com/sun/star/text/XTextRangeCompare.hpp> -#ifndef _COM_SUN_STAR_PRESENTATION_ParagraphTarget_HPP_ #include <com/sun/star/presentation/ParagraphTarget.hpp> -#endif #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/animations/EventTrigger.hpp> @@ -240,7 +236,8 @@ enum AnimationNodeAttributes ANA_IterateType, ANA_IterateInterval, ANA_Formula, - ANA_ID, + ANA_ANIMID, + ANA_XMLID, ANA_Group_Id, ANA_Command, ANA_Volume @@ -297,8 +294,8 @@ const SvXMLTokenMap& AnimationsImportHelperImpl::getAnimationNodeAttributeTokenM { XML_NAMESPACE_ANIMATION, XML_ITERATE_TYPE, (sal_uInt16)ANA_IterateType }, { XML_NAMESPACE_ANIMATION, XML_ITERATE_INTERVAL, (sal_uInt16)ANA_IterateInterval }, { XML_NAMESPACE_ANIMATION, XML_FORMULA, (sal_uInt16)ANA_Formula }, - { XML_NAMESPACE_ANIMATION, XML_ID, (sal_uInt16)ANA_ID }, - { XML_NAMESPACE_XML, XML_ID, (sal_uInt16)ANA_ID }, + { XML_NAMESPACE_ANIMATION, XML_ID, (sal_uInt16)ANA_ANIMID }, + { XML_NAMESPACE_XML, XML_ID, (sal_uInt16)ANA_XMLID }, { XML_NAMESPACE_PRESENTATION, XML_GROUP_ID, (sal_uInt16)ANA_Group_Id }, { XML_NAMESPACE_ANIMATION, XML_AUDIO_LEVEL, (sal_uInt16)ANA_Volume }, { XML_NAMESPACE_ANIMATION, XML_COMMAND, (sal_uInt16)ANA_Command }, @@ -811,6 +808,8 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< : std::list< NamedValue > aUserData; XMLTokenEnum meAttributeName = XML_TOKEN_INVALID; OUString aFrom, aBy, aTo, aValues; + bool bHaveXmlId( false ); + OUString sXmlId; const sal_Int16 nCount = xAttrList.is() ? xAttrList->getLength() : 0; sal_uInt16 nEnum; @@ -1057,13 +1056,15 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< : } break; - case ANA_ID: + case ANA_ANIMID: { - if( rValue.getLength() ) - { - Reference< XInterface > xRef( mxNode, UNO_QUERY ); - GetImport().getInterfaceToIdentifierMapper().registerReference( rValue, xRef ); - } + if (!bHaveXmlId) { sXmlId = rValue; } + } + break; + case ANA_XMLID: + { + sXmlId = rValue; + bHaveXmlId = true; } break; @@ -1254,6 +1255,13 @@ void AnimationNodeContext::init_node( const ::com::sun::star::uno::Reference< : } } + if (sXmlId.getLength()) + { + Reference< XInterface > const xRef( mxNode, UNO_QUERY ); + GetImport().getInterfaceToIdentifierMapper().registerReference( + sXmlId, xRef ); + } + sal_Int32 nUserDataCount = aUserData.size(); if( nUserDataCount ) { diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 1d7414d4ca23..c9e8ec821f82 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -2014,7 +2014,9 @@ void SdXMLExport::_ExportContent() // write draw:id const OUString aPageId = getInterfaceToIdentifierMapper().getIdentifier( xDrawPage ); if( aPageId.getLength() != 0 ) - AddAttribute ( XML_NAMESPACE_DRAW, XML_ID, aPageId ); + { + AddAttributeIdLegacy(XML_NAMESPACE_DRAW, aPageId); + } // write page SvXMLElementExport aDPG(*this, XML_NAMESPACE_DRAW, XML_PAGE, sal_True, sal_True); diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 47e1e0f5810b..7f85a69fa5ed 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -668,8 +668,8 @@ const SvXMLTokenMap& SdXMLImport::GetDrawPageAttrTokenMap() { XML_NAMESPACE_DRAW, XML_STYLE_NAME, XML_TOK_DRAWPAGE_STYLE_NAME }, { XML_NAMESPACE_DRAW, XML_MASTER_PAGE_NAME, XML_TOK_DRAWPAGE_MASTER_PAGE_NAME }, { XML_NAMESPACE_PRESENTATION, XML_PRESENTATION_PAGE_LAYOUT_NAME, XML_TOK_DRAWPAGE_PAGE_LAYOUT_NAME }, - { XML_NAMESPACE_DRAW, XML_ID, XML_TOK_DRAWPAGE_ID }, - { XML_NAMESPACE_XML, XML_ID, XML_TOK_DRAWPAGE_ID }, + { XML_NAMESPACE_DRAW, XML_ID, XML_TOK_DRAWPAGE_DRAWID }, + { XML_NAMESPACE_XML, XML_ID, XML_TOK_DRAWPAGE_XMLID }, { XML_NAMESPACE_XLINK, XML_HREF, XML_TOK_DRAWPAGE_HREF }, { XML_NAMESPACE_PRESENTATION, XML_USE_HEADER_NAME, XML_TOK_DRAWPAGE_USE_HEADER_NAME }, { XML_NAMESPACE_PRESENTATION, XML_USE_FOOTER_NAME, XML_TOK_DRAWPAGE_USE_FOOTER_NAME }, diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx index 11b618cae126..825936d4caa0 100644 --- a/xmloff/source/draw/sdxmlimp_impl.hxx +++ b/xmloff/source/draw/sdxmlimp_impl.hxx @@ -133,7 +133,8 @@ enum SdXMLDrawPageAttrTokenMap XML_TOK_DRAWPAGE_STYLE_NAME, XML_TOK_DRAWPAGE_MASTER_PAGE_NAME, XML_TOK_DRAWPAGE_PAGE_LAYOUT_NAME, - XML_TOK_DRAWPAGE_ID, + XML_TOK_DRAWPAGE_DRAWID, + XML_TOK_DRAWPAGE_XMLID, XML_TOK_DRAWPAGE_HREF, XML_TOK_DRAWPAGE_USE_HEADER_NAME, XML_TOK_DRAWPAGE_USE_FOOTER_NAME, diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 3a0e01631f28..9f971de54ab2 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -46,9 +46,7 @@ #include <xmloff/xmluconv.hxx> #include "PropertySetMerger.hxx" -#ifndef _XMLOFF_SHAPEEXPORT_HXX #include <xmloff/shapeexport.hxx> -#endif #include "sdpropls.hxx" #include "sdxmlexp_impl.hxx" #include <xmloff/families.hxx> @@ -642,7 +640,9 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape uno::Reference< uno::XInterface > xRef( xShape, uno::UNO_QUERY ); const OUString& rShapeId = mrExport.getInterfaceToIdentifierMapper().getIdentifier( xRef ); if( rShapeId.getLength() ) - mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_ID, rShapeId ); + { + mrExport.AddAttributeIdLegacy(XML_NAMESPACE_DRAW, rShapeId); + } } // -------------------------- diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx index 8a226a008251..9909c3d113ce 100644 --- a/xmloff/source/draw/ximpbody.cxx +++ b/xmloff/source/draw/ximpbody.cxx @@ -65,6 +65,9 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, : SdXMLGenericPageContext( rImport, nPrfx, rLocalName, xAttrList, rShapes ) , mbHadSMILNodes( false ) { + bool bHaveXmlId( false ); + OUString sXmlId; + sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; for(sal_Int16 i=0; i < nAttrCount; i++) @@ -112,13 +115,17 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, maUseDateTimeDeclName = sValue; break; } - - case XML_TOK_DRAWPAGE_ID: + case XML_TOK_DRAWPAGE_DRAWID: { - uno::Reference< uno::XInterface > xRef( rShapes.get() ); - GetImport().getInterfaceToIdentifierMapper().registerReference( sValue, xRef ); - break; + if (!bHaveXmlId) { sXmlId = sValue; } } + break; + case XML_TOK_DRAWPAGE_XMLID: + { + sXmlId = sValue; + bHaveXmlId = true; + } + break; case XML_TOK_DRAWPAGE_HREF: { maHREF = sValue; @@ -127,6 +134,12 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport, } } + if (sXmlId.getLength()) + { + uno::Reference< uno::XInterface > const xRef( rShapes.get() ); + GetImport().getInterfaceToIdentifierMapper().registerReference( + sXmlId, xRef ); + } GetImport().GetShapeImport()->startPage( rShapes ); uno::Reference< drawing::XDrawPage > xShapeDrawPage(rShapes, uno::UNO_QUERY); diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index c4c86abb7eef..0c78d0d58e4b 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -764,6 +764,7 @@ void SdXMLShapeContext::SetThumbnail() // this is called from the parent group for each unparsed attribute in the attribute list void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::rtl::OUString& rValue ) { + bool bHaveXmlId( false ); if( XML_NAMESPACE_DRAW == nPrefix ) { if( IsXMLToken( rLocalName, XML_ZINDEX ) ) @@ -772,7 +773,7 @@ void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUStr } else if( IsXMLToken( rLocalName, XML_ID ) ) { - maShapeId = rValue; + if (!bHaveXmlId) { maShapeId = rValue; }; } else if( IsXMLToken( rLocalName, XML_NAME ) ) { @@ -865,6 +866,7 @@ void SdXMLShapeContext::processAttribute( sal_uInt16 nPrefix, const ::rtl::OUStr if( IsXMLToken( rLocalName, XML_ID ) ) { maShapeId = rValue; + bHaveXmlId = true; } } } diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index a17138654730..f28eab48e428 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -316,10 +316,8 @@ namespace xmloff if (CCA_CONTROL_ID & m_nIncludeCommon) { OSL_ENSURE(m_sControlId.getLength(), "OControlExport::exportInnerAttributes: have no control id for the control!"); - AddAttribute( - OAttributeMetaData::getCommonControlAttributeNamespace(CCA_CONTROL_ID), - OAttributeMetaData::getCommonControlAttributeName(CCA_CONTROL_ID), - m_sControlId); + m_rContext.getGlobalContext().AddAttributeIdLegacy( + XML_NAMESPACE_FORM, m_sControlId); #if OSL_DEBUG_LEVEL > 0 // reset the bit for later checking m_nIncludeCommon = m_nIncludeCommon & ~CCA_CONTROL_ID; diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 7bdb61ff86fd..cb1388c47386 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -589,12 +589,21 @@ namespace xmloff //--------------------------------------------------------------------- void OControlImport::handleAttribute(sal_uInt16 _nNamespaceKey, const ::rtl::OUString& _rLocalName, const ::rtl::OUString& _rValue) { - static const sal_Char* pControlIdAttributeName = OAttributeMetaData::getCommonControlAttributeName(CCA_CONTROL_ID); static const sal_Char* pLinkedCellAttributeName = OAttributeMetaData::getBindingAttributeName(BA_LINKED_CELL); - if ( !m_sControlId.getLength() && _rLocalName.equalsAscii( pControlIdAttributeName ) ) + if (IsXMLToken(_rLocalName, XML_ID)) { // it's the control id - m_sControlId = _rValue; + if (XML_NAMESPACE_XML == _nNamespaceKey) + { + m_sControlId = _rValue; + } + else if (XML_NAMESPACE_FORM == _nNamespaceKey) + { + if (!m_sControlId.getLength()) + { + m_sControlId = _rValue; + } + } } else if ( _rLocalName.equalsAscii( pLinkedCellAttributeName ) ) { // it's the address of a spreadsheet cell diff --git a/xmloff/source/forms/formattributes.cxx b/xmloff/source/forms/formattributes.cxx index 0c2431590b63..e21786e376d2 100644 --- a/xmloff/source/forms/formattributes.cxx +++ b/xmloff/source/forms/formattributes.cxx @@ -56,7 +56,7 @@ namespace xmloff case CCA_NAME: return "name"; case CCA_SERVICE_NAME: return "control-implementation"; case CCA_BUTTON_TYPE: return "button-type"; - case CCA_CONTROL_ID: return "id"; +// disabled(AddAttributeIdLegacy) case CCA_CONTROL_ID: return "id"; case CCA_CURRENT_SELECTED: return "current-selected"; case CCA_CURRENT_VALUE: return "current-value"; case CCA_DISABLED: return "disabled"; diff --git a/xmloff/source/text/XMLChangedRegionImportContext.cxx b/xmloff/source/text/XMLChangedRegionImportContext.cxx index 220f235d9ddd..347590a6e5b6 100644 --- a/xmloff/source/text/XMLChangedRegionImportContext.cxx +++ b/xmloff/source/text/XMLChangedRegionImportContext.cxx @@ -71,6 +71,7 @@ void XMLChangedRegionImportContext::StartElement( const Reference<XAttributeList> & xAttrList) { // process attributes: id + bool bHaveXmlId( false ); sal_Int16 nLength = xAttrList->getLength(); for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++) { @@ -80,11 +81,19 @@ void XMLChangedRegionImportContext::StartElement( &sLocalName ); const OUString sValue = xAttrList->getValueByIndex(nAttr); - if ( XML_NAMESPACE_TEXT == nPrefix ) + if (XML_NAMESPACE_XML == nPrefix) { - if( IsXMLToken( sLocalName, XML_ID ) ) + if (IsXMLToken(sLocalName, XML_ID)) { sID = sValue; + bHaveXmlId = true; + } + } + else if (XML_NAMESPACE_TEXT == nPrefix) + { + if (IsXMLToken(sLocalName, XML_ID)) + { + if (!bHaveXmlId) { sID = sValue; } } else if( IsXMLToken( sLocalName, XML_MERGE_LAST_PARAGRAPH ) ) { diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx index 2cb0f24eab2a..1ad405a27969 100644 --- a/xmloff/source/text/XMLRedlineExport.cxx +++ b/xmloff/source/text/XMLRedlineExport.cxx @@ -377,7 +377,7 @@ void XMLRedlineExport::ExportChangedRegion( const Reference<XPropertySet> & rPropSet) { // Redline-ID - rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_ID, GetRedlineID(rPropSet) ); + rExport.AddAttributeIdLegacy(XML_NAMESPACE_TEXT, GetRedlineID(rPropSet)); // merge-last-paragraph Any aAny = rPropSet->getPropertyValue(sMergeLastPara); diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index af20bfbb23dc..0fcc326982b8 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -332,11 +332,11 @@ static __FAR_DATA SvXMLTokenMapEntry aTextPAttrTokenMap[] = { XML_NAMESPACE_XHTML, XML_PROPERTY, XML_TOK_TEXT_P_PROPERTY }, { XML_NAMESPACE_XHTML, XML_CONTENT, XML_TOK_TEXT_P_CONTENT }, { XML_NAMESPACE_XHTML, XML_DATATYPE, XML_TOK_TEXT_P_DATATYPE }, + { XML_NAMESPACE_TEXT, XML_ID, XML_TOK_TEXT_P_TEXTID }, { XML_NAMESPACE_TEXT, XML_STYLE_NAME, XML_TOK_TEXT_P_STYLE_NAME }, { XML_NAMESPACE_TEXT, XML_COND_STYLE_NAME, XML_TOK_TEXT_P_COND_STYLE_NAME }, { XML_NAMESPACE_TEXT, XML_OUTLINE_LEVEL,XML_TOK_TEXT_P_LEVEL }, - { XML_NAMESPACE_TEXT, XML_ID, XML_TOK_TEXT_P_ID }, { XML_NAMESPACE_TEXT, XML_IS_LIST_HEADER,XML_TOK_TEXT_P_IS_LIST_HEADER }, { XML_NAMESPACE_TEXT, XML_RESTART_NUMBERING,XML_TOK_TEXT_P_RESTART_NUMBERING }, { XML_NAMESPACE_TEXT, XML_START_VALUE,XML_TOK_TEXT_P_START_VALUE }, diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index f07d8a89c5ef..4e0702b94388 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -1937,7 +1937,18 @@ void XMLTextParagraphExport::exportParagraph( { const OUString& rIdentifier = GetExport().getInterfaceToIdentifierMapper().getIdentifier( xRef ); if( rIdentifier.getLength() ) - GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_ID, rIdentifier ); + { + // FIXME: this is just temporary until EditEngine + // paragraphs implement XMetadatable. + // then that must be used and not the mapper, because + // when both can be used we get two xml:id! + uno::Reference<rdf::XMetadatable> const xMeta(xRef, + uno::UNO_QUERY); + OSL_ENSURE(!xMeta.is(), "paragraph that implements " + "XMetadatable used in interfaceToIdentifierMapper?"); + GetExport().AddAttributeIdLegacy(XML_NAMESPACE_TEXT, + rIdentifier); + } } OUString sAutoStyle( sStyle ); diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index aaac42d14597..0d7661ac2c1c 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -1920,6 +1920,7 @@ XMLParaContext::XMLParaContext( const SvXMLTokenMap& rTokenMap = GetImport().GetTextImport()->GetTextPAttrTokenMap(); + bool bHaveXmlId( false ); OUString aCondStyleName, sClassNames; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -1936,6 +1937,7 @@ XMLParaContext::XMLParaContext( { case XML_TOK_TEXT_P_XMLID: m_sXmlId = rValue; + bHaveXmlId = true; break; case XML_TOK_TEXT_P_ABOUT: m_sAbout = rValue; @@ -1950,6 +1952,9 @@ XMLParaContext::XMLParaContext( case XML_TOK_TEXT_P_DATATYPE: m_sDatatype = rValue; break; + case XML_TOK_TEXT_P_TEXTID: + if (!bHaveXmlId) { m_sXmlId = rValue; } + break; case XML_TOK_TEXT_P_STYLE_NAME: sStyleName = rValue; break; @@ -1982,9 +1987,6 @@ XMLParaContext::XMLParaContext( } } break; - case XML_TOK_TEXT_P_ID: - sId = rValue; - break; case XML_TOK_TEXT_P_RESTART_NUMBERING: { sal_Bool bBool; @@ -2023,14 +2025,17 @@ XMLParaContext::~XMLParaContext() // if we have an id set for this paragraph, get a cursor for this // paragraph and register it with the given identifier - if( sId.getLength() ) + // FIXME: this is just temporary, and should be removed when + // EditEngine paragraphs implement XMetadatable! + if (m_sXmlId.getLength()) { Reference < XTextCursor > xIdCursor( xTxtImport->GetText()->createTextCursorByRange( xStart ) ); if( xIdCursor.is() ) { xIdCursor->gotoRange( xEnd, sal_True ); Reference< XInterface > xRef( xIdCursor, UNO_QUERY ); - GetImport().getInterfaceToIdentifierMapper().registerReference( sId, xRef ); + GetImport().getInterfaceToIdentifierMapper().registerReference( + m_sXmlId, xRef); } } diff --git a/xmloff/source/text/txtparai.hxx b/xmloff/source/text/txtparai.hxx index 6eaeeee1ee46..af8296fd1b07 100644 --- a/xmloff/source/text/txtparai.hxx +++ b/xmloff/source/text/txtparai.hxx @@ -49,7 +49,6 @@ class XMLParaContext : public SvXMLImportContext ::com::sun::star::uno::Reference < ::com::sun::star::text::XTextRange > xStart; // xub_StrLen nStart; ::rtl::OUString sStyleName; - ::rtl::OUString sId; ::rtl::OUString m_sXmlId; ::rtl::OUString m_sAbout; ::rtl::OUString m_sProperty; -- cgit From 52efbb2a0a17eacdcce9a1c034a4077f977b75d0 Mon Sep 17 00:00:00 2001 From: Michael Stahl <mst@openoffice.org> Date: Mon, 19 Apr 2010 18:28:13 +0200 Subject: sw33bf03: #i110694#: exportLevelStyle: no style-name on list-level-style-image --- xmloff/source/style/xmlnume.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx index f84a67f23697..9b6fe97badd8 100644 --- a/xmloff/source/style/xmlnume.cxx +++ b/xmloff/source/style/xmlnume.cxx @@ -300,9 +300,12 @@ void SvxXMLNumRuleExport::exportLevelStyle( INT32 nLevel, OUStringBuffer sTmp; sTmp.append( nLevel + 1 ); GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_LEVEL, sTmp.makeStringAndClear() ); - if( sTextStyleName.getLength() > 0 ) + // #i110694#: no style-name on list-level-style-image + if ((sTextStyleName.getLength() > 0) && (NumberingType::BITMAP != eType)) + { GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME, GetExport().EncodeStyleName( sTextStyleName ) ); + } if( sPrefix.getLength() > 0 ) GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_PREFIX, sPrefix ); if( sSuffix.getLength() > 0 ) -- cgit From a48f33596d08f23f1f1358414bdcadd200ac0e5f Mon Sep 17 00:00:00 2001 From: npower Developer <npower@openoffice.org> Date: Mon, 19 Apr 2010 20:29:31 +0100 Subject: ab75: #i10417# make sure substituted Err object only returned for vba mode --- basic/source/runtime/stdobj.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx index d2585501c826..fd4cacc646d5 100644 --- a/basic/source/runtime/stdobj.cxx +++ b/basic/source/runtime/stdobj.cxx @@ -656,7 +656,7 @@ SbxVariable* SbiStdObject::Find( const String& rName, SbxClassType t ) // #TODO #FIXME hack for substituting ooo-basic Err with vba-ish // ErrObject object static String sErr( RTL_CONSTASCII_USTRINGPARAM("Err") ); - if ( rName.EqualsIgnoreCaseAscii( sErr ) ) + if ( SbiRuntime::isVBAEnabled() && rName.EqualsIgnoreCaseAscii( sErr ) ) return SbxErrObject::getErrObject(); // Bereits eingetragen? SbxVariable* pVar = SbxObject::Find( rName, t ); -- cgit From 72a7c8ea482842a63311bf00e39ff077776cc6a6 Mon Sep 17 00:00:00 2001 From: npower Developer <npower@openoffice.org> Date: Tue, 20 Apr 2010 13:11:25 +0100 Subject: ab75: #i110417# improve ErrObj behaviour --- basic/source/classes/errobject.cxx | 12 ++++++++---- basic/source/classes/sb.cxx | 32 ++++++++++++++++++++++++++++++++ basic/source/classes/sb.src | 4 ++-- basic/source/runtime/methods.cxx | 16 ++++++++++++++-- basic/source/runtime/runtime.cxx | 16 +++++++--------- 5 files changed, 63 insertions(+), 17 deletions(-) diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx index dc62e65b6945..c34fa0a49aec 100644 --- a/basic/source/classes/errobject.cxx +++ b/basic/source/classes/errobject.cxx @@ -19,6 +19,7 @@ class ErrObject : public ErrObjectImpl_BASE rtl::OUString m_sDescription; sal_Int32 m_nNumber; sal_Int32 m_nHelpContext; + bool mbIsInError; public: ErrObject(); @@ -47,7 +48,7 @@ ErrObject::~ErrObject() { } -ErrObject::ErrObject() : m_nNumber(0), m_nHelpContext(0) +ErrObject::ErrObject() : m_nNumber(0), m_nHelpContext(0), mbIsInError(false) { } @@ -60,9 +61,9 @@ ErrObject::getNumber() throw (uno::RuntimeException) void SAL_CALL ErrObject::setNumber( ::sal_Int32 _number ) throw (uno::RuntimeException) { - m_nNumber = _number; - - +// m_nNumber = _number; + if ( !mbIsInError ) + Raise( uno::makeAny( _number ), uno::Any(), uno::Any(), uno::Any(), uno::Any() ); } ::sal_Int32 SAL_CALL @@ -128,6 +129,8 @@ ErrObject::Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any { if ( !Number.hasValue() ) throw uno::RuntimeException( rtl::OUString::createFromAscii("Missing Required Paramater"), uno::Reference< uno::XInterface >() ); + mbIsInError = true; + Clear(); Description >>= m_sDescription; Source >>= m_sSource; HelpFile >>= m_sHelpFile; @@ -140,6 +143,7 @@ ErrObject::Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any n = m_nNumber; // force orig number, probably should have a specific table of vb ( localized ) errors pINST->Error( n, m_sDescription ); } + mbIsInError = false; } // XDefaultProperty diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 60f4de70c2be..b76453999212 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -54,6 +54,7 @@ #include "sb.hrc" #include <basrid.hxx> #include <vos/mutex.hxx> +#include "errobject.hxx" // #pragma SW_SEGMENT_CLASS( SBASIC, SBASIC_CODE ) @@ -1330,6 +1331,7 @@ void StarBASIC::MakeErrorText( SbError nId, const String& aMsg ) } else GetSbData()->aErrMsg = String::EmptyString(); + } BOOL StarBASIC::CError @@ -1356,7 +1358,22 @@ BOOL StarBASIC::CError // Umsetzung des Codes fuer String-Transport in SFX-Error if( rMsg.Len() ) + { + // very confusing, even though MakeErrorText sets up the error text + // seems that this is not used ( if rMsg already has content ) + // In the case of VBA MakeErrorText also formats the error to be alittle more + // like vba ( adds an error number etc ) + if ( SbiRuntime::isVBAEnabled() && ( code == SbERR_BASIC_COMPAT ) ) + { + String aTmp = '\''; + aTmp += String::CreateFromInt32( SbxErrObject::getUnoErrObject()->getNumber() ); + aTmp += String( RTL_CONSTASCII_USTRINGPARAM("\'\n") ); + aTmp += GetSbData()->aErrMsg.Len() ? GetSbData()->aErrMsg : rMsg; + code = (ULONG)*new StringErrorInfo( code, aTmp ); + } + else code = (ULONG)*new StringErrorInfo( code, String(rMsg) ); + } SetErrorData( code, l, c1, c2 ); GetSbData()->bCompiler = TRUE; @@ -1386,7 +1403,22 @@ BOOL StarBASIC::RTError( SbError code, const String& rMsg, USHORT l, USHORT c1, // Umsetzung des Codes fuer String-Transport in SFX-Error if( rMsg.Len() ) + { + // very confusing, even though MakeErrorText sets up the error text + // seems that this is not used ( if rMsg already has content ) + // In the case of VBA MakeErrorText also formats the error to be alittle more + // like vba ( adds an error number etc ) + if ( SbiRuntime::isVBAEnabled() && ( code == SbERR_BASIC_COMPAT ) ) + { + String aTmp = '\''; + aTmp += String::CreateFromInt32( SbxErrObject::getUnoErrObject()->getNumber() ); + aTmp += String( RTL_CONSTASCII_USTRINGPARAM("\'\n") ); + aTmp += GetSbData()->aErrMsg.Len() ? GetSbData()->aErrMsg : rMsg; + code = (ULONG)*new StringErrorInfo( code, aTmp ); + } + else code = (ULONG)*new StringErrorInfo( code, String(rMsg) ); + } SetErrorData( code, l, c1, c2 ); if( GetSbData()->aErrHdl.IsSet() ) diff --git a/basic/source/classes/sb.src b/basic/source/classes/sb.src index 41ae03d9934f..4e0eacf10d2f 100644 --- a/basic/source/classes/sb.src +++ b/basic/source/classes/sb.src @@ -590,8 +590,8 @@ Resource RID_BASIC_START }; String ERRCODE_BASIC_COMPAT & ERRCODE_RES_MASK { - Text [ de ] = "$(ARG1)." ; - Text [ en-US ] = "$(ARG1)." ; + Text [ de ] = "$(ARG1)" ; + Text [ en-US ] = "$(ARG1)" ; Text [ x-comment ] = " "; }; }; diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 9a21e488d4aa..0a5a2b1736dd 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -61,6 +61,7 @@ #else #include <osl/file.hxx> #endif +#include "errobject.hxx" #ifdef _USE_UNO #include <comphelper/processfactory.hxx> @@ -256,6 +257,7 @@ RTLFUNC(Error) { String aErrorMsg; SbError nErr = 0L; + INT32 nCode = 0; if( rPar.Count() == 1 ) { nErr = StarBASIC::GetErrBasic(); @@ -263,14 +265,24 @@ RTLFUNC(Error) } else { - INT32 nCode = rPar.Get( 1 )->GetLong(); + nCode = rPar.Get( 1 )->GetLong(); if( nCode > 65535L ) StarBASIC::Error( SbERR_CONVERSION ); else nErr = StarBASIC::GetSfxFromVBError( (USHORT)nCode ); } pBasic->MakeErrorText( nErr, aErrorMsg ); - rPar.Get( 0 )->PutString( pBasic->GetErrorText() ); + String tmpErrMsg( pBasic->GetErrorText() ); + // If this rtlfunc 'Error' passed a errcode the same as the active Err Objects's + // current err then return the description for the error message if it is set + // ( complicated isn't it ? ) + if ( SbiRuntime::isVBAEnabled() && rPar.Count() > 1 ); + { + com::sun::star::uno::Reference< ooo::vba::XErrObject > xErrObj( SbxErrObject::getUnoErrObject() ); + if ( xErrObj.is() && xErrObj->getNumber() == nCode && xErrObj->getDescription().getLength() ) + tmpErrMsg = xErrObj->getDescription(); + } + rPar.Get( 0 )->PutString( tmpErrMsg ); } } diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 75ff47c73486..59129d0db9b9 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -807,7 +807,11 @@ void SbiRuntime::Error( SbError n ) // we really need a new vba compatible error list if ( !aMsg.Len() ) { - StarBASIC::MakeErrorText( n, aMsg ); + // is the error number vb or ( sb ) + SbError nTmp = StarBASIC::GetSfxFromVBError( n ); + if ( !nTmp ) + nTmp = n; + StarBASIC::MakeErrorText( nTmp, aMsg ); aMsg = StarBASIC::GetErrorText(); if ( !aMsg.Len() ) // no message for err no. // need localized resource here @@ -815,14 +819,8 @@ void SbiRuntime::Error( SbError n ) } // no num? most likely then it *is* really a vba err SbxErrObject::getUnoErrObject()->setNumber( ( StarBASIC::GetVBErrorCode( n ) == 0 ) ? n : StarBASIC::GetVBErrorCode( n ) ); - SbxErrObject::getUnoErrObject()->setDescription( aMsg ); - - // prepend an error number to the message. - String aTmp = '\''; - aTmp += String::CreateFromInt32( SbxErrObject::getUnoErrObject()->getNumber() ); - aTmp += String( RTL_CONSTASCII_USTRINGPARAM("\'\n") ); - aTmp += aMsg; - + //SbxErrObject::getUnoErrObject()->setDescription( aMsg ); + String aTmp = aMsg; pInst->aErrorMsg = aTmp; nError = SbERR_BASIC_COMPAT; } -- cgit From b9840e950dfbba863080dd0de76c75364261ecf9 Mon Sep 17 00:00:00 2001 From: npower Developer <npower@openoffice.org> Date: Tue, 20 Apr 2010 13:21:03 +0100 Subject: ab75: #i110417# get rid of unnecessary tmp string --- basic/source/runtime/runtime.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 59129d0db9b9..761955f6e877 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -819,9 +819,7 @@ void SbiRuntime::Error( SbError n ) } // no num? most likely then it *is* really a vba err SbxErrObject::getUnoErrObject()->setNumber( ( StarBASIC::GetVBErrorCode( n ) == 0 ) ? n : StarBASIC::GetVBErrorCode( n ) ); - //SbxErrObject::getUnoErrObject()->setDescription( aMsg ); - String aTmp = aMsg; - pInst->aErrorMsg = aTmp; + pInst->aErrorMsg = aMsg; nError = SbERR_BASIC_COMPAT; } } -- cgit From 211863dd571a01c83c6babbe2b880ed82cf85926 Mon Sep 17 00:00:00 2001 From: Niklas Nebel <nn@openoffice.org> Date: Tue, 20 Apr 2010 17:18:54 +0200 Subject: calc53: #i110911# write required xlink:type attributes, column element for cached table --- xmloff/source/forms/elementexport.cxx | 4 ++-- xmloff/source/forms/propertyexport.cxx | 6 +++++- xmloff/source/forms/propertyexport.hxx | 8 +++++--- xmloff/source/forms/propertyimport.cxx | 2 +- xmloff/source/script/XMLScriptExportHandler.cxx | 3 +++ 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index 9baf402e5ea7..c3f2802f31b3 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -693,7 +693,7 @@ namespace xmloff if (m_nIncludeCommon & CCA_TARGET_LOCATION) { - exportTargetLocationAttribute(); + exportTargetLocationAttribute(false); #if OSL_DEBUG_LEVEL > 0 // reset the bit for later checking m_nIncludeCommon = m_nIncludeCommon & ~CCA_TARGET_LOCATION; @@ -2134,7 +2134,7 @@ namespace xmloff // the target frame exportTargetFrameAttribute(); // the target URL - exportTargetLocationAttribute(); + exportTargetLocationAttribute(true); // #i110911# add type attribute (for form, but not for control) // master fields exportStringSequenceAttribute( diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 1586c9a7a439..2a485566cf9d 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -420,7 +420,7 @@ namespace xmloff } //--------------------------------------------------------------------- - void OPropertyExport::exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty) + void OPropertyExport::exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType) { DBG_CHECK_PROPERTY( _sPropertyName, ::rtl::OUString ); @@ -433,6 +433,10 @@ namespace xmloff ,OAttributeMetaData::getCommonControlAttributeName(_nProperty) , sTargetLocation); + // #i110911# add xlink:type="simple" if required + if (_bAddType) + AddAttribute(XML_NAMESPACE_XLINK, token::XML_TYPE, token::XML_SIMPLE); + exportedProperty(_sPropertyName); } //--------------------------------------------------------------------- diff --git a/xmloff/source/forms/propertyexport.hxx b/xmloff/source/forms/propertyexport.hxx index 5e1f683e339d..ab17912e4df4 100644 --- a/xmloff/source/forms/propertyexport.hxx +++ b/xmloff/source/forms/propertyexport.hxx @@ -69,7 +69,7 @@ namespace xmloff StringSet m_aRemainingProps; // see examinePersistence - void exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty); + void exportRelativeTargetLocation(const ConstAsciiString& _sPropertyName,sal_Int32 _nProperty,bool _bAddType); protected: IFormsExportContext& m_rContext; @@ -230,8 +230,10 @@ namespace xmloff <p>The value of this attribute is extracted from the TargetURL property of the object given.</p> <p>The property needs a special handling because the URL's need to be made relative</p> + + <p>If _bAddType is set, an additional xlink:type="simple" attribute is also added.</p> */ - inline void exportTargetLocationAttribute() { exportRelativeTargetLocation(PROPERTY_TARGETURL,CCA_TARGET_LOCATION); } + inline void exportTargetLocationAttribute(bool _bAddType) { exportRelativeTargetLocation(PROPERTY_TARGETURL,CCA_TARGET_LOCATION,_bAddType); } /** add the form:image attribute to the export context. @@ -239,7 +241,7 @@ namespace xmloff <p>The property needs a special handling because the URL's need to be made relative</p> */ - inline void exportImageDataAttribute() { exportRelativeTargetLocation(PROPERTY_IMAGEURL,CCA_IMAGE_DATA); } + inline void exportImageDataAttribute() { exportRelativeTargetLocation(PROPERTY_IMAGEURL,CCA_IMAGE_DATA,false); } /** flag the style properties as 'already exported' diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 597798f01ce7..45fa2f5b4744 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -363,7 +363,7 @@ void OPropertyImport::handleAttribute(sal_uInt16 /*_nNamespaceKey*/, const ::rtl implPushBackPropertyValue( aNewValue ); } #if OSL_DEBUG_LEVEL > 0 - else + else if (!token::IsXMLToken(_rLocalName, token::XML_TYPE)) // xlink:type is valid but ignored for <form:form> { ::rtl::OString sMessage( "OPropertyImport::handleAttribute: Can't handle the following:\n" ); sMessage += ::rtl::OString( " Attribute name: " ); diff --git a/xmloff/source/script/XMLScriptExportHandler.cxx b/xmloff/source/script/XMLScriptExportHandler.cxx index 724b6b0d2337..e04467d1e491 100644 --- a/xmloff/source/script/XMLScriptExportHandler.cxx +++ b/xmloff/source/script/XMLScriptExportHandler.cxx @@ -75,6 +75,9 @@ void XMLScriptExportHandler::Export( OUString sTmp; rValues[i].Value >>= sTmp; rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, sTmp); + + // #i110911# xlink:type="simple" is required + rExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE); } // else: disregard } -- cgit From ee14cea9dcc4fb1ec3ec261b5fca38d45c43ed09 Mon Sep 17 00:00:00 2001 From: Michael Stahl <mst@openoffice.org> Date: Wed, 21 Apr 2010 15:17:52 +0200 Subject: sw33bf03: #i111035#: fix ODF 1.2 export of href on form:form (patch by fs) --- xmloff/source/forms/elementexport.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index f28eab48e428..93a80ad5133b 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -2036,6 +2036,12 @@ namespace xmloff OAttributeMetaData::getFormAttributeNamespace(eStringPropertyIds[i]), OAttributeMetaData::getFormAttributeName(eStringPropertyIds[i]), aStringPropertyNames[i]); + + // Since as per ODF 1.2, xlink:href and xlink:type need to exist either both or none, + // we need to write xlink:type, too, even if it carries no information. + // #i111035# / 2010-04-141/ frank.schoenheit@sun.com + AddAttributeASCII( XML_NAMESPACE_XLINK, "type", "simple" ); + // now export the data source name or databaselocation or connection resource ::rtl::OUString sPropValue; m_xProps->getPropertyValue( PROPERTY_DATASOURCENAME ) >>= sPropValue; -- cgit From 18405fb3915aafd273bc626c09de437465fdaf36 Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Fri, 23 Apr 2010 10:57:16 +0200 Subject: sb120: #i111102# disabled failing tests for now --- xmloff/qa/unoapi/xmloff.sce | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xmloff/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce index aa61a2449680..7b6a4d21cce5 100644 --- a/xmloff/qa/unoapi/xmloff.sce +++ b/xmloff/qa/unoapi/xmloff.sce @@ -1,9 +1,9 @@ --o xmloff.Chart.XMLContentExporter --o xmloff.Chart.XMLContentImporter --o xmloff.Chart.XMLExporter --o xmloff.Chart.XMLImporter --o xmloff.Chart.XMLStylesExporter --o xmloff.Chart.XMLStylesImporter +#111102# -o xmloff.Chart.XMLContentExporter +#111102# -o xmloff.Chart.XMLContentImporter +#111102# -o xmloff.Chart.XMLExporter +#111102# -o xmloff.Chart.XMLImporter +#111102# -o xmloff.Chart.XMLStylesExporter +#111102# -o xmloff.Chart.XMLStylesImporter -o xmloff.Draw.XMLContentExporter -o xmloff.Draw.XMLContentImporter -o xmloff.Draw.XMLExporter -- cgit From ac21374ed64a61735f01bc642fc00a4aea96108f Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Fri, 23 Apr 2010 14:29:29 +0200 Subject: sb120: #i111111# disabled failing tests for now --- xmloff/qa/unoapi/xmloff.sce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmloff/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce index 7b6a4d21cce5..1477aae42c6e 100644 --- a/xmloff/qa/unoapi/xmloff.sce +++ b/xmloff/qa/unoapi/xmloff.sce @@ -17,7 +17,7 @@ -o xmloff.Impress.XMLContentExporter -o xmloff.Impress.XMLContentImporter -o xmloff.Impress.XMLExporter --o xmloff.Impress.XMLImporter +#i111111# -o xmloff.Impress.XMLImporter -o xmloff.Impress.XMLMetaExporter -o xmloff.Impress.XMLMetaImporter -o xmloff.Impress.XMLSettingsExporter -- cgit From 0a877b39fdd26f6fcd5706912569b83daf3fb67d Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Fri, 23 Apr 2010 16:19:36 +0200 Subject: sb122: #i110548# backed out new extension dependency deployment-repositories again (introduced in -c 3b28615890d2); not needed after all --- desktop/inc/deployment.hrc | 3 - .../source/deployment/gui/dp_gui_updatedialog.cxx | 2 +- desktop/source/deployment/inc/dp_dependencies.hxx | 7 +- .../deployment/manager/dp_informationprovider.cxx | 2 +- desktop/source/deployment/misc/dp_dependencies.cxx | 88 +--------------------- desktop/source/deployment/misc/dp_misc.src | 12 --- .../source/deployment/registry/inc/dp_backend.h | 2 - .../deployment/registry/package/dp_package.cxx | 3 +- desktop/test/deployment/boxt/description.xml | 1 - desktop/test/deployment/boxt/makefile.mk | 10 +-- 10 files changed, 6 insertions(+), 124 deletions(-) diff --git a/desktop/inc/deployment.hrc b/desktop/inc/deployment.hrc index 6b51376d8524..7e4c21d3c5a4 100644 --- a/desktop/inc/deployment.hrc +++ b/desktop/inc/deployment.hrc @@ -79,9 +79,6 @@ #define RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN RID_DEPLOYMENT_DEPENDENCIES_START #define RID_DEPLYOMENT_DEPENDENCIES_MIN (RID_DEPLOYMENT_DEPENDENCIES_START+1) #define RID_DEPLYOMENT_DEPENDENCIES_MAX (RID_DEPLOYMENT_DEPENDENCIES_START+2) -#define RID_DEPLOYMENT_DEPENDENCIES_REPO_POS (RID_DEPLOYMENT_DEPENDENCIES_START + 3) -#define RID_DEPLOYMENT_DEPENDENCIES_REPO_NEG (RID_DEPLOYMENT_DEPENDENCIES_START + 4) -#define RID_DEPLOYMENT_DEPENDENCIES_REPO_BOTH (RID_DEPLOYMENT_DEPENDENCIES_START + 5) #define RID_DEPLOYMENT_LICENSE_START (RID_DEPLOYMENT_START+4500) diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 9097cdcf63a4..61479f799e6f 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -521,7 +521,7 @@ bool UpdateDialog::Thread::update( dp_misc::DescriptionInfoset infoset(m_context, updateInfo); OSL_ASSERT(infoset.getVersion().getLength() != 0); css::uno::Sequence< css::uno::Reference< css::xml::dom::XElement > > ds( - dp_misc::Dependencies::check(infoset, packageManager->getContext())); + dp_misc::Dependencies::check(infoset)); UpdateDialog::DisabledUpdate du; du.aUpdateInfo = updateInfo; diff --git a/desktop/source/deployment/inc/dp_dependencies.hxx b/desktop/source/deployment/inc/dp_dependencies.hxx index 65e9c9dd6b4a..13be1e8612fb 100644 --- a/desktop/source/deployment/inc/dp_dependencies.hxx +++ b/desktop/source/deployment/inc/dp_dependencies.hxx @@ -53,9 +53,6 @@ namespace Dependencies { @param infoset the infoset containing the dependencies to check - @param repository - the repository into which to deploy - @return a list of the unsatisfied dependencies from <code>infoset</code> (in no specific order) @@ -63,9 +60,7 @@ namespace Dependencies { DESKTOP_DEPLOYMENTMISC_DLLPUBLIC ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::xml::dom::XElement > > - check( - ::dp_misc::DescriptionInfoset const & infoset, - ::rtl::OUString const & repository); + check(::dp_misc::DescriptionInfoset const & infoset); /** Obtain the (human-readable) error message of a failed dependency. diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx index 6267135e0d55..9f2e0c9e1177 100644 --- a/desktop/source/deployment/manager/dp_informationprovider.cxx +++ b/desktop/source/deployment/manager/dp_informationprovider.cxx @@ -387,7 +387,7 @@ uno::Sequence< uno::Sequence< rtl::OUString > > if (*id2 == id) { // check, if there are unsatisfied dependencies and ignore those updates - uno::Sequence< uno::Reference< xml::dom::XElement > > ds( dp_misc::Dependencies::check( infoset, _xManager->getContext() ) ); + uno::Sequence< uno::Reference< xml::dom::XElement > > ds( dp_misc::Dependencies::check( infoset ) ); if ( ds.getLength() ) continue; diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx index e5a81f4528f9..9534f166f2f0 100644 --- a/desktop/source/deployment/misc/dp_dependencies.cxx +++ b/desktop/source/deployment/misc/dp_dependencies.cxx @@ -65,37 +65,6 @@ bool satisfiesMinimalVersion(::rtl::OUString const & version) { return ::dp_misc::compareVersions(v, version) != ::dp_misc::LESS; } -bool contains(::rtl::OUString const & list, ::rtl::OUString const & element) { - for (::sal_Int32 i = 0;;) { - ::sal_Int32 n = i; - i = list.indexOf(',', i); - if (i == -1) { - i = list.getLength(); - } - if (list.copy(n, i) == element) { - return true; - } - if (i == list.getLength()) { - return false; - } - ++i; - } -} - -bool checkDeploymentRepositories( - css::uno::Reference< css::xml::dom::XElement > const & dependency, - ::rtl::OUString const & repository) -{ - css::uno::Reference< css::xml::dom::XAttr > sup( - dependency->getAttributeNode( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("supported")))); - css::uno::Reference< css::xml::dom::XAttr > notSup( - dependency->getAttributeNode( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("not-supported")))); - return (!sup.is() || contains(sup->getValue(), repository)) && - !(notSup.is() && contains(notSup->getValue(), repository)); -} - } namespace dp_misc { @@ -103,10 +72,7 @@ namespace dp_misc { namespace Dependencies { css::uno::Sequence< css::uno::Reference< css::xml::dom::XElement > > -check( - ::dp_misc::DescriptionInfoset const & infoset, - ::rtl::OUString const & repository) -{ +check(::dp_misc::DescriptionInfoset const & infoset) { css::uno::Reference< css::xml::dom::XNodeList > deps( infoset.getDependencies()); ::sal_Int32 n = deps->getLength(); @@ -143,12 +109,6 @@ check( e->getAttribute( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value")))) != ::dp_misc::GREATER; - } else if (e->getNamespaceURI().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(xmlNamespace)) - && e->getTagName().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("deployment-repositories"))) - { - sat = checkDeploymentRepositories(e, repository); } else if (e->hasAttributeNS( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(xmlNamespace)), @@ -187,52 +147,6 @@ check( sValue = dependency->getAttribute( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value") ) ); sReason = ::rtl::OUString( ::String(::dp_misc::getResId(RID_DEPLYOMENT_DEPENDENCIES_MAX)) ); } - else if (dependency->getNamespaceURI().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM(xmlNamespace)) && - dependency->getTagName().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("deployment-repositories"))) - { - css::uno::Reference< css::xml::dom::XAttr > sup( - dependency->getAttributeNode( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("supported")))); - css::uno::Reference< css::xml::dom::XAttr > notSup( - dependency->getAttributeNode( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("not-supported")))); - sValue = ::String( - ::dp_misc::getResId( - sup.is() - ? (notSup.is() - ? RID_DEPLOYMENT_DEPENDENCIES_REPO_BOTH - : RID_DEPLOYMENT_DEPENDENCIES_REPO_POS) - : (notSup.is() - ? RID_DEPLOYMENT_DEPENDENCIES_REPO_NEG - : RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN))); - ::rtl::OUStringBuffer buf; - for (::sal_Int32 i = 0;;) { - ::sal_Int32 j = sValue.indexOf('%', i); - if (j == -1) { - buf.append(sValue.copy(i)); - break; - } - if (sup.is() && - sValue.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("POS"), j + 1)) - { - buf.append(sValue.copy(i, j - i)); - buf.append(sup->getValue()); - i = j + RTL_CONSTASCII_LENGTH("%POS"); - } else if (notSup.is() && - sValue.matchAsciiL( - RTL_CONSTASCII_STRINGPARAM("NEG"), j + 1)) - { - buf.append(sValue.copy(i, j - i)); - buf.append(notSup->getValue()); - i = j + RTL_CONSTASCII_LENGTH("%NEG"); - } else { - i = j + 1; - } - } - return buf.makeStringAndClear(); - } else if ( dependency->hasAttributeNS( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( xmlNamespace ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "OpenOffice.org-minimal-version" )))) { diff --git a/desktop/source/deployment/misc/dp_misc.src b/desktop/source/deployment/misc/dp_misc.src index 6dada0178978..0d341122af16 100644 --- a/desktop/source/deployment/misc/dp_misc.src +++ b/desktop/source/deployment/misc/dp_misc.src @@ -38,15 +38,3 @@ String RID_DEPLYOMENT_DEPENDENCIES_MIN { String RID_DEPLYOMENT_DEPENDENCIES_MAX { Text[en-US] = "Extension doesn't support versions greater than: OpenOffice.org %VERSION"; }; - -String RID_DEPLOYMENT_DEPENDENCIES_REPO_POS { - Text[en-US] = "Extension can only be deployed to repositories \"%POS\""; -}; - -String RID_DEPLOYMENT_DEPENDENCIES_REPO_NEG { - Text[en-US] = "Extension can not be deployed to repositories \"%NEG\""; -}; - -String RID_DEPLOYMENT_DEPENDENCIES_REPO_BOTH { - Text[en-US] = "Extension can be deployed to repositories \"%POS\" but not to \"%NEG\""; -}; diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h index fdf950434395..fe52c8ffc7e3 100644 --- a/desktop/source/deployment/registry/inc/dp_backend.h +++ b/desktop/source/deployment/registry/inc/dp_backend.h @@ -299,8 +299,6 @@ public: inline ::rtl::OUString const & getCachePath() const { return m_cachePath; } inline bool transientMode() const { return m_cachePath.getLength() == 0; } - inline ::rtl::OUString getContext() const {return m_context; } - // XEventListener virtual void SAL_CALL disposing( css::lang::EventObject const & evt ) throw (css::uno::RuntimeException); diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 2008edc26713..e45f7fb7ef73 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -553,8 +553,7 @@ bool BackendImpl::PackageImpl::checkDependencies( dp_misc::Dependencies::check( DescriptionInfoset( getMyBackend()->getComponentContext(), - description.getRootElement()), - getMyBackend()->getContext())); + description.getRootElement()))); if (unsatisfied.getLength() == 0) { return true; } else { diff --git a/desktop/test/deployment/boxt/description.xml b/desktop/test/deployment/boxt/description.xml index bb574cb3c022..5a67bf3e949f 100644 --- a/desktop/test/deployment/boxt/description.xml +++ b/desktop/test/deployment/boxt/description.xml @@ -35,6 +35,5 @@ value="@VERSION@"/> <d:OpenOffice.org-maximal-version d:name="OpenOffice.org @VERSION@ or older" d:OpenOffice.org-minimal-version="2.3" value="@VERSION@"/> - @DEPENDENCY@ </d:dependencies> </d:description> diff --git a/desktop/test/deployment/boxt/makefile.mk b/desktop/test/deployment/boxt/makefile.mk index 5dbf6f899b68..63f123fcc608 100644 --- a/desktop/test/deployment/boxt/makefile.mk +++ b/desktop/test/deployment/boxt/makefile.mk @@ -39,13 +39,6 @@ ENABLE_EXCEPTIONS = TRUE # for now (see issue 110653): my_version = 3.3 -.IF "$(OS)" == "LINUX" || "$(OS)" == "MACOSX" || "$(OS)" == "SOLARIS" -my_dependency = <d:deployment-repositories \ - d:name="cannot be deployed to repository 'user'" not-supported="user"/> -.ELSE -my_dependency = -.END - DLLPRE = SLOFILES = $(SHL1OBJS) @@ -70,8 +63,7 @@ $(MISC)/boxt.oxt .ERRREMOVE : manifest.xml description.xml Addons.xcu \ $(SED) -e 's|@PATH@|$(SHL1TARGETN:f)|g' < manifest.xml \ > $(MISC)/$(TARGET).zip/META-INF/manifest.xml $(SED) -e 's|@PLATFORM@|$(RTL_OS:l)_$(RTL_ARCH:l)|g' \ - -e 's|@VERSION@|$(my_version)|g' \ - -e 's|@DEPENDENCY@|$(my_dependency)|g' < description.xml \ + -e 's|@VERSION@|$(my_version)|g' < description.xml \ > $(MISC)/$(TARGET).zip/description.xml $(COPY) Addons.xcu ProtocolHandler.xcu $(SHL1TARGETN) $(MISC)/$(TARGET).zip cd $(MISC)/$(TARGET).zip && zip ../boxt.oxt META-INF/manifest.xml \ -- cgit From 076e169e2d36ed6d8306c6baa5572b72c7b98d1f Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Fri, 23 Apr 2010 18:01:27 +0200 Subject: sb120: #i111114# disabled failing tests for now --- svx/qa/unoapi/knownissues.xcl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/svx/qa/unoapi/knownissues.xcl b/svx/qa/unoapi/knownissues.xcl index 6d59511b75e0..703699c595da 100644 --- a/svx/qa/unoapi/knownissues.xcl +++ b/svx/qa/unoapi/knownissues.xcl @@ -78,4 +78,7 @@ svx.GraphicExporter ### i98339 ### svx.AccessibleControlShape -# -> disbaled in svx.sce \ No newline at end of file +# -> disbaled in svx.sce + +### i111114 ### +svx.AccessiblePresentationOLEShape::com::sun::star::accessibility::XAccessibleComponent -- cgit From 1d30ea43d0fd1353da7d4fb591dcbc1688bc07d8 Mon Sep 17 00:00:00 2001 From: npower Developer <npower@openoffice.org> Date: Mon, 26 Apr 2010 11:55:58 +0100 Subject: ab75: #i110417# add licence, remove unnecessary lines in resource and correct tweak in stepERROR so that in non-vba mode all is as it was before --- basic/source/classes/errobject.cxx | 27 +++++++++++++++++++++++++++ basic/source/classes/sb.src | 2 -- basic/source/inc/errobject.hxx | 27 +++++++++++++++++++++++++++ basic/source/runtime/step0.cxx | 5 ++++- 4 files changed, 58 insertions(+), 3 deletions(-) diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx index c34fa0a49aec..406d6f9b1a0b 100644 --- a/basic/source/classes/errobject.cxx +++ b/basic/source/classes/errobject.cxx @@ -1,3 +1,30 @@ +/************************************************************************* +* +* 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 +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +************************************************************************/ + // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_basic.hxx" #include "errobject.hxx" diff --git a/basic/source/classes/sb.src b/basic/source/classes/sb.src index 4e0eacf10d2f..73cc1c3a0b2c 100644 --- a/basic/source/classes/sb.src +++ b/basic/source/classes/sb.src @@ -590,9 +590,7 @@ Resource RID_BASIC_START }; String ERRCODE_BASIC_COMPAT & ERRCODE_RES_MASK { - Text [ de ] = "$(ARG1)" ; Text [ en-US ] = "$(ARG1)" ; - Text [ x-comment ] = " "; }; }; // Hinweis: IDS_SBERR_TERMINATED = IDS_SBERR_START+2000. diff --git a/basic/source/inc/errobject.hxx b/basic/source/inc/errobject.hxx index 51d4b6caa4f9..7a50d2435eb3 100644 --- a/basic/source/inc/errobject.hxx +++ b/basic/source/inc/errobject.hxx @@ -1,3 +1,30 @@ +/************************************************************************* +* +* 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 +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +************************************************************************/ + #ifndef ERROBJECT_HXX #define ERROBJECT_HXX #include "sbunoobj.hxx" diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index b432d1851ed5..39af5ea4adc3 100644 --- a/basic/source/runtime/step0.cxx +++ b/basic/source/runtime/step0.cxx @@ -1271,6 +1271,9 @@ void SbiRuntime::StepERROR() SbxVariableRef refCode = PopVar(); USHORT n = refCode->GetUShort(); SbError error = StarBASIC::GetSfxFromVBError( n ); - pInst->Error( error ); + if ( bVBAEnabled ) + pInst->Error( error ); + else + Error( error ); } -- cgit From cff39a2614347c6db8ae1a214947d90a3ea57000 Mon Sep 17 00:00:00 2001 From: npower Developer <npower@openoffice.org> Date: Mon, 26 Apr 2010 13:09:41 +0100 Subject: npower13_objectmodules: #i111097# fix for reset of vba mode for modules --- basic/source/classes/sbxmod.cxx | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 93705d05460e..83c0ae9e65f4 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -55,7 +55,10 @@ #include <basic/sbobjmod.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/script/ModuleType.hpp> +#include <com/sun/star/script/XVBACompat.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +using namespace com::sun::star; // for the bsearch #ifdef WNT @@ -98,6 +101,26 @@ SV_IMPL_VARARR(SbiBreakpoints,USHORT) SV_IMPL_VARARR(HighlightPortions, HighlightPortion) +bool getDefaultVBAMode( StarBASIC* pb ) +{ + bool bResult = false; + if ( pb && pb->IsDocBasic() ) + { + uno::Any aDoc; + if ( pb->GetUNOConstant( "ThisComponent", aDoc ) ) + { + uno::Reference< beans::XPropertySet > xProp( aDoc, uno::UNO_QUERY ); + if ( xProp.is() ) + { + uno::Reference< script::XVBACompat > xVBAMode( xProp->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BasicLibraries") ) ), uno::UNO_QUERY ); + if ( xVBAMode.is() ) + bResult = ( xVBAMode->getVBACompatModeOn() == sal_True ); + } + } + } + return bResult; +} + class AsyncQuitHandler { AsyncQuitHandler() {} @@ -443,10 +466,11 @@ void SbModule::SetSource( const String& r ) void SbModule::SetSource32( const ::rtl::OUString& r ) { + // Default basic mode to library container mode, but.. allow Option VBASupport 0/1 override + SetVBACompat( getDefaultVBAMode( static_cast< StarBASIC*>( GetParent() ) ) ); aOUSource = r; StartDefinitions(); SbiTokenizer aTok( r ); - aTok.SetCompatible( IsVBACompat() ); while( !aTok.IsEof() ) { SbiToken eEndTok = NIL; @@ -471,6 +495,18 @@ void SbModule::SetSource32( const ::rtl::OUString& r ) { eEndTok = ENDPROPERTY; break; } + if( eCurTok == OPTION ) + { + eCurTok = aTok.Next(); + if( eCurTok == COMPATIBLE ) + aTok.SetCompatible( true ); + else if ( ( eCurTok == VBASUPPORT ) && ( aTok.Next() == NUMBER ) ) + { + BOOL bIsVBA = ( aTok.GetDbl()== 1 ); + SetVBACompat( bIsVBA ); + aTok.SetCompatible( bIsVBA ); + } + } } eLastTok = eCurTok; } -- cgit From 24706bb307e38aea2a8c4b0344c5601d7d134db2 Mon Sep 17 00:00:00 2001 From: Niklas Nebel <nn@openoffice.org> Date: Mon, 26 Apr 2010 14:26:49 +0200 Subject: calc53: #i25840# null result in text column only for empty cells, not values --- connectivity/source/drivers/calc/CTable.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx index 1d19c05a46c0..d95c6263b7ed 100644 --- a/connectivity/source/drivers/calc/CTable.cxx +++ b/connectivity/source/drivers/calc/CTable.cxx @@ -347,14 +347,15 @@ void lcl_SetValue( ORowSetValue& rValue, const Reference<XSpreadsheet>& xSheet, switch (nType) { case DataType::VARCHAR: - if ( eCellType == CellContentType_TEXT ) + if ( eCellType == CellContentType_EMPTY ) + rValue.setNull(); + else { + // #i25840# still let Calc convert numbers to text const Reference<XText> xText( xCell, UNO_QUERY ); if ( xText.is() ) rValue = xText->getString(); - } // if ( eCellType == CellContentType_TEXT ) - else - rValue.setNull(); + } break; case DataType::DECIMAL: if ( eCellType == CellContentType_VALUE ) -- cgit From c16282ada08dbd3f7190acb9fbaad82c530b4fff Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Mon, 26 Apr 2010 17:10:24 +0200 Subject: sb120: #i111169# disabled failing tests for now --- svx/qa/unoapi/knownissues.xcl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/svx/qa/unoapi/knownissues.xcl b/svx/qa/unoapi/knownissues.xcl index 703699c595da..89369160bb45 100644 --- a/svx/qa/unoapi/knownissues.xcl +++ b/svx/qa/unoapi/knownissues.xcl @@ -82,3 +82,6 @@ svx.AccessibleControlShape ### i111114 ### svx.AccessiblePresentationOLEShape::com::sun::star::accessibility::XAccessibleComponent + +### i111169 ### +svx.AccessiblePageShape::com::sun::star::accessibility::XAccessibleComponent -- cgit From 19de683861e2484033e85fb9309abdedf3571683 Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Tue, 27 Apr 2010 10:18:26 +0200 Subject: sb120: #i111180# disabled failing tests for now --- framework/qa/unoapi/knownissues.xcl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/qa/unoapi/knownissues.xcl b/framework/qa/unoapi/knownissues.xcl index f939efcca412..40f1965de639 100755 --- a/framework/qa/unoapi/knownissues.xcl +++ b/framework/qa/unoapi/knownissues.xcl @@ -54,3 +54,6 @@ fwk.Frame ### i90345 ### fwk.URLTransformer::com::sun::star::util::XURLTransformer + +### i111180 ### +fwk.Desktop::com::sun::star::frame::XComponentLoader -- cgit From aa22f2391726737e2e64df681579ebf0e3f66c6b Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Tue, 27 Apr 2010 17:07:21 +0200 Subject: sb120: #i111200# disabled failing tests for now --- xmloff/qa/unoapi/xmloff.sce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmloff/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce index 1477aae42c6e..a92d9be391a1 100644 --- a/xmloff/qa/unoapi/xmloff.sce +++ b/xmloff/qa/unoapi/xmloff.sce @@ -9,7 +9,7 @@ -o xmloff.Draw.XMLExporter -o xmloff.Draw.XMLImporter -o xmloff.Draw.XMLMetaExporter --o xmloff.Draw.XMLMetaImporter +#i111200 -o xmloff.Draw.XMLMetaImporter -o xmloff.Draw.XMLSettingsExporter -o xmloff.Draw.XMLSettingsImporter #i87695 -o xmloff.Draw.XMLStylesExporter -- cgit From 80f256140d70c9ec8ec1da89a7c1f2645a275ff0 Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Wed, 28 Apr 2010 09:44:50 +0200 Subject: sb120: #i111216# disabled failing tests for now --- svx/qa/unoapi/svx.sce | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svx/qa/unoapi/svx.sce b/svx/qa/unoapi/svx.sce index 84237f3c6f4b..9d80d71e4200 100644 --- a/svx/qa/unoapi/svx.sce +++ b/svx/qa/unoapi/svx.sce @@ -4,8 +4,8 @@ #i46736 -o svx.AccessibleImageBullet -o svx.AccessibleOLEShape -o svx.AccessiblePageShape --o svx.AccessiblePresentationGraphicShape --o svx.AccessiblePresentationOLEShape +#i111216 -o svx.AccessiblePresentationGraphicShape +#i111216 -o svx.AccessiblePresentationOLEShape #i85539 -o svx.AccessiblePresentationShape -o svx.AccessibleShape #i90294 -o svx.GraphicExporter -- cgit From cb717980246f169aa3f7b54c57cf42349795a260 Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Wed, 28 Apr 2010 14:27:40 +0200 Subject: sb120: #i111224# disabled failing tests for now --- xmloff/qa/unoapi/xmloff.sce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmloff/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce index a92d9be391a1..a74a59ca2ff4 100644 --- a/xmloff/qa/unoapi/xmloff.sce +++ b/xmloff/qa/unoapi/xmloff.sce @@ -14,7 +14,7 @@ -o xmloff.Draw.XMLSettingsImporter #i87695 -o xmloff.Draw.XMLStylesExporter -o xmloff.Draw.XMLStylesImporter --o xmloff.Impress.XMLContentExporter +#i111224 -o xmloff.Impress.XMLContentExporter -o xmloff.Impress.XMLContentImporter -o xmloff.Impress.XMLExporter #i111111# -o xmloff.Impress.XMLImporter -- cgit From 956a360265d19e985ce405c8600832888299f713 Mon Sep 17 00:00:00 2001 From: Niklas Nebel <nn@openoffice.org> Date: Wed, 28 Apr 2010 16:52:04 +0200 Subject: calc53: #i111231# some spring cleaning --- formula/inc/formula/compiler.hrc | 8 ++------ formula/inc/formula/opcode.hxx | 4 ---- formula/source/core/api/FormulaCompiler.cxx | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/formula/inc/formula/compiler.hrc b/formula/inc/formula/compiler.hrc index e8243482a776..e4dc05aca4e9 100644 --- a/formula/inc/formula/compiler.hrc +++ b/formula/inc/formula/compiler.hrc @@ -393,12 +393,8 @@ #define SC_OPCODE_LAST_OPCODE_ID 394 /* last OpCode */ /*** Interna ***/ -#define SC_OPCODE_INTERNAL_BEGIN 9995 -#define SC_OPCODE_GAME 9995 -#define SC_OPCODE_SPEW 9996 -#define SC_OPCODE_TTT 9997 -#define SC_OPCODE_TEAM 9998 -#define SC_OPCODE_ANSWER 9999 +#define SC_OPCODE_INTERNAL_BEGIN 9999 +#define SC_OPCODE_TTT 9999 #define SC_OPCODE_INTERNAL_END 9999 /*** from here on ExtraData contained ***/ diff --git a/formula/inc/formula/opcode.hxx b/formula/inc/formula/opcode.hxx index 2ec322d29bf7..390ab21048d3 100644 --- a/formula/inc/formula/opcode.hxx +++ b/formula/inc/formula/opcode.hxx @@ -386,11 +386,7 @@ enum OpCodeEnum ocNumberValue = SC_OPCODE_NUMBERVALUE, // internal stuff ocInternalBegin = SC_OPCODE_INTERNAL_BEGIN, - ocGame = SC_OPCODE_GAME, - ocSpew = SC_OPCODE_SPEW, ocTTT = SC_OPCODE_TTT, - ocTeam = SC_OPCODE_TEAM, - ocAnswer = SC_OPCODE_ANSWER, ocInternalEnd = SC_OPCODE_INTERNAL_END, // from here on ExtraData ocDataToken1 = SC_OPCODE_DATA_TOKEN_1, diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 4cc5306fec9f..533ec85358c5 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -46,7 +46,7 @@ namespace formula // ============================================================================= using namespace ::com::sun::star; - static const sal_Char* pInternal[ 5 ] = { "GAME", "SPEW", "TTT", "STARCALCTEAM", "ANTWORT" }; + static const sal_Char* pInternal[ 1 ] = { "TTT" }; // ============================================================================= namespace -- cgit From 0bbe07134261dd3ed28538739eb8e0182e0711fa Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Thu, 29 Apr 2010 12:33:03 +0200 Subject: sb120: #i111252# disabled failing tests for now --- svx/qa/unoapi/svx.sce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/qa/unoapi/svx.sce b/svx/qa/unoapi/svx.sce index 9d80d71e4200..50367594a1dd 100644 --- a/svx/qa/unoapi/svx.sce +++ b/svx/qa/unoapi/svx.sce @@ -2,7 +2,7 @@ -o svx.AccessibleEditableTextPara -o svx.AccessibleGraphicShape #i46736 -o svx.AccessibleImageBullet --o svx.AccessibleOLEShape +#i111252 -o svx.AccessibleOLEShape -o svx.AccessiblePageShape #i111216 -o svx.AccessiblePresentationGraphicShape #i111216 -o svx.AccessiblePresentationOLEShape -- cgit From 275d3da6b157d8809cb4be88b46bf55c2953857d Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Thu, 29 Apr 2010 14:26:07 +0200 Subject: sb120: #i111252# disabled failing tests for now --- svx/qa/unoapi/svx.sce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/qa/unoapi/svx.sce b/svx/qa/unoapi/svx.sce index 50367594a1dd..7039e2889704 100644 --- a/svx/qa/unoapi/svx.sce +++ b/svx/qa/unoapi/svx.sce @@ -1,6 +1,6 @@ #i98339 -o svx.AccessibleControlShape -o svx.AccessibleEditableTextPara --o svx.AccessibleGraphicShape +#i111252 -o svx.AccessibleGraphicShape #i46736 -o svx.AccessibleImageBullet #i111252 -o svx.AccessibleOLEShape -o svx.AccessiblePageShape -- cgit From 45b8a59ebf2dd3d2c937daee3e4151ea39a7e59c Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Fri, 30 Apr 2010 11:03:46 +0200 Subject: sb120: #i111252# disabled failing tests for now --- svx/qa/unoapi/svx.sce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/qa/unoapi/svx.sce b/svx/qa/unoapi/svx.sce index 7039e2889704..3f59cd2c4474 100644 --- a/svx/qa/unoapi/svx.sce +++ b/svx/qa/unoapi/svx.sce @@ -3,7 +3,7 @@ #i111252 -o svx.AccessibleGraphicShape #i46736 -o svx.AccessibleImageBullet #i111252 -o svx.AccessibleOLEShape --o svx.AccessiblePageShape +#i111252 -o svx.AccessiblePageShape #i111216 -o svx.AccessiblePresentationGraphicShape #i111216 -o svx.AccessiblePresentationOLEShape #i85539 -o svx.AccessiblePresentationShape -- cgit From d46f1a72f71c0e137da7e82a367aadc1a99a031e Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Fri, 30 Apr 2010 11:37:18 +0200 Subject: sb120: #i111278# disabled failing tests for now --- svx/qa/unoapi/svx.sce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svx/qa/unoapi/svx.sce b/svx/qa/unoapi/svx.sce index 3f59cd2c4474..82ee2ea6b193 100644 --- a/svx/qa/unoapi/svx.sce +++ b/svx/qa/unoapi/svx.sce @@ -1,5 +1,5 @@ #i98339 -o svx.AccessibleControlShape --o svx.AccessibleEditableTextPara +#i111278 -o svx.AccessibleEditableTextPara #i111252 -o svx.AccessibleGraphicShape #i46736 -o svx.AccessibleImageBullet #i111252 -o svx.AccessibleOLEShape -- cgit From 5c486d7985d5814f1253e3fb44597d824b2f22d2 Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Fri, 30 Apr 2010 13:46:30 +0200 Subject: sb120: #i111283# disabled failing tests for now --- sfx2/qa/unoapi/sfx.sce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sfx2/qa/unoapi/sfx.sce b/sfx2/qa/unoapi/sfx.sce index 2aaf12c25950..6176c0668731 100644 --- a/sfx2/qa/unoapi/sfx.sce +++ b/sfx2/qa/unoapi/sfx.sce @@ -2,4 +2,4 @@ -o sfx.DocumentTemplates -o sfx.FrameLoader -o sfx.SfxMacroLoader --o sfx.StandaloneDocumentInfo +#i111283 -o sfx.StandaloneDocumentInfo -- cgit From 7ecb8a1b51055c6b77f439686707ea1b6b411cf2 Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Fri, 30 Apr 2010 14:33:50 +0200 Subject: sb120: #i111287# disabled failing tests for now --- xmloff/qa/unoapi/xmloff.sce | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xmloff/qa/unoapi/xmloff.sce b/xmloff/qa/unoapi/xmloff.sce index a74a59ca2ff4..c73533f4e4e8 100644 --- a/xmloff/qa/unoapi/xmloff.sce +++ b/xmloff/qa/unoapi/xmloff.sce @@ -10,8 +10,8 @@ -o xmloff.Draw.XMLImporter -o xmloff.Draw.XMLMetaExporter #i111200 -o xmloff.Draw.XMLMetaImporter --o xmloff.Draw.XMLSettingsExporter --o xmloff.Draw.XMLSettingsImporter +#i111287 -o xmloff.Draw.XMLSettingsExporter +#i111287 -o xmloff.Draw.XMLSettingsImporter #i87695 -o xmloff.Draw.XMLStylesExporter -o xmloff.Draw.XMLStylesImporter #i111224 -o xmloff.Impress.XMLContentExporter @@ -20,7 +20,7 @@ #i111111# -o xmloff.Impress.XMLImporter -o xmloff.Impress.XMLMetaExporter -o xmloff.Impress.XMLMetaImporter --o xmloff.Impress.XMLSettingsExporter --o xmloff.Impress.XMLSettingsImporter +#i111287 -o xmloff.Impress.XMLSettingsExporter +#i111287 -o xmloff.Impress.XMLSettingsImporter #i87695 -o xmloff.Impress.XMLStylesExporter -o xmloff.Impress.XMLStylesImporter -- cgit From 74155ef0d4806b2cad2e550ce337e7f6a02adf38 Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Tue, 4 May 2010 16:29:02 +0200 Subject: sb122: #i110491# turned configmgr API from C++ to UNO --- configmgr/inc/configmgr/detail/configmgrdllapi.hxx | 41 ------ configmgr/inc/configmgr/update.hxx | 58 --------- configmgr/prj/d.lst | 11 +- configmgr/source/makefile.mk | 4 +- configmgr/source/services.cxx | 17 +++ configmgr/source/update.cxx | 143 +++++++++++++++++++-- configmgr/source/update.hxx | 59 +++++++++ desktop/prj/build.lst | 2 +- desktop/source/app/makefile.mk | 1 - desktop/source/deployment/makefile.mk | 3 +- .../registry/configuration/dp_configuration.cxx | 12 +- desktop/source/migration/migration.cxx | 26 +++- desktop/source/splash/makefile.mk | 1 - 13 files changed, 246 insertions(+), 132 deletions(-) delete mode 100644 configmgr/inc/configmgr/detail/configmgrdllapi.hxx delete mode 100644 configmgr/inc/configmgr/update.hxx create mode 100644 configmgr/source/update.hxx diff --git a/configmgr/inc/configmgr/detail/configmgrdllapi.hxx b/configmgr/inc/configmgr/detail/configmgrdllapi.hxx deleted file mode 100644 index 6eb2ea7bc9d9..000000000000 --- a/configmgr/inc/configmgr/detail/configmgrdllapi.hxx +++ /dev/null @@ -1,41 +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 -* <http://www.openoffice.org/license.html> -* for a copy of the LGPLv3 License. -* -************************************************************************/ - -#ifndef INCLUDED_CONFIGMGR_DETAIL_CONFIGMGRDLLAPI_HXX -#define INCLUDED_CONFIGMGR_DETAIL_CONFIGMGRDLLAPI_HXX - -#include "sal/config.h" - -#include "sal/types.h" - -#if defined OOO_DLLIMPLEMENTATION_CONFIGMGR -#define OOO_DLLPUBLIC_CONFIGMGR SAL_DLLPUBLIC_EXPORT -#else -#define OOO_DLLPUBLIC_CONFIGMGR SAL_DLLPUBLIC_IMPORT -#endif - -#endif diff --git a/configmgr/inc/configmgr/update.hxx b/configmgr/inc/configmgr/update.hxx deleted file mode 100644 index 3a152959342b..000000000000 --- a/configmgr/inc/configmgr/update.hxx +++ /dev/null @@ -1,58 +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 -* <http://www.openoffice.org/license.html> -* for a copy of the LGPLv3 License. -* -************************************************************************/ - -#ifndef INCLUDED_CONFIGMGR_UPDATE_HXX -#define INCLUDED_CONFIGMGR_UPDATE_HXX - -#include "sal/config.h" - -#include <set> - -#include "configmgr/detail/configmgrdllapi.hxx" - -namespace rtl { class OUString; } - -namespace configmgr { - -namespace update { - -OOO_DLLPUBLIC_CONFIGMGR void insertExtensionXcsFile( - bool shared, rtl::OUString const & fileUri); - -OOO_DLLPUBLIC_CONFIGMGR void insertExtensionXcuFile( - bool shared, rtl::OUString const & fileUri); - -OOO_DLLPUBLIC_CONFIGMGR void insertModificationXcuFile( - rtl::OUString const & fileUri, - std::set< rtl::OUString > const & includedPaths, - std::set< rtl::OUString > const & excludedPaths); - -} - -} - -#endif diff --git a/configmgr/prj/d.lst b/configmgr/prj/d.lst index a9d91980b213..17ccdbe86a08 100644 --- a/configmgr/prj/d.lst +++ b/configmgr/prj/d.lst @@ -1,8 +1,3 @@ -mkdir: %_DEST%\inc%_EXT%\configmgr -mkdir: %_DEST%\inc%_EXT%\configmgr\detail -..\%__SRC%\bin\configmgr.dll %_DEST%\bin%_EXT%\configmgr.dll -..\%__SRC%\lib\iconfigmgr.lib %_DEST%\lib%_EXT%\iconfigmgr.lib -..\%__SRC%\lib\libconfigmgr.dylib %_DEST%\lib%_EXT%\libconfigmgr.dylib -..\%__SRC%\lib\libconfigmgr.so %_DEST%\lib%_EXT%\libconfigmgr.so -..\inc\configmgr\detail\configmgrdllapi.hxx %_DEST%\inc%_EXT%\configmgr\detail\configmgrdllapi.hxx -..\inc\configmgr\update.hxx %_DEST%\inc%_EXT%\configmgr\update.hxx +..\%__SRC%\bin\configmgr.uno.dll %_DEST%\bin%_EXT%\configmgr.uno.dll +..\%__SRC%\lib\configmgr.uno.dylib %_DEST%\lib%_EXT%\configmgr.uno.dylib +..\%__SRC%\lib\configmgr.uno.so %_DEST%\lib%_EXT%\configmgr.uno.so diff --git a/configmgr/source/makefile.mk b/configmgr/source/makefile.mk index 317e08bdf49c..777fed3323d8 100644 --- a/configmgr/source/makefile.mk +++ b/configmgr/source/makefile.mk @@ -34,7 +34,7 @@ VISIBILITY_HIDDEN = TRUE .INCLUDE: settings.mk -CDEFS += -DOOO_DLLIMPLEMENTATION_CONFIGMGR +DLLPRE = SLOFILES = \ $(SLO)/access.obj \ @@ -77,7 +77,7 @@ SHL1STDLIBS = \ $(CPPULIB) \ $(SALHELPERLIB) \ $(SALLIB) -SHL1TARGET = configmgr +SHL1TARGET = configmgr.uno SHL1USE_EXPORTS = name DEF1NAME = $(SHL1TARGET) diff --git a/configmgr/source/services.cxx b/configmgr/source/services.cxx index 3a009b3cee15..f8c3289664ef 100644 --- a/configmgr/source/services.cxx +++ b/configmgr/source/services.cxx @@ -44,6 +44,7 @@ #include "configurationprovider.hxx" #include "configurationregistry.hxx" #include "defaultprovider.hxx" +#include "update.hxx" namespace { @@ -67,6 +68,9 @@ static cppu::ImplementationEntry const services[] = { { &dummy, &configmgr::configuration_registry::getImplementationName, &configmgr::configuration_registry::getSupportedServiceNames, &configmgr::configuration_registry::createFactory, 0, 0 }, + { &dummy, &configmgr::update::getImplementationName, + &configmgr::update::getSupportedServiceNames, + &configmgr::update::createFactory, 0, 0 }, { 0, 0, 0, 0, 0, 0 } }; @@ -107,6 +111,19 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.DefaultProvider"))); + css::uno::Reference< css::registry::XRegistryKey >( + (css::uno::Reference< css::registry::XRegistryKey >( + static_cast< css::registry::XRegistryKey * >(pRegistryKey))-> + createKey( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "/com.sun.star.comp.configuration.Update/UNO/" + "SINGLETONS/com.sun.star.configuration.Update")))), + css::uno::UNO_SET_THROW)-> + setStringValue( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.Update_Service"))); } catch (css::uno::Exception & e) { (void) e; OSL_TRACE( diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx index 57f45068d954..4c1d59d5d054 100644 --- a/configmgr/source/update.cxx +++ b/configmgr/source/update.cxx @@ -30,27 +30,84 @@ #include <set> -#include "configmgr/update.hxx" +#include "boost/noncopyable.hpp" +#include "com/sun/star/configuration/XUpdate.hpp" +#include "com/sun/star/lang/XSingleComponentFactory.hpp" +#include "com/sun/star/uno/Any.hxx" +#include "com/sun/star/uno/Exception.hpp" +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/RuntimeException.hpp" +#include "com/sun/star/uno/Sequence.hxx" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/uno/XInterface.hpp" +#include "cppuhelper/factory.hxx" +#include "cppuhelper/implbase1.hxx" +#include "cppuhelper/weak.hxx" #include "osl/mutex.hxx" #include "rtl/ref.hxx" +#include "rtl/unload.h" +#include "rtl/ustring.h" #include "rtl/ustring.hxx" +#include "sal/types.h" #include "broadcaster.hxx" #include "components.hxx" #include "lock.hxx" #include "modifications.hxx" #include "rootaccess.hxx" +#include "update.hxx" -namespace configmgr { +namespace configmgr { namespace update { -namespace update { +namespace { -void insertExtensionXcsFile(bool shared, rtl::OUString const & fileUri) { +namespace css = com::sun::star; + +std::set< rtl::OUString > seqToSet( + css::uno::Sequence< rtl::OUString > const & sequence) +{ + return std::set< rtl::OUString >( + sequence.getConstArray(), + sequence.getConstArray() + sequence.getLength()); +} + +class Service: + public cppu::WeakImplHelper1< css::configuration::XUpdate >, + private boost::noncopyable +{ +public: + Service() {} + +private: + virtual ~Service() {} + + virtual void SAL_CALL insertExtensionXcsFile( + sal_Bool shared, rtl::OUString const & fileUri) + throw (css::uno::RuntimeException); + + virtual void SAL_CALL insertExtensionXcuFile( + sal_Bool shared, rtl::OUString const & fileUri) + throw (css::uno::RuntimeException); + + virtual void SAL_CALL insertModificationXcuFile( + rtl::OUString const & fileUri, + css::uno::Sequence< rtl::OUString > const & includedPaths, + css::uno::Sequence< rtl::OUString > const & excludedPaths) + throw (css::uno::RuntimeException); +}; + +void Service::insertExtensionXcsFile( + sal_Bool shared, rtl::OUString const & fileUri) + throw (css::uno::RuntimeException) +{ osl::MutexGuard g(lock); Components::getSingleton().insertExtensionXcsFile(shared, fileUri); } -void insertExtensionXcuFile(bool shared, rtl::OUString const & fileUri) { +void Service::insertExtensionXcuFile( + sal_Bool shared, rtl::OUString const & fileUri) + throw (css::uno::RuntimeException) +{ Broadcaster bc; { osl::MutexGuard g(lock); @@ -63,23 +120,91 @@ void insertExtensionXcuFile(bool shared, rtl::OUString const & fileUri) { bc.send(); } -void insertModificationXcuFile( +void Service::insertModificationXcuFile( rtl::OUString const & fileUri, - std::set< rtl::OUString > const & includedPaths, - std::set< rtl::OUString > const & excludedPaths) + css::uno::Sequence< rtl::OUString > const & includedPaths, + css::uno::Sequence< rtl::OUString > const & excludedPaths) + throw (css::uno::RuntimeException) { Broadcaster bc; { osl::MutexGuard g(lock); Modifications mods; Components::getSingleton().insertModificationXcuFile( - fileUri, includedPaths, excludedPaths, &mods); + fileUri, seqToSet(includedPaths), seqToSet(excludedPaths), &mods); Components::getSingleton().initGlobalBroadcaster( mods, rtl::Reference< RootAccess >(), &bc); } bc.send(); } +class Factory: + public cppu::WeakImplHelper1< css::lang::XSingleComponentFactory >, + private boost::noncopyable +{ +public: + Factory() {} + +private: + virtual ~Factory() {} + + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL + createInstanceWithContext( + css::uno::Reference< css::uno::XComponentContext > const & Context) + throw (css::uno::Exception, css::uno::RuntimeException); + + virtual css::uno::Reference< css::uno::XInterface > SAL_CALL + createInstanceWithArgumentsAndContext( + css::uno::Sequence< css::uno::Any > const & Arguments, + css::uno::Reference< css::uno::XComponentContext > const & Context) + throw (css::uno::Exception, css::uno::RuntimeException); +}; + +css::uno::Reference< css::uno::XInterface > Factory::createInstanceWithContext( + css::uno::Reference< css::uno::XComponentContext > const & Context) + throw (css::uno::Exception, css::uno::RuntimeException) +{ + return createInstanceWithArgumentsAndContext( + css::uno::Sequence< css::uno::Any >(), Context); +} + +css::uno::Reference< css::uno::XInterface > +Factory::createInstanceWithArgumentsAndContext( + css::uno::Sequence< css::uno::Any > const & Arguments, + css::uno::Reference< css::uno::XComponentContext > const &) + throw (css::uno::Exception, css::uno::RuntimeException) +{ + if (Arguments.getLength() != 0) { + throw css::uno::Exception( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.comp.configuration.Update must be" + " instantiated without arguments")), + static_cast< cppu::OWeakObject * >(this)); + } + return static_cast< cppu::OWeakObject * >(new Service); } } + +rtl::OUString getImplementationName() { + return rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.configuration.Update")); +} + +css::uno::Sequence< rtl::OUString > getSupportedServiceNames() { + rtl::OUString name( + RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.Update_Service")); + return css::uno::Sequence< rtl::OUString >(&name, 1); +} + +css::uno::Reference< css::lang::XSingleComponentFactory > createFactory( + cppu::ComponentFactoryFunc, rtl::OUString const &, + css::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) + SAL_THROW(()) +{ + return new Factory; +} + +} } diff --git a/configmgr/source/update.hxx b/configmgr/source/update.hxx new file mode 100644 index 000000000000..faa5c86b15fa --- /dev/null +++ b/configmgr/source/update.hxx @@ -0,0 +1,59 @@ +/************************************************************************* +* +* 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 +* <http://www.openoffice.org/license.html> +* for a copy of the LGPLv3 License. +* +************************************************************************/ + +#ifndef INCLUDED_CONFIGMGR_SOURCE_UPDATE_HXX +#define INCLUDED_CONFIGMGR_SOURCE_UPDATE_HXX + +#include "sal/config.h" + +#include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/Sequence.hxx" +#include "cppuhelper/factory.hxx" +#include "rtl/unload.h" +#include "sal/types.h" + +namespace com { namespace sun { namespace star { namespace lang { + class XSingleComponentFactory; +} } } } +namespace rtl { class OUString; } + +namespace configmgr { namespace update { + +rtl::OUString SAL_CALL getImplementationName(); + +com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL +getSupportedServiceNames(); + +com::sun::star::uno::Reference< com::sun::star::lang::XSingleComponentFactory > +SAL_CALL createFactory( + cppu::ComponentFactoryFunc, rtl::OUString const &, + com::sun::star::uno::Sequence< rtl::OUString > const &, rtl_ModuleCount *) + SAL_THROW(()); + +} } + +#endif diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst index 9253b4e82bc7..6f611926a0df 100644 --- a/desktop/prj/build.lst +++ b/desktop/prj/build.lst @@ -1,4 +1,4 @@ -dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg configmgr NULL +dt desktop : l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh NULL dt desktop usr1 - all dt_mkout NULL dt desktop\inc nmake - all dt_inc NULL dt desktop\prj get - all dt_prj NULL diff --git a/desktop/source/app/makefile.mk b/desktop/source/app/makefile.mk index 83bec9011283..d9db7c163481 100644 --- a/desktop/source/app/makefile.mk +++ b/desktop/source/app/makefile.mk @@ -65,7 +65,6 @@ SHL1LIBS = $(SLB)$/mig.lib SHL1STDLIBS = \ $(COMPHELPERLIB) \ - $(CONFIGMGRLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ $(I18NISOLANGLIB) \ diff --git a/desktop/source/deployment/makefile.mk b/desktop/source/deployment/makefile.mk index 7eda0f582e15..173ff35bec1d 100644 --- a/desktop/source/deployment/makefile.mk +++ b/desktop/source/deployment/makefile.mk @@ -80,8 +80,7 @@ SHL1STDLIBS = \ $(SVLLIB) \ $(UNOTOOLSLIB) \ $(DEPLOYMENTMISCLIB) \ - $(HELPLINKERLIB) \ - $(CONFIGMGRLIB) + $(HELPLINKERLIB) SHL1DEPN = SHL1IMPLIB = i$(TARGET) diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 460ba5e9fed0..6cf6d4ff7818 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -45,9 +45,9 @@ #include "ucbhelper/content.hxx" #include "comphelper/anytostring.hxx" #include "comphelper/servicedecl.hxx" -#include "configmgr/update.hxx" #include "xmlscript/xml_helper.hxx" #include "svl/inettype.hxx" +#include "com/sun/star/configuration/Update.hpp" #include "com/sun/star/ucb/NameClash.hpp" #include "com/sun/star/io/XActiveDataSink.hpp" #include "com/sun/star/lang/WrappedTargetRuntimeException.hpp" @@ -645,14 +645,16 @@ void BackendImpl::PackageImpl::processPackage_( { if (m_isSchema) { - configmgr::update::insertExtensionXcsFile( - that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url)); + com::sun::star::configuration::Update::get( + that->m_xComponentContext)->insertExtensionXcsFile( + that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url)); } else { url = replaceOrigin(url, xCmdEnv); - configmgr::update::insertExtensionXcuFile( - that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url)); + com::sun::star::configuration::Update::get( + that->m_xComponentContext)->insertExtensionXcuFile( + that->m_eContext == CONTEXT_SHARED, expandUnoRcUrl(url)); } that->addToConfigmgrIni( m_isSchema, url, xCmdEnv ); diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 634bce451476..6ab5d8478de7 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -29,6 +29,7 @@ #include "precompiled_desktop.hxx" #include <map> +#include <new> #include <set> #include "migration.hxx" @@ -38,7 +39,6 @@ #include <unotools/textsearch.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequence.hxx> -#include <configmgr/update.hxx> #include <unotools/bootstrap.hxx> #include <rtl/bootstrap.hxx> #include <rtl/uri.hxx> @@ -51,6 +51,7 @@ #include <osl/security.hxx> #include <unotools/configmgr.hxx> +#include <com/sun/star/configuration/Update.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/task/XJob.hpp> #include <com/sun/star/beans/NamedValue.hpp> @@ -539,6 +540,21 @@ bool getComponent(rtl::OUString const & path, rtl::OUString * component) { return true; } +uno::Sequence< rtl::OUString > setToSeq(std::set< rtl::OUString > const & set) { + std::set< rtl::OUString >::size_type n = set.size(); + if (n > SAL_MAX_INT32) { + throw std::bad_alloc(); + } + uno::Sequence< rtl::OUString > seq(static_cast< sal_Int32 >(n)); + sal_Int32 i = 0; + for (std::set< rtl::OUString >::const_iterator j(set.begin()); + j != set.end(); ++j) + { + seq[i++] = *j; + } + return seq; +} + } void MigrationImpl::copyConfig() { @@ -586,9 +602,11 @@ void MigrationImpl::copyConfig() { buf.append(enc); } while (n >= 0); buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(".xcu")); - configmgr::update::insertModificationXcuFile( - buf.makeStringAndClear(), i->second.includedPaths, - i->second.excludedPaths); + configuration::Update::get( + comphelper::getProcessComponentContext())-> + insertModificationXcuFile( + buf.makeStringAndClear(), setToSeq(i->second.includedPaths), + setToSeq(i->second.excludedPaths)); } else { OSL_TRACE( ("configuration migration component %s ignored (only excludes," diff --git a/desktop/source/splash/makefile.mk b/desktop/source/splash/makefile.mk index 2f163fe7b9d6..89609687438c 100644 --- a/desktop/source/splash/makefile.mk +++ b/desktop/source/splash/makefile.mk @@ -63,7 +63,6 @@ SHL1STDLIBS= \ $(SVLLIB) \ $(SVTOOLLIB) \ $(COMPHELPERLIB) \ - $(CONFIGMGRLIB) \ $(UNOTOOLSLIB) \ $(TOOLSLIB) \ $(UCBHELPERLIB) \ -- cgit From e4307a4d3fc43914c8d28157c0e71633843fa045 Mon Sep 17 00:00:00 2001 From: Kai Sommerfeld <kso@openoffice.org> Date: Thu, 6 May 2010 14:23:16 +0200 Subject: #i110213# - setup master password container on demand. --- ucb/source/ucp/webdav/DAVAuthListener.hxx | 3 - ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx | 1 - ucb/source/ucp/webdav/DAVResourceAccess.cxx | 4 +- ucb/source/ucp/webdav/NeonSession.cxx | 21 --- uui/source/iahndl-authentication.cxx | 245 ++++++++++++++++++-------- uui/source/loginerr.hxx | 61 ++++--- uui/source/passwordcontainer.cxx | 13 +- 7 files changed, 226 insertions(+), 122 deletions(-) diff --git a/ucb/source/ucp/webdav/DAVAuthListener.hxx b/ucb/source/ucp/webdav/DAVAuthListener.hxx index c092f9fd311f..71bed1c0a14d 100644 --- a/ucb/source/ucp/webdav/DAVAuthListener.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListener.hxx @@ -30,9 +30,7 @@ #include <salhelper/simplereferenceobject.hxx> #include <rtl/ustring.hxx> -#ifndef _COM_SUN_STAR_UCB_XREFERENCE_HPP_ #include <com/sun/star/uno/XReference.hpp> -#endif #include <com/sun/star/ucb/XCommandEnvironment.hpp> namespace webdav_ucp @@ -46,7 +44,6 @@ class DAVAuthListener : public salhelper::SimpleReferenceObject const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, ::rtl::OUString & outPassWord, - sal_Bool bAllowPersistentStoring, sal_Bool bCanUseSystemCredentials ) = 0; }; diff --git a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx index 3d03cc63952b..c0c9968613af 100644 --- a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx @@ -61,7 +61,6 @@ namespace webdav_ucp const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, ::rtl::OUString & outPassWord, - sal_Bool bAllowPersistentStoring, sal_Bool bCanUseSystemCredentials ); private: diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index 4ffc8dd88cf5..872d45405735 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx @@ -57,7 +57,6 @@ int DAVAuthListener_Impl::authenticate( const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, ::rtl::OUString & outPassWord, - sal_Bool bAllowPersistentStoring, sal_Bool bCanUseSystemCredentials ) { if ( m_xEnv.is() ) @@ -79,7 +78,8 @@ int DAVAuthListener_Impl::authenticate( = new ucbhelper::SimpleAuthenticationRequest( m_aURL, inHostName, inRealm, inoutUserName, outPassWord, ::rtl::OUString(), - bAllowPersistentStoring, bCanUseSystemCredentials ); + true /*bAllowPersistentStoring*/, + bCanUseSystemCredentials ); xIH->handle( xRequest.get() ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index 8fc1730ba018..254fae546940 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -60,7 +60,6 @@ #include <com/sun/star/security/CertificateContainerStatus.hpp> #include <com/sun/star/security/CertificateContainer.hpp> #include <com/sun/star/security/XCertificateContainer.hpp> -#include <com/sun/star/task/XMasterPasswordHandling.hpp> #include <com/sun/star/ucb/Lock.hpp> #include <com/sun/star/xml/crypto/XSEInitializer.hpp> @@ -330,31 +329,11 @@ extern "C" int NeonSession_NeonAuth( void * inUserData, ( ne_strcasecmp( inAuthProtocol, "Negotiate" ) == 0 ) ); #endif - // #i97003# (tkr): Ask XMasterPasswordHandling if we should store the - // credentials persistently and give this information to the auth listener - uno::Reference< task::XMasterPasswordHandling > xMasterPasswordHandling; - try - { - xMasterPasswordHandling = - uno::Reference< task::XMasterPasswordHandling >( - theSession->getMSF()->createInstance( - rtl::OUString::createFromAscii( - "com.sun.star.task.PasswordContainer" ) ), - uno::UNO_QUERY ); - } - catch ( uno::Exception const & ) - { - } - int theRetVal = pListener->authenticate( rtl::OUString::createFromAscii( inRealm ), theSession->getHostName(), theUserName, thePassWord, - xMasterPasswordHandling.is() - ? xMasterPasswordHandling-> - isPersistentStoringAllowed() - : sal_False, bCanUseSystemCreds); rtl::OString aUser( diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index f31397f1ef92..4183b852735e 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -67,10 +67,9 @@ executeLoginDialog( { vos::OGuard aGuard(Application::GetSolarMutex()); - bool bAccount = (rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_ACCOUNT) - != 0; - bool bSavePassword = rInfo.GetIsPersistentPassword() - || rInfo.GetIsSavePassword(); + bool bAccount + = (rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_ACCOUNT) != 0; + bool bSavePassword = rInfo.GetCanRememberPassword(); bool bCanUseSysCreds = rInfo.GetCanUseSystemCredentials(); sal_uInt16 nFlags = 0; @@ -109,12 +108,13 @@ executeLoginDialog( if (bSavePassword) { - xDialog-> - SetSavePasswordText(ResId(rInfo.GetIsPersistentPassword() ? - RID_SAVE_PASSWORD : - RID_KEEP_PASSWORD, - *xManager.get())); - xDialog->SetSavePassword(rInfo.GetIsSavePassword()); + xDialog->SetSavePasswordText( + ResId(rInfo.GetIsRememberPersistent() + ? RID_SAVE_PASSWORD + : RID_KEEP_PASSWORD, + *xManager.get())); + + xDialog->SetSavePassword(rInfo.GetIsRememberPassword()); } if ( bCanUseSysCreds ) @@ -126,7 +126,7 @@ executeLoginDialog( rInfo.SetUserName(xDialog->GetName()); rInfo.SetPassword(xDialog->GetPassword()); rInfo.SetAccount(xDialog->GetAccount()); - rInfo.SetSavePassword(xDialog->IsSavePassword()); + rInfo.SetIsRememberPassword(xDialog->IsSavePassword()); if ( bCanUseSysCreds ) rInfo.SetIsUseSystemCredentials( xDialog->IsUseSystemCredentials() ); @@ -139,6 +139,60 @@ executeLoginDialog( } } +void getRememberModes( + uno::Sequence< ucb::RememberAuthentication > const & rRememberModes, + ucb::RememberAuthentication & rPreferredMode, + ucb::RememberAuthentication & rAlternateMode ) +{ + sal_Int32 nCount = rRememberModes.getLength(); + OSL_ENSURE( (nCount > 0) && (nCount < 4), + "ucb::RememberAuthentication sequence size mismatch!" ); + if ( nCount == 1 ) + { + rPreferredMode = rAlternateMode = rRememberModes[ 0 ]; + return; + } + else + { + //bool bHasRememberModeNo = false; + bool bHasRememberModeSession = false; + bool bHasRememberModePersistent = false; + + for (sal_Int32 i = 0; i < nCount; ++i) + { + switch ( rRememberModes[i] ) + { + case ucb::RememberAuthentication_NO: + //bHasRememberModeNo = true; + break; + case ucb::RememberAuthentication_SESSION: + bHasRememberModeSession = true; + break; + case ucb::RememberAuthentication_PERSISTENT: + bHasRememberModePersistent = true; + break; + default: + OSL_TRACE( "Unsupported RememberAuthentication value" ); + break; + } + } + + if (bHasRememberModePersistent) + { + rPreferredMode = ucb::RememberAuthentication_PERSISTENT; + if (bHasRememberModeSession) + rAlternateMode = ucb::RememberAuthentication_SESSION; + else + rAlternateMode = ucb::RememberAuthentication_NO; + } + else + { + rPreferredMode = ucb::RememberAuthentication_SESSION; + rAlternateMode = ucb::RememberAuthentication_NO; + } + } +} + void handleAuthenticationRequest_( Window * pParent, @@ -161,7 +215,7 @@ handleAuthenticationRequest_( xSupplyAuthentication2.set(xSupplyAuthentication, uno::UNO_QUERY); ////////////////////////// - // First, try to obatin credentials from password container service. + // First, try to obtain credentials from password container service. uui::PasswordContainerHelper aPwContainerHelper(xServiceFactory); if (aPwContainerHelper.handleAuthenticationRequest(rRequest, xSupplyAuthentication, @@ -174,26 +228,20 @@ handleAuthenticationRequest_( ////////////////////////// // Second, try to obtain credentials from user via password dialog. - bool bRemember; - bool bRememberPersistent; + ucb::RememberAuthentication eDefaultRememberMode + = ucb::RememberAuthentication_SESSION; + ucb::RememberAuthentication ePreferredRememberMode + = eDefaultRememberMode; + ucb::RememberAuthentication eAlternateRememberMode + = ucb::RememberAuthentication_NO; + if (xSupplyAuthentication.is()) { - ucb::RememberAuthentication eDefault; - uno::Sequence< ucb::RememberAuthentication > - aModes(xSupplyAuthentication->getRememberPasswordModes(eDefault)); - bRemember = eDefault != ucb::RememberAuthentication_NO; - bRememberPersistent = false; - for (sal_Int32 i = 0; i < aModes.getLength(); ++i) - if (aModes[i] == ucb::RememberAuthentication_PERSISTENT) - { - bRememberPersistent = true; - break; - } - } - else - { - bRemember = false; - bRememberPersistent = false; + getRememberModes( + xSupplyAuthentication->getRememberPasswordModes( + eDefaultRememberMode), + ePreferredRememberMode, + eAlternateRememberMode); } sal_Bool bCanUseSystemCredentials; @@ -220,8 +268,14 @@ handleAuthenticationRequest_( if (rRequest.HasPassword) aInfo.SetPassword(rRequest.Password); aInfo.SetErrorText(rRequest.Diagnostic); - aInfo.SetPersistentPassword(bRememberPersistent); - aInfo.SetSavePassword(bRemember); + + aInfo.SetCanRememberPassword( + ePreferredRememberMode != eAlternateRememberMode); + aInfo.SetIsRememberPassword( + eDefaultRememberMode != ucb::RememberAuthentication_NO); + aInfo.SetIsRememberPersistent( + ePreferredRememberMode == ucb::RememberAuthentication_PERSISTENT); + aInfo.SetCanUseSystemCredentials(bCanUseSystemCredentials); aInfo.SetIsUseSystemCredentials( bDefaultUseSystemCredentials ); aInfo.SetModifyAccount(rRequest.HasAccount @@ -242,13 +296,24 @@ handleAuthenticationRequest_( xSupplyAuthentication->setUserName(aInfo.GetUserName()); if (xSupplyAuthentication->canSetPassword()) xSupplyAuthentication->setPassword(aInfo.GetPassword()); - xSupplyAuthentication-> - setRememberPassword( - aInfo.GetIsSavePassword() ? - bRememberPersistent ? - ucb::RememberAuthentication_PERSISTENT : - ucb::RememberAuthentication_SESSION : - ucb::RememberAuthentication_NO); + + if (ePreferredRememberMode != eAlternateRememberMode) + { + // user had te choice. + if (aInfo.GetIsRememberPassword()) + xSupplyAuthentication->setRememberPassword( + ePreferredRememberMode); + else + xSupplyAuthentication->setRememberPassword( + eAlternateRememberMode); + } + else + { + // user had no choice. + xSupplyAuthentication->setRememberPassword( + ePreferredRememberMode); + } + if (rRequest.HasRealm) { if (xSupplyAuthentication->canSetRealm()) @@ -267,38 +332,76 @@ handleAuthenticationRequest_( ////////////////////////// // Third, store credentials in password container. - if ( aInfo.GetIsUseSystemCredentials() ) - { - if (aInfo.GetIsSavePassword()) - { - aPwContainerHelper.addRecord( - rURL.getLength() ? rURL : rRequest.ServerName, - rtl::OUString(), // empty u/p -> sys creds - uno::Sequence< rtl::OUString >(), - xIH, - bRememberPersistent); - } - } - // Empty user name can not be valid: - else if (aInfo.GetUserName().Len() != 0) - { - if (aInfo.GetIsSavePassword()) - { - uno::Sequence< rtl::OUString > - aPassList(aInfo.GetAccount().Len() == 0 ? 1 : 2); - aPassList[0] = aInfo.GetPassword(); - if (aInfo.GetAccount().Len() != 0) - aPassList[1] = aInfo.GetAccount(); - - aPwContainerHelper.addRecord( - rURL.getLength() ? rURL : rRequest.ServerName, - aInfo.GetUserName(), - aPassList, - xIH, - bRememberPersistent); - } - } - break; + if ( aInfo.GetIsUseSystemCredentials() ) + { + if (aInfo.GetIsRememberPassword()) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + rtl::OUString(), // empty u/p -> sys creds + uno::Sequence< rtl::OUString >(), + xIH, + ePreferredRememberMode + == ucb::RememberAuthentication_PERSISTENT)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + else if (eAlternateRememberMode + == ucb::RememberAuthentication_SESSION) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + rtl::OUString(), // empty u/p -> sys creds + uno::Sequence< rtl::OUString >(), + xIH, + false /* SESSION */)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + } + // Empty user name can not be valid: + else if (aInfo.GetUserName().Len() != 0) + { + uno::Sequence< rtl::OUString > + aPassList(aInfo.GetAccount().Len() == 0 ? 1 : 2); + aPassList[0] = aInfo.GetPassword(); + if (aInfo.GetAccount().Len() != 0) + aPassList[1] = aInfo.GetAccount(); + + if (aInfo.GetIsRememberPassword()) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + aInfo.GetUserName(), + aPassList, + xIH, + ePreferredRememberMode + == ucb::RememberAuthentication_PERSISTENT)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + else if (eAlternateRememberMode + == ucb::RememberAuthentication_SESSION) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + aInfo.GetUserName(), + aPassList, + xIH, + false /* SESSION */)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + } + break; case ERRCODE_BUTTON_RETRY: if (xRetry.is()) diff --git a/uui/source/loginerr.hxx b/uui/source/loginerr.hxx index c8cbba96564b..39e5b81caf85 100644 --- a/uui/source/loginerr.hxx +++ b/uui/source/loginerr.hxx @@ -32,12 +32,13 @@ //========================================================================= -#define LOGINERROR_FLAG_SET_SAVE_PASSWORD 1 -#define LOGINERROR_FLAG_MODIFY_ACCOUNT 2 -#define LOGINERROR_FLAG_MODIFY_USER_NAME 4 -#define LOGINERROR_FLAG_PERSISTENT_PASSWORD 8 -#define LOGINERROR_FLAG_CAN_USE_SYSCREDS 16 -#define LOGINERROR_FLAG_IS_USE_SYSCREDS 32 +#define LOGINERROR_FLAG_MODIFY_ACCOUNT 1 +#define LOGINERROR_FLAG_MODIFY_USER_NAME 2 +#define LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD 4 +#define LOGINERROR_FLAG_IS_REMEMBER_PASSWORD 8 +#define LOGINERROR_FLAG_CAN_USE_SYSCREDS 16 +#define LOGINERROR_FLAG_IS_USE_SYSCREDS 32 +#define LOGINERROR_FLAG_REMEMBER_PERSISTENT 64 class LoginErrorInfo { @@ -56,27 +57,30 @@ public: LoginErrorInfo() : _nFlags( LOGINERROR_FLAG_MODIFY_USER_NAME ), _nRet( ERRCODE_BUTTON_CANCEL ) - { - } + {} const String& GetTitle() const { return _aTitle; } - const String& GetServer() const { return _aServer; } + const String& GetServer() const { return _aServer; } const String& GetAccount() const { return _aAccount; } const String& GetUserName() const { return _aUserName; } const String& GetPassword() const { return _aPassword; } const String& GetPath() const { return _aPath; } const String& GetErrorText() const { return _aErrorText; } - BOOL GetIsPersistentPassword() const - { return ( _nFlags & LOGINERROR_FLAG_PERSISTENT_PASSWORD ); } - BOOL GetIsSavePassword() const - { return ( _nFlags & LOGINERROR_FLAG_SET_SAVE_PASSWORD ); } + + BOOL GetCanRememberPassword() const + { return ( _nFlags & LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD ); } + BOOL GetIsRememberPersistent() const + { return ( _nFlags & LOGINERROR_FLAG_REMEMBER_PERSISTENT ); } + BOOL GetIsRememberPassword() const + { return ( _nFlags & LOGINERROR_FLAG_IS_REMEMBER_PASSWORD ); } + BOOL GetCanUseSystemCredentials() const { return ( _nFlags & LOGINERROR_FLAG_CAN_USE_SYSCREDS ); } BOOL GetIsUseSystemCredentials() const { return ( _nFlags & LOGINERROR_FLAG_IS_USE_SYSCREDS ) == LOGINERROR_FLAG_IS_USE_SYSCREDS; } - BYTE GetFlags() const { return _nFlags; } - USHORT GetResult() const { return _nRet; } + BYTE GetFlags() const { return _nFlags; } + USHORT GetResult() const { return _nRet; } void SetTitle( const String& aTitle ) { _aTitle = aTitle; } @@ -94,8 +98,11 @@ public: { _aErrorText = aErrorText; } void SetFlags( BYTE nFlags ) { _nFlags = nFlags; } - inline void SetSavePassword( BOOL bSet ); - inline void SetPersistentPassword( BOOL bSet ); + + inline void SetCanRememberPassword( BOOL bSet ); + inline void SetIsRememberPassword( BOOL bSet ); + inline void SetIsRememberPersistent( BOOL bSet ); + inline void SetCanUseSystemCredentials( BOOL bSet ); inline void SetIsUseSystemCredentials( BOOL bSet ); inline void SetModifyAccount( BOOL bSet ); @@ -104,20 +111,28 @@ public: { _nRet = nRet; } }; -inline void LoginErrorInfo::SetSavePassword( BOOL bSet ) +inline void LoginErrorInfo::SetCanRememberPassword( BOOL bSet ) +{ + if ( bSet ) + _nFlags |= LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD; + else + _nFlags &= ~LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD; +} + +inline void LoginErrorInfo::SetIsRememberPassword( BOOL bSet ) { if ( bSet ) - _nFlags |= LOGINERROR_FLAG_SET_SAVE_PASSWORD; + _nFlags |= LOGINERROR_FLAG_IS_REMEMBER_PASSWORD; else - _nFlags &= ~LOGINERROR_FLAG_SET_SAVE_PASSWORD; + _nFlags &= ~LOGINERROR_FLAG_IS_REMEMBER_PASSWORD; } -inline void LoginErrorInfo::SetPersistentPassword( BOOL bSet ) +inline void LoginErrorInfo::SetIsRememberPersistent( BOOL bSet ) { if ( bSet ) - _nFlags |= LOGINERROR_FLAG_PERSISTENT_PASSWORD; + _nFlags |= LOGINERROR_FLAG_REMEMBER_PERSISTENT; else - _nFlags &= ~LOGINERROR_FLAG_PERSISTENT_PASSWORD; + _nFlags &= ~LOGINERROR_FLAG_REMEMBER_PERSISTENT; } inline void LoginErrorInfo::SetCanUseSystemCredentials( BOOL bSet ) diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx index 26d22b320d8a..0a056289c29d 100644 --- a/uui/source/passwordcontainer.cxx +++ b/uui/source/passwordcontainer.cxx @@ -30,6 +30,7 @@ #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "com/sun/star/task/NoMasterException.hpp" #include "com/sun/star/task/XInteractionHandler.hpp" +#include "com/sun/star/task/XMasterPasswordHandling.hpp" #include "com/sun/star/task/XPasswordContainer.hpp" #include "com/sun/star/task/XUrlContainer.hpp" #include "com/sun/star/ucb/AuthenticationRequest.hpp" @@ -271,10 +272,20 @@ bool PasswordContainerHelper::addRecord( return false; if ( bPersist ) + { + uno::Reference< task::XMasterPasswordHandling > xMPH( + m_xPasswordContainer, uno::UNO_QUERY_THROW ); + + // If persistent storing of passwords is not yet + // allowed, enable it. + if ( !xMPH->isPersistentStoringAllowed() ) + xMPH->allowPersistentStoring( sal_True ); + m_xPasswordContainer->addPersistent( rURL, rUsername, rPasswords, xIH ); + } else m_xPasswordContainer->add( rURL, rUsername, @@ -429,7 +440,7 @@ PasswordContainerInteractionHandler::handle( // @@@ FIXME: this not able to // handle master pw request! // master pw request is never - // solvabe without UI! + // solvable without UI! this ) ) { // successfully handled -- cgit From 4342408a8359e590f57b016baaf7d8dcfdebdbd4 Mon Sep 17 00:00:00 2001 From: Carsten Driesner <cd@openoffice.org> Date: Thu, 6 May 2010 18:15:21 +0200 Subject: fwk142: #i104293 Use Commands.xcu files to mark commands which support a toggle state --- framework/inc/properties.h | 8 + framework/inc/uielement/toolbarmanager.hxx | 2 + framework/inc/uielement/uicommanddescription.hxx | 2 +- framework/source/uielement/toolbarmanager.cxx | 90 +++++--- .../source/uielement/uicommanddescription.cxx | 4 +- .../data/org/openoffice/Office/UI/CalcCommands.xcu | 2 +- .../openoffice/Office/UI/DrawImpressCommands.xcu | 249 +-------------------- .../org/openoffice/Office/UI/GenericCommands.xcu | 138 ++++++------ .../data/org/openoffice/Office/UI/MathCommands.xcu | 2 +- .../org/openoffice/Office/UI/WriterCommands.xcu | 69 ++++-- .../schema/org/openoffice/Office/UI/Commands.xcs | 1 + 11 files changed, 202 insertions(+), 365 deletions(-) diff --git a/framework/inc/properties.h b/framework/inc/properties.h index f0358ef6f1a0..5a32a42a28cc 100644 --- a/framework/inc/properties.h +++ b/framework/inc/properties.h @@ -217,6 +217,14 @@ namespace framework{ #define UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDROTATEIMAGELIST "private:resource/image/commandrotateimagelist" #define UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDMIRRORIMAGELIST "private:resource/image/commandmirrorimagelist" +#define UICOMMANDDESCRIPTION_PROPNAME_PROPERTIES "Properties" +#define UICOMMANDDESCRIPTION_PROPNAME_POPUP "Popup" + +#define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE 1 +#define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE_MIRRORED 2 +#define UICOMMANDDESCRIPTION_PROPERTIES_IMAGE_ROTATED 4 +#define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8 + //_______________________________________________ /** properties for "AutoRecovery" class */ diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx index 98894b623aea..1be8579a4112 100644 --- a/framework/inc/uielement/toolbarmanager.hxx +++ b/framework/inc/uielement/toolbarmanager.hxx @@ -179,6 +179,8 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener void RemoveControllers(); rtl::OUString RetrieveLabelFromCommand( const rtl::OUString& aCmdURL ); + sal_Int32 RetrievePropertiesFromCommand( const rtl::OUString& aCmdURL ); + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetPropsForCommand( const ::rtl::OUString& rCmdURL ); void CreateControllers(); void UpdateControllers(); void AddFrameActionListener(); diff --git a/framework/inc/uielement/uicommanddescription.hxx b/framework/inc/uielement/uicommanddescription.hxx index d9f8e461c5b5..dd95981bba90 100644 --- a/framework/inc/uielement/uicommanddescription.hxx +++ b/framework/inc/uielement/uicommanddescription.hxx @@ -109,7 +109,7 @@ public: ModuleToCommandFileMap m_aModuleToCommandFileMap; UICommandsHashMap m_aUICommandsHashMap; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xGenericUICommands; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager; + ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager > m_xModuleManager; }; } // namespace framework diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index d89b81c0f9b6..8171ff2e5419 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -112,6 +112,7 @@ using namespace ::com::sun::star::util; using namespace ::com::sun::star::container; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::ui; +using namespace ::com::sun::star; namespace framework { @@ -803,17 +804,18 @@ void ToolBarManager::RemoveControllers() m_aControllerMap.clear(); } -::rtl::OUString ToolBarManager::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) +uno::Sequence< beans::PropertyValue > ToolBarManager::GetPropsForCommand( const ::rtl::OUString& rCmdURL ) { - ::rtl::OUString aLabel; + Sequence< PropertyValue > aPropSeq; - // Retrieve popup menu labels - if ( !m_bModuleIdentified ) + // Retrieve properties for command + try { - Reference< XModuleManager > xModuleManager( m_xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY_THROW ); - Reference< XInterface > xIfac( m_xFrame, UNO_QUERY ); - try + if ( !m_bModuleIdentified ) { + Reference< XModuleManager > xModuleManager( m_xServiceManager->createInstance( SERVICENAME_MODULEMANAGER ), UNO_QUERY_THROW ); + Reference< XInterface > xIfac( m_xFrame, UNO_QUERY ); + m_bModuleIdentified = sal_True; m_aModuleIdentifier = xModuleManager->identify( xIfac ); @@ -821,44 +823,57 @@ void ToolBarManager::RemoveControllers() { Reference< XNameAccess > xNameAccess( m_xServiceManager->createInstance( SERVICENAME_UICOMMANDDESCRIPTION ), UNO_QUERY ); if ( xNameAccess.is() ) - { xNameAccess->getByName( m_aModuleIdentifier ) >>= m_xUICommandLabels; - } } } - catch ( Exception& ) + + if ( m_xUICommandLabels.is() ) { + if ( rCmdURL.getLength() > 0 ) + m_xUICommandLabels->getByName( rCmdURL ) >>= aPropSeq; } } + catch ( Exception& ) + { + } - if ( m_xUICommandLabels.is() ) + return aPropSeq; +} + +::rtl::OUString ToolBarManager::RetrieveLabelFromCommand( const ::rtl::OUString& aCmdURL ) +{ + ::rtl::OUString aLabel; + Sequence< PropertyValue > aPropSeq; + + // Retrieve popup menu labels + aPropSeq = GetPropsForCommand( aCmdURL ); + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - try + if ( aPropSeq[i].Name.equalsAscii( "Name" )) { - if ( aCmdURL.getLength() > 0 ) - { - rtl::OUString aStr; - Sequence< PropertyValue > aPropSeq; - if ( m_xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq ) - { - for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) - { - if ( aPropSeq[i].Name.equalsAscii( "Name" )) - { - aPropSeq[i].Value >>= aStr; - break; - } - } - } - aLabel = aStr; - } + aPropSeq[i].Value >>= aLabel; + break; } - catch ( com::sun::star::uno::Exception& ) + } + return aLabel; +} + +sal_Int32 ToolBarManager::RetrievePropertiesFromCommand( const ::rtl::OUString& aCmdURL ) +{ + sal_Int32 nProperties(0); + Sequence< PropertyValue > aPropSeq; + + // Retrieve popup menu labels + aPropSeq = GetPropsForCommand( aCmdURL ); + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + { + if ( aPropSeq[i].Name.equalsAscii( "Properties" )) { + aPropSeq[i].Value >>= nProperties; + break; } } - - return aLabel; + return nProperties; } void ToolBarManager::CreateControllers() @@ -969,8 +984,15 @@ void ToolBarManager::CreateControllers() { MenuDescriptionMap::iterator it = m_aMenuMap.find( nId ); if ( it == m_aMenuMap.end() ) - xController = Reference< XStatusListener >( - new GenericToolbarController( m_xServiceManager, m_xFrame, m_pToolBar, nId, aCommandURL )); + { + xController = Reference< XStatusListener >( + new GenericToolbarController( m_xServiceManager, m_xFrame, m_pToolBar, nId, aCommandURL )); + + // Accessibility support: Set toggle button role for specific commands + sal_Int32 nProps = RetrievePropertiesFromCommand( aCommandURL ); + if ( nProps & UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON ) + m_pToolBar->SetItemBits( nId, m_pToolBar->GetItemBits( nId ) | TIB_CHECKABLE ); + } else xController = Reference< XStatusListener >( new MenuToolbarController( m_xServiceManager, m_xFrame, m_pToolBar, nId, aCommandURL, m_aModuleIdentifier, m_aMenuMap[ nId ] )); diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index fdcd08f221fd..0d50aa4c36d4 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -340,7 +340,7 @@ Any ConfigurationAccess_UICommand::getSequenceFromCache( const ::rtl::OUString& if ( !pIter->second.bCommandNameCreated ) fillInfoFromResult( pIter->second, pIter->second.aLabel ); - Sequence< PropertyValue > aPropSeq( 3 ); + Sequence< PropertyValue > aPropSeq( 4 ); aPropSeq[0].Name = m_aPropLabel; aPropSeq[0].Value = pIter->second.aContextLabel.getLength() ? makeAny( pIter->second.aContextLabel ): makeAny( pIter->second.aLabel ); @@ -348,6 +348,8 @@ Any ConfigurationAccess_UICommand::getSequenceFromCache( const ::rtl::OUString& aPropSeq[1].Value <<= pIter->second.aCommandName; aPropSeq[2].Name = m_aPropPopup; aPropSeq[2].Value <<= pIter->second.bPopup; + aPropSeq[3].Name = m_aPropProperties; + aPropSeq[3].Value <<= pIter->second.nProperties; return makeAny( aPropSeq ); } diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu index 8c76a2dadd9f..d3db05206a6a 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu @@ -134,7 +134,7 @@ <value xml:lang="en-US">~Hyphenation...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ObjectTitleDescription" oor:op="replace"> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu index 2925c2a97802..b4a2fab23fcd 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu @@ -5,7 +5,6 @@ <node oor:name="Commands"> <node oor:name=".uno:Polygon" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Polygon, filled</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -14,7 +13,6 @@ </node> <node oor:name=".uno:ColorView" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Black & White View</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -23,19 +21,16 @@ </node> <node oor:name=".uno:RenamePage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Rename Slide</value> </prop> </node> <node oor:name=".uno:RenameLayer" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Rename</value> </prop> </node> <node oor:name=".uno:Presentation" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Slide Show</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -44,7 +39,6 @@ </node> <node oor:name=".uno:RehearseTimings" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Rehearse Timings</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -53,7 +47,6 @@ </node> <node oor:name=".uno:Dia" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">SlideTransition</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -62,7 +55,6 @@ </node> <node oor:name=".uno:ShowSlide" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Sho~w Slide</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -71,7 +63,6 @@ </node> <node oor:name=".uno:HideSlide" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Hide Slide</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -80,19 +71,16 @@ </node> <node oor:name=".uno:TextAttributes" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Te~xt...</value> </prop> </node> <node oor:name=".uno:PagesPerRow" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Slides Per Row</value> </prop> </node> <node oor:name=".uno:TextFitToSizeTool" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Fit Text to Frame</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -101,7 +89,6 @@ </node> <node oor:name=".uno:VerticalTextFitToSizeTool" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Fit Vertical Text to Frame</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -110,7 +97,6 @@ </node> <node oor:name=".uno:Objects3DToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">3D Objects</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -119,7 +105,6 @@ </node> <node oor:name=".uno:Cube" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Cube</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -128,7 +113,6 @@ </node> <node oor:name=".uno:Sphere" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Sphere</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -137,7 +121,6 @@ </node> <node oor:name=".uno:Cylinder" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Cylinder</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -146,7 +129,6 @@ </node> <node oor:name=".uno:Cone" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Cone</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -155,7 +137,6 @@ </node> <node oor:name=".uno:Cyramid" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Pyramid</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -164,7 +145,6 @@ </node> <node oor:name=".uno:GlueEditMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Glue Points</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -173,7 +153,6 @@ </node> <node oor:name=".uno:GlueInsertPoint" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Insert Glue Point</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -182,22 +161,19 @@ </node> <node oor:name=".uno:GluePercent" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Glue Point Relative</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:GlueEscapeDirection" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Exit Direction</value> </prop> </node> <node oor:name=".uno:GlueHorzAlignCenter" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Glue Point Horizontal Center</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -206,7 +182,6 @@ </node> <node oor:name=".uno:GlueHorzAlignLeft" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Glue Point Horizontal Left</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -215,7 +190,6 @@ </node> <node oor:name=".uno:GlueHorzAlignRight" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Glue Point Horizontal Right</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -224,7 +198,6 @@ </node> <node oor:name=".uno:GlueVertAlignCenter" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Glue Point Vertical Center</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -233,7 +206,6 @@ </node> <node oor:name=".uno:GlueVertAlignTop" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Glue Point Vertical Top</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -242,7 +214,6 @@ </node> <node oor:name=".uno:GlueVertAlignBottom" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Glue Point Vertical Bottom</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -251,7 +222,6 @@ </node> <node oor:name=".uno:Shell3D" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Shell</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -260,7 +230,6 @@ </node> <node oor:name=".uno:Torus" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Torus</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -269,7 +238,6 @@ </node> <node oor:name=".uno:HalfSphere" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Half-Sphere</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -278,7 +246,6 @@ </node> <node oor:name=".uno:GlueEscapeDirectionLeft" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Exit Direction Left</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -287,7 +254,6 @@ </node> <node oor:name=".uno:GlueEscapeDirectionRight" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Exit Direction Right</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -296,7 +262,6 @@ </node> <node oor:name=".uno:GlueEscapeDirectionTop" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Exit Direction Top</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -305,7 +270,6 @@ </node> <node oor:name=".uno:GlueEscapeDirectionBottom" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Exit Direction Bottom</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -314,7 +278,6 @@ </node> <node oor:name=".uno:InsertToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Insert</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -323,25 +286,21 @@ </node> <node oor:name=".uno:Morphing" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Cross-fading...</value> </prop> </node> <node oor:name=".uno:MeasureAttributes" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Dimen~sions...</value> </prop> </node> <node oor:name=".uno:GridFront" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Grid to ~Front</value> </prop> </node> <node oor:name=".uno:HelplinesVisible" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Display Guides</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -350,13 +309,11 @@ </node> <node oor:name=".uno:HelplinesFront" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Guides to ~Front</value> </prop> </node> <node oor:name=".uno:BeforeObject" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">In Front of ~Object</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -365,13 +322,11 @@ </node> <node oor:name=".uno:PreviewWindow" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Pre~view</value> </prop> </node> <node oor:name=".uno:CustomAnimation" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Custom Animation...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -380,46 +335,39 @@ </node> <node oor:name=".uno:CustomAnimationSchemes" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Animation Schemes...</value> </prop> </node> <node oor:name=".uno:SlideChangeWindow" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Slide Transition...</value> </prop> </node> <node oor:name=".uno:ConnectorAttributes" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Connector...</value> </prop> </node> <node oor:name=".uno:PresentationDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">S~lide Show Settings...</value> </prop> </node> <node oor:name=".uno:Hyphenation" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Hyphenation</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:NewRouting" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Reset Routing</value> </prop> </node> <node oor:name=".uno:DuplicatePage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">D~uplicate Slide</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -428,7 +376,6 @@ </node> <node oor:name=".uno:ExpandPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">E~xpand Slide</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -437,13 +384,11 @@ </node> <node oor:name=".uno:SummaryPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Su~mmary Slide</value> </prop> </node> <node oor:name=".uno:LeaveAllGroups" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Exit All Groups</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -452,7 +397,6 @@ </node> <node oor:name=".uno:ParaspaceIncrease" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Increase Spacing</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -461,7 +405,6 @@ </node> <node oor:name=".uno:ParaspaceDecrease" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Decrease Spacing</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -470,85 +413,71 @@ </node> <node oor:name=".uno:SlideMasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Slide Master</value> </prop> </node> <node oor:name=".uno:HandoutMasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Handout Master</value> </prop> </node> <node oor:name=".uno:NotesMasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Notes Master</value> </prop> </node> <node oor:name=".uno:TitleMasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Title Slide Master</value> </prop> </node> <node oor:name=".uno:InsertPageQuick" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Insert Slide Direct</value> </prop> </node> <node oor:name=".uno:InsertDateFieldVar" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Dat~e (variable)</value> </prop> </node> <node oor:name=".uno:InsertDateFieldFix" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Date (fixed)</value> </prop> </node> <node oor:name=".uno:InsertTimeFieldVar" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">T~ime (variable)</value> </prop> </node> <node oor:name=".uno:InsertTimeFieldFix" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Time (fixed)</value> </prop> </node> <node oor:name=".uno:InsertPageField" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Page Number</value> </prop> </node> <node oor:name=".uno:InsertPagesField" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Page ~Count</value> </prop> </node> <node oor:name=".uno:ModifyField" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">F~ields...</value> </prop> </node> <node oor:name=".uno:InsertFileField" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~File Name</value> </prop> </node> <node oor:name=".uno:InsertAuthorField" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Author</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -557,49 +486,41 @@ </node> <node oor:name=".uno:CustomShowDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Custom Slide Show...</value> </prop> </node> <node oor:name=".uno:OutputQualityColor" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Color</value> </prop> </node> <node oor:name=".uno:OutputQualityGrayscale" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Grayscale</value> </prop> </node> <node oor:name=".uno:OutputQualityBlackWhite" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Black and White</value> </prop> </node> <node oor:name=".uno:PreviewQualityColor" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Color</value> </prop> </node> <node oor:name=".uno:PreviewQualityGrayscale" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Grayscale</value> </prop> </node> <node oor:name=".uno:PreviewQualityBlackWhite" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Black and White</value> </prop> </node> <node oor:name=".uno:ConvertInto3D" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">To 3~D</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -608,7 +529,6 @@ </node> <node oor:name=".uno:ConvertInto3DLatheFast" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">To 3D ~Rotation Object</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -617,61 +537,51 @@ </node> <node oor:name=".uno:ConvertIntoBitmap" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">To ~Bitmap</value> </prop> </node> <node oor:name=".uno:ConvertIntoMetaFile" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">To ~Metafile</value> </prop> </node> <node oor:name=".uno:PackAndGo" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Pack</value> </prop> </node> <node oor:name=".uno:convert_to_contour" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">To C~ontour</value> </prop> </node> <node oor:name=".uno:EditHyperlink" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">H~yperlink...</value> </prop> </node> <node oor:name=".uno:PageSetup" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Page...</value> </prop> </node> - <node oor:name=".uno:PasteSpecial" oor:op="replace"> + <node oor:name=".uno:PasteSpecial" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Paste ~Special...</value> </prop> </node> <node oor:name=".uno:CopyObjects" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Duplicat~e...</value> </prop> </node> <node oor:name=".uno:ManageLinks" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Lin~ks...</value> </prop> </node> <node oor:name=".uno:ConvertInto3DLathe" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">In 3D Rotation Object</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -680,37 +590,31 @@ </node> <node oor:name=".uno:DrawingMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Drawing View</value> </prop> </node> <node oor:name=".uno:OutlineMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Outline</value> </prop> </node> <node oor:name=".uno:OutputQualityContrast" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~High Contrast</value> </prop> </node> <node oor:name=".uno:DiaMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Sli~de Sorter</value> </prop> </node> <node oor:name=".uno:PreviewQualityContrast" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~High Contrast</value> </prop> </node> <node oor:name=".uno:InsertPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Slid~e</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -719,7 +623,6 @@ </node> <node oor:name=".uno:ImportFromFile" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~File...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -728,7 +631,6 @@ </node> <node oor:name=".uno:ZoomPanning" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Shift</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -737,13 +639,11 @@ </node> <node oor:name=".uno:PixelMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Pixel Mode</value> </prop> </node> <node oor:name=".uno:ObjectPosition" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Arrange</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -752,25 +652,21 @@ </node> <node oor:name=".uno:Combine" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Comb~ine</value> </prop> </node> <node oor:name=".uno:ObjectTitleDescription" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Description...</value> </prop> </node> <node oor:name=".uno:NameGroup" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Name...</value> </prop> </node> <node oor:name=".uno:ConnectorToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -779,7 +675,6 @@ </node> <node oor:name=".uno:Forward" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Bring ~Forward</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -788,7 +683,6 @@ </node> <node oor:name=".uno:Backward" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Send Back~ward</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -797,19 +691,16 @@ </node> <node oor:name=".uno:MirrorVert" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Vertically</value> </prop> </node> <node oor:name=".uno:MirrorHorz" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Horizontally</value> </prop> </node> <node oor:name=".uno:ChangeBezier" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">To ~Curve</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -818,7 +709,6 @@ </node> <node oor:name=".uno:ChangePolygon" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">To ~Polygon</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -827,25 +717,21 @@ </node> <node oor:name=".uno:CapturePoint" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Insert Snap Point/Line...</value> </prop> </node> <node oor:name=".uno:ShowRuler" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Ruler</value> </prop> </node> <node oor:name=".uno:InsertLayer" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Layer...</value> </prop> </node> <node oor:name=".uno:ModifyPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Slide ~Layout...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -854,25 +740,21 @@ </node> <node oor:name=".uno:ModifyLayer" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Layer...</value> </prop> </node> <node oor:name=".uno:PageMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Normal</value> </prop> </node> <node oor:name=".uno:LayerMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Layer</value> </prop> </node> <node oor:name=".uno:MeasureLine" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Dimension Line</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -881,13 +763,11 @@ </node> <node oor:name=".uno:MasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Master</value> </prop> </node> <node oor:name=".uno:DiaEffect" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Slide Effects</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -896,7 +776,6 @@ </node> <node oor:name=".uno:DiaSpeed" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Transition Speed</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -905,7 +784,6 @@ </node> <node oor:name=".uno:DiaAuto" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">AutoTransition</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -914,7 +792,6 @@ </node> <node oor:name=".uno:DiaTime" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Time</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -923,7 +800,6 @@ </node> <node oor:name=".uno:Connector" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -932,7 +808,6 @@ </node> <node oor:name=".uno:ActionMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Allow Interaction</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -941,7 +816,6 @@ </node> <node oor:name=".uno:AnimationObjects" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Animated Image...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -950,7 +824,6 @@ </node> <node oor:name=".uno:AnimationEffects" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Interaction...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -959,7 +832,6 @@ </node> <node oor:name=".uno:PresentationLayout" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Slide D~esign...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -968,49 +840,41 @@ </node> <node oor:name=".uno:NotesMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Notes ~Page</value> </prop> </node> <node oor:name=".uno:HandoutMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">H~andout Page</value> </prop> </node> <node oor:name=".uno:DeletePage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">D~elete Slide</value> </prop> </node> <node oor:name=".uno:DeleteLayer" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Delete</value> </prop> </node> <node oor:name=".uno:Dismantle" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Split</value> </prop> </node> <node oor:name=".uno:PageStatus" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Slide/Layer</value> </prop> </node> <node oor:name=".uno:LayoutStatus" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Layout</value> </prop> </node> <node oor:name=".uno:CrookRotate" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Set in Circle (perspective)</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1019,7 +883,6 @@ </node> <node oor:name=".uno:CrookSlant" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Set to circle (slant)</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1028,25 +891,21 @@ </node> <node oor:name=".uno:CrookStretch" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Set in Circle (distort)</value> </prop> </node> <node oor:name=".uno:Connect" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">C~onnect</value> </prop> </node> <node oor:name=".uno:Break" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Break</value> </prop> </node> <node oor:name=".uno:AdvancedMode" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Effects</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1055,7 +914,6 @@ </node> <node oor:name=".uno:InteractiveTransparence" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Transparency</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1064,7 +922,6 @@ </node> <node oor:name=".uno:InteractiveGradient" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Gradient</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1073,7 +930,6 @@ </node> <node oor:name=".uno:Shear" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Distort</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1082,7 +938,6 @@ </node> <node oor:name=".uno:BehindObject" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Be~hind Object</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1091,7 +946,6 @@ </node> <node oor:name=".uno:ReverseOrder" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Reverse</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1100,7 +954,6 @@ </node> <node oor:name=".uno:ConnectorArrowStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector Starts with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1109,7 +962,6 @@ </node> <node oor:name=".uno:ConnectorArrowEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector Ends with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1118,7 +970,6 @@ </node> <node oor:name=".uno:ConnectorArrows" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector with Arrows</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1127,7 +978,6 @@ </node> <node oor:name=".uno:ConnectorCircleStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector Starts with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1136,7 +986,6 @@ </node> <node oor:name=".uno:ConnectorCircleEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector Ends with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1145,7 +994,6 @@ </node> <node oor:name=".uno:ConnectorCircles" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Connector with Circles</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1154,7 +1002,6 @@ </node> <node oor:name=".uno:TextToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Text</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1163,7 +1010,6 @@ </node> <node oor:name=".uno:ConnectorLine" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Straight Connector</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1172,7 +1018,6 @@ </node> <node oor:name=".uno:RectangleToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Rectangle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1181,7 +1026,6 @@ </node> <node oor:name=".uno:ConnectorLineArrowStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Straight Connector starts with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1190,7 +1034,6 @@ </node> <node oor:name=".uno:EllipseToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Ellipse</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1199,7 +1042,6 @@ </node> <node oor:name=".uno:ConnectorLineArrowEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Straight Connector ends with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1208,7 +1050,6 @@ </node> <node oor:name=".uno:LineToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curve</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1217,7 +1058,6 @@ </node> <node oor:name=".uno:ConnectorLineArrows" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Straight Connector with Arrows</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1226,7 +1066,6 @@ </node> <node oor:name=".uno:ConnectorLineCircleStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Straight Connector starts with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1235,7 +1074,6 @@ </node> <node oor:name=".uno:ConnectorLineCircleEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Straight Connector ends with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1244,7 +1082,6 @@ </node> <node oor:name=".uno:ConnectorLineCircles" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Straight Connector with Circles</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1253,7 +1090,6 @@ </node> <node oor:name=".uno:ConnectorCurve" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curved Connector</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1262,7 +1098,6 @@ </node> <node oor:name=".uno:ConnectorCurveArrowStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curved Connector Starts with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1271,7 +1106,6 @@ </node> <node oor:name=".uno:ConnectorCurveArrowEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curved Connector Ends with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1280,7 +1114,6 @@ </node> <node oor:name=".uno:ConnectorCurveArrows" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curved Connector with Arrows</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1289,7 +1122,6 @@ </node> <node oor:name=".uno:ConnectorCurveCircleStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curved Connector Starts with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1298,7 +1130,6 @@ </node> <node oor:name=".uno:ConnectorCurveCircleEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curved Connector Ends with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1307,7 +1138,6 @@ </node> <node oor:name=".uno:ConnectorCurveCircles" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Curved Connector with Circles</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1316,7 +1146,6 @@ </node> <node oor:name=".uno:ConnectorLines" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Connector</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1325,7 +1154,6 @@ </node> <node oor:name=".uno:ConnectorLinesArrowStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Connector Starts with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1334,7 +1162,6 @@ </node> <node oor:name=".uno:ConnectorLinesArrowEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Connector Ends with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1343,7 +1170,6 @@ </node> <node oor:name=".uno:ConnectorLinesArrows" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Connector with Arrows</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1352,7 +1178,6 @@ </node> <node oor:name=".uno:ConnectorLinesCircleStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Connector Starts with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1361,7 +1186,6 @@ </node> <node oor:name=".uno:ConnectorLinesCircleEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Connector Ends with Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1370,7 +1194,6 @@ </node> <node oor:name=".uno:ConnectorLinesCircles" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Connector with Circles</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1379,7 +1202,6 @@ </node> <node oor:name=".uno:GraphicDraft" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Picture Placeholders</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1388,7 +1210,6 @@ </node> <node oor:name=".uno:FillDraft" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Contour Mode</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1397,7 +1218,6 @@ </node> <node oor:name=".uno:TextDraft" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Text Placeholders</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1406,7 +1226,6 @@ </node> <node oor:name=".uno:LineDraft" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Contour Only</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1415,7 +1234,6 @@ </node> <node oor:name=".uno:HandlesDraft" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Simple Handles</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1424,7 +1242,6 @@ </node> <node oor:name=".uno:SolidCreate" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Modify Object with Attributes</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1433,7 +1250,6 @@ </node> <node oor:name=".uno:HelplinesUse" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Snap to Guides</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1442,7 +1258,6 @@ </node> <node oor:name=".uno:SnapBorder" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Snap to Page Margins</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1451,7 +1266,6 @@ </node> <node oor:name=".uno:SnapFrame" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Snap to Object Border</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1460,7 +1274,6 @@ </node> <node oor:name=".uno:SnapPoints" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Snap to Object Points</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1469,7 +1282,6 @@ </node> <node oor:name=".uno:QuickEdit" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Allow Quick Editing</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1478,7 +1290,6 @@ </node> <node oor:name=".uno:PickThrough" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Select Text Area Only</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1487,49 +1298,41 @@ </node> <node oor:name=".uno:ConvertTo1BitThreshold" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">1 Bit Threshold</value> </prop> </node> <node oor:name=".uno:ConvertTo1BitMatrix" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">1 Bit Dithered</value> </prop> </node> <node oor:name=".uno:ConvertTo4BitGrays" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">4 Bit grayscales</value> </prop> </node> <node oor:name=".uno:ConvertTo4BitColors" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">4 Bit color palette</value> </prop> </node> <node oor:name=".uno:ConvertTo8BitGrays" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">8 Bit Grayscales</value> </prop> </node> <node oor:name=".uno:ConvertTo8BitColors" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">8 Bit color palette</value> </prop> </node> <node oor:name=".uno:ConvertToTrueColor" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">24 Bit True Color</value> </prop> </node> <node oor:name=".uno:BigHandles" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Large Handles</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1538,7 +1341,6 @@ </node> <node oor:name=".uno:DoubleClickTextEdit" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Double-click to edit Text</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1547,7 +1349,6 @@ </node> <node oor:name=".uno:ClickChangeRotation" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Rotation Mode after Clicking Object</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1556,7 +1357,6 @@ </node> <node oor:name=".uno:ArrowsToolbox" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Lines and Arrows</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1565,7 +1365,6 @@ </node> <node oor:name=".uno:LineArrowStart" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Starts with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1574,7 +1373,6 @@ </node> <node oor:name=".uno:LineArrowEnd" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line Ends with Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1583,7 +1381,6 @@ </node> <node oor:name=".uno:LineArrows" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line with Arrows</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1592,7 +1389,6 @@ </node> <node oor:name=".uno:LineArrowCircle" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line with Arrow/Circle</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1601,7 +1397,6 @@ </node> <node oor:name=".uno:LineCircleArrow" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line with Circle/Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1610,7 +1405,6 @@ </node> <node oor:name=".uno:LineArrowSquare" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line with Arrow/Square</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1619,7 +1413,6 @@ </node> <node oor:name=".uno:LineSquareArrow" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Line with Square/Arrow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1628,17 +1421,14 @@ </node> <node oor:name=".uno:Mirror" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Flip</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> <value>1</value> </prop> </node> - <node oor:name=".uno:InsertMasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">New Master</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1647,7 +1437,6 @@ </node> <node oor:name=".uno:DeleteMasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Delete Master</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1656,7 +1445,6 @@ </node> <node oor:name=".uno:RenameMasterPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Rename Master</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> @@ -1665,19 +1453,16 @@ </node> <node oor:name=".uno:CloseMasterView" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Close Master View</value> </prop> </node> <node oor:name=".uno:SendMailDocAsMS" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">E-mail as ~Microsoft PowerPoint Presentation...</value> </prop> </node> <node oor:name=".uno:SendMailDocAsOOo" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">E-mail as ~OpenDocument Presentation...</value> </prop> </node> @@ -1685,61 +1470,51 @@ <node oor:name="Popups"> <node oor:name=".uno:ModifyMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Modify</value> </prop> </node> <node oor:name=".uno:WorkspaceMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Wor~kspace</value> </prop> </node> <node oor:name=".uno:MirrorMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Flip</value> </prop> </node> <node oor:name=".uno:PreviewDisplayQualityMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Pre~view Mode</value> </prop> </node> <node oor:name=".uno:LayerMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">La~yer</value> </prop> </node> <node oor:name=".uno:GridMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Gr~id</value> </prop> </node> <node oor:name=".uno:ConvertMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Convert</value> </prop> </node> <node oor:name=".uno:ArrangeMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Arrange</value> </prop> </node> <node oor:name=".uno:DisplayQualityMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Color/Grayscale</value> </prop> </node> <node oor:name=".uno:SlideShowMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Slide Show</value> </prop> </node> @@ -1750,107 +1525,89 @@ </node--> <node oor:name=".uno:GroupMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Group</value> </prop> </node> <node oor:name=".uno:SendMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Sen~d</value> </prop> </node> <node oor:name=".uno:TemplatesMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Styl~es</value> </prop> </node> <node oor:name=".uno:SnapLinesMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Guides</value> </prop> </node> <node oor:name=".uno:MasterPageMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Master</value> </prop> </node> <node oor:name=".uno:MasterLayoutsMenu" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Master Lay~outs</value> </prop> </node> <node oor:name=".uno:MasterLayouts" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Master ~Elements...</value> </prop> </node> <node oor:name=".uno:MasterLayoutsNotes" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Notes Master Layout...</value> </prop> </node> <node oor:name=".uno:MasterLayoutsHandouts" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Handout Master Layout...</value> </prop> </node> <node oor:name=".uno:HeaderAndFooter" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Header and Footer...</value> </prop> </node> <node oor:name=".uno:InsertPageNumber" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">P~age Number...</value> </prop> </node> <node oor:name=".uno:InsertDateAndTime" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Date and ~Time...</value> </prop> </node> <node oor:name=".uno:NormalMultiPaneGUI" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Normal</value> </prop> </node> <node oor:name=".uno:SlideSorterMultiPaneGUI" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Sli~de Sorter</value> </prop> </node> <node oor:name=".uno:LeftPaneImpress" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">S~lide Pane</value> </prop> </node> <node oor:name=".uno:LeftPaneDraw" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~Page Pane</value> </prop> </node> <node oor:name=".uno:RightPane" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">Tas~k Pane</value> </prop> </node> - <node oor:name=".uno:MergeCells" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="de">Zellen verbinden</value> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 4f38244540c2..46cda2e2facc 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -45,7 +45,7 @@ <value xml:lang="en-US">Fontwork Gallery</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FontworkShapeType" oor:op="replace"> @@ -1287,7 +1287,7 @@ <value xml:lang="en-US">Scrollbar</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Zoom" oor:op="replace"> @@ -1303,7 +1303,7 @@ <value xml:lang="en-US">Spin Button</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ConvertToScrollBar" oor:op="replace"> @@ -1371,7 +1371,7 @@ <value xml:lang="en-US">Italic</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Bold" oor:op="replace"> @@ -1379,7 +1379,7 @@ <value xml:lang="en-US">Bold</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ModuleDialog" oor:op="replace"> @@ -1395,7 +1395,7 @@ <value xml:lang="en-US">Shadow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ObjectCatalog" oor:op="replace"> @@ -1411,7 +1411,7 @@ <value xml:lang="en-US">Outline</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Strikeout" oor:op="replace"> @@ -1419,7 +1419,7 @@ <value xml:lang="en-US">Strikethrough</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:HelpOnHelp" oor:op="replace"> @@ -1432,7 +1432,7 @@ <value xml:lang="en-US">Underline</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Overline" oor:op="replace"> @@ -1440,7 +1440,7 @@ <value xml:lang="en-US">Overline</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:HelpIndex" oor:op="replace"> @@ -1717,7 +1717,7 @@ <value xml:lang="en-US">Invert</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Line" oor:op="replace"> @@ -2195,7 +2195,7 @@ <value xml:lang="en-US">Check Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ChangeCaseToKatakana" oor:op="replace"> @@ -2423,7 +2423,7 @@ <value xml:lang="en-US">Time Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:StyleNewByExample" oor:op="replace"> @@ -2590,7 +2590,7 @@ <value xml:lang="en-US">Left-To-Right</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:Group" oor:op="replace"> @@ -2606,7 +2606,7 @@ <value xml:lang="en-US">Right-To-Left</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:Ungroup" oor:op="replace"> @@ -2726,7 +2726,7 @@ <value xml:lang="en-US">Combo Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Spinbutton" oor:op="replace"> @@ -2891,7 +2891,7 @@ <value xml:lang="en-US">Guides When Moving</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:CloseWin" oor:op="replace"> @@ -2907,7 +2907,7 @@ <value xml:lang="en-US">Snap to Grid</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertTextFrame" oor:op="replace"> @@ -3144,7 +3144,7 @@ <value xml:lang="en-US">HT~ML Source</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertSound" oor:op="replace"> @@ -3228,7 +3228,7 @@ <value xml:lang="en-US">Shadow</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:LineEndStyle" oor:op="replace"> @@ -3328,7 +3328,7 @@ <value xml:lang="en-US">~Edit Contour...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SelectAll" oor:op="replace"> @@ -3434,13 +3434,16 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Fit to Frame</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ImageMapDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">ImageMap</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:GoDownSel" oor:op="replace"> @@ -3684,14 +3687,17 @@ <value xml:lang="en-US">~Display Grid</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Flash" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Flash</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ToolsMacroEdit" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Edit Macros</value> @@ -3980,7 +3986,7 @@ <value xml:lang="en-US">~AutoSpellcheck</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:HideSpellMark" oor:op="replace"> @@ -3995,9 +4001,12 @@ </node> <node oor:name=".uno:RubyDialog" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">As~ian phonetic guide...</value> + <value xml:lang="en-US">As~ian phonetic guide...</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:InsertSymbol" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">S~pecial Character...</value> @@ -4094,7 +4103,10 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Status ~Bar</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:MacroBarVisible" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Macro Toolbar On/Off</value> @@ -4220,7 +4232,7 @@ <value xml:lang="en-US">~Gallery</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SearchDialog" oor:op="replace"> @@ -4260,7 +4272,7 @@ <value xml:lang="en-US">More Controls</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FormDesignTools" oor:op="replace"> @@ -4268,7 +4280,7 @@ <value xml:lang="en-US">Form Design</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Pushbutton" oor:op="replace"> @@ -4276,7 +4288,7 @@ <value xml:lang="en-US">Push Button</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:RadioButton" oor:op="replace"> @@ -4284,7 +4296,7 @@ <value xml:lang="en-US">Option Button</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:CheckBox" oor:op="replace"> @@ -4300,7 +4312,7 @@ <value xml:lang="en-US">Label Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:GroupBox" oor:op="replace"> @@ -4308,7 +4320,7 @@ <value xml:lang="en-US">Group Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Edit" oor:op="replace"> @@ -4316,7 +4328,7 @@ <value xml:lang="en-US">Text Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ListBox" oor:op="replace"> @@ -4324,7 +4336,7 @@ <value xml:lang="en-US">List Box</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ComboBox" oor:op="replace"> @@ -4340,7 +4352,7 @@ <value xml:lang="en-US">Table Control</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Imagebutton" oor:op="replace"> @@ -4348,7 +4360,7 @@ <value xml:lang="en-US">Image Button</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FileControl" oor:op="replace"> @@ -4356,7 +4368,7 @@ <value xml:lang="en-US">File Selection</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ControlProperties" oor:op="replace"> @@ -4364,7 +4376,7 @@ <value xml:lang="en-US">Con~trol...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FormProperties" oor:op="replace"> @@ -4372,7 +4384,7 @@ <value xml:lang="en-US">For~m...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:TabDialog" oor:op="replace"> @@ -4475,7 +4487,7 @@ <value xml:lang="en-US">Design Mode On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SwitchXFormsDesignMode" oor:op="replace"> @@ -4508,7 +4520,7 @@ <value xml:lang="pt">Modo Esboço</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:RecUndo" oor:op="replace"> @@ -4529,7 +4541,7 @@ <value xml:lang="en-US">Form Navigator...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ShowDataNavigator" oor:op="replace"> @@ -4537,7 +4549,7 @@ <value xml:lang="en-US">Data Navigator...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Window3D" oor:op="replace"> @@ -4604,7 +4616,7 @@ <value xml:lang="en-US">Date Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:TimeField" oor:op="replace"> @@ -4612,7 +4624,7 @@ <value xml:lang="en-US">Time Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:NumericField" oor:op="replace"> @@ -4620,7 +4632,7 @@ <value xml:lang="en-US">Numerical Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:CurrencyField" oor:op="replace"> @@ -4628,7 +4640,7 @@ <value xml:lang="en-US">Currency Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:PrintPreview" oor:op="replace"> @@ -4636,7 +4648,7 @@ <value xml:lang="en-US">Pa~ge Preview</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:PatternField" oor:op="replace"> @@ -4644,7 +4656,7 @@ <value xml:lang="en-US">Pattern Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:OpenReadOnly" oor:op="replace"> @@ -4652,7 +4664,7 @@ <value xml:lang="en-US">Open in Design Mode</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ImageControl" oor:op="replace"> @@ -4660,7 +4672,7 @@ <value xml:lang="en-US">Image Control</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:RemoveFilterSort" oor:op="replace"> @@ -4732,7 +4744,7 @@ <value xml:lang="en-US">Run SQL command directly</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SbaExecuteSql" oor:op="replace"> @@ -4756,7 +4768,7 @@ <value xml:lang="en-US">Apply Filter</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Refresh" oor:op="replace"> @@ -4788,7 +4800,7 @@ <value xml:lang="en-US">Wizards On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FormattedField" oor:op="replace"> @@ -4796,7 +4808,7 @@ <value xml:lang="en-US">Formatted Field</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FormFilter" oor:op="replace"> @@ -4934,7 +4946,7 @@ <value xml:lang="en-US">Automatic Control Focus</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:DSBrowserExplorer" oor:op="replace"> @@ -4942,7 +4954,7 @@ <value xml:lang="en-US">Explorer On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:ExtrusionToggle" oor:op="replace"> @@ -5292,7 +5304,7 @@ <value xml:lang="en-US">Media Pla~yer</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertAVMedia" oor:op="replace"> @@ -5316,7 +5328,7 @@ <value xml:lang="en-US">~Color</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertHardHyphen" oor:op="replace"> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu index e69558fc4ef5..1a3db34f6e6d 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/MathCommands.xcu @@ -164,7 +164,7 @@ <value xml:lang="en-US">Formula Cursor</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> </node> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index fa0611e07041..47e46136138a 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -38,12 +38,18 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Hidden Paragraphs</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ShowAnnotations" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Comments</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:InsertScript" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">S~cript...</value> @@ -115,13 +121,16 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Bibliography Entry...</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ShadowCursor" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Direct Cursor On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:StartAutoCorrect" oor:op="replace"> @@ -166,12 +175,18 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Record</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ShowTrackedChanges" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Show</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:GotoPage" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">To Page</value> @@ -460,7 +475,7 @@ <value xml:lang="en-US">Insert Fields</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertDateField" oor:op="replace"> @@ -539,9 +554,12 @@ </node> <node oor:name=".uno:OnlineAutoFormat" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> - <value xml:lang="en-US">~While Typing</value> + <value xml:lang="en-US">~While Typing</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:StatePageNumber" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Page Number</value> @@ -573,7 +591,7 @@ <value xml:lang="en-US">Double Underline </value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:AutoFormatRedlineApply" oor:op="replace"> @@ -866,7 +884,7 @@ <value xml:lang="en-US">Wrap Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:WrapOn" oor:op="replace"> @@ -1723,7 +1741,7 @@ <value xml:lang="en-US">Link Frames</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:AlignCharBottom" oor:op="replace"> @@ -1754,7 +1772,7 @@ <value xml:lang="en-US">Restart Numbering</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:JumpToHeader" oor:op="replace"> @@ -1875,7 +1893,10 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Allow Row to Break Across Pages and Columns</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:SelectText" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Select Paragraph</value> @@ -2024,7 +2045,10 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Font Color Fill</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:ViewBounds" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Te~xt Boundaries</value> @@ -2058,7 +2082,10 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Highlight Fill</value> </prop> - </node> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> + </node> <node oor:name=".uno:VRuler" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Vertical Ruler</value> @@ -2069,7 +2096,7 @@ <value xml:lang="en-US">~Hyphenation...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:VScroll" oor:op="replace"> @@ -2136,7 +2163,7 @@ <value xml:lang="en-US">Book Preview</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:RemoveDirectCharFormats" oor:op="replace"> @@ -2158,11 +2185,17 @@ <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Standard</value> </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> </node> <node oor:name=".uno:SelectionModeBlock" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">~Block Area</value> </prop> + <prop oor:name="Properties" oor:type="xs:int"> + <value>8</value> + </prop> </node> </node> <node oor:name="Popups"> diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs index 38ee3a2e4c4f..71efdab1b636 100644 --- a/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs @@ -52,6 +52,7 @@ Bit 0 = Command has an image. Bit 1 = Image must be mirrored (CTL/vertical text). Bit 2 = Image must be rotated (CTL/vertical text). + Bit 3 = Command supports a toggle state (Accessibility). </desc> </info> <value>0</value> -- cgit From d6ea16e6223cfa718364b47589b359bac2dea968 Mon Sep 17 00:00:00 2001 From: npower Developer <npower@openoffice.org> Date: Fri, 7 May 2010 10:54:26 +0100 Subject: ab75: #i110417# add andreas's improvements and additionally don't clear previous err object data --- basic/source/classes/errobject.cxx | 59 +++++++++++++++----------- basic/source/classes/sb.cxx | 43 +++++++------------ basic/source/inc/errobject.hxx | 9 ++++ basic/source/inc/runtime.hxx | 5 ++- basic/source/runtime/methods.cxx | 32 ++++++++++----- basic/source/runtime/props.cxx | 18 +++++--- basic/source/runtime/runtime.cxx | 84 ++++++++++++++++++++++++++++---------- basic/source/runtime/stdobj.cxx | 8 +--- 8 files changed, 161 insertions(+), 97 deletions(-) diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx index 406d6f9b1a0b..0ec0454e2bb5 100644 --- a/basic/source/classes/errobject.cxx +++ b/basic/source/classes/errobject.cxx @@ -43,10 +43,9 @@ class ErrObject : public ErrObjectImpl_BASE { rtl::OUString m_sHelpFile; rtl::OUString m_sSource; - rtl::OUString m_sDescription; + rtl::OUString m_sDescription; sal_Int32 m_nNumber; sal_Int32 m_nHelpContext; - bool mbIsInError; public: ErrObject(); @@ -68,6 +67,10 @@ public: virtual void SAL_CALL Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) throw (uno::RuntimeException); // XDefaultProperty virtual ::rtl::OUString SAL_CALL getDefaultPropertyName( ) throw (uno::RuntimeException); + + // Helper method + void setData( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, + const uno::Any& HelpFile, const uno::Any& HelpContext ) throw (uno::RuntimeException); }; @@ -75,7 +78,7 @@ ErrObject::~ErrObject() { } -ErrObject::ErrObject() : m_nNumber(0), m_nHelpContext(0), mbIsInError(false) +ErrObject::ErrObject() : m_nNumber(0), m_nHelpContext(0) { } @@ -88,9 +91,9 @@ ErrObject::getNumber() throw (uno::RuntimeException) void SAL_CALL ErrObject::setNumber( ::sal_Int32 _number ) throw (uno::RuntimeException) { -// m_nNumber = _number; - if ( !mbIsInError ) - Raise( uno::makeAny( _number ), uno::Any(), uno::Any(), uno::Any(), uno::Any() ); + pINST->setErrorVB( _number, String() ); + ::rtl::OUString _description = pINST->GetErrorMsg(); + setData( uno::makeAny( _number ), uno::Any(), uno::makeAny( _description ), uno::Any(), uno::Any() ); } ::sal_Int32 SAL_CALL @@ -154,23 +157,9 @@ ErrObject::Clear( ) throw (uno::RuntimeException) void SAL_CALL ErrObject::Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) throw (uno::RuntimeException) { - if ( !Number.hasValue() ) - throw uno::RuntimeException( rtl::OUString::createFromAscii("Missing Required Paramater"), uno::Reference< uno::XInterface >() ); - mbIsInError = true; - Clear(); - Description >>= m_sDescription; - Source >>= m_sSource; - HelpFile >>= m_sHelpFile; - HelpContext >>= m_nHelpContext; - Number >>= m_nNumber; + setData( Number, Source, Description, HelpFile, HelpContext ); if ( m_nNumber ) - { - SbError n = StarBASIC::GetSfxFromVBError( m_nNumber ); - if ( !n ) - n = m_nNumber; // force orig number, probably should have a specific table of vb ( localized ) errors - pINST->Error( n, m_sDescription ); - } - mbIsInError = false; + pINST->ErrorVB( m_nNumber, m_sDescription ); } // XDefaultProperty @@ -181,13 +170,30 @@ ErrObject::getDefaultPropertyName( ) throw (uno::RuntimeException) return sDfltPropName; } +void ErrObject::setData( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext ) + throw (uno::RuntimeException) +{ + if ( !Number.hasValue() ) + throw uno::RuntimeException( rtl::OUString::createFromAscii("Missing Required Paramater"), uno::Reference< uno::XInterface >() ); + Number >>= m_nNumber; + Description >>= m_sDescription; + Source >>= m_sSource; + HelpFile >>= m_sHelpFile; + HelpContext >>= m_nHelpContext; +} + // SbxErrObject -SbxErrObject::SbxErrObject( const String& rName, const Any& rUnoObj ): SbUnoObject( rName, rUnoObj ) +SbxErrObject::SbxErrObject( const String& rName, const Any& rUnoObj ) + : SbUnoObject( rName, rUnoObj ) + , m_pErrObject( NULL ) { OSL_TRACE("SbxErrObject::SbxErrObject ctor"); rUnoObj >>= m_xErr; if ( m_xErr.is() ) + { SetDfltProperty( uno::Reference< script::XDefaultProperty >( m_xErr, uno::UNO_QUERY_THROW )->getDefaultPropertyName() ) ; + m_pErrObject = static_cast< ErrObject* >( m_xErr.get() ); + } } SbxErrObject::~SbxErrObject() @@ -210,3 +216,10 @@ SbxErrObject::getErrObject() return pGlobErr; } +void SbxErrObject::setNumberAndDescription( ::sal_Int32 _number, const ::rtl::OUString& _description ) + throw (uno::RuntimeException) +{ + if( m_pErrObject != NULL ) + m_pErrObject->setData( uno::makeAny( _number ), uno::Any(), uno::makeAny( _description ), uno::Any(), uno::Any() ); +} + diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index b76453999212..946ecdd93d3c 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -1358,22 +1358,7 @@ BOOL StarBASIC::CError // Umsetzung des Codes fuer String-Transport in SFX-Error if( rMsg.Len() ) - { - // very confusing, even though MakeErrorText sets up the error text - // seems that this is not used ( if rMsg already has content ) - // In the case of VBA MakeErrorText also formats the error to be alittle more - // like vba ( adds an error number etc ) - if ( SbiRuntime::isVBAEnabled() && ( code == SbERR_BASIC_COMPAT ) ) - { - String aTmp = '\''; - aTmp += String::CreateFromInt32( SbxErrObject::getUnoErrObject()->getNumber() ); - aTmp += String( RTL_CONSTASCII_USTRINGPARAM("\'\n") ); - aTmp += GetSbData()->aErrMsg.Len() ? GetSbData()->aErrMsg : rMsg; - code = (ULONG)*new StringErrorInfo( code, aTmp ); - } - else code = (ULONG)*new StringErrorInfo( code, String(rMsg) ); - } SetErrorData( code, l, c1, c2 ); GetSbData()->bCompiler = TRUE; @@ -1403,22 +1388,22 @@ BOOL StarBASIC::RTError( SbError code, const String& rMsg, USHORT l, USHORT c1, // Umsetzung des Codes fuer String-Transport in SFX-Error if( rMsg.Len() ) + { + // very confusing, even though MakeErrorText sets up the error text + // seems that this is not used ( if rMsg already has content ) + // In the case of VBA MakeErrorText also formats the error to be alittle more + // like vba ( adds an error number etc ) + if ( SbiRuntime::isVBAEnabled() && ( code == SbERR_BASIC_COMPAT ) ) { - // very confusing, even though MakeErrorText sets up the error text - // seems that this is not used ( if rMsg already has content ) - // In the case of VBA MakeErrorText also formats the error to be alittle more - // like vba ( adds an error number etc ) - if ( SbiRuntime::isVBAEnabled() && ( code == SbERR_BASIC_COMPAT ) ) - { - String aTmp = '\''; - aTmp += String::CreateFromInt32( SbxErrObject::getUnoErrObject()->getNumber() ); - aTmp += String( RTL_CONSTASCII_USTRINGPARAM("\'\n") ); - aTmp += GetSbData()->aErrMsg.Len() ? GetSbData()->aErrMsg : rMsg; - code = (ULONG)*new StringErrorInfo( code, aTmp ); - } - else - code = (ULONG)*new StringErrorInfo( code, String(rMsg) ); + String aTmp = '\''; + aTmp += String::CreateFromInt32( SbxErrObject::getUnoErrObject()->getNumber() ); + aTmp += String( RTL_CONSTASCII_USTRINGPARAM("\'\n") ); + aTmp += GetSbData()->aErrMsg.Len() ? GetSbData()->aErrMsg : rMsg; + code = (ULONG)*new StringErrorInfo( code, aTmp ); } + else + code = (ULONG)*new StringErrorInfo( code, String(rMsg) ); + } SetErrorData( code, l, c1, c2 ); if( GetSbData()->aErrHdl.IsSet() ) diff --git a/basic/source/inc/errobject.hxx b/basic/source/inc/errobject.hxx index 7a50d2435eb3..39e6e319caae 100644 --- a/basic/source/inc/errobject.hxx +++ b/basic/source/inc/errobject.hxx @@ -33,11 +33,20 @@ class SbxErrObject : public SbUnoObject { + class ErrObject* m_pErrObject; com::sun::star::uno::Reference< ooo::vba::XErrObject > m_xErr; + SbxErrObject( const String& aName_, const com::sun::star::uno::Any& aUnoObj_ ); ~SbxErrObject(); + + class ErrObject* getImplErrObject( void ) + { return m_pErrObject; } + public: static SbxVariableRef getErrObject(); static com::sun::star::uno::Reference< ooo::vba::XErrObject > getUnoErrObject(); + + void setNumberAndDescription( ::sal_Int32 _number, const ::rtl::OUString& _description ) + throw (com::sun::star::uno::RuntimeException); }; #endif diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index 4a3f38c51027..1d4f5ec41093 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -219,6 +219,8 @@ public: void Error( SbError ); // trappable Error void Error( SbError, const String& rMsg ); // trappable Error mit Message + void ErrorVB( sal_Int32 nVBNumber, const String& rMsg ); + void setErrorVB( sal_Int32 nVBNumber, const String& rMsg ); void FatalError( SbError ); // non-trappable Error void FatalError( SbError, const String& ); // non-trappable Error void Abort(); // Abbruch mit aktuellem Fehlercode @@ -441,10 +443,11 @@ public: SbiRuntime( SbModule*, SbMethod*, UINT32 ); ~SbiRuntime(); - void Error( SbError ); // Fehler setzen, falls != 0 + void Error( SbError, bool bVBATranslationAlreadyDone = false ); // Fehler setzen, falls != 0 void Error( SbError, const String& ); // Fehler setzen, falls != 0 void FatalError( SbError ); // Fehlerbehandlung=Standard, Fehler setzen void FatalError( SbError, const String& ); // Fehlerbehandlung=Standard, Fehler setzen + static sal_Int32 translateErrorToVba( SbError nError, String& rMsg ); void DumpPCode(); BOOL Step(); // Einzelschritt (ein Opcode) void Stop() { bRun = FALSE; } diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 0a5a2b1736dd..4f7c70d688ef 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -271,17 +271,27 @@ RTLFUNC(Error) else nErr = StarBASIC::GetSfxFromVBError( (USHORT)nCode ); } - pBasic->MakeErrorText( nErr, aErrorMsg ); - String tmpErrMsg( pBasic->GetErrorText() ); - // If this rtlfunc 'Error' passed a errcode the same as the active Err Objects's - // current err then return the description for the error message if it is set - // ( complicated isn't it ? ) - if ( SbiRuntime::isVBAEnabled() && rPar.Count() > 1 ); - { - com::sun::star::uno::Reference< ooo::vba::XErrObject > xErrObj( SbxErrObject::getUnoErrObject() ); - if ( xErrObj.is() && xErrObj->getNumber() == nCode && xErrObj->getDescription().getLength() ) - tmpErrMsg = xErrObj->getDescription(); - } + + bool bVBA = SbiRuntime::isVBAEnabled(); + String tmpErrMsg; + if( bVBA && aErrorMsg.Len() > 0 ) + { + tmpErrMsg = aErrorMsg; + } + else + { + pBasic->MakeErrorText( nErr, aErrorMsg ); + tmpErrMsg = pBasic->GetErrorText(); + } + // If this rtlfunc 'Error' passed a errcode the same as the active Err Objects's + // current err then return the description for the error message if it is set + // ( complicated isn't it ? ) + if ( bVBA && rPar.Count() > 1 ) + { + com::sun::star::uno::Reference< ooo::vba::XErrObject > xErrObj( SbxErrObject::getUnoErrObject() ); + if ( xErrObj.is() && xErrObj->getNumber() == nCode && xErrObj->getDescription().getLength() ) + tmpErrMsg = xErrObj->getDescription(); + } rPar.Get( 0 )->PutString( tmpErrMsg ); } } diff --git a/basic/source/runtime/props.cxx b/basic/source/runtime/props.cxx index 9b4b35f551e2..cec74444e7a2 100644 --- a/basic/source/runtime/props.cxx +++ b/basic/source/runtime/props.cxx @@ -31,6 +31,7 @@ #include "runtime.hxx" #include "stdobj.hxx" #include "rtlproto.hxx" +#include "errobject.hxx" // Properties und Methoden legen beim Get (bWrite = FALSE) den Returnwert @@ -50,14 +51,21 @@ RTLFUNC(Err) (void)pBasic; (void)bWrite; - if( bWrite ) + if( SbiRuntime::isVBAEnabled() ) { - INT32 nVal = rPar.Get( 0 )->GetLong(); - if( nVal <= 65535L ) - StarBASIC::Error( StarBASIC::GetSfxFromVBError( (USHORT) nVal ) ); + rPar.Get( 0 )->PutObject( SbxErrObject::getErrObject() ); } else - rPar.Get( 0 )->PutLong( StarBASIC::GetVBErrorCode( StarBASIC::GetErrBasic() ) ); + { + if( bWrite ) + { + INT32 nVal = rPar.Get( 0 )->GetLong(); + if( nVal <= 65535L ) + StarBASIC::Error( StarBASIC::GetSfxFromVBError( (USHORT) nVal ) ); + } + else + rPar.Get( 0 )->PutLong( StarBASIC::GetVBErrorCode( StarBASIC::GetErrBasic() ) ); + } } RTLFUNC(False) diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 761955f6e877..295bfaa7f185 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -45,6 +45,8 @@ #include "sbunoobj.hxx" #include "errobject.hxx" +using namespace ::com::sun::star; + bool SbiRuntime::isVBAEnabled() { bool result = false; @@ -423,6 +425,35 @@ void SbiInstance::Error( SbError n, const String& rMsg ) } } +void SbiInstance::ErrorVB( sal_Int32 nVBNumber, const String& rMsg ) +{ + if( !bWatchMode ) + { + SbError n = StarBASIC::GetSfxFromVBError( static_cast< USHORT >( nVBNumber ) ); + if ( !n ) + n = nVBNumber; // force orig number, probably should have a specific table of vb ( localized ) errors + + aErrorMsg = rMsg; + SbiRuntime::translateErrorToVba( n, aErrorMsg ); + + bool bVBATranslationAlreadyDone = true; + pRun->Error( SbERR_BASIC_COMPAT, bVBATranslationAlreadyDone ); + } +} + +void SbiInstance::setErrorVB( sal_Int32 nVBNumber, const String& rMsg ) +{ + SbError n = StarBASIC::GetSfxFromVBError( static_cast< USHORT >( nVBNumber ) ); + if( !n ) + n = nVBNumber; // force orig number, probably should have a specific table of vb ( localized ) errors + + aErrorMsg = rMsg; + SbiRuntime::translateErrorToVba( n, aErrorMsg ); + + nErr = n; +} + + void SbiInstance::FatalError( SbError n ) { pRun->FatalError( n ); @@ -792,33 +823,20 @@ BOOL SbiRuntime::Step() return bRun; } -void SbiRuntime::Error( SbError n ) +void SbiRuntime::Error( SbError n, bool bVBATranslationAlreadyDone ) { if( n ) { nError = n; - if ( isVBAEnabled() ) + if( isVBAEnabled() && !bVBATranslationAlreadyDone ) { String aMsg = pInst->GetErrorMsg(); - // If a message is defined use that ( in preference to - // the defined one for the error ) NB #TODO - // if there is an error defined it more than likely - // is not the one you want ( some are the same though ) - // we really need a new vba compatible error list - if ( !aMsg.Len() ) - { - // is the error number vb or ( sb ) - SbError nTmp = StarBASIC::GetSfxFromVBError( n ); - if ( !nTmp ) - nTmp = n; - StarBASIC::MakeErrorText( nTmp, aMsg ); - aMsg = StarBASIC::GetErrorText(); - if ( !aMsg.Len() ) // no message for err no. - // need localized resource here - aMsg = String( RTL_CONSTASCII_USTRINGPARAM("Internal Object Error:") ); - } - // no num? most likely then it *is* really a vba err - SbxErrObject::getUnoErrObject()->setNumber( ( StarBASIC::GetVBErrorCode( n ) == 0 ) ? n : StarBASIC::GetVBErrorCode( n ) ); + sal_Int32 nVBAErrorNumber = translateErrorToVba( nError, aMsg ); + SbxVariable* pSbxErrObjVar = SbxErrObject::getErrObject(); + SbxErrObject* pGlobErr = static_cast< SbxErrObject* >( pSbxErrObjVar ); + if( pGlobErr != NULL ) + pGlobErr->setNumberAndDescription( nVBAErrorNumber, aMsg ); + pInst->aErrorMsg = aMsg; nError = SbERR_BASIC_COMPAT; } @@ -854,6 +872,30 @@ void SbiRuntime::FatalError( SbError _errCode, const String& _details ) Error( _errCode, _details ); } +sal_Int32 SbiRuntime::translateErrorToVba( SbError nError, String& rMsg ) +{ + // If a message is defined use that ( in preference to + // the defined one for the error ) NB #TODO + // if there is an error defined it more than likely + // is not the one you want ( some are the same though ) + // we really need a new vba compatible error list + if ( !rMsg.Len() ) + { + // TEST, has to be vb here always + SbError nTmp = StarBASIC::GetSfxFromVBError( nError ); + DBG_ASSERT( nTmp, "No VB error!" ); + + StarBASIC::MakeErrorText( nError, rMsg ); + rMsg = StarBASIC::GetErrorText(); + if ( !rMsg.Len() ) // no message for err no, need localized resource here + rMsg = String( RTL_CONSTASCII_USTRINGPARAM("Internal Object Error:") ); + } + // no num? most likely then it *is* really a vba err + USHORT nVBErrorCode = StarBASIC::GetVBErrorCode( nError ); + sal_Int32 nVBAErrorNumber = ( nVBErrorCode == 0 ) ? nError : nVBErrorCode; + return nVBAErrorNumber; +} + ////////////////////////////////////////////////////////////////////////// // // Parameter, Locals, Caller diff --git a/basic/source/runtime/stdobj.cxx b/basic/source/runtime/stdobj.cxx index fd4cacc646d5..13bc8810144a 100644 --- a/basic/source/runtime/stdobj.cxx +++ b/basic/source/runtime/stdobj.cxx @@ -33,7 +33,6 @@ #include <basic/sbstdobj.hxx> #include "rtlproto.hxx" #include "sbintern.hxx" -#include "errobject.hxx" // Das nArgs-Feld eines Tabelleneintrags ist wie folgt verschluesselt: // Zur Zeit wird davon ausgegangen, dass Properties keine Parameter @@ -231,7 +230,7 @@ static Methods aMethods[] = { { "EOF", SbxBOOL, 1 | _FUNCTION, RTLNAME(EOF),0 }, { "Channel", SbxINTEGER, 0,NULL,0 }, { "Erl", SbxLONG, _ROPROP, RTLNAME( Erl ),0 }, -{ "Err", SbxLONG, _RWPROP, RTLNAME( Err ),0 }, +{ "Err", SbxVARIANT, _RWPROP, RTLNAME( Err ),0 }, { "Error", SbxSTRING, 1 | _FUNCTION, RTLNAME( Error ),0 }, { "code", SbxLONG, 0,NULL,0 }, { "Exp", SbxDOUBLE, 1 | _FUNCTION, RTLNAME(Exp),0 }, @@ -653,11 +652,6 @@ SbiStdObject::~SbiStdObject() SbxVariable* SbiStdObject::Find( const String& rName, SbxClassType t ) { - // #TODO #FIXME hack for substituting ooo-basic Err with vba-ish - // ErrObject object - static String sErr( RTL_CONSTASCII_USTRINGPARAM("Err") ); - if ( SbiRuntime::isVBAEnabled() && rName.EqualsIgnoreCaseAscii( sErr ) ) - return SbxErrObject::getErrObject(); // Bereits eingetragen? SbxVariable* pVar = SbxObject::Find( rName, t ); if( !pVar ) -- cgit From c554ca32cb7f116516760546dcb80e5d8ba56352 Mon Sep 17 00:00:00 2001 From: Andreas Bregas <ab@openoffice.org> Date: Fri, 7 May 2010 15:39:09 +0200 Subject: ab75: #i111453# Open storage file for reading only --- basic/source/uno/scriptcont.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 096d497a4c50..620536304644 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -942,7 +942,7 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary try { xElementRootStorage = ::comphelper::OStorageHelper::GetStorageFromURL( aElementPath, - embed::ElementModes::READWRITE ); + embed::ElementModes::READ ); } catch( uno::Exception& ) { // TODO: error handling -- cgit From 13b8697f854e1f1dc5e8ab06eab04f90bf99d219 Mon Sep 17 00:00:00 2001 From: Carsten Driesner <cd@openoffice.org> Date: Mon, 10 May 2010 11:12:15 +0200 Subject: fwk142: #i104468# Ensure that focus is set to a floating window created by a toolbar controller --- framework/source/uielement/toolbarmanager.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 8171ff2e5419..9b0ffa9ce993 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -1552,7 +1552,11 @@ IMPL_LINK( ToolBarManager, DropdownClick, ToolBox*, EMPTYARG ) Reference< XToolbarController > xController( pIter->second, UNO_QUERY ); if ( xController.is() ) - xController->createPopupWindow(); + { + Reference< XWindow > xWin = xController->createPopupWindow(); + if ( xWin.is() ) + xWin->setFocus(); + } } return 1; } -- cgit From c593c31aa9865baef540da5732fb425dd32b9b03 Mon Sep 17 00:00:00 2001 From: sb <sb@openoffice.org> Date: Tue, 11 May 2010 09:29:37 +0200 Subject: sb122: #i111492# node-ref clone must not copy templateName_ --- configmgr/source/access.cxx | 2 +- configmgr/source/groupnode.cxx | 12 +++++++----- configmgr/source/groupnode.hxx | 4 ++-- configmgr/source/localizedpropertynode.cxx | 2 +- configmgr/source/localizedpropertynode.hxx | 2 +- configmgr/source/localizedvaluenode.cxx | 2 +- configmgr/source/localizedvaluenode.hxx | 2 +- configmgr/source/node.hxx | 2 +- configmgr/source/nodemap.cxx | 2 +- configmgr/source/propertynode.cxx | 2 +- configmgr/source/propertynode.hxx | 2 +- configmgr/source/setnode.cxx | 11 +++++++---- configmgr/source/setnode.hxx | 4 ++-- configmgr/source/xcsparser.cxx | 2 +- configmgr/source/xcuparser.cxx | 4 ++-- 15 files changed, 30 insertions(+), 25 deletions(-) diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx index 7af9c1f8d9c0..60f6a4a54e46 100644 --- a/configmgr/source/access.cxx +++ b/configmgr/source/access.cxx @@ -1917,7 +1917,7 @@ css::uno::Reference< css::uno::XInterface > Access::createInstance() tmplName), static_cast< cppu::OWeakObject * >(this)); } - rtl::Reference< Node > node(tmpl->clone()); + rtl::Reference< Node > node(tmpl->clone(true)); node->setLayer(Data::NO_LAYER); return static_cast< cppu::OWeakObject * >( new ChildAccess(components_, getRootAccess(), node)); diff --git a/configmgr/source/groupnode.cxx b/configmgr/source/groupnode.cxx index 60d825451d69..59c0f89df5d1 100644 --- a/configmgr/source/groupnode.cxx +++ b/configmgr/source/groupnode.cxx @@ -44,8 +44,8 @@ GroupNode::GroupNode( mandatory_(Data::NO_LAYER) {} -rtl::Reference< Node > GroupNode::clone() const { - return new GroupNode(*this); +rtl::Reference< Node > GroupNode::clone(bool keepTemplateName) const { + return new GroupNode(*this, keepTemplateName); } NodeMap & GroupNode::getMembers() { @@ -68,11 +68,13 @@ bool GroupNode::isExtensible() const { return extensible_; } -GroupNode::GroupNode(GroupNode const & other): - Node(other), extensible_(other.extensible_), - templateName_(other.templateName_), mandatory_(other.mandatory_) +GroupNode::GroupNode(GroupNode const & other, bool keepTemplateName): + Node(other), extensible_(other.extensible_), mandatory_(other.mandatory_) { cloneNodeMap(other.members_, &members_); + if (keepTemplateName) { + templateName_ = other.templateName_; + } } GroupNode::~GroupNode() {} diff --git a/configmgr/source/groupnode.hxx b/configmgr/source/groupnode.hxx index be4907b86ce3..9d7bbbafa5b3 100644 --- a/configmgr/source/groupnode.hxx +++ b/configmgr/source/groupnode.hxx @@ -42,7 +42,7 @@ class GroupNode: public Node { public: GroupNode(int layer, bool extensible, rtl::OUString const & templateName); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; virtual NodeMap & getMembers(); @@ -55,7 +55,7 @@ public: bool isExtensible() const; private: - GroupNode(GroupNode const & other); + GroupNode(GroupNode const & other, bool keepTemplateName); virtual ~GroupNode(); diff --git a/configmgr/source/localizedpropertynode.cxx b/configmgr/source/localizedpropertynode.cxx index 9c5fa3328a58..54560d7aded4 100644 --- a/configmgr/source/localizedpropertynode.cxx +++ b/configmgr/source/localizedpropertynode.cxx @@ -51,7 +51,7 @@ LocalizedPropertyNode::LocalizedPropertyNode( Node(layer), staticType_(staticType), nillable_(nillable) {} -rtl::Reference< Node > LocalizedPropertyNode::clone() const { +rtl::Reference< Node > LocalizedPropertyNode::clone(bool) const { return new LocalizedPropertyNode(*this); } diff --git a/configmgr/source/localizedpropertynode.hxx b/configmgr/source/localizedpropertynode.hxx index d5a16af0e54d..4ebcf8e243da 100644 --- a/configmgr/source/localizedpropertynode.hxx +++ b/configmgr/source/localizedpropertynode.hxx @@ -47,7 +47,7 @@ class LocalizedPropertyNode: public Node { public: LocalizedPropertyNode(int layer, Type staticType, bool nillable); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; virtual NodeMap & getMembers(); diff --git a/configmgr/source/localizedvaluenode.cxx b/configmgr/source/localizedvaluenode.cxx index f6246106c8fe..c0e3bc333187 100644 --- a/configmgr/source/localizedvaluenode.cxx +++ b/configmgr/source/localizedvaluenode.cxx @@ -48,7 +48,7 @@ LocalizedValueNode::LocalizedValueNode(int layer, css::uno::Any const & value): Node(layer), value_(value) {} -rtl::Reference< Node > LocalizedValueNode::clone() const { +rtl::Reference< Node > LocalizedValueNode::clone(bool) const { return new LocalizedValueNode(*this); } diff --git a/configmgr/source/localizedvaluenode.hxx b/configmgr/source/localizedvaluenode.hxx index 7f8a5dd987ce..bfcbdea1de51 100644 --- a/configmgr/source/localizedvaluenode.hxx +++ b/configmgr/source/localizedvaluenode.hxx @@ -43,7 +43,7 @@ class LocalizedValueNode: public Node { public: LocalizedValueNode(int layer, com::sun::star::uno::Any const & value); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; virtual rtl::OUString getTemplateName() const; diff --git a/configmgr/source/node.hxx b/configmgr/source/node.hxx index 10f168520595..7c9417e68ea9 100644 --- a/configmgr/source/node.hxx +++ b/configmgr/source/node.hxx @@ -46,7 +46,7 @@ public: virtual Kind kind() const = 0; - virtual rtl::Reference< Node > clone() const = 0; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const = 0; virtual NodeMap & getMembers(); diff --git a/configmgr/source/nodemap.cxx b/configmgr/source/nodemap.cxx index 6b22863b5672..8e4d06030bdf 100644 --- a/configmgr/source/nodemap.cxx +++ b/configmgr/source/nodemap.cxx @@ -42,7 +42,7 @@ void cloneNodeMap(NodeMap const & source, NodeMap * target) { OSL_ASSERT(target != 0 && target->empty()); NodeMap clone(source); for (NodeMap::iterator i(clone.begin()); i != clone.end(); ++i) { - i->second = i->second->clone(); + i->second = i->second->clone(true); } std::swap(clone, *target); } diff --git a/configmgr/source/propertynode.cxx b/configmgr/source/propertynode.cxx index 070b56d9be9a..f3e459998e7e 100644 --- a/configmgr/source/propertynode.cxx +++ b/configmgr/source/propertynode.cxx @@ -55,7 +55,7 @@ PropertyNode::PropertyNode( extension_(extension) {} -rtl::Reference< Node > PropertyNode::clone() const { +rtl::Reference< Node > PropertyNode::clone(bool) const { return new PropertyNode(*this); } diff --git a/configmgr/source/propertynode.hxx b/configmgr/source/propertynode.hxx index 1566cbf72dbe..506526ffcc1e 100644 --- a/configmgr/source/propertynode.hxx +++ b/configmgr/source/propertynode.hxx @@ -48,7 +48,7 @@ public: int layer, Type staticType, bool nillable, com::sun::star::uno::Any const & value, bool extension); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; Type getStaticType() const; diff --git a/configmgr/source/setnode.cxx b/configmgr/source/setnode.cxx index f19c36c0bba5..465345a5f856 100644 --- a/configmgr/source/setnode.cxx +++ b/configmgr/source/setnode.cxx @@ -69,8 +69,8 @@ SetNode::SetNode( templateName_(templateName), mandatory_(Data::NO_LAYER) {} -rtl::Reference< Node > SetNode::clone() const { - return new SetNode(*this); +rtl::Reference< Node > SetNode::clone(bool keepTemplateName) const { + return new SetNode(*this, keepTemplateName); } NodeMap & SetNode::getMembers() { @@ -105,12 +105,15 @@ bool SetNode::isValidTemplate(rtl::OUString const & templateName) const { additionalTemplateNames_.end()); } -SetNode::SetNode(SetNode const & other): +SetNode::SetNode(SetNode const & other, bool keepTemplateName): Node(other), defaultTemplateName_(other.defaultTemplateName_), additionalTemplateNames_(other.additionalTemplateNames_), - templateName_(other.templateName_), mandatory_(other.mandatory_) + mandatory_(other.mandatory_) { cloneNodeMap(other.members_, &members_); + if (keepTemplateName) { + templateName_ = other.templateName_; + } } SetNode::~SetNode() {} diff --git a/configmgr/source/setnode.hxx b/configmgr/source/setnode.hxx index 7bf1ab0a199e..94ce537adda1 100644 --- a/configmgr/source/setnode.hxx +++ b/configmgr/source/setnode.hxx @@ -46,7 +46,7 @@ public: int layer, rtl::OUString const & defaultTemplateName, rtl::OUString const & templateName); - virtual rtl::Reference< Node > clone() const; + virtual rtl::Reference< Node > clone(bool keepTemplateName) const; virtual NodeMap & getMembers(); @@ -63,7 +63,7 @@ public: bool isValidTemplate(rtl::OUString const & templateName) const; private: - SetNode(SetNode const & other); + SetNode(SetNode const & other, bool keepTemplateName); virtual ~SetNode(); diff --git a/configmgr/source/xcsparser.cxx b/configmgr/source/xcsparser.cxx index 8bda874cc5b3..79e122759fc8 100644 --- a/configmgr/source/xcsparser.cxx +++ b/configmgr/source/xcsparser.cxx @@ -456,7 +456,7 @@ void XcsParser::handleNodeRef(XmlReader & reader) { reader.getUrl()), css::uno::Reference< css::uno::XInterface >()); } - rtl::Reference< Node > node(tmpl->clone()); + rtl::Reference< Node > node(tmpl->clone(false)); node->setLayer(valueParser_.getLayer()); elements_.push(Element(node, name)); } diff --git a/configmgr/source/xcuparser.cxx b/configmgr/source/xcuparser.cxx index 77b0f747f313..f9f439c98916 100644 --- a/configmgr/source/xcuparser.cxx +++ b/configmgr/source/xcuparser.cxx @@ -1056,7 +1056,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) { if (state_.top().locked || finalizedLayer < valueParser_.getLayer()) { state_.push(State(true)); // ignored } else { - rtl::Reference< Node > member(tmpl->clone()); + rtl::Reference< Node > member(tmpl->clone(true)); member->setLayer(valueParser_.getLayer()); member->setFinalized(finalizedLayer); member->setMandatory(mandatoryLayer); @@ -1070,7 +1070,7 @@ void XcuParser::handleSetNode(XmlReader & reader, SetNode * set) { { state_.push(State(true)); // ignored } else { - rtl::Reference< Node > member(tmpl->clone()); + rtl::Reference< Node > member(tmpl->clone(true)); member->setLayer(valueParser_.getLayer()); member->setFinalized(finalizedLayer); member->setMandatory(mandatoryLayer); -- cgit From 3d877b87f36943b4e7c722f98638da2f144808ba Mon Sep 17 00:00:00 2001 From: Andreas Bregas <ab@openoffice.org> Date: Tue, 11 May 2010 11:10:53 +0200 Subject: ab75: #i110417# Fixed warning --- basic/source/runtime/runtime.cxx | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 basic/source/runtime/runtime.cxx diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx old mode 100644 new mode 100755 index 295bfaa7f185..9c591d4d4f7a --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -882,8 +882,10 @@ sal_Int32 SbiRuntime::translateErrorToVba( SbError nError, String& rMsg ) if ( !rMsg.Len() ) { // TEST, has to be vb here always +#ifdef DBG_UTIL SbError nTmp = StarBASIC::GetSfxFromVBError( nError ); DBG_ASSERT( nTmp, "No VB error!" ); +#endif StarBASIC::MakeErrorText( nError, rMsg ); rMsg = StarBASIC::GetErrorText(); -- cgit From 8c4bcfd63d6f473d67b4e2138676092aa313673d Mon Sep 17 00:00:00 2001 From: Andreas Bregas <ab@openoffice.org> Date: Tue, 18 May 2010 11:36:28 +0200 Subject: ab75: #110417# Added dependency to oovbaapi --- basic/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 basic/prj/build.lst diff --git a/basic/prj/build.lst b/basic/prj/build.lst old mode 100644 new mode 100755 index 994901580c86..2cd1d3dc0466 --- a/basic/prj/build.lst +++ b/basic/prj/build.lst @@ -1,4 +1,4 @@ -sb basic : l10n offuh svtools xmlscript framework NULL +sb basic : l10n offuh oovbaapi svtools xmlscript framework NULL sb basic usr1 - all sb_mkout NULL sb basic\inc nmake - all sb_inc NULL sb basic\source\app nmake - all sb_app sb_class sb_inc NULL -- cgit From b7f36130c2c77d32ae4eb00dd61ce462309efd85 Mon Sep 17 00:00:00 2001 From: Carsten Driesner <cd@openoffice.org> Date: Tue, 18 May 2010 14:19:05 +0200 Subject: fwk142: Toggle button flag added to several other commands --- .../org/openoffice/Office/UI/GenericCommands.xcu | 34 +++++++++++----------- .../org/openoffice/Office/UI/WriterCommands.xcu | 6 ++-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu index 46cda2e2facc..b2759e4f7dbf 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu @@ -1505,7 +1505,7 @@ <value xml:lang="en-US">Align Left</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:RightPara" oor:op="replace"> @@ -1513,7 +1513,7 @@ <value xml:lang="en-US">Align Right</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:CenterPara" oor:op="replace"> @@ -1521,7 +1521,7 @@ <value xml:lang="en-US">Centered</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>3</value> + <value>11</value> </prop> </node> <node oor:name=".uno:SendFax" oor:op="replace"> @@ -1537,7 +1537,7 @@ <value xml:lang="en-US">Justified</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:HelpChooseFile" oor:op="replace"> @@ -1550,7 +1550,7 @@ <value xml:lang="en-US">Line Spacing: 1</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:SpacePara15" oor:op="replace"> @@ -1558,7 +1558,7 @@ <value xml:lang="en-US">Line Spacing : 1.5</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:SpacePara2" oor:op="replace"> @@ -1566,7 +1566,7 @@ <value xml:lang="en-US">Line Spacing : 2</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:StatusGetPosition" oor:op="replace"> @@ -2071,7 +2071,7 @@ <value xml:lang="en-US">Bullets On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:FormatArea" oor:op="replace"> @@ -2150,7 +2150,7 @@ <value xml:lang="en-US">Numbering On/Off</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>7</value> + <value>15</value> </prop> </node> <node oor:name=".uno:BezierConvert" oor:op="replace"> @@ -2309,7 +2309,7 @@ <value xml:lang="en-US">Edit File</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:InsertImageControl" oor:op="replace"> @@ -3168,7 +3168,7 @@ <value xml:lang="en-US">~Hyperlink</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Merge" oor:op="replace"> @@ -3186,7 +3186,7 @@ <value xml:lang="en-US">Superscript</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Intersect" oor:op="replace"> @@ -3199,7 +3199,7 @@ <value xml:lang="en-US">Subscript</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:FontDialog" oor:op="replace"> @@ -3260,7 +3260,7 @@ <value xml:lang="en-US">Format Paintbrush</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:Repeat" oor:op="replace"> @@ -3417,7 +3417,7 @@ <value xml:lang="en-US">Na~vigator</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:RestoreEditingView" oor:op="replace"> @@ -4020,7 +4020,7 @@ <value xml:lang="en-US">~Data Sources</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:MenuBarVisible" oor:op="replace"> @@ -4240,7 +4240,7 @@ <value xml:lang="en-US">~Find & Replace...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:HelperDialog" oor:op="replace"> diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index 47e46136138a..4fa236666b6b 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -614,7 +614,7 @@ <value xml:lang="en-US">Superscript</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SubScript" oor:op="replace"> @@ -622,7 +622,7 @@ <value xml:lang="en-US">Subscript</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:CharLeftSel" oor:op="replace"> @@ -2124,7 +2124,7 @@ <value xml:lang="en-US">~Nonprinting Characters</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> - <value>1</value> + <value>9</value> </prop> </node> <node oor:name=".uno:SortDialog" oor:op="replace"> -- cgit From 9a46474f8c39a16a6a6980a45792b2b51a4a590e Mon Sep 17 00:00:00 2001 From: Andre Fischer <af@openoffice.org> Date: Tue, 18 May 2010 14:40:19 +0200 Subject: sdk321: #i111636# Look up style before falling back to default. --- svx/source/sdr/properties/attributeproperties.cxx | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 5abd9c4b26f1..0f3325a0027e 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -259,6 +259,8 @@ namespace sdr void AttributeProperties::MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel) { + OSL_ASSERT(pNewModel!=NULL); + if(pSrcPool && pDestPool && (pSrcPool != pDestPool)) { if(mpItemSet) @@ -291,8 +293,24 @@ namespace sdr } else { - // StyleSheet is NOT from the correct pool; use default - ImpAddStyleSheet(pNewModel->GetDefaultStyleSheet(), sal_True); + // StyleSheet is NOT from the correct pool. + // Look one up in the right pool with the same + // name or use the default. + + // Look up the style in the new document. + OSL_ASSERT(pNewModel->GetStyleSheetPool() != NULL); + SfxStyleSheet* pNewStyleSheet = dynamic_cast<SfxStyleSheet*>( + pNewModel->GetStyleSheetPool()->Find( + pStySheet->GetName(), + SFX_STYLE_FAMILY_ALL)); + if (pNewStyleSheet == NULL + || &pNewStyleSheet->GetPool().GetPool() != pDestPool) + { + // There is no copy of the style in the new + // document. Use the default as a fallback. + pNewStyleSheet = pNewModel->GetDefaultStyleSheet(); + } + ImpAddStyleSheet(pNewStyleSheet, sal_True); } } -- cgit From a571d1e991e400ed3ae5346a1bc2ef43ab23f215 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov <vg@openoffice.org> Date: Sat, 29 May 2010 10:59:27 +0200 Subject: #i100000# fix for Warning-Error on Windows-BuildBot --- basic/source/classes/sbxmod.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 83c0ae9e65f4..4b58942d77aa 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -1905,7 +1905,7 @@ void SbUserFormModule::InitObject() triggerInitializeEvent(); } } - catch( uno::Exception& e ) + catch( uno::Exception& ) { } -- cgit From f8e7afbac976ca862a801b9648fd95b2107757b2 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov <vg@openoffice.org> Date: Mon, 31 May 2010 15:03:42 +0200 Subject: #i111884# added new dependency --- basic/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic/prj/build.lst b/basic/prj/build.lst index 2cd1d3dc0466..9453154edf46 100755 --- a/basic/prj/build.lst +++ b/basic/prj/build.lst @@ -5,7 +5,7 @@ sb basic\source\app nmake - all sb_app sb_class sb_inc NULL sb basic\source\basmgr nmake - all sb_mgr sb_inc NULL sb basic\source\classes nmake - all sb_class sb_inc NULL sb basic\source\comp nmake - all sb_comp sb_inc NULL -sb basic\source\runtime nmake - all sb_rt sb_inc NULL +sb basic\source\runtime nmake - all sb_rt sb_inc sb_class NULL sb basic\source\sample nmake - all sb_samp sb_inc NULL sb basic\source\sbx nmake - all sb_sbx sb_inc NULL sb basic\source\uno nmake - all sb_uno sb_inc NULL -- cgit