You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ji...@apache.org on 2021/11/10 18:22:13 UTC
[openoffice] branch trunk updated (e9165bd -> f848a27)
This is an automated email from the ASF dual-hosted git repository.
jim pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git.
from e9165bd typo
new 398d7a3 Revert "Fixed typos, removed whitespace"
new f848a27 Revert "Using openssl 1.1.1"
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
main/external_deps.lst | 9 +-
main/openssl/makefile.mk | 5 +-
main/openssl/openssl.patch | 70 ++---
main/openssl/openssllnx.patch | 18 +-
main/openssl/opensslmacos.patch | 26 --
.../sd/source/ui/inc/taskpane/ControlContainer.hxx | 284 ++++++++++----------
main/sd/source/ui/inc/taskpane/ScrollPanel.hxx | 270 +++++++++----------
.../ui/inc/taskpane/SlideSorterCacheDisplay.hxx | 210 +++++++--------
main/sd/source/ui/inc/taskpane/SubToolPanel.hxx | 156 +++++------
.../ui/inc/taskpane/TaskPaneControlFactory.hxx | 50 ++--
.../sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx | 286 ++++++++++-----------
main/sd/source/ui/inc/taskpane/TitleBar.hxx | 230 ++++++++---------
main/sd/source/ui/inc/taskpane/TitledControl.hxx | 224 ++++++++--------
.../source/ui/inc/taskpane/ToolPanelViewShell.hxx | 174 ++++++-------
14 files changed, 992 insertions(+), 1020 deletions(-)
delete mode 100644 main/openssl/opensslmacos.patch
[openoffice] 02/02: Revert "Using openssl 1.1.1"
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jim pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit f848a2770f423f9cbb7b5e338d9c198099f1be74
Author: Jim Jagielski <ji...@gmail.com>
AuthorDate: Wed Nov 10 13:22:02 2021 -0500
Revert "Using openssl 1.1.1"
This reverts commit b86e16e6b6a3d6837f70d8d07088d00ba1238de2.
---
main/external_deps.lst | 9 +++---
main/openssl/makefile.mk | 5 ++-
main/openssl/openssl.patch | 70 ++++++++++++++++++++---------------------
main/openssl/openssllnx.patch | 18 +++++------
main/openssl/opensslmacos.patch | 26 ---------------
5 files changed, 50 insertions(+), 78 deletions(-)
diff --git a/main/external_deps.lst b/main/external_deps.lst
index d39f8d5..0886a4d 100644
--- a/main/external_deps.lst
+++ b/main/external_deps.lst
@@ -151,11 +151,10 @@ if (SOLAR_JAVA==TRUE)
URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
if (SYSTEM_OPENSSL!=YES && DISABLE_OPENSSL!=TRUE)
- MD5 = ac0d4387f3ba0ad741b0580dd45f6ff3
- name = openssl-1.1.1l.tar.gz
- URL1 = https://www.openssl.org/source/openssl-1.1.1l.tar.gz
- URL2 = https://www.openssl.org/source/old/1.1.1/$(name)
-# URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
+ MD5 = cdc2638f789ecc2db2c91488265686c1
+ name = openssl-1.0.2u.tar.gz
+ URL1 = https://www.openssl.org/source/old/1.0.2/$(name)
+ URL2 = $(OOO_EXTRAS)$(MD5)-$(name)
if ( true )
MD5 = 0759294408daace192c935b7c9e76e04
diff --git a/main/openssl/makefile.mk b/main/openssl/makefile.mk
index e195bdd..6d8afa2 100644
--- a/main/openssl/makefile.mk
+++ b/main/openssl/makefile.mk
@@ -42,10 +42,10 @@ TARGET=openssl
@echo "openssl disabled...."
.ENDIF
-OPENSSL_NAME=openssl-1.1.1l
+OPENSSL_NAME=openssl-1.0.2u
TARFILE_NAME=$(OPENSSL_NAME)
-TARFILE_MD5=ac0d4387f3ba0ad741b0580dd45f6ff3
+TARFILE_MD5=cdc2638f789ecc2db2c91488265686c1
CONFIGURE_DIR=.
CONFIGURE_ACTION=config
@@ -111,7 +111,6 @@ UNAME=$(shell uname)
.ENDIF
.IF "$(OS)" == "MACOSX"
- PATCH_FILES=opensslmacos.patch
CONFIGURE_ACTION=Configure darwin64-x86_64-cc no-dso no-shared $(NO_ASM)
.ENDIF
diff --git a/main/openssl/openssl.patch b/main/openssl/openssl.patch
index 26dcb45..fb48031 100644
--- a/main/openssl/openssl.patch
+++ b/main/openssl/openssl.patch
@@ -1,9 +1,9 @@
-diff -ur misc/openssl-1.1.1l/Configure misc/build/openssl-1.1.1l/Configure
---- misc/openssl-1.1.1l/Configure 2018-08-14 05:49:04.000000000 -0700
-+++ misc/build/openssl-1.1.1l/Configure 2018-08-26 14:51:25.397910000 -0700
+diff -ur misc/openssl-1.0.2u/Configure misc/build/openssl-1.0.2u/Configure
+--- misc/openssl-1.0.2u/Configure 2018-08-14 05:49:04.000000000 -0700
++++ misc/build/openssl-1.0.2u/Configure 2018-08-26 14:51:25.397910000 -0700
@@ -477,19 +477,20 @@
"android-mips","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${mips32_asm}:o32:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-
+
#### *BSD [do see comment about ${BSDthreads} above!]
-"BSD-generic32","gcc:-O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-"BSD-x86", "gcc:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_asm}:a.out:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
@@ -15,7 +15,7 @@ diff -ur misc/openssl-1.1.1l/Configure misc/build/openssl-1.1.1l/Configure
+"BSD-x86-elf", "$ENV{'FREEBSDCC'}:-DL_ENDIAN -O3 -fomit-frame-pointer -Wall $ENV{'CFLAGS'}::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIBVER)",
+"debug-BSD-x86-elf", "$ENV{'FREEBSDCC'}:-DL_ENDIAN -O3 -Wall -g $ENV{'CFLAGS'}::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIBVER)",
+"BSD-sparcv8", "$ENV{'FREEBSDCC'}:-DB_ENDIAN -O3 -mcpu=v8 -Wall $ENV{'CFLAGS'}::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${sparcv8_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIBVER)",
-
+
-"BSD-generic64","gcc:-O3 -Wall::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"BSD-generic64","$ENV{'FREEBSDCC'}:-O3 -Wall $ENV{'CFLAGS'}::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIBVER)",
# -DMD32_REG_T=int doesn't actually belong in sparc64 target, it
@@ -28,9 +28,9 @@ diff -ur misc/openssl-1.1.1l/Configure misc/build/openssl-1.1.1l/Configure
+"BSD-ia64", "$ENV{'FREEBSDCC'}:-DL_ENDIAN -O3 -Wall $ENV{'CFLAGS'}::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_INT:${ia64_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIBVER)",
+"BSD-x86_64", "$ENV{'FREEBSDCC'}:-DL_ENDIAN -O3 -Wall $ENV{'CFLAGS'}::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIBVER)",
+"BSD-alpha", "$ENV{'FREEBSDCC'}:-DL_ENDIAN -O -Wall $ENV{'CFLAGS'}::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_UNROLL DES_RISC1:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIBVER)",
-
+
"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-
+
@@ -592,9 +593,9 @@
"debug-VC-WIN64A","cl:-W3 -Gs0 -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DUNICODE -D_UNICODE -D_CRT_SECURE_NO_DEPRECATE:::WIN64A::SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:".eval{my $asm=$x86_64_asm;$asm=~s/x86_64-gcc\.o/bn_asm.o/;$asm}.":auto:win32",
# x86 Win32 target defaults to ANSI API, if you want UNICODE, complement
@@ -41,7 +41,7 @@ diff -ur misc/openssl-1.1.1l/Configure misc/build/openssl-1.1.1l/Configure
-"debug-VC-WIN32","cl:-W3 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
+"debug-VC-WIN32","cl:-W3 -W44129 -WX -Gs0 -GF -Gy -Zi -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS:::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${x86_asm}:win32n:win32",
"VC-CE","cl::::WINCE::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}:${no_asm}:win32",
-
+
# Borland C++ 4.5
@@ -2065,10 +2066,12 @@
if ( $perl =~ m@^/@) {
@@ -56,9 +56,9 @@ diff -ur misc/openssl-1.1.1l/Configure misc/build/openssl-1.1.1l/Configure
}
if ($depflags ne $default_depflags && !$make_depend) {
$warn_make_depend++;
-diff -ur misc/openssl-1.1.1l/config misc/build/openssl-1.1.1l/config
---- misc/openssl-1.1.1l/config 2018-08-14 05:48:56.000000000 -0700
-+++ misc/build/openssl-1.1.1l/config 2018-08-26 14:49:34.431584000 -0700
+diff -ur misc/openssl-1.0.2u/config misc/build/openssl-1.0.2u/config
+--- misc/openssl-1.0.2u/config 2018-08-14 05:48:56.000000000 -0700
++++ misc/build/openssl-1.0.2u/config 2018-08-26 14:49:34.431584000 -0700
@@ -762,14 +762,8 @@
sparc64-*-*bsd*) OUT="BSD-sparc64" ;;
ia64-*-*bsd*) OUT="BSD-ia64" ;;
@@ -71,16 +71,16 @@ diff -ur misc/openssl-1.1.1l/config misc/build/openssl-1.1.1l/config
- libc=`(ls /usr/lib/libc.so.* /lib/libc.so.* | tail -1) 2>/dev/null`
- fi
- case "`(file -L $libc) 2>/dev/null`" in
-+ *86*-*-*bsd*)
++ *86*-*-*bsd*)
+ case "`(file -L /bin/sh) 2>/dev/null`" in
*ELF*) OUT="BSD-x86-elf" ;;
*) OUT="BSD-x86"; options="$options no-sse2" ;;
esac ;;
-diff -ur misc/openssl-1.1.1l/ms/do_ms.bat misc/build/openssl-1.1.1l/ms/do_ms.bat
---- misc/openssl-1.1.1l/ms/do_ms.bat 2018-08-14 05:48:59.000000000 -0700
-+++ misc/build/openssl-1.1.1l/ms/do_ms.bat 2018-08-26 14:49:34.432106000 -0700
+diff -ur misc/openssl-1.0.2u/ms/do_ms.bat misc/build/openssl-1.0.2u/ms/do_ms.bat
+--- misc/openssl-1.0.2u/ms/do_ms.bat 2018-08-14 05:48:59.000000000 -0700
++++ misc/build/openssl-1.0.2u/ms/do_ms.bat 2018-08-26 14:49:34.432106000 -0700
@@ -1,11 +1,11 @@
-
+
-perl util\mkfiles.pl >MINFO
-perl util\mk1mf.pl no-asm VC-WIN32 >ms\nt.mak
-perl util\mk1mf.pl dll no-asm VC-WIN32 >ms\ntdll.mak
@@ -93,56 +93,56 @@ diff -ur misc/openssl-1.1.1l/ms/do_ms.bat misc/build/openssl-1.1.1l/ms/do_ms.bat
+%1 util\mk1mf.pl no-asm VC-CE >ms\ce.mak
+%1 util\mk1mf.pl dll no-asm VC-CE >ms\cedll.mak
:skipce
-
+
-perl util\mkdef.pl 32 libeay > ms\libeay32.def
-perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
+%1 util\mkdef.pl 32 libeay > ms\libeay32.def
+%1 util\mkdef.pl 32 ssleay > ms\ssleay32.def
-diff -ur misc/openssl-1.1.1l/ms/do_win64a.bat misc/build/openssl-1.1.1l/ms/do_win64a.bat
---- misc/openssl-1.1.1l/ms/do_win64a.bat 2018-08-14 05:48:59.000000000 -0700
-+++ misc/build/openssl-1.1.1l/ms/do_win64a.bat 2018-08-26 14:49:34.432647000 -0700
+diff -ur misc/openssl-1.0.2u/ms/do_win64a.bat misc/build/openssl-1.0.2u/ms/do_win64a.bat
+--- misc/openssl-1.0.2u/ms/do_win64a.bat 2018-08-14 05:48:59.000000000 -0700
++++ misc/build/openssl-1.0.2u/ms/do_win64a.bat 2018-08-26 14:49:34.432647000 -0700
@@ -1,19 +1,19 @@
-perl util\mkfiles.pl >MINFO
+%1 util\mkfiles.pl >MINFO
-
+
cmd /c "nasm -f win64 -v" >NUL 2>&1
if %errorlevel% neq 0 goto ml64
-
+
-perl ms\uplink-x86_64.pl nasm > ms\uptable.asm
+%1 ms\uplink-x86_64.pl nasm > ms\uptable.asm
nasm -f win64 -o ms\uptable.obj ms\uptable.asm
goto proceed
-
+
:ml64
-perl ms\uplink-x86_64.pl masm > ms\uptable.asm
+%1 ms/uplink-x86_64.pl masm > ms/uptable.asm
ml64 -c -Foms\uptable.obj ms\uptable.asm
-
+
:proceed
-perl util\mk1mf.pl VC-WIN64A >ms\nt.mak
-perl util\mk1mf.pl dll VC-WIN64A >ms\ntdll.mak
+%1 util\mk1mf.pl VC-WIN64A >ms\nt.mak
+%1 util\mk1mf.pl dll VC-WIN64A >ms\ntdll.mak
-
+
-perl util\mkdef.pl 32 libeay > ms\libeay32.def
-perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
+%1 util\mkdef.pl 32 libeay > ms\libeay32.def
+%1 util\mkdef.pl 32 ssleay > ms\ssleay32.def
-diff -ur misc/openssl-1.1.1l/util/mk1mf.pl misc/build/openssl-1.1.1l/util/mk1mf.pl
---- misc/openssl-1.1.1l/util/mk1mf.pl 2018-08-14 05:48:59.000000000 -0700
-+++ misc/build/openssl-1.1.1l/util/mk1mf.pl 2018-08-26 14:49:34.433421000 -0700
+diff -ur misc/openssl-1.0.2u/util/mk1mf.pl misc/build/openssl-1.0.2u/util/mk1mf.pl
+--- misc/openssl-1.0.2u/util/mk1mf.pl 2018-08-14 05:48:59.000000000 -0700
++++ misc/build/openssl-1.0.2u/util/mk1mf.pl 2018-08-26 14:49:34.433421000 -0700
@@ -163,7 +163,7 @@
$inc_def="outinc";
$tmp_def="tmp";
-
+
-$perl="perl" unless defined $perl;
+$perl="$ENV{PERL}" unless defined $perl;
$mkdir="-mkdir" unless defined $mkdir;
-
+
($ssl,$crypto)=("ssl","crypto");
@@ -346,6 +346,11 @@
s/\s*$//; # was chop, didn't work in mixture of perls for Windows...
-
+
($key,$val)=/^([^=]+)=(.*)/;
+
+ # On some Windows machines, $val has linefeeds at the end, which confuses
@@ -152,12 +152,12 @@ diff -ur misc/openssl-1.1.1l/util/mk1mf.pl misc/build/openssl-1.1.1l/util/mk1mf.
if ($key eq "RELATIVE_DIRECTORY")
{
if ($lib ne "")
-diff -ur misc/openssl-1.1.1l/util/pl/VC-32.pl misc/build/openssl-1.1.1l/util/pl/VC-32.pl
---- misc/openssl-1.1.1l/util/pl/VC-32.pl 2018-08-14 05:48:59.000000000 -0700
-+++ misc/build/openssl-1.1.1l/util/pl/VC-32.pl 2018-08-26 14:49:57.553776000 -0700
+diff -ur misc/openssl-1.0.2u/util/pl/VC-32.pl misc/build/openssl-1.0.2u/util/pl/VC-32.pl
+--- misc/openssl-1.0.2u/util/pl/VC-32.pl 2018-08-14 05:48:59.000000000 -0700
++++ misc/build/openssl-1.0.2u/util/pl/VC-32.pl 2018-08-26 14:49:57.553776000 -0700
@@ -30,7 +30,7 @@
my $ff = "";
-
+
# C compiler stuff
-$cc='cl';
+$cc=$ENV{'CC'};
diff --git a/main/openssl/openssllnx.patch b/main/openssl/openssllnx.patch
index 0779f7b..9a20d22 100644
--- a/main/openssl/openssllnx.patch
+++ b/main/openssl/openssllnx.patch
@@ -1,19 +1,19 @@
-diff -ur misc/openssl-1.1.1l/Configure misc/build/openssl-1.1.1l/Configure
---- misc/openssl-1.1.1l/Configure 2018-08-14 05:49:04.000000000 -0700
-+++ misc/build/openssl-1.1.1l/Configure 2018-08-26 13:35:54.485021000 -0700
+diff -ur misc/openssl-1.0.2u/Configure misc/build/openssl-1.0.2u/Configure
+--- misc/openssl-1.0.2u/Configure 2018-08-14 05:49:04.000000000 -0700
++++ misc/build/openssl-1.0.2u/Configure 2018-08-26 13:35:54.485021000 -0700
@@ -493,6 +493,9 @@
-
+
"bsdi-elf-gcc", "gcc:-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall::(unknown)::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
-
+
+"debian-kfreebsd-amd64","gcc:-m64 -DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -Wall -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK BF_PTR2 DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+"debian-kfreebsd-i386","gcc:-DL_ENDIAN -DTERMIOS -O3 -Wa,--noexecstack -g -march=i486 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
+
"nextstep", "cc:-O -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
"nextstep3.3", "cc:-O3 -Wall:<libc.h>:(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:::",
-
-diff -ur misc/openssl-1.1.1l/Makefile.org misc/build/openssl-1.1.1l/Makefile.org
---- misc/openssl-1.1.1l/Makefile.org 2018-08-14 05:48:56.000000000 -0700
-+++ misc/build/openssl-1.1.1l/Makefile.org 2018-08-26 13:35:54.485813000 -0700
+
+diff -ur misc/openssl-1.0.2u/Makefile.org misc/build/openssl-1.0.2u/Makefile.org
+--- misc/openssl-1.0.2u/Makefile.org 2018-08-14 05:48:56.000000000 -0700
++++ misc/build/openssl-1.0.2u/Makefile.org 2018-08-26 13:35:54.485813000 -0700
@@ -208,7 +208,7 @@
# same language for uniform treatment.
BUILDENV= LC_ALL=C PLATFORM='$(PLATFORM)' PROCESSOR='$(PROCESSOR)'\
diff --git a/main/openssl/opensslmacos.patch b/main/openssl/opensslmacos.patch
deleted file mode 100644
index e406243..0000000
--- a/main/openssl/opensslmacos.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-diff -u -r misc/openssl-1.1.1l/crypto/rand/rand_unix.c misc/build/openssl-1.1.1l/crypto/rand/rand_unix.c
---- misc/openssl-1.1.1l/crypto/rand/rand_unix.c 2021-08-24 09:38:47.000000000 -0400
-+++ misc/build/openssl-1.1.1l/crypto/rand/rand_unix.c 2021-11-09 11:17:48.000000000 -0500
-@@ -34,9 +34,6 @@
- #if defined(__OpenBSD__)
- # include <sys/param.h>
- #endif
--#if defined(__APPLE__)
--# include <CommonCrypto/CommonRandom.h>
--#endif
-
- #if defined(OPENSSL_SYS_UNIX) || defined(__DJGPP__)
- # include <sys/types.h>
-@@ -381,11 +378,6 @@
- if (errno != ENOSYS)
- return -1;
- }
--# elif defined(__APPLE__)
-- if (CCRandomGenerateBytes(buf, buflen) == kCCSuccess)
-- return (ssize_t)buflen;
--
-- return -1;
- # else
- union {
- void *p;
-Only in openssl-1.1.1l: pod2htmd.tmp
[openoffice] 01/02: Revert "Fixed typos, removed whitespace"
Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jim pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit 398d7a35d37593b314cbb4a4aba3abf39aff6e1f
Author: Jim Jagielski <ji...@gmail.com>
AuthorDate: Wed Nov 10 13:19:54 2021 -0500
Revert "Fixed typos, removed whitespace"
This reverts commit bdbe0d937ac38513c387a6a64cf77aa99045553f.
---
.../sd/source/ui/inc/taskpane/ControlContainer.hxx | 284 ++++++++++----------
main/sd/source/ui/inc/taskpane/ScrollPanel.hxx | 270 +++++++++----------
.../ui/inc/taskpane/SlideSorterCacheDisplay.hxx | 210 +++++++--------
main/sd/source/ui/inc/taskpane/SubToolPanel.hxx | 156 +++++------
.../ui/inc/taskpane/TaskPaneControlFactory.hxx | 50 ++--
.../sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx | 286 ++++++++++-----------
main/sd/source/ui/inc/taskpane/TitleBar.hxx | 230 ++++++++---------
main/sd/source/ui/inc/taskpane/TitledControl.hxx | 224 ++++++++--------
.../source/ui/inc/taskpane/ToolPanelViewShell.hxx | 174 ++++++-------
9 files changed, 942 insertions(+), 942 deletions(-)
diff --git a/main/sd/source/ui/inc/taskpane/ControlContainer.hxx b/main/sd/source/ui/inc/taskpane/ControlContainer.hxx
index c962d64..5403ade 100644
--- a/main/sd/source/ui/inc/taskpane/ControlContainer.hxx
+++ b/main/sd/source/ui/inc/taskpane/ControlContainer.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -35,157 +35,157 @@ namespace sd { namespace toolpanel {
class TreeNode;
-/** This container manages the children of a TreeNode. It handles the
- expansion and visibility state of its child controls. The container
- does not do the layouting or painting of the controls. Instead it asks
- its owner to do that.
+/** This container manages the children of a TreeNode. It handles the
+ expansion and visibility state of its child controls. The container
+ does not do the layouting or painting of the controls. Instead it asks
+ its owner to do that.
- The difference between expansion state and visibility is that when a
- control is collapsed at least a title bar is shown for it. When it is
- not visible then even this title bar is not shown. In that case the
- user can not expand the control. A control has to be visible in order
- to be expanded or collapsed.
+ The difference between expansion state and visibility is that when a
+ control is collapsed at least a title bar is shown for it. When it is
+ not visible then even this title bar is not shown. In that case the
+ user can not expand the control. A control has to be visible in order
+ to be expanded or collapsed.
- Whenever you expand or collapse, show or hide a child control then use
- this container class. Do not call the respective methods of the child
- directly.
+ Whenever you expand or collapse, show or hide a child control then use
+ this container class. Do not call the respective methods of the child
+ directly.
*/
class ControlContainer
{
public:
- enum VisibilityState { VS_SHOW, VS_HIDE, VS_TOGGLE };
- enum ExpansionState { ES_EXPAND, ES_COLLAPSE, ES_TOGGLE };
-
- /** Create a new control container.
- @param pParent
- This node is asked to re-calculate the size of its children when
- a child of this container is expanded or collapsed.
- */
- ControlContainer (TreeNode* pNode);
-
- virtual ~ControlContainer (void);
-
- /** This is function makes sure that all children are deleted. Call
- this function from the destructor of a sub class to have all child
- windows deleted before the destructor of another base class of that
- sub class is called. When that other base class is some kind of a
- window it would otherwise complain that there are living children.
- */
- void DeleteChildren (void);
-
- /** Add the given control to the set of controls managed by the
- container. This control is then expanded.
- @return
- Return the index under which the control has been inserted in
- the container. It is the same index that is returned by
- GetControlIndex().
- */
- sal_uInt32 AddControl (::std::auto_ptr<TreeNode> pControl);
-
- /** Expand (default) or collapse the specified control. When
- expanding a control in a single expansion environment then all
- other controls are collapsed. The specified control is being
- made the active control as returned by GetActiveControl().
- */
- virtual void SetExpansionState (
- sal_uInt32 nIndex,
- ExpansionState aState);
- virtual void SetExpansionState (
- TreeNode* pControl,
- ExpansionState aState);
- virtual void SetVisibilityState (
- sal_uInt32 nIndex,
- VisibilityState aState);
-
- /** Return the index of the given control.
- */
- sal_uInt32 GetControlIndex (TreeNode* pControl) const;
-
- /** Return the number of controls in the container.
- */
- sal_uInt32 GetControlCount (void) const;
-
- /** Return the number of visible controls in the container.
- */
- sal_uInt32 GetVisibleControlCount (void) const;
-
- /** Return the control with the specified index regardless of whether
- that control is hidden or visible.
- */
- TreeNode* GetControl (sal_uInt32 nIndex) const;
-
- /** Return the index of the control previous to that that is specified
- by the given index.
- @param nIndex
- Index of the control for which to return the index of the
- previous control. This index is guaranteed not to be returned.
- @param bIncludeHidden
- This flag tells the method whether to include the controls that
- are not visible in the search for the previous control. When it
- is <FALSE/> the hidden controls are skipped.
- @param bCycle
- When this flag is <TRUE/> then the search for the previous
- control wraps around when reaching the first control.
- @return
- Returns the index to the previous control or (sal_uInt32)-1 when
- there is no previous control. This would be the case when there
- is only one (visible) child.
- */
- sal_uInt32 GetPreviousIndex (
- sal_uInt32 nIndex,
- bool bIncludeHidden=false,
- bool bCycle=false) const;
-
- /** Return the index of the control next to that that is specified by
- the given index.
- @param nIndex
- Index of the control for which to return the index of the next
- control. This index is guaranteed not to be returned.
- @param bIncludeHidden
- This flag tells the method whether to include the controls that
- are not visible in the search for the next control. When it is
- <FALSE/> the hidden controls are skipped.
- @param bCycle
- When this flag is <TRUE/> then the search for the next control
- wraps around when reaching the last control.
- @return
- Returns the index to the next control or (sal_uInt32)-1 when
- there is no next control. This would be the case when there is
- only one (visible) child.
- */
- sal_uInt32 GetNextIndex (
- sal_uInt32 nIndex,
- bool bIncludeHidden=false,
- bool bCycle=false) const;
-
- void SetMultiSelection (bool bFlag);
-
- /** This is method is called when the list of controls has changed,
- i.e. a new control has been added. The default implementation is
- empty. Overwrite this method in derived classes in order to react to
- such changes.
- */
- virtual void ListHasChanged (void);
+ enum VisibilityState { VS_SHOW, VS_HIDE, VS_TOGGLE };
+ enum ExpansionState { ES_EXPAND, ES_COLLAPSE, ES_TOGGLE };
+
+ /** Create a new control container.
+ @param pParent
+ This node is asked to re-calculate the size of its children when
+ a child of this container is expanded or collapsed.
+ */
+ ControlContainer (TreeNode* pNode);
+
+ virtual ~ControlContainer (void);
+
+ /** This is function makes sure that all children are deleted. Call
+ this function from the destructor of a sub class to have all child
+ windows deleted before the destructor of another base class of that
+ sub class is called. When that other base class is some kind of a
+ window it would otherwise complain that there are living children.
+ */
+ void DeleteChildren (void);
+
+ /** Add the given control to the set of controls managed by the
+ container. This control is then expanded.
+ @return
+ Return the index under which the control has been inserted in
+ the container. It is the same index that is returned by
+ GetControlIndex().
+ */
+ sal_uInt32 AddControl (::std::auto_ptr<TreeNode> pControl);
+
+ /** Expand (default) or collapse the specified control. When
+ expanding a control in a single expansion environment then all
+ other controls are collapsed. The specified control is being
+ made the active control as returned by GetActiveControl().
+ */
+ virtual void SetExpansionState (
+ sal_uInt32 nIndex,
+ ExpansionState aState);
+ virtual void SetExpansionState (
+ TreeNode* pControl,
+ ExpansionState aState);
+ virtual void SetVisibilityState (
+ sal_uInt32 nIndex,
+ VisibilityState aState);
+
+ /** Return the index of the given control.
+ */
+ sal_uInt32 GetControlIndex (TreeNode* pControl) const;
+
+ /** Return the number of controls in the container.
+ */
+ sal_uInt32 GetControlCount (void) const;
+
+ /** Return the number of visible controls in the container.
+ */
+ sal_uInt32 GetVisibleControlCount (void) const;
+
+ /** Return the control with the specified index regardless of whether
+ that control is hidden or visible.
+ */
+ TreeNode* GetControl (sal_uInt32 nIndex) const;
+
+ /** Return the index of the control previous to that that is specified
+ by the given index.
+ @param nIndex
+ Index of the control for which to return the index of the
+ previous control. This index is guaranteed not to be returned.
+ @param bIncludeHidden
+ This flag tells the method whether to include the controls that
+ are not visible in the search for the previous control. When it
+ is <FALSE/> the hidden controls are skipped.
+ @param bCycle
+ When this flag is <TRUE/> then the search for the previous
+ control wraps around when reaching the first control.
+ @return
+ Returns the index to the previous control or (sal_uInt32)-1 when
+ there is no previous control. This would be the case when there
+ is only one (visible) child.
+ */
+ sal_uInt32 GetPreviousIndex (
+ sal_uInt32 nIndex,
+ bool bIncludeHidden=false,
+ bool bCycle=false) const;
+
+ /** Return the index of the control next to that that is specified by
+ the given index.
+ @param nIndex
+ Index of the control for which to return the index of the next
+ control. This index is guaranteed not to be returned.
+ @param bIncludeHidden
+ This flag tells the method whether to include the controls that
+ are not visible in the search for the next control. When it is
+ <FALSE/> the hidden controls are skipped.
+ @param bCycle
+ When this flag is <TRUE/> then the search for the next control
+ wraps around when reaching the last control.
+ @return
+ Returns the index to the next control or (sal_uInt32)-1 when
+ there is no next control. This would be the case when there is
+ only one (visible) child.
+ */
+ sal_uInt32 GetNextIndex (
+ sal_uInt32 nIndex,
+ bool bIncludeHidden=false,
+ bool bCycle=false) const;
+
+ void SetMultiSelection (bool bFlag);
+
+ /** This is method is called when the list of controls has changed,
+ i.e. a new control has been added. The default implementation is
+ empty. Overwrite this method in derived classes in order to react to
+ such changes.
+ */
+ virtual void ListHasChanged (void);
private:
osl::Mutex maMutex;
- /// List of controls managed by a container.
- typedef ::std::vector<TreeNode*> ControlList;
- ControlList maControlList;
+ /// List of controls managed by a container.
+ typedef ::std::vector<TreeNode*> ControlList;
+ ControlList maControlList;
- /** This parent is used for resize requests when children are expanded
- or collapsed.
- */
- TreeNode* mpNode;
+ /** This parent is used for resize requests when children are expanded
+ or collapsed.
+ */
+ TreeNode* mpNode;
- /** The index of the currently expanded control. A value of
- (sal_uInt32)-1 indicates that no control is active. This may be the
- case after adding controls to the container.
- */
- sal_uInt32 mnActiveControlIndex;
+ /** The index of the currently expanded control. A value of
+ (sal_uInt32)-1 indicates that no control is active. This may be the
+ case after adding controls to the container.
+ */
+ sal_uInt32 mnActiveControlIndex;
- bool mbMultiSelection;
+ bool mbMultiSelection;
};
} } // end of namespace ::sd::toolpanel
diff --git a/main/sd/source/ui/inc/taskpane/ScrollPanel.hxx b/main/sd/source/ui/inc/taskpane/ScrollPanel.hxx
index 00f1b35..60a3e7c 100644
--- a/main/sd/source/ui/inc/taskpane/ScrollPanel.hxx
+++ b/main/sd/source/ui/inc/taskpane/ScrollPanel.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -35,143 +35,143 @@ namespace sd { namespace toolpanel {
class TitledControl;
-/** The scroll panel shows its controls one above the other. When their
- total height is larger than the height of the scroll area then only a
- part of the controls is visible. Scroll bars control which part that
- is.
-
- The scroll panel registers itself as window event listener at the
- controls and their title bars (conceptually; it really is the
- TitledControl) to track changes of the selection and focus rectangles.
- On such a change it tries to move the selected or focused part into the
- visible area. At the moment this moving into view only works with
- valuesets and TitleBars.
+/** The scroll panel shows its controls one above the other. When their
+ total height is larger than the height of the scroll area then only a
+ part of the controls is visible. Scroll bars control which part that
+ is.
+
+ The scroll panel registers itself as window event listener at the
+ controls and their title bars (conceptually; it really is the
+ TitledControl) to track changes of the selection and focus rectangles.
+ On such a change it tries to move the selected or focused part into the
+ visible area. At the moment this moving into view only works with
+ valuesets and TitleBars.
*/
class ScrollPanel
- : public ::Control,
- public TreeNode
+ : public ::Control,
+ public TreeNode
{
public:
- /** Create a new scroll panel which itself is the root of a TreeNode hierarchy
- parent. This will usually be a child window.
- */
- ScrollPanel (::Window& i_rParentWindow);
- virtual ~ScrollPanel (void);
-
- /** Add a control to the sub panel. A title bar is added above the
- control.
- @param rTitle
- The title that will be shown in the two title bars that
- belong to the control.
- @param nHelpId
- The help id is set at the title bar not the actual control.
- @return
- The new titled control that contains the given control and a new
- title bar as children is returned.
- */
- TitledControl* AddControl (
- ::std::auto_ptr<TreeNode> pControl,
- const String& rTitle,
- const rtl::OString& sHelpId);
-
- /** Add a control to the sub panel without a title bar.
- */
- void AddControl (::std::auto_ptr<TreeNode> pControl);
-
- virtual void Paint (const Rectangle& rRect);
-
- /** Initiate a rearrangement of the controls and title bars.
- */
- virtual void Resize (void);
-
- virtual void RequestResize (void);
-
- virtual Size GetPreferredSize (void);
- virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight);
- virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
- virtual bool IsResizable (void);
- virtual ::Window* GetWindow (void);
- virtual sal_Int32 GetMinimumWidth (void);
-
- virtual void ExpandControl (
- TreeNode* pControl,
- bool bExpansionState);
-
- bool IsVerticalScrollBarVisible (void) const;
- bool IsHorizontalScrollBarVisible (void) const;
- ScrollBar& GetVerticalScrollBar (void);
- ScrollBar& GetHorizontalScrollBar (void);
-
- // ::Window
- virtual long Notify( NotifyEvent& rNEvt );
-
- virtual ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible> CreateAccessibleObject (
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible>& rxParent);
-
- /** Scroll the given rectangle into the visible area.
- @param aRectangle
- The box to move into the visible area in pixel coordinates
- relative to the given window.
- @param pWindow
- This window is used to translate the given coordinates into ones
- that are relative to the scroll panel.
-
- */
- void MakeRectangleVisible (
- Rectangle& aRectangle,
- ::Window* pWindow);
+ /** Create a new scroll panel which itself is the root of a TreeNode hierarchy
+ parent. This will usually be a child window.
+ */
+ ScrollPanel (::Window& i_rParentWindow);
+ virtual ~ScrollPanel (void);
+
+ /** Add a control to the sub panel. An title bar is added above the
+ control.
+ @param rTitle
+ The title that will be shown in the two title bars that
+ belong to the control.
+ @param nHelpId
+ The help id is set at the title bar not the actual control.
+ @return
+ The new titled control that contains the given control and a new
+ title bar as children is returned.
+ */
+ TitledControl* AddControl (
+ ::std::auto_ptr<TreeNode> pControl,
+ const String& rTitle,
+ const rtl::OString& sHelpId);
+
+ /** Add a control to the sub panel without a title bar.
+ */
+ void AddControl (::std::auto_ptr<TreeNode> pControl);
+
+ virtual void Paint (const Rectangle& rRect);
+
+ /** Initiate a rearrangement of the controls and title bars.
+ */
+ virtual void Resize (void);
+
+ virtual void RequestResize (void);
+
+ virtual Size GetPreferredSize (void);
+ virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight);
+ virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
+ virtual bool IsResizable (void);
+ virtual ::Window* GetWindow (void);
+ virtual sal_Int32 GetMinimumWidth (void);
+
+ virtual void ExpandControl (
+ TreeNode* pControl,
+ bool bExpansionState);
+
+ bool IsVerticalScrollBarVisible (void) const;
+ bool IsHorizontalScrollBarVisible (void) const;
+ ScrollBar& GetVerticalScrollBar (void);
+ ScrollBar& GetHorizontalScrollBar (void);
+
+ // ::Window
+ virtual long Notify( NotifyEvent& rNEvt );
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> CreateAccessibleObject (
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent);
+
+ /** Scroll the given rectangle into the visible area.
+ @param aRectangle
+ The box to move into the visible area in pixel coordinates
+ relative to the given window.
+ @param pWindow
+ This window is used to translate the given coordinates into ones
+ that are relative to the scroll panel.
+
+ */
+ void MakeRectangleVisible (
+ Rectangle& aRectangle,
+ ::Window* pWindow);
private:
- ::Control maScrollWindow;
- ScrollBar maVerticalScrollBar;
- ScrollBar maHorizontalScrollBar;
- ::Window maScrollBarFiller;
- ::Window maScrollWindowFiller;
- Point maScrollOffset;
- bool mbIsRearrangePending;
- bool mbIsLayoutPending;
- sal_uInt32 mnChildrenWidth;
- /// Border above top-most and below bottom-most control.
- const int mnVerticalBorder;
- /// Gap between two controls.
- const int mnVerticalGap;
- /// Border at the left and right of the controls.
- const int mnHorizontalBorder;
- /** List of horizontal stripes that is created from the gaps between
- children when they are layouted. The stripes are painted in Paint()
- to fill the space around the children.
- */
- typedef ::std::vector< ::std::pair<int,int> > StripeList;
- StripeList maStripeList;
-
- /** Calculate position, size, and visibility of the controls.
- Call this method after the list of controls, their expansion
- state, or the size of the sub panel has changed.
- */
- void Rearrange (void);
-
- /** Determine the minimal size that is necessary to show the controls
- one over the other. It may be smaller than the available area.
- */
- Size GetRequiredSize (void);
-
- /** Place the child windows one above the other and return the size of
- the bounding box.
- */
- sal_Int32 LayoutChildren (void);
-
- /** ctor-impl
- */
- void Construct();
-
- Size SetupScrollBars (const Size& rRequiresSize);
- sal_Int32 SetupVerticalScrollBar (bool bShow, sal_Int32 nRange);
- sal_Int32 SetupHorizontalScrollBar (bool bShow, sal_Int32 nRange);
-
- DECL_LINK(ScrollBarHandler, ScrollBar*);
- DECL_LINK(WindowEventListener, VclSimpleEvent*);
+ ::Control maScrollWindow;
+ ScrollBar maVerticalScrollBar;
+ ScrollBar maHorizontalScrollBar;
+ ::Window maScrollBarFiller;
+ ::Window maScrollWindowFiller;
+ Point maScrollOffset;
+ bool mbIsRearrangePending;
+ bool mbIsLayoutPending;
+ sal_uInt32 mnChildrenWidth;
+ /// Border above top-most and below bottom-most control.
+ const int mnVerticalBorder;
+ /// Gap between two controls.
+ const int mnVerticalGap;
+ /// Border at the left and right of the controls.
+ const int mnHorizontalBorder;
+ /** List of horizontal stripes that is created from the gaps between
+ children when they are layouted. The stripes are painted in Paint()
+ to fill the space around the children.
+ */
+ typedef ::std::vector< ::std::pair<int,int> > StripeList;
+ StripeList maStripeList;
+
+ /** Calculate position, size, and visibility of the controls.
+ Call this method after the list of controls, their expansion
+ state, or the size of the sub panel has changed.
+ */
+ void Rearrange (void);
+
+ /** Determine the minimal size that is necessary to show the controls
+ one over the other. It may be smaller than the available area.
+ */
+ Size GetRequiredSize (void);
+
+ /** Place the child windows one above the other and return the size of
+ the bounding box.
+ */
+ sal_Int32 LayoutChildren (void);
+
+ /** ctor-impl
+ */
+ void Construct();
+
+ Size SetupScrollBars (const Size& rRequiresSize);
+ sal_Int32 SetupVerticalScrollBar (bool bShow, sal_Int32 nRange);
+ sal_Int32 SetupHorizontalScrollBar (bool bShow, sal_Int32 nRange);
+
+ DECL_LINK(ScrollBarHandler, ScrollBar*);
+ DECL_LINK(WindowEventListener, VclSimpleEvent*);
using Window::GetWindow;
};
diff --git a/main/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx b/main/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx
index cf3c7b4..f178d8d 100644
--- a/main/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx
+++ b/main/sd/source/ui/inc/taskpane/SlideSorterCacheDisplay.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -25,10 +25,10 @@
#define SD_TASKPANE_SLIDE_SORTER_CACHE_DISPLAY_HXX
// Uncomment the define below to activate the slide sorter cache display in
-// the task pane. Visible slide previews are displayed as large rectangles,
-// off-screen previews as smaller rectangles. The color shows the state:
+// the task pane. Visible slide previews are displayed as large rectangles,
+// off-screen previews as smaller rectangles. The color shows the state:
// green for no action, different shades of yellow for a request being in
-// the queue, pink for currently being rendered. A diagonal line indicates
+// the queue, pink for currently being rendered. A diagonal line indicates
// that the preview is not up-to-date.
#ifdef DEBUG
//#define USE_SLIDE_SORTER_CACHE_DISPLAY
@@ -55,69 +55,69 @@ class TreeNode;
/** This panel demonstrates how to create a panel for the task pane.
*/
class SlideSorterCacheDisplay
- : public TreeNode
+ : public TreeNode
{
public:
- SlideSorterCacheDisplay (const SdDrawDocument* pDocument);
- virtual ~SlideSorterCacheDisplay (void);
-
- void SetParentWindow (::Window* pParentWindow);
-
- virtual void Paint (const Rectangle& rBoundingBox);
- virtual void Resize (void);
-
- static SlideSorterCacheDisplay* Instance (const SdDrawDocument* pDocument);
-
- void SetPageCount (sal_Int32 nPageCount);
- enum PageStatus {
- NONE,
- IN_QUEUE_PRIORITY_0,
- IN_QUEUE_PRIORITY_1,
- IN_QUEUE_PRIORITY_2,
- RENDERING
- };
- void SetPageStatus (sal_Int32 nPageIndex, PageStatus eStatus);
- void SetPageVisibility (sal_Int32 nPageIndex, bool bVisible);
- void SetUpToDate (sal_Int32 nPageIndex, bool bUpToDate);
-
- virtual Size GetPreferredSize (void);
- virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeigh);
- virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
- virtual ::Window* GetWindow (void);
- virtual bool IsResizable (void);
- virtual bool IsExpandable (void) const;
- virtual bool IsExpanded (void) const;
+ SlideSorterCacheDisplay (const SdDrawDocument* pDocument);
+ virtual ~SlideSorterCacheDisplay (void);
+
+ void SetParentWindow (::Window* pParentWindow);
+
+ virtual void Paint (const Rectangle& rBoundingBox);
+ virtual void Resize (void);
+
+ static SlideSorterCacheDisplay* Instance (const SdDrawDocument* pDocument);
+
+ void SetPageCount (sal_Int32 nPageCount);
+ enum PageStatus {
+ NONE,
+ IN_QUEUE_PRIORITY_0,
+ IN_QUEUE_PRIORITY_1,
+ IN_QUEUE_PRIORITY_2,
+ RENDERING
+ };
+ void SetPageStatus (sal_Int32 nPageIndex, PageStatus eStatus);
+ void SetPageVisibility (sal_Int32 nPageIndex, bool bVisible);
+ void SetUpToDate (sal_Int32 nPageIndex, bool bUpToDate);
+
+ virtual Size GetPreferredSize (void);
+ virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeigh);
+ virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
+ virtual ::Window* GetWindow (void);
+ virtual bool IsResizable (void);
+ virtual bool IsExpandable (void) const;
+ virtual bool IsExpanded (void) const;
private:
- static ::std::map<const SdDrawDocument*, SlideSorterCacheDisplay*> maDisplays;
- static void AddInstance (const SdDrawDocument* pDocument, SlideSorterCacheDisplay* pControl);
- static void RemoveInstance (SlideSorterCacheDisplay* pControl);
-
- ::Window* mpWindow;
- sal_Int32 mnPageCount;
- sal_Int32 mnColumnCount;
- sal_Int32 mnRowCount;
- Size maCellSize;
- sal_Int32 mnHorizontalBorder;
- sal_Int32 mnVerticalBorder;
- sal_Int32 mnHorizontalGap;
- sal_Int32 mnVerticalGap;
-
- class PageDescriptor
- {
- public:
- PageStatus meStatus;
- bool mbVisible;
- bool mbUpToDate;
- };
- typedef ::std::vector<PageDescriptor> PageDescriptorList;
- PageDescriptorList maPageDescriptors;
-
- Rectangle GetPageBox (sal_Int32 nPageIndex);
-
- void ProvideSize (sal_Int32 nPageIndex);
-
- void PaintPage (sal_Int32 nPageIndex);
+ static ::std::map<const SdDrawDocument*, SlideSorterCacheDisplay*> maDisplays;
+ static void AddInstance (const SdDrawDocument* pDocument, SlideSorterCacheDisplay* pControl);
+ static void RemoveInstance (SlideSorterCacheDisplay* pControl);
+
+ ::Window* mpWindow;
+ sal_Int32 mnPageCount;
+ sal_Int32 mnColumnCount;
+ sal_Int32 mnRowCount;
+ Size maCellSize;
+ sal_Int32 mnHorizontalBorder;
+ sal_Int32 mnVerticalBorder;
+ sal_Int32 mnHorizontalGap;
+ sal_Int32 mnVerticalGap;
+
+ class PageDescriptor
+ {
+ public:
+ PageStatus meStatus;
+ bool mbVisible;
+ bool mbUpToDate;
+ };
+ typedef ::std::vector<PageDescriptor> PageDescriptorList;
+ PageDescriptorList maPageDescriptors;
+
+ Rectangle GetPageBox (sal_Int32 nPageIndex);
+
+ void ProvideSize (sal_Int32 nPageIndex);
+
+ void PaintPage (sal_Int32 nPageIndex);
};
} } // end of namespace ::sd::toolpanel
@@ -125,72 +125,72 @@ private:
namespace {
void SscdSetStatus (const SdrPage* pPage,
- ::sd::toolpanel::SlideSorterCacheDisplay::PageStatus eStatus)
+ ::sd::toolpanel::SlideSorterCacheDisplay::PageStatus eStatus)
{
- ::sd::toolpanel::SlideSorterCacheDisplay* pDisplay
- = ::sd::toolpanel::SlideSorterCacheDisplay::Instance(
- dynamic_cast<SdDrawDocument*>(pPage->GetModel()));
- if (pDisplay != NULL)
- pDisplay->SetPageStatus((pPage->GetPageNum()-1)/2, eStatus);
+ ::sd::toolpanel::SlideSorterCacheDisplay* pDisplay
+ = ::sd::toolpanel::SlideSorterCacheDisplay::Instance(
+ dynamic_cast<SdDrawDocument*>(pPage->GetModel()));
+ if (pDisplay != NULL)
+ pDisplay->SetPageStatus((pPage->GetPageNum()-1)/2, eStatus);
}
void SscdSetRequestClass (const SdrPage* pPage, sal_Int32 nClass)
{
- sd::toolpanel::SlideSorterCacheDisplay::PageStatus eStatus;
- switch (nClass)
- {
- case 0:
- eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::IN_QUEUE_PRIORITY_0; break;
- case 1:
- eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::IN_QUEUE_PRIORITY_1; break;
- case 2:
- eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::IN_QUEUE_PRIORITY_2; break;
- default:
- eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::NONE; break;
- }
- SscdSetStatus(pPage,eStatus);
+ sd::toolpanel::SlideSorterCacheDisplay::PageStatus eStatus;
+ switch (nClass)
+ {
+ case 0:
+ eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::IN_QUEUE_PRIORITY_0; break;
+ case 1:
+ eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::IN_QUEUE_PRIORITY_1; break;
+ case 2:
+ eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::IN_QUEUE_PRIORITY_2; break;
+ default:
+ eStatus = ::sd::toolpanel::SlideSorterCacheDisplay::NONE; break;
+ }
+ SscdSetStatus(pPage,eStatus);
}
void SscdSetVisibility (const SdrModel* pModel, sal_Int32 nIndex, bool bVisible)
{
- ::sd::toolpanel::SlideSorterCacheDisplay* pDisplay
- = ::sd::toolpanel::SlideSorterCacheDisplay::Instance(
- dynamic_cast<const SdDrawDocument*>(pModel));
- if (pDisplay != NULL)
- pDisplay->SetPageVisibility(nIndex, bVisible);
+ ::sd::toolpanel::SlideSorterCacheDisplay* pDisplay
+ = ::sd::toolpanel::SlideSorterCacheDisplay::Instance(
+ dynamic_cast<const SdDrawDocument*>(pModel));
+ if (pDisplay != NULL)
+ pDisplay->SetPageVisibility(nIndex, bVisible);
}
void SscdSetUpToDate (const SdrPage* pPage, bool bUpToDate)
{
- ::sd::toolpanel::SlideSorterCacheDisplay* pDisplay
- = ::sd::toolpanel::SlideSorterCacheDisplay::Instance(
- dynamic_cast<const SdDrawDocument*>(pPage->GetModel()));
- if (pDisplay != NULL)
- pDisplay->SetUpToDate((pPage->GetPageNum()-1)/2, bUpToDate);
+ ::sd::toolpanel::SlideSorterCacheDisplay* pDisplay
+ = ::sd::toolpanel::SlideSorterCacheDisplay::Instance(
+ dynamic_cast<const SdDrawDocument*>(pPage->GetModel()));
+ if (pDisplay != NULL)
+ pDisplay->SetUpToDate((pPage->GetPageNum()-1)/2, bUpToDate);
}
-#define SSCD_SET_REQUEST_CLASS(Page,RequestClass) \
- SscdSetRequestClass(Page,RequestClass)
-#define SSCD_SET_STATUS(RequestData,Status) \
- SscdSetStatus(RequestData,::sd::toolpanel::SlideSorterCacheDisplay::Status)
+#define SSCD_SET_REQUEST_CLASS(Page,RequestClass) \
+ SscdSetRequestClass(Page,RequestClass)
+#define SSCD_SET_STATUS(RequestData,Status) \
+ SscdSetStatus(RequestData,::sd::toolpanel::SlideSorterCacheDisplay::Status)
#define SSCD_SET_VISIBILITY(Model,Index,Visible) \
- SscdSetVisibility(Model,Index,Visible)
+ SscdSetVisibility(Model,Index,Visible)
#define SSCD_SET_UPTODATE(Page,UpToDate) \
- SscdSetUpToDate(Page,UpToDate)
+ SscdSetUpToDate(Page,UpToDate)
}
#else
-#define SSCD_SET_REQUEST_CLASS(Page,RequestClass)
-#define SSCD_SET_STATUS(RequestData,Status)
-#define SSCD_SET_VISIBILITY(Model,Index,Visible)
-#define SSCD_SET_UPTODATE(Page,UpToDate)
+#define SSCD_SET_REQUEST_CLASS(Page,RequestClass)
+#define SSCD_SET_STATUS(RequestData,Status)
+#define SSCD_SET_VISIBILITY(Model,Index,Visible)
+#define SSCD_SET_UPTODATE(Page,UpToDate)
#endif
diff --git a/main/sd/source/ui/inc/taskpane/SubToolPanel.hxx b/main/sd/source/ui/inc/taskpane/SubToolPanel.hxx
index 3bd2ab4..e005f3b 100644
--- a/main/sd/source/ui/inc/taskpane/SubToolPanel.hxx
+++ b/main/sd/source/ui/inc/taskpane/SubToolPanel.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -36,93 +36,93 @@ class Window;
namespace sd { namespace toolpanel {
-/** The sub tool panel is in function similar to the tool panel. It
- differs in two points. First, it is a control that can be used
- as element in a tool panel and thus is actually a nested tool
- panel.
-
- <p>Secondly, it formats its elements differently. The actual controls
- are placed one below the other with a title bar above each control.
- Clicking on the title bar expands or collapses the control. When there
- is not enough space then scroll bars are shown.</p>
-
- <p>To avoid flickering when painting the sub tool panel the background
- is made transparent and painting it is done by this class. While
- layouting its children it remembers the gaps between children and stores
- them in maStripeList. In Paint() those gaps as well as the border
- around all children are painted in the background color.</p>
+/** The sub tool panel is in function similar to the tool panel. It
+ differes in two points. First, it is a control that can be used
+ as element in a tool panel and thus is actually a nested tool
+ panel.
+
+ <p>Secondly, it formats its elements differently. The actual controls
+ are placed one below the other with a title bar above each control.
+ Clicking on the title bar expands or collapses the control. When there
+ is not enough space then scroll bars are shown.</p>
+
+ <p>To avoid flickering when painting the sub tool panel the background
+ is made transparent and painting it is done by this class. While
+ layouting its children it remembers the gaps between children and stores
+ them in maStripeList. In Paint() those gaps as well as the border
+ around all children are painted in the background color.</p>
*/
class SubToolPanel
- : public Control,
- public TreeNode
+ : public Control,
+ public TreeNode
{
public:
- /** Create a new sub tool panel with the given window as its
- parent. This will usually be a child window.
- */
- SubToolPanel (Window& i_rParentWindow);
- virtual ~SubToolPanel (void);
+ /** Create a new sub tool panel with the given window as its
+ parent. This will usually be a child window.
+ */
+ SubToolPanel (Window& i_rParentWindow);
+ virtual ~SubToolPanel (void);
- virtual void Paint (const Rectangle& rRect);
+ virtual void Paint (const Rectangle& rRect);
- /** Initiate a rearrangement of the controls and title bars.
- */
- virtual void Resize (void);
+ /** Initiate a rearrangement of the controls and title bars.
+ */
+ virtual void Resize (void);
- virtual void RequestResize (void);
+ virtual void RequestResize (void);
- virtual Size GetPreferredSize (void);
- virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight);
- virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
- virtual bool IsResizable (void);
- virtual ::Window* GetWindow (void);
- virtual sal_Int32 GetMinimumWidth (void);
+ virtual Size GetPreferredSize (void);
+ virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight);
+ virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
+ virtual bool IsResizable (void);
+ virtual ::Window* GetWindow (void);
+ virtual sal_Int32 GetMinimumWidth (void);
- virtual void ExpandControl (
- TreeNode* pControl,
- bool bExpansionState);
+ virtual void ExpandControl (
+ TreeNode* pControl,
+ bool bExpansionState);
- virtual ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible> CreateAccessibleObject (
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible>& rxParent);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> CreateAccessibleObject (
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent);
using Window::GetWindow;
private:
- ::Window maWindowFiller;
- bool mbIsRearrangePending;
- bool mbIsLayoutPending;
- sal_uInt32 mnChildrenWidth;
- /// Border above top-most and below bottom-most control.
- const int mnVerticalBorder;
- /// Gap between two controls.
- const int mnVerticalGap;
- /// Border at the left and right of the controls.
- const int mnHorizontalBorder;
- /** List of horizontal stripes that is created from the gaps between
- children when they are layouted. The stripes are painted in Paint()
- to fill the space around the children.
- */
- typedef ::std::vector< ::std::pair<int,int> > StripeList;
- StripeList maStripeList;
-
- /** Calculate position, size, and visibility of the controls.
- Call this method after the list of controls, their expansion
- state, or the size of the sub panel has changed.
- */
- void Rearrange (void);
-
- /** Determine the minimal size that is necessary to show the controls
- one over the other. It may be smaller than the available area.
- */
- Size GetRequiredSize (void);
-
- /** Place the child windows one above the other and return the size of
- the bounding box.
- */
- sal_Int32 LayoutChildren (void);
-
- DECL_LINK(WindowEventListener, VclSimpleEvent*);
+ ::Window maWindowFiller;
+ bool mbIsRearrangePending;
+ bool mbIsLayoutPending;
+ sal_uInt32 mnChildrenWidth;
+ /// Border above top-most and below bottom-most control.
+ const int mnVerticalBorder;
+ /// Gap between two controls.
+ const int mnVerticalGap;
+ /// Border at the left and right of the controls.
+ const int mnHorizontalBorder;
+ /** List of horizontal stripes that is created from the gaps between
+ children when they are layouted. The stripes are painted in Paint()
+ to fill the space around the children.
+ */
+ typedef ::std::vector< ::std::pair<int,int> > StripeList;
+ StripeList maStripeList;
+
+ /** Calculate position, size, and visibility of the controls.
+ Call this method after the list of controls, their expansion
+ state, or the size of the sub panel has changed.
+ */
+ void Rearrange (void);
+
+ /** Determine the minimal size that is necessary to show the controls
+ one over the other. It may be smaller than the available area.
+ */
+ Size GetRequiredSize (void);
+
+ /** Place the child windows one above the other and return the size of
+ the bounding box.
+ */
+ sal_Int32 LayoutChildren (void);
+
+ DECL_LINK(WindowEventListener, VclSimpleEvent*);
};
} } // end of namespace ::sd::toolpanel
diff --git a/main/sd/source/ui/inc/taskpane/TaskPaneControlFactory.hxx b/main/sd/source/ui/inc/taskpane/TaskPaneControlFactory.hxx
index 625143c..be5c2d4 100644
--- a/main/sd/source/ui/inc/taskpane/TaskPaneControlFactory.hxx
+++ b/main/sd/source/ui/inc/taskpane/TaskPaneControlFactory.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -42,50 +42,50 @@ class TreeNode;
namespace sd { namespace toolpanel {
/** A simple factory base class defines the interface that is used by
- some of the control containers of the task pane to create controls on
- demand when they are about to be displayed for the first time.
+ some of the control containers of the task pane to create controls on
+ demand when they are about to be displayed for the first time.
- It provides the InternalCreateControl() method as hook that can be
- overloaded by derived classes to provide a new control.
+ It provides the InternalCreateControl() method as hook that can be
+ overloaded by derived classes to provide a new control.
*/
class ControlFactory
{
public:
- ControlFactory (void);
- virtual ~ControlFactory (void);
+ ControlFactory (void);
+ virtual ~ControlFactory (void);
- /** creates a tree node which acts as root of an own tree
+ /** creates a tree node which acts as root of an own tree
- Derived classes should overload InternalCreateControl.
- */
- ::std::auto_ptr<TreeNode> CreateControl( ::Window& i_rParent );
+ Derived classes should overload InternalCreateControl.
+ */
+ ::std::auto_ptr<TreeNode> CreateControl( ::Window& i_rParent );
protected:
- virtual TreeNode* InternalCreateControl( ::Window& i_rParent ) = 0;
+ virtual TreeNode* InternalCreateControl( ::Window& i_rParent ) = 0;
};
/** A simple helper class that realizes a ControlFactory that is able to create root controls, providing
- the to-be-created control with an additional parameter.
+ the to-be-created control with an additional parameter.
*/
template<class ControlType, class ArgumentType>
class RootControlFactoryWithArg
- : public ControlFactory
+ : public ControlFactory
{
public:
- RootControlFactoryWithArg (ArgumentType& rArgument)
- : mrArgument(rArgument)
- {}
+ RootControlFactoryWithArg (ArgumentType& rArgument)
+ : mrArgument(rArgument)
+ {}
protected:
- virtual TreeNode* InternalCreateControl( ::Window& i_rParent )
- {
- return new ControlType( i_rParent, mrArgument );
- }
+ virtual TreeNode* InternalCreateControl( ::Window& i_rParent )
+ {
+ return new ControlType( i_rParent, mrArgument );
+ }
private:
- ArgumentType& mrArgument;
+ ArgumentType& mrArgument;
};
diff --git a/main/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx b/main/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx
index 2965bd8..2f38799 100644
--- a/main/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx
+++ b/main/sd/source/ui/inc/taskpane/TaskPaneTreeNode.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -40,169 +40,169 @@ class ControlContainer;
class TaskPaneShellManager;
enum TreeNodeStateChangeEventId {
- EID_CHILD_ADDED,
- EID_ALL_CHILDREN_REMOVED,
- EID_EXPANSION_STATE_CHANGED,
- EID_FOCUSED_STATE_CHANGED,
- EID_SHOWING_STATE_CHANGED
+ EID_CHILD_ADDED,
+ EID_ALL_CHILDREN_REMOVED,
+ EID_EXPANSION_STATE_CHANGED,
+ EID_FOCUSED_STATE_CHANGED,
+ EID_SHOWING_STATE_CHANGED
};
/** Base class for all members of the object hierarchy that makes up the
- tool panel. In the task pane, there are multiple hierarchies of such nodes,
- with every panel having an own tree. The pane node is the root of the tree, below
- that there are SubToolPanels and Window/Control objects. At the
- lowest level there are only Window or Control objects.
+ tool panel. In the task pane, there are multiple hierarchies of such nodes,
+ with every panel having an own tree. The pane node is the root of the tree, below
+ that there are SubToolPanels and Window/Control objects. At the
+ lowest level there are only Window or Control objects.
- This class provides the means of communication between objects on
- different levels.
+ This class provides the means of communication between objects on
+ different levels.
*/
class TreeNode
- : public ILayoutableWindow,
- public ILayouter
+ : public ILayoutableWindow,
+ public ILayouter
{
public:
- TreeNode (TreeNode* pParent);
- virtual ~TreeNode (void);
-
- void SetParentNode (TreeNode* pNewParent);
- TreeNode* GetParentNode (void);
-
- /** Return the Window pointer of a tree node.
- */
- virtual ::Window* GetWindow (void);
-
- /** Return a const pointer to the window of a tree node.
- */
- virtual const ::Window* GetConstWindow (void) const;
-
- /** Return the joined minimum width of all children, i.e. the largest of
- the minimum widths.
- */
- virtual sal_Int32 GetMinimumWidth (void);
-
- /** The default implementaion always returns <FALSE/>
- */
- virtual bool IsResizable (void);
-
- /** Call this method whenever the size of one of the children of the
- called node has to be changed, e.g. when the layout menu shows more
- or less items than before. As a typical result the node will layout
- and resize its children according to their size requirements.
-
- Please remember that the size of the children can be changed in the
- first place because scroll bars can give a node the space it needs.
-
- The default implementation passes this call to its parent.
- */
- virtual void RequestResize (void);
-
- /** The default implementation shows the window (when it exists) when
- bExpansionState is <TRUE/>. It hides the window otherwise.
- @return
- Returns <TRUE/> when the expansion state changes. When an
- expansion state is requested that is already in place then
- <FALSE/> is returned.
- */
- virtual bool Expand (bool bExpansionState);
-
- /** The default implementation returns whether the window is showing.
- When there is no window then it returns <FALSE/>.
- */
- virtual bool IsExpanded (void) const;
-
- /** Return whether the node can be expanded or collapsed. The default
- implementation always returns <TRUE/> when there is window and
- <FALSE/> otherwise. If <FALSE/> is returned
- then Expand() may be called but it will not change the expansion
- state.
- */
- virtual bool IsExpandable (void) const;
-
- /** The default implementation calls GetWindow()->Show().
- */
- virtual void Show (bool bVisibilityState);
-
- /** The default implementation returns GetWindow()->IsVisible().
- */
- virtual bool IsShowing (void) const;
-
- ControlContainer& GetControlContainer (void);
-
- /** Give each node access to a shell manage. This usually is the shell
- manager of the ToolPanelViewShell.
-
- At least the root node has to overwrite this method since the
- default implementation simply returns the shell manager of its
- parent.
- */
- virtual TaskPaneShellManager* GetShellManager (void);
-
- /** You will rarely need to overload this method. To supply your own
- accessible object you should overload CreateAccessible() instead.
- */
- virtual ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible> GetAccessibleObject (void);
-
- /** Overload this method in order to supply a class specific accessible
- object.
- The default implementation will return a new instance of
- AccessibleTreeNode.
- @param rxParent
- The accessible parent of the accessible object to create. It is
- not necessarily the accessible object of the parent window of
- GetWindow().
-
- */
- virtual ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible> CreateAccessibleObject (
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible>&rxParent);
-
- /** Add a listener that will be informed in the future about state
- changes of the tree node. This includes adding and removing
- children as well as focus, visibility, and expansion state.
- Multiple calls are ignored. Each listener is added only once.
- */
- void AddStateChangeListener (const Link& rListener);
-
- /** Call the state change listeners and pass a state change event with
- the specified event id. The source field is set to this.
- @param pChild
- This optional parameter makes sense only with the
- EID_CHILD_ADDED event.
- */
- void FireStateChangeEvent (
- TreeNodeStateChangeEventId eEventId,
- TreeNode* pChild = NULL) const;
-
+ TreeNode (TreeNode* pParent);
+ virtual ~TreeNode (void);
+
+ void SetParentNode (TreeNode* pNewParent);
+ TreeNode* GetParentNode (void);
+
+ /** Return the Window pointer of a tree node.
+ */
+ virtual ::Window* GetWindow (void);
+
+ /** Return a const pointer to the window of a tree node.
+ */
+ virtual const ::Window* GetConstWindow (void) const;
+
+ /** Return the joined minimum width of all children, i.e. the largest of
+ the minimum widths.
+ */
+ virtual sal_Int32 GetMinimumWidth (void);
+
+ /** The default implementaion always returns <FALSE/>
+ */
+ virtual bool IsResizable (void);
+
+ /** Call this method whenever the size of one of the children of the
+ called node has to be changed, e.g. when the layout menu shows more
+ or less items than before. As a typical result the node will layout
+ and resize its children according to their size requirements.
+
+ Please remember that the size of the children can be changed in the
+ first place because scroll bars can give a node the space it needs.
+
+ The default implementation passes this call to its parent.
+ */
+ virtual void RequestResize (void);
+
+ /** The default implementation shows the window (when it exists) when
+ bExpansionState is <TRUE/>. It hides the window otherwise.
+ @return
+ Returns <TRUE/> when the expansion state changes. When an
+ expansion state is requested that is already in place then
+ <FALSE/> is returned.
+ */
+ virtual bool Expand (bool bExpansionState);
+
+ /** The default implementation returns whether the window is showing.
+ When there is no window then it returns <FALSE/>.
+ */
+ virtual bool IsExpanded (void) const;
+
+ /** Return whether the node can be expanded or collapsed. The default
+ implementation always returns <TRUE/> when there is window and
+ <FALSE/> otherwise. If <FALSE/> is returned
+ then Expand() may be called but it will not change the expansion
+ state.
+ */
+ virtual bool IsExpandable (void) const;
+
+ /** The default implementation calls GetWindow()->Show().
+ */
+ virtual void Show (bool bVisibilityState);
+
+ /** The default implementation returns GetWindow()->IsVisible().
+ */
+ virtual bool IsShowing (void) const;
+
+ ControlContainer& GetControlContainer (void);
+
+ /** Give each node access to a shell manage. This usually is the shell
+ manager of the ToolPanelViewShell.
+
+ At least the root node has to overwrite this method since the
+ default implementation simply returns the shell manager of its
+ parent.
+ */
+ virtual TaskPaneShellManager* GetShellManager (void);
+
+ /** You will rarely need to overload this method. To supply your own
+ accessible object you should overload CreateAccessible() instead.
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> GetAccessibleObject (void);
+
+ /** Overload this method in order to supply a class specific accessible
+ object.
+ The default implementation will return a new instance of
+ AccessibleTreeNode.
+ @param rxParent
+ The accessible parent of the accessible object to create. It is
+ not necessaryly the accessible object of the parent window of
+ GetWindow().
+
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible> CreateAccessibleObject (
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>&rxParent);
+
+ /** Add a listener that will be informated in the future about state
+ changes of the tree node. This includes adding and removing
+ children as well as focus, visibility, and expansion state.
+ Multiple calls are ignored. Each listener is added only once.
+ */
+ void AddStateChangeListener (const Link& rListener);
+
+ /** Call the state change listeners and pass a state change event with
+ the specified event id. The source field is set to this.
+ @param pChild
+ This optional parameter makes sense only with the
+ EID_CHILD_ADDED event.
+ */
+ void FireStateChangeEvent (
+ TreeNodeStateChangeEventId eEventId,
+ TreeNode* pChild = NULL) const;
+
protected:
- ::std::auto_ptr<ControlContainer> mpControlContainer;
+ ::std::auto_ptr<ControlContainer> mpControlContainer;
private:
- TreeNode* mpParent;
- typedef ::std::vector<Link> StateChangeListenerContainer;
- StateChangeListenerContainer maStateChangeListeners;
+ TreeNode* mpParent;
+ typedef ::std::vector<Link> StateChangeListenerContainer;
+ StateChangeListenerContainer maStateChangeListeners;
};
/** Objects of this class are sent to listeners to notify them about state
- changes of a tree node.
+ changes of a tree node.
*/
class TreeNodeStateChangeEvent
{
public:
- TreeNodeStateChangeEvent (
- const TreeNode& rNode,
- TreeNodeStateChangeEventId eEventId,
- TreeNode* pChild = NULL);
+ TreeNodeStateChangeEvent (
+ const TreeNode& rNode,
+ TreeNodeStateChangeEventId eEventId,
+ TreeNode* pChild = NULL);
- const TreeNode& mrSource;
- TreeNodeStateChangeEventId meEventId;
- TreeNode* mpChild;
+ const TreeNode& mrSource;
+ TreeNodeStateChangeEventId meEventId;
+ TreeNode* mpChild;
};
} } // end of namespace ::sd::toolpanel
diff --git a/main/sd/source/ui/inc/taskpane/TitleBar.hxx b/main/sd/source/ui/inc/taskpane/TitleBar.hxx
index dc7cc06..b046cc4 100644
--- a/main/sd/source/ui/inc/taskpane/TitleBar.hxx
+++ b/main/sd/source/ui/inc/taskpane/TitleBar.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -39,123 +39,123 @@ namespace sd { namespace toolpanel {
/** The title bar above a control in a sub tool panel.
- <p>The title bar shows two kinds of indicators: 1) Expansion is
- displayed by two sets of two bitmaps, a triangle pointing to the right
- resp. a minus in a square indicates that the control is collapsed, a
- triangle pointing down resp. a plus in a square stands for an expanded
- control. 2) Keyboard focus is indicated by a dotted rectangle.
+ <p>The title bar shows two kinds of indicators: 1) Expansion is
+ displayed by two sets of two bitmaps, a triangle pointing to the right
+ resp. a minus in a square indicates that the control is collapsed, a
+ triangle pointing down resp. a plus in a square stands for an expanded
+ control. 2) Keyboard focus is indicated by a dotted rectangle.
*/
class TitleBar
- : public ::Window,
- public TreeNode
+ : public ::Window,
+ public TreeNode
{
public:
- enum TitleBarType {
- TBT_SUB_CONTROL_HEADLINE
- };
-
- /** Create a new title bar whose content, the given title string,
- will be formatted according to the given type.
- */
- TitleBar (
- ::Window* pParent,
- const String& rsTitle,
- TitleBarType eType,
- bool bIsExpandable);
- virtual ~TitleBar (void);
-
- virtual Size GetPreferredSize (void);
- virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight);
- virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
- virtual bool IsResizable (void);
- virtual ::Window* GetWindow (void);
- virtual sal_Int32 GetMinimumWidth (void);
-
- virtual void Paint (const Rectangle& rBoundingBox);
- virtual bool Expand (bool bFlag = true);
- virtual bool IsExpanded (void) const;
- virtual void SetEnabledState(bool bFlag);
- virtual void GetFocus (void);
- virtual void LoseFocus (void);
-
- virtual void MouseMove(const MouseEvent& rEvent);
- /** Empty implementation prevents forwarding to docking window.
- */
- virtual void MouseButtonDown (const MouseEvent& rEvent);
- /** Empty implementation prevents forwarding to docking window.
- */
- virtual void MouseButtonUp (const MouseEvent& rEvent);
-
- virtual void DataChanged (const DataChangedEvent& rEvent);
-
- String GetTitle (void) const;
-
- ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible > CreateAccessibleObject (
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible>& rxParent);
+ enum TitleBarType {
+ TBT_SUB_CONTROL_HEADLINE
+ };
+
+ /** Create a new title bar whose content, the given title string,
+ will be formatted according to the given type.
+ */
+ TitleBar (
+ ::Window* pParent,
+ const String& rsTitle,
+ TitleBarType eType,
+ bool bIsExpandable);
+ virtual ~TitleBar (void);
+
+ virtual Size GetPreferredSize (void);
+ virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight);
+ virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
+ virtual bool IsResizable (void);
+ virtual ::Window* GetWindow (void);
+ virtual sal_Int32 GetMinimumWidth (void);
+
+ virtual void Paint (const Rectangle& rBoundingBox);
+ virtual bool Expand (bool bFlag = true);
+ virtual bool IsExpanded (void) const;
+ virtual void SetEnabledState(bool bFlag);
+ virtual void GetFocus (void);
+ virtual void LoseFocus (void);
+
+ virtual void MouseMove(const MouseEvent& rEvent);
+ /** Empty implementation prevents forwarding to docking window.
+ */
+ virtual void MouseButtonDown (const MouseEvent& rEvent);
+ /** Empty implementation prevents forwarding to docking window.
+ */
+ virtual void MouseButtonUp (const MouseEvent& rEvent);
+
+ virtual void DataChanged (const DataChangedEvent& rEvent);
+
+ String GetTitle (void) const;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > CreateAccessibleObject (
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent);
private:
- TitleBarType meType;
- String msTitle;
- bool mbExpanded;
- bool mbFocused;
- // Size of the bounding box that encloses the title string.
- ::std::auto_ptr<VirtualDevice> mpDevice;
- bool mbIsExpandable;
-
- /** Return whether this TitleBar object has an expansion indicator
- bitmap. It is safe to call GetExpansionIndicator() when this method
- returns <FALSE/> but unnecessary.
- */
- bool HasExpansionIndicator (void) const;
-
- /** Return the image of the expansion indicator.
- @return
- When there is no expansion indicator for this TitleBar object,
- then an empty Image is returned. You better call
- HasExpansionIndicator() to prevent this.
- */
- Image GetExpansionIndicator (void) const;
-
- /** Calculate the bounding box of the title text. This takes into
- account indentation due to an expansion indicator and the given
- available width. When the text can not be displayed on one line, it
- is broken into multiple lines.
- @param nAvailableWidth
- When 0 is given then the natural text width is used, i.e. the
- text is not broken into multiple lines.
- */
- Rectangle CalculateTextBoundingBox (
- int nAvailableWidth,
- bool bEmphasizeExpanded);
-
- /** Add some space to the given text box and return the bounding box of
- the title bar.
- */
- Rectangle CalculateTitleBarBox (
- const Rectangle& rTextBox,
- int nTitleBarWidth);
-
- void PaintSubPanelHeadLineBar (void);
-
- void PaintBackground (const Rectangle& rTextBox);
-
- /// Paint a focus indicator that encloses the given rectangle.
- void PaintFocusIndicator (const Rectangle& rIndicatorBox);
-
- Rectangle PaintExpansionIndicator (const Rectangle& rTextBox);
-
- void PaintText (const Rectangle& rTextBox);
-
- sal_uInt16 GetTextStyle (void);
-
- const static int snIndentationWidth;
-
- // Default constructor, copy constructor, and assignment are not supported.
- TitleBar (void);
- TitleBar (const TitleBar&);
- TitleBar& operator= (const TitleBar&);
+ TitleBarType meType;
+ String msTitle;
+ bool mbExpanded;
+ bool mbFocused;
+ // Size of the bounding box that encloses the title string.
+ ::std::auto_ptr<VirtualDevice> mpDevice;
+ bool mbIsExpandable;
+
+ /** Return whether this TitleBar object has an expansion indicator
+ bitmap. It is safe to call GetExpansionIndicator() when this method
+ returns <FALSE/> but unnecessary.
+ */
+ bool HasExpansionIndicator (void) const;
+
+ /** Return the image of the expansion indicator.
+ @return
+ When there is no expansion indictor for this TitleBar object,
+ then an empty Image is returned. You better call
+ HasExpansionIndicator() to prevent this.
+ */
+ Image GetExpansionIndicator (void) const;
+
+ /** Calculate the bounding box of the title text. This takes into
+ account indentation due to an expansion indicator and the given
+ available width. When the text can not be displayed on one line, it
+ is broken into multiple lines.
+ @param nAvailableWidth
+ When 0 is given then the natural text width is used, i.e. the
+ text is not broken into multiple lines.
+ */
+ Rectangle CalculateTextBoundingBox (
+ int nAvailableWidth,
+ bool bEmphasizeExpanded);
+
+ /** Add some space to the given text box and return the bounding box of
+ the title bar.
+ */
+ Rectangle CalculateTitleBarBox (
+ const Rectangle& rTextBox,
+ int nTitleBarWidth);
+
+ void PaintSubPanelHeadLineBar (void);
+
+ void PaintBackground (const Rectangle& rTextBox);
+
+ /// Paint a focus indicator that encloses the given rectangle.
+ void PaintFocusIndicator (const Rectangle& rIndicatorBox);
+
+ Rectangle PaintExpansionIndicator (const Rectangle& rTextBox);
+
+ void PaintText (const Rectangle& rTextBox);
+
+ sal_uInt16 GetTextStyle (void);
+
+ const static int snIndentationWidth;
+
+ // Default constructor, copy constructor, and assignment are not supported.
+ TitleBar (void);
+ TitleBar (const TitleBar&);
+ TitleBar& operator= (const TitleBar&);
using Window::GetWindow;
};
diff --git a/main/sd/source/ui/inc/taskpane/TitledControl.hxx b/main/sd/source/ui/inc/taskpane/TitledControl.hxx
index 41d161f..49a2340 100644
--- a/main/sd/source/ui/inc/taskpane/TitledControl.hxx
+++ b/main/sd/source/ui/inc/taskpane/TitledControl.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -42,134 +42,134 @@ namespace sd { namespace toolpanel {
class ControlContainer;
-/** This wrapper adds a title bar to a control. Both title bar and
- control are child windows.
+/** This wrapper adds a title bar to a control. Both title bar and
+ control are child windows.
*/
class TitledControl
- : public ::Window,
- public TreeNode
+ : public ::Window,
+ public TreeNode
{
public:
- typedef ::boost::function1<void, TitledControl&> ClickHandler;
-
- /** Create a new descriptor for the given control.
- @param pParent
- The parent window of the new descriptor.
- @param pControl
- The control that is shown when being in the expanded
- state.
- @param rTitle
- String that is shown as title in the title area above the
- control.
- @param rClickHandler
- The typical action of the click handler is to expand the control.
- @param eType
- Type of the title bar. This specifies how the title bar
- will be formatted. For more information see TitleBar.
-
- */
- TitledControl (
- TreeNode* pParent,
- ::std::auto_ptr<TreeNode> pControl,
- const String& rTitle,
- const ClickHandler& rClickHandler,
- TitleBar::TitleBarType eType);
-
- virtual ~TitledControl (void);
-
-
- virtual Size GetPreferredSize (void);
- virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight);
- virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
- virtual bool IsResizable (void);
- virtual ::Window* GetWindow (void);
-
- virtual void Resize (void);
- virtual void GetFocus (void);
- virtual void KeyInput (const KeyEvent& rEvent);
-
- // void Select (bool bExpansionState);
-
- TitleBar* GetTitleBar (void);
- /** Return the control child. When a control factory has been given and
- the control has not yet been created and the given flag is <TRUE/>
- then the control is created.
- */
- TreeNode* GetControl (void);
- const TreeNode* GetConstControl () const;
-
- const String& GetTitle (void) const;
-
- /** Expand the control without informing its container. This
- method usually is called by the container as a result of a
- higher level expand command. You may want to use
- ExpandViaContainer() instead.
- @param bExpanded
- When <TRUE/> then the control is expanded, otherwise it is
- collapsed.
- */
- virtual bool Expand (bool bExpanded = true);
-
- /** Return whether the control is currently expanded (<TRUE/>) or
- not (<FALSE/>).
- */
- virtual bool IsExpanded (void) const;
-
- /** Returns the value of the control.
- */
- virtual bool IsExpandable (void) const;
-
- virtual void SetEnabledState(bool bFlag);
-
- virtual bool IsShowing (void) const;
- virtual void Show (bool bVisible);
-
- virtual ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible > CreateAccessibleObject (
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible>& rxParent);
+ typedef ::boost::function1<void, TitledControl&> ClickHandler;
+
+ /** Create a new descriptor for the given control.
+ @param pParent
+ The parent window of the new descriptor.
+ @param pControl
+ The control that is shown when being in the expanded
+ state.
+ @param rTitle
+ String that is shown as title in the title area above the
+ control.
+ @param rClickHandler
+ The typical action of the click handler is to expand the control.
+ @param eType
+ Type of the title bar. This specifies how the title bar
+ will be formatted. For more information see TitleBar.
+
+ */
+ TitledControl (
+ TreeNode* pParent,
+ ::std::auto_ptr<TreeNode> pControl,
+ const String& rTitle,
+ const ClickHandler& rClickHandler,
+ TitleBar::TitleBarType eType);
+
+ virtual ~TitledControl (void);
+
+
+ virtual Size GetPreferredSize (void);
+ virtual sal_Int32 GetPreferredWidth (sal_Int32 nHeight);
+ virtual sal_Int32 GetPreferredHeight (sal_Int32 nWidth);
+ virtual bool IsResizable (void);
+ virtual ::Window* GetWindow (void);
+
+ virtual void Resize (void);
+ virtual void GetFocus (void);
+ virtual void KeyInput (const KeyEvent& rEvent);
+
+ // void Select (bool bExpansionState);
+
+ TitleBar* GetTitleBar (void);
+ /** Return the control child. When a control factory has been given and
+ the control has not yet been created and the given flag is <TRUE/>
+ then the control is created.
+ */
+ TreeNode* GetControl (void);
+ const TreeNode* GetConstControl () const;
+
+ const String& GetTitle (void) const;
+
+ /** Expand the control without informing its container. This
+ method usually is called by the container as a result of a
+ higher level expand command. You may want to use
+ ExpandViaContainer() instead.
+ @param bExpanded
+ When <TRUE/> then the control is expanded, otherwise it is
+ collapsed.
+ */
+ virtual bool Expand (bool bExpanded = true);
+
+ /** Return whether the control is currently expanded (<TRUE/>) or
+ not (<FALSE/>).
+ */
+ virtual bool IsExpanded (void) const;
+
+ /** Returns the value of the control.
+ */
+ virtual bool IsExpandable (void) const;
+
+ virtual void SetEnabledState(bool bFlag);
+
+ virtual bool IsShowing (void) const;
+ virtual void Show (bool bVisible);
+
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > CreateAccessibleObject (
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>& rxParent);
using Window::GetWindow;
using Window::Show;
private:
- String msTitle;
- bool mbVisible;
- void* mpUserData;
- ::std::auto_ptr<ClickHandler> mpClickHandler;
-
- /// Do not use! Assignment operator is not supported.
- const TitledControl& operator= (
- const TitledControl& aDescriptor);
-
- void UpdateStates (void);
-
- DECL_LINK(WindowEventListener, VclSimpleEvent*);
+ String msTitle;
+ bool mbVisible;
+ void* mpUserData;
+ ::std::auto_ptr<ClickHandler> mpClickHandler;
+
+ /// Do not use! Assignment operator is not supported.
+ const TitledControl& operator= (
+ const TitledControl& aDescriptor);
+
+ void UpdateStates (void);
+
+ DECL_LINK(WindowEventListener, VclSimpleEvent*);
};
/** This standard implementation of the ClickHandler expands, or toggles the
- expansion state, of the control, whose title was clicked.
+ expansion state, of the control, whose title was clicked.
*/
class TitledControlStandardClickHandler
{
public:
- /** Create a new instance of this class.
- @param rControlContainer
- The container of which the TitledControl is part of.
- @param eExpansionState
- This specifies whether to always expand the titled control or to
- toggle its expansion state.
- */
- TitledControlStandardClickHandler (
- ControlContainer& rControlContainer,
- ControlContainer::ExpansionState eExpansionState);
- void operator () (TitledControl& rTitledControl);
+ /** Create a new instance of this class.
+ @param rControlContainer
+ The container of which the TitledControl is part of.
+ @param eExpansionState
+ This specifies whether to always expand the titled control or to
+ toggle its expansion state.
+ */
+ TitledControlStandardClickHandler (
+ ControlContainer& rControlContainer,
+ ControlContainer::ExpansionState eExpansionState);
+ void operator () (TitledControl& rTitledControl);
private:
- ControlContainer& mrControlContainer;
- ControlContainer::ExpansionState meExpansionState;
+ ControlContainer& mrControlContainer;
+ ControlContainer::ExpansionState meExpansionState;
};
} } // end of namespace ::sd::toolpanel
diff --git a/main/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx b/main/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx
index 48bc29b..30e8caf 100644
--- a/main/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx
+++ b/main/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx
@@ -1,5 +1,5 @@
/**************************************************************
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,16 +7,16 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*************************************************************/
@@ -39,7 +39,7 @@
class PopupMenu;
namespace com { namespace sun { namespace star { namespace ui {
- class XUIElement;
+ class XUIElement;
} } } }
namespace sd {
@@ -52,37 +52,37 @@ class TitleBar;
class TitledControl;
class ToolPanelViewShell_Impl;
/** The tool panel is a view shell for some very specific reasons:
- - It fits better into the concept of panes being docking windows whose
- content, a view shell, can be exchanged on runtime.
- - A control in the tool panel that wants to show a context menu has to
- do that over the dispatcher of a shell. These shells, usually
- implemented by the controls themselves, have to be managed by someone.
- If interpreted as object bars this can be handled by the
- ObjectBarManager of the ViewShell.
+ - It fits better into the concept of panes being docking windows whose
+ content, a view shell, can be exchanged on runtime.
+ - A control in the tool panel that wants to show a context menu has to
+ do that over the dispatcher of a shell. These shells, usually
+ implemented by the controls themselves, have to be managed by someone.
+ If interpreted as object bars this can be handled by the
+ ObjectBarManager of the ViewShell.
*/
class ToolPanelViewShell
- : public ViewShell
+ : public ViewShell
{
public:
- TYPEINFO();
- SFX_DECL_INTERFACE(SD_IF_SDTOOLPANELSHELL)
-
- ToolPanelViewShell (
- SfxViewFrame* pFrame,
- ViewShellBase& rViewShellBase,
- ::Window* pParentWindow,
- FrameView* pFrameView);
- virtual ~ToolPanelViewShell (void);
-
- /** Register the SFX interfaces so that (some of) the controls can be
- pushed as SFX shells on the shell stack and process slot calls and
- so on.
- */
- static void RegisterControls (void);
-
- virtual void GetFocus (void);
- virtual void LoseFocus (void);
- virtual void KeyInput (const KeyEvent& rEvent);
+ TYPEINFO();
+ SFX_DECL_INTERFACE(SD_IF_SDTOOLPANELSHELL)
+
+ ToolPanelViewShell (
+ SfxViewFrame* pFrame,
+ ViewShellBase& rViewShellBase,
+ ::Window* pParentWindow,
+ FrameView* pFrameView);
+ virtual ~ToolPanelViewShell (void);
+
+ /** Register the SFX interfaces so that (some of) the controls can be
+ pushed as SFX shells on the shell stack and process slot calls and
+ so on.
+ */
+ static void RegisterControls (void);
+
+ virtual void GetFocus (void);
+ virtual void LoseFocus (void);
+ virtual void KeyInput (const KeyEvent& rEvent);
using sd::ViewShell::KeyInput;
virtual SdPage* GetActualPage (void);
@@ -90,71 +90,71 @@ public:
virtual void ArrangeGUIElements (void);
- TaskPaneShellManager& GetSubShellManager (void) const;
+ TaskPaneShellManager& GetSubShellManager (void) const;
- /** deactivates the given panel, bypassing the configuration controller. Only valid for tool panels which are
- not under the drawing framework's control.
- */
- void ActivatePanel( const ::rtl::OUString& i_rPanelResourceURL );
+ /** deactivates the given panel, bypassing the configuration controller. Only valid for tool panels which are
+ not under the drawing framework's control.
+ */
+ void ActivatePanel( const ::rtl::OUString& i_rPanelResourceURL );
- /** deactivates the given panel, bypassing the configuration controller
- */
- void DeactivatePanel( const ::rtl::OUString& i_rPanelResourceURL );
+ /** deactivates the given panel, bypassing the configuration controller
+ */
+ void DeactivatePanel( const ::rtl::OUString& i_rPanelResourceURL );
- /** Return a pointer to the docking window that is the parent or a
- predecessor of the content window.
- @return
- When the view shell is not placed in a docking window, e.g. when
- shown in the center pane, then <NULL?> is returned.
- */
- DockingWindow* GetDockingWindow (void);
+ /** Return a pointer to the docking window that is the parent or a
+ predecessor of the content window.
+ @return
+ When the view shell is not placed in a docking window, e.g. when
+ shown in the center pane, then <NULL?> is returned.
+ */
+ DockingWindow* GetDockingWindow (void);
- virtual ::com::sun::star::uno::Reference<
- ::com::sun::star::accessibility::XAccessible>
- CreateAccessibleDocumentView (::sd::Window* pWindow);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible>
+ CreateAccessibleDocumentView (::sd::Window* pWindow);
- virtual css::uno::Reference<css::drawing::XDrawSubController> CreateSubController (void);
+ virtual css::uno::Reference<css::drawing::XDrawSubController> CreateSubController (void);
- /** Relocate all toplevel controls to the given parent window.
- */
- virtual bool RelocateToParentWindow (::Window* pParentWindow);
+ /** Relocate all toplevel controls to the given parent window.
+ */
+ virtual bool RelocateToParentWindow (::Window* pParentWindow);
- /// returns <TRUE/> if and only if the given window is the panel anchor window of our ToolPanelDeck
- bool IsPanelAnchorWindow( const ::Window& i_rWindow ) const;
+ /// returns <TRUE/> if and only if the given window is the panel anchor window of our ToolPanelDeck
+ bool IsPanelAnchorWindow( const ::Window& i_rWindow ) const;
- /** creates an XUIElement for the given standard panel
- */
- ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >
- CreatePanelUIElement(
- const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rDocFrame,
- const ::rtl::OUString& i_rPanelResourceURL
- );
+ /** creates an XUIElement for the given standard panel
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement >
+ CreatePanelUIElement(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& i_rDocFrame,
+ const ::rtl::OUString& i_rPanelResourceURL
+ );
private:
- ::boost::scoped_ptr< ToolPanelViewShell_Impl > mpImpl;
-
- ::boost::shared_ptr<TaskPaneShellManager> mpSubShellManager;
-
- /** The id of the menu in the menu bar/tool box of the parent docking
- window.
- */
- sal_uInt16 mnMenuId;
-
- /** Create a popup menu. It contains two sections, one for
- docking or un-docking the tool panel, one for toggling the
- visibility state of the tool panel items.
- @param bIsDocking
- According to this flag one of the lock/unlock entries is
- made disabled.
- */
- ::std::auto_ptr<PopupMenu> CreatePopupMenu (bool bIsDocking);
-
-
- /** Initialize the task pane view shell if that has not yet been done
- before. If mbIsInitialized is already set to <TRUE/> then this
- method returns immediately.
- */
- void Initialize (void);
+ ::boost::scoped_ptr< ToolPanelViewShell_Impl > mpImpl;
+
+ ::boost::shared_ptr<TaskPaneShellManager> mpSubShellManager;
+
+ /** The id of the menu in the menu bar/tool box of the parent docking
+ window.
+ */
+ sal_uInt16 mnMenuId;
+
+ /** Create a popup menu. it contains two sections, one for
+ docking or un-docking the tool panel, one for toggling the
+ visibility state of the tool panel items.
+ @param bIsDocking
+ According to this flag one of the lock/unlock entries is
+ made disabled.
+ */
+ ::std::auto_ptr<PopupMenu> CreatePopupMenu (bool bIsDocking);
+
+
+ /** Initialize the task pane view shell if that has not yet been done
+ before. If mbIsInitialized is already set to <TRUE/> then this
+ method returns immediately.
+ */
+ void Initialize (void);
};