summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobody <nobody@gnome.org>2006-07-14 13:57:48 +0000
committernobody <nobody@gnome.org>2006-07-14 13:57:48 +0000
commit2890a54dc80f022ae67519d5812431ef19190437 (patch)
tree8a7c41bf5c9864b8585b96aa4c9ad061c467f4c3
parentea273976ee293dfaae4280843a2e646718c158e2 (diff)
This commit was manufactured by cvs2svn to create tagOOO_BUILD_2_0_3_0
'OOO_BUILD_2_0_3_0'.
-rw-r--r--NEWS22
-rw-r--r--distro-configs/Debian.conf.in1
-rw-r--r--distro-configs/SUSE-10.0.conf.in2
-rw-r--r--distro-configs/SUSE-9.2.conf.in1
-rw-r--r--distro-configs/SUSE-9.3.conf.in1
-rw-r--r--distro-configs/Ubuntu64.conf.in1
-rwxr-xr-xdownload.in1
-rw-r--r--patches/src680/apply51
-rw-r--r--patches/src680/std-mk-no-unowinreg-dll.diff14
-rw-r--r--patches/src680/vcl-gtk-key-menu.diff41
-rw-r--r--patches/vba/offapi-org-openoffice-vba-xapplication-idl.diff6
-rw-r--r--patches/vba/sc-source-ui-vba-vbaglobals-cxx.diff83
-rw-r--r--patches/vba/sc-source-ui-vba-vbarange-cxx.diff66
-rw-r--r--scratch/offapi-vba/XApplication.idl4
-rw-r--r--scratch/sc-vba/makefile.mk1
-rw-r--r--scratch/sc-vba/vbaapplication.hxx3
-rw-r--r--scratch/sc-vba/vbaglobals.cxx81
-rw-r--r--test/macro/TestAddress.xlsbin59392 -> 60928 bytes
18 files changed, 194 insertions, 185 deletions
diff --git a/NEWS b/NEWS
index df835c325..15d156f16 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,25 @@
+ooo-build-2.0.3.0
+
+ + features:
+ + target OOO_2_0_3
+ + speed up:
+ + buggy speed image stuff temporary disabled (Rene)
+ + bug fixes:
+ + allow to resize Cols/Rows even in read-only document (Jody)
+ + better support for CJK embolden, port from 2.0.2 (Rene)
+ + range should stay selected after un-toggle (Jan)
+ + problem with the key [Alt F] (Michael)
+ + add Row addressing to A1 style in Calc (Noel)
+ + more VBA fixes (Noel)
+ + build bits:
+ + some build and install fixes for scsolver (Kohei)
+ + build with gcc-4.1 on Sparc (Rene)
+ + more fixes for Win32 (Michael)
+ + build with gcc-3.3 (Rene)
+ + build with system agg-2.4 (Rene)
+ + updated Debian, Gentoo, Novell, Ubuntu bits (Rene, Andreas, Petr,
+ Matthias)
+
ooo-build-ooc680-m7
+ features:
diff --git a/distro-configs/Debian.conf.in b/distro-configs/Debian.conf.in
index 5edae2eaf..db7f24ea8 100644
--- a/distro-configs/Debian.conf.in
+++ b/distro-configs/Debian.conf.in
@@ -2,7 +2,6 @@
--enable-libsn
--disable-fontooo
--with-system-expat
---with-system-neon
--with-system-nas
--with-system-curl
--with-system-sane-header
diff --git a/distro-configs/SUSE-10.0.conf.in b/distro-configs/SUSE-10.0.conf.in
index e0e58c4d2..4593d9b49 100644
--- a/distro-configs/SUSE-10.0.conf.in
+++ b/distro-configs/SUSE-10.0.conf.in
@@ -3,6 +3,7 @@
--with-vendor=\"Novell, Inc.\"
--disable-access
+--disable-cairo
--disable-odk
--enable-gnome-vfs
--enable-libsn
@@ -11,7 +12,6 @@
--enable-quickstart
--with-ant-home=/usr
--with-jdk-home=$JAVA_HOME
---with-system-cairo
--with-system-curl
--with-system-expat
--with-system-neon
diff --git a/distro-configs/SUSE-9.2.conf.in b/distro-configs/SUSE-9.2.conf.in
index e3edb2e76..6ff59e40d 100644
--- a/distro-configs/SUSE-9.2.conf.in
+++ b/distro-configs/SUSE-9.2.conf.in
@@ -3,6 +3,7 @@
--with-vendor=\"Novell, Inc.\"
--disable-access
+--disable-cairo
--disable-odk
--enable-gnome-vfs
--enable-libsn
diff --git a/distro-configs/SUSE-9.3.conf.in b/distro-configs/SUSE-9.3.conf.in
index e3edb2e76..6ff59e40d 100644
--- a/distro-configs/SUSE-9.3.conf.in
+++ b/distro-configs/SUSE-9.3.conf.in
@@ -3,6 +3,7 @@
--with-vendor=\"Novell, Inc.\"
--disable-access
+--disable-cairo
--disable-odk
--enable-gnome-vfs
--enable-libsn
diff --git a/distro-configs/Ubuntu64.conf.in b/distro-configs/Ubuntu64.conf.in
index 09702fff3..07d875784 100644
--- a/distro-configs/Ubuntu64.conf.in
+++ b/distro-configs/Ubuntu64.conf.in
@@ -6,7 +6,6 @@
--disable-fontooo
--with-system-expat
--with-system-odbc-headers
---with-system-neon
--with-system-nas
--with-system-curl
--with-system-sane-header
diff --git a/download.in b/download.in
index 5c4e1148c..b7d09635b 100755
--- a/download.in
+++ b/download.in
@@ -26,6 +26,7 @@ sub usage {
'ooc680-m.*' => '@MIRROR@/OOC680',
'ooo680-m.*' => '@MIRROR@/OOO680',
'OOO_2_0_2.*' => '@MIRROR@/OOB680',
+ 'OOO_2_0_3.*' => '@MIRROR@/OOC680',
'images_gnome-.*' => '@MIRROR@/SRC680',
'images_kde-.*' => '@MIRROR@/SRC680',
'extras-.*' => '@MIRROR@/SRC680',
diff --git a/patches/src680/apply b/patches/src680/apply
index d94b8f533..e33b8fbf8 100644
--- a/patches/src680/apply
+++ b/patches/src680/apply
@@ -6,7 +6,7 @@
PATCHPATH=.:../evo2:../vba:../mono:../64bit:../cairo:../scsolver
-OLDEST_SUPPORTED=ooc680-m5
+OLDEST_SUPPORTED=OOO_2_0_3
# -------- Functional sub-sets --------
@@ -15,7 +15,7 @@ Common : BuildBits, ParallelMake, TemporaryHacks, FixesNotForUpstream, \
Icons, Branding, VBABits, VBAObjects, CalcFixes, Leaks, Egg
LinuxCommon : Common, BuildBitsLinuxOnly, LinuxOnly, SystemBits, CWSBackports, GCJ, \
QPro, Lwp, cairocanvas, msaccess, KDE, \
- 64bitPatches, FPickers, Mono, AddressBooks, QuickStarter, SpeedImageList
+ 64bitPatches, FPickers, Mono, AddressBooks, QuickStarter
Win32Common : Common, Win32Only, NotDebian
64bit : GCJExperimental, SystemJavaBits
# Binfilter patches: a special distro; applied only when building with binfilter
@@ -35,7 +35,7 @@ SUSE-PPC : NovellBase, BerkeleyDB43, GCJExperimental, SystemJavaBits, SystemJav
SUSE-64 : NovellBase, BerkeleyDB43, 64bit, SystemJavaBitsWorkaround
# Debian
DebianBase : LinuxCommon, DebianBaseOnly, GCJExperimental, SystemJavaBits, Lockdown, STLport5
-Debian : DebianBase, DebianOnly, DebianSidOnly, CalcSolver, Debian32Only
+Debian : DebianBase, DebianOnly, DebianSidOnly, CalcSolver, Debian32Only, SparcOnly
DebianSarge : DebianBase, DebianOnly, DebianSargeOnly, CalcSolver, Debian32Only
Debian64 : DebianBase, DebianOnly, DebianSidOnly, 64bit
# Ubuntu
@@ -138,6 +138,10 @@ plus-minus-sw-navigator.diff
# add SPARC platform to automation
automation-sparc-platform.diff, i#66140, rengelha
+[ SparcOnly ]
+# fix sparc/gcc-4.1 build
+sparc-bridges-gcc-4.1.diff, i#58201
+
[ GCJ ]
# work around missing symbol in libgcj...
@@ -169,17 +173,14 @@ sal-oustring-debug.diff, i#65920, jholesov
community-splash.diff
-[ Fixes < src680-m171 ]
+[ Fixes ]
# fix build.pl
cws-vgbugs03.diff
-[ Fixes < src680-m172 ]
# removes obsolete gengal.rdb and cleans up gengal.sh
gengal-cleanup.diff, i#65361, pmladek
-[ Fixes ]
-
# fix reading of freed memory in slidesorter, due to weird reentrancy, n#186621
sd-sls-process-request-crash-fix.diff
@@ -200,6 +201,9 @@ svx-shapes-default-word-wrap-enable.diff
vcl-gnome-screensaver-poke.diff
config_office-dbus-check.diff
+# fix alt/f oddness for customer n#175993
+vcl-gtk-key-menu.diff, i#67184, michael
+
tools-smb-url.diff, i#65518, rodo
sfx2-title-generic-url.diff, i#65519, rodo
@@ -311,10 +315,6 @@ sfxconfig-grplistbox-fix.diff, i#66752, noelpwer
# fix typing char crashes office bug, i#66790, noelpwer
svtools-source-edit-texteng-core.diff
-[ Fixes < ooc680-m6 ]
-# fix escape/dismiss context menu bug n#170772
-crash-menu-escape.diff, i#65721, michael
-
[ Leaks ]
@@ -438,8 +438,9 @@ sc-get-pivot-data.diff, i#45843, jody
# Allow Cols/Rows to be resized even if document is read-only, n#TODO, jody
sc-read-only-colrow-resize.diff
-# Fix 'Toggle merge' so that the range stays selected after un-toggle
-sc-toggle-merge-really-toggles.diff, i#33126, jholesov
+# Fix 'Toggle merge' so that the range stays selected after un-toggle,
+# and implement 'Toggle merge & center'
+sc-toggle-merge-center.diff, i#33126, n#10562, jholesov
[ Fixes ]
@@ -509,6 +510,10 @@ svtools-unsort-template-dialogentries.diff, rodo
# fall back to the English help even without the symlink, rh#151357
sfx2-fallback-to-en-help.diff, pmladek
+# use freetype embolden method instead of bold emulation n#176701. i65520, foa
+config_office-freetype-embolden-check.diff
+vcl-glyphs-cjk-embolden.diff, n#176701. i65520, Jian
+
[ Egg ]
# go-oo.org people active in this release
@@ -528,8 +533,6 @@ default-system-fpicker.diff, michael
# don't display File->Wizards-> install dictionaries/fonts -
# makes no sense on Linux n#74249
default-no-install-wizards.diff, michael
-# use freetype embolden method instead of bold emulation n#176701. i65520, foa
-vcl-glyphs-cjk-embolden.diff, n#176701. i65520, Jian
[ DebianBaseOnly ]
@@ -546,6 +549,8 @@ gcj-32bit-runtime-path.diff, i#64888, mklose
# remove mozilla plug-in option completely since we enable it per default
# and therefore this option is sense-/useless
no-mozilla-plug-in-option.diff
+# don't reference unowinreg.dll in std.mk, cf Debian #377531
+#std-mk-no-unowinreg-dll.diff
[ DebianOnly ]
@@ -765,10 +770,15 @@ sdk-filenames-with-dollar.diff, pmladek, i#64801
# buildfix for xorg-7.0/7.1 and internal nas library
buildfix-xorg7-nas.diff, vmiklos, i#64134
-[ BuildBits >= ooc680-m6 ]
# Workaround for compile failure with glibc 2.4's langinfo.h
i18nutil-glibc-braindamage-workaround.diff, brosenk
+# system neon 0.26.x compile fixes
+system-neon-0.26.diff, i#64798
+
+# system agg 2.4 compile fixes
+system-agg-2.4.diff, i#64798, cws thbpp4
+
[ MandrivaOnly ]
SectionOwner => gghibo
@@ -906,14 +916,14 @@ hebrew-culmus.diff, noelp
# generating PostScript
psprint-postscript-page-setup.diff, i#65491, n#80448, jholesov
-[ KDE < src680-m172 ]
-# KDE backend implementation
-cws-kdesettings.diff
[ KDE ]
SectionOwner => jholesov
SectionIssue => i#63557
+# KDE backend implementation
+cws-kdesettings.diff
+
# Fix unneded dlopening
kdesettings-speedup-currentcontext.diff, i#66204, jholesov
kdesettings-speedup-backends.diff, i#66204, jholesov
@@ -1566,8 +1576,6 @@ SectionOwner => hmth
disable-external.diff
# use libxslt from system for xmlhelp / disable sablot
xmlhelp-use-libxslt-from-system.diff, i#30380
-# system neon 0.26.x compile fixes
-system-neon-0.26.diff, i#64798
[ CalcSolver ]
SectionOwner => kyoshida
@@ -1696,7 +1704,6 @@ ark-experimental-gcj-use-ecj.diff, i#64917
ark-system-precompiled-java.diff
[ DebianBaseOnly ]
-disable-rhino.diff, rengelha
# don't steal the focus, when opening windows.
framework-nofocussteal.diff, i#19976, mklose
diff --git a/patches/src680/std-mk-no-unowinreg-dll.diff b/patches/src680/std-mk-no-unowinreg-dll.diff
new file mode 100644
index 000000000..1e0041907
--- /dev/null
+++ b/patches/src680/std-mk-no-unowinreg-dll.diff
@@ -0,0 +1,14 @@
+Index: ostd.mk
+===================================================================
+RCS file: /cvs/api/odk/settings/std.mk,v
+retrieving revision 1.9
+diff -u -u -r1.9 std.mk
+--- odk/settings/std.mk 9 Nov 2005 09:37:31 -0000 1.9
++++ odk/settings/std.mk 9 Jul 2006 21:45:37 -0000
+@@ -50,5 +50,4 @@
+ -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/InstallationFinder.class$(SQM) \
+ -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/InstallationFinder$$StreamGobbler.class$(SQM) \
+ -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/WinRegKey.class$(SQM) \
+- -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/WinRegKeyException.class$(SQM) \
+- -C $(CLASSES_DIR) $(SQM)win/unowinreg.dll$(SQM)
++ -C $(CLASSES_DIR) $(SQM)com/sun/star/lib/loader/WinRegKeyException.class$(SQM)
diff --git a/patches/src680/vcl-gtk-key-menu.diff b/patches/src680/vcl-gtk-key-menu.diff
new file mode 100644
index 000000000..d9375645a
--- /dev/null
+++ b/patches/src680/vcl-gtk-key-menu.diff
@@ -0,0 +1,41 @@
+Index: vcl/unx/gtk/window/gtkframe.cxx
+===================================================================
+RCS file: /cvs/gsl/vcl/unx/gtk/window/gtkframe.cxx,v
+retrieving revision 1.42
+diff -u -p -u -r1.42 gtkframe.cxx
+--- vcl/unx/gtk/window/gtkframe.cxx 25 Jan 2006 11:40:22 -0000 1.42
++++ vcl/unx/gtk/window/gtkframe.cxx 10 Jul 2006 12:42:59 -0000
+@@ -2113,7 +2349,11 @@ gboolean GtkSalFrame::signalKey( GtkWidg
+
+ if( pThis->m_pIMHandler )
+ if( pThis->m_pIMHandler->handleKeyEvent( pEvent ) )
++ {
++ pThis->m_bSendModChangeOnRelease = false;
++ pThis->m_bSingleAltPress = false;
+ return TRUE;
++ }
+ GTK_YIELD_GRAB();
+
+ // handle modifiers
+@@ -2225,6 +2465,9 @@ gboolean GtkSalFrame::signalKey( GtkWidg
+ }
+ else
+ {
++ pThis->m_bSendModChangeOnRelease = false;
++ pThis->m_bSingleAltPress = false;
++
+ pThis->doKeyCallback( pEvent->state,
+ pEvent->keyval,
+ pEvent->hardware_keycode,
+@@ -2233,11 +2476,6 @@ gboolean GtkSalFrame::signalKey( GtkWidg
+ sal_Unicode(gdk_keyval_to_unicode( pEvent->keyval )),
+ (pEvent->type == GDK_KEY_PRESS),
+ false );
+- if( ! aDel.isDeleted() )
+- {
+- pThis->m_bSendModChangeOnRelease = false;
+- pThis->m_bSingleAltPress = false;
+- }
+ }
+
+ if( !aDel.isDeleted() && pThis->m_pIMHandler )
diff --git a/patches/vba/offapi-org-openoffice-vba-xapplication-idl.diff b/patches/vba/offapi-org-openoffice-vba-xapplication-idl.diff
index 02533d4e6..093541065 100644
--- a/patches/vba/offapi-org-openoffice-vba-xapplication-idl.diff
+++ b/patches/vba/offapi-org-openoffice-vba-xapplication-idl.diff
@@ -1,6 +1,6 @@
--- /dev/null
+++ offapi/org/openoffice/vba/XApplication.idl
-@@ -0,0 +1,45 @@
+@@ -0,0 +1,49 @@
+#ifndef __org_openoffice_vba_XApplication_idl__
+#define __org_openoffice_vba_XApplication_idl__
+
@@ -16,6 +16,7 @@
+published interface XWorksheets;
+published interface XWorksheetFunction;
+published interface XWindow;
++published interface XWorksheet;
+
+published interface XApplication: com::sun::star::uno::XInterface
+{
@@ -23,6 +24,7 @@
+ [attribute, readonly] XWorkbook ActiveWorkbook;
+ [attribute, readonly] XRange ActiveCell;
+ [attribute, readonly] XWindow ActiveWindow;
++ [attribute, readonly] XWorksheet ActiveSheet;
+ [attribute] long Calculation;
+ //#TODO #FIXME this is more of a placeholder, will return
+ // the value of activeworkbook, in xl 'ThisWorkbook' should return the
@@ -32,10 +34,12 @@
+ [attribute] boolean ScreenUpdating;
+ [attribute] any CutCopyMode;
+ any Workbooks( [in] any aIndex );
++ any Worksheets( [in] any aIndex );
+ any Windows( [in] any aIndex );
+ any WorksheetFunction();
+ any Evaluate( [in] string Name );
+ any Dialogs( [in] any DialogIndex );
++ any Range( [in] any Cell1, [in] any Cell2 );
+ // #FIXME #TODO up to 30 args needed
+ double CountA( [in] any arg1 );
+ void wait( [in] double time );
diff --git a/patches/vba/sc-source-ui-vba-vbaglobals-cxx.diff b/patches/vba/sc-source-ui-vba-vbaglobals-cxx.diff
index 6c80f4f99..413035b76 100644
--- a/patches/vba/sc-source-ui-vba-vbaglobals-cxx.diff
+++ b/patches/vba/sc-source-ui-vba-vbaglobals-cxx.diff
@@ -1,13 +1,12 @@
--- /dev/null
+++ sc/source/ui/vba/vbaglobals.cxx
-@@ -0,0 +1,278 @@
+@@ -0,0 +1,203 @@
+#ifndef SC_VBA_GLOBALS
+#include "vbaglobals.hxx"
+#endif
+
+#include <com/sun/star/lang/XMultiComponentFactory.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
-+#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
+
+#include "vbaapplication.hxx"
+#include "vbaworksheet.hxx"
@@ -158,27 +157,7 @@
+uno::Reference< vba::XWorksheet > SAL_CALL
+ScVbaGlobals::getActiveSheet() throw (uno::RuntimeException)
+{
-+// OSL_TRACE("ScVbaGlobals::getActiveSheet()");
-+ uno::Reference< vba::XWorksheet > result;
-+ uno::Reference< vba::XWorkbook > xWorkbook(
-+ mxApplication->getActiveWorkbook(), uno::UNO_QUERY );
-+ if ( xWorkbook.is() )
-+ {
-+ uno::Reference< vba::XWorksheet > xWorksheet(
-+ xWorkbook->getActiveSheet(), uno::UNO_QUERY );
-+ if ( xWorksheet.is() )
-+ {
-+ result = xWorksheet;
-+ }
-+ }
-+
-+ if ( !result.is() )
-+ {
-+ // Fixme - check if this is reasonable/desired behavior
-+ throw uno::RuntimeException( rtl::OUString::createFromAscii(
-+ "No activeSheet available" ), Reference< uno::XInterface >() );
-+ }
-+ return result;
++ return mxApplication->getActiveSheet();
+}
+
+uno::Any SAL_CALL
@@ -190,18 +169,7 @@
+uno::Any SAL_CALL
+ScVbaGlobals::WorkSheets(const uno::Any& aIndex) throw (uno::RuntimeException)
+{
-+// OSL_TRACE("ScVbaGlobals::getWorkSheets()");
-+ uno::Reference< vba::XWorkbook > xWorkbook( mxApplication->getActiveWorkbook(), uno::UNO_QUERY );
-+ uno::Any result;
-+ if ( xWorkbook.is() )
-+ result = xWorkbook->Worksheets( aIndex );
-+
-+ else
-+ // Fixme - check if this is reasonable/desired behavior
-+ throw uno::RuntimeException( rtl::OUString::createFromAscii(
-+ "No ActiveWorkBook available" ), Reference< uno::XInterface >() );
-+
-+ return result;
++ return mxApplication->Worksheets( aIndex );
+}
+uno::Any SAL_CALL
+ScVbaGlobals::Sheets( const uno::Any& aIndex ) throw (uno::RuntimeException)
@@ -232,50 +200,7 @@
+uno::Any SAL_CALL
+ScVbaGlobals::Range( const uno::Any& Cell1, const uno::Any& Cell2 ) throw (uno::RuntimeException)
+{
-+ // Althought the documentation seems clear that Range without a
-+ // qualifier then its a shortcut for ActiveSheet.Range
-+ // however, similarly Application.Range is apparently also a
-+ // shortcut for ActiveSheet.Range
-+ // The is however a subtle behavioural difference I've come across
-+ // wrt to named ranges.
-+ // If a named range "test" exists { Sheet1!$A1 } and the active sheet
-+ // is Sheet2 then the following will fail
-+ // msgbox ActiveSheet.Range("test").Address ' failes
-+ // msgbox WorkSheets("Sheet2").Range("test").Address
-+ // but !!!
-+ // msgbox Range("test").Address ' works
-+ // msgbox Application.Range("test").Address ' works
-+
-+ // Single param Range
-+ rtl::OUString sRangeName;
-+ Cell1 >>= sRangeName;
-+ if ( Cell1.hasValue() && !Cell2.hasValue() && sRangeName.getLength() )
-+ {
-+ const static rtl::OUString sNamedRanges( RTL_CONSTASCII_USTRINGPARAM("NamedRanges"));
-+ uno::Reference< beans::XPropertySet > xPropSet( getCurrentDocument(), uno::UNO_QUERY_THROW );
-+
-+ uno::Reference< container::XNameAccess > xNamed( xPropSet->getPropertyValue( sNamedRanges ), uno::UNO_QUERY_THROW );
-+ uno::Reference< sheet::XCellRangeReferrer > xReferrer;
-+ try
-+ {
-+ xReferrer.set ( xNamed->getByName( sRangeName ), uno::UNO_QUERY );
-+ }
-+ catch( uno::Exception& e )
-+ {
-+ // do nothing
-+ }
-+ if ( xReferrer.is() )
-+ {
-+ uno::Reference< table::XCellRange > xRange = xReferrer->getReferredCells();
-+ if ( xRange.is() )
-+ {
-+ uno::Reference< vba::XRange > xVbRange = new ScVbaRange( m_xContext, xRange );
-+ return uno::makeAny( xVbRange );
-+ }
-+ }
-+ }
-+
-+ return uno::makeAny( getActiveSheet()->Range( Cell1, Cell2 ) );
++ return getApplication()->Range( Cell1, Cell2 );
+}
+
+
diff --git a/patches/vba/sc-source-ui-vba-vbarange-cxx.diff b/patches/vba/sc-source-ui-vba-vbarange-cxx.diff
index a50f4755e..9e4cde3de 100644
--- a/patches/vba/sc-source-ui-vba-vbarange-cxx.diff
+++ b/patches/vba/sc-source-ui-vba-vbarange-cxx.diff
@@ -1,6 +1,6 @@
--- /dev/null
+++ sc/source/ui/vba/vbarange.cxx
-@@ -0,0 +1,2012 @@
+@@ -0,0 +1,2076 @@
+#include <comphelper/processfactory.hxx>
+#include <sfx2/objsh.hxx>
+
@@ -81,6 +81,8 @@
+#include "vbainterior.hxx"
+#include "vbacharacters.hxx"
+
++#include "tabvwsh.hxx"
++
+#include <comphelper/anytostring.hxx>
+
+#include <global.hxx>
@@ -977,6 +979,68 @@
+ xSelection->select( ( uno::Any )mxRange );
+}
+
++bool cellInRange( const table::CellRangeAddress& rAddr, const sal_Int32& nCol, const sal_Int32& nRow )
++{
++ if ( nCol >= rAddr.StartColumn && nCol <= rAddr.EndColumn &&
++ nRow >= rAddr.StartRow && nRow <= rAddr.EndRow )
++ return true;
++ return false;
++}
++
++void setCursor( const sal_Int32& nCol, const sal_Int32& nRow, bool bInSel = true )
++{
++ ScTabViewShell* pShell = getCurrentBestViewShell();
++ if ( pShell )
++ {
++ if ( bInSel )
++ pShell->SetCursor( nCol, nRow );
++ else
++ pShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_NONE, FALSE, FALSE, TRUE, FALSE );
++ }
++}
++
++void
++ScVbaRange::Activate() throw (uno::RuntimeException)
++{
++ RangeHelper thisRange( mxRange );
++ uno::Reference< sheet::XCellRangeAddressable > xThisRangeAddress = thisRange.getCellRangeAddressable();
++ table::CellRangeAddress thisRangeAddress = xThisRangeAddress->getRangeAddress();
++
++ // get current selection
++ uno::Reference< sheet::XCellRangeAddressable > xRange( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
++
++ uno::Reference< sheet::XSheetCellRanges > xRanges( getCurrentDocument()->getCurrentSelection(), ::uno::UNO_QUERY);
++
++ if ( xRanges.is() )
++ {
++ uno::Sequence< table::CellRangeAddress > nAddrs = xRanges->getRangeAddresses();
++ for ( sal_Int32 index = 0; index < nAddrs.getLength(); ++index )
++ {
++ if ( cellInRange( nAddrs[index], thisRangeAddress.StartColumn, thisRangeAddress.StartRow ) )
++ {
++ setCursor( thisRangeAddress.StartColumn, thisRangeAddress.StartRow );
++ return;
++ }
++
++ }
++ }
++
++ if ( xRange.is() && cellInRange( xRange->getRangeAddress(), thisRangeAddress.StartColumn, thisRangeAddress.StartRow ) )
++ setCursor( thisRangeAddress.StartColumn, thisRangeAddress.StartRow );
++ else
++ {
++ // if this range is multi cell select the range other
++ // wise just position the cell at this single range position
++ if ( isSingleCellRange() )
++ // This top-leftmost cell of this Range is not in the current
++ // selection so just select this range
++ setCursor( thisRangeAddress.StartColumn, thisRangeAddress.StartRow, false );
++ else
++ Select();
++ }
++
++}
++
+uno::Reference< vba::XRange >
+ScVbaRange::Rows(const uno::Any& aIndex ) throw (uno::RuntimeException)
+{
diff --git a/scratch/offapi-vba/XApplication.idl b/scratch/offapi-vba/XApplication.idl
index 84112be21..8aefee261 100644
--- a/scratch/offapi-vba/XApplication.idl
+++ b/scratch/offapi-vba/XApplication.idl
@@ -13,6 +13,7 @@ published interface XWorkbooks;
published interface XWorksheets;
published interface XWorksheetFunction;
published interface XWindow;
+published interface XWorksheet;
published interface XApplication: com::sun::star::uno::XInterface
{
@@ -20,6 +21,7 @@ published interface XApplication: com::sun::star::uno::XInterface
[attribute, readonly] XWorkbook ActiveWorkbook;
[attribute, readonly] XRange ActiveCell;
[attribute, readonly] XWindow ActiveWindow;
+ [attribute, readonly] XWorksheet ActiveSheet;
[attribute] long Calculation;
//#TODO #FIXME this is more of a placeholder, will return
// the value of activeworkbook, in xl 'ThisWorkbook' should return the
@@ -29,10 +31,12 @@ published interface XApplication: com::sun::star::uno::XInterface
[attribute] boolean ScreenUpdating;
[attribute] any CutCopyMode;
any Workbooks( [in] any aIndex );
+ any Worksheets( [in] any aIndex );
any Windows( [in] any aIndex );
any WorksheetFunction();
any Evaluate( [in] string Name );
any Dialogs( [in] any DialogIndex );
+ any Range( [in] any Cell1, [in] any Cell2 );
// #FIXME #TODO up to 30 args needed
double CountA( [in] any arg1 );
void wait( [in] double time );
diff --git a/scratch/sc-vba/makefile.mk b/scratch/sc-vba/makefile.mk
index e74b7269c..4f8d47ccf 100644
--- a/scratch/sc-vba/makefile.mk
+++ b/scratch/sc-vba/makefile.mk
@@ -24,7 +24,6 @@ DLLPRE =
#.INCLUDE : ..$/cppumaker.mk
SLOFILES= \
- $(SLO)$/service.obj \
$(SLO)$/vbaglobals.obj \
$(SLO)$/vbaworkbook.obj \
$(SLO)$/vbaworksheets.obj \
diff --git a/scratch/sc-vba/vbaapplication.hxx b/scratch/sc-vba/vbaapplication.hxx
index c332fabb6..e4a8e1721 100644
--- a/scratch/sc-vba/vbaapplication.hxx
+++ b/scratch/sc-vba/vbaapplication.hxx
@@ -27,10 +27,12 @@ public:
virtual css::uno::Reference< oo::vba::XWorkbook > SAL_CALL getActiveWorkbook() throw (css::uno::RuntimeException);
virtual css::uno::Reference< oo::vba::XRange > SAL_CALL getActiveCell() throw ( css::uno::RuntimeException);
virtual css::uno::Reference< oo::vba::XWindow > SAL_CALL getActiveWindow() throw (::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Reference< oo::vba::XWorksheet > SAL_CALL getActiveSheet() throw (::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL getScreenUpdating() throw (css::uno::RuntimeException);
virtual void SAL_CALL setScreenUpdating(sal_Bool bUpdate) throw (css::uno::RuntimeException);
virtual css::uno::Reference< oo::vba::XWorkbook > SAL_CALL getThisWorkbook() throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Workbooks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Worksheets( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL WorksheetFunction( ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Evaluate( const ::rtl::OUString& Name ) throw (css::uno::RuntimeException);
virtual css::uno::Any SAL_CALL Dialogs( const css::uno::Any& DialogIndex ) throw (css::uno::RuntimeException);
@@ -41,5 +43,6 @@ public:
virtual css::uno::Any SAL_CALL Windows( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
virtual void SAL_CALL wait( double time ) throw (css::uno::RuntimeException);
+ virtual css::uno::Any SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
};
#endif /* SC_VBA_APPLICATION_HXX */
diff --git a/scratch/sc-vba/vbaglobals.cxx b/scratch/sc-vba/vbaglobals.cxx
index cfae0ac3d..4589def4a 100644
--- a/scratch/sc-vba/vbaglobals.cxx
+++ b/scratch/sc-vba/vbaglobals.cxx
@@ -4,7 +4,6 @@
#include <com/sun/star/lang/XMultiComponentFactory.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/sheet/XCellRangeReferrer.hpp>
#include "vbaapplication.hxx"
#include "vbaworksheet.hxx"
@@ -155,27 +154,7 @@ ScVbaGlobals::getActiveWorkbook() throw (uno::RuntimeException)
uno::Reference< vba::XWorksheet > SAL_CALL
ScVbaGlobals::getActiveSheet() throw (uno::RuntimeException)
{
-// OSL_TRACE("ScVbaGlobals::getActiveSheet()");
- uno::Reference< vba::XWorksheet > result;
- uno::Reference< vba::XWorkbook > xWorkbook(
- mxApplication->getActiveWorkbook(), uno::UNO_QUERY );
- if ( xWorkbook.is() )
- {
- uno::Reference< vba::XWorksheet > xWorksheet(
- xWorkbook->getActiveSheet(), uno::UNO_QUERY );
- if ( xWorksheet.is() )
- {
- result = xWorksheet;
- }
- }
-
- if ( !result.is() )
- {
- // Fixme - check if this is reasonable/desired behavior
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "No activeSheet available" ), Reference< uno::XInterface >() );
- }
- return result;
+ return mxApplication->getActiveSheet();
}
uno::Any SAL_CALL
@@ -187,18 +166,7 @@ ScVbaGlobals::WorkBooks( const uno::Any& aIndex ) throw (uno::RuntimeException)
uno::Any SAL_CALL
ScVbaGlobals::WorkSheets(const uno::Any& aIndex) throw (uno::RuntimeException)
{
-// OSL_TRACE("ScVbaGlobals::getWorkSheets()");
- uno::Reference< vba::XWorkbook > xWorkbook( mxApplication->getActiveWorkbook(), uno::UNO_QUERY );
- uno::Any result;
- if ( xWorkbook.is() )
- result = xWorkbook->Worksheets( aIndex );
-
- else
- // Fixme - check if this is reasonable/desired behavior
- throw uno::RuntimeException( rtl::OUString::createFromAscii(
- "No ActiveWorkBook available" ), Reference< uno::XInterface >() );
-
- return result;
+ return mxApplication->Worksheets( aIndex );
}
uno::Any SAL_CALL
ScVbaGlobals::Sheets( const uno::Any& aIndex ) throw (uno::RuntimeException)
@@ -229,50 +197,7 @@ ScVbaGlobals::getGlobals( ) throw (::uno::RuntimeException)
uno::Any SAL_CALL
ScVbaGlobals::Range( const uno::Any& Cell1, const uno::Any& Cell2 ) throw (uno::RuntimeException)
{
- // Althought the documentation seems clear that Range without a
- // qualifier then its a shortcut for ActiveSheet.Range
- // however, similarly Application.Range is apparently also a
- // shortcut for ActiveSheet.Range
- // The is however a subtle behavioural difference I've come across
- // wrt to named ranges.
- // If a named range "test" exists { Sheet1!$A1 } and the active sheet
- // is Sheet2 then the following will fail
- // msgbox ActiveSheet.Range("test").Address ' failes
- // msgbox WorkSheets("Sheet2").Range("test").Address
- // but !!!
- // msgbox Range("test").Address ' works
- // msgbox Application.Range("test").Address ' works
-
- // Single param Range
- rtl::OUString sRangeName;
- Cell1 >>= sRangeName;
- if ( Cell1.hasValue() && !Cell2.hasValue() && sRangeName.getLength() )
- {
- const static rtl::OUString sNamedRanges( RTL_CONSTASCII_USTRINGPARAM("NamedRanges"));
- uno::Reference< beans::XPropertySet > xPropSet( getCurrentDocument(), uno::UNO_QUERY_THROW );
-
- uno::Reference< container::XNameAccess > xNamed( xPropSet->getPropertyValue( sNamedRanges ), uno::UNO_QUERY_THROW );
- uno::Reference< sheet::XCellRangeReferrer > xReferrer;
- try
- {
- xReferrer.set ( xNamed->getByName( sRangeName ), uno::UNO_QUERY );
- }
- catch( uno::Exception& e )
- {
- // do nothing
- }
- if ( xReferrer.is() )
- {
- uno::Reference< table::XCellRange > xRange = xReferrer->getReferredCells();
- if ( xRange.is() )
- {
- uno::Reference< vba::XRange > xVbRange = new ScVbaRange( m_xContext, xRange );
- return uno::makeAny( xVbRange );
- }
- }
- }
-
- return uno::makeAny( getActiveSheet()->Range( Cell1, Cell2 ) );
+ return getApplication()->Range( Cell1, Cell2 );
}
diff --git a/test/macro/TestAddress.xls b/test/macro/TestAddress.xls
index a1393c3f3..3b4f529fa 100644
--- a/test/macro/TestAddress.xls
+++ b/test/macro/TestAddress.xls
Binary files differ