diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 18:32:46 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-07-21 18:32:46 +0200 |
commit | 17a3c456b6e364ea50a0a0267235434421b76e4d (patch) | |
tree | db74c4d9ced21b9fb89f5472973934a4d60161e1 /sc | |
parent | 100fd14a70892a7c183574c3fc58672a04689211 (diff) | |
parent | aca6b30d6406799561f311a38bbbfc1aebda36de (diff) |
resyncing to master
Diffstat (limited to 'sc')
114 files changed, 4762 insertions, 1767 deletions
diff --git a/sc/CppunitTest_sc_test_filters.mk b/sc/CppunitTest_sc_test_filters.mk new file mode 100644 index 000000000000..8dcd854a86ae --- /dev/null +++ b/sc/CppunitTest_sc_test_filters.mk @@ -0,0 +1,110 @@ +#************************************************************************* +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Initial Developer of the Original Code is +# Caolán McNamara, Red Hat, Inc. <caolanm@redhat.com> +# Portions created by the Initial Developer are Copyright (C) 2011 the +# Initial Developer. All Rights Reserved. +# +# Major Contributor(s): +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. +#************************************************************************* + +$(eval $(call gb_CppunitTest_CppunitTest,sc_filters_test)) + +$(eval $(call gb_CppunitTest_add_exception_objects,sc_filters_test, \ + sc/qa/unit/filters-test \ +)) + +$(eval $(call gb_CppunitTest_add_linked_libs,sc_filters_test, \ + sc \ + sfx \ + svl \ + svt \ + vcl \ + tl \ + ucbhelper \ + utl \ + i18nisolang1 \ + comphelper \ + cppu \ + cppuhelper \ + sal \ + $(gb_STDLIBS) \ +)) + +$(eval $(call gb_CppunitTest_set_include,sc_filters_test,\ + -I$(realpath $(SRCDIR)/sc/inc/pch) \ + -I$(realpath $(SRCDIR)/sc/source/ui/inc) \ + -I$(realpath $(SRCDIR)/sc/inc) \ + $$(INCLUDE) \ + -I$(OUTDIR)/inc \ +)) + +$(eval $(call gb_CppunitTest_add_api,sc_filters_test,\ + offapi \ + udkapi \ +)) + +$(eval $(call gb_CppunitTest_uses_ure,sc_filters_test)) + +$(eval $(call gb_CppunitTest_add_type_rdbs,sc_filters_test,\ + types \ +)) + +$(eval $(call gb_CppunitTest_add_service_rdbs,sc_filters_test,\ + sc_filters_test \ +)) + +$(eval $(call gb_CppunitTest_set_args,sc_filters_test,\ + --headless \ + --invisible \ + --protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \ +)) + +$(eval $(call gb_RdbTarget_RdbTarget,sc_filters_test)) + +$(eval $(call gb_RdbTarget_add_components,sc_filters_test,\ + sc/util/sc \ + sc/util/scfilt \ + forms/util/frm \ + dbaccess/util/dba \ + sfx2/util/sfx \ + framework/util/fwk \ + toolkit/util/tk \ + unoxml/source/service/unoxml \ + fileaccess/source/fileacc \ + comphelper/util/comphelp \ +)) + +$(eval $(call gb_RdbTarget_add_old_components,sc_filters_test,\ + i18npool \ + package2 \ + ucb1 \ + ucpfile1 \ +)) + +# we need to +# a) explicitly depend on library msword because it is not implied by a link +# relation +# b) explicitly depend on the sc resource files needed at unit-test runtime +$(call gb_CppunitTest_get_target,sc_filters_test) : $(call gb_Library_get_target,scfilt) $(WORKDIR)/AllLangRes/sc + +# vim: set noet sw=4: diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk index ec8db65901f8..2fec47155038 100644 --- a/sc/CppunitTest_sc_ucalc.mk +++ b/sc/CppunitTest_sc_ucalc.mk @@ -71,10 +71,14 @@ $(eval $(call gb_CppunitTest_set_include,sc_ucalc,\ -I$(realpath $(SRCDIR)/sc/source/ui/inc) \ -I$(realpath $(SRCDIR)/sc/inc) \ $$(INCLUDE) \ - -I$(OUTDIR)/inc/offuh \ -I$(OUTDIR)/inc \ )) +$(eval $(call gb_CppunitTest_add_api,sc_ucalc,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_CppunitTest_uses_ure,sc_ucalc)) $(eval $(call gb_CppunitTest_add_type_rdbs,sc_ucalc,\ @@ -88,6 +92,7 @@ $(eval $(call gb_CppunitTest_add_service_rdbs,sc_ucalc,\ $(eval $(call gb_CppunitTest_set_args,sc_ucalc,\ --headless \ --invisible \ + --protector unoexceptionprotector$(gb_Library_DLLEXT) unoexceptionprotector \ )) $(eval $(call gb_RdbTarget_RdbTarget,sc_ucalc)) diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index 7f1f36a0263b..dcb105d6a07d 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -36,7 +36,6 @@ $(eval $(call gb_Library_set_include,sc,\ -I$(WORKDIR)/SdiTarget/sc/sdi \ -I$(WORKDIR)/Misc/sc/ \ $$(INCLUDE) \ - -I$(OUTDIR)/inc/offuh \ )) $(eval $(call gb_Library_add_defs,sc,\ @@ -44,6 +43,11 @@ $(eval $(call gb_Library_add_defs,sc,\ -DSC_INFO_OSVERSION=\"$(OS)\" \ )) +$(eval $(call gb_Library_add_api,sc,\ + offapi \ + udkapi \ +)) + $(eval $(call gb_Library_add_linked_libs,sc,\ avmedia \ basegfx \ diff --git a/sc/Library_scd.mk b/sc/Library_scd.mk index 628684545ef9..deb075380fe4 100644 --- a/sc/Library_scd.mk +++ b/sc/Library_scd.mk @@ -30,9 +30,13 @@ $(eval $(call gb_Library_set_include,scd,\ -I$(realpath $(SRCDIR)/sc/inc) \ -I$(WORKDIR)/Misc/sc/ \ $$(INCLUDE) \ - -I$(OUTDIR)/inc/offuh \ )) +)) + +$(eval $(call gb_Library_add_api,scd,\ + offapi \ + udkapi \ $(eval $(call gb_Library_add_linked_libs,scd,\ cppu \ cppuhelper \ diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk index 5c74d094e9ff..26fae540fede 100644 --- a/sc/Library_scfilt.mk +++ b/sc/Library_scfilt.mk @@ -33,10 +33,14 @@ $(eval $(call gb_Library_set_include,scfilt,\ -I$(realpath $(SRCDIR)/sc/inc/pch) \ -I$(WORKDIR)/Misc/sc/ \ $$(INCLUDE) \ - -I$(OUTDIR)/inc/offuh \ -I$(OUTDIR)/inc \ )) +)) + +$(eval $(call gb_Library_add_api,scfilt,\ + offapi \ + udkapi \ $(eval $(call gb_Library_add_linked_libs,scfilt,\ basegfx \ comphelper \ diff --git a/sc/Library_scui.mk b/sc/Library_scui.mk index 3473fa74b09a..c12408796e3a 100644 --- a/sc/Library_scui.mk +++ b/sc/Library_scui.mk @@ -30,9 +30,13 @@ $(eval $(call gb_Library_set_include,scui,\ -I$(WORKDIR)/SdiTarget/sc/sdi \ -I$(WORKDIR)/Misc/sc \ $$(INCLUDE) \ - -I$(OUTDIR)/inc/offuh \ )) +)) + +$(eval $(call gb_Library_add_api,scui,\ + offapi \ + udkapi \ $(eval $(call gb_Library_add_linked_libs,scui,\ comphelper \ cppu \ diff --git a/sc/Library_vbaobj.mk b/sc/Library_vbaobj.mk index 437607ddc949..eb66b6919fcb 100644 --- a/sc/Library_vbaobj.mk +++ b/sc/Library_vbaobj.mk @@ -29,7 +29,6 @@ $(eval $(call gb_Library_set_include,vbaobj,\ -I$(realpath $(SRCDIR)/sc/inc) \ -I$(WORKDIR)/Misc/sc/ \ $$(INCLUDE) \ - -I$(OUTDIR)/inc/offuh \ -I$(OUTDIR)/inc/ \ )) @@ -39,6 +38,12 @@ $(eval $(call gb_Library_add_defs,vbaobj,\ -DVBA_OOBUILD_HACK \ )) +$(eval $(call gb_Library_add_api,vbaobj,\ + offapi \ + oovbaapi \ + udkapi \ +)) + $(eval $(call gb_Library_add_linked_libs,vbaobj,\ comphelper \ cppu \ @@ -117,7 +122,6 @@ $(eval $(call gb_Library_add_exception_objects,vbaobj,\ sc/source/ui/vba/vbaquerytable \ sc/source/ui/vba/vbarange \ sc/source/ui/vba/vbasheetobject \ - sc/source/ui/vba/vbasheetobjects \ sc/source/ui/vba/vbastyle \ sc/source/ui/vba/vbastyles \ sc/source/ui/vba/vbatextboxshape \ @@ -132,6 +136,17 @@ $(eval $(call gb_Library_add_exception_objects,vbaobj,\ sc/source/ui/vba/vbawsfunction \ )) +#32bit Fedora gcc 4.6.1 fails to link sc without this +#TO-DO: make standalone reproducer for this and file +#gcc bug +ifeq ($(strip $(COM)),GCC) +$(eval $(call gb_Library_add_cxxobjects,vbaobj,\ + sc/source/ui/vba/vbasheetobjects \ + , $(gb_COMPILERNOOPTFLAGS) $(gb_LinkTarget_EXCEPTIONFLAGS) \ +)) +else +$(eval $(call gb_Library_add_exception_objects,vbaobj,\ + sc/source/ui/vba/vbasheetobjects \ ifeq ($(OS),WNT) $(eval $(call gb_Library_add_linked_libs,vbaobj,\ advapi32 \ diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index 0b91eee26d80..d07a2c51b4d3 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -35,6 +35,7 @@ $(eval $(call gb_Module_add_targets,sc,\ $(eval $(call gb_Module_add_check_targets,sc,\ CppunitTest_sc_ucalc \ + CppunitTest_sc_test_filters \ )) diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx index e24154516d4d..fcd83da9ddd6 100644 --- a/sc/inc/cell.hxx +++ b/sc/inc/cell.hxx @@ -404,6 +404,7 @@ public: void SetTableOpDirty(); sal_Bool IsDirtyOrInTableOpDirty() const; sal_Bool GetDirty() const { return bDirty; } + void ResetDirty() { bDirty = false; } sal_Bool NeedsListening() const { return bNeedListening; } void SetNeedsListening( sal_Bool bVar ) { bNeedListening = bVar; } void Compile(const String& rFormula, diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx index b1f703f39b9f..7c458105080f 100644 --- a/sc/inc/cellsuno.hxx +++ b/sc/inc/cellsuno.hxx @@ -73,6 +73,7 @@ #include <com/sun/star/util/XSortable.hpp> #include <com/sun/star/util/XImportable.hpp> #include <com/sun/star/table/XColumnRowRange.hpp> +#include <com/sun/star/table/XCell2.hpp> #include <com/sun/star/table/BorderLine.hpp> #include <com/sun/star/table/TableBorder.hpp> #include <com/sun/star/sheet/XDataPilotTablesSupplier.hpp> @@ -817,7 +818,7 @@ public: class SC_DLLPUBLIC ScCellObj : public ScCellRangeObj, public com::sun::star::text::XText, public com::sun::star::container::XEnumerationAccess, - public com::sun::star::table::XCell, + public com::sun::star::table::XCell2, public com::sun::star::sheet::XFormulaTokens, public com::sun::star::sheet::XCellAddressable, public com::sun::star::sheet::XSheetAnnotationAnchor, @@ -929,6 +930,10 @@ public: virtual ::rtl::OUString SAL_CALL getFormula() throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setFormula( const ::rtl::OUString& aFormula ) throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setFormulaResult( double nValue ) + throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setFormulaString( const ::rtl::OUString& aFormula ) + throw(::com::sun::star::uno::RuntimeException); virtual double SAL_CALL getValue() throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setValue( double nValue ) throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::table::CellContentType SAL_CALL getType() diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx index 8f7ae35451ff..8557a821cdba 100644 --- a/sc/inc/docoptio.hxx +++ b/sc/inc/docoptio.hxx @@ -96,8 +96,8 @@ public: void ResetDocOptions(); inline const ScDocOptions& operator=( const ScDocOptions& rOpt ); - inline int operator==( const ScDocOptions& rOpt ) const; - inline int operator!=( const ScDocOptions& rOpt ) const; + inline bool operator==( const ScDocOptions& rOpt ) const; + inline bool operator!=( const ScDocOptions& rOpt ) const; sal_uInt16 GetStdPrecision() const { return nPrecStandardFormat; } void SetStdPrecision( sal_uInt16 n ) { nPrecStandardFormat = n; } @@ -161,7 +161,7 @@ inline const ScDocOptions& ScDocOptions::operator=( const ScDocOptions& rCpy ) return *this; } -inline int ScDocOptions::operator==( const ScDocOptions& rOpt ) const +inline bool ScDocOptions::operator==( const ScDocOptions& rOpt ) const { return ( rOpt.bIsIgnoreCase == bIsIgnoreCase @@ -189,7 +189,7 @@ inline int ScDocOptions::operator==( const ScDocOptions& rOpt ) const ); } -inline int ScDocOptions::operator!=( const ScDocOptions& rOpt ) const +inline bool ScDocOptions::operator!=( const ScDocOptions& rOpt ) const { return !(operator==(rOpt)); } diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 673dc3ec18d9..19dad8283aee 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -464,8 +464,8 @@ public: * Get all range names that are local to each table. It only returns * non-empty range name set. */ - void GetAllTabRangeNames(ScRangeName::TabNameCopyMap& rRangeNames) const; - void SetAllTabRangeNames(const ScRangeName::TabNameCopyMap& rRangeNames); + SC_DLLPUBLIC void GetAllTabRangeNames(ScRangeName::TabNameCopyMap& rRangeNames) const; + SC_DLLPUBLIC void SetAllTabRangeNames(const ScRangeName::TabNameCopyMap& rRangeNames); SC_DLLPUBLIC ScRangeName* GetRangeName(SCTAB nTab) const; SC_DLLPUBLIC ScRangeName* GetRangeName() const; void SetRangeName(SCTAB nTab, ScRangeName* pNew); diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index ae34b4ba0c52..dc0831eb95a4 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -313,6 +313,8 @@ public: ScDPCollection(const ScDPCollection& r); ~ScDPCollection(); + bool ClearCache(ScDPObject* pDPObj); + SC_DLLPUBLIC size_t GetCount() const; SC_DLLPUBLIC ScDPObject* operator[](size_t nIndex); SC_DLLPUBLIC const ScDPObject* operator[](size_t nIndex) const; diff --git a/sc/inc/markdata.hxx b/sc/inc/markdata.hxx index 0bd009a23d7f..784c61317d8f 100644 --- a/sc/inc/markdata.hxx +++ b/sc/inc/markdata.hxx @@ -116,6 +116,14 @@ public: // adjust table marking: void InsertTab( SCTAB nTab ); void DeleteTab( SCTAB nTab ); + + // iterators for table access + typedef std::set<SCTAB>::iterator iterator; + typedef std::set<SCTAB>::const_iterator const_iterator; + iterator begin(); + iterator end(); + const_iterator begin() const; + const_iterator end() const; }; diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx index a3f9a790357d..245247d0d213 100644 --- a/sc/inc/pch/precompiled_sc.hxx +++ b/sc/inc/pch/precompiled_sc.hxx @@ -65,79 +65,79 @@ #include <cwchar> #include <float.h> #include <functional> -#include <offuh/com/sun/star/awt/Point.hdl> -#include <offuh/com/sun/star/awt/Point.hpp> -#include <offuh/com/sun/star/awt/Size.hdl> -#include <offuh/com/sun/star/awt/Size.hpp> -#include <offuh/com/sun/star/beans/PropertyVetoException.hdl> -#include <offuh/com/sun/star/beans/PropertyVetoException.hpp> -#include <offuh/com/sun/star/container/ElementExistException.hdl> -#include <offuh/com/sun/star/container/ElementExistException.hpp> -#include <offuh/com/sun/star/container/NoSuchElementException.hpp> -#include <offuh/com/sun/star/container/XElementAccess.hdl> -#include <offuh/com/sun/star/container/XElementAccess.hpp> -#include <offuh/com/sun/star/container/XNameAccess.hpp> -#include <offuh/com/sun/star/datatransfer/DataFlavor.hdl> -#include <offuh/com/sun/star/datatransfer/dnd/DragGestureEvent.hpp> -#include <offuh/com/sun/star/datatransfer/dnd/DragSourceDragEvent.hdl> -#include <offuh/com/sun/star/datatransfer/dnd/DragSourceDragEvent.hpp> -#include <offuh/com/sun/star/datatransfer/dnd/DragSourceDropEvent.hdl> -#include <offuh/com/sun/star/datatransfer/dnd/DragSourceEvent.hpp> -#include <offuh/com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.hdl> -#include <offuh/com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.hpp> -#include <offuh/com/sun/star/datatransfer/dnd/DropTargetDragEvent.hdl> -#include <offuh/com/sun/star/datatransfer/dnd/DropTargetDragEvent.hpp> -#include <offuh/com/sun/star/datatransfer/dnd/DropTargetDropEvent.hpp> -#include <offuh/com/sun/star/datatransfer/dnd/DropTargetEvent.hdl> -#include <offuh/com/sun/star/datatransfer/dnd/DropTargetEvent.hpp> -#include <offuh/com/sun/star/datatransfer/dnd/XDragGestureListener.hdl> -#include <offuh/com/sun/star/datatransfer/dnd/XDragGestureListener.hpp> -#include <offuh/com/sun/star/datatransfer/dnd/XDragSource.hdl> -#include <offuh/com/sun/star/datatransfer/dnd/XDragSource.hpp> -#include <offuh/com/sun/star/datatransfer/dnd/XDragSourceContext.hdl> -#include <offuh/com/sun/star/datatransfer/dnd/XDragSourceContext.hpp> -#include <offuh/com/sun/star/datatransfer/dnd/XDragSourceListener.hdl> -#include <offuh/com/sun/star/datatransfer/dnd/XDragSourceListener.hpp> -#include <offuh/com/sun/star/datatransfer/dnd/XDropTargetDragContext.hpp> -#include <offuh/com/sun/star/datatransfer/dnd/XDropTargetListener.hdl> -#include <offuh/com/sun/star/datatransfer/dnd/XDropTargetListener.hpp> -#include <offuh/com/sun/star/datatransfer/UnsupportedFlavorException.hdl> -#include <offuh/com/sun/star/datatransfer/XTransferable.hpp> -#include <offuh/com/sun/star/drawing/XShape.hpp> -#include <offuh/com/sun/star/embed/InvalidStorageException.hpp> -#include <offuh/com/sun/star/embed/StorageWrappedTargetException.hdl> -#include <offuh/com/sun/star/embed/StorageWrappedTargetException.hpp> -#include <offuh/com/sun/star/embed/XStorage.hdl> -#include <offuh/com/sun/star/embed/XStorage.hpp> -#include <offuh/com/sun/star/io/BufferSizeExceededException.hpp> -#include <offuh/com/sun/star/io/IOException.hdl> -#include <offuh/com/sun/star/io/NotConnectedException.hdl> -#include <offuh/com/sun/star/io/NotConnectedException.hpp> -#include <offuh/com/sun/star/io/XInputStream.hdl> -#include <offuh/com/sun/star/io/XInputStream.hpp> -#include <offuh/com/sun/star/io/XOutputStream.hdl> -#include <offuh/com/sun/star/io/XOutputStream.hpp> -#include <offuh/com/sun/star/io/XStream.hdl> -#include <offuh/com/sun/star/lang/EventObject.hdl> -#include <offuh/com/sun/star/lang/IllegalArgumentException.hpp> -#include <offuh/com/sun/star/lang/WrappedTargetException.hdl> -#include <offuh/com/sun/star/lang/WrappedTargetException.hpp> -#include <offuh/com/sun/star/lang/XComponent.hpp> -#include <offuh/com/sun/star/lang/XEventListener.hpp> -#include <offuh/com/sun/star/packages/NoEncryptionException.hdl> -#include <offuh/com/sun/star/packages/NoEncryptionException.hpp> -#include <offuh/com/sun/star/packages/WrongPasswordException.hdl> -#include <offuh/com/sun/star/packages/WrongPasswordException.hpp> -#include <offuh/com/sun/star/uno/Exception.hdl> -#include <offuh/com/sun/star/uno/Exception.hpp> -#include <offuh/com/sun/star/uno/RuntimeException.hdl> -#include <offuh/com/sun/star/uno/RuntimeException.hpp> -#include <offuh/com/sun/star/uno/XAdapter.hdl> -#include <offuh/com/sun/star/uno/XAdapter.hpp> -#include <offuh/com/sun/star/uno/XInterface.hdl> -#include <offuh/com/sun/star/uno/XReference.hdl> -#include <offuh/com/sun/star/uno/XReference.hpp> -#include <offuh/com/sun/star/uno/XWeak.hpp> +#include <com/sun/star/awt/Point.hdl> +#include <com/sun/star/awt/Point.hpp> +#include <com/sun/star/awt/Size.hdl> +#include <com/sun/star/awt/Size.hpp> +#include <com/sun/star/beans/PropertyVetoException.hdl> +#include <com/sun/star/beans/PropertyVetoException.hpp> +#include <com/sun/star/container/ElementExistException.hdl> +#include <com/sun/star/container/ElementExistException.hpp> +#include <com/sun/star/container/NoSuchElementException.hpp> +#include <com/sun/star/container/XElementAccess.hdl> +#include <com/sun/star/container/XElementAccess.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/datatransfer/DataFlavor.hdl> +#include <com/sun/star/datatransfer/dnd/DragGestureEvent.hpp> +#include <com/sun/star/datatransfer/dnd/DragSourceDragEvent.hdl> +#include <com/sun/star/datatransfer/dnd/DragSourceDragEvent.hpp> +#include <com/sun/star/datatransfer/dnd/DragSourceDropEvent.hdl> +#include <com/sun/star/datatransfer/dnd/DragSourceEvent.hpp> +#include <com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.hdl> +#include <com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.hpp> +#include <com/sun/star/datatransfer/dnd/DropTargetDragEvent.hdl> +#include <com/sun/star/datatransfer/dnd/DropTargetDragEvent.hpp> +#include <com/sun/star/datatransfer/dnd/DropTargetDropEvent.hpp> +#include <com/sun/star/datatransfer/dnd/DropTargetEvent.hdl> +#include <com/sun/star/datatransfer/dnd/DropTargetEvent.hpp> +#include <com/sun/star/datatransfer/dnd/XDragGestureListener.hdl> +#include <com/sun/star/datatransfer/dnd/XDragGestureListener.hpp> +#include <com/sun/star/datatransfer/dnd/XDragSource.hdl> +#include <com/sun/star/datatransfer/dnd/XDragSource.hpp> +#include <com/sun/star/datatransfer/dnd/XDragSourceContext.hdl> +#include <com/sun/star/datatransfer/dnd/XDragSourceContext.hpp> +#include <com/sun/star/datatransfer/dnd/XDragSourceListener.hdl> +#include <com/sun/star/datatransfer/dnd/XDragSourceListener.hpp> +#include <com/sun/star/datatransfer/dnd/XDropTargetDragContext.hpp> +#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hdl> +#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp> +#include <com/sun/star/datatransfer/UnsupportedFlavorException.hdl> +#include <com/sun/star/datatransfer/XTransferable.hpp> +#include <com/sun/star/drawing/XShape.hpp> +#include <com/sun/star/embed/InvalidStorageException.hpp> +#include <com/sun/star/embed/StorageWrappedTargetException.hdl> +#include <com/sun/star/embed/StorageWrappedTargetException.hpp> +#include <com/sun/star/embed/XStorage.hdl> +#include <com/sun/star/embed/XStorage.hpp> +#include <com/sun/star/io/BufferSizeExceededException.hpp> +#include <com/sun/star/io/IOException.hdl> +#include <com/sun/star/io/NotConnectedException.hdl> +#include <com/sun/star/io/NotConnectedException.hpp> +#include <com/sun/star/io/XInputStream.hdl> +#include <com/sun/star/io/XInputStream.hpp> +#include <com/sun/star/io/XOutputStream.hdl> +#include <com/sun/star/io/XOutputStream.hpp> +#include <com/sun/star/io/XStream.hdl> +#include <com/sun/star/lang/EventObject.hdl> +#include <com/sun/star/lang/IllegalArgumentException.hpp> +#include <com/sun/star/lang/WrappedTargetException.hdl> +#include <com/sun/star/lang/WrappedTargetException.hpp> +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/lang/XEventListener.hpp> +#include <com/sun/star/packages/NoEncryptionException.hdl> +#include <com/sun/star/packages/NoEncryptionException.hpp> +#include <com/sun/star/packages/WrongPasswordException.hdl> +#include <com/sun/star/packages/WrongPasswordException.hpp> +#include <com/sun/star/uno/Exception.hdl> +#include <com/sun/star/uno/Exception.hpp> +#include <com/sun/star/uno/RuntimeException.hdl> +#include <com/sun/star/uno/RuntimeException.hpp> +#include <com/sun/star/uno/XAdapter.hdl> +#include <com/sun/star/uno/XAdapter.hpp> +#include <com/sun/star/uno/XInterface.hdl> +#include <com/sun/star/uno/XReference.hdl> +#include <com/sun/star/uno/XReference.hpp> +#include <com/sun/star/uno/XWeak.hpp> #include <osl/endian.h> #include <osl/interlck.h> #include <osl/mutex.hxx> diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index 87495b5da1ab..cfdbdcfd365b 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -417,7 +417,7 @@ public: virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId ) = 0; //add for ScNameCreateDlg virtual AbstractScNamePasteDlg * CreateScNamePasteDlg ( Window * pParent, const ScRangeName* pList, //add for ScNamePasteDlg - int nId , sal_Bool bInsList=sal_True ) = 0; + const ScRangeName* pLocalList, int nId , bool bInsList=true ) = 0; virtual AbstractScPivotFilterDlg * CreateScPivotFilterDlg ( Window* pParent, //add for ScPivotFilterDlg const SfxItemSet& rArgSet, sal_uInt16 nSourceTab , int nId ) = 0; diff --git a/sc/inc/token.hxx b/sc/inc/token.hxx index 9e766b0adb35..c56b2a6c01f6 100644 --- a/sc/inc/token.hxx +++ b/sc/inc/token.hxx @@ -244,7 +244,7 @@ private: private: ScNameToken(); // disabled public: - ScNameToken(sal_uInt16 nIndex, bool bGlobal); + ScNameToken(sal_uInt16 nIndex, bool bGlobal, OpCode eOpCode = ocName); ScNameToken(const ScNameToken& r); virtual ~ScNameToken(); virtual sal_uInt8 GetByte() const; diff --git a/sc/inc/viewopti.hxx b/sc/inc/viewopti.hxx index 998f1f693b28..00233f15445d 100644 --- a/sc/inc/viewopti.hxx +++ b/sc/inc/viewopti.hxx @@ -52,6 +52,7 @@ enum ScViewOption VOPT_OUTLINER, VOPT_HEADER, VOPT_GRID, + VOPT_GRID_ONTOP, VOPT_HELPLINES, VOPT_ANCHOR, VOPT_PAGEBREAKS, diff --git a/sc/prj/build.lst b/sc/prj/build.lst index ac021dfecd88..00807e2b3df1 100644 --- a/sc/prj/build.lst +++ b/sc/prj/build.lst @@ -1,2 +1,2 @@ -sc sc : filter TRANSLATIONS:translations vbahelper oovbaapi svx uui stoc BOOST:boost formula MDDS:mdds oox LIBXSLT:libxslt unoxml ure NULL +sc sc : filter TRANSLATIONS:translations vbahelper oovbaapi svx uui stoc BOOST:boost formula MDDS:mdds oox LIBXSLT:libxslt unoxml ure test NULL sc sc\prj nmake - all sc_prj NULL diff --git a/sc/qa/unit/data/qpro/indeterminate/.gitignore b/sc/qa/unit/data/qpro/indeterminate/.gitignore new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/sc/qa/unit/data/qpro/indeterminate/.gitignore diff --git a/sc/qa/unit/data/slk/fail/.gitignore b/sc/qa/unit/data/slk/fail/.gitignore new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/sc/qa/unit/data/slk/fail/.gitignore diff --git a/sc/qa/unit/data/slk/indeterminate/.gitignore b/sc/qa/unit/data/slk/indeterminate/.gitignore new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/sc/qa/unit/data/slk/indeterminate/.gitignore diff --git a/sc/qa/unit/data/slk/pass/.gitignore b/sc/qa/unit/data/slk/pass/.gitignore new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/sc/qa/unit/data/slk/pass/.gitignore diff --git a/sc/qa/unit/data/slk/pass/ooo75775-1.slk b/sc/qa/unit/data/slk/pass/ooo75775-1.slk new file mode 100644 index 000000000000..df34ee0aea29 --- /dev/null +++ b/sc/qa/unit/data/slk/pass/ooo75775-1.slk @@ -0,0 +1,1112 @@ +ID;PSCALC3 +C;X1;Y1;K"Code" +C;X2;Y1;K"Product Name" +C;X3;Y1;K4 +C;X4;Y1;K5 +C;X5;Y1;K6 +C;X6;Y1;K7 +C;X7;Y1;K8 +C;X8;Y1;K"REFERENCE" +C;X9;Y1;K"REMARK1" +C;X10;Y1;K"REMARK2" +C;X1;Y2;K38143200 +C;X2;Y2;K"SDN-21T-P1.5" +C;X3;Y2;K0 +C;X4;Y2;K0 +C;X5;Y2;K0 +C;X6;Y2;K0 +C;X7;Y2;K0 +C;X8;Y2;K"C070059" +C;X9;Y2;K"7 MARCH 07 ED" +C;X10;Y2;K"16 MARCH 07 ED" +C;X1;Y3;K46483000 +C;X2;Y3;K"YLR-02VF" +C;X3;Y3;K0 +C;X4;Y3;K0 +C;X5;Y3;K0 +C;X6;Y3;K0 +C;X7;Y3;K0 +C;X8;Y3;K"C070059" +C;X9;Y3;K"7 MARCH 07 ED" +C;X10;Y3;K"16 MARCH 07 ED" +C;X1;Y4;K47451000 +C;X2;Y4;K"3P-SDN" +C;X3;Y4;K0 +C;X4;Y4;K0 +C;X5;Y4;K0 +C;X6;Y4;K0 +C;X7;Y4;K0 +C;X8;Y4;K"C070059" +C;X9;Y4;K"7 MARCH 07 ED" +C;X10;Y4;K"16 MARCH 07 ED" +C;X1;Y5;K52180200 +C;X2;Y5;K"RT-01N-2.3A " +C;X3;Y5;K0 +C;X4;Y5;K0 +C;X5;Y5;K0 +C;X6;Y5;K0 +C;X7;Y5;K0 +C;X8;Y5;K"C070059" +C;X9;Y5;K"7 MARCH 07 ED" +C;X10;Y5;K"16 MARCH 07 ED" +C;X1;Y6;K56470000 +C;X2;Y6;K"B2PS-VH (LF)(SN) " +C;X3;Y6;K0 +C;X4;Y6;K1000 +C;X5;Y6;K1000 +C;X6;Y6;K0 +C;X7;Y6;K0 +C;X8;Y6;K"C070059" +C;X9;Y6;K"7 MARCH 07 ED" +C;X10;Y6;K"16 MARCH 07 ED" +C;X1;Y7;K56471600 +C;X2;Y7;K"B4PS-VH (LF)(SN) " +C;X3;Y7;K0 +C;X4;Y7;K0 +C;X5;Y7;K0 +C;X6;Y7;K0 +C;X7;Y7;K0 +C;X8;Y7;K"C070059" +C;X9;Y7;K"7 MARCH 07 ED" +C;X10;Y7;K"16 MARCH 07 ED" +C;X1;Y8;K56472400 +C;X2;Y8;K"B5PS-VH (LF)(SN)" +C;X3;Y8;K0 +C;X4;Y8;K0 +C;X5;Y8;K0 +C;X6;Y8;K0 +C;X7;Y8;K0 +C;X8;Y8;K"C070059" +C;X9;Y8;K"7 MARCH 07 ED" +C;X10;Y8;K"16 MARCH 07 ED" +C;X1;Y9;K56476100 +C;X2;Y9;K"B2P3S-VH (LF)(SN)" +C;X3;Y9;K7000 +C;X4;Y9;K2000 +C;X5;Y9;K1000 +C;X6;Y9;K0 +C;X7;Y9;K0 +C;X8;Y9;K"C070059" +C;X9;Y9;K"7 MARCH 07 ED" +C;X10;Y9;K"16 MARCH 07 ED" +C;X1;Y10;K56484500 +C;X2;Y10;K"S3P-VH (LF)(SN) " +C;X3;Y10;K0 +C;X4;Y10;K0 +C;X5;Y10;K0 +C;X6;Y10;K0 +C;X7;Y10;K0 +C;X8;Y10;K"C070059" +C;X9;Y10;K"7 MARCH 07 ED" +C;X10;Y10;K"16 MARCH 07 ED" +C;X1;Y11;K56553000 +C;X2;Y11;K"B06B-XASK-1 (LF)(SN) " +C;X3;Y11;K2000 +C;X4;Y11;K3000 +C;X5;Y11;K3000 +C;X6;Y11;K0 +C;X7;Y11;K0 +C;X8;Y11;K"C070059" +C;X9;Y11;K"7 MARCH 07 ED" +C;X10;Y11;K"16 MARCH 07 ED" +C;X1;Y12;K56560700 +C;X2;Y12;K"B03B-XASK-1-A (LF)(SN) " +C;X3;Y12;K0 +C;X4;Y12;K400 +C;X5;Y12;K1600 +C;X6;Y12;K0 +C;X7;Y12;K0 +C;X8;Y12;K"C070059" +C;X9;Y12;K"7 MARCH 07 ED" +C;X10;Y12;K"16 MARCH 07 ED" +C;X1;Y13;K56561400 +C;X2;Y13;K"B04B-XASK-1-A (LF)(SN) " +C;X3;Y13;K2000 +C;X4;Y13;K6000 +C;X5;Y13;K6000 +C;X6;Y13;K0 +C;X7;Y13;K0 +C;X8;Y13;K"C070059" +C;X9;Y13;K"7 MARCH 07 ED" +C;X10;Y13;K"16 MARCH 07 ED" +C;X1;Y14;K56562100 +C;X2;Y14;K"B05B-XASK-1-A (LF)(SN) " +C;X3;Y14;K1000 +C;X4;Y14;K1000 +C;X5;Y14;K400 +C;X6;Y14;K0 +C;X7;Y14;K0 +C;X8;Y14;K"C070059" +C;X9;Y14;K"7 MARCH 07 ED" +C;X10;Y14;K"16 MARCH 07 ED" +C;X1;Y15;K56562600 +C;X2;Y15;K"B06B-XASK-1-A (LF)(SN) " +C;X3;Y15;K2000 +C;X4;Y15;K4000 +C;X5;Y15;K5000 +C;X6;Y15;K0 +C;X7;Y15;K0 +C;X8;Y15;K"C070059" +C;X9;Y15;K"7 MARCH 07 ED" +C;X10;Y15;K"16 MARCH 07 ED" +C;X1;Y16;K56563100 +C;X2;Y16;K"B07B-XASK-1-A (LF)(SN) " +C;X3;Y16;K1000 +C;X4;Y16;K1000 +C;X5;Y16;K250 +C;X6;Y16;K0 +C;X7;Y16;K0 +C;X8;Y16;K"C070059" +C;X9;Y16;K"7 MARCH 07 ED" +C;X10;Y16;K"16 MARCH 07 ED" +C;X1;Y17;K56564600 +C;X2;Y17;K"B10B-XASK-1-A (LF)(SN) " +C;X3;Y17;K1000 +C;X4;Y17;K4000 +C;X5;Y17;K5000 +C;X6;Y17;K0 +C;X7;Y17;K0 +C;X8;Y17;K"C070059" +C;X9;Y17;K"7 MARCH 07 ED" +C;X10;Y17;K"16 MARCH 07 ED" +C;X1;Y18;K56613300 +C;X2;Y18;K"B18B-PHDSS(LF)(SN)" +C;X3;Y18;K0 +C;X4;Y18;K500 +C;X5;Y18;K500 +C;X6;Y18;K0 +C;X7;Y18;K0 +C;X8;Y18;K"C070059" +C;X9;Y18;K"7 MARCH 07 ED" +C;X10;Y18;K"16 MARCH 07 ED" +C;X1;Y19;K56614000 +C;X2;Y19;K"B20B-PHDSS (LF)(SN)" +C;X3;Y19;K0 +C;X4;Y19;K250 +C;X5;Y19;K250 +C;X6;Y19;K0 +C;X7;Y19;K0 +C;X8;Y19;K"C070059" +C;X9;Y19;K"7 MARCH 07 ED" +C;X10;Y19;K"16 MARCH 07 ED" +C;X1;Y20;K56615200 +C;X2;Y20;K"B24B-PHDSS (LF)(SN)" +C;X3;Y20;K0 +C;X4;Y20;K0 +C;X5;Y20;K0 +C;X6;Y20;K0 +C;X7;Y20;K0 +C;X8;Y20;K"C070059" +C;X9;Y20;K"7 MARCH 07 ED" +C;X10;Y20;K"16 MARCH 07 ED" +C;X1;Y21;K56626000 +C;X2;Y21;K"S8B-PHDSS(LF)(SN)" +C;X3;Y21;K0 +C;X4;Y21;K500 +C;X5;Y21;K0 +C;X6;Y21;K0 +C;X7;Y21;K0 +C;X8;Y21;K"C070059" +C;X9;Y21;K"7 MARCH 07 ED" +C;X10;Y21;K"16 MARCH 07 ED" +C;X1;Y22;K56629200 +C;X2;Y22;K"S20B-PHDSS(LF)(SN)" +C;X3;Y22;K0 +C;X4;Y22;K250 +C;X5;Y22;K250 +C;X6;Y22;K0 +C;X7;Y22;K0 +C;X8;Y22;K"C070059" +C;X9;Y22;K"7 MARCH 07 ED" +C;X10;Y22;K"16 MARCH 07 ED" +C;X1;Y23;K56632400 +C;X2;Y23;K"S32B-PHDSS(LF)(SN)" +C;X3;Y23;K0 +C;X4;Y23;K400 +C;X5;Y23;K400 +C;X6;Y23;K0 +C;X7;Y23;K0 +C;X8;Y23;K"C070059" +C;X9;Y23;K"7 MARCH 07 ED" +C;X10;Y23;K"16 MARCH 07 ED" +C;X1;Y24;K56651600 +C;X2;Y24;K"B03B-PASK-1 (LF)(SN)" +C;X3;Y24;K49000 +C;X4;Y24;K44000 +C;X5;Y24;K40000 +C;X6;Y24;K0 +C;X7;Y24;K0 +C;X8;Y24;K"C070059" +C;X9;Y24;K"7 MARCH 07 ED" +C;X10;Y24;K"16 MARCH 07 ED" +C;X1;Y25;K56652600 +C;X2;Y25;K"B04B-PASK-1 (LF)(SN) " +C;X3;Y25;K0 +C;X4;Y25;K0 +C;X5;Y25;K0 +C;X6;Y25;K0 +C;X7;Y25;K0 +C;X8;Y25;K"C070059" +C;X9;Y25;K"7 MARCH 07 ED" +C;X10;Y25;K"16 MARCH 07 ED" +C;X1;Y26;K56654200 +C;X2;Y26;K"B06B-PASK-1 (LF)(SN)" +C;X3;Y26;K0 +C;X4;Y26;K500 +C;X5;Y26;K500 +C;X6;Y26;K0 +C;X7;Y26;K0 +C;X8;Y26;K"C070059" +C;X9;Y26;K"7 MARCH 07 ED" +C;X10;Y26;K"16 MARCH 07 ED" +C;X1;Y27;K56655800 +C;X2;Y27;K"B08B-PASK-1 (LF)(SN)" +C;X3;Y27;K0 +C;X4;Y27;K0 +C;X5;Y27;K0 +C;X6;Y27;K0 +C;X7;Y27;K0 +C;X8;Y27;K"C070059" +C;X9;Y27;K"7 MARCH 07 ED" +C;X10;Y27;K"16 MARCH 07 ED" +C;X1;Y28;K56720000 +C;X2;Y28;K"B2P-SHF-1AA (LF)(SN)" +C;X3;Y28;K0 +C;X4;Y28;K0 +C;X5;Y28;K0 +C;X6;Y28;K0 +C;X7;Y28;K0 +C;X8;Y28;K"C070059" +C;X9;Y28;K"7 MARCH 07 ED" +C;X10;Y28;K"16 MARCH 07 ED" +C;X1;Y29;K56720800 +C;X2;Y29;K"B3P-SHF-1AA (LF)(SN)" +C;X3;Y29;K0 +C;X4;Y29;K0 +C;X5;Y29;K0 +C;X6;Y29;K0 +C;X7;Y29;K0 +C;X8;Y29;K"C070059" +C;X9;Y29;K"7 MARCH 07 ED" +C;X10;Y29;K"16 MARCH 07 ED" +C;X1;Y30;K56730500 +C;X2;Y30;K"BS3P-SHF-1AA (LF)(SN)" +C;X3;Y30;K0 +C;X4;Y30;K0 +C;X5;Y30;K0 +C;X6;Y30;K0 +C;X7;Y30;K0 +C;X8;Y30;K"C070059" +C;X9;Y30;K"7 MARCH 07 ED" +C;X10;Y30;K"16 MARCH 07 ED" +C;X1;Y31;K56732000 +C;X2;Y31;K"BS6P-SHF-1AA (LF)(SN) " +C;X3;Y31;K0 +C;X4;Y31;K0 +C;X5;Y31;K0 +C;X6;Y31;K0 +C;X7;Y31;K0 +C;X8;Y31;K"C070059" +C;X9;Y31;K"7 MARCH 07 ED" +C;X10;Y31;K"16 MARCH 07 ED" +C;X1;Y32;K56920200 +C;X2;Y32;K"B10B-PHDSS (LF)(SN)(P)" +C;X3;Y32;K0 +C;X4;Y32;K0 +C;X5;Y32;K0 +C;X6;Y32;K0 +C;X7;Y32;K0 +C;X8;Y32;K"C070059" +C;X9;Y32;K"7 MARCH 07 ED" +C;X10;Y32;K"16 MARCH 07 ED" +C;X1;Y33;K57356400 +C;X2;Y33;K"B08P-XL-HDS (LF)(SN)" +C;X3;Y33;K300 +C;X4;Y33;K400 +C;X5;Y33;K200 +C;X6;Y33;K0 +C;X7;Y33;K0 +C;X8;Y33;K"C070059" +C;X9;Y33;K"7 MARCH 07 ED" +C;X10;Y33;K"16 MARCH 07 ED" +C;X1;Y34;K57357700 +C;X2;Y34;K"B12P-XL-HDS (LF)(SN)" +C;X3;Y34;K300 +C;X4;Y34;K400 +C;X5;Y34;K300 +C;X6;Y34;K0 +C;X7;Y34;K0 +C;X8;Y34;K"C070059" +C;X9;Y34;K"7 MARCH 07 ED" +C;X10;Y34;K"16 MARCH 07 ED" +C;X1;Y35;K57374100 +C;X2;Y35;K"B06B-PASK (LF)(SN) " +C;X3;Y35;K0 +C;X4;Y35;K0 +C;X5;Y35;K2000 +C;X6;Y35;K0 +C;X7;Y35;K0 +C;X8;Y35;K"C070059" +C;X9;Y35;K"7 MARCH 07 ED" +C;X10;Y35;K"16 MARCH 07 ED" +C;X1;Y36;K57530600 +C;X2;Y36;K"S3B-PH-SM4-TB (LF)(SN)" +C;X3;Y36;K34000 +C;X4;Y36;K42000 +C;X5;Y36;K40000 +C;X6;Y36;K0 +C;X7;Y36;K0 +C;X8;Y36;K"C070059" +C;X9;Y36;K"7 MARCH 07 ED" +C;X10;Y36;K"16 MARCH 07 ED" +C;X1;Y37;K57628200 +C;X2;Y37;K"B14B-PASK-1N (LF)(SN)" +C;X3;Y37;K0 +C;X4;Y37;K0 +C;X5;Y37;K0 +C;X6;Y37;K0 +C;X7;Y37;K0 +C;X8;Y37;K"C070059" +C;X9;Y37;K"7 MARCH 07 ED" +C;X10;Y37;K"16 MARCH 07 ED" +C;X1;Y38;K57638200 +C;X2;Y38;K"BU04P-TZ-S (LF)(SN)" +C;X3;Y38;K0 +C;X4;Y38;K0 +C;X5;Y38;K1000 +C;X6;Y38;K0 +C;X7;Y38;K0 +C;X8;Y38;K"C070059" +C;X9;Y38;K"7 MARCH 07 ED" +C;X10;Y38;K"16 MARCH 07 ED" +C;X1;Y39;K57638300 +C;X2;Y39;K"BU05P-TZ-S (LF)(SN)" +C;X3;Y39;K0 +C;X4;Y39;K0 +C;X5;Y39;K1000 +C;X6;Y39;K0 +C;X7;Y39;K0 +C;X8;Y39;K"C070059" +C;X9;Y39;K"7 MARCH 07 ED" +C;X10;Y39;K"16 MARCH 07 ED" +C;X1;Y40;K57674800 +C;X2;Y40;K"B20B-XADSS-N (LF)(SN)" +C;X3;Y40;K0 +C;X4;Y40;K0 +C;X5;Y40;K0 +C;X6;Y40;K0 +C;X7;Y40;K0 +C;X8;Y40;K"C070059" +C;X9;Y40;K"7 MARCH 07 ED" +C;X10;Y40;K"16 MARCH 07 ED" +C;X1;Y41;K57675400 +C;X2;Y41;K"B22B-XADSS-N (LF)(SN)" +C;X3;Y41;K0 +C;X4;Y41;K0 +C;X5;Y41;K0 +C;X6;Y41;K0 +C;X7;Y41;K0 +C;X8;Y41;K"C070059" +C;X9;Y41;K"7 MARCH 07 ED" +C;X10;Y41;K"16 MARCH 07 ED" +C;X1;Y42;K57774700 +C;X2;Y42;K"B08B-XASK-1N (LF)(SN) " +C;X3;Y42;K0 +C;X4;Y42;K3000 +C;X5;Y42;K4000 +C;X6;Y42;K0 +C;X7;Y42;K0 +C;X8;Y42;K"C070059" +C;X9;Y42;K"7 MARCH 07 ED" +C;X10;Y42;K"16 MARCH 07 ED" +C;X1;Y43;K57957000 +C;X2;Y43;K"B14B-PH-SM4-TB (LF)(SN)" +C;X3;Y43;K18000 +C;X4;Y43;K21000 +C;X5;Y43;K20000 +C;X6;Y43;K0 +C;X7;Y43;K0 +C;X8;Y43;K"C070059" +C;X9;Y43;K"7 MARCH 07 ED" +C;X10;Y43;K"16 MARCH 07 ED" +C;X1;Y44;K58427500 +C;X2;Y44;K"S02B-VT (LF)(SN) " +C;X3;Y44;K11000 +C;X4;Y44;K17000 +C;X5;Y44;K14000 +C;X6;Y44;K0 +C;X7;Y44;K0 +C;X8;Y44;K"C070059" +C;X9;Y44;K"7 MARCH 07 ED" +C;X10;Y44;K"16 MARCH 07 ED" +C;X1;Y45;K58550200 +C;X2;Y45;K"B02(12.4)P-VL " +C;X3;Y45;K16000 +C;X4;Y45;K23000 +C;X5;Y45;K100 +C;X6;Y45;K0 +C;X7;Y45;K0 +C;X8;Y45;K"C070059" +C;X9;Y45;K"7 MARCH 07 ED" +C;X10;Y45;K"16 MARCH 07 ED" +C;X1;Y46;K58551000 +C;X2;Y46;K"B03P-VL " +C;X3;Y46;K0 +C;X4;Y46;K1000 +C;X5;Y46;K2000 +C;X6;Y46;K0 +C;X7;Y46;K0 +C;X8;Y46;K"C070059" +C;X9;Y46;K"7 MARCH 07 ED" +C;X10;Y46;K"16 MARCH 07 ED" +C;X1;Y47;K58551100 +C;X2;Y47;K"B03P-VL-R " +C;X3;Y47;K0 +C;X4;Y47;K0 +C;X5;Y47;K2000 +C;X6;Y47;K0 +C;X7;Y47;K0 +C;X8;Y47;K"C070059" +C;X9;Y47;K"7 MARCH 07 ED" +C;X10;Y47;K"16 MARCH 07 ED" +C;X1;Y48;K58552000 +C;X2;Y48;K"B04P-VL " +C;X3;Y48;K100 +C;X4;Y48;K100 +C;X5;Y48;K200 +C;X6;Y48;K0 +C;X7;Y48;K0 +C;X8;Y48;K"C070059" +C;X9;Y48;K"7 MARCH 07 ED" +C;X10;Y48;K"16 MARCH 07 ED" +C;X1;Y49;K58555000 +C;X2;Y49;K"B12P-VL" +C;X3;Y49;K0 +C;X4;Y49;K0 +C;X5;Y49;K0 +C;X6;Y49;K0 +C;X7;Y49;K0 +C;X8;Y49;K"C070059" +C;X9;Y49;K"7 MARCH 07 ED" +C;X10;Y49;K"16 MARCH 07 ED" +C;X1;Y50;K58998300 +C;X2;Y50;K"SM03(4.0)B-BDBS-1-TB (LF)(SN)" +C;X3;Y50;K34000 +C;X4;Y50;K42000 +C;X5;Y50;K40000 +C;X6;Y50;K0 +C;X7;Y50;K0 +C;X8;Y50;K"C070059" +C;X9;Y50;K"7 MARCH 07 ED" +C;X10;Y50;K"16 MARCH 07 ED" +C;X1;Y51;K67197700 +C;X2;Y51;K"(W)B02B-VT (LF)(SN)" +C;X3;Y51;K28000 +C;X4;Y51;K25000 +C;X5;Y51;K25000 +C;X6;Y51;K0 +C;X7;Y51;K0 +C;X8;Y51;K"C070059" +C;X9;Y51;K"7 MARCH 07 ED" +C;X10;Y51;K"16 MARCH 07 ED" +C;X1;Y52;K67230400 +C;X2;Y52;K"(W)B7B-EH-F1 (LF)(SN) " +C;X3;Y52;K9000 +C;X4;Y52;K15000 +C;X5;Y52;K22000 +C;X6;Y52;K0 +C;X7;Y52;K0 +C;X8;Y52;K"C070059" +C;X9;Y52;K"7 MARCH 07 ED" +C;X10;Y52;K"16 MARCH 07 ED" +C;X1;Y53;K67230500 +C;X2;Y53;K"(W)B8B-EH-F1 (LF)(SN) " +C;X3;Y53;K126000 +C;X4;Y53;K169000 +C;X5;Y53;K154000 +C;X6;Y53;K0 +C;X7;Y53;K0 +C;X8;Y53;K"C070059" +C;X9;Y53;K"7 MARCH 07 ED" +C;X10;Y53;K"16 MARCH 07 ED" +C;X1;Y54;K67230600 +C;X2;Y54;K"(W)B9B-EH-F1 (LF)(SN) " +C;X3;Y54;K58000 +C;X4;Y54;K61000 +C;X5;Y54;K54000 +C;X6;Y54;K0 +C;X7;Y54;K0 +C;X8;Y54;K"C070059" +C;X9;Y54;K"7 MARCH 07 ED" +C;X10;Y54;K"16 MARCH 07 ED" +C;X1;Y55;K67230700 +C;X2;Y55;K"(W)B10B-EH-F1 (LF)(SN) " +C;X3;Y55;K11000 +C;X4;Y55;K24000 +C;X5;Y55;K43000 +C;X6;Y55;K0 +C;X7;Y55;K0 +C;X8;Y55;K"C070059" +C;X9;Y55;K"7 MARCH 07 ED" +C;X10;Y55;K"16 MARCH 07 ED" +C;X1;Y56;K67260000 +C;X2;Y56;K"(W)B2B-EH (LF)(SN)" +C;X3;Y56;K2000 +C;X4;Y56;K1000 +C;X5;Y56;K1000 +C;X6;Y56;K0 +C;X7;Y56;K0 +C;X8;Y56;K"C070059" +C;X9;Y56;K"7 MARCH 07 ED" +C;X10;Y56;K"16 MARCH 07 ED" +C;X1;Y57;K67260600 +C;X2;Y57;K"(W)B3B-EH (LF)(SN) " +C;X3;Y57;K2000 +C;X4;Y57;K4000 +C;X5;Y57;K7000 +C;X6;Y57;K0 +C;X7;Y57;K0 +C;X8;Y57;K"C070059" +C;X9;Y57;K"7 MARCH 07 ED" +C;X10;Y57;K"16 MARCH 07 ED" +C;X1;Y58;K67270000 +C;X2;Y58;K"(W)B2B-PH-K-S (LF)(SN) " +C;X3;Y58;K0 +C;X4;Y58;K1000 +C;X5;Y58;K1000 +C;X6;Y58;K0 +C;X7;Y58;K0 +C;X8;Y58;K"C070059" +C;X9;Y58;K"7 MARCH 07 ED" +C;X10;Y58;K"16 MARCH 07 ED" +C;X1;Y59;K67271600 +C;X2;Y59;K"(W)B3B-PH-K-S (LF)(SN) " +C;X3;Y59;K1000 +C;X4;Y59;K21000 +C;X5;Y59;K35000 +C;X6;Y59;K0 +C;X7;Y59;K0 +C;X8;Y59;K"C070059" +C;X9;Y59;K"7 MARCH 07 ED" +C;X10;Y59;K"16 MARCH 07 ED" +C;X1;Y60;K67272600 +C;X2;Y60;K"(W)B4B-PH-K-S (LF)(SN)" +C;X3;Y60;K0 +C;X4;Y60;K37000 +C;X5;Y60;K66000 +C;X6;Y60;K0 +C;X7;Y60;K0 +C;X8;Y60;K"C070059" +C;X9;Y60;K"7 MARCH 07 ED" +C;X10;Y60;K"16 MARCH 07 ED" +C;X1;Y61;K67273400 +C;X2;Y61;K"(W)B5B-PH-K-S (LF)(SN) " +C;X3;Y61;K49000 +C;X4;Y61;K44000 +C;X5;Y61;K40000 +C;X6;Y61;K0 +C;X7;Y61;K0 +C;X8;Y61;K"C070059" +C;X9;Y61;K"7 MARCH 07 ED" +C;X10;Y61;K"16 MARCH 07 ED" +C;X1;Y62;K67274500 +C;X2;Y62;K"(W)B6B-PH-K-S (LF)(SN) " +C;X3;Y62;K60000 +C;X4;Y62;K65000 +C;X5;Y62;K78000 +C;X6;Y62;K0 +C;X7;Y62;K0 +C;X8;Y62;K"C070059" +C;X9;Y62;K"7 MARCH 07 ED" +C;X10;Y62;K"16 MARCH 07 ED" +C;X1;Y63;K67275400 +C;X2;Y63;K"(W)B7B-PH-K-S (LF)(SN) " +C;X3;Y63;K0 +C;X4;Y63;K0 +C;X5;Y63;K0 +C;X6;Y63;K0 +C;X7;Y63;K0 +C;X8;Y63;K"C070059" +C;X9;Y63;K"7 MARCH 07 ED" +C;X10;Y63;K"16 MARCH 07 ED" +C;X1;Y64;K67276200 +C;X2;Y64;K"(W)B8B-PH-K-S (LF)(SN)" +C;X3;Y64;K0 +C;X4;Y64;K19000 +C;X5;Y64;K33000 +C;X6;Y64;K0 +C;X7;Y64;K0 +C;X8;Y64;K"C070059" +C;X9;Y64;K"7 MARCH 07 ED" +C;X10;Y64;K"16 MARCH 07 ED" +C;X1;Y65;K67277000 +C;X2;Y65;K"(W)B9B-PH-K-S (LF)(SN) " +C;X3;Y65;K3000 +C;X4;Y65;K11000 +C;X5;Y65;K13000 +C;X6;Y65;K0 +C;X7;Y65;K0 +C;X8;Y65;K"C070059" +C;X9;Y65;K"7 MARCH 07 ED" +C;X10;Y65;K"16 MARCH 07 ED" +C;X1;Y66;K67277800 +C;X2;Y66;K"(W)B10B-PH-K-S (LF)(SN) " +C;X3;Y66;K52000 +C;X4;Y66;K49000 +C;X5;Y66;K45000 +C;X6;Y66;K0 +C;X7;Y66;K0 +C;X8;Y66;K"C070059" +C;X9;Y66;K"7 MARCH 07 ED" +C;X10;Y66;K"16 MARCH 07 ED" +C;X1;Y67;K67278600 +C;X2;Y67;K"(W)B11B-PH-K-S (LF)(SN) " +C;X3;Y67;K27000 +C;X4;Y67;K26000 +C;X5;Y67;K29000 +C;X6;Y67;K0 +C;X7;Y67;K0 +C;X8;Y67;K"C070059" +C;X9;Y67;K"7 MARCH 07 ED" +C;X10;Y67;K"16 MARCH 07 ED" +C;X1;Y68;K67279200 +C;X2;Y68;K"(W)B12B-PH-K-S (LF)(SN) " +C;X3;Y68;K36000 +C;X4;Y68;K64000 +C;X5;Y68;K74000 +C;X6;Y68;K0 +C;X7;Y68;K0 +C;X8;Y68;K"C070059" +C;X9;Y68;K"7 MARCH 07 ED" +C;X10;Y68;K"16 MARCH 07 ED" +C;X1;Y69;K67279800 +C;X2;Y69;K"(W)B13B-PH-K-S (LF)(SN) " +C;X3;Y69;K0 +C;X4;Y69;K0 +C;X5;Y69;K0 +C;X6;Y69;K0 +C;X7;Y69;K0 +C;X8;Y69;K"C070059" +C;X9;Y69;K"7 MARCH 07 ED" +C;X10;Y69;K"16 MARCH 07 ED" +C;X1;Y70;K67280300 +C;X2;Y70;K"(W)B14B-PH-K-S (LF)(SN) " +C;X3;Y70;K56000 +C;X4;Y70;K63000 +C;X5;Y70;K74000 +C;X6;Y70;K0 +C;X7;Y70;K0 +C;X8;Y70;K"C070059" +C;X9;Y70;K"7 MARCH 07 ED" +C;X10;Y70;K"16 MARCH 07 ED" +C;X1;Y71;K67280800 +C;X2;Y71;K"(W)B15B-PH-K-S (LF)(SN)" +C;X3;Y71;K49000 +C;X4;Y71;K44000 +C;X5;Y71;K40000 +C;X6;Y71;K0 +C;X7;Y71;K0 +C;X8;Y71;K"C070059" +C;X9;Y71;K"7 MARCH 07 ED" +C;X10;Y71;K"16 MARCH 07 ED" +C;X1;Y72;K67340000 +C;X2;Y72;K"(W)B2P-VH (LF)(SN) " +C;X3;Y72;K0 +C;X4;Y72;K9000 +C;X5;Y72;K4000 +C;X6;Y72;K0 +C;X7;Y72;K0 +C;X8;Y72;K"C070059" +C;X9;Y72;K"7 MARCH 07 ED" +C;X10;Y72;K"16 MARCH 07 ED" +C;X1;Y73;K67340700 +C;X2;Y73;K"(W)B2P-VH-B (LF)(SN) " +C;X3;Y73;K0 +C;X4;Y73;K0 +C;X5;Y73;K2000 +C;X6;Y73;K0 +C;X7;Y73;K0 +C;X8;Y73;K"C070059" +C;X9;Y73;K"7 MARCH 07 ED" +C;X10;Y73;K"16 MARCH 07 ED" +C;X1;Y74;K67341200 +C;X2;Y74;K"(W)B3P-VH (LF)(SN) " +C;X3;Y74;K0 +C;X4;Y74;K0 +C;X5;Y74;K0 +C;X6;Y74;K0 +C;X7;Y74;K0 +C;X8;Y74;K"C070059" +C;X9;Y74;K"7 MARCH 07 ED" +C;X10;Y74;K"16 MARCH 07 ED" +C;X1;Y75;K67342400 +C;X2;Y75;K"(W)B4P-VH (LF)(SN) " +C;X3;Y75;K29000 +C;X4;Y75;K45000 +C;X5;Y75;K40000 +C;X6;Y75;K0 +C;X7;Y75;K0 +C;X8;Y75;K"C070059" +C;X9;Y75;K"7 MARCH 07 ED" +C;X10;Y75;K"16 MARCH 07 ED" +C;X1;Y76;K67343400 +C;X2;Y76;K"(W)B5P-VH (LF)(SN) " +C;X3;Y76;K49000 +C;X4;Y76;K44000 +C;X5;Y76;K41000 +C;X6;Y76;K0 +C;X7;Y76;K0 +C;X8;Y76;K"C070059" +C;X9;Y76;K"7 MARCH 07 ED" +C;X10;Y76;K"16 MARCH 07 ED" +C;X1;Y77;K67344200 +C;X2;Y77;K"(W)B6P-VH (LF)(SN) " +C;X3;Y77;K0 +C;X4;Y77;K0 +C;X5;Y77;K2000 +C;X6;Y77;K0 +C;X7;Y77;K0 +C;X8;Y77;K"C070059" +C;X9;Y77;K"7 MARCH 07 ED" +C;X10;Y77;K"16 MARCH 07 ED" +C;X1;Y78;K67344700 +C;X2;Y78;K"(W)B6P-VH-B (LF)(SN);" +C;X3;Y78;K0 +C;X4;Y78;K500 +C;X5;Y78;K2000 +C;X6;Y78;K0 +C;X7;Y78;K0 +C;X8;Y78;K"C070059" +C;X9;Y78;K"7 MARCH 07 ED" +C;X10;Y78;K"16 MARCH 07 ED" +C;X1;Y79;K67345500 +C;X2;Y79;K"(W)B7P-VH-B (LF)(SN); " +C;X3;Y79;K2000 +C;X4;Y79;K4000 +C;X5;Y79;K5000 +C;X6;Y79;K0 +C;X7;Y79;K0 +C;X8;Y79;K"C070059" +C;X9;Y79;K"7 MARCH 07 ED" +C;X10;Y79;K"16 MARCH 07 ED" +C;X1;Y80;K67345800 +C;X2;Y80;K"(W)B8P-VH (LF)(SN) " +C;X3;Y80;K0 +C;X4;Y80;K1000 +C;X5;Y80;K1000 +C;X6;Y80;K0 +C;X7;Y80;K0 +C;X8;Y80;K"C070059" +C;X9;Y80;K"7 MARCH 07 ED" +C;X10;Y80;K"16 MARCH 07 ED" +C;X1;Y81;K67347000 +C;X2;Y81;K"(W)B9P-VH-B (LF)(SN); " +C;X3;Y81;K0 +C;X4;Y81;K1000 +C;X5;Y81;K2000 +C;X6;Y81;K0 +C;X7;Y81;K0 +C;X8;Y81;K"C070059" +C;X9;Y81;K"7 MARCH 07 ED" +C;X10;Y81;K"16 MARCH 07 ED" +C;X1;Y82;K67347200 +C;X2;Y82;K"(W)B10P-VH (LF)(SN) " +C;X3;Y82;K0 +C;X4;Y82;K0 +C;X5;Y82;K0 +C;X6;Y82;K0 +C;X7;Y82;K0 +C;X8;Y82;K"C070059" +C;X9;Y82;K"7 MARCH 07 ED" +C;X10;Y82;K"16 MARCH 07 ED" +C;X1;Y83;K67347600 +C;X2;Y83;K"(W)B10P-VH-B (LF)(SN); " +C;X3;Y83;K0 +C;X4;Y83;K0 +C;X5;Y83;K2000 +C;X6;Y83;K0 +C;X7;Y83;K0 +C;X8;Y83;K"C070059" +C;X9;Y83;K"7 MARCH 07 ED" +C;X10;Y83;K"16 MARCH 07 ED" +C;X1;Y84;K67347800 +C;X2;Y84;K"(W)B2P3-VH (LF)(SN) " +C;X3;Y84;K59000 +C;X4;Y84;K61000 +C;X5;Y84;K59000 +C;X6;Y84;K0 +C;X7;Y84;K0 +C;X8;Y84;K"C070059" +C;X9;Y84;K"7 MARCH 07 ED" +C;X10;Y84;K"16 MARCH 07 ED" +C;X1;Y85;K67350200 +C;X2;Y85;K"(W)B3P5-VH (LF)(SN)" +C;X3;Y85;K0 +C;X4;Y85;K1000 +C;X5;Y85;K0 +C;X6;Y85;K0 +C;X7;Y85;K0 +C;X8;Y85;K"C070059" +C;X9;Y85;K"7 MARCH 07 ED" +C;X10;Y85;K"16 MARCH 07 ED" +C;X1;Y86;K67350700 +C;X2;Y86;K"(W)B3P5-VH-B (LF)(SN); " +C;X3;Y86;K2000 +C;X4;Y86;K3000 +C;X5;Y86;K3000 +C;X6;Y86;K0 +C;X7;Y86;K0 +C;X8;Y86;K"C070059" +C;X9;Y86;K"7 MARCH 07 ED" +C;X10;Y86;K"16 MARCH 07 ED" +C;X1;Y87;K67383100 +C;X2;Y87;K"(W)B4P-VH-B (LF)(SN);" +C;X3;Y87;K0 +C;X4;Y87;K1000 +C;X5;Y87;K2000 +C;X6;Y87;K0 +C;X7;Y87;K0 +C;X8;Y87;K"C070059" +C;X9;Y87;K"7 MARCH 07 ED" +C;X10;Y87;K"16 MARCH 07 ED" +C;X1;Y88;K67384000 +C;X2;Y88;K"(W)B8P-VH-B (LF)(SN);" +C;X3;Y88;K0 +C;X4;Y88;K1000 +C;X5;Y88;K2000 +C;X6;Y88;K0 +C;X7;Y88;K0 +C;X8;Y88;K"C070059" +C;X9;Y88;K"7 MARCH 07 ED" +C;X10;Y88;K"16 MARCH 07 ED" +C;X1;Y89;K67384500 +C;X2;Y89;K"(W)B2P3-VH-B (LF)(SN); " +C;X3;Y89;K0 +C;X4;Y89;K1000 +C;X5;Y89;K3000 +C;X6;Y89;K0 +C;X7;Y89;K0 +C;X8;Y89;K"C070059" +C;X9;Y89;K"7 MARCH 07 ED" +C;X10;Y89;K"16 MARCH 07 ED" +C;X1;Y90;K67385300 +C;X2;Y90;K"(W)B2P4-VH-B (LF)(SN);" +C;X3;Y90;K0 +C;X4;Y90;K0 +C;X5;Y90;K0 +C;X6;Y90;K0 +C;X7;Y90;K0 +C;X8;Y90;K"C070059" +C;X9;Y90;K"7 MARCH 07 ED" +C;X10;Y90;K"16 MARCH 07 ED" +C;X1;Y91;K67559900 +C;X2;Y91;K"(G)S2B-XH-A (LF)(SN)" +C;X3;Y91;K0 +C;X4;Y91;K1000 +C;X5;Y91;K0 +C;X6;Y91;K0 +C;X7;Y91;K0 +C;X8;Y91;K"C070059" +C;X9;Y91;K"7 MARCH 07 ED" +C;X10;Y91;K"16 MARCH 07 ED" +C;X1;Y92;K67563400 +C;X2;Y92;K"(G)S6B-XH-A (LF)(SN)" +C;X3;Y92;K0 +C;X4;Y92;K0 +C;X5;Y92;K0 +C;X6;Y92;K0 +C;X7;Y92;K0 +C;X8;Y92;K"C070059" +C;X9;Y92;K"7 MARCH 07 ED" +C;X10;Y92;K"16 MARCH 07 ED" +C;X1;Y93;K67564800 +C;X2;Y93;K"(G)S8B-XH-A (LF)(SN) " +C;X3;Y93;K0 +C;X4;Y93;K500 +C;X5;Y93;K1000 +C;X6;Y93;K0 +C;X7;Y93;K0 +C;X8;Y93;K"C070059" +C;X9;Y93;K"7 MARCH 07 ED" +C;X10;Y93;K"16 MARCH 07 ED" +C;X1;Y94;K67565500 +C;X2;Y94;K"(G)S9B-XH-A (LF)(SN) " +C;X3;Y94;K0 +C;X4;Y94;K0 +C;X5;Y94;K0 +C;X6;Y94;K0 +C;X7;Y94;K0 +C;X8;Y94;K"C070059" +C;X9;Y94;K"7 MARCH 07 ED" +C;X10;Y94;K"16 MARCH 07 ED" +C;X1;Y95;K67567000 +C;X2;Y95;K"(G)S12B-XH-A (LF)(SN) " +C;X3;Y95;K0 +C;X4;Y95;K0 +C;X5;Y95;K0 +C;X6;Y95;K0 +C;X7;Y95;K0 +C;X8;Y95;K"C070059" +C;X9;Y95;K"7 MARCH 07 ED" +C;X10;Y95;K"16 MARCH 07 ED" +C;X1;Y96;K67570900 +C;X2;Y96;K"(G)S10B-XH-A-1 (LF)(SN)" +C;X3;Y96;K0 +C;X4;Y96;K0 +C;X5;Y96;K0 +C;X6;Y96;K0 +C;X7;Y96;K0 +C;X8;Y96;K"C070059" +C;X9;Y96;K"7 MARCH 07 ED" +C;X10;Y96;K"16 MARCH 07 ED" +C;X1;Y97;K67626000 +C;X2;Y97;K"(G)B02B-CZHK-B1 (LF)(SN)(V)" +C;X3;Y97;K0 +C;X4;Y97;K0 +C;X5;Y97;K0 +C;X6;Y97;K0 +C;X7;Y97;K0 +C;X8;Y97;K"C070059" +C;X9;Y97;K"7 MARCH 07 ED" +C;X10;Y97;K"16 MARCH 07 ED" +C;X1;Y98;K67626400 +C;X2;Y98;K"(G)B06B-CZHK-B1 (LF)(SN)(V)" +C;X3;Y98;K0 +C;X4;Y98;K0 +C;X5;Y98;K0 +C;X6;Y98;K0 +C;X7;Y98;K0 +C;X8;Y98;K"C070059" +C;X9;Y98;K"7 MARCH 07 ED" +C;X10;Y98;K"16 MARCH 07 ED" +C;X1;Y99;K67627500 +C;X2;Y99;K"(G)B17B-CZHK-B1 (LF)(SN)(V) " +C;X3;Y99;K2000 +C;X4;Y99;K14000 +C;X5;Y99;K0 +C;X6;Y99;K0 +C;X7;Y99;K0 +C;X8;Y99;K"C070059" +C;X9;Y99;K"7 MARCH 07 ED" +C;X10;Y99;K"16 MARCH 07 ED" +C;X1;Y100;K67660000 +C;X2;Y100;K"(G)B2B-XH-A (LF)(SN);" +C;X3;Y100;K3000 +C;X4;Y100;K1000 +C;X5;Y100;K3000 +C;X6;Y100;K0 +C;X7;Y100;K0 +C;X8;Y100;K"C070059" +C;X9;Y100;K"7 MARCH 07 ED" +C;X10;Y100;K"16 MARCH 07 ED" +C;X1;Y101;K67661000 +C;X2;Y101;K"(G)B3B-XH-A (LF)(SN);" +C;X3;Y101;K1000 +C;X4;Y101;K2000 +C;X5;Y101;K4000 +C;X6;Y101;K0 +C;X7;Y101;K0 +C;X8;Y101;K"C070059" +C;X9;Y101;K"7 MARCH 07 ED" +C;X10;Y101;K"16 MARCH 07 ED" +C;X1;Y102;K67662000 +C;X2;Y102;K"(G)B4B-XH-A (LF)(SN);" +C;X3;Y102;K19000 +C;X4;Y102;K19000 +C;X5;Y102;K18000 +C;X6;Y102;K0 +C;X7;Y102;K0 +C;X8;Y102;K"C070059" +C;X9;Y102;K"7 MARCH 07 ED" +C;X10;Y102;K"16 MARCH 07 ED" +C;X1;Y103;K67663600 +C;X2;Y103;K"(G)B6B-XH-A (LF)(SN);" +C;X3;Y103;K0 +C;X4;Y103;K0 +C;X5;Y103;K0 +C;X6;Y103;K0 +C;X7;Y103;K0 +C;X8;Y103;K"C070059" +C;X9;Y103;K"7 MARCH 07 ED" +C;X10;Y103;K"16 MARCH 07 ED" +C;X1;Y104;K67665200 +C;X2;Y104;K"(G)B8B-XH-A (LF)(SN);" +C;X3;Y104;K0 +C;X4;Y104;K0 +C;X5;Y104;K0 +C;X6;Y104;K0 +C;X7;Y104;K0 +C;X8;Y104;K"C070059" +C;X9;Y104;K"7 MARCH 07 ED" +C;X10;Y104;K"16 MARCH 07 ED" +C;X1;Y105;K67669400 +C;X2;Y105;K"(G)B15B-XH-A (LF)(SN);" +C;X3;Y105;K0 +C;X4;Y105;K0 +C;X5;Y105;K0 +C;X6;Y105;K0 +C;X7;Y105;K0 +C;X8;Y105;K"C070059" +C;X9;Y105;K"7 MARCH 07 ED" +C;X10;Y105;K"16 MARCH 07 ED" +C;X1;Y106;K68143200 +C;X2;Y106;K"(W)35FE-BT-VK-N " +C;X3;Y106;K0 +C;X4;Y106;K400 +C;X5;Y106;K0 +C;X6;Y106;K0 +C;X7;Y106;K0 +C;X8;Y106;K"C070059" +C;X9;Y106;K"7 MARCH 07 ED" +C;X10;Y106;K"16 MARCH 07 ED" +C;X1;Y107;K68970700 +C;X2;Y107;K"(Q)10JQ-BT " +C;X3;Y107;K0 +C;X4;Y107;K0 +C;X5;Y107;K0 +C;X6;Y107;K0 +C;X7;Y107;K0 +C;X8;Y107;K"C070059" +C;X9;Y107;K"7 MARCH 07 ED" +C;X10;Y107;K"16 MARCH 07 ED" +C;X1;Y108;K68978200 +C;X2;Y108;K"(Q)15JQ-ST " +C;X3;Y108;K0 +C;X4;Y108;K0 +C;X5;Y108;K0 +C;X6;Y108;K0 +C;X7;Y108;K0 +C;X8;Y108;K"C070059" +C;X9;Y108;K"7 MARCH 07 ED" +C;X10;Y108;K"16 MARCH 07 ED" +C;X1;Y109;K69778600 +C;X2;Y109;K"(F)B2P-VA-BF (LF)(SN) " +C;X3;Y109;K0 +C;X4;Y109;K8000 +C;X5;Y109;K36000 +C;X6;Y109;K0 +C;X7;Y109;K0 +C;X8;Y109;K"C070059" +C;X9;Y109;K"7 MARCH 07 ED" +C;X10;Y109;K"16 MARCH 07 ED" +C;X1;Y110;K69778800 +C;X2;Y110;K"(F)B2P-VA-BF-BK (LF)(SN) " +C;X3;Y110;K10000 +C;X4;Y110;K58000 +C;X5;Y110;K63000 +C;X6;Y110;K0 +C;X7;Y110;K0 +C;X8;Y110;K"C070059" +C;X9;Y110;K"7 MARCH 07 ED" +C;X10;Y110;K"16 MARCH 07 ED" +C;X1;Y111;K67666000 +C;X2;Y111;K"(G)B9B-XH-A (LF)(SN);" +C;X3;Y111;K250 +C;X4;Y111;K250 +C;X5;Y111;K1000 +C;X6;Y111;K0 +C;X7;Y111;K0 +C;X8;Y111;K"C070059" +C;X9;Y111;K"7 MARCH 07 ED" +C;X10;Y111;K"16 MARCH 07 ED" +E diff --git a/sc/qa/unit/data/slk/pass/ooo75775-2.slk b/sc/qa/unit/data/slk/pass/ooo75775-2.slk new file mode 100644 index 000000000000..dd0d824a300f --- /dev/null +++ b/sc/qa/unit/data/slk/pass/ooo75775-2.slk @@ -0,0 +1,1171 @@ +ID;PWXL;N;E +P;PGeneral +P;P0 +P;P0.00 +P;P#,##0 +P;P#,##0.00 +P;P#,##0_);;\(#,##0\) +P;P#,##0_);;[Red]\(#,##0\) +P;P#,##0.00_);;\(#,##0.00\) +P;P#,##0.00_);;[Red]\(#,##0.00\) +P;P"$"#,##0_);;\("$"#,##0\) +P;P"$"#,##0_);;[Red]\("$"#,##0\) +P;P"$"#,##0.00_);;\("$"#,##0.00\) +P;P"$"#,##0.00_);;[Red]\("$"#,##0.00\) +P;P0% +P;P0.00% +P;P0.00E+00 +P;P##0.0E+0 +P;P#\ ?/? +P;P#\ ??/?? +P;Pm/d/yyyy +P;Pd\-mmm\-yy +P;Pd\-mmm +P;Pmmm\-yy +P;Ph:mm\ AM/PM +P;Ph:mm:ss\ AM/PM +P;Ph:mm +P;Ph:mm:ss +P;Pm/d/yyyy\ h:mm +P;Pmm:ss +P;Pmm:ss.0 +P;P@ +P;P[h]:mm:ss +P;P_("$"* #,##0_);;_("$"* \(#,##0\);;_("$"* "-"_);;_(@_) +P;P_(* #,##0_);;_(* \(#,##0\);;_(* "-"_);;_(@_) +P;P_("$"* #,##0.00_);;_("$"* \(#,##0.00\);;_("$"* "-"??_);;_(@_) +P;P_(* #,##0.00_);;_(* \(#,##0.00\);;_(* "-"??_);;_(@_) +P;FArial;M200 +P;FArial;M200 +P;FArial;M200 +P;FArial;M200 +F;P0;DG0G8;M255 +B;Y112;X10;D0 0 111 9 +O;L;D;V0;K47;G100 0.001 +F;W1 1 14 +F;W2 2 31 +F;W8 8 12 +F;W9 9 13 +F;W11 11 4 +F;P30;FG0C;C1 +C;Y1;X1;K"Code" +C;X2;K"Product Name" +C;X3;K3 +C;X4;K4 +C;X5;K5 +C;X6;K6 +C;X7;K7 +C;X8;K"REFERENCE" +C;X9;K"REMARK1" +C;X10;K"REMARK2" +C;Y2;X1;K"07117000" +C;X2;K"RAV1.25-4 (V1.25-4 WITH JIS) " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y3;X1;K"08092100" +C;X2;K"RAV2-5 (V2-5 WITH JIS) " +C;X3;K15000 +C;X4;K15000 +C;X5;K15000 +C;X6;K10000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y4;X1;K35094200 +C;X2;K"SRA-51T-4 " +C;X3;K30000 +C;X4;K30000 +C;X5;K30000 +C;X6;K15000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y5;X1;K36043200 +C;X2;K"STO-41T-187N " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y6;X1;K36047200 +C;X2;K"STO-41T-187N-8 " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y7;X1;K36085200 +C;X2;K"STO-61T-250N " +C;X3;K0 +C;X4;K5000 +C;X5;K0 +C;X6;K5000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y8;X1;K36152200 +C;X2;K"SFO-61T-250A " +C;X3;K6000 +C;X4;K6000 +C;X5;K6000 +C;X6;K6000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y9;X1;K37063200 +C;X2;K"SVM-61T-P2.0 " +C;X3;K20000 +C;X4;K20000 +C;X5;K20000 +C;X6;K20000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y10;X1;K37065200 +C;X2;K"SVF-61T-P2.0 " +C;X3;K20000 +C;X4;K20000 +C;X5;K20000 +C;X6;K20000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y11;X1;K37117200 +C;X2;K"SZF-01T-P0.7 " +C;X3;K30000 +C;X4;K30000 +C;X5;K30000 +C;X6;K30000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y12;X1;K37120200 +C;X2;K"SZF-41T-P0.7 " +C;X3;K12000 +C;X4;K12000 +C;X5;K12000 +C;X6;K12000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y13;X1;K37122200 +C;X2;K"SYM-01T-P0.5A " +C;X3;K120000 +C;X4;K120000 +C;X5;K120000 +C;X6;K100000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y14;X1;K37125200 +C;X2;K"SYM-41T-P0.5A " +C;X3;K40000 +C;X4;K40000 +C;X5;K40000 +C;X6;K40000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y15;X1;K37131200 +C;X2;K"SYF-01T-P0.5A " +C;X3;K120000 +C;X4;K120000 +C;X5;K120000 +C;X6;K100000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y16;X1;K37134200 +C;X2;K"SYF-41T-P0.5A " +C;X3;K40000 +C;X4;K40000 +C;X5;K40000 +C;X6;K40000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y17;X1;K37135200 +C;X2;K"SSM-01T-P1.4 " +C;X3;K300000 +C;X4;K300000 +C;X5;K300000 +C;X6;K300000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y18;X1;K37140200 +C;X2;K"SSF-21T-P1.4 " +C;X3;K150000 +C;X4;K150000 +C;X5;K150000 +C;X6;K100000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y19;X1;K37157200 +C;X2;K"SXM-001T-P0.6 " +C;X3;K400000 +C;X4;K400000 +C;X5;K400000 +C;X6;K400000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y20;X1;K38147200 +C;X2;K"SPHD-001T-P0.5 " +C;X3;K30000 +C;X4;K30000 +C;X5;K30000 +C;X6;K30000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y21;X1;K38157200 +C;X2;K"SXA-001T-P0.6 (N) " +C;X3;K400000 +C;X4;K400000 +C;X5;K400000 +C;X6;K400000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y22;X1;K38157700 +C;X2;K"SXA-001T-P0.6L (N) " +C;X3;K300000 +C;X4;K300000 +C;X5;K300000 +C;X6;K300000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y23;X1;K38195200 +C;X2;K"SPND-001T-C0.5 " +C;X3;K16000 +C;X4;K8000 +C;X5;K16000 +C;X6;K8000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y24;X1;K46000000 +C;X2;K"1P-187 (HOUSING) " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y25;X1;K46311000 +C;X2;K"ELP-02V " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y26;X1;K46320000 +C;X2;K"ELR-02V " +C;X3;K0 +C;X4;K500 +C;X5;K0 +C;X6;K500 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y27;X1;K46405000 +C;X2;K"ZLP-02V " +C;X3;K8000 +C;X4;K8000 +C;X5;K5000 +C;X6;K5000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y28;X1;K46408000 +C;X2;K"ZLP-08V " +C;X3;K8000 +C;X4;K8000 +C;X5;K5000 +C;X6;K5000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y29;X1;K46415000 +C;X2;K"ZLR-02V " +C;X3;K1500 +C;X4;K1000 +C;X5;K1500 +C;X6;K1000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y30;X1;K46429000 +C;X2;K"YLR-02V " +C;X3;K10000 +C;X4;K10000 +C;X5;K10000 +C;X6;K10000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y31;X1;K46431000 +C;X2;K"YLR-04V " +C;X3;K6000 +C;X4;K6000 +C;X5;K6000 +C;X6;K3000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y32;X1;K46432000 +C;X2;K"YLR-06V " +C;X3;K5000 +C;X4;K5000 +C;X5;K5000 +C;X6;K5000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y33;X1;K46433000 +C;X2;K"YLR-08V " +C;X3;K2000 +C;X4;K2000 +C;X5;K2000 +C;X6;K1500 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y34;X1;K46445000 +C;X2;K"YLR-12VA " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y35;X1;K46447000 +C;X2;K"YLR-16V " +C;X3;K1000 +C;X4;K1000 +C;X5;K1000 +C;X6;K1000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y36;X1;K46464000 +C;X2;K"SLP-02V " +C;X3;K1000 +C;X4;K1000 +C;X5;K1000 +C;X6;K1000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y37;X1;K46474000 +C;X2;K"SLR-02VF " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y38;X1;K46520000 +C;X2;K"HLP-02V " +C;X3;K2000 +C;X4;K2000 +C;X5;K2000 +C;X6;K2000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y39;X1;K46521000 +C;X2;K"HLP-03V " +C;X3;K15000 +C;X4;K15000 +C;X5;K10000 +C;X6;K10000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y40;X1;K46522000 +C;X2;K"HLP-04V " +C;X3;K60000 +C;X4;K60000 +C;X5;K50000 +C;X6;K50000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y41;X1;K46530000 +C;X2;K"HLR-02V " +C;X3;K2000 +C;X4;K2000 +C;X5;K2000 +C;X6;K2000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y42;X1;K46531000 +C;X2;K"HLR-03V " +C;X3;K10000 +C;X4;K10000 +C;X5;K10000 +C;X6;K10000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y43;X1;K46533000 +C;X2;K"HLR-08V " +C;X3;K1500 +C;X4;K1500 +C;X5;K1500 +C;X6;K1500 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y44;X1;K46535000 +C;X2;K"HLR-04VF " +C;X3;K100000 +C;X4;K100000 +C;X5;K75000 +C;X6;K75000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y45;X1;K46545000 +C;X2;K"VLP-03V " +C;X3;K3000 +C;X4;K3000 +C;X5;K3000 +C;X6;K3000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y46;X1;K46547000 +C;X2;K"VLP-04V " +C;X3;K1500 +C;X4;K1500 +C;X5;K1500 +C;X6;K1500 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y47;X1;K46548000 +C;X2;K"VLP-06V " +C;X3;K500 +C;X4;K500 +C;X5;K500 +C;X6;K500 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y48;X1;K46553000 +C;X2;K"VLR-03V " +C;X3;K1000 +C;X4;K1000 +C;X5;K1000 +C;X6;K1000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y49;X1;K46554000 +C;X2;K"VLR-02V " +C;X3;K8000 +C;X4;K8000 +C;X5;K8000 +C;X6;K8000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y50;X1;K46555000 +C;X2;K"VLR-04V " +C;X3;K1500 +C;X4;K1500 +C;X5;K1500 +C;X6;K1500 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y51;X1;K46571000 +C;X2;K"XMP-12V " +C;X3;K1000 +C;X4;K1000 +C;X5;K1000 +C;X6;K1000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y52;X1;K46576000 +C;X2;K"XMP-18V " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y53;X1;K46580000 +C;X2;K"XMP-02V " +C;X3;K10000 +C;X4;K10000 +C;X5;K10000 +C;X6;K10000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y54;X1;K46581000 +C;X2;K"XMP-03V " +C;X3;K0 +C;X4;K50000 +C;X5;K0 +C;X6;K50000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y55;X1;K46583000 +C;X2;K"XMP-05V " +C;X3;K2000 +C;X4;K2000 +C;X5;K2000 +C;X6;K1000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y56;X1;K46584000 +C;X2;K"XMP-06V " +C;X3;K3000 +C;X4;K3000 +C;X5;K3000 +C;X6;K3000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y57;X1;K46587000 +C;X2;K"XMP-09V " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y58;X1;K46590000 +C;X2;K"XMR-02V " +C;X3;K15000 +C;X4;K15000 +C;X5;K15000 +C;X6;K15000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y59;X1;K46591000 +C;X2;K"XMR-03V " +C;X3;K150000 +C;X4;K150000 +C;X5;K150000 +C;X6;K150000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y60;X1;K46593000 +C;X2;K"XMR-05V " +C;X3;K1500 +C;X4;K1500 +C;X5;K1000 +C;X6;K1000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y61;X1;K46594000 +C;X2;K"XMR-06V " +C;X3;K3000 +C;X4;K3000 +C;X5;K3000 +C;X6;K2000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y62;X1;K46597000 +C;X2;K"XMR-09V " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y63;X1;K46601000 +C;X2;K"XMR-12V " +C;X3;K1000 +C;X4;K1000 +C;X5;K1000 +C;X6;K1000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y64;X1;K46606000 +C;X2;K"XMR-18V " +C;X3;K500 +C;X4;K0 +C;X5;K500 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y65;X1;K46610000 +C;X2;K"YLP-02V (NN) " +C;X3;K15000 +C;X4;K15000 +C;X5;K15000 +C;X6;K15000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y66;X1;K46611000 +C;X2;K"YLP-03V (NN) " +C;X3;K1000 +C;X4;K0 +C;X5;K1000 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y67;X1;K46612000 +C;X2;K"YLP-04V (NN) " +C;X3;K3000 +C;X4;K3000 +C;X5;K3000 +C;X6;K2000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y68;X1;K46613000 +C;X2;K"YLP-06V (NN) " +C;X3;K2500 +C;X4;K2500 +C;X5;K2500 +C;X6;K2500 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y69;X1;K46613600 +C;X2;K"YLP-08V (NN) " +C;X3;K2000 +C;X4;K2000 +C;X5;K2000 +C;X6;K2000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y70;X1;K46614200 +C;X2;K"YLP-09V (NN) " +C;X3;K1000 +C;X4;K1000 +C;X5;K1000 +C;X6;K500 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y71;X1;K46615400 +C;X2;K"YLP-12VA (NN) " +C;X3;K400 +C;X4;K200 +C;X5;K200 +C;X6;K200 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y72;X1;K46616500 +C;X2;K"YLP-16V(NN) " +C;X3;K2000 +C;X4;K2000 +C;X5;K1000 +C;X6;K1000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y73;X1;K46636100 +C;X2;K"VLP-04VN-1 " +C;X3;K2000 +C;X4;K2000 +C;X5;K2000 +C;X6;K2000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y74;X1;K47235000 +C;X2;K"VHR-3M " +C;X3;K1000 +C;X4;K0 +C;X5;K1000 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y75;X1;K47237000 +C;X2;K"VHR-5M " +C;X3;K8000 +C;X4;K8000 +C;X5;K8000 +C;X6;K8000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y76;X1;K47238000 +C;X2;K"VHR-6M " +C;X3;K2000 +C;X4;K2000 +C;X5;K2000 +C;X6;K2000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y77;X1;K47239000 +C;X2;K"VHR-7M " +C;X3;K3000 +C;X4;K3000 +C;X5;K3000 +C;X6;K3000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y78;X1;K47241000 +C;X2;K"VHR-9M " +C;X3;K5000 +C;X4;K5000 +C;X5;K3000 +C;X6;K3000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y79;X1;K47623000 +C;X2;K"XAP-15V-1 " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y80;X1;K47692800 +C;X2;K"XADRP-24V " +C;X3;K3000 +C;X4;K3000 +C;X5;K3000 +C;X6;K3000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y81;X1;K47695200 +C;X2;K"XADRP-36V " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y82;X1;K47696000 +C;X2;K"XADRP-40V " +C;X3;K2000 +C;X4;K2000 +C;X5;K2000 +C;X6;K2000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y83;X1;K47719900 +C;X2;K"PAP-02V-S " +C;X3;K5000 +C;X4;K5000 +C;X5;K5000 +C;X6;K5000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y84;X1;K47735600 +C;X2;K"PADP-24V-1-S " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y85;X1;K47854700 +C;X2;K"PNDP-24V-Z " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y86;X1;K67004500 +C;X2;K"(W)SPS-51T-187-8 " +C;X3;K7500 +C;X4;K7500 +C;X5;K7500 +C;X6;K7500 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y87;X1;K67011000 +C;X2;K"(W)SFPS-41T-187 " +C;X3;K5000 +C;X4;K0 +C;X5;K5000 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y88;X1;K67011500 +C;X2;K"(W)SFPS-61T-250 " +C;X3;K12000 +C;X4;K12000 +C;X5;K6000 +C;X6;K6000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y89;X1;K67054200 +C;X2;K"(W)VHR-7N " +C;X3;K15000 +C;X4;K15000 +C;X5;K10000 +C;X6;K10000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y90;X1;K67055200 +C;X2;K"(W)VHR-8N " +C;X3;K3000 +C;X4;K3000 +C;X5;K3000 +C;X6;K3000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y91;X1;K67056400 +C;X2;K"(W)VHR-10N " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y92;X1;K68085500 +C;X2;K"(W)PHR-2 " +C;X3;K30000 +C;X4;K30000 +C;X5;K30000 +C;X6;K15000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y93;X1;K68087500 +C;X2;K"(W)PHR-3 " +C;X3;K20000 +C;X4;K20000 +C;X5;K20000 +C;X6;K15000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y94;X1;K68191000 +C;X2;K"(W)SPH-002T-N0.5S " +C;X3;K100000 +C;X4;K100000 +C;X5;K100000 +C;X6;K100000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y95;X1;K68269700 +C;X2;K"(W)SVH-21T-P1.1 " +C;X3;K100000 +C;X4;K100000 +C;X5;K100000 +C;X6;K100000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y96;X1;K68500000 +C;X2;K"(G)SXH-001T-P0.6 " +C;X3;K200000 +C;X4;K200000 +C;X5;K200000 +C;X6;K200000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y97;X1;K68513500 +C;X2;K"(G)XAP-02V-1 " +C;X3;K50000 +C;X4;K50000 +C;X5;K50000 +C;X6;K50000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y98;X1;K68517000 +C;X2;K"(G)XAP-04V-1 " +C;X3;K2000 +C;X4;K2000 +C;X5;K2000 +C;X6;K2000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y99;X1;K68518200 +C;X2;K"(G)XAP-05V-1 " +C;X3;K3000 +C;X4;K3000 +C;X5;K3000 +C;X6;K3000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y100;X1;K68519400 +C;X2;K"(G)XAP-06V-1 " +C;X3;K3000 +C;X4;K3000 +C;X5;K2000 +C;X6;K2000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y101;X1;K68522000 +C;X2;K"(G)XAP-08V-1 " +C;X3;K10000 +C;X4;K10000 +C;X5;K10000 +C;X6;K10000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y102;X1;K68523200 +C;X2;K"(G)XAP-09V-1 " +C;X3;K2000 +C;X4;K2000 +C;X5;K1000 +C;X6;K1000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y103;X1;K68524400 +C;X2;K"(G)XAP-10V-1 " +C;X3;K5000 +C;X4;K5000 +C;X5;K5000 +C;X6;K5000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y104;X1;K68525600 +C;X2;K"(G)XAP-11V-1 " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y105;X1;K68526800 +C;X2;K"(G)XAP-12V-1 " +C;X3;K2000 +C;X4;K2000 +C;X5;K2000 +C;X6;K2000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y106;X1;K68528600 +C;X2;K"(G)XAP-13V-1 " +C;X3;K3000 +C;X4;K3000 +C;X5;K3000 +C;X6;K3000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y107;X1;K68529600 +C;X2;K"(G)XAP-14V-1 " +C;X3;K3000 +C;X4;K3000 +C;X5;K3000 +C;X6;K3000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y108;X1;K68533000 +C;X2;K"(G)XAP-15V-1 " +C;X3;K2000 +C;X4;K2000 +C;X5;K2000 +C;X6;K2000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y109;X1;K68534200 +C;X2;K"(G)XAP-20V-1 " +C;X3;K500 +C;X4;K500 +C;X5;K500 +C;X6;K500 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y110;X1;K68540000 +C;X2;K"(G)XHP-2 " +C;X3;K10000 +C;X4;K0 +C;X5;K10000 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y111;X1;K68544000 +C;X2;K"(G)XHP-4 " +C;X3;K30000 +C;X4;K30000 +C;X5;K30000 +C;X6;K30000 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +C;Y112;X1;K68804000 +C;X2;K"(Q)SVH-41T-P1.1 " +C;X3;K0 +C;X4;K0 +C;X5;K0 +C;X6;K0 +C;X7;K0 +C;X8;K"C070037" +C;X9;K"13 NOV 06 ED" +C;X10;K"15 FEB 07 ED" +E diff --git a/sc/qa/unit/data/slk/pass/ooo80484-1.slk b/sc/qa/unit/data/slk/pass/ooo80484-1.slk new file mode 100644 index 000000000000..b86d5ba9781f --- /dev/null +++ b/sc/qa/unit/data/slk/pass/ooo80484-1.slk @@ -0,0 +1,11 @@ +ID;PXL;N;E
P;PGeneral
P;P0
P;P0.00
P;P#,##0
P;P#,##0.00
P;P"$"#,##0 ;;("$"#,##0)
P;P"$"#,##0.00 ;;("$"#,##0.00)
P;P0%
P;P0.00%
P;P0.00E+00
P;Pm/d/yy
P;Pd-mmm-yy
P;Pd-mmm
P;Pmmm-yy
P;Ph:mm AM/PM
P;Ph:mm:ss AM/PM
P;Ph:mm
P;Ph:mm:ss
P;Pm/d/yy h:mm
F;P0;DG0G10;N3 10
B;Y11;X10
O;L
F;W1 1 9 +F;W2 2 10 +F;W3 3 10 +F;W4 4 10 +F;W5 5 10 +F;W6 6 10 +F;W7 7 10 +F;W8 8 10 +F;W9 9 10 +F;W10 10 10 +F;P0;FG0C;Y1;X10
C;K"Overall"
F;P0;FG0C;Y2;X1
C;K"Category"
F;P10;FG0C;X2
C;K37651
F;P10;FG0C;X3
C;K37679
F;P10;FG0C;X4
C;K37710
F;P10;FG0C;X5
C;K37740
F;P10;FG0C;X6
C;K37771
F;P10;FG0C;X7
C;K37801
F;P10;FG0C;X8
C;K37832
F;P10;FG0C;X9
C;K37840
F;P0;FG0C;X10
C;K"Total"
F;P0;FG0L;Y3;X1
C;K""
F;P0;FG0L;X2
C;K""
F;P0;FG0L;X3
C;K""
F;P0;FG0L;X4
C;K""
F;P0;FG0L;X5
C;K""
F;P0;FG0L;X6
C;K""
F;P0;FG0L;X7
C;K""
F;P0;FG0L;X8
C;K""
F;P0;FG0L;X9
C;K""
F;P0;FG0L;X10
C;K""
F;P0;FG0L;Y4;X1
C;K"Outflows"
F;P0;FG0L;Y5;X1
C;K"Auto:"
F;P0;FG0L;Y6;X1
C;K"Fuel"
F;P4;FF2R;X2
C;K54.43
F;P4;FF2R;X3
C;K0.00
F;P4;FF2R;X4
C;K285.52
F;P4;FF2R;X5
C;K100.00
F;P4;FF2R;X6
C;K246.89
F;P4;FF2R;X7
C;K214.04
F;P4;FF2R;X8
C;K99.76
F;P4;FF2R;X9
C;K100.00
F;P4;FF2R;X10
C;K1100.64
F;P0;FG0L;Y7;X2
C;K""
F;P0;FG0L;X3
C;K""
F;P0;FG0L;X4
C;K""
F;P0;FG0L;X5
C;K""
F;P0;FG0L;X6
C;K""
F;P0;FG0L;X7
C;K""
F;P0;FG0L;X8
C;K""
F;P0;FG0L;X9
C;K""
F;P0;FG0L;X10
C;K""
F;P0;FG0L;Y8;X1
C;K"Total Auto"
F;P4;FF2R;X2
C;K54.43
F;P4;FF2R;X3
C;K0.00
F;P4;FF2R;X4
C;K285.52
F;P4;FF2R;X5
C;K100.00
F;P4;FF2R;X6
C;K246.89
F;P4;FF2R;X7
C;K214.04
F;P4;FF2R;X8
C;K99.76
F;P4;FF2R;X9
C;K100.00
F;P4;FF2R;X10
C;K1100.64
F;P0;FG0L;Y9;X2
C;K""
F;P0;FG0L;X3
C;K""
F;P0;FG0L;X4
C;K""
F;P0;FG0L;X5
C;K""
F;P0;FG0L;X6
C;K""
F;P0;FG0L;X7
C;K""
F;P0;FG0L;X8
C;K""
F;P0;FG0L;X9
C;K""
F;P0;FG0L;X10
C;K""
F;P0;FG0L;Y10;X1
C;K"Total Outflows"
F;P4;FF2R;X2
C;K54.43
F;P4;FF2R;X3
C;K0.00
F;P4;FF2R;X4
C;K285.52
F;P4;FF2R;X5
C;K100.00
F;P4;FF2R;X6
C;K246.89
F;P4;FF2R;X7
C;K214.04
F;P4;FF2R;X8
C;K99.76
F;P4;FF2R;X9
C;K100.00
F;P4;FF2R;X10
C;K1100.64
F;P0;FG0L;Y11;X2
C;K"============"
F;P0;FG0L;X3
C;K"============"
F;P0;FG0L;X4
C;K"============"
F;P0;FG0L;X5
C;K"============"
F;P0;FG0L;X6
C;K"============"
F;P0;FG0L;X7
C;K"============"
F;P0;FG0L;X8
C;K"============"
F;P0;FG0L;X9
C;K"============"
F;P0;FG0L;X10
C;K"============"
E
\ No newline at end of file diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx new file mode 100644 index 000000000000..58189b0c3336 --- /dev/null +++ b/sc/qa/unit/filters-test.cxx @@ -0,0 +1,256 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Version: MPL 1.1 / GPLv3+ / LGPLv3+ + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (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.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Initial Developer of the Original Code is + * Caolán McNamara <caolanm@redhat.com> + * Portions created by the Initial Developer are Copyright (C) 2011 the + * Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Caolán McNamara <caolanm@redhat.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 3 or later (the "GPLv3+"), or + * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), + * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable + * instead of those above. + */ + +#include <sal/cppunit.h> + +#include <sal/config.h> +#include <osl/file.hxx> +#include <osl/process.h> + +#include <cppuhelper/compbase1.hxx> +#include <cppuhelper/bootstrap.hxx> +#include <cppuhelper/basemutex.hxx> + +#include <comphelper/processfactory.hxx> + +#include <i18npool/mslangid.hxx> + +#include <tools/urlobj.hxx> + +#include <unotools/tempfile.hxx> +#include <unotools/syslocaleoptions.hxx> + +#include <vcl/svapp.hxx> + +#include <ucbhelper/contentbroker.hxx> + +#include <sfx2/app.hxx> +#include <sfx2/docfilt.hxx> +#include <sfx2/docfile.hxx> +#include <sfx2/sfxmodelfactory.hxx> + +#include "docsh.hxx" + +const int indeterminate = 2; + +using namespace ::com::sun::star; + +/* Implementation of Filters test */ + +class FiltersTest : public CppUnit::TestFixture +{ +public: + FiltersTest(); + ~FiltersTest(); + + virtual void setUp(); + virtual void tearDown(); + + void recursiveScan(const rtl::OUString &rFilter, const rtl::OUString &rURL, const rtl::OUString &rUserData, int nExpected); + bool load(const rtl::OUString &rFilter, const rtl::OUString &rURL, const rtl::OUString &rUserData); + + /** + * Ensure CVEs remain unbroken + */ + void testCVEs(); + + CPPUNIT_TEST_SUITE(FiltersTest); +#if !defined(__OpenBSD__) + CPPUNIT_TEST(testCVEs); +#endif + CPPUNIT_TEST_SUITE_END(); + +private: + uno::Reference<uno::XComponentContext> m_xContext; + uno::Reference<lang::XMultiComponentFactory> m_xFactory; + uno::Reference<uno::XInterface> m_xCalcComponent; + ::rtl::OUString m_aSrcRoot; +}; + +bool FiltersTest::load(const rtl::OUString &rFilter, const rtl::OUString &rURL, + const rtl::OUString &rUserData) +{ + SfxFilter aFilter( + rFilter, + rtl::OUString(), 0, 0, rtl::OUString(), 0, rtl::OUString(), + rUserData, rtl::OUString() ); + + ScDocShellRef xDocShRef = new ScDocShell; + SfxMedium aSrcMed(rURL, STREAM_STD_READ, true); + aSrcMed.SetFilter(&aFilter); + return xDocShRef->DoLoad(&aSrcMed); +} + +void FiltersTest::recursiveScan(const rtl::OUString &rFilter, const rtl::OUString &rURL, const rtl::OUString &rUserData, int nExpected) +{ + osl::Directory aDir(rURL); + + CPPUNIT_ASSERT(osl::FileBase::E_None == aDir.open()); + osl::DirectoryItem aItem; + osl::FileStatus aFileStatus(osl_FileStatus_Mask_FileURL|osl_FileStatus_Mask_Type); + while (aDir.getNextItem(aItem) == osl::FileBase::E_None) + { + aItem.getFileStatus(aFileStatus); + rtl::OUString sURL = aFileStatus.getFileURL(); + if (aFileStatus.getFileType() == osl::FileStatus::Directory) + recursiveScan(rFilter, sURL, rUserData, nExpected); + else + { + sal_Int32 nLastSlash = sURL.lastIndexOf('/'); + + //ignore .files + if ( + (nLastSlash != -1) && (nLastSlash+1 < sURL.getLength()) && + (sURL.getStr()[nLastSlash+1] == '.') + ) + { + continue; + } + + rtl::OString aRes(rtl::OUStringToOString(sURL, + osl_getThreadTextEncoding())); + if (nExpected == indeterminate) + { + fprintf(stderr, "loading %s\n", aRes.getStr()); + } + sal_uInt32 nStartTime = osl_getGlobalTimer(); + bool bRes = load(rFilter, sURL, rUserData); + sal_uInt32 nEndTime = osl_getGlobalTimer(); + if (nExpected == indeterminate) + { + fprintf(stderr, "pass/fail was %d (%"SAL_PRIuUINT32" ms)\n", + bRes, nEndTime-nStartTime); + continue; + } + CPPUNIT_ASSERT_MESSAGE(aRes.getStr(), bRes == nExpected); + } + } + CPPUNIT_ASSERT(osl::FileBase::E_None == aDir.close()); +} + +void FiltersTest::testCVEs() +{ + recursiveScan(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Quattro Pro 6.0")), + m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/clone/calc/sc/qa/unit/data/qpro/pass")), rtl::OUString(), true); + + recursiveScan(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Quattro Pro 6.0")), + m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/clone/calc/sc/qa/unit/data/qpro/fail")), rtl::OUString(), false); + + recursiveScan(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Quattro Pro 6.0")), + m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/clone/calc/sc/qa/unit/data/qpro/indeterminate")), rtl::OUString(), indeterminate); + + //warning, the current "sylk filter" in sc (docsh.cxx) automatically + //chains on failure on trying as csv, rtf, etc. so "success" may + //not indicate that it imported as .slk. + recursiveScan(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SYLK")), + m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/clone/calc/sc/qa/unit/data/slk/pass")), rtl::OUString(), true); + + recursiveScan(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SYLK")), + m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/clone/calc/sc/qa/unit/data/slk/fail")), rtl::OUString(), false); + + recursiveScan(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SYLK")), + m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/clone/calc/sc/qa/unit/data/slk/indeterminate")), rtl::OUString(), indeterminate); + +} + +FiltersTest::FiltersTest() + : m_aSrcRoot(RTL_CONSTASCII_USTRINGPARAM("file://")) +{ + m_xContext = cppu::defaultBootstrap_InitialComponentContext(); + m_xFactory = m_xContext->getServiceManager(); + + uno::Reference<lang::XMultiServiceFactory> xSM(m_xFactory, uno::UNO_QUERY_THROW); + + //Without this we're crashing because callees are using + //getProcessServiceFactory. In general those should be removed in favour + //of retaining references to the root ServiceFactory as its passed around + comphelper::setProcessServiceFactory(xSM); + + // initialise UCB-Broker + uno::Sequence<uno::Any> aUcbInitSequence(2); + aUcbInitSequence[0] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Local")); + aUcbInitSequence[1] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Office")); + bool bInitUcb = ucbhelper::ContentBroker::initialize(xSM, aUcbInitSequence); + CPPUNIT_ASSERT_MESSAGE("Should be able to initialize UCB", bInitUcb); + + uno::Reference<ucb::XContentProviderManager> xUcb = + ucbhelper::ContentBroker::get()->getContentProviderManagerInterface(); + uno::Reference<ucb::XContentProvider> xFileProvider(xSM->createInstance( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.FileContentProvider"))), uno::UNO_QUERY); + xUcb->registerContentProvider(xFileProvider, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file")), sal_True); + + // force locale (and resource files loaded) to en-US + const LanguageType eLang=LANGUAGE_ENGLISH_US; + + rtl::OUString aLang, aCountry; + MsLangId::convertLanguageToIsoNames(eLang, aLang, aCountry); + lang::Locale aLocale(aLang, aCountry, rtl::OUString()); + ResMgr::SetDefaultLocale( aLocale ); + + SvtSysLocaleOptions aLocalOptions; + aLocalOptions.SetUILocaleConfigString( + MsLangId::convertLanguageToIsoString( eLang ) ); + + InitVCL(xSM); + + //This is a bit of a fudge, we do this to ensure that ScGlobals::ensure, + //which is a private symbol to us, gets called + m_xCalcComponent = + xSM->createInstance(rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.SpreadsheetDocument"))); + CPPUNIT_ASSERT_MESSAGE("no calc component!", m_xCalcComponent.is()); + + const char* pSrcRoot = getenv( "SRC_ROOT" ); + CPPUNIT_ASSERT_MESSAGE("SRC_ROOT env variable not set", pSrcRoot != NULL && pSrcRoot[0] != 0); + +#ifdef WNT + if (pSrcRoot[1] == ':') + m_aSrcRoot += rtl::OUString::createFromAscii( "/" ); +#endif + m_aSrcRoot += rtl::OUString::createFromAscii( pSrcRoot ); +} + +void FiltersTest::setUp() +{ +} + +FiltersTest::~FiltersTest() +{ + uno::Reference< lang::XComponent >(m_xContext, uno::UNO_QUERY_THROW)->dispose(); +} + +void FiltersTest::tearDown() +{ +} + +CPPUNIT_TEST_SUITE_REGISTRATION(FiltersTest); + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index e22b6a3c3312..dba01824d0a5 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -77,7 +77,6 @@ #include <svx/svdograf.hxx> #include <svx/svdpage.hxx> -#include <sfx2/docfilt.hxx> #include <sfx2/docfile.hxx> #include <com/sun/star/sheet/DataPilotFieldOrientation.hpp> @@ -88,11 +87,20 @@ #include <iostream> #include <vector> +#ifdef WNT +#define NOMINMAX +#include <prewin.h> +#include <postwin.h> +#undef NOMINMAX +#endif + #define MDDS_HASH_CONTAINER_BOOST 1 #include <mdds/mixed_type_matrix.hpp> #define UCALC_DEBUG_OUTPUT 0 +const int indeterminate = 2; + using namespace ::com::sun::star; using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -223,9 +231,6 @@ public: virtual void setUp(); virtual void tearDown(); - void recursiveScan(const rtl::OUString &rFilter, const rtl::OUString &rURL, bool bExpected); - bool load(const rtl::OUString &rFilter, const rtl::OUString &rURL); - void testCollator(); void testInput(); void testCellFunctions(); @@ -255,11 +260,6 @@ public: void testGraphicsInGroup(); /** - * Ensure CVEs remain unbroken - */ - void testCVEs(); - - /** * Test toggling relative/absolute flag of cell and cell range references. * This corresponds with hitting Shift-F4 while the cursor is on a formula * cell. @@ -284,9 +284,6 @@ public: CPPUNIT_TEST(testGraphicsInGroup); CPPUNIT_TEST(testStreamValid); CPPUNIT_TEST(testFunctionLists); -#if !defined(__OpenBSD__) - CPPUNIT_TEST(testCVEs); -#endif CPPUNIT_TEST(testToggleRefFlag); CPPUNIT_TEST_SUITE_END(); @@ -613,51 +610,6 @@ void Test::testCSV() } } -bool Test::load(const rtl::OUString &rFilter, const rtl::OUString &rURL) -{ - SfxFilter aFilter( - rFilter, - rtl::OUString(), 0, 0, rtl::OUString(), 0, rtl::OUString(), - rtl::OUString(), rtl::OUString() ); - - ScDocShellRef xDocShRef = new ScDocShell; - SfxMedium aSrcMed(rURL, STREAM_STD_READ, true); - aSrcMed.SetFilter(&aFilter); - return xDocShRef->DoLoad(&aSrcMed); -} - -void Test::recursiveScan(const rtl::OUString &rFilter, const rtl::OUString &rURL, bool bExpected) -{ - osl::Directory aDir(rURL); - - CPPUNIT_ASSERT(osl::FileBase::E_None == aDir.open()); - osl::DirectoryItem aItem; - osl::FileStatus aFileStatus(osl_FileStatus_Mask_FileURL|osl_FileStatus_Mask_Type); - while (aDir.getNextItem(aItem) == osl::FileBase::E_None) - { - aItem.getFileStatus(aFileStatus); - rtl::OUString sURL = aFileStatus.getFileURL(); - if (aFileStatus.getFileType() == osl::FileStatus::Directory) - recursiveScan(rFilter, sURL, bExpected); - else - { - bool bRes = load(rFilter, sURL); - rtl::OString aRes(rtl::OUStringToOString(sURL, osl_getThreadTextEncoding())); - CPPUNIT_ASSERT_MESSAGE(aRes.getStr(), bRes == bExpected); - } - } - CPPUNIT_ASSERT(osl::FileBase::E_None == aDir.close()); -} - -void Test::testCVEs() -{ - recursiveScan(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Quattro Pro 6.0")), - m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/clone/calc/sc/qa/unit/data/qpro/pass")), true); - - recursiveScan(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Quattro Pro 6.0")), - m_aSrcRoot + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/clone/calc/sc/qa/unit/data/qpro/fail")), false); -} - template<typename Evaluator> void checkMatrixElements(const ScMatrix& rMat) { diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx index f32553720338..6c1a989dbf65 100644 --- a/sc/source/core/data/attarray.cxx +++ b/sc/source/core/data/attarray.cxx @@ -115,10 +115,12 @@ void ScAttrArray::TestData() const } if (nErr) { - ByteString aMsg = ByteString::CreateFromInt32(nErr); - aMsg += " errors in attribute array, column "; - aMsg += ByteString::CreateFromInt32(nCol); - OSL_FAIL( aMsg.GetBuffer() ); + rtl::OStringBuffer aMsg; + aMsg.append(static_cast<sal_Int32>(nErr)); + aMsg.append(RTL_CONSTASCII_STRINGPARAM( + " errors in attribute array, column ")); + aMsg.append(static_cast<sal_Int32>(nCol)); + OSL_FAIL(aMsg.getStr()); } } #endif diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index d744c16758f9..89f4cdbb761e 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -1400,7 +1400,12 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam ) pCode->SetCodeError( errNoCode ); // This is worth an assertion; if encountered in daily work // documents we might need another solution. Or just confirm correctness. - OSL_FAIL( "ScFormulaCell::Interpret: no UPN, no error, no token, but string" ); + OSL_FAIL( "ScFormulaCell::Interpret: no UPN, no error, no token, but string -> Try compiling it." ); + // Force Compilation + String aFormula = aResult.GetHybridFormula(); + aResult.SetHybridFormula( String() ); + Compile( aFormula ); + InterpretTail( eTailParam ); return; } CompileTokenArray(); diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index 03974ec63acf..80c801deb3b0 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -1046,12 +1046,13 @@ void ScDocument::Fill(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const { PutInOrder( nCol1, nCol2 ); PutInOrder( nRow1, nRow2 ); - for (SCTAB i=0; i < static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i]) - if (rMark.GetTableSelect(i)) - maTabs[i]->Fill(nCol1, nRow1, nCol2, nRow2, - nFillCount, eFillDir, eFillCmd, eFillDateCmd, - nStepValue, nMaxValue); + SCTAB nMax = maTabs.size(); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->Fill(nCol1, nRow1, nCol2, nRow2, + nFillCount, eFillDir, eFillCmd, eFillDateCmd, + nStepValue, nMaxValue); } String ScDocument::GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY ) @@ -1068,10 +1069,11 @@ void ScDocument::AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SC { PutInOrder( nStartCol, nEndCol ); PutInOrder( nStartRow, nEndRow ); - for (SCTAB i=0; i < static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i]) - if (rMark.GetTableSelect(i)) - maTabs[i]->AutoFormat( nStartCol, nStartRow, nEndCol, nEndRow, nFormatNo ); + SCTAB nMax = maTabs.size(); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->AutoFormat( nStartCol, nStartRow, nEndCol, nEndRow, nFormatNo ); } void ScDocument::GetAutoFormatData(SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, @@ -1195,16 +1197,15 @@ sal_Bool ScDocument::SearchAndReplace(const SvxSearchItem& rSearchItem, if ( nCommand == SVX_SEARCHCMD_FIND_ALL || nCommand == SVX_SEARCHCMD_REPLACE_ALL ) { - for (nTab = 0; nTab < static_cast<SCTAB>(maTabs.size()); nTab++) - if (maTabs[nTab]) + SCTAB nMax = maTabs.size(); + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) { - if (rMark.GetTableSelect(nTab)) - { - nCol = 0; - nRow = 0; - bFound |= maTabs[nTab]->SearchAndReplace( - rSearchItem, nCol, nRow, rMark, rUndoStr, pUndoDoc ); - } + nCol = 0; + nRow = 0; + bFound |= maTabs[*itr]->SearchAndReplace( + rSearchItem, nCol, nRow, rMark, rUndoStr, pUndoDoc ); } // Markierung wird innen schon komplett gesetzt diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index cd0d0d6aca7d..4d95790df088 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -138,10 +138,13 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, SCROW k; i = 0; bool bStop = false; - for (;i < static_cast<SCTAB>(maTabs.size()); ++i) + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) { - if (maTabs[i] && rMark.GetTableSelect(i)) + if (maTabs[i]) { + i = *itr; bStop = true; break; } @@ -161,14 +164,15 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, else pCell = new ScFormulaCell( this, aPos, rFormula, eGram, MM_FORMULA ); pCell->SetMatColsRows( nCol2 - nCol1 + 1, nRow2 - nRow1 + 1 ); - for (i = 0; i < static_cast<SCTAB>(maTabs.size()); i++) + itr = rMark.begin(); + for (; itr != itrEnd && *itr < nMax; ++itr) { - if (maTabs[i] && rMark.GetTableSelect(i)) + if (maTabs[*itr]) { - if (i == nTab1) - maTabs[i]->PutCell(nCol1, nRow1, pCell); + if (*itr == nTab1) + maTabs[*itr]->PutCell(nCol1, nRow1, pCell); else - maTabs[i]->PutCell(nCol1, nRow1, pCell->CloneWithoutNote(*this, ScAddress( nCol1, nRow1, i), SC_CLONECELL_STARTLISTENING)); + maTabs[*itr]->PutCell(nCol1, nRow1, pCell->CloneWithoutNote(*this, ScAddress( nCol1, nRow1, *itr), SC_CLONECELL_STARTLISTENING)); } } @@ -185,15 +189,16 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, ScTokenArray aArr; ScToken* t = static_cast<ScToken*>(aArr.AddMatrixSingleReference( aRefData)); - for (i = 0; i < static_cast<SCTAB>(maTabs.size()); i++) + itr = rMark.begin(); + for (; itr != itrEnd && *itr < nMax; ++itr) { - if (maTabs[i] && rMark.GetTableSelect(i)) + if (maTabs[*itr]) { - maTabs[i]->DoColResize( nCol1, nCol2, static_cast<SCSIZE>(nRow2 - nRow1 + 1) ); - if (i != nTab1) + maTabs[*itr]->DoColResize( nCol1, nCol2, static_cast<SCSIZE>(nRow2 - nRow1 + 1) ); + if (*itr != nTab1) { - aRefData.nTab = i; - aRefData.nRelTab = i - nTab1; + aRefData.nTab = *itr; + aRefData.nRelTab = *itr - nTab1; t->GetSingleRef() = aRefData; } for (j = nCol1; j <= nCol2; j++) @@ -204,10 +209,10 @@ void ScDocument::InsertMatrixFormula(SCCOL nCol1, SCROW nRow1, { // Array muss geklont werden, damit jede // Zelle ein eigenes Array erhaelt! - aPos = ScAddress( j, k, i ); + aPos = ScAddress( j, k, *itr ); t->CalcRelFromAbs( aPos ); pCell = new ScFormulaCell( this, aPos, aArr.Clone(), eGram, MM_REFERENCE ); - maTabs[i]->PutCell(j, k, (ScBaseCell*) pCell); + maTabs[*itr]->PutCell(j, k, (ScBaseCell*) pCell); } } } @@ -226,10 +231,13 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera SCROW k; i = 0; bool bStop = false; - for (;i < static_cast<SCTAB>(maTabs.size()); ++i) + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) { - if (maTabs[i] && rMark.GetTableSelect(i)) + if (maTabs[*itr]) { + i = *itr; bStop = true; break; } @@ -296,8 +304,12 @@ void ScDocument::InsertTableOp(const ScTabOpParam& rParam, // Mehrfachopera for( j = nCol1; j <= nCol2; j++ ) for( k = nRow1; k <= nRow2; k++ ) for (i = 0; i < static_cast<SCTAB>(maTabs.size()); i++) - if( maTabs[i] && rMark.GetTableSelect(i) ) - maTabs[i]->PutCell( j, k, aRefCell.CloneWithoutNote( *this, ScAddress( j, k, i ), SC_CLONECELL_STARTLISTENING ) ); + { + itr = rMark.begin(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if( maTabs[*itr] ) + maTabs[*itr]->PutCell( j, k, aRefCell.CloneWithoutNote( *this, ScAddress( j, k, *itr ), SC_CLONECELL_STARTLISTENING ) ); + } } namespace { @@ -499,9 +511,11 @@ sal_Bool ScDocument::GetSelectionFunction( ScSubTotalFunc eFunc, SCCOL nEndCol = aSingle.aEnd.Col(); SCROW nEndRow = aSingle.aEnd.Row(); - for (SCTAB nTab=0; nTab< static_cast<SCTAB>(maTabs.size()) && !aData.bError; nTab++) - if (maTabs[nTab] && rMark.GetTableSelect(nTab)) - maTabs[nTab]->UpdateSelectionFunction( aData, + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax && !aData.bError; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->UpdateSelectionFunction( aData, nStartCol, nStartRow, nEndCol, nEndRow, rMark ); //! rMark an UpdateSelectionFunction uebergeben !!!!! diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 92cb7c2c4d15..c799ee04d2fc 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -1525,9 +1525,11 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp ScEditEngineDefaulter* pEngine = NULL; // not using pEditEngine member because of defaults SCTAB nCount = GetTableCount(); - for (SCTAB nTab = 0; nTab < nCount; nTab++) - if ( maTabs[nTab] && rMultiMark.GetTableSelect(nTab) ) + ScMarkData::const_iterator itr = rMultiMark.begin(), itrEnd = rMultiMark.end(); + for (; itr != itrEnd && *itr < nCount; ++itr) + if ( maTabs[*itr] ) { + SCTAB nTab = *itr; SCCOL nCol = 0; SCROW nRow = 0; @@ -1621,4 +1623,4 @@ void ScDocument::TransliterateText( const ScMarkData& rMultiMark, sal_Int32 nTyp delete pEngine; } -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
\ No newline at end of file +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index 94d1e9e39149..0736e148c4d5 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -276,9 +276,10 @@ void ScDocument::DeleteObjectsInArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCR return; SCTAB nTabCount = GetTableCount(); - for (SCTAB nTab=0; nTab<nTabCount; nTab++) - if (maTabs[nTab] && rMark.GetTableSelect(nTab)) - pDrawLayer->DeleteObjectsInArea( nTab, nCol1, nRow1, nCol2, nRow2 ); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + if (maTabs[*itr]) + pDrawLayer->DeleteObjectsInArea( *itr, nCol1, nRow1, nCol2, nRow2 ); } void ScDocument::DeleteObjectsInSelection( const ScMarkData& rMark ) diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 61fb671db898..4edfedd6e9e3 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -1040,7 +1040,7 @@ void lcl_GetFirstTabRange( SCTAB& rTabRangeStart, SCTAB& rTabRangeEnd, const ScM if (pTabMark->GetTableSelect(nTab)) { // find first range of consecutive selected sheets - rTabRangeStart = nTab; + rTabRangeStart = pTabMark->GetFirstSelected(); while ( nTab+1 < aMaxTab && pTabMark->GetTableSelect(nTab+1) ) ++nTab; rTabRangeEnd = nTab; @@ -2210,10 +2210,11 @@ void ScDocument::UpdateRangeNamesInFormulas( { do { - for (SCTAB k = 0; k < static_cast<SCTAB>(maTabs.size()); k++) + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) { - if ( maTabs[k] && rMark.GetTableSelect(k) ) - maTabs[k]->ReplaceRangeNamesInUse(nC1, nR1, + if ( maTabs[*itr] ) + maTabs[*itr]->ReplaceRangeNamesInUse(nC1, nR1, nC2, nR2, rRangeNames.maRangeMap); } nC1 = nC2 + 1; @@ -2256,10 +2257,11 @@ void ScDocument::StartListeningFromClip( SCCOL nCol1, SCROW nRow1, { if (nInsFlag & IDF_CONTENTS) { - for (SCTAB i = 0; i < static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i]) - if (rMark.GetTableSelect(i)) - maTabs[i]->StartListeningInArea( nCol1, nRow1, nCol2, nRow2 ); + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->StartListeningInArea( nCol1, nRow1, nCol2, nRow2 ); } } @@ -2271,10 +2273,11 @@ void ScDocument::BroadcastFromClip( SCCOL nCol1, SCROW nRow1, if (nInsFlag & IDF_CONTENTS) { ScBulkBroadcast aBulkBroadcast( GetBASM()); - for (SCTAB i = 0; i < static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i]) - if (rMark.GetTableSelect(i)) - maTabs[i]->BroadcastInArea( nCol1, nRow1, nCol2, nRow2 ); + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->BroadcastInArea( nCol1, nRow1, nCol2, nRow2 ); } } @@ -2495,13 +2498,15 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar // die Draw-Seitengroesse neu berechnet werden muss //! nur wenn ganze Zeilen/Spalten kopiert werden? - for (SCTAB j = 0; j < static_cast<SCTAB>(maTabs.size()); j++) - if (maTabs[j] && rMark.GetTableSelect(j)) + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) { - if ( j < aCBFCP.nTabStart ) - aCBFCP.nTabStart = j; - aCBFCP.nTabEnd = j; - maTabs[j]->IncRecalcLevel(); + if ( *itr < aCBFCP.nTabStart ) + aCBFCP.nTabStart = *itr; + aCBFCP.nTabEnd = *itr; + maTabs[*itr]->IncRecalcLevel(); } ScRangeList aLocalRangeList; @@ -2581,9 +2586,10 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, const ScMarkData& rMar ScColumn::bDoubleAlloc = bOldDouble; - for (SCTAB k = 0; k < static_cast<SCTAB>(maTabs.size()); k++) - if (maTabs[k] && rMark.GetTableSelect(k)) - maTabs[k]->DecRecalcLevel(); + itr = rMark.begin(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr] ) + maTabs[*itr]->DecRecalcLevel(); bInsertingFromOtherDoc = false; @@ -2647,14 +2653,16 @@ void ScDocument::CopyMultiRangeFromClip( aCBFCP.nTabStart = MAXTAB; aCBFCP.nTabEnd = 0; - for (SCTAB j = 0; j < static_cast<SCTAB>(maTabs.size()); ++j) + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) { - if (maTabs[j] && rMark.GetTableSelect(j)) + if (maTabs[*itr]) { - if ( j < aCBFCP.nTabStart ) - aCBFCP.nTabStart = j; - aCBFCP.nTabEnd = j; - maTabs[j]->IncRecalcLevel(); + if ( *itr < aCBFCP.nTabStart ) + aCBFCP.nTabStart = *itr; + aCBFCP.nTabEnd = *itr; + maTabs[*itr]->IncRecalcLevel(); } } @@ -2717,9 +2725,10 @@ void ScDocument::CopyMultiRangeFromClip( nCol1 += p->aEnd.Col() - p->aStart.Col() + 1; } - for (SCTAB i = 0; i < static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i] && rMark.GetTableSelect(i)) - maTabs[i]->DecRecalcLevel(); + itr = rMark.begin(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->DecRecalcLevel(); bInsertingFromOtherDoc = false; @@ -2886,9 +2895,11 @@ void ScDocument::FillTab( const ScRange& rSrcArea, const ScMarkData& rMark, SetAutoCalc( false ); // avoid multiple calculations SCTAB nCount = static_cast<SCTAB>(maTabs.size()); - for (SCTAB i=0; i<nCount; i++) - if ( i!=nSrcTab && maTabs[i] && rMark.GetTableSelect(i) ) + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nCount; ++itr) + if ( *itr!=nSrcTab && maTabs[*itr]) { + SCTAB i = *itr; if (bDoMix) { if (!pMixDoc) @@ -2945,9 +2956,11 @@ void ScDocument::FillTabMarked( SCTAB nSrcTab, const ScMarkData& rMark, SCROW nEndRow = aArea.aEnd.Row(); SCTAB nCount = static_cast<SCTAB>(maTabs.size()); - for (SCTAB i=0; i<nCount; i++) - if ( i!=nSrcTab && maTabs[i] && rMark.GetTableSelect(i) ) + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nCount; ++itr) + if ( *itr!=nSrcTab && maTabs[*itr] ) { + SCTAB i = *itr; if (bDoMix) { if (!pMixDoc) @@ -4245,9 +4258,11 @@ void ScDocument::ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, const ScPatternAttr& rAttr, ScEditDataArray* pDataArray ) { - for (SCTAB i=0; i < static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i] && rMark.GetTableSelect(i)) - maTabs[i]->ApplyPatternArea( nStartCol, nStartRow, nEndCol, nEndRow, rAttr, pDataArray ); + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->ApplyPatternArea( nStartCol, nStartRow, nEndCol, nEndRow, rAttr, pDataArray ); } @@ -4270,9 +4285,11 @@ bool ScDocument::SetAttrEntries(SCCOL nCol, SCTAB nTab, ScAttrEntry* pData, SCSI void ScDocument::ApplyPatternIfNumberformatIncompatible( const ScRange& rRange, const ScMarkData& rMark, const ScPatternAttr& rPattern, short nNewType ) { - for (SCTAB i=0; i < static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i] && rMark.GetTableSelect(i)) - maTabs[i]->ApplyPatternIfNumberformatIncompatible( rRange, rPattern, nNewType ); + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->ApplyPatternIfNumberformatIncompatible( rRange, rPattern, nNewType ); } @@ -4289,9 +4306,11 @@ void ScDocument::ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow, const ScMarkData& rMark, const ScStyleSheet& rStyle) { - for (SCTAB i=0; i < static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i] && rMark.GetTableSelect(i)) - maTabs[i]->ApplyStyleArea( nStartCol, nStartRow, nEndCol, nEndRow, rStyle ); + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->ApplyStyleArea( nStartCol, nStartRow, nEndCol, nEndRow, rStyle ); } @@ -4316,9 +4335,11 @@ void ScDocument::ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkDat } else { - for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()); i++) - if ( maTabs[i] && rMark.GetTableSelect(i) ) - maTabs[i]->ApplySelectionStyle( rStyle, rMark ); + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if ( maTabs[*itr] ) + maTabs[*itr]->ApplySelectionStyle( rStyle, rMark ); } } @@ -4329,9 +4350,11 @@ void ScDocument::ApplySelectionLineStyle( const ScMarkData& rMark, if ( bColorOnly && !pLine ) return; - for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i] && rMark.GetTableSelect(i)) - maTabs[i]->ApplySelectionLineStyle( rMark, pLine, bColorOnly ); + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->ApplySelectionLineStyle( rMark, pLine, bColorOnly ); } @@ -4353,10 +4376,13 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con const ScStyleSheet* pNewStyle; if ( rMark.IsMultiMarked() ) - for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()) && bEqual; i++) - if (maTabs[i] && rMark.GetTableSelect(i)) + { + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) { - pNewStyle = maTabs[i]->GetSelectionStyle( rMark, bFound ); + pNewStyle = maTabs[*itr]->GetSelectionStyle( rMark, bFound ); if (bFound) { if ( !pNewStyle || ( pStyle && pNewStyle != pStyle ) ) @@ -4364,6 +4390,7 @@ const ScStyleSheet* ScDocument::GetSelectionStyle( const ScMarkData& rMark ) con pStyle = pNewStyle; } } + } if ( rMark.IsMarked() ) { ScRange aRange; @@ -4495,17 +4522,21 @@ ScPatternAttr* ScDocument::CreateSelectionPattern( const ScMarkData& rMark, sal_ if ( rMark.IsMultiMarked() ) // multi selection { - for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i] && rMark.GetTableSelect(i)) - maTabs[i]->MergeSelectionPattern( aState, rMark, bDeep ); + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->MergeSelectionPattern( aState, rMark, bDeep ); } if ( rMark.IsMarked() ) // simle selection { ScRange aRange; rMark.GetMarkArea(aRange); - for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i] && rMark.GetTableSelect(i)) - maTabs[i]->MergePatternArea( aState, + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->MergePatternArea( aState, aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), bDeep ); } @@ -4550,9 +4581,11 @@ void ScDocument::GetSelectionFrame( const ScMarkData& rMark, rMark.GetMarkArea(aRange); rLineInner.EnableHor( aRange.aStart.Row() != aRange.aEnd.Row() ); rLineInner.EnableVer( aRange.aStart.Col() != aRange.aEnd.Col() ); - for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i] && rMark.GetTableSelect(i)) - maTabs[i]->MergeBlockFrame( &rLineOuter, &rLineInner, aFlags, + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->MergeBlockFrame( &rLineOuter, &rLineInner, aFlags, aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row() ); } @@ -4795,13 +4828,15 @@ sal_Bool ScDocument::IsSelectionEditable( const ScMarkData& rMark, sal_Bool bOk = sal_True; sal_Bool bMatrix = ( pOnlyNotBecauseOfMatrix != NULL ); - for ( SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()) && (bOk || bMatrix); i++ ) + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax && (bOk || bMatrix); ++itr) { - if ( maTabs[i] && rMark.GetTableSelect(i) ) + if ( maTabs[*itr] ) { if (rMark.IsMarked()) { - if ( !maTabs[i]->IsBlockEditable( aRange.aStart.Col(), + if ( !maTabs[*itr]->IsBlockEditable( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), pOnlyNotBecauseOfMatrix ) ) { @@ -4812,7 +4847,7 @@ sal_Bool ScDocument::IsSelectionEditable( const ScMarkData& rMark, } if (rMark.IsMultiMarked()) { - if ( !maTabs[i]->IsSelectionEditable( rMark, pOnlyNotBecauseOfMatrix ) ) + if ( !maTabs[*itr]->IsSelectionEditable( rMark, pOnlyNotBecauseOfMatrix ) ) { bOk = false; if ( pOnlyNotBecauseOfMatrix ) @@ -4834,9 +4869,11 @@ sal_Bool ScDocument::HasSelectedBlockMatrixFragment( SCCOL nStartCol, SCROW nSta const ScMarkData& rMark ) const { sal_Bool bOk = sal_True; - for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()) && bOk; i++) - if (maTabs[i] && rMark.GetTableSelect(i)) - if (maTabs[i]->HasBlockMatrixFragment( nStartCol, nStartRow, nEndCol, nEndRow )) + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax && bOk; ++itr) + if (maTabs[*itr]) + if (maTabs[*itr]->HasBlockMatrixFragment( nStartCol, nStartRow, nEndCol, nEndRow )) bOk = false; return !bOk; @@ -4962,12 +4999,14 @@ sal_Bool ScDocument::ExtendMergeSel( SCCOL nStartCol, SCROW nStartRow, SCCOL nOldEndCol = rEndCol; SCROW nOldEndRow = rEndRow; - for (SCTAB nTab = 0; nTab < static_cast<SCTAB>(maTabs.size()); nTab++) - if ( maTabs[nTab] && rMark.GetTableSelect(nTab) ) + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if ( maTabs[*itr] ) { SCCOL nThisEndCol = nOldEndCol; SCROW nThisEndRow = nOldEndRow; - if ( ExtendMerge( nStartCol, nStartRow, nThisEndCol, nThisEndRow, nTab, bRefresh, bAttrs ) ) + if ( ExtendMerge( nStartCol, nStartRow, nThisEndCol, nThisEndRow, *itr, bRefresh, bAttrs ) ) bFound = sal_True; if ( nThisEndCol > rEndCol ) rEndCol = nThisEndCol; @@ -5190,14 +5229,16 @@ void ScDocument::ApplySelectionFrame( const ScMarkData& rMark, ScRangeList aRangeList; rMark.FillRangeListWithMarks( &aRangeList, false ); size_t nRangeCount = aRangeList.size(); - for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()); i++) + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) { - if (maTabs[i] && rMark.GetTableSelect(i)) + if (maTabs[*itr]) { for ( size_t j=0; j < nRangeCount; j++ ) { ScRange aRange = *aRangeList[ j ]; - maTabs[i]->ApplyBlockFrame( pLineOuter, pLineInner, + maTabs[*itr]->ApplyBlockFrame( pLineOuter, pLineInner, aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row() ); } @@ -5242,10 +5283,11 @@ void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMark else { SfxItemPoolCache aCache( xPoolHelper->GetDocPool(), pSet ); - for (SCTAB nTab=0; nTab< static_cast<SCTAB>(maTabs.size()); nTab++) - if (maTabs[nTab]) - if (rMark.GetTableSelect(nTab)) - maTabs[nTab]->ApplySelectionCache( &aCache, rMark, pDataArray ); + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->ApplySelectionCache( &aCache, rMark, pDataArray ); } } } @@ -5253,25 +5295,31 @@ void ScDocument::ApplySelectionPattern( const ScPatternAttr& rAttr, const ScMark void ScDocument::ChangeSelectionIndent( sal_Bool bIncrement, const ScMarkData& rMark ) { - for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i] && rMark.GetTableSelect(i)) - maTabs[i]->ChangeSelectionIndent( bIncrement, rMark ); + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->ChangeSelectionIndent( bIncrement, rMark ); } void ScDocument::ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark ) { - for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i] && rMark.GetTableSelect(i)) - maTabs[i]->ClearSelectionItems( pWhich, rMark ); + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->ClearSelectionItems( pWhich, rMark ); } void ScDocument::DeleteSelection( sal_uInt16 nDelFlag, const ScMarkData& rMark ) { - for (SCTAB i=0; i< static_cast<SCTAB>(maTabs.size()); i++) - if (maTabs[i] && rMark.GetTableSelect(i)) - maTabs[i]->DeleteSelection( nDelFlag, rMark ); + SCTAB nMax = static_cast<SCTAB>(maTabs.size()); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nMax; ++itr) + if (maTabs[*itr]) + maTabs[*itr]->DeleteSelection( nDelFlag, rMark ); } diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index c5788111f715..a39d2761c859 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -83,8 +83,6 @@ using namespace com::sun::star; using ::std::vector; -using ::std::unary_function; -using ::std::remove_if; using ::boost::shared_ptr; using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Reference; @@ -1876,9 +1874,6 @@ bool ScDPObject::FillOldParam(ScPivotParam& rParam) const // ppLabelArr / nLabels is not changed SCCOL nSrcColOffset = 0; - if (IsSheetData()) - // source data column offset is only for internal sheet source. - nSrcColOffset = pSheetDesc->GetSourceRange().aStart.Col(); bool bAddData = ( lcl_GetDataGetOrientation( xSource ) == sheet::DataPilotFieldOrientation_HIDDEN ); lcl_FillOldFields( @@ -2575,30 +2570,52 @@ ScDPCollection::~ScDPCollection() maTables.clear(); } -namespace { - -/** - * Unary predicate to match DP objects by the table ID. - */ -class MatchByTable : public unary_function<ScDPObject, bool> +bool ScDPCollection::ClearCache(ScDPObject* pDPObj) { - SCTAB mnTab; -public: - MatchByTable(SCTAB nTab) : mnTab(nTab) {} - - bool operator() (const ScDPObject& rObj) const + if (pDPObj->IsSheetData()) { - return rObj.GetOutRange().aStart.Tab() == mnTab; + // data source is internal sheet. + const ScSheetSourceDesc* pDesc = pDPObj->GetSheetDesc(); + if (!pDesc) + return false; + + if (pDesc->HasRangeName()) + { + // cache by named range + ScDPCollection::NameCaches& rCaches = GetNameCaches(); + rCaches.removeCache(pDesc->GetRangeName()); + } + else + { + // cache by cell range + ScDPCollection::SheetCaches& rCaches = GetSheetCaches(); + rCaches.removeCache(pDesc->GetSourceRange()); + } } -}; + else if (pDPObj->IsImportData()) + { + // data source is external database. + const ScImportSourceDesc* pDesc = pDPObj->GetImportSourceDesc(); + if (!pDesc) + return false; + ScDPCollection::DBCaches& rCaches = GetDBCaches(); + rCaches.removeCache(pDesc->GetCommandType(), pDesc->aDBName, pDesc->aObject); + } + return true; } void ScDPCollection::DeleteOnTab( SCTAB nTab ) { - maTables.erase( - remove_if(maTables.begin(), maTables.end(), MatchByTable(nTab)), - maTables.end()); + TablesType aNewTables; + while (!maTables.empty()) + { + TablesType::auto_type xDP = maTables.pop_back(); + if (xDP->GetOutRange().aStart.Tab() != nTab) + // Not on this sheet. Keep it. + aNewTables.push_back(xDP.release()); + } + maTables.swap(aNewTables); } void ScDPCollection::UpdateReference( UpdateRefMode eUpdateRefMode, diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index f6e3dc343718..a77353bcd141 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -2838,7 +2838,7 @@ void ScDPResultDimension::LateInitFrom( LateInitParams& rParams/* const vector<S { if ( rParams.IsEnd( nPos ) ) return; - OSL_ENSURE( nPos <= pItemData.size(), ByteString::CreateFromInt32( pItemData.size()).GetBuffer() ); + OSL_ENSURE( nPos <= pItemData.size(), rtl::OString::valueOf(static_cast<sal_Int32>(pItemData.size())).getStr() ); ScDPDimension* pThisDim = rParams.GetDim( nPos ); ScDPLevel* pThisLevel = rParams.GetLevel( nPos ); SCROW rThisData = pItemData[nPos]; diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 9741adcd1515..9e690fad0590 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -1111,62 +1111,63 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark ) rMark.GetMultiMarkArea( aMarkRange ); SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB nTab=0; nTab<=nTabCount; nTab++) - if ( rMark.GetTableSelect( nTab ) ) + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + { + SCTAB nTab = *itr; + SdrPage* pPage = GetPage(static_cast<sal_uInt16>(nTab)); + if (pPage) { - SdrPage* pPage = GetPage(static_cast<sal_uInt16>(nTab)); - if (pPage) + pPage->RecalcObjOrdNums(); + sal_uLong nObjCount = pPage->GetObjCount(); + if (nObjCount) { - pPage->RecalcObjOrdNums(); - sal_uLong nObjCount = pPage->GetObjCount(); - if (nObjCount) - { - long nDelCount = 0; - // Rechteck um die ganze Selektion - Rectangle aMarkBound = pDoc->GetMMRect( - aMarkRange.aStart.Col(), aMarkRange.aStart.Row(), - aMarkRange.aEnd.Col(), aMarkRange.aEnd.Row(), nTab ); + long nDelCount = 0; + // Rechteck um die ganze Selektion + Rectangle aMarkBound = pDoc->GetMMRect( + aMarkRange.aStart.Col(), aMarkRange.aStart.Row(), + aMarkRange.aEnd.Col(), aMarkRange.aEnd.Row(), nTab ); - SdrObject** ppObj = new SdrObject*[nObjCount]; + SdrObject** ppObj = new SdrObject*[nObjCount]; - SdrObjListIter aIter( *pPage, IM_FLAT ); - SdrObject* pObject = aIter.Next(); - while (pObject) + SdrObjListIter aIter( *pPage, IM_FLAT ); + SdrObject* pObject = aIter.Next(); + while (pObject) + { + // do not delete note caption, they are always handled by the cell note + // TODO: detective objects are still deleted, is this desired? + if (!IsNoteCaption( pObject )) { - // do not delete note caption, they are always handled by the cell note - // TODO: detective objects are still deleted, is this desired? - if (!IsNoteCaption( pObject )) + Rectangle aObjRect = pObject->GetCurrentBoundRect(); + if ( aMarkBound.IsInside( aObjRect ) ) { - Rectangle aObjRect = pObject->GetCurrentBoundRect(); - if ( aMarkBound.IsInside( aObjRect ) ) - { - ScRange aRange = pDoc->GetRange( nTab, aObjRect ); - if (rMark.IsAllMarked(aRange)) - ppObj[nDelCount++] = pObject; - } + ScRange aRange = pDoc->GetRange( nTab, aObjRect ); + if (rMark.IsAllMarked(aRange)) + ppObj[nDelCount++] = pObject; } - - pObject = aIter.Next(); } - // Objekte loeschen (rueckwaerts) + pObject = aIter.Next(); + } - long i; - if (bRecording) - for (i=1; i<=nDelCount; i++) - AddCalcUndo( new SdrUndoRemoveObj( *ppObj[nDelCount-i] ) ); + // Objekte loeschen (rueckwaerts) + long i; + if (bRecording) for (i=1; i<=nDelCount; i++) - pPage->RemoveObject( ppObj[nDelCount-i]->GetOrdNum() ); + AddCalcUndo( new SdrUndoRemoveObj( *ppObj[nDelCount-i] ) ); - delete[] ppObj; - } - } - else - { - OSL_FAIL("pPage?"); + for (i=1; i<=nDelCount; i++) + pPage->RemoveObject( ppObj[nDelCount-i]->GetOrdNum() ); + + delete[] ppObj; } } + else + { + OSL_FAIL("pPage?"); + } + } } void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const Rectangle& rRange ) diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx index 66d6584a5b96..892d1f6039b5 100644 --- a/sc/source/core/data/markdata.cxx +++ b/sc/source/core/data/markdata.cxx @@ -617,6 +617,27 @@ void ScMarkData::DeleteTab( SCTAB nTab ) maTabMarked.swap(tabMarked); } +//iterators +ScMarkData::iterator ScMarkData::begin() +{ + return maTabMarked.begin(); +} + +ScMarkData::iterator ScMarkData::end() +{ + return maTabMarked.end(); +} + +ScMarkData::const_iterator ScMarkData::begin() const +{ + return maTabMarked.begin(); +} + +ScMarkData::const_iterator ScMarkData::end() const +{ + return maTabMarked.end(); +} + diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index 079e02039ba6..6b9e91e29178 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -1301,6 +1301,12 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW bUpdated |= aCol[i].UpdateReference( eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, nDx, nDy, nDz, pUndoDoc ); + if (mpRangeName) + { + ScRange aRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );; + mpRangeName->UpdateReference( eUpdateRefMode, aRange, nDx, nDy, nDz ); + } + if ( bIncludeDraw ) UpdateDrawRef( eUpdateRefMode, nCol1, nRow1, nTab1, nCol2, nRow2, nTab2, nDx, nDy, nDz, bUpdateNoteCaptionPos ); @@ -1408,6 +1414,9 @@ void ScTable::UpdateInsertTab(SCTAB nTable, SCTAB nNewSheets) } for (SCCOL i=0; i <= MAXCOL; i++) aCol[i].UpdateInsertTab(nTable, nNewSheets); + if (mpRangeName) + mpRangeName->UpdateTabRef( nTable, 1, 0, nNewSheets); + if (IsStreamValid()) SetStreamValid(false); } @@ -1427,6 +1436,14 @@ void ScTable::UpdateDeleteTab( SCTAB nTable, sal_Bool bIsMove, ScTable* pRefUndo else for (i=0; i <= MAXCOL; i++) aCol[i].UpdateDeleteTab(nTable, bIsMove, NULL, nSheets); + if (mpRangeName) + { + for (SCTAB aTab = 0; aTab < nSheets; ++aTab) + { + mpRangeName->UpdateTabRef( nTable + aTab, 2 ); + } + } + if (IsStreamValid()) SetStreamValid(false); } @@ -1442,6 +1459,9 @@ void ScTable::UpdateMoveTab( SCTAB nOldPos, SCTAB nNewPos, SCTAB nTabNo, pProgress->SetState(pProgress->GetState() + aCol[i].GetCodeCount()); } + if (mpRangeName) + mpRangeName->UpdateTabRef(nOldPos, 3, nNewPos); + if (IsStreamValid()) SetStreamValid(false); if (pDBDataNoName) diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index e7865a9163af..20fd586d0516 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -1424,7 +1424,7 @@ sal_uInt16 ScRange::ParseAny( const String& r, ScDocument* pDoc, if ( (nRet & nValid) != nValid ) { - ScAddress aAdr; + ScAddress aAdr(aStart);//initialize with currentPos as fallback for table number nRet = aAdr.Parse( r, pDoc, rDetails ); if ( nRet & SCA_VALID ) aStart = aEnd = aAdr; diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 79637dd9d38e..350944be3fb6 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -2892,18 +2892,17 @@ sal_Bool ScCompiler::IsNamedRange( const String& rUpperName ) { // IsNamedRange is called only from NextNewToken, with an upper-case string - // Try global named ranges first, then sheet local next. BTW does this - // order matter? - bool bGlobal = true; - ScRangeName* pRangeName = pDoc->GetRangeName(); + // try local names first + bool bGlobal = false; + ScRangeName* pRangeName = pDoc->GetRangeName(aPos.Tab()); const ScRangeData* pData = pRangeName->findByUpperName(rUpperName); if (!pData) { - pRangeName = pDoc->GetRangeName(aPos.Tab()); + pRangeName = pDoc->GetRangeName(); if (pRangeName) pData = pRangeName->findByUpperName(rUpperName); if (pData) - bGlobal = false; + bGlobal = true; } if (pData) diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 91f16402027b..ee039034b028 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -6525,53 +6525,6 @@ void ScInterpreter::ScDBVarP() PushDouble(fVal/fCount); } - -ScTokenArray* lcl_CreateExternalRefTokenArray( const ScAddress& rPos, ScDocument* pDoc, - const ScAddress::ExternalInfo& rExtInfo, const ScRefAddress& rRefAd1, - const ScRefAddress* pRefAd2 ) -{ - ScExternalRefManager* pRefMgr = pDoc->GetExternalRefManager(); - size_t nSheets = 1; - const OUString* pRealTab = pRefMgr->getRealTableName( rExtInfo.mnFileId, rExtInfo.maTabName); - ScTokenArray* pTokenArray = new ScTokenArray; - if (pRefAd2) - { - ScComplexRefData aRef; - aRef.InitRangeRel( ScRange( rRefAd1.GetAddress(), pRefAd2->GetAddress()), rPos); - aRef.Ref1.SetColRel( rRefAd1.IsRelCol()); - aRef.Ref1.SetRowRel( rRefAd1.IsRelRow()); - aRef.Ref1.SetTabRel( rRefAd1.IsRelTab()); - aRef.Ref1.SetFlag3D( true); - aRef.Ref2.SetColRel( pRefAd2->IsRelCol()); - aRef.Ref2.SetRowRel( pRefAd2->IsRelRow()); - aRef.Ref2.SetTabRel( pRefAd2->IsRelTab()); - nSheets = aRef.Ref2.nTab - aRef.Ref1.nTab + 1; - aRef.Ref2.SetFlag3D( nSheets > 1 ); - pTokenArray->AddExternalDoubleReference( rExtInfo.mnFileId, - (pRealTab ? *pRealTab : rExtInfo.maTabName), aRef); - } - else - { - ScSingleRefData aRef; - aRef.InitAddressRel( rRefAd1.GetAddress(), rPos); - aRef.SetColRel( rRefAd1.IsRelCol()); - aRef.SetRowRel( rRefAd1.IsRelRow()); - aRef.SetTabRel( rRefAd1.IsRelTab()); - aRef.SetFlag3D( true); - pTokenArray->AddExternalSingleReference( rExtInfo.mnFileId, - (pRealTab ? *pRealTab : rExtInfo.maTabName), aRef); - } - // The indirect usage of the external table can't be detected during the - // store-to-file cycle, mark it as permanently referenced so it gets stored - // even if not directly referenced anywhere. - pRefMgr->setCacheTableReferencedPermanently( rExtInfo.mnFileId, - rExtInfo.maTabName, nSheets); - ScCompiler aComp( pDoc, rPos, *pTokenArray); - aComp.CompileTokenArray(); - return pTokenArray; -} - - void ScInterpreter::ScIndirect() { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScIndirect" ); diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx index 7037359c15fc..1a65d20ac145 100644 --- a/sc/source/core/tool/interpr5.cxx +++ b/sc/source/core/tool/interpr5.cxx @@ -52,9 +52,6 @@ #include "scmatrix.hxx" #include "globstr.hrc" #include "cellkeytranslator.hxx" -#ifndef SC_INFO_OSVERSION -#include "osversiondef.hxx" -#endif #include <string.h> #include <math.h> diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx index 07c7ea797bdb..9b19fbfa02b2 100644 --- a/sc/source/core/tool/rangenam.cxx +++ b/sc/source/core/tool/rangenam.cxx @@ -475,6 +475,9 @@ sal_Bool ScRangeData::IsNameValid( const String& rName, ScDocument* pDoc ) { /* XXX If changed, sc/source/filter/ftools/ftools.cxx * ScfTools::ConvertToScDefinedName needs to be changed too. */ + sal_Char a('.'); + if (rName.Search(a, 0) != STRING_NOTFOUND) + return false; xub_StrLen nPos = 0; xub_StrLen nLen = rName.Len(); if ( !nLen || !ScCompiler::IsCharFlagAllConventions( rName, nPos++, SC_COMPILER_C_CHAR_NAME ) ) diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index d0e5f22f6361..e2c715058f1d 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -286,8 +286,13 @@ sal_Bool ScRangeUtil::MakeRangeFromName ( if( eScope==RUTL_NAMES ) { - const ScRangeName& rRangeNames = *pDoc->GetRangeName(); - const ScRangeData* pData = rRangeNames.findByName(rName); + //first check for local range names + ScRangeName* pRangeNames = pDoc->GetRangeName( nCurTab ); + ScRangeData* pData = NULL; + if ( pRangeNames ) + pData = pRangeNames->findByName(rName); + if (!pData) + pData = pDoc->GetRangeName()->findByName(rName); if (pData) { String aStrArea; diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index df7cdd6e00e3..165bdd6a0e75 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -56,6 +56,7 @@ using ::std::vector; #include <com/sun/star/sheet/ComplexReference.hpp> #include <com/sun/star/sheet/ExternalReference.hpp> #include <com/sun/star/sheet/ReferenceFlags.hpp> +#include <com/sun/star/sheet/NameToken.hpp> using namespace formula; using namespace com::sun::star; @@ -378,7 +379,7 @@ FormulaToken* ScRawToken::CreateToken() const IF_NOT_OPCODE_ERROR( ocPush, ScMatrixToken); return new ScMatrixToken( pMat ); case svIndex : - return new ScNameToken(name.nIndex, name.bGlobal); + return new ScNameToken(name.nIndex, name.bGlobal, eOp); case svExternalSingleRef: { String aTabName(extref.cTabName); @@ -947,8 +948,8 @@ bool ScExternalDoubleRefToken::operator ==( const FormulaToken& r ) const // ============================================================================ -ScNameToken::ScNameToken(sal_uInt16 nIndex, bool bGlobal) : - ScToken(svIndex, ocName), mnIndex(nIndex), mbGlobal(bGlobal) {} +ScNameToken::ScNameToken(sal_uInt16 nIndex, bool bGlobal, OpCode eOpCode) : + ScToken(svIndex, eOpCode), mnIndex(nIndex), mbGlobal(bGlobal) {} ScNameToken::ScNameToken(const ScNameToken& r) : ScToken(r), mnIndex(r.mnIndex), mbGlobal(r.mbGlobal) {} @@ -1174,6 +1175,13 @@ bool ScTokenArray::AddFormulaToken(const com::sun::star::sheet::FormulaToken& _a else bError = true; } + else if ( aType.equals( cppu::UnoType<sheet::NameToken>::get() ) ) + { + sheet::NameToken aTokenData; + _aToken.Data >>= aTokenData; + if ( eOpCode == ocName ) + AddRangeName(aTokenData.Index, aTokenData.Global); + } else if ( aType.equals( cppu::UnoType<sheet::ExternalReference>::get() ) ) { sheet::ExternalReference aApiExtRef; diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx index b8b3d5456df5..0cf249ce7f98 100644 --- a/sc/source/core/tool/viewopti.cxx +++ b/sc/source/core/tool/viewopti.cxx @@ -153,6 +153,7 @@ void ScViewOptions::SetDefaults() aOptArr[ VOPT_FORMULAS ] = aOptArr[ VOPT_SYNTAX ] = aOptArr[ VOPT_HELPLINES ] = + aOptArr[ VOPT_GRID_ONTOP ] = aOptArr[ VOPT_BIGHANDLES ] = false; aOptArr[ VOPT_NOTES ] = aOptArr[ VOPT_NULLVALS ] = @@ -308,7 +309,8 @@ SfxPoolItem* ScTpViewItem::Clone( SfxItemPool * ) const #define SCLAYOUTOPT_VERTSCROLL 8 #define SCLAYOUTOPT_SHEETTAB 9 #define SCLAYOUTOPT_OUTLINE 10 -#define SCLAYOUTOPT_COUNT 11 +#define SCLAYOUTOPT_GRID_ONCOLOR 11 +#define SCLAYOUTOPT_COUNT 12 #define CFGPATH_DISPLAY "Office.Calc/Content/Display" @@ -343,6 +345,7 @@ Sequence<OUString> ScViewCfg::GetLayoutPropertyNames() static const char* aPropNames[] = { "Line/GridLine", // SCLAYOUTOPT_GRIDLINES + "Line/GridOnColoredCells", // SCLAYOUTOPT_GRID_ONCOLOR "Line/GridLineColor", // SCLAYOUTOPT_GRIDCOLOR "Line/PageBreak", // SCLAYOUTOPT_PAGEBREAK "Line/Guide", // SCLAYOUTOPT_GUIDE @@ -445,6 +448,9 @@ ScViewCfg::ScViewCfg() : case SCLAYOUTOPT_GRIDLINES: SetOption( VOPT_GRID, ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) ); break; + case SCLAYOUTOPT_GRID_ONCOLOR: + SetOption( VOPT_GRID_ONTOP, ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) ); + break; case SCLAYOUTOPT_PAGEBREAK: SetOption( VOPT_PAGEBREAKS, ScUnoHelpFunctions::GetBoolFromAny( pValues[nProp] ) ); break; @@ -613,6 +619,9 @@ IMPL_LINK( ScViewCfg, LayoutCommitHdl, void *, EMPTYARG ) case SCLAYOUTOPT_GRIDLINES: ScUnoHelpFunctions::SetBoolInAny( pValues[nProp], GetOption( VOPT_GRID ) ); break; + case SCLAYOUTOPT_GRID_ONCOLOR: + ScUnoHelpFunctions::SetBoolInAny( pValues[nProp], GetOption( VOPT_GRID_ONTOP ) ); + break; case SCLAYOUTOPT_PAGEBREAK: ScUnoHelpFunctions::SetBoolInAny( pValues[nProp], GetOption( VOPT_PAGEBREAKS ) ); break; diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx index 227e0417670e..4baf780a9ea6 100644 --- a/sc/source/filter/excel/excform.cxx +++ b/sc/source/filter/excel/excform.cxx @@ -1564,7 +1564,6 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz ) if( nAnz > 0 ) { // attention: 0 = last parameter, nAnz-1 = first parameter - sal_Int16 nNull = -1; // skip this parameter sal_Int16 nSkipEnd = -1; // skip all parameters <= nSkipEnd sal_Int16 nLast = nAnz - 1; @@ -1591,6 +1590,7 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz ) // [Parameter{;Parameter}] if( nLast > nSkipEnd ) { + sal_Int16 nNull = -1; // skip this parameter aPool << eParam[ nLast ]; for( nLauf = nLast - 1 ; nLauf > nSkipEnd ; nLauf-- ) { diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx index fcdc6a797b89..18e38cb5bc02 100644 --- a/sc/source/filter/excel/xename.cxx +++ b/sc/source/filter/excel/xename.cxx @@ -677,6 +677,20 @@ void XclExpNameManagerImpl::CreateUserNames() if (!itr->HasType(RT_SHARED) && !FindNamedExpIndex(SCTAB_GLOBAL, itr->GetIndex())) CreateName(SCTAB_GLOBAL, *itr); } + //look at every sheet for local range names + ScRangeName::TabNameCopyMap rLocalNames; + GetDoc().GetAllTabRangeNames(rLocalNames); + ScRangeName::TabNameCopyMap::iterator tabIt = rLocalNames.begin(), tabItEnd = rLocalNames.end(); + for (; tabIt != tabItEnd; ++tabIt) + { + itr = tabIt->second->begin(), itrEnd = tabIt->second->end(); + for (; itr != itrEnd; ++itr) + { + // skip definitions of shared formulas + if (!itr->HasType(RT_SHARED) && !FindNamedExpIndex(tabIt->first, itr->GetIndex())) + CreateName(tabIt->first, *itr); + } + } } // ---------------------------------------------------------------------------- diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index 0e0514da0dae..d71377c8411c 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -1191,11 +1191,6 @@ extern "C" { #endif -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - // ------------------------ // - component_getFactory - // ------------------------ diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index dd2bd616a900..bc186e039116 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -115,6 +115,10 @@ #include "namebuff.hxx" #include <boost/shared_ptr.hpp> +#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> +#include <comphelper/mediadescriptor.hxx> +#include <sfx2/docfile.hxx> using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -125,6 +129,7 @@ using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::UNO_QUERY_THROW; using ::com::sun::star::uno::UNO_SET_THROW; +using ::com::sun::star::uno::XComponentContext; using ::com::sun::star::beans::NamedValue; using ::com::sun::star::lang::XMultiServiceFactory; using ::com::sun::star::container::XIndexContainer; @@ -3076,8 +3081,9 @@ void XclImpSolverContainer::RemoveSdrObjectInfo( SdrObject& rSdrObj ) void XclImpSolverContainer::UpdateConnectorRules() { - for( SvxMSDffConnectorRule* pRule = GetFirstRule(); pRule; pRule = GetNextRule() ) + for ( size_t i = 0, n = aCList.size(); i < n; ++i ) { + SvxMSDffConnectorRule* pRule = aCList[ i ]; UpdateConnection( pRule->nShapeA, pRule->pAObj, &pRule->nSpFlagsA ); UpdateConnection( pRule->nShapeB, pRule->pBObj, &pRule->nSpFlagsB ); UpdateConnection( pRule->nShapeC, pRule->pCObj ); @@ -3087,24 +3093,14 @@ void XclImpSolverContainer::UpdateConnectorRules() void XclImpSolverContainer::RemoveConnectorRules() { // base class from SVX uses plain untyped tools/List - for( SvxMSDffConnectorRule* pRule = GetFirstRule(); pRule; pRule = GetNextRule() ) - delete pRule; - aCList.Clear(); - + for ( size_t i = 0, n = aCList.size(); i < n; ++i ) { + delete aCList[ i ]; + } + aCList.clear(); maSdrInfoMap.clear(); maSdrObjMap.clear(); } -SvxMSDffConnectorRule* XclImpSolverContainer::GetFirstRule() -{ - return static_cast< SvxMSDffConnectorRule* >( aCList.First() ); -} - -SvxMSDffConnectorRule* XclImpSolverContainer::GetNextRule() -{ - return static_cast< SvxMSDffConnectorRule* >( aCList.Next() ); -} - void XclImpSolverContainer::UpdateConnection( sal_uInt32 nDffShapeId, SdrObject*& rpSdrObj, sal_uInt32* pnDffFlags ) { XclImpSdrInfoMap::const_iterator aIt = maSdrInfoMap.find( nDffShapeId ); @@ -3141,6 +3137,12 @@ bool XclImpSimpleDffConverter::GetColorFromPalette( sal_uInt16 nIndex, Color& rC } // ---------------------------------------------------------------------------- +Reference< XComponentContext > +lcl_getUnoCtx() +{ + comphelper::ComponentContext aCtx( ::comphelper::getProcessServiceFactory() ); + return aCtx.getUNOContext(); +} XclImpDffConverter::XclImpDffConvData::XclImpDffConvData( XclImpDrawing& rDrawing, SdrModel& rSdrModel, SdrPage& rSdrPage ) : @@ -3151,13 +3153,12 @@ XclImpDffConverter::XclImpDffConvData::XclImpDffConvData( mbHasCtrlForm( false ) { } - // ---------------------------------------------------------------------------- XclImpDffConverter::XclImpDffConverter( const XclImpRoot& rRoot, SvStream& rDffStrm ) : XclImpSimpleDffConverter( rRoot, rDffStrm ), - SvxMSConvertOCXControls( rRoot.GetDocShell(), 0 ), maStdFormName( CREATE_OUSTRING( "Standard" ) ), + maFormCtrlHelper( GetMedium().GetInputStream(), lcl_getUnoCtx(), GetDocShell()->GetModel() ), mnOleImpFlags( 0 ) { if( SvtFilterOptions* pFilterOpt = SvtFilterOptions::Get() ) @@ -3321,8 +3322,19 @@ SdrObject* XclImpDffConverter::CreateSdrObject( const XclImpPictureObj& rPicObj, mxCtlsStrm->Seek( rPicObj.GetCtlsStreamPos() ); // read from mxCtlsStrm into xShape, insert the control model into the form Reference< XShape > xShape; - if( GetConvData().mxCtrlForm.is() && ReadOCXExcelKludgeStream( mxCtlsStrm, &xShape, sal_True ) ) - xSdrObj.reset( rPicObj.CreateSdrObjectFromShape( xShape, rAnchorRect ) ); + if( GetConvData().mxCtrlForm.is() ) + { + Reference< XFormComponent > xFComp; + com::sun::star::awt::Size aSz; // not used in import + maFormCtrlHelper.importFormControlFromCtls( xFComp, rPicObj.GetCtlsStreamPos(), rPicObj.GetCtlsStreamSize() ); + // recreate the method formally known as + // ReadOCXExcelKludgeStream( ) + if ( xFComp.is() ) + { + InsertControl( xFComp, aSz,&xShape,true); + xSdrObj.reset( rPicObj.CreateSdrObjectFromShape( xShape, rAnchorRect ) ); + } + } } catch( Exception& ) { diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx index 261d61f9f452..19e18d9f22cc 100644 --- a/sc/source/filter/excel/xiname.cxx +++ b/sc/source/filter/excel/xiname.cxx @@ -271,7 +271,7 @@ const XclImpName* XclImpNameManager::FindName( const String& rXclName, SCTAB nSc const XclImpName* XclImpNameManager::GetName( sal_uInt16 nXclNameIdx ) const { OSL_ENSURE( nXclNameIdx > 0, "XclImpNameManager::GetName - index must be >0" ); - return ( nXclNameIdx >= maNameList.size() ) ? NULL : &(maNameList.at( nXclNameIdx - 1 )); + return ( nXclNameIdx > maNameList.size() ) ? NULL : &(maNameList.at( nXclNameIdx - 1 )); } // ============================================================================ diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx index 87c30020e479..23b6f927f407 100644 --- a/sc/source/filter/ftools/ftools.cxx +++ b/sc/source/filter/ftools/ftools.cxx @@ -162,6 +162,8 @@ Color ScfTools::GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8 void ScfTools::ConvertToScDefinedName( String& rName ) { + sal_Char a('.'); + rName.SearchAndReplaceAllAscii(&a,'_'); //fdo#37872: we don't allow points in range names any more xub_StrLen nLen = rName.Len(); if( nLen && !ScCompiler::IsCharFlagAllConventions( rName, 0, SC_COMPILER_C_CHAR_NAME ) ) rName.SetChar( 0, '_' ); diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index b75d1f6db4f6..f91dc75687fa 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -1012,7 +1012,9 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo ) nColOffsetStart = nColOffset; } - ScEEParseEntry* pE = maList.back(); + ScEEParseEntry* pE = NULL; + if (maList.size()) + pE = maList.back(); NewActEntry( pE ); // neuer freifliegender pActEntry xLockedList = new ScRangeList; } diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx index be6a48f317bc..7c05346b26ef 100644 --- a/sc/source/filter/inc/xiescher.hxx +++ b/sc/source/filter/inc/xiescher.hxx @@ -38,7 +38,7 @@ #include "xiroot.hxx" #include "xistring.hxx" #include <boost/shared_ptr.hpp> - +#include <oox/ole/olehelper.hxx> namespace com { namespace sun { namespace star { namespace drawing { class XShape; } namespace form { class XForm; } @@ -940,10 +940,6 @@ public: void RemoveConnectorRules(); private: - /** Returns the first connector rule from the internal list. */ - SvxMSDffConnectorRule* GetFirstRule(); - /** Returns the next connector rule from the internal list. */ - SvxMSDffConnectorRule* GetNextRule(); /** Updates the data of a connected shape in a connector rule. */ void UpdateConnection( sal_uInt32 nDffShapeId, SdrObject*& rpSdrObj, sal_uInt32* pnDffFlags = 0 ); @@ -989,7 +985,7 @@ protected: contains core implementation of DFF stream import and OCX form control import. */ -class XclImpDffConverter : public XclImpSimpleDffConverter, private SvxMSConvertOCXControls +class XclImpDffConverter : public XclImpSimpleDffConverter { public: explicit XclImpDffConverter( const XclImpRoot& rRoot, SvStream& rDffStrm ); @@ -1096,6 +1092,7 @@ private: typedef ::std::vector< XclImpDffConvDataRef > XclImpDffConvDataStack; const ::rtl::OUString maStdFormName; /// Standard name of control forms. + ::oox::ole::OleFormCtrlImportHelper maFormCtrlHelper; SotStorageStreamRef mxCtlsStrm; /// The 'Ctls' stream for OCX form controls. ScfProgressBarRef mxProgress; /// The progress bar used in ProcessObj(). XclImpDffConvDataStack maDataStack; /// Stack for registered drawing managers. diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx index 0869a2309b51..168800478f46 100644 --- a/sc/source/filter/lotus/lotform.cxx +++ b/sc/source/filter/lotus/lotform.cxx @@ -2034,8 +2034,6 @@ DefTokenId lcl_KnownAddIn( const ByteString& sTest ) eId=ocArcCot; else if(sTest== "COT") eId=ocCot; - else if(sTest== "ACOT") - eId=ocArcCot; else if(sTest== "TRUNC") eId=ocTrunc; else if(sTest== "GEOMEAN") diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx index d76fb8cd3206..0f90bc51d840 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.cxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx @@ -798,7 +798,9 @@ sal_Bool ScMyFormatRange::operator<(const ScMyFormatRange& rRange) const ScFormatRangeStyles::ScFormatRangeStyles() : aTables(), aStyleNames(), - aAutoStyleNames() + aAutoStyleNames(), + pRowDefaults(0), + pColDefaults(0) { } diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 7154a86c3fc9..d4f82bba649e 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -2770,124 +2770,31 @@ private: } -void ScXMLImport::SetNamedRanges() -{ - ScMyNamedExpressions* pNamedExpressions = GetNamedExpressions(); - if (!pNamedExpressions) - return; - - Reference <beans::XPropertySet> xPropertySet (GetModel(), UNO_QUERY); - if (!xPropertySet.is()) - return; - - Reference <sheet::XNamedRanges> xNamedRanges( - xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_NAMEDRANGES))), UNO_QUERY); - - if (!xNamedRanges.is()) - return; - - Reference<beans::XPropertySet> xPropSet(xNamedRanges, UNO_QUERY); - if (!xPropSet.is()) - return; - - // Turn off broadcasting while adding imported range names. - NamedRangesSwitch aSwitch(xPropSet); - - ScMyNamedExpressions::iterator aItr(pNamedExpressions->begin()); - ScMyNamedExpressions::const_iterator aEndItr(pNamedExpressions->end()); - table::CellAddress aCellAddress; - OUString sTempContent(RTL_CONSTASCII_USTRINGPARAM("0")); - - for (; aItr != aEndItr; ++aItr) - { - sal_Int32 nOffset = 0; - bool bSuccess = ScRangeStringConverter::GetAddressFromString( - aCellAddress, aItr->sBaseCellAddress, GetDocument(), FormulaGrammar::CONV_OOO, nOffset); - - if (!bSuccess) - // Conversion of base cell address failed. Skip this. - continue; - - try - { - xNamedRanges->addNewByName( - aItr->sName, sTempContent, aCellAddress, GetRangeType(aItr->sRangeType)); - } - catch( uno::RuntimeException& ) - { - OSL_FAIL("here are some Named Ranges with the same name"); - uno::Reference < container::XIndexAccess > xIndex(xNamedRanges, uno::UNO_QUERY); - if (xIndex.is()) - { - sal_Int32 nMax = xIndex->getCount(); - bool bInserted = false; - sal_Int32 nCount = 1; - OUStringBuffer sName(aItr->sName); - sName.append(sal_Unicode('_')); - while (!bInserted && nCount <= nMax) - { - OUStringBuffer sTemp(sName); - sTemp.append(OUString::valueOf(nCount)); - try - { - xNamedRanges->addNewByName( - sTemp.makeStringAndClear(), sTempContent, aCellAddress, - GetRangeType(aItr->sRangeType)); - bInserted = true; - } - catch( uno::RuntimeException& ) - { - ++nCount; - } - } - UnlockSolarMutex(); - } - } - } - - aItr = pNamedExpressions->begin(); - while (aItr != aEndItr) - { - sal_Int32 nOffset(0); - if (ScRangeStringConverter::GetAddressFromString( - aCellAddress, aItr->sBaseCellAddress, GetDocument(), FormulaGrammar::CONV_OOO, nOffset )) - { - uno::Reference <sheet::XNamedRange> xNamedRange(xNamedRanges->getByName(aItr->sName), uno::UNO_QUERY); - if (xNamedRange.is()) - { - ScXMLImport::MutexGuard aGuard(*this); - ScNamedRangeObj* pNamedRangeObj = ScNamedRangeObj::getImplementation( xNamedRange); - if (pNamedRangeObj) - { - sTempContent = aItr->sContent; - // Get rid of leading sheet dots in simple ranges. - if (!aItr->bIsExpression) - ScXMLConverter::ParseFormula( sTempContent, false); - pNamedRangeObj->SetContentWithGrammar( sTempContent, aItr->eGrammar); - } - } - } - aItr = pNamedExpressions->erase(aItr); - } -} - namespace { -class SheetRangeNameInserter : public ::std::unary_function<ScMyNamedExpression, void> +class RangeNameInserter : public ::std::unary_function<ScMyNamedExpression, void> { ScDocument* mpDoc; ScRangeName& mrRangeName; + ScXMLImport& mrXmlImport; + public: - SheetRangeNameInserter(ScDocument* pDoc, ScRangeName& rRangeName) : - mpDoc(pDoc), mrRangeName(rRangeName) {} + RangeNameInserter(ScDocument* pDoc, ScRangeName& rRangeName, ScXMLImport& rXmlImport) : + mpDoc(pDoc), mrRangeName(rRangeName), mrXmlImport(rXmlImport) {} void operator() (const ScMyNamedExpression& r) const { using namespace formula; - if (r.sRangeType.getLength() > 0) - // For now, we only accept normal named expressions. - return; + const ::rtl::OUString& aType = r.sRangeType; + sal_uInt32 nUnoType = mrXmlImport.GetRangeType(aType); + + sal_uInt16 nNewType = RT_NAME; + if ( nUnoType & sheet::NamedRangeFlag::FILTER_CRITERIA ) nNewType |= RT_CRITERIA; + if ( nUnoType & sheet::NamedRangeFlag::PRINT_AREA ) nNewType |= RT_PRINTAREA; + if ( nUnoType & sheet::NamedRangeFlag::COLUMN_HEADER ) nNewType |= RT_COLHEADER; + if ( nUnoType & sheet::NamedRangeFlag::ROW_HEADER ) nNewType |= RT_ROWHEADER; + if (mpDoc && !mrRangeName.findByName(r.sName)) { @@ -2904,7 +2811,7 @@ public: ScXMLConverter::ParseFormula(aContent, false); ScRangeData* pData = new ScRangeData( - mpDoc, r.sName, r.sContent, aPos, RT_NAME, r.eGrammar); + mpDoc, r.sName, aContent, aPos, nNewType, r.eGrammar); mrRangeName.insert(pData); } } @@ -2913,6 +2820,20 @@ public: } +void ScXMLImport::SetNamedRanges() +{ + ScMyNamedExpressions* pNamedExpressions = GetNamedExpressions(); + if (!pNamedExpressions) + return; + + if (!pDoc) + return; + + // Insert the namedRanges + ScRangeName* pRangeNames = pDoc->GetRangeName(); + ::std::for_each(pNamedExpressions->begin(), pNamedExpressions->end(), RangeNameInserter(pDoc, *pRangeNames, *this)); +} + void ScXMLImport::SetSheetNamedRanges() { if (!pDoc) @@ -2927,7 +2848,7 @@ void ScXMLImport::SetSheetNamedRanges() continue; const ScMyNamedExpressions& rNames = *itr->second; - ::std::for_each(rNames.begin(), rNames.end(), SheetRangeNameInserter(pDoc, *pRangeNames)); + ::std::for_each(rNames.begin(), rNames.end(), RangeNameInserter(pDoc, *pRangeNames, *this)); } } diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx index 2dbbd15c2f12..2e85f48b44bc 100644 --- a/sc/source/ui/Accessibility/AccessibleText.cxx +++ b/sc/source/ui/Accessibility/AccessibleText.cxx @@ -1096,7 +1096,7 @@ ScAccessibleEditLineTextData::ScAccessibleEditLineTextData(EditView* pEditView, ScAccessibleEditObjectTextData(pEditView, pWin), mbEditEngineCreated(false) { - ScTextWnd* pTxtWnd = (ScTextWnd*)pWin; + ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>( pWin ); if (pTxtWnd) pTxtWnd->InsertAccessibleTextData( *this ); @@ -1104,7 +1104,7 @@ ScAccessibleEditLineTextData::ScAccessibleEditLineTextData(EditView* pEditView, ScAccessibleEditLineTextData::~ScAccessibleEditLineTextData() { - ScTextWnd* pTxtWnd = (ScTextWnd*)mpWindow; + ScTextWnd* pTxtWnd = dynamic_cast< ScTextWnd* >(mpWindow); if (pTxtWnd) pTxtWnd->RemoveAccessibleTextData( *this ); @@ -1125,7 +1125,7 @@ ScAccessibleEditLineTextData::~ScAccessibleEditLineTextData() void ScAccessibleEditLineTextData::Dispose() { - ScTextWnd* pTxtWnd = (ScTextWnd*)mpWindow; + ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow); if (pTxtWnd) pTxtWnd->RemoveAccessibleTextData( *this ); @@ -1141,7 +1141,7 @@ ScAccessibleTextData* ScAccessibleEditLineTextData::Clone() const SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder() { - ScTextWnd* pTxtWnd = (ScTextWnd*)mpWindow; + ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow); if (pTxtWnd) { @@ -1187,7 +1187,7 @@ SvxTextForwarder* ScAccessibleEditLineTextData::GetTextForwarder() SvxEditViewForwarder* ScAccessibleEditLineTextData::GetEditViewForwarder( sal_Bool bCreate ) { - ScTextWnd* pTxtWnd = (ScTextWnd*)mpWindow; + ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow); if (pTxtWnd) { @@ -1209,7 +1209,7 @@ SvxEditViewForwarder* ScAccessibleEditLineTextData::GetEditViewForwarder( sal_Bo void ScAccessibleEditLineTextData::ResetEditMode() { - ScTextWnd* pTxtWnd = (ScTextWnd*)mpWindow; + ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow); if (mbEditEngineCreated && mpEditEngine) delete mpEditEngine; @@ -1227,7 +1227,7 @@ void ScAccessibleEditLineTextData::TextChanged() { if (mbEditEngineCreated && mpEditEngine) { - ScTextWnd* pTxtWnd = (ScTextWnd*)mpWindow; + ScTextWnd* pTxtWnd = dynamic_cast<ScTextWnd*>(mpWindow); if (pTxtWnd) mpEditEngine->SetText(pTxtWnd->GetTextString()); diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 1746d0a5c2b8..44dfe326fe66 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -2065,7 +2065,8 @@ IMPL_LINK( ScInputHandler, ModifyHdl, void *, EMPTYARG ) sal_Bool ScInputHandler::DataChanging( sal_Unicode cTyped, sal_Bool bFromCommand ) // return sal_True = new view created { - pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE ); + if (pActiveViewSh) + pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE ); bInOwnChange = true; // disable ModifyHdl (reset in DataChanged) if ( eMode == SC_INPUT_NONE ) @@ -2282,7 +2283,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode ) return; } - if (eNewMode != SC_INPUT_NONE) + if (eNewMode != SC_INPUT_NONE && pActiveViewSh) // Disable paste mode when edit mode starts. pActiveViewSh->GetViewData()->SetPasteMode( SC_PASTE_NONE ); diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index af08922d4828..d9efd94e0535 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -75,8 +75,10 @@ #include <com/sun/star/accessibility/XAccessible.hpp> #include "AccessibleEditObject.hxx" #include "AccessibleText.hxx" +#include <svtools/miscopt.hxx> #define TEXT_STARTPOS 3 +#define TEXT_MULTI_STARTPOS 5 #define THESIZE 1000000 //!!! langt... :-) #define TBX_WINDOW_HEIGHT 22 // in Pixeln - fuer alle Systeme gleich? @@ -128,16 +130,29 @@ SfxChildWinInfo ScInputWindowWrapper::GetInfo() const //================================================================== #define IMAGE(id) pImgMgr->SeekImage(id) +bool lcl_isExperimentalMode() +{ + SvtMiscOptions aMiscOptions; + return aMiscOptions.IsExperimentalMode(); +} //================================================================== // class ScInputWindow //================================================================== +ScTextWndBase* lcl_chooseRuntimeImpl( Window* pParent ) +{ + if ( !lcl_isExperimentalMode() ) + return new ScTextWnd( pParent ); + return new ScInputBarGroup( pParent ); +} + ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : // mit WB_CLIPCHILDREN, sonst Flicker ToolBox ( pParent, WinBits(WB_BORDER|WB_3DLOOK|WB_CLIPCHILDREN) ), aWndPos ( this ), - aTextWindow ( this ), + pRuntimeWindow ( lcl_chooseRuntimeImpl( this ) ), + aTextWindow ( *pRuntimeWindow ), pInputHdl ( NULL ), pBindings ( pBind ), aTextOk ( ScResId( SCSTR_QHELP_BTNOK ) ), // nicht immer neu aus Resource @@ -189,7 +204,7 @@ ScInputWindow::ScInputWindow( Window* pParent, SfxBindings* pBind ) : SetHelpId( HID_SC_INPUTWIN ); // fuer die ganze Eingabezeile aWndPos .Show(); - aTextWindow .Show(); + aTextWindow.Show(); pInputHdl = SC_MOD()->GetInputHdl( pViewSh, false ); // use own handler even if ref-handler is set if (pInputHdl) @@ -488,6 +503,12 @@ void ScInputWindow::Resize() Size aSize = aTextWindow.GetSizePixel(); aSize.Width() = Max( ((long)(nWidth - nLeft - 5)), (long)0 ); + if ( lcl_isExperimentalMode() ) + { + aSize.Height()= TBX_WINDOW_HEIGHT; + aTextWindow.SetSizePixel( aSize ); + aTextWindow.Resize(); + } aTextWindow.SetSizePixel( aSize ); aTextWindow.Invalidate(); } @@ -703,17 +724,141 @@ void ScInputWindow::DataChanged( const DataChangedEvent& rDCEvt ) } //======================================================================== +// ScInputBarGroup +//======================================================================== + +ScInputBarGroup::ScInputBarGroup(Window* pParent) + : ScTextWndBase ( pParent, WinBits(WB_HIDE) ), + aTextWindow ( this ), + bIsMultiLine ( false ) +{ + aTextWindow.Show(); + aTextWindow.SetQuickHelpText( ScResId( SCSTR_QHELP_INPUTWND ) ); + aTextWindow.SetHelpId ( HID_INSWIN_INPUT ); +} + +ScInputBarGroup::~ScInputBarGroup() +{ + +} + +void +ScInputBarGroup::InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData ) +{ + aTextWindow.InsertAccessibleTextData( rTextData ); +} + +void +ScInputBarGroup::RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData ) +{ + aTextWindow.RemoveAccessibleTextData( rTextData ); +} + +const String& +ScInputBarGroup::GetTextString() const +{ + return aTextWindow.GetTextString(); +} + +void ScInputBarGroup::SetTextString( const String& rString ) +{ + aTextWindow.SetTextString(rString); +} + +void ScInputBarGroup::Resize() +{ + long nWidth = GetSizePixel().Width(); + long nLeft = aTextWindow.GetPosPixel().X(); + Size aSize = aTextWindow.GetSizePixel(); + + aSize.Width() = Max( ((long)(nWidth - nLeft - 40)), (long)0 ); + aSize.Height()=22; + aTextWindow.SetSizePixel( aSize ); + aTextWindow.Invalidate(); +} + +void ScInputBarGroup::GainFocus() +{ + aTextWindow.GrabFocus(); +} + + +void ScInputBarGroup::StopEditEngine( sal_Bool bAll ) +{ + aTextWindow.StopEditEngine( bAll ); +} + +void ScInputBarGroup::StartEditEngine() +{ + aTextWindow.StartEditEngine(); +} + +void ScInputBarGroup::MakeDialogEditView() +{ + aTextWindow.MakeDialogEditView(); +} + + +EditView* ScInputBarGroup::GetEditView() +{ + return aTextWindow.GetEditView(); +} + +sal_Bool ScInputBarGroup::IsInputActive() +{ + return aTextWindow.IsInputActive(); +} + +void ScInputBarGroup::SetFormulaMode(sal_Bool bSet) +{ + aTextWindow.SetFormulaMode(bSet); +} + +ScMultiTextWnd::ScMultiTextWnd( Window* pParen ) : ScTextWnd( pParen ) +{ + nTextStartPos = TEXT_MULTI_STARTPOS; +} + +void ScMultiTextWnd::Paint( const Rectangle& rRec ) +{ + // We always use edit engine to draw text at all times. + if (!pEditEngine) + InitEditEngine(SfxObjectShell::Current()); + + if (pEditView) + { + pEditView->Paint(rRec); + } +} + +void ScMultiTextWnd::Resize() +{ + if (pEditView) + { + Size aSize = GetOutputSizePixel(); + + Size bSize = LogicToPixel(Size(0,pEditEngine->GetLineHeight(0,0))); + int nDiff=(aSize.Height()-bSize.Height())/2; + Point aPos(nTextStartPos,nDiff*aSize.Height()/aSize.Height()); + Point aPos2(aSize.Width()-5,(aSize.Height()-nDiff)*aSize.Height()/aSize.Height()); + pEditView->SetOutputArea( + PixelToLogic(Rectangle(aPos, aPos2))); + } +} + +//======================================================================== // Eingabefenster //======================================================================== ScTextWnd::ScTextWnd( Window* pParent ) - : Window ( pParent, WinBits(WB_HIDE | WB_BORDER) ), + : ScTextWndBase ( pParent, WinBits(WB_HIDE | WB_BORDER) ), DragSourceHelper( this ), pEditEngine ( NULL ), pEditView ( NULL ), bIsInsertMode( sal_True ), bFormulaMode ( false ), - bInputMode ( false ) + bInputMode ( false ), + nTextStartPos ( TEXT_STARTPOS ) { EnableRTL( false ); // EditEngine can't be used with VCL EnableRTL @@ -767,11 +912,11 @@ void ScTextWnd::Paint( const Rectangle& rRec ) - LogicToPixel( Size( 0, GetTextHeight() ) ).Height(); // if (nDiff<2) nDiff=2; // mind. 1 Pixel - long nStartPos = TEXT_STARTPOS; + long nStartPos = nTextStartPos; if ( bIsRTL ) { // right-align - nStartPos += GetOutputSizePixel().Width() - 2*TEXT_STARTPOS - + nStartPos += GetOutputSizePixel().Width() - 2*nTextStartPos - LogicToPixel( Size( GetTextWidth( aString ), 0 ) ).Width(); // LayoutMode isn't changed as long as ModifyRTLDefaults doesn't include SvxFrameDirectionItem @@ -789,10 +934,10 @@ void ScTextWnd::Resize() long nDiff = aSize.Height() - LogicToPixel( Size( 0, GetTextHeight() ) ).Height(); - aSize.Width() -= 2 * TEXT_STARTPOS - 1; + aSize.Width() -= 2 * nTextStartPos - 1; pEditView->SetOutputArea( - PixelToLogic( Rectangle( Point( TEXT_STARTPOS, (nDiff > 0) ? nDiff/2 : 1 ), + PixelToLogic( Rectangle( Point( nTextStartPos, (nDiff > 0) ? nDiff/2 : 1 ), aSize ) ) ); } } @@ -1013,6 +1158,117 @@ void lcl_ModifyRTLVisArea( EditView* pEditView ) pEditView->SetVisArea(aVisArea); } +void ScMultiTextWnd::StartEditEngine() +{ + // Bei "eigener Modalitaet" (Doc-modale Dialoge) nicht aktivieren + + SfxObjectShell* pObjSh = SfxObjectShell::Current(); + if ( pObjSh && pObjSh->IsInModalMode() ) + return; + + if ( !pEditView || !pEditEngine ) + { + InitEditEngine(pObjSh); + } + + SC_MOD()->SetInputMode( SC_INPUT_TOP ); + + SfxViewFrame* pViewFrm = SfxViewFrame::Current(); + if (pViewFrm) + pViewFrm->GetBindings().Invalidate( SID_ATTR_INSERT ); +} + +void ScMultiTextWnd::InitEditEngine(SfxObjectShell* pObjSh) +{ + ScFieldEditEngine* pNew; + ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); + if ( pViewSh ) + { + const ScDocument* pDoc = pViewSh->GetViewData()->GetDocument(); + pNew = new ScFieldEditEngine( pDoc->GetEnginePool(), pDoc->GetEditPool() ); + } + else + pNew = new ScFieldEditEngine( EditEngine::CreatePool(), NULL, sal_True ); + pNew->SetExecuteURL( false ); + pEditEngine = pNew; + + Size barSize=GetOutputSizePixel(); + + long barHeight=barSize.Height(); + long textHeight=LogicToPixel( Size( 0, GetTextHeight() ) ).Height(); + long nDiff = barHeight - textHeight; + + barSize.Height()=nDiff+barHeight; + barSize.Width() -= 2*nTextStartPos-4; + pEditEngine->SetUpdateMode( false ); + pEditEngine->SetPaperSize( PixelToLogic(Size(barSize.Width(),10000)) ); + pEditEngine->SetWordDelimiters( + ScEditUtil::ModifyDelimiters( pEditEngine->GetWordDelimiters() ) ); + + UpdateAutoCorrFlag(); + + { + SfxItemSet* pSet = new SfxItemSet( pEditEngine->GetEmptyItemSet() ); + pEditEngine->SetFontInfoInItemSet( *pSet, aTextFont ); + lcl_ExtendEditFontAttribs( *pSet ); + // turn off script spacing to match DrawText output + pSet->Put( SvxScriptSpaceItem( false, EE_PARA_ASIANCJKSPACING ) ); + if ( bIsRTL ) + lcl_ModifyRTLDefaults( *pSet ); + pEditEngine->SetDefaults( pSet ); + } + + // Wenn in der Zelle URL-Felder enthalten sind, muessen die auch in + // die Eingabezeile uebernommen werden, weil sonst die Positionen nicht stimmen. + + sal_Bool bFilled = false; + ScInputHandler* pHdl = SC_MOD()->GetInputHdl(); + if ( pHdl ) //! Testen, ob's der richtige InputHdl ist? + bFilled = pHdl->GetTextAndFields( *pEditEngine ); + + pEditEngine->SetUpdateMode( sal_True ); + + // aString ist die Wahrheit... + if ( bFilled && pEditEngine->GetText() == aString ) + Invalidate(); // Repaint fuer (hinterlegte) Felder + else + pEditEngine->SetText(aString); // dann wenigstens den richtigen Text + + pEditView = new EditView( pEditEngine, this ); + pEditView->SetInsertMode(bIsInsertMode); + + // Text aus Clipboard wird als ASCII einzeilig uebernommen + sal_uLong n = pEditView->GetControlWord(); + pEditView->SetControlWord( n | EV_CNTRL_SINGLELINEPASTE ); + + pEditEngine->InsertView( pEditView, EE_APPEND ); + + Resize(); + + if ( bIsRTL ) + lcl_ModifyRTLVisArea( pEditView ); + + pEditEngine->SetModifyHdl(LINK(this, ScTextWnd, NotifyHdl)); + + if (!maAccTextDatas.empty()) + maAccTextDatas.back()->StartEdit(); + + // as long as EditEngine and DrawText sometimes differ for CTL text, + // repaint now to have the EditEngine's version visible +// SfxObjectShell* pObjSh = SfxObjectShell::Current(); + if ( pObjSh && pObjSh->ISA(ScDocShell) ) + { + ScDocument* pDoc = ((ScDocShell*)pObjSh)->GetDocument(); // any document + sal_uInt8 nScript = pDoc->GetStringScriptType( aString ); + if ( nScript & SCRIPTTYPE_COMPLEX ) + Invalidate(); + } +} + +void ScMultiTextWnd::StopEditEngine( sal_Bool /*bAll*/ ) +{ +} + void ScTextWnd::StartEditEngine() { // Bei "eigener Modalitaet" (Doc-modale Dialoge) nicht aktivieren @@ -1206,7 +1462,7 @@ void ScTextWnd::SetTextString( const String& rNewString ) nDifPos = 0; // -1 wegen Rundung und "A" - Point aLogicStart = PixelToLogic(Point(TEXT_STARTPOS-1,0)); + Point aLogicStart = PixelToLogic(Point(nTextStartPos-1,0)); long nStartPos = aLogicStart.X(); long nInvPos = nStartPos; if (nDifPos) @@ -1694,7 +1950,7 @@ void ScPosWnd::DoEnter() { // Note that SID_CURRENTCELL always expects address to // be in Calc A1 format. Convert the text. - ScRange aRange; + ScRange aRange(0,0,pViewData->GetTabNo()); aRange.ParseAny(aText, pDoc, pDoc->GetAddressConvention()); aRange.Format(aText, SCR_ABS_3D, pDoc, ::formula::FormulaGrammar::CONV_OOO); } diff --git a/sc/source/ui/attrdlg/condfrmt.cxx b/sc/source/ui/attrdlg/condfrmt.cxx index 258ee96829aa..f5f47a704802 100644 --- a/sc/source/ui/attrdlg/condfrmt.cxx +++ b/sc/source/ui/attrdlg/condfrmt.cxx @@ -959,8 +959,7 @@ IMPL_LINK( ScConditionalFormatDlg, BtnHdl, PushButton*, pBtn ) else if ( pBtn == &aBtnAdd ) { - if ( ppEntries[ nEntryCount - 1 ] ) - AddEntry(); + AddEntry(); aScrollBar.SetThumbPos( nEntryCount - 3 ); SliderMoved(); aEdtCond31.GrabFocus(); diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index 10e1013cf1bf..773dfd081496 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -1180,13 +1180,13 @@ AbstractScNameCreateDlg * ScAbstractDialogFactory_Impl::CreateScNameCreateDlg ( AbstractScNamePasteDlg * ScAbstractDialogFactory_Impl::CreateScNamePasteDlg ( Window * pParent, const ScRangeName* pList, - int nId , sal_Bool bInsList ) + const ScRangeName* pLocalList, int nId , bool bInsList ) { ScNamePasteDlg * pDlg=NULL; switch ( nId ) { case RID_SCDLG_NAMES_PASTE : - pDlg = new ScNamePasteDlg( pParent, pList, bInsList ); + pDlg = new ScNamePasteDlg( pParent, pList, pLocalList, bInsList ); break; default: break; diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index defd1c7694f7..2de66973efee 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -501,7 +501,7 @@ public: virtual AbstractScNameCreateDlg * CreateScNameCreateDlg ( Window * pParent, sal_uInt16 nFlags, int nId ); //add for ScNameCreateDlg virtual AbstractScNamePasteDlg * CreateScNamePasteDlg ( Window * pParent, const ScRangeName* pList, //add for ScNamePasteDlg - int nId , sal_Bool bInsList=sal_True ); + const ScRangeName* pLocalList, int nId , bool bInsList=true ); virtual AbstractScPivotFilterDlg * CreateScPivotFilterDlg ( Window* pParent, //add for ScPivotFilterDlg const SfxItemSet& rArgSet, sal_uInt16 nSourceTab , int nId ); diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index ffe7fcd539c4..0d531927a4cd 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -633,8 +633,9 @@ sal_Bool ScDocFunc::DeleteContents( const ScMarkData& rMark, sal_uInt16 nFlags, { bObjects = sal_True; SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB nTab=0; nTab<nTabCount; nTab++) - if (aMultiMark.GetTableSelect(nTab) && pDoc->IsTabProtected(nTab)) + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + if (pDoc->IsTabProtected(*itr)) bObjects = false; } @@ -739,9 +740,10 @@ sal_Bool ScDocFunc::TransliterateText( const ScMarkData& rMark, sal_Int32 nType, ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nStartTab, nStartTab ); - for (SCTAB i=0; i<nTabCount; i++) - if (i != nStartTab && rMark.GetTableSelect(i)) - pUndoDoc->AddUndoTab( i, i ); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + if (*itr != nStartTab) + pUndoDoc->AddUndoTab( *itr, *itr ); ScRange aCopyRange = aMarkRange; aCopyRange.aStart.SetTab(0); @@ -1321,9 +1323,10 @@ sal_Bool ScDocFunc::ApplyStyle( const ScMarkData& rMark, const String& rStyleNam SCTAB nStartTab = aMultiRange.aStart.Tab(); SCTAB nTabCount = pDoc->GetTableCount(); pUndoDoc->InitUndo( pDoc, nStartTab, nStartTab ); - for (SCTAB i=0; i<nTabCount; i++) - if (i != nStartTab && rMark.GetTableSelect(i)) - pUndoDoc->AddUndoTab( i, i ); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + if (*itr != nStartTab) + pUndoDoc->AddUndoTab( *itr, *itr ); ScRange aCopyRange = aMultiRange; aCopyRange.aStart.SetTab(0); @@ -1412,12 +1415,10 @@ sal_Bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMa } ScMarkData aFullMark( aMark ); // including scenario sheets - for( i=0; i<nTabCount; i++ ) - if( aMark.GetTableSelect( i ) ) - { - for( SCTAB j = i+1; j<nTabCount && pDoc->IsScenario(j); j++ ) - aFullMark.SelectTable( j, sal_True ); - } + ScMarkData::iterator itr = aMark.begin(), itrEnd = aMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + for( SCTAB j = *itr+1; j<nTabCount && pDoc->IsScenario(j); j++ ) + aFullMark.SelectTable( j, true ); SCTAB nSelCount = aMark.GetSelectCount(); @@ -1492,129 +1493,128 @@ sal_Bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMa if (bRecord) rDocShell.GetUndoManager()->EnterListAction( aUndo, aUndo ); - for( i=0; i<nTabCount; i++ ) + itr = aMark.begin(); + for (; itr != itrEnd && nTabCount; ++itr) { - if( aMark.GetTableSelect(i) ) + i = *itr; + if( pDoc->HasAttrib( nMergeTestStartX, nMergeTestStartY, i, nMergeTestEndX, nMergeTestEndY, i, HASATTR_MERGED | HASATTR_OVERLAPPED ) ) { - if( pDoc->HasAttrib( nMergeTestStartX, nMergeTestStartY, i, nMergeTestEndX, nMergeTestEndY, i, HASATTR_MERGED | HASATTR_OVERLAPPED ) ) - { - if (eCmd==INS_CELLSRIGHT) - bNeedRefresh = sal_True; + if (eCmd==INS_CELLSRIGHT) + bNeedRefresh = sal_True; - SCCOL nMergeStartX = nMergeTestStartX; - SCROW nMergeStartY = nMergeTestStartY; - SCCOL nMergeEndX = nMergeTestEndX; - SCROW nMergeEndY = nMergeTestEndY; + SCCOL nMergeStartX = nMergeTestStartX; + SCROW nMergeStartY = nMergeTestStartY; + SCCOL nMergeEndX = nMergeTestEndX; + SCROW nMergeEndY = nMergeTestEndY; - pDoc->ExtendMerge( nMergeStartX, nMergeStartY, nMergeEndX, nMergeEndY, i ); - pDoc->ExtendOverlapped( nMergeStartX, nMergeStartY, nMergeEndX, nMergeEndY, i ); + pDoc->ExtendMerge( nMergeStartX, nMergeStartY, nMergeEndX, nMergeEndY, i ); + pDoc->ExtendOverlapped( nMergeStartX, nMergeStartY, nMergeEndX, nMergeEndY, i ); - if(( eCmd == INS_CELLSDOWN && ( nMergeStartX != nMergeTestStartX || nMergeEndX != nMergeTestEndX )) || - (eCmd == INS_CELLSRIGHT && ( nMergeStartY != nMergeTestStartY || nMergeEndY != nMergeTestEndY )) ) - { - if (!bApi) - rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); - rDocShell.GetUndoManager()->LeaveListAction(); - return false; - } + if(( eCmd == INS_CELLSDOWN && ( nMergeStartX != nMergeTestStartX || nMergeEndX != nMergeTestEndX )) || + (eCmd == INS_CELLSRIGHT && ( nMergeStartY != nMergeTestStartY || nMergeEndY != nMergeTestEndY )) ) + { + if (!bApi) + rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); + rDocShell.GetUndoManager()->LeaveListAction(); + return false; + } - SCCOL nTestCol = -1; - SCROW nTestRow1 = -1; - SCROW nTestRow2 = -1; + SCCOL nTestCol = -1; + SCROW nTestRow1 = -1; + SCROW nTestRow2 = -1; - ScDocAttrIterator aTestIter( pDoc, i, nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY ); - ScRange aExtendRange( nMergeTestStartX, nMergeTestStartY, i, nMergeTestEndX, nMergeTestEndY, i ); - const ScPatternAttr* pPattern = NULL; - const ScMergeAttr* pMergeFlag = NULL; - const ScMergeFlagAttr* pMergeFlagAttr = NULL; - while ( ( pPattern = aTestIter.GetNext( nTestCol, nTestRow1, nTestRow2 ) ) != NULL ) + ScDocAttrIterator aTestIter( pDoc, i, nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY ); + ScRange aExtendRange( nMergeTestStartX, nMergeTestStartY, i, nMergeTestEndX, nMergeTestEndY, i ); + const ScPatternAttr* pPattern = NULL; + const ScMergeAttr* pMergeFlag = NULL; + const ScMergeFlagAttr* pMergeFlagAttr = NULL; + while ( ( pPattern = aTestIter.GetNext( nTestCol, nTestRow1, nTestRow2 ) ) != NULL ) + { + pMergeFlag = (const ScMergeAttr*) &pPattern->GetItem(ATTR_MERGE); + pMergeFlagAttr = (const ScMergeFlagAttr*) &pPattern->GetItem(ATTR_MERGE_FLAG); + sal_Int16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER ); + if( ( pMergeFlag && pMergeFlag->IsMerged() ) || nNewFlags == SC_MF_HOR || nNewFlags == SC_MF_VER ) { - pMergeFlag = (const ScMergeAttr*) &pPattern->GetItem(ATTR_MERGE); - pMergeFlagAttr = (const ScMergeFlagAttr*) &pPattern->GetItem(ATTR_MERGE_FLAG); - sal_Int16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER ); - if( ( pMergeFlag && pMergeFlag->IsMerged() ) || nNewFlags == SC_MF_HOR || nNewFlags == SC_MF_VER ) - { - ScRange aRange( nTestCol, nTestRow1, i ); - pDoc->ExtendOverlapped(aRange); - pDoc->ExtendMerge(aRange, sal_True, sal_True); + ScRange aRange( nTestCol, nTestRow1, i ); + pDoc->ExtendOverlapped(aRange); + pDoc->ExtendMerge(aRange, sal_True, sal_True); - if( nTestRow1 < nTestRow2 && nNewFlags == SC_MF_HOR ) + if( nTestRow1 < nTestRow2 && nNewFlags == SC_MF_HOR ) + { + for( SCROW nTestRow = nTestRow1; nTestRow <= nTestRow2; nTestRow++ ) { - for( SCROW nTestRow = nTestRow1; nTestRow <= nTestRow2; nTestRow++ ) + ScRange aTestRange( nTestCol, nTestRow, i ); + pDoc->ExtendOverlapped( aTestRange ); + pDoc->ExtendMerge( aTestRange, sal_True, sal_True); + ScRange aMergeRange( aTestRange.aStart.Col(),aTestRange.aStart.Row(), i ); + if( !aExtendRange.In( aMergeRange ) ) { - ScRange aTestRange( nTestCol, nTestRow, i ); - pDoc->ExtendOverlapped( aTestRange ); - pDoc->ExtendMerge( aTestRange, sal_True, sal_True); - ScRange aMergeRange( aTestRange.aStart.Col(),aTestRange.aStart.Row(), i ); - if( !aExtendRange.In( aMergeRange ) ) - { - qIncreaseRange.push_back( aTestRange ); - bInsertMerge = sal_True; - } + qIncreaseRange.push_back( aTestRange ); + bInsertMerge = sal_True; } } - else + } + else + { + ScRange aMergeRange( aRange.aStart.Col(),aRange.aStart.Row(), i ); + if( !aExtendRange.In( aMergeRange ) ) { - ScRange aMergeRange( aRange.aStart.Col(),aRange.aStart.Row(), i ); - if( !aExtendRange.In( aMergeRange ) ) - { - qIncreaseRange.push_back( aRange ); - } - bInsertMerge = sal_True; + qIncreaseRange.push_back( aRange ); } + bInsertMerge = sal_True; } } + } - if( bInsertMerge ) + if( bInsertMerge ) + { + if( eCmd == INS_INSROWS || eCmd == INS_CELLSDOWN ) { - if( eCmd == INS_INSROWS || eCmd == INS_CELLSDOWN ) + nStartRow = aExtendMergeRange.aStart.Row(); + nEndRow = aExtendMergeRange.aEnd.Row(); + + if( eCmd == INS_CELLSDOWN ) + nEndCol = nMergeTestEndX; + else { - nStartRow = aExtendMergeRange.aStart.Row(); - nEndRow = aExtendMergeRange.aEnd.Row(); + nStartCol = 0; + nEndCol = MAXCOL; + } + } + else if( eCmd == INS_CELLSRIGHT || eCmd == INS_INSCOLS ) + { - if( eCmd == INS_CELLSDOWN ) - nEndCol = nMergeTestEndX; - else - { - nStartCol = 0; - nEndCol = MAXCOL; - } + nStartCol = aExtendMergeRange.aStart.Col(); + nEndCol = aExtendMergeRange.aEnd.Col(); + if( eCmd == INS_CELLSRIGHT ) + { + nEndRow = nMergeTestEndY; } - else if( eCmd == INS_CELLSRIGHT || eCmd == INS_INSCOLS ) + else { - - nStartCol = aExtendMergeRange.aStart.Col(); - nEndCol = aExtendMergeRange.aEnd.Col(); - if( eCmd == INS_CELLSRIGHT ) - { - nEndRow = nMergeTestEndY; - } - else - { - nStartRow = 0; - nEndRow = MAXROW; - } + nStartRow = 0; + nEndRow = MAXROW; } + } - if( !qIncreaseRange.empty() ) + if( !qIncreaseRange.empty() ) + { + for( ::std::vector<ScRange>::const_iterator iIter( qIncreaseRange.begin()); iIter != qIncreaseRange.end(); ++iIter ) { - for( ::std::vector<ScRange>::const_iterator iIter( qIncreaseRange.begin()); iIter != qIncreaseRange.end(); ++iIter ) + ScRange aRange( *iIter ); + if( pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) ) { - ScRange aRange( *iIter ); - if( pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) ) - { - UnmergeCells( aRange, sal_True, sal_True ); - } + UnmergeCells( aRange, sal_True, sal_True ); } } } - else - { - if (!bApi) - rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); - rDocShell.GetUndoManager()->LeaveListAction(); - return false; - } + } + else + { + if (!bApi) + rDocShell.ErrorMessage(STR_MSSG_INSERTCELLS_0); + rDocShell.GetUndoManager()->LeaveListAction(); + return false; } } } @@ -1660,18 +1660,16 @@ sal_Bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMa pTabs = new SCTAB[nSelCount]; pScenarios = new SCTAB[nSelCount]; nUndoPos = 0; - for( i=0; i<nTabCount; i++ ) + itr = aMark.begin(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) { - if( aMark.GetTableSelect( i ) ) - { - SCTAB nCount = 0; - for( SCTAB j=i+1; j<nTabCount && pDoc->IsScenario(j); j++ ) - nCount ++; + SCTAB nCount = 0; + for( SCTAB j=*itr+1; j<nTabCount && pDoc->IsScenario(j); j++ ) + nCount ++; - pScenarios[nUndoPos] = nCount; - pTabs[nUndoPos] = i; - nUndoPos ++; - } + pScenarios[nUndoPos] = nCount; + pTabs[nUndoPos] = *itr; + nUndoPos ++; } if( !bInsertMerge ) @@ -1716,37 +1714,36 @@ sal_Bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMa if( bInsertMerge ) rDocShell.GetUndoManager()->LeaveListAction(); - for( i=0; i<nTabCount; i++ ) + itr = aMark.begin(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) { - if( aMark.GetTableSelect( i ) ) - { - if (bNeedRefresh) - pDoc->ExtendMerge( nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY, i, sal_True ); - else - pDoc->RefreshAutoFilter( nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY, i ); + i = *itr; + if (bNeedRefresh) + pDoc->ExtendMerge( nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY, i, sal_True ); + else + pDoc->RefreshAutoFilter( nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY, i ); - if ( eCmd == INS_INSROWS || eCmd == INS_INSCOLS ) - pDoc->UpdatePageBreaks( i ); + if ( eCmd == INS_INSROWS || eCmd == INS_INSCOLS ) + pDoc->UpdatePageBreaks( i ); - sal_uInt16 nExtFlags = 0; - rDocShell.UpdatePaintExt( nExtFlags, nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i ); + sal_uInt16 nExtFlags = 0; + rDocShell.UpdatePaintExt( nExtFlags, nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i ); - SCTAB nScenarioCount = 0; + SCTAB nScenarioCount = 0; - for( SCTAB j = i+1; j<nTabCount && pDoc->IsScenario(j); j++ ) - nScenarioCount ++; + for( SCTAB j = i+1; j<nTabCount && pDoc->IsScenario(j); j++ ) + nScenarioCount ++; - sal_Bool bAdjusted = ( eCmd == INS_INSROWS ) ? AdjustRowHeight(ScRange(0, nStartRow, i, MAXCOL, nEndRow, i+nScenarioCount )) : - AdjustRowHeight(ScRange(0, nPaintStartY, i, MAXCOL, nPaintEndY, i+nScenarioCount )); - if (bAdjusted) - { - // paint only what is not done by AdjustRowHeight - if (nPaintFlags & PAINT_TOP) - rDocShell.PostPaint( nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i+nScenarioCount, PAINT_TOP ); - } - else - rDocShell.PostPaint( nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i+nScenarioCount, nPaintFlags, nExtFlags ); + sal_Bool bAdjusted = ( eCmd == INS_INSROWS ) ? AdjustRowHeight(ScRange(0, nStartRow, i, MAXCOL, nEndRow, i+nScenarioCount )) : + AdjustRowHeight(ScRange(0, nPaintStartY, i, MAXCOL, nPaintEndY, i+nScenarioCount )); + if (bAdjusted) + { + // paint only what is not done by AdjustRowHeight + if (nPaintFlags & PAINT_TOP) + rDocShell.PostPaint( nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i+nScenarioCount, PAINT_TOP ); } + else + rDocShell.PostPaint( nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i+nScenarioCount, nPaintFlags, nExtFlags ); } } else @@ -1810,7 +1807,6 @@ sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMa SCCOL nPaintEndX = nEndCol; SCROW nPaintEndY = nEndRow; sal_uInt16 nPaintFlags = PAINT_GRID; - SCTAB i; if (bRecord && !pDoc->IsUndoEnabled()) bRecord = false; @@ -1821,7 +1817,7 @@ sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMa else { SCTAB nCount = 0; - for( i=0; i<nTabCount; i++ ) + for(SCTAB i=0; i<nTabCount; i++ ) { if( !pDoc->IsScenario(i) ) { @@ -1836,12 +1832,10 @@ sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMa } ScMarkData aFullMark( aMark ); // including scenario sheets - for( i=0; i<nTabCount; i++ ) - if( aMark.GetTableSelect( i ) ) - { - for( SCTAB j = i+1; j<nTabCount && pDoc->IsScenario(j); j++ ) - aFullMark.SelectTable( j, sal_True ); - } + ScMarkData::iterator itr = aMark.begin(), itrEnd = aMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + for( SCTAB j = *itr+1; j<nTabCount && pDoc->IsScenario(j); j++ ) + aFullMark.SelectTable( j, sal_True ); SCTAB nSelCount = aMark.GetSelectCount(); @@ -1904,132 +1898,131 @@ sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMa if (bRecord) rDocShell.GetUndoManager()->EnterListAction( aUndo, aUndo ); - for( i=0; i<nTabCount; i++ ) + itr = aMark.begin(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) { - if( aMark.GetTableSelect(i) ) + SCTAB i = *itr; + if ( pDoc->HasAttrib( nUndoStartX, nUndoStartY, i, nMergeTestEndX, nMergeTestEndY, i, HASATTR_MERGED | HASATTR_OVERLAPPED )) { - if ( pDoc->HasAttrib( nUndoStartX, nUndoStartY, i, nMergeTestEndX, nMergeTestEndY, i, HASATTR_MERGED | HASATTR_OVERLAPPED )) + SCCOL nMergeStartX = nUndoStartX; + SCROW nMergeStartY = nUndoStartY; + SCCOL nMergeEndX = nMergeTestEndX; + SCROW nMergeEndY = nMergeTestEndY; + + pDoc->ExtendMerge( nMergeStartX, nMergeStartY, nMergeEndX, nMergeEndY, i ); + pDoc->ExtendOverlapped( nMergeStartX, nMergeStartY, nMergeEndX, nMergeEndY, i ); + if( ( eCmd == DEL_CELLSUP && ( nMergeStartX != nUndoStartX || nMergeEndX != nMergeTestEndX))|| + ( eCmd == DEL_CELLSLEFT && ( nMergeStartY != nUndoStartY || nMergeEndY != nMergeTestEndY))) { - SCCOL nMergeStartX = nUndoStartX; - SCROW nMergeStartY = nUndoStartY; - SCCOL nMergeEndX = nMergeTestEndX; - SCROW nMergeEndY = nMergeTestEndY; - - pDoc->ExtendMerge( nMergeStartX, nMergeStartY, nMergeEndX, nMergeEndY, i ); - pDoc->ExtendOverlapped( nMergeStartX, nMergeStartY, nMergeEndX, nMergeEndY, i ); - if( ( eCmd == DEL_CELLSUP && ( nMergeStartX != nUndoStartX || nMergeEndX != nMergeTestEndX))|| - ( eCmd == DEL_CELLSLEFT && ( nMergeStartY != nUndoStartY || nMergeEndY != nMergeTestEndY))) - { - if (!bApi) - rDocShell.ErrorMessage(STR_MSSG_DELETECELLS_0); - rDocShell.GetUndoManager()->LeaveListAction(); - return false; - } + if (!bApi) + rDocShell.ErrorMessage(STR_MSSG_DELETECELLS_0); + rDocShell.GetUndoManager()->LeaveListAction(); + return false; + } - nExtendStartCol = nMergeStartX; - nExtendStartRow = nMergeStartY; - SCCOL nTestCol = -1; - SCROW nTestRow1 = -1; - SCROW nTestRow2 = -1; - - ScDocAttrIterator aTestIter( pDoc, i, nUndoStartX, nUndoStartY, nMergeTestEndX, nMergeTestEndY ); - ScRange aExtendRange( nUndoStartX, nUndoStartY, i, nMergeTestEndX, nMergeTestEndY, i ); - const ScPatternAttr* pPattern = NULL; - const ScMergeAttr* pMergeFlag = NULL; - const ScMergeFlagAttr* pMergeFlagAttr = NULL; - while ( ( pPattern = aTestIter.GetNext( nTestCol, nTestRow1, nTestRow2 ) ) != NULL ) + nExtendStartCol = nMergeStartX; + nExtendStartRow = nMergeStartY; + SCCOL nTestCol = -1; + SCROW nTestRow1 = -1; + SCROW nTestRow2 = -1; + + ScDocAttrIterator aTestIter( pDoc, i, nUndoStartX, nUndoStartY, nMergeTestEndX, nMergeTestEndY ); + ScRange aExtendRange( nUndoStartX, nUndoStartY, i, nMergeTestEndX, nMergeTestEndY, i ); + const ScPatternAttr* pPattern = NULL; + const ScMergeAttr* pMergeFlag = NULL; + const ScMergeFlagAttr* pMergeFlagAttr = NULL; + while ( ( pPattern = aTestIter.GetNext( nTestCol, nTestRow1, nTestRow2 ) ) != NULL ) + { + pMergeFlag = (const ScMergeAttr*) &pPattern->GetItem( ATTR_MERGE ); + pMergeFlagAttr = (const ScMergeFlagAttr*) &pPattern->GetItem( ATTR_MERGE_FLAG ); + sal_Int16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER ); + if( ( pMergeFlag && pMergeFlag->IsMerged() ) || nNewFlags == SC_MF_HOR || nNewFlags == SC_MF_VER ) { - pMergeFlag = (const ScMergeAttr*) &pPattern->GetItem( ATTR_MERGE ); - pMergeFlagAttr = (const ScMergeFlagAttr*) &pPattern->GetItem( ATTR_MERGE_FLAG ); - sal_Int16 nNewFlags = pMergeFlagAttr->GetValue() & ( SC_MF_HOR | SC_MF_VER ); - if( ( pMergeFlag && pMergeFlag->IsMerged() ) || nNewFlags == SC_MF_HOR || nNewFlags == SC_MF_VER ) - { - ScRange aRange( nTestCol, nTestRow1, i ); - pDoc->ExtendOverlapped( aRange ); - pDoc->ExtendMerge( aRange, sal_True, sal_True ); + ScRange aRange( nTestCol, nTestRow1, i ); + pDoc->ExtendOverlapped( aRange ); + pDoc->ExtendMerge( aRange, sal_True, sal_True ); - if( nTestRow1 < nTestRow2 && nNewFlags == SC_MF_HOR ) + if( nTestRow1 < nTestRow2 && nNewFlags == SC_MF_HOR ) + { + for( SCROW nTestRow = nTestRow1; nTestRow <= nTestRow2; nTestRow++ ) { - for( SCROW nTestRow = nTestRow1; nTestRow <= nTestRow2; nTestRow++ ) + ScRange aTestRange( nTestCol, nTestRow, i ); + pDoc->ExtendOverlapped( aTestRange ); + pDoc->ExtendMerge( aTestRange, sal_True, sal_True); + ScRange aMergeRange( aTestRange.aStart.Col(),aTestRange.aStart.Row(), i ); + if( !aExtendRange.In( aMergeRange ) ) { - ScRange aTestRange( nTestCol, nTestRow, i ); - pDoc->ExtendOverlapped( aTestRange ); - pDoc->ExtendMerge( aTestRange, sal_True, sal_True); - ScRange aMergeRange( aTestRange.aStart.Col(),aTestRange.aStart.Row(), i ); - if( !aExtendRange.In( aMergeRange ) ) - { - qDecreaseRange.push_back( aTestRange ); - bDeletingMerge = sal_True; - } + qDecreaseRange.push_back( aTestRange ); + bDeletingMerge = sal_True; } } - else + } + else + { + ScRange aMergeRange( aRange.aStart.Col(),aRange.aStart.Row(), i ); + if( !aExtendRange.In( aMergeRange ) ) { - ScRange aMergeRange( aRange.aStart.Col(),aRange.aStart.Row(), i ); - if( !aExtendRange.In( aMergeRange ) ) - { - qDecreaseRange.push_back( aRange ); - } - bDeletingMerge = sal_True; + qDecreaseRange.push_back( aRange ); } + bDeletingMerge = sal_True; } } + } + + if( bDeletingMerge ) + { + + if( eCmd == DEL_DELROWS || eCmd == DEL_CELLSUP ) + { + nStartRow = aExtendMergeRange.aStart.Row(); + nEndRow = aExtendMergeRange.aEnd.Row(); + bNeedRefresh = sal_True; - if( bDeletingMerge ) + if( eCmd == DEL_CELLSUP ) + { + nEndCol = aExtendMergeRange.aEnd.Col(); + } + else + { + nStartCol = 0; + nEndCol = MAXCOL; + } + } + else if( eCmd == DEL_CELLSLEFT || eCmd == DEL_DELCOLS ) { - if( eCmd == DEL_DELROWS || eCmd == DEL_CELLSUP ) + nStartCol = aExtendMergeRange.aStart.Col(); + nEndCol = aExtendMergeRange.aEnd.Col(); + if( eCmd == DEL_CELLSLEFT ) { - nStartRow = aExtendMergeRange.aStart.Row(); nEndRow = aExtendMergeRange.aEnd.Row(); bNeedRefresh = sal_True; - - if( eCmd == DEL_CELLSUP ) - { - nEndCol = aExtendMergeRange.aEnd.Col(); - } - else - { - nStartCol = 0; - nEndCol = MAXCOL; - } } - else if( eCmd == DEL_CELLSLEFT || eCmd == DEL_DELCOLS ) + else { - - nStartCol = aExtendMergeRange.aStart.Col(); - nEndCol = aExtendMergeRange.aEnd.Col(); - if( eCmd == DEL_CELLSLEFT ) - { - nEndRow = aExtendMergeRange.aEnd.Row(); - bNeedRefresh = sal_True; - } - else - { - nStartRow = 0; - nEndRow = MAXROW; - } + nStartRow = 0; + nEndRow = MAXROW; } + } - if( !qDecreaseRange.empty() ) + if( !qDecreaseRange.empty() ) + { + for( ::std::vector<ScRange>::const_iterator iIter( qDecreaseRange.begin()); iIter != qDecreaseRange.end(); ++iIter ) { - for( ::std::vector<ScRange>::const_iterator iIter( qDecreaseRange.begin()); iIter != qDecreaseRange.end(); ++iIter ) + ScRange aRange( *iIter ); + if( pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) ) { - ScRange aRange( *iIter ); - if( pDoc->HasAttrib( aRange, HASATTR_OVERLAPPED | HASATTR_MERGED ) ) - { - UnmergeCells( aRange, sal_True, sal_True ); - } + UnmergeCells( aRange, sal_True, sal_True ); } } } - else - { - if (!bApi) - rDocShell.ErrorMessage(STR_MSSG_DELETECELLS_0); - rDocShell.GetUndoManager()->LeaveListAction(); - return false; - } + } + else + { + if (!bApi) + rDocShell.ErrorMessage(STR_MSSG_DELETECELLS_0); + rDocShell.GetUndoManager()->LeaveListAction(); + return false; } } } @@ -2050,18 +2043,16 @@ sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMa pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, 0, nTabCount-1, (eCmd==DEL_DELCOLS), (eCmd==DEL_DELROWS) ); - for( i=0; i<nTabCount; i++ ) + itr = aMark.begin(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) { - if( aMark.GetTableSelect( i ) ) - { - SCTAB nScenarioCount = 0; + SCTAB nScenarioCount = 0; - for( SCTAB j = i+1; j<nTabCount && pDoc->IsScenario(j); j++ ) - nScenarioCount ++; + for( SCTAB j = *itr+1; j<nTabCount && pDoc->IsScenario(j); j++ ) + nScenarioCount ++; - pDoc->CopyToDocument( nUndoStartX, nUndoStartY, i, nUndoEndX, nUndoEndY, i+nScenarioCount, - IDF_ALL | IDF_NOCAPTIONS, false, pUndoDoc ); - } + pDoc->CopyToDocument( nUndoStartX, nUndoStartY, *itr, nUndoEndX, nUndoEndY, *itr+nScenarioCount, + IDF_ALL | IDF_NOCAPTIONS, false, pUndoDoc ); } pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO ); @@ -2073,10 +2064,10 @@ sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMa } sal_uInt16 nExtFlags = 0; - for( i=0; i<nTabCount; i++ ) + itr = aMark.begin(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) { - if( aMark.GetTableSelect( i ) ) - rDocShell.UpdatePaintExt( nExtFlags, nStartCol, nStartRow, i, nEndCol, nEndRow, i ); + rDocShell.UpdatePaintExt( nExtFlags, nStartCol, nStartRow, *itr, nEndCol, nEndRow, *itr ); } sal_Bool bUndoOutline = false; @@ -2113,9 +2104,9 @@ sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMa if ( bRecord ) { - for( i=0; i<nTabCount; i++ ) - if( aFullMark.GetTableSelect( i ) ) - pRefUndoDoc->DeleteAreaTab(nUndoStartX,nUndoStartY,nUndoEndX,nUndoEndY, i, IDF_ALL); + itr = aFullMark.begin(), itrEnd = aFullMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + pRefUndoDoc->DeleteAreaTab(nUndoStartX,nUndoStartY,nUndoEndX,nUndoEndY, *itr, IDF_ALL); // alle Tabellen anlegen, damit Formeln kopiert werden koennen: pUndoDoc->AddUndoTab( 0, nTabCount-1, false, false ); @@ -2128,18 +2119,16 @@ sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMa SCTAB* pScenarios = new SCTAB[nSelCount]; SCTAB nUndoPos = 0; - for( i=0; i<nTabCount; i++ ) + itr = aMark.begin(), itrEnd = aMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) { - if( aMark.GetTableSelect( i ) ) - { - SCTAB nCount = 0; - for( SCTAB j=i+1; j<nTabCount && pDoc->IsScenario(j); j++ ) - nCount ++; + SCTAB nCount = 0; + for( SCTAB j=*itr+1; j<nTabCount && pDoc->IsScenario(j); j++ ) + nCount ++; - pScenarios[nUndoPos] = nCount; - pTabs[nUndoPos] = i; - nUndoPos ++; - } + pScenarios[nUndoPos] = nCount; + pTabs[nUndoPos] = *itr; + nUndoPos ++; } if( !bDeletingMerge ) @@ -2219,46 +2208,42 @@ sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMa pDoc->ApplyPatternArea( nExtendStartCol, nExtendStartRow, nMergeTestEndX, nMergeTestEndY, aMark, aPattern ); - for( i=0; i<nTabCount; i++ ) + itr = aMark.begin(), itrEnd = aMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) { - if( aMark.GetTableSelect( i ) ) - { - SCTAB nScenarioCount = 0; + SCTAB nScenarioCount = 0; - for( SCTAB j = i+1; j<nTabCount && pDoc->IsScenario(j); j++ ) - nScenarioCount ++; + for( SCTAB j = *itr+1; j<nTabCount && pDoc->IsScenario(j); j++ ) + nScenarioCount ++; - ScRange aMergedRange( nExtendStartCol, nExtendStartRow, i, nMergeTestEndX, nMergeTestEndY, i+nScenarioCount ); - pDoc->ExtendMerge( aMergedRange, sal_True ); - } + ScRange aMergedRange( nExtendStartCol, nExtendStartRow, *itr, nMergeTestEndX, nMergeTestEndY, *itr+nScenarioCount ); + pDoc->ExtendMerge( aMergedRange, sal_True ); } } - for( i=0; i<nTabCount; i++ ) + itr = aMark.begin(), itrEnd = aMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) { - if( aMark.GetTableSelect( i ) ) - { - if ( eCmd == DEL_DELCOLS || eCmd == DEL_DELROWS ) - pDoc->UpdatePageBreaks( i ); + if ( eCmd == DEL_DELCOLS || eCmd == DEL_DELROWS ) + pDoc->UpdatePageBreaks( *itr ); - rDocShell.UpdatePaintExt( nExtFlags, nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i ); + rDocShell.UpdatePaintExt( nExtFlags, nPaintStartX, nPaintStartY, *itr, nPaintEndX, nPaintEndY, *itr ); - SCTAB nScenarioCount = 0; + SCTAB nScenarioCount = 0; - for( SCTAB j = i+1; j<nTabCount && pDoc->IsScenario(j); j++ ) - nScenarioCount ++; + for( SCTAB j = *itr+1; j<nTabCount && pDoc->IsScenario(j); j++ ) + nScenarioCount ++; - // ganze Zeilen loeschen: nichts anpassen - if ( eCmd == DEL_DELROWS || !AdjustRowHeight(ScRange( 0, nPaintStartY, i, MAXCOL, nPaintEndY, i+nScenarioCount )) ) - rDocShell.PostPaint( nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i+nScenarioCount, nPaintFlags, nExtFlags ); - else - { - // paint only what is not done by AdjustRowHeight - if (nExtFlags & SC_PF_LINES) - lcl_PaintAbove( rDocShell, ScRange( nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i+nScenarioCount) ); - if (nPaintFlags & PAINT_TOP) - rDocShell.PostPaint( nPaintStartX, nPaintStartY, i, nPaintEndX, nPaintEndY, i+nScenarioCount, PAINT_TOP ); - } + // ganze Zeilen loeschen: nichts anpassen + if ( eCmd == DEL_DELROWS || !AdjustRowHeight(ScRange( 0, nPaintStartY, *itr, MAXCOL, nPaintEndY, *itr+nScenarioCount )) ) + rDocShell.PostPaint( nPaintStartX, nPaintStartY, *itr, nPaintEndX, nPaintEndY, *itr+nScenarioCount, nPaintFlags, nExtFlags ); + else + { + // paint only what is not done by AdjustRowHeight + if (nExtFlags & SC_PF_LINES) + lcl_PaintAbove( rDocShell, ScRange( nPaintStartX, nPaintStartY, *itr, nPaintEndX, nPaintEndY, *itr+nScenarioCount) ); + if (nPaintFlags & PAINT_TOP) + rDocShell.PostPaint( nPaintStartX, nPaintStartY, *itr, nPaintEndX, nPaintEndY, *itr+nScenarioCount, PAINT_TOP ); } } aModificator.SetDocumentModified(); @@ -3638,9 +3623,10 @@ sal_Bool ScDocFunc::ChangeIndent( const ScMarkData& rMark, sal_Bool bIncrement, ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nStartTab, nStartTab ); - for (SCTAB i=0; i<nTabCount; i++) - if (i != nStartTab && rMark.GetTableSelect(i)) - pUndoDoc->AddUndoTab( i, i ); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + if (*itr != nStartTab) + pUndoDoc->AddUndoTab( *itr, *itr ); ScRange aCopyRange = aMarkRange; aCopyRange.aStart.SetTab(0); @@ -3713,9 +3699,10 @@ sal_Bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMar { pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nStartTab, nStartTab, bSize, bSize ); - for (SCTAB i=0; i<nTabCount; i++) - if (i != nStartTab && aMark.GetTableSelect(i)) - pUndoDoc->AddUndoTab( i, i, bSize, bSize ); + ScMarkData::iterator itr = aMark.begin(), itrEnd = aMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + if (*itr != nStartTab) + pUndoDoc->AddUndoTab( *itr, *itr, bSize, bSize ); ScRange aCopyRange = rRange; aCopyRange.aStart.SetTab(0); @@ -3738,29 +3725,27 @@ sal_Bool ScDocFunc::AutoFormat( const ScRange& rRange, const ScMarkData* pTabMar SCCOLROW nCols[2] = { nStartCol, nEndCol }; SCCOLROW nRows[2] = { nStartRow, nEndRow }; - for (SCTAB nTab=0; nTab<nTabCount; nTab++) - if (aMark.GetTableSelect(nTab)) - { - SetWidthOrHeight( sal_True, 1,nCols, nTab, SC_SIZE_VISOPT, STD_EXTRA_WIDTH, false, sal_True); - SetWidthOrHeight( false,1,nRows, nTab, SC_SIZE_VISOPT, 0, false, false); - rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, - PAINT_GRID | PAINT_LEFT | PAINT_TOP ); - } + ScMarkData::iterator itr = aMark.begin(), itrEnd = aMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + SetWidthOrHeight( sal_True, 1,nCols, *itr, SC_SIZE_VISOPT, STD_EXTRA_WIDTH, false, sal_True); + SetWidthOrHeight( false,1,nRows, *itr, SC_SIZE_VISOPT, 0, false, false); + rDocShell.PostPaint( 0,0,*itr, MAXCOL,MAXROW,*itr, + PAINT_GRID | PAINT_LEFT | PAINT_TOP ); } else { - for (SCTAB nTab=0; nTab<nTabCount; nTab++) - if (aMark.GetTableSelect(nTab)) - { - sal_Bool bAdj = AdjustRowHeight( ScRange(nStartCol, nStartRow, nTab, - nEndCol, nEndRow, nTab), false ); - if (bAdj) - rDocShell.PostPaint( 0,nStartRow,nTab, MAXCOL,MAXROW,nTab, - PAINT_GRID | PAINT_LEFT ); - else - rDocShell.PostPaint( nStartCol, nStartRow, nTab, - nEndCol, nEndRow, nTab, PAINT_GRID ); - } + ScMarkData::iterator itr = aMark.begin(), itrEnd = aMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + { + sal_Bool bAdj = AdjustRowHeight( ScRange(nStartCol, nStartRow, *itr, + nEndCol, nEndRow, *itr), false ); + if (bAdj) + rDocShell.PostPaint( 0,nStartRow,*itr, MAXCOL,MAXROW,*itr, + PAINT_GRID | PAINT_LEFT ); + else + rDocShell.PostPaint( nStartCol, nStartRow, *itr, + nEndCol, nEndRow, *itr, PAINT_GRID ); + } } if ( bRecord ) // Draw-Undo erst jetzt verfuegbar @@ -4004,9 +3989,10 @@ sal_Bool ScDocFunc::FillSimple( const ScRange& rRange, const ScMarkData* pTabMar pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nDestStartTab, nDestStartTab ); - for (SCTAB i=0; i<nTabCount; i++) - if (i != nDestStartTab && aMark.GetTableSelect(i)) - pUndoDoc->AddUndoTab( i, i ); + ScMarkData::iterator itr = aMark.begin(), itrEnd = aMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + if (*itr != nDestStartTab) + pUndoDoc->AddUndoTab( *itr, *itr ); ScRange aCopyRange = aDestArea; aCopyRange.aStart.SetTab(0); @@ -4109,9 +4095,10 @@ sal_Bool ScDocFunc::FillSeries( const ScRange& rRange, const ScMarkData* pTabMar pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nDestStartTab, nDestStartTab ); - for (SCTAB i=0; i<nTabCount; i++) - if (i != nDestStartTab && aMark.GetTableSelect(i)) - pUndoDoc->AddUndoTab( i, i ); + ScMarkData::iterator itr = aMark.begin(), itrEnd = aMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + if (*itr != nDestStartTab) + pUndoDoc->AddUndoTab( *itr, *itr ); pDoc->CopyToDocument( aDestArea.aStart.Col(), aDestArea.aStart.Row(), 0, @@ -4248,9 +4235,10 @@ sal_Bool ScDocFunc::FillAuto( ScRange& rRange, const ScMarkData* pTabMark, FillD pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nDestStartTab, nDestStartTab ); - for (SCTAB i=0; i<nTabCount; i++) - if (i != nDestStartTab && aMark.GetTableSelect(i)) - pUndoDoc->AddUndoTab( i, i ); + ScMarkData::iterator itr = aMark.begin(), itrEnd = aMark.end(); + for (; itr != itrEnd && nTabCount; ++itr) + if (*itr != nDestStartTab) + pUndoDoc->AddUndoTab( *itr, *itr ); // do not clone note captions in undo document pDoc->CopyToDocument( @@ -4708,20 +4696,28 @@ sal_Bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, sal_Bool bApi ) { ScDocShellModificator aModificator( rDocShell ); - sal_Bool bDone = false; ScDocument* pDoc = rDocShell.GetDocument(); - const sal_Bool bRecord = pDoc->IsUndoEnabled(); + const bool bRecord = pDoc->IsUndoEnabled(); SCTAB nTab = rStartPos.Tab(); ScDocument* pUndoDoc = NULL; - ScRangeName* pList = pDoc->GetRangeName(); + //local names have higher priority than global names + ScRangeName* pLocalList = pDoc->GetRangeName(nTab); sal_uInt16 nValidCount = 0; + ScRangeName::iterator itrLocalBeg = pLocalList->begin(), itrLocalEnd = pLocalList->end(); + for (ScRangeName::iterator itr = itrLocalBeg; itr != itrLocalEnd; ++itr) + { + const ScRangeData& r = *itr; + if (!r.HasType(RT_DATABASE) && !r.HasType(RT_SHARED)) + ++nValidCount; + } + ScRangeName* pList = pDoc->GetRangeName(); ScRangeName::iterator itrBeg = pList->begin(), itrEnd = pList->end(); for (ScRangeName::iterator itr = itrBeg; itr != itrEnd; ++itr) { const ScRangeData& r = *itr; - if (!r.HasType(RT_DATABASE) && !r.HasType(RT_SHARED)) + if (!r.HasType(RT_DATABASE) && !r.HasType(RT_SHARED) && !pLocalList->findByName(r.GetName())) ++nValidCount; } @@ -4747,12 +4743,18 @@ sal_Bool ScDocFunc::InsertNameList( const ScAddress& rStartPos, sal_Bool bApi ) ScRangeData** ppSortArray = new ScRangeData* [ nValidCount ]; sal_uInt16 j = 0; - for (ScRangeName::iterator itr = itrBeg; itr != itrEnd; ++itr) + for (ScRangeName::iterator itr = itrLocalBeg; itr != itrLocalEnd; ++itr) { ScRangeData& r = *itr; if (!r.HasType(RT_DATABASE) && !r.HasType(RT_SHARED)) ppSortArray[j++] = &r; } + for (ScRangeName::iterator itr = itrBeg; itr != itrEnd; ++itr) + { + ScRangeData& r = *itr; + if (!r.HasType(RT_DATABASE) && !r.HasType(RT_SHARED) && !pLocalList->findByName(r.GetName())) + ppSortArray[j++] = &r; + } #ifndef ICC qsort( (void*)ppSortArray, nValidCount, sizeof(ScRangeData*), &ScRangeData_QsortNameCompare ); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 9a99fdc6ff41..7e9fb513807b 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -1240,7 +1240,7 @@ void ScDocShell::DoRecalc( sal_Bool bApi ) if (!bDone) // sonst Dokument neu berechnen { WaitObject aWaitObj( GetActiveDialogParent() ); - aDocument.CalcFormulaTree(); + aDocument.CalcFormulaTree( sal_True ); if ( pSh ) pSh->UpdateCharts(sal_True); diff --git a/sc/source/ui/docshell/editable.cxx b/sc/source/ui/docshell/editable.cxx index 4e5535f92677..ca4492b2ce15 100644 --- a/sc/source/ui/docshell/editable.cxx +++ b/sc/source/ui/docshell/editable.cxx @@ -104,9 +104,9 @@ void ScEditableTester::TestSelectedBlock( ScDocument* pDoc, const ScMarkData& rMark ) { SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB nTab=0; nTab<nTabCount; nTab++) - if (rMark.GetTableSelect(nTab)) - TestBlock( pDoc, nTab, nStartCol, nStartRow, nEndCol, nEndRow ); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + TestBlock( pDoc, *itr, nStartCol, nStartRow, nEndCol, nEndRow ); } void ScEditableTester::TestRange( ScDocument* pDoc, const ScRange& rRange ) diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index 7bec48d4846c..72b09a253cbf 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -49,8 +49,6 @@ class StarBASIC; #include <rtl/math.hxx> #include <svtools/htmlout.hxx> #include <svl/zforlist.hxx> -#define _SVSTDARR_ULONGS -#include <svl/svstdarr.hxx> #include <sot/formats.hxx> #include <sfx2/mieclip.hxx> #include <unotools/charclass.hxx> @@ -58,6 +56,7 @@ class StarBASIC; #include <unotools/calendarwrapper.hxx> #include <com/sun/star/i18n/CalendarFieldIndex.hpp> #include <unotools/transliterationwrapper.hxx> +#include <vector> #include "global.hxx" #include "scerrors.hxx" @@ -1544,7 +1543,7 @@ sal_Bool ScImportExport::Sylk2Doc( SvStream& rStrm ) SCROW nEndRow = aRange.aEnd.Row(); sal_uLong nOldPos = rStrm.Tell(); sal_Bool bData = sal_Bool( !bSingle ); - SvULongs aFormats; + ::std::vector< sal_uInt32 > aFormats; if( !bSingle) bOk = StartPaste(); @@ -1730,9 +1729,9 @@ sal_Bool ScImportExport::Sylk2Doc( SvStream& rStrm ) if( nCol > nEndCol ) nEndCol = nCol; } - if ( 0 <= nFormat && nFormat < aFormats.Count() ) + if ( 0 <= nFormat && nFormat < (sal_Int32)aFormats.size() ) { - sal_uLong nKey = aFormats[(sal_uInt16)nFormat]; + sal_uInt32 nKey = aFormats[nFormat]; pDoc->ApplyAttr( nCol, nRow, aRange.aStart.Tab(), SfxUInt32Item( ATTR_VALUE_FORMAT, nKey ) ); } @@ -1759,7 +1758,7 @@ sal_Bool ScImportExport::Sylk2Doc( SvStream& rStrm ) ScGlobal::eLnge ); if ( nCheckPos ) nKey = 0; - aFormats.Insert( nKey, aFormats.Count() ); + aFormats.push_back( nKey ); } } else if( cTag == 'I' && *p == 'D' ) diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx index 5dcdd07d62fe..74cdc5ce3a51 100644 --- a/sc/source/ui/inc/conflictsdlg.hxx +++ b/sc/source/ui/inc/conflictsdlg.hxx @@ -140,19 +140,6 @@ public: //============================================================================= -// class ScConflictsListBox -//============================================================================= - -class ScConflictsListBox: public SvxRedlinTable -{ -private: - -public: - ScConflictsListBox( Window* pParent, const ResId& rResId ); - ~ScConflictsListBox(); -}; - -//============================================================================= // class ScConflictsDlg //============================================================================= @@ -160,7 +147,8 @@ class ScConflictsDlg : public ModalDialog { private: FixedText maFtConflicts; - ScConflictsListBox maLbConflicts; + SvxSimpleTableContainer m_aLbConflictsContainer; + SvxRedlinTable maLbConflicts; PushButton maBtnKeepMine; PushButton maBtnKeepOther; FixedLine maFlConflicts; diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index f65437d942ff..60e3de3fd92a 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -47,32 +47,48 @@ class ScRangeList; //======================================================================== -class ScTextWnd : public Window, public DragSourceHelper // edit window +class ScTextWndBase : public Window +{ +public: + ScTextWndBase( Window* pParent, WinBits nStyle ) : Window ( pParent, nStyle ) {} + virtual void InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData ) = 0; + virtual void RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData ) = 0; + virtual void SetTextString( const String& rString ) = 0; + virtual const String& GetTextString() const = 0; + virtual void StartEditEngine() = 0; + virtual void StopEditEngine( sal_Bool bAll ) = 0; + virtual EditView* GetEditView() = 0; + virtual void MakeDialogEditView() = 0; + virtual void SetFormulaMode( sal_Bool bSet ) = 0; + virtual sal_Bool IsInputActive() = 0; +}; + +class ScTextWnd : public ScTextWndBase, public DragSourceHelper // edit window { public: ScTextWnd( Window* pParent ); virtual ~ScTextWnd(); - void SetTextString( const String& rString ); - const String& GetTextString() const; + virtual void SetTextString( const String& rString ); + virtual const String& GetTextString() const; sal_Bool IsInputActive(); - EditView* GetEditView(); + virtual EditView* GetEditView(); // fuer FunktionsAutopiloten - void MakeDialogEditView(); + virtual void MakeDialogEditView(); - void StartEditEngine(); - void StopEditEngine( sal_Bool bAll ); + virtual void StartEditEngine(); + virtual void StopEditEngine( sal_Bool bAll ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); - void SetFormulaMode( sal_Bool bSet ); + virtual void SetFormulaMode( sal_Bool bSet ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); - void InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData ); - void RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData ); + virtual void InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData ); + virtual void RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData ); DECL_LINK( NotifyHdl, EENotify* ); @@ -92,11 +108,9 @@ protected: virtual String GetText() const; -private: void ImplInitSettings(); void UpdateAutoCorrFlag(); -private: typedef ::std::vector< ScAccessibleEditLineTextData* > AccTextDataVector; String aString; @@ -111,6 +125,7 @@ private: // #102710#; this flag should be true if a key input or a command is handled // it prevents the call of InputChanged in the ModifyHandler of the EditEngine sal_Bool bInputMode; + sal_Int16 nTextStartPos; }; //======================================================================== @@ -150,6 +165,50 @@ private: //======================================================================== +class ScMultiTextWnd : public ScTextWnd +{ +public: + ScMultiTextWnd( Window* pParent ); + virtual void StartEditEngine(); + virtual void StopEditEngine( sal_Bool bAll ); +protected: + void InitEditEngine(SfxObjectShell* pObjSh); + + virtual void Paint( const Rectangle& rRec ); + virtual void Resize(); +}; + +class ScInputBarGroup : public ScTextWndBase +{ + +public: + ScInputBarGroup( Window* Parent ); + virtual ~ScInputBarGroup(); + virtual void InsertAccessibleTextData( ScAccessibleEditLineTextData& rTextData ); + virtual void RemoveAccessibleTextData( ScAccessibleEditLineTextData& rTextData ); +// virtual void Paint(const Rectangle& rRec ); + void SetTextString( const String& rString ); + void StartEditEngine(); + EditView* GetEditView(); + void SetSize(Size aSize); + virtual void Resize(); + virtual const String& GetTextString() const; + virtual void StopEditEngine( sal_Bool bAll ); + void InitEditEngine(SfxObjectShell* pObjSh); + void GainFocus(); + void SetFormulaMode( sal_Bool bSet ); + bool IsFocus(); + void MakeDialogEditView(); + sal_Bool IsInputActive(); + +private: + + ScMultiTextWnd aTextWindow; + bool bIsMultiLine; + +}; + + class ScInputWindow : public ToolBox // Parent-Toolbox { public: @@ -169,7 +228,7 @@ public: void SetFormulaMode( sal_Bool bSet ); - sal_Bool IsInputActive(); + virtual sal_Bool IsInputActive(); EditView* GetEditView(); void TextGrabFocus(); @@ -199,7 +258,8 @@ protected: private: ScPosWnd aWndPos; - ScTextWnd aTextWindow; + std::auto_ptr<ScTextWndBase> pRuntimeWindow; + ScTextWndBase& aTextWindow; ScInputHandler* pInputHdl; SfxBindings* pBindings; String aTextOk; diff --git a/sc/source/ui/inc/namepast.hxx b/sc/source/ui/inc/namepast.hxx index c90c20904ffe..a5d7e8127ab7 100644 --- a/sc/source/ui/inc/namepast.hxx +++ b/sc/source/ui/inc/namepast.hxx @@ -51,7 +51,7 @@ protected: HelpButton aHelpButton; PushButton aInsListButton; public: - ScNamePasteDlg( Window * pParent, const ScRangeName* pList, sal_Bool bInsList=sal_True ); + ScNamePasteDlg( Window * pParent, const ScRangeName* pList, const ScRangeName* pLocalList, bool bInsList=true ); String GetSelectedName() const; }; diff --git a/sc/source/ui/inc/optdlg.hrc b/sc/source/ui/inc/optdlg.hrc index b10452945220..9b94289527e0 100644 --- a/sc/source/ui/inc/optdlg.hrc +++ b/sc/source/ui/inc/optdlg.hrc @@ -145,7 +145,6 @@ #define CB_TBLREG 54 #define CB_OUTLINE 55 #define GB_LINES 56 -#define CB_GRID 57 #define FT_COLOR 58 #define LB_COLOR 59 #define CB_GUIDELINE 60 @@ -162,6 +161,8 @@ #define FL_SEPARATOR1 71 #define FL_SEPARATOR2 72 #define FL_SEPARATOR 73 +#define FT_GRID 74 +#define LB_GRID 75 // TP_INPUT #define GB_OPTIONS 70 diff --git a/sc/source/ui/inc/sharedocdlg.hxx b/sc/source/ui/inc/sharedocdlg.hxx index e15fde82102b..5eebcce3804e 100644 --- a/sc/source/ui/inc/sharedocdlg.hxx +++ b/sc/source/ui/inc/sharedocdlg.hxx @@ -49,6 +49,7 @@ private: FixedText maFtWarning; FixedLine maFlUsers; FixedText maFtUsers; + SvxSimpleTableContainer m_aLbUsersContainer; SvxSimpleTable maLbUsers; FixedLine maFlEnd; HelpButton maBtnHelp; diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index d2feed4e2778..c3563798728d 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -43,7 +43,7 @@ class ScRowBar; class ScColBar; class ScTabControl; class ScTabViewShell; -class ScRangeFindData; +struct ScRangeFindData; class SfxPrinter; class ScDrawView; class SvBorder; diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx index 68093f0ce0f5..2599ea24e0c8 100644 --- a/sc/source/ui/inc/tpview.hxx +++ b/sc/source/ui/inc/tpview.hxx @@ -47,7 +47,8 @@ class ScViewOptions; class ScTpContentOptions : public SfxTabPage { FixedLine aLinesGB; - CheckBox aGridCB; + FixedText aGridFT; + ListBox aGridLB; FixedText aColorFT; ColorListBox aColorLB; CheckBox aBreakCB; @@ -89,7 +90,7 @@ class ScTpContentOptions : public SfxTabPage ScViewOptions* pLocalOptions; void InitGridOpt(); - DECL_LINK( GridHdl, CheckBox* ); + DECL_LINK( GridHdl, ListBox* ); DECL_LINK( SelLbObjHdl, ListBox* ); DECL_LINK( CBHdl, CheckBox* ); diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx index 335189759e69..564f75708656 100644 --- a/sc/source/ui/miscdlgs/conflictsdlg.cxx +++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx @@ -393,20 +393,6 @@ void ScConflictsResolver::HandleAction( ScChangeAction* pAction, bool bIsSharedA } } - -//============================================================================= -// class ScConflictsListBox -//============================================================================= - -ScConflictsListBox::ScConflictsListBox( Window* pParent, const ResId& rResId ) - :SvxRedlinTable( pParent, rResId ) -{ -} - -ScConflictsListBox::~ScConflictsListBox() -{ -} - //============================================================================= // class ScConflictsDlg //============================================================================= @@ -414,7 +400,8 @@ ScConflictsListBox::~ScConflictsListBox() ScConflictsDlg::ScConflictsDlg( Window* pParent, ScViewData* pViewData, ScDocument* pSharedDoc, ScConflictsList& rConflictsList ) :ModalDialog( pParent, ScResId( RID_SCDLG_CONFLICTS ) ) ,maFtConflicts ( this, ScResId( FT_CONFLICTS ) ) - ,maLbConflicts ( this, ScResId( LB_CONFLICTS ) ) + ,m_aLbConflictsContainer(this, ScResId( LB_CONFLICTS)) + ,maLbConflicts(m_aLbConflictsContainer) ,maBtnKeepMine ( this, ScResId( BTN_KEEPMINE ) ) ,maBtnKeepOther ( this, ScResId( BTN_KEEPOTHER ) ) ,maFlConflicts ( this, ScResId( FL_CONFLICTS ) ) @@ -753,8 +740,8 @@ void ScConflictsDlg::Resize() lcl_ChangeControlWidth( maFtConflicts, nDeltaWidth ); - lcl_ChangeControlWidth( maLbConflicts, nDeltaWidth ); - lcl_ChangeControlHeight( maLbConflicts, nDeltaHeight ); + lcl_ChangeControlWidth( m_aLbConflictsContainer, nDeltaWidth ); + lcl_ChangeControlHeight( m_aLbConflictsContainer, nDeltaHeight ); lcl_MoveControlX( maBtnKeepMine, nDeltaWidth / 2 ); lcl_MoveControlY( maBtnKeepMine, nDeltaHeight ); diff --git a/sc/source/ui/miscdlgs/namepast.cxx b/sc/source/ui/miscdlgs/namepast.cxx index 1f28fc4a9258..7c469c23b559 100644 --- a/sc/source/ui/miscdlgs/namepast.cxx +++ b/sc/source/ui/miscdlgs/namepast.cxx @@ -43,7 +43,7 @@ //================================================================== -ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, sal_Bool bInsList ) +ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, const ScRangeName* pLocalList, bool bInsList ) : ModalDialog( pParent, ScResId( RID_SCDLG_NAMES_PASTE ) ), aLabelText ( this, ScResId( FT_LABEL ) ), aNameList ( this, ScResId( LB_ENTRYLIST ) ), @@ -60,13 +60,20 @@ ScNamePasteDlg::ScNamePasteDlg( Window * pParent, const ScRangeName* pList, sal_ aNameList.SetSelectHdl( LINK( this,ScNamePasteDlg,ListSelHdl) ); aNameList.SetDoubleClickHdl( LINK( this,ScNamePasteDlg,ListDblClickHdl) ); - ScRangeName::const_iterator itr = pList->begin(), itrEnd = pList->end(); + ScRangeName::const_iterator itr = pLocalList->begin(), itrEnd = pLocalList->end(); for (; itr != itrEnd; ++itr) { if (!itr->HasType(RT_DATABASE) && !itr->HasType(RT_SHARED)) aNameList.InsertEntry(itr->GetName()); } + itr = pList->begin(), itrEnd = pList->end(); + for (; itr != itrEnd; ++itr) + { + if (!itr->HasType(RT_DATABASE) && !itr->HasType(RT_SHARED) && !pLocalList->findByName(itr->GetName())) + aNameList.InsertEntry(itr->GetName()); + } + ListSelHdl( &aNameList ); FreeResource(); diff --git a/sc/source/ui/miscdlgs/sharedocdlg.cxx b/sc/source/ui/miscdlgs/sharedocdlg.cxx index 8c474a4ec324..63e6efadc970 100644 --- a/sc/source/ui/miscdlgs/sharedocdlg.cxx +++ b/sc/source/ui/miscdlgs/sharedocdlg.cxx @@ -61,7 +61,8 @@ ScShareDocumentDlg::ScShareDocumentDlg( Window* pParent, ScViewData* pViewData ) ,maFtWarning ( this, ScResId( FT_WARNING ) ) ,maFlUsers ( this, ScResId( FL_USERS ) ) ,maFtUsers ( this, ScResId( FT_USERS ) ) - ,maLbUsers ( this, ScResId( LB_USERS ) ) + ,m_aLbUsersContainer(this, ScResId(LB_USERS)) + ,maLbUsers(m_aLbUsersContainer) ,maFlEnd ( this, ScResId( FL_END ) ) ,maBtnHelp ( this, ScResId( BTN_HELP ) ) ,maBtnOK ( this, ScResId( BTN_OK ) ) diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index 1cd9e4d124a4..016a6658cefd 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -62,7 +62,8 @@ ScTpContentOptions::ScTpContentOptions( Window* pParent, SfxTabPage(pParent, ScResId( RID_SCPAGE_CONTENT ), rArgSet), aLinesGB( this, ScResId(GB_LINES )), - aGridCB( this, ScResId(CB_GRID )), + aGridFT( this, ScResId(FT_GRID )), + aGridLB( this, ScResId(LB_GRID )), aColorFT( this, ScResId(FT_COLOR )), aColorLB( this, ScResId(LB_COLOR )), aBreakCB( this, ScResId(CB_PAGEBREAKS )), @@ -108,6 +109,7 @@ ScTpContentOptions::ScTpContentOptions( Window* pParent, aObjGrfLB. SetSelectHdl(aSelObjHdl); aDiagramLB. SetSelectHdl(aSelObjHdl); aDrawLB. SetSelectHdl(aSelObjHdl); + aGridLB. SetSelectHdl( LINK( this, ScTpContentOptions, GridHdl ) ); Link aCBHdl(LINK( this, ScTpContentOptions, CBHdl ) ); aFormulaCB .SetClickHdl(aCBHdl); @@ -127,7 +129,6 @@ ScTpContentOptions::ScTpContentOptions( Window* pParent, aBigHandleCB.SetClickHdl(aCBHdl); aRowColHeaderCB.SetClickHdl(aCBHdl); - aGridCB .SetClickHdl( LINK( this, ScTpContentOptions, GridHdl ) ); } ScTpContentOptions::~ScTpContentOptions() @@ -153,7 +154,7 @@ sal_Bool ScTpContentOptions::FillItemSet( SfxItemSet& rCoreSet ) aObjGrfLB .GetSavedValue() != aObjGrfLB .GetSelectEntryPos() || aDiagramLB .GetSavedValue() != aDiagramLB .GetSelectEntryPos() || aDrawLB .GetSavedValue() != aDrawLB .GetSelectEntryPos() || - aGridCB .GetSavedValue() != aGridCB.IsChecked() || + aGridLB .GetSavedValue() != aGridLB .GetSelectEntryPos() || aRowColHeaderCB .GetSavedValue() != aRowColHeaderCB.IsChecked() || aHScrollCB .GetSavedValue() != aHScrollCB .IsChecked() || aVScrollCB .GetSavedValue() != aVScrollCB .IsChecked() || @@ -239,7 +240,7 @@ void ScTpContentOptions::Reset( const SfxItemSet& rCoreSet ) aVScrollCB .SaveValue(); aTblRegCB .SaveValue(); aOutlineCB .SaveValue(); - aGridCB .SaveValue(); + aGridLB .SaveValue(); aColorLB .SaveValue(); aBreakCB .SaveValue(); aGuideLineCB .SaveValue(); @@ -310,19 +311,30 @@ IMPL_LINK( ScTpContentOptions, CBHdl, CheckBox*, pBtn ) void ScTpContentOptions::InitGridOpt() { - sal_Bool bGrid = pLocalOptions->GetOption( VOPT_GRID ); + sal_Bool bGrid = pLocalOptions->GetOption( VOPT_GRID ); + sal_Bool bGridOnTop = pLocalOptions->GetOption( VOPT_GRID_ONTOP ); + sal_uInt16 nSelPos = 0; - aGridCB.Check( bGrid ); - - if ( bGrid ) + if ( bGrid || bGridOnTop ) + { aColorFT.Enable(), aColorLB.Enable(); + if ( !bGridOnTop ) + nSelPos = 0; + else + nSelPos = 1; + } else + { aColorFT.Disable(), aColorLB.Disable(); + nSelPos = 2; + } + + aGridLB.SelectEntryPos (nSelPos); if ( aColorLB.GetEntryCount() == 0 ) { SfxObjectShell* pDocSh = SfxObjectShell::Current(); - // hier koennte auch eine andere DocShell kommen! + // there might be another DocShell here pDocSh = PTR_CAST(ScDocShell, pDocSh); XColorTable* pColorTable = NULL; @@ -344,7 +356,7 @@ void ScTpContentOptions::InitGridOpt() aColorLB.SetUpdateMode( false ); - // Eintraege aus der Colortable + // items from ColorTable long nCount = pColorTable->Count(); for ( long n=0; n<nCount; n++ ) @@ -353,9 +365,9 @@ void ScTpContentOptions::InitGridOpt() aColorLB.InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - // Standard-Gitterfarbe + // default GridColor - Color aStdCol( SC_STD_GRIDCOLOR ); // wie Default in ScViewOptions + Color aStdCol( SC_STD_GRIDCOLOR ); // same default as in ScViewOptions if ( LISTBOX_ENTRY_NOTFOUND == aColorLB.GetEntryPos( aStdCol ) ) aColorLB.InsertEntry( aStdCol, ScGlobal::GetRscString( STR_GRIDCOLOR ) ); @@ -369,7 +381,7 @@ void ScTpContentOptions::InitGridOpt() String aName; Color aCol = pLocalOptions->GetGridColor( &aName ); - sal_uInt16 nSelPos = aColorLB.GetEntryPos( aCol ); + nSelPos = aColorLB.GetEntryPos( aCol ); if ( LISTBOX_ENTRY_NOTFOUND != nSelPos ) aColorLB.SelectEntryPos( nSelPos ); @@ -377,12 +389,16 @@ void ScTpContentOptions::InitGridOpt() aColorLB.SelectEntryPos( aColorLB.InsertEntry( aCol, aName ) ); } -IMPL_LINK( ScTpContentOptions, GridHdl, CheckBox*, pBox ) +IMPL_LINK( ScTpContentOptions, GridHdl, ListBox*, pLb ) { - sal_Bool bChecked = pBox->IsChecked(); - aColorFT.Enable(bChecked); - aColorLB.Enable(bChecked); - pLocalOptions->SetOption( VOPT_GRID, bChecked ); + sal_uInt16 nSelPos = pLb->GetSelectEntryPos(); + sal_Bool bGrid = ( nSelPos <= 1 ); + sal_Bool bGridOnTop = ( nSelPos == 1 ); + + aColorFT.Enable(bGrid); + aColorLB.Enable(bGrid); + pLocalOptions->SetOption( VOPT_GRID, bGrid ); + pLocalOptions->SetOption( VOPT_GRID_ONTOP, bGridOnTop ); return 0; } diff --git a/sc/source/ui/src/optdlg.src b/sc/source/ui/src/optdlg.src index 9370ea0ab4f8..e7ceead9a83b 100644 --- a/sc/source/ui/src/optdlg.src +++ b/sc/source/ui/src/optdlg.src @@ -446,13 +446,28 @@ TabPage RID_SCPAGE_CONTENT Size = MAP_APPFONT ( 121 , 8 ) ; Text [ en-US ] = "Visual aids"; }; - CheckBox CB_GRID + FixedText FT_GRID { - HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:CB_GRID"; + HelpID = "sc:CheckBox:RID_SCPAGE_CONTENT:FT_GRID"; Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 112 , 10 ) ; + Size = MAP_APPFONT ( 40 , 8 ) ; Text [ en-US ] = "~Grid lines" ; }; + ListBox LB_GRID + { + HelpID = "sc:ListBox:RID_SCPAGE_CONTENT:LB_GRID"; + Pos = MAP_APPFONT ( 54 , 12 ) ; + Size = MAP_APPFONT ( 70 , 46 ) ; + Border = TRUE ; + DropDown = TRUE ; + StringList [ en-US ] = + { + < "Show" ; Default ; > ; + < "Show on colored cells" ; Default ; > ; + < "Hide" ; Default ; > ; + }; + + }; FixedText FT_COLOR { Pos = MAP_APPFONT ( 21 , 28 ) ; diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index ced857fa66a6..4b046f839ad4 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -991,18 +991,18 @@ void ScUndoPaste::DoChange( const sal_Bool bUndo ) SCTAB nFirstSelected = aMarkData.GetFirstSelected(); ScRange aTabSelectRange = aBlockRange; - SCTAB nTab; if ( !bUndo && pRedoDoc ) // Redo: UndoToDocument before handling RefData { aTabSelectRange.aStart.SetTab( nFirstSelected ); aTabSelectRange.aEnd.SetTab( nFirstSelected ); pRedoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, false, pDoc ); - for (nTab=0; nTab<nTabCount; nTab++) - if (nTab != nFirstSelected && aMarkData.GetTableSelect(nTab)) + ScMarkData::iterator itr = aMarkData.begin(), itrEnd = aMarkData.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + if (*itr != nFirstSelected) { - aTabSelectRange.aStart.SetTab( nTab ); - aTabSelectRange.aEnd.SetTab( nTab ); + aTabSelectRange.aStart.SetTab( *itr ); + aTabSelectRange.aEnd.SetTab( *itr ); pRedoDoc->CopyToDocument( aTabSelectRange, nUndoFlags, false, pDoc ); } } @@ -1022,11 +1022,12 @@ void ScUndoPaste::DoChange( const sal_Bool bUndo ) aTabSelectRange.aStart.SetTab( nFirstSelected ); aTabSelectRange.aEnd.SetTab( nFirstSelected ); pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, false, pDoc ); - for (nTab=0; nTab<nTabCount; nTab++) - if (nTab != nFirstSelected && aMarkData.GetTableSelect(nTab)) + ScMarkData::iterator itr = aMarkData.begin(), itrEnd = aMarkData.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + if (*itr != nFirstSelected) { - aTabSelectRange.aStart.SetTab( nTab ); - aTabSelectRange.aEnd.SetTab( nTab ); + aTabSelectRange.aStart.SetTab( *itr ); + aTabSelectRange.aEnd.SetTab( *itr ); pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, false, pDoc ); } } @@ -2084,6 +2085,9 @@ void ScUndoRemoveMerge::Undo() for (set<SCTAB>::const_iterator itr = maOption.maTabs.begin(), itrEnd = maOption.maTabs.end(); itr != itrEnd; ++itr) { + OSL_ENSURE(pUndoDoc, "NULL pUndoDoc!"); + if (!pUndoDoc) + continue; // There is no need to extend merge area because it's already been extended. ScRange aRange = maOption.getSingleRange(*itr); pDoc->DeleteAreaTab(aRange, IDF_ATTRIB); diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx index 208a10d437cc..fc2a02e0caef 100644 --- a/sc/source/ui/undo/undoblk2.cxx +++ b/sc/source/ui/undo/undoblk2.cxx @@ -128,26 +128,25 @@ void ScUndoWidthOrHeight::Undo() pDoc->SetOutlineTable( nStartTab, pUndoTab ); SCTAB nTabCount = pDoc->GetTableCount(); - SCTAB nTab; - for (nTab=0; nTab<nTabCount; nTab++) - if (aMarkData.GetTableSelect(nTab)) + ScMarkData::iterator itr = aMarkData.begin(), itrEnd = aMarkData.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + { + if (bWidth) // Width + { + pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, *itr, + static_cast<SCCOL>(nEnd), MAXROW, *itr, IDF_NONE, + false, pDoc ); + pDoc->UpdatePageBreaks( *itr ); + pDocShell->PostPaint( static_cast<SCCOL>(nPaintStart), 0, *itr, + MAXCOL, MAXROW, *itr, PAINT_GRID | PAINT_TOP ); + } + else // Height { - if (bWidth) // Width - { - pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab, - static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, - false, pDoc ); - pDoc->UpdatePageBreaks( nTab ); - pDocShell->PostPaint( static_cast<SCCOL>(nPaintStart), 0, nTab, - MAXCOL, MAXROW, nTab, PAINT_GRID | PAINT_TOP ); - } - else // Height - { - pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pDoc ); - pDoc->UpdatePageBreaks( nTab ); - pDocShell->PostPaint( 0, nPaintStart, nTab, MAXCOL, MAXROW, nTab, PAINT_GRID | PAINT_LEFT ); - } + pUndoDoc->CopyToDocument( 0, nStart, *itr, MAXCOL, nEnd, *itr, IDF_NONE, false, pDoc ); + pDoc->UpdatePageBreaks( *itr ); + pDocShell->PostPaint( 0, nPaintStart, *itr, MAXCOL, MAXROW, *itr, PAINT_GRID | PAINT_LEFT ); } + } DoSdrUndoAction( pDrawUndo, pDoc ); diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 1ee860414220..6f467e7f7411 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -320,12 +320,13 @@ void ScUndoFillTable::SetChangeTrack() ScRange aWorkRange(aRange); nStartChangeAction = 0; sal_uLong nTmpAction; - for ( SCTAB i = 0; i < nTabCount; i++ ) + ScMarkData::iterator itr = aMarkData.begin(), itrEnd = aMarkData.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) { - if (i != nSrcTab && aMarkData.GetTableSelect(i)) + if (*itr != nSrcTab) { - aWorkRange.aStart.SetTab(i); - aWorkRange.aEnd.SetTab(i); + aWorkRange.aStart.SetTab(*itr); + aWorkRange.aEnd.SetTab(*itr); pChangeTrack->AppendContentRange( aWorkRange, pUndoDoc, nTmpAction, nEndChangeAction ); if ( !nStartChangeAction ) @@ -350,13 +351,14 @@ void ScUndoFillTable::DoChange( const sal_Bool bUndo ) { SCTAB nTabCount = pDoc->GetTableCount(); ScRange aWorkRange(aRange); - for ( SCTAB i = 0; i < nTabCount; i++ ) - if (i != nSrcTab && aMarkData.GetTableSelect(i)) + ScMarkData::iterator itr = aMarkData.begin(), itrEnd = aMarkData.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + if (*itr != nSrcTab) { - aWorkRange.aStart.SetTab(i); - aWorkRange.aEnd.SetTab(i); + aWorkRange.aStart.SetTab(*itr); + aWorkRange.aEnd.SetTab(*itr); if (bMulti) - pDoc->DeleteSelectionTab( i, IDF_ALL, aMarkData ); + pDoc->DeleteSelectionTab( *itr, IDF_ALL, aMarkData ); else pDoc->DeleteAreaTab( aWorkRange, IDF_ALL ); pUndoDoc->CopyToDocument( aWorkRange, IDF_ALL, bMulti, pDoc, &aMarkData ); @@ -653,22 +655,20 @@ void ScUndoAutoFill::Undo() ScDocument* pDoc = pDocShell->GetDocument(); SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB nTab=0; nTab<nTabCount; nTab++) + ScMarkData::iterator itr = aMarkData.begin(), itrEnd = aMarkData.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) { - if (aMarkData.GetTableSelect(nTab)) - { - ScRange aWorkRange = aBlockRange; - aWorkRange.aStart.SetTab(nTab); - aWorkRange.aEnd.SetTab(nTab); + ScRange aWorkRange = aBlockRange; + aWorkRange.aStart.SetTab(*itr); + aWorkRange.aEnd.SetTab(*itr); - sal_uInt16 nExtFlags = 0; - pDocShell->UpdatePaintExt( nExtFlags, aWorkRange ); - pDoc->DeleteAreaTab( aWorkRange, IDF_AUTOFILL ); - pUndoDoc->CopyToDocument( aWorkRange, IDF_AUTOFILL, false, pDoc ); + sal_uInt16 nExtFlags = 0; + pDocShell->UpdatePaintExt( nExtFlags, aWorkRange ); + pDoc->DeleteAreaTab( aWorkRange, IDF_AUTOFILL ); + pUndoDoc->CopyToDocument( aWorkRange, IDF_AUTOFILL, false, pDoc ); - pDoc->ExtendMerge( aWorkRange, sal_True ); - pDocShell->PostPaint( aWorkRange, PAINT_GRID, nExtFlags ); - } + pDoc->ExtendMerge( aWorkRange, sal_True ); + pDocShell->PostPaint( aWorkRange, PAINT_GRID, nExtFlags ); } pDocShell->PostDataChanged(); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index d9f86d4e5fdf..66b3c7b26cfd 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -186,12 +186,6 @@ SC_SIMPLE_SERVICE_INFO( ScSpreadsheetSettings, "ScSpreadsheetSettings", SCSPREAD extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ ) { diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index be0ce4b4c456..9d33a95a061f 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -4015,10 +4015,11 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea ScMarkData aMark(*GetMarkData()); SCTAB nTabCount = pDoc->GetTableCount(); - sal_Bool bProtected = !pDocShell->IsEditable(); - for (SCTAB i=0; i<nTabCount; i++) - if ( aMark.GetTableSelect(i) && pDoc->IsTabProtected(i) ) - bProtected = sal_True; + bool bProtected = !pDocShell->IsEditable(); + ScMarkData::iterator itr = aMark.begin(), itrEnd = aMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + if ( pDoc->IsTabProtected(*itr) ) + bProtected = true; if (bProtected) { //! Exception, oder was? @@ -4036,9 +4037,10 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nTab, nTab ); } - for (SCTAB i=0; i<nTabCount; i++) - if ( aMark.GetTableSelect(i) && i != nTab && bUndo) - pUndoDoc->AddUndoTab( i, i ); + itr = aMark.begin(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + if ( *itr != nTab && bUndo) + pUndoDoc->AddUndoTab( *itr, *itr ); ScMarkData* pUndoMark = NULL; if (bUndo) pUndoMark = new ScMarkData(aMark); @@ -6088,6 +6090,7 @@ void ScCellObj::RefChanged() uno::Any SAL_CALL ScCellObj::queryInterface( const uno::Type& rType ) throw(uno::RuntimeException) { SC_QUERYINTERFACE( table::XCell ) + SC_QUERYINTERFACE( table::XCell2 ) SC_QUERYINTERFACE( sheet::XFormulaTokens ) SC_QUERYINTERFACE( sheet::XCellAddressable ) SC_QUERYINTERFACE( text::XText ) @@ -6121,7 +6124,7 @@ uno::Sequence<uno::Type> SAL_CALL ScCellObj::getTypes() throw(uno::RuntimeExcept long nParentLen = aParentTypes.getLength(); const uno::Type* pParentPtr = aParentTypes.getConstArray(); - aTypes.realloc( nParentLen + 8 ); + aTypes.realloc( nParentLen + 9 ); uno::Type* pPtr = aTypes.getArray(); pPtr[nParentLen + 0] = getCppuType((const uno::Reference<table::XCell>*)0); pPtr[nParentLen + 1] = getCppuType((const uno::Reference<sheet::XCellAddressable>*)0); @@ -6131,6 +6134,7 @@ uno::Sequence<uno::Type> SAL_CALL ScCellObj::getTypes() throw(uno::RuntimeExcept pPtr[nParentLen + 5] = getCppuType((const uno::Reference<text::XTextFieldsSupplier>*)0); pPtr[nParentLen + 6] = getCppuType((const uno::Reference<document::XActionLockable>*)0); pPtr[nParentLen + 7] = getCppuType((const uno::Reference<sheet::XFormulaTokens>*)0); + pPtr[nParentLen + 8] = getCppuType((const uno::Reference<table::XCell2>*)0); for (long i=0; i<nParentLen; i++) pPtr[i] = pParentPtr[i]; // parent types first @@ -6512,6 +6516,31 @@ void SAL_CALL ScCellObj::setValue( double nValue ) throw(uno::RuntimeException) SetValue_Impl(nValue); } +void SAL_CALL ScCellObj::setFormulaString( const rtl::OUString& aFormula) throw(uno::RuntimeException) +{ + SolarMutexGuard aGuard; + ScDocShell *pDocSh = GetDocShell(); + if( pDocSh ) + { + ScDocFunc aFunc( *pDocSh ); + ScFormulaCell* pCell = new ScFormulaCell( pDocSh->GetDocument(), aCellPos ); + pCell->SetHybridFormula( aFormula, formula::FormulaGrammar::GRAM_NATIVE ); + aFunc.PutCell( aCellPos, pCell, sal_True ); + } +} +void SAL_CALL ScCellObj::setFormulaResult( double nValue ) throw(uno::RuntimeException) +{ + SolarMutexGuard aGuard; + ScDocShell* pDocSh = GetDocShell(); + if ( pDocSh && pDocSh->GetDocument()->GetCellType( aCellPos ) == CELLTYPE_FORMULA ) + { + ScFormulaCell* pCell = (ScFormulaCell *)pDocSh->GetDocument()->GetCell( aCellPos ); + pCell->SetHybridDouble( nValue ); + pCell->ResetDirty(); + pCell->ResetChanged(); + } +} + table::CellContentType SAL_CALL ScCellObj::getType() throw(uno::RuntimeException) { SolarMutexGuard aGuard; diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index 0a269770e878..85702ad5cafb 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -1273,10 +1273,9 @@ void SAL_CALL ScDataPilotTableObj::refresh() throw(RuntimeException) ScDPObject* pDPObj = lcl_GetDPObject(GetDocShell(), nTab, aName); if (pDPObj) { - ScDPObject* pNew = new ScDPObject(*pDPObj); ScDBDocFunc aFunc(*GetDocShell()); - aFunc.DataPilotUpdate( pDPObj, pNew, true, true ); - delete pNew; // DataPilotUpdate copies settings from "new" object + GetDocShell()->GetDocument()->GetDPCollection()->ClearCache(pDPObj); + aFunc.DataPilotUpdate( pDPObj, pDPObj, true, true ); } } diff --git a/sc/source/ui/unoobj/detreg.cxx b/sc/source/ui/unoobj/detreg.cxx index 388a652e32eb..02ae0f8d4294 100644 --- a/sc/source/ui/unoobj/detreg.cxx +++ b/sc/source/ui/unoobj/detreg.cxx @@ -43,13 +43,6 @@ using namespace ::com::sun::star::lang; extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char** ppEnvironmentTypeName, - uno_Environment** /* ppEnvironment */ ) -{ - *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ; -} - SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName, void* pServiceManager, void* /* pRegistryKey */ ) diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 898b48e0d58e..8645e9f44ed3 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1602,11 +1602,18 @@ void SAL_CALL ScModelObj::setPropertyValue( ScDocument* pDoc = pDocShell->GetDocument(); const ScDocOptions& rOldOpt = pDoc->GetDocOptions(); ScDocOptions aNewOpt = rOldOpt; + // Don't recalculate while loading XML, when the formula text is stored + // Recalculation after loading is handled separately. + bool bHardRecalc = !pDoc->IsImportingXML(); sal_Bool bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt, *aPropSet.getPropertyMap(), aPropertyName, aValue ); if (bOpt) { // done... + if ( aString.EqualsAscii( SC_UNO_IGNORECASE ) || + aString.EqualsAscii( SC_UNONAME_REGEXP ) || + aString.EqualsAscii( SC_UNO_LOOKUPLABELS ) ) + bHardRecalc = false; } else if ( aString.EqualsAscii( SC_UNONAME_CLOCAL ) ) { @@ -1713,10 +1720,8 @@ void SAL_CALL ScModelObj::setPropertyValue( if ( aNewOpt != rOldOpt ) { pDoc->SetDocOptions( aNewOpt ); - // Don't recalculate while loading XML, when the formula text is stored. - // Recalculation after loading is handled separately. //! Recalc only for options that need it? - if ( !pDoc->IsImportingXML() ) + if ( bHardRecalc ) pDocShell->DoHardRecalc( sal_True ); pDocShell->SetDocumentModified(); } @@ -2181,50 +2186,51 @@ void ScModelObj::NotifyChanges( const ::rtl::OUString& rOperation, const ScRange aMarkData.MarkFromRangeList( rRanges, false ); ScDocument* pDoc = pDocShell->GetDocument(); SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB nTab = 0; nTab < nTabCount; nTab++) - if (aMarkData.GetTableSelect(nTab)) + ScMarkData::iterator itr = aMarkData.begin(), itrEnd = aMarkData.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) + { + SCTAB nTab = *itr; + const ScSheetEvents* pEvents = pDoc->GetSheetEvents(nTab); + if (pEvents) { - const ScSheetEvents* pEvents = pDoc->GetSheetEvents(nTab); - if (pEvents) + const rtl::OUString* pScript = pEvents->GetScript(SC_SHEETEVENT_CHANGE); + if (pScript) { - const rtl::OUString* pScript = pEvents->GetScript(SC_SHEETEVENT_CHANGE); - if (pScript) + ScRangeList aTabRanges; // collect ranges on this sheet + size_t nRangeCount = rRanges.size(); + for ( size_t nIndex = 0; nIndex < nRangeCount; ++nIndex ) { - ScRangeList aTabRanges; // collect ranges on this sheet - size_t nRangeCount = rRanges.size(); - for ( size_t nIndex = 0; nIndex < nRangeCount; ++nIndex ) - { - ScRange aRange( *rRanges[ nIndex ] ); - if ( aRange.aStart.Tab() == nTab ) - aTabRanges.Append( aRange ); - } - size_t nTabRangeCount = aTabRanges.size(); - if ( nTabRangeCount > 0 ) + ScRange aRange( *rRanges[ nIndex ] ); + if ( aRange.aStart.Tab() == nTab ) + aTabRanges.Append( aRange ); + } + size_t nTabRangeCount = aTabRanges.size(); + if ( nTabRangeCount > 0 ) + { + uno::Reference<uno::XInterface> xTarget; + if ( nTabRangeCount == 1 ) { - uno::Reference<uno::XInterface> xTarget; - if ( nTabRangeCount == 1 ) - { - ScRange aRange( *aTabRanges[ 0 ] ); - if ( aRange.aStart == aRange.aEnd ) - xTarget.set( static_cast<cppu::OWeakObject*>( new ScCellObj( pDocShell, aRange.aStart ) ) ); - else - xTarget.set( static_cast<cppu::OWeakObject*>( new ScCellRangeObj( pDocShell, aRange ) ) ); - } + ScRange aRange( *aTabRanges[ 0 ] ); + if ( aRange.aStart == aRange.aEnd ) + xTarget.set( static_cast<cppu::OWeakObject*>( new ScCellObj( pDocShell, aRange.aStart ) ) ); else - xTarget.set( static_cast<cppu::OWeakObject*>( new ScCellRangesObj( pDocShell, aTabRanges ) ) ); + xTarget.set( static_cast<cppu::OWeakObject*>( new ScCellRangeObj( pDocShell, aRange ) ) ); + } + else + xTarget.set( static_cast<cppu::OWeakObject*>( new ScCellRangesObj( pDocShell, aTabRanges ) ) ); - uno::Sequence<uno::Any> aParams(1); - aParams[0] <<= xTarget; + uno::Sequence<uno::Any> aParams(1); + aParams[0] <<= xTarget; - uno::Any aRet; - uno::Sequence<sal_Int16> aOutArgsIndex; - uno::Sequence<uno::Any> aOutArgs; + uno::Any aRet; + uno::Sequence<sal_Int16> aOutArgsIndex; + uno::Sequence<uno::Any> aOutArgs; - /*ErrCode eRet =*/ pDocShell->CallXScript( *pScript, aParams, aRet, aOutArgsIndex, aOutArgs ); - } + /*ErrCode eRet =*/ pDocShell->CallXScript( *pScript, aParams, aRet, aOutArgsIndex, aOutArgs ); } } } + } } } diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx index 8c48f46a3f7d..2e6658b2b57f 100644 --- a/sc/source/ui/unoobj/tokenuno.cxx +++ b/sc/source/ui/unoobj/tokenuno.cxx @@ -37,6 +37,7 @@ #include <com/sun/star/sheet/ExternalReference.hpp> #include <com/sun/star/sheet/ReferenceFlags.hpp> #include <com/sun/star/sheet/AddressConvention.hpp> +#include <com/sun/star/sheet/NameToken.hpp> #include <com/sun/star/table/CellAddress.hpp> #include <svl/itemprop.hxx> @@ -395,7 +396,12 @@ bool ScTokenConversion::ConvertToTokenSequence( ScDocument& rDoc, } break; case svIndex: - rAPI.Data <<= static_cast<sal_Int32>( rToken.GetIndex() ); + { + sheet::NameToken aNameToken; + aNameToken.Index = static_cast<sal_Int32>( rToken.GetIndex() ); + aNameToken.Global = static_cast<sal_Bool>( rToken.GetByte() ); + rAPI.Data <<= aNameToken; + } break; case svMatrix: if (!ScRangeToSequence::FillMixedArray( rAPI.Data, static_cast<const ScToken&>(rToken).GetMatrix(), true)) diff --git a/sc/source/ui/vba/service.cxx b/sc/source/ui/vba/service.cxx index 56ed8a38fc6f..e086afa0cfe9 100644 --- a/sc/source/ui/vba/service.cxx +++ b/sc/source/ui/vba/service.cxx @@ -78,13 +78,6 @@ extern sdecl::ServiceDecl const serviceDecl; extern "C" { - SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) - { - OSL_TRACE("In component_getImplementationEnv"); - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; - } - SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, registry::XRegistryKey * pRegistryKey ) diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index e8bb7adf1ae4..4e3b89c724c2 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -218,7 +218,7 @@ ScVbaApplication::invoke( const ::rtl::OUString& FunctionName, const uno::Sequen uno::Reference< script::XInvocation > xWSF( new ScVbaWSFunction( this, mxContext ) ); aAny = xWSF->invoke( FunctionName, Params, OutParamIndex, OutParam ); } - catch( uno::Exception& ) + catch (const uno::Exception&) { aAny <<= script::BasicErrorException( ::rtl::OUString(), uno::Reference< uno::XInterface >(), 1000, ::rtl::OUString() ); } @@ -519,7 +519,7 @@ ScVbaApplication::setCutCopyMode( const uno::Any& _cutcopymode ) throw (uno::Run { xFlushableClipboard->flushClipboard(); } - catch( const uno::Exception& ) + catch (const uno::Exception&) { } Application::AcquireSolarMutex( nRef ); @@ -733,7 +733,7 @@ ScVbaApplication::GoTo( const uno::Any& Reference, const uno::Any& Scroll ) thro gridWindow->GrabFocus(); } } - catch( uno::RuntimeException ) + catch (const uno::RuntimeException&) { //maybe this should be a procedure name //TODO for procedure name @@ -835,7 +835,7 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException) // IllegalArgumentException, or so } } - catch( const uno::Exception& ) + catch (const uno::Exception&) { DBG_UNHANDLED_EXCEPTION(); } @@ -996,7 +996,7 @@ rtl::OUString ScVbaApplication::getOfficePath( const rtl::OUString& _sPathType ) sUrl = sUrl.copy( nIndex + 1 ); ::osl::File::getSystemPathFromFileURL( sUrl, sRetPath ); } - catch (uno::Exception&) + catch (const uno::Exception&) { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); } @@ -1528,7 +1528,7 @@ ScVbaApplication::GetOpenFilename(const uno::Any& FileFilter, const uno::Any& Fi } } } - catch( const uno::Exception& ) + catch (const uno::Exception&) { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); } @@ -1696,7 +1696,7 @@ ScVbaApplication::GetSaveAsFilename( const ::com::sun::star::uno::Any& InitialFi } } } - catch( const uno::Exception& ) + catch (const uno::Exception&) { DebugHelper::exception(SbERR_METHOD_FAILED, rtl::OUString()); } diff --git a/sc/source/ui/vba/vbaoleobjects.cxx b/sc/source/ui/vba/vbaoleobjects.cxx index 84cba7b96e92..7cecaff5784b 100644 --- a/sc/source/ui/vba/vbaoleobjects.cxx +++ b/sc/source/ui/vba/vbaoleobjects.cxx @@ -141,7 +141,7 @@ ScVbaOLEObjects::getItemByStringIndex( const rtl::OUString& sIndex ) throw (uno: { return OLEObjectsImpl_BASE::getItemByStringIndex( sIndex ); } - catch( uno::RuntimeException ) + catch (const uno::RuntimeException&) { uno::Reference< container::XIndexAccess > xIndexAccess( m_xIndexAccess, uno::UNO_QUERY_THROW ); sal_Int32 nCount = xIndexAccess->getCount(); diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 42c21cc953ce..e728474c1ff7 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -126,15 +126,13 @@ public: sheets.reserve( nTabCount ); uno::Reference <sheet::XSpreadsheetDocument> xSpreadSheet( m_xModel, uno::UNO_QUERY_THROW ); uno::Reference <container::XIndexAccess> xIndex( xSpreadSheet->getSheets(), uno::UNO_QUERY_THROW ); - for ( SCTAB nTab=0; nTab<nTabCount; nTab++ ) + ScMarkData::const_iterator itr = rMarkData.begin(), itrEnd = rMarkData.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) { - if ( rMarkData.GetTableSelect(nTab) ) - { - uno::Reference< sheet::XSpreadsheet > xSheet( xIndex->getByIndex( nTab ), uno::UNO_QUERY_THROW ); - uno::Reference< container::XNamed > xNamed( xSheet, uno::UNO_QUERY_THROW ); - sheets.push_back( xSheet ); - namesToIndices[ xNamed->getName() ] = nIndex++; - } + uno::Reference< sheet::XSpreadsheet > xSheet( xIndex->getByIndex( *itr ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNamed > xNamed( xSheet, uno::UNO_QUERY_THROW ); + sheets.push_back( xSheet ); + namesToIndices[ xNamed->getName() ] = nIndex++; } } diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 78b56a169977..a959020dea79 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -1807,10 +1807,11 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) case FID_INSERT_NAME: { ScDocument* pDoc = GetViewData()->GetDocument(); + SCTAB nTab = GetViewData()->GetTabNo(); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - AbstractScNamePasteDlg* pDlg = pFact->CreateScNamePasteDlg( pTabViewShell->GetDialogParent(), pDoc->GetRangeName(), RID_SCDLG_NAMES_PASTE ); + AbstractScNamePasteDlg* pDlg = pFact->CreateScNamePasteDlg( pTabViewShell->GetDialogParent(), pDoc->GetRangeName(), pDoc->GetRangeName(nTab), RID_SCDLG_NAMES_PASTE ); OSL_ENSURE(pDlg, "Dialog create fail!"); switch( pDlg->Execute() ) { diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx index ec794dcb7d89..9158fb828633 100644 --- a/sc/source/ui/view/dbfunc3.cxx +++ b/sc/source/ui/view/dbfunc3.cxx @@ -707,37 +707,10 @@ void ScDBFunc::RecalcPivotTable() { // Remove existing data cache for the data that this datapilot uses, // to force re-build data cache. - if (pDPObj->IsSheetData()) + if (!pDPs->ClearCache(pDPObj)) { - // data source is internal sheet. - const ScSheetSourceDesc* pDesc = pDPObj->GetSheetDesc(); - if (!pDesc) - { - ErrorMessage(STR_PIVOT_NOTFOUND); - return; - } - if (pDesc->HasRangeName()) - { - ScDPCollection::NameCaches& rCaches = pDPs->GetNameCaches(); - rCaches.removeCache(pDesc->GetRangeName()); - } - else - { - ScDPCollection::SheetCaches& rCaches = pDPs->GetSheetCaches(); - rCaches.removeCache(pDesc->GetSourceRange()); - } - } - else if (pDPObj->IsImportData()) - { - // data source is external database. - const ScImportSourceDesc* pDesc = pDPObj->GetImportSourceDesc(); - if (!pDesc) - { - ErrorMessage(STR_PIVOT_NOTFOUND); - return; - } - ScDPCollection::DBCaches& rCaches = pDPs->GetDBCaches(); - rCaches.removeCache(pDesc->GetCommandType(), pDesc->aDBName, pDesc->aObject); + ErrorMessage(STR_PIVOT_NOTFOUND); + return; } ScDBDocFunc aFunc( *pDocSh ); diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx index 4fc854b8934a..d97364d455ad 100644 --- a/sc/source/ui/view/drawview.cxx +++ b/sc/source/ui/view/drawview.cxx @@ -487,7 +487,7 @@ void ScDrawView::MarkListHasChanged() uno::Reference < embed::XEmbeddedObject > xObj = pOle2Obj->GetObjRef(); OSL_ENSURE( xObj.is(), "SdrOle2Obj ohne ObjRef" ); if (xObj.is()) - xObj->getSupportedVerbs(); + aVerbs = xObj->getSupportedVerbs(); } pViewSh->SetVerbs( aVerbs ); diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 7ae92f454151..858983587f6a 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -420,10 +420,11 @@ void ScEditShell::Execute( SfxRequest& rReq ) case FID_INSERT_NAME: { ScDocument* pDoc = pViewData->GetDocument(); + SCTAB nTab = pViewData->GetTabNo(); ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - AbstractScNamePasteDlg* pDlg = pFact->CreateScNamePasteDlg( pViewData->GetDialogParent(), pDoc->GetRangeName(), RID_SCDLG_NAMES_PASTE, false ); + AbstractScNamePasteDlg* pDlg = pFact->CreateScNamePasteDlg( pViewData->GetDialogParent(), pDoc->GetRangeName(), pDoc->GetRangeName(nTab), RID_SCDLG_NAMES_PASTE, false ); OSL_ENSURE(pDlg, "Dialog create fail!"); short nRet = pDlg->Execute(); // pDlg is needed below diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index f7ea3973a3b5..d4cc64f7af9a 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -625,19 +625,18 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq ) if ( pStyleSheet && !pScMod->GetIsWaterCan() ) { ScUndoApplyPageStyle* pUndoAction = 0; - for( SCTAB nTab = 0, nTabCount = pDoc->GetTableCount(); nTab < nTabCount; ++nTab ) + SCTAB nTabCount = pDoc->GetTableCount(); + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && *itr < nTabCount; ++itr) { - if( rMark.GetTableSelect( nTab ) ) + String aOldName = pDoc->GetPageStyle( *itr ); + if ( aOldName != aStyleName ) { - String aOldName = pDoc->GetPageStyle( nTab ); - if ( aOldName != aStyleName ) - { - pDoc->SetPageStyle( nTab, aStyleName ); - ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(sal_True), nTab ).UpdatePages(); - if( !pUndoAction ) - pUndoAction = new ScUndoApplyPageStyle( pDocSh, aStyleName ); - pUndoAction->AddSheetAction( nTab, aOldName ); - } + pDoc->SetPageStyle( *itr, aStyleName ); + ScPrintFunc( pDocSh, pTabViewShell->GetPrinter(sal_True), *itr ).UpdatePages(); + if( !pUndoAction ) + pUndoAction = new ScUndoApplyPageStyle( pDocSh, aStyleName ); + pUndoAction->AddSheetAction( *itr, aOldName ); } } if( pUndoAction ) diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index b912cd57e82e..ea4fe2a0ac74 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -399,7 +399,6 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod { ScModule* pScMod = SC_MOD(); sal_Bool bTextWysiwyg = pScMod->GetInputOptions().GetTextWysiwyg(); - sal_Bool bGridFirst = true; //! entscheiden!!! if (pViewData->IsMinimized()) return; @@ -543,6 +542,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2, ScUpdateMod aOutputData.SetViewShell( pViewData->GetViewShell() ); sal_Bool bGrid = rOpts.GetOption( VOPT_GRID ) && pViewData->GetShowGrid(); + sal_Bool bGridFirst = !rOpts.GetOption( VOPT_GRID_ONTOP ); sal_Bool bPage = rOpts.GetOption( VOPT_PAGEBREAKS ); diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 10925ef4f6f0..35fbedc52469 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -52,7 +52,6 @@ #include <basegfx/matrix/b2dhommatrix.hxx> #include <svx/sdr/contact/objectcontacttools.hxx> #include <svx/unoapi.hxx> -#include <svx/svdpage.hxx> #include "output.hxx" #include "document.hxx" @@ -1635,22 +1634,18 @@ void ScOutputData::DrawRotatedFrame( const Color* pForceColor ) drawinglayer::processor2d::BaseProcessor2D* ScOutputData::CreateProcessor2D( ) { - SdrModel aModel; - SfxItemPool& rPool = aModel.GetItemPool(); - rPool.FreezeIdRanges(); - - SdrPage aSdrPage( aModel ); - + pDoc->InitDrawLayer(pDoc->GetDocumentShell()); ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer(); - if ( pDrawLayer ) - aSdrPage = *pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) ); + if (!pDrawLayer) + return NULL; basegfx::B2DRange aViewRange; + SdrPage *pDrawPage = pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) ); const drawinglayer::geometry::ViewInformation2D aNewViewInfos( basegfx::B2DHomMatrix( ), pDev->GetViewTransformation(), aViewRange, - GetXDrawPageForSdrPage( &aSdrPage ), + GetXDrawPageForSdrPage( pDrawPage ), 0.0, uno::Sequence< beans::PropertyValue >() ); diff --git a/sc/source/ui/view/pfuncache.cxx b/sc/source/ui/view/pfuncache.cxx index 25c90813136a..28c099eb08fa 100644 --- a/sc/source/ui/view/pfuncache.cxx +++ b/sc/source/ui/view/pfuncache.cxx @@ -111,35 +111,34 @@ void ScPrintFuncCache::InitLocations( const ScMarkData& rMark, OutputDevice* pDe ScDocument* pDoc = pDocSh->GetDocument(); SCTAB nTabCount = pDoc->GetTableCount(); - for ( SCTAB nTab=0; nTab<nTabCount; nTab++ ) + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && (*itr) < nTabCount; ++itr) { - if ( rMark.GetTableSelect( nTab ) ) - { - ScPrintFunc aFunc( pDev, pDocSh, nTab, nFirstAttr[nTab], nTotalPages, pSelRange, &aSelection.GetOptions() ); - aFunc.SetRenderFlag( sal_True ); - - long nDisplayStart = GetDisplayStart( nTab ); + SCTAB nTab = *itr; + ScPrintFunc aFunc( pDev, pDocSh, nTab, nFirstAttr[nTab], nTotalPages, pSelRange, &aSelection.GetOptions() ); + aFunc.SetRenderFlag( sal_True ); - for ( long nPage=0; nPage<nPages[nTab]; nPage++ ) - { - Range aPageRange( nRenderer+1, nRenderer+1 ); - MultiSelection aPage( aPageRange ); - aPage.SetTotalRange( Range(0,RANGE_MAX) ); - aPage.Select( aPageRange ); + long nDisplayStart = GetDisplayStart( nTab ); - ScPreviewLocationData aLocData( pDoc, pDev ); - aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, NULL, &aLocData ); + for ( long nPage=0; nPage<nPages[nTab]; nPage++ ) + { + Range aPageRange( nRenderer+1, nRenderer+1 ); + MultiSelection aPage( aPageRange ); + aPage.SetTotalRange( Range(0,RANGE_MAX) ); + aPage.Select( aPageRange ); - ScRange aCellRange; - Rectangle aPixRect; - if ( aLocData.GetMainCellRange( aCellRange, aPixRect ) ) - aLocations.push_back( ScPrintPageLocation( nRenderer, aCellRange, aPixRect ) ); + ScPreviewLocationData aLocData( pDoc, pDev ); + aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, NULL, &aLocData ); - ++nRenderer; - } + ScRange aCellRange; + Rectangle aPixRect; + if ( aLocData.GetMainCellRange( aCellRange, aPixRect ) ) + aLocations.push_back( ScPrintPageLocation( nRenderer, aCellRange, aPixRect ) ); - nTabStart += nPages[nTab]; + ++nRenderer; } + + nTabStart += nPages[nTab]; } bLocInitialized = true; diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx index 25c3b859ad62..33dea9c1977c 100644 --- a/sc/source/ui/view/spelldialog.cxx +++ b/sc/source/ui/view/spelldialog.cxx @@ -237,13 +237,13 @@ void ScSpellDialogChildWindow::Init() if ( rMarkData.GetSelectCount() > 1 ) { - SCTAB nTabCount = mpDoc->GetTableCount(); - for( SCTAB nOtherTab = 0; nOtherTab < nTabCount; ++nOtherTab ) + ScMarkData::iterator itr = rMarkData.begin(), itrEnd = rMarkData.end(); + for (; itr != itrEnd; ++itr) { - if( rMarkData.GetTableSelect( nOtherTab ) && (nOtherTab != nTab) ) + if( *itr != nTab ) { - mxUndoDoc->AddUndoTab( nOtherTab, nOtherTab ); - mxRedoDoc->AddUndoTab( nOtherTab, nOtherTab ); + mxUndoDoc->AddUndoTab( *itr, *itr ); + mxRedoDoc->AddUndoTab( *itr, *itr ); } } } diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index aefc0092d3fb..922e31cb7eca 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -73,8 +73,7 @@ #include "protectiondlg.hxx" #include <svl/ilstitem.hxx> -#define _SVSTDARR_ULONGS -#include <svl/svstdarr.hxx> +#include <vector> #include <svx/zoomslideritem.hxx> #include <svx/svxdlg.hxx> @@ -810,7 +809,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) SCTAB nTabCount = rDoc.GetTableCount(); SCTAB nTab; - SvULongs aIndexList( 4, 4 ); + ::std::vector < sal_Int32 > aIndexList; SFX_REQUEST_ARG( rReq, pItem, SfxIntegerListItem, SID_SELECT_TABLES, false ); if ( pItem ) pItem->GetList( aIndexList ); @@ -839,7 +838,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) sal_uInt16 nSelCount = pDlg->GetSelectEntryCount(); sal_uInt16 nSelIx; for( nSelIx = 0; nSelIx < nSelCount; ++nSelIx ) - aIndexList.Insert( pDlg->GetSelectEntryPos( nSelIx ), nSelIx ); + aIndexList.insert( aIndexList.begin()+nSelIx, pDlg->GetSelectEntryPos( nSelIx ) ); delete pDlg; rReq.AppendItem( SfxIntegerListItem( SID_SELECT_TABLES, aIndexList ) ); } @@ -847,9 +846,9 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) rReq.Ignore(); } - if ( aIndexList.Count() ) + if ( !aIndexList.empty() ) { - sal_uInt16 nSelCount = aIndexList.Count(); + sal_uInt16 nSelCount = aIndexList.size(); sal_uInt16 nSelIx; SCTAB nFirstVisTab = 0; diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index 613c10d83174..6b1ab39d1038 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -634,7 +634,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { SCTAB nNewTab = nCurrentTab; SCTAB nFirstTab=0; - sal_Bool bTabFlag=false; + bool bTabFlag=false; ScMarkData& rMark = pViewData->GetMarkData(); std::vector<SCTAB> TheTabs; for(SCTAB i=0;i<nTabCount;i++) @@ -672,9 +672,9 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) String aUndo = ScGlobal::GetRscString( STR_UNDO_TAB_RTL ); pUndoManager->EnterListAction( aUndo, aUndo ); - for (SCTAB nTab=0; nTab<nTabCount; nTab++) - if ( rMark.GetTableSelect(nTab) ) - aFunc.SetLayoutRTL( nTab, bSet, false ); + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) + aFunc.SetLayoutRTL( *itr, bSet, false ); pUndoManager->LeaveListAction(); } @@ -723,11 +723,12 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) { scoped_ptr<ScUndoTabColorInfo::List> pTabColorList(new ScUndoTabColorInfo::List); - for (SCTAB nTab=0; nTab<nTabCount; nTab++) + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) { - if ( rMark.GetTableSelect(nTab) && !pDoc->IsTabProtected(nTab) ) + if ( !pDoc->IsTabProtected(*itr) ) { - ScUndoTabColorInfo aTabColorInfo(nTab); + ScUndoTabColorInfo aTabColorInfo(*itr); aTabColorInfo.maNewTabBgColor = aColor; pTabColorList->push_back(aTabColorInfo); } @@ -771,69 +772,70 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq ) pTabColorList(new ScUndoTabColorInfo::List); if ( nTabSelCount > 1 ) { - for (SCTAB nTab=0; nTab<nTabCount; nTab++) - { - if ( rMark.GetTableSelect(nTab) && !pDoc->IsTabProtected(nTab) ) + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) { - ScUndoTabColorInfo aTabColorInfo(nTab); - aTabColorInfo.maNewTabBgColor = aSelectedColor; - pTabColorList->push_back(aTabColorInfo); + if ( !pDoc->IsTabProtected(*itr) ) + { + ScUndoTabColorInfo aTabColorInfo(*itr); + aTabColorInfo.maNewTabBgColor = aSelectedColor; + pTabColorList->push_back(aTabColorInfo); + } } + bDone = SetTabBgColor( *pTabColorList ); } - bDone = SetTabBgColor( *pTabColorList ); - } - else - { - bDone = SetTabBgColor( aSelectedColor, nCurrentTab ); //ScViewFunc.SetTabBgColor - } - if ( bDone ) - { - rReq.AppendItem( SvxColorItem( aTabBgColor, nSlot ) ); - rReq.Done(); - } - else - { - if( rReq.IsAPI() ) + else + { + bDone = SetTabBgColor( aSelectedColor, nCurrentTab ); //ScViewFunc.SetTabBgColor + } + if ( bDone ) { - StarBASIC::Error( SbERR_SETPROP_FAILED ); + rReq.AppendItem( SvxColorItem( aTabBgColor, nSlot ) ); + rReq.Done(); + } + else + { + if( rReq.IsAPI() ) + { + StarBASIC::Error( SbERR_SETPROP_FAILED ); + } } } } + delete( pDlg ); } - delete( pDlg ); } - } - break; + break; - case FID_TAB_EVENTS: - { - ScDocShell* pDocSh = pViewData->GetDocShell(); - uno::Reference<container::XNameReplace> xEvents( new ScSheetEventsObj( pDocSh, nCurrentTab ) ); - uno::Reference<frame::XFrame> xFrame = GetViewFrame()->GetFrame().GetFrameInterface(); - SvxAbstractDialogFactory* pDlgFactory = SvxAbstractDialogFactory::Create(); - if (pDlgFactory) + case FID_TAB_EVENTS: { - std::auto_ptr<VclAbstractDialog> pDialog( pDlgFactory->CreateSvxMacroAssignDlg( - GetDialogParent(), xFrame, false, xEvents, 0 ) ); - if ( pDialog.get() && pDialog->Execute() == RET_OK ) + ScDocShell* pDocSh = pViewData->GetDocShell(); + uno::Reference<container::XNameReplace> xEvents( new ScSheetEventsObj( pDocSh, nCurrentTab ) ); + uno::Reference<frame::XFrame> xFrame = GetViewFrame()->GetFrame().GetFrameInterface(); + SvxAbstractDialogFactory* pDlgFactory = SvxAbstractDialogFactory::Create(); + if (pDlgFactory) { - // the dialog modifies the settings directly + std::auto_ptr<VclAbstractDialog> pDialog( pDlgFactory->CreateSvxMacroAssignDlg( + GetDialogParent(), xFrame, false, xEvents, 0 ) ); + if ( pDialog.get() && pDialog->Execute() == RET_OK ) + { + // the dialog modifies the settings directly + } } } - } - break; + break; - default: - OSL_FAIL("Unbekannte Message bei ViewShell"); - break; + default: + OSL_FAIL("Unbekannte Message bei ViewShell"); + break; + } } -} -//------------------------------------------------------------------ + //------------------------------------------------------------------ -void ScTabViewShell::GetStateTable( SfxItemSet& rSet ) -{ - ScViewData* pViewData = GetViewData(); + void ScTabViewShell::GetStateTable( SfxItemSet& rSet ) + { + ScViewData* pViewData = GetViewData(); ScDocument* pDoc = pViewData->GetDocument(); ScDocShell* pDocShell = pViewData->GetDocShell(); ScMarkData& rMark = GetViewData()->GetMarkData(); diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 7cb1a7bb93fd..81b6b3a65b8a 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -591,12 +591,8 @@ void ScViewData::SetZoomType( SvxZoomType eNew, sal_Bool bAll ) std::vector< SCTAB > vTabs; // Empty for all tabs if ( !bAll ) // get selected tabs { - SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB i=0; i<nTabCount; i++) - { - if ( aMarkData.GetTableSelect(i) ) - vTabs.push_back( i ); - } + ScMarkData::iterator itr = aMarkData.begin(), itrEnd = aMarkData.end(); + vTabs.insert(vTabs.begin(), itr, itrEnd); } SetZoomType( eNew, vTabs ); } @@ -680,12 +676,8 @@ void ScViewData::SetZoom( const Fraction& rNewX, const Fraction& rNewY, sal_Bool std::vector< SCTAB > vTabs; if ( !bAll ) // get selected tabs { - SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB i=0; i<nTabCount; i++) - { - if ( aMarkData.GetTableSelect(i) ) - vTabs.push_back( i ); - } + ScMarkData::iterator itr = aMarkData.begin(), itrEnd = aMarkData.end(); + vTabs.insert(vTabs.begin(), itr, itrEnd); } SetZoom( rNewX, rNewY, vTabs ); } @@ -1434,10 +1426,9 @@ void ScViewData::CreateTabData( SCTAB nNewTab ) void ScViewData::CreateSelectedTabData() { - SCTAB nTabCount = aMarkData.GetLastSelected(); - for (SCTAB i=0; i<nTabCount; i++) - if ( aMarkData.GetTableSelect(i)) - CreateTabData(i); + ScMarkData::iterator itr = aMarkData.begin(), itrEnd = aMarkData.end(); + for (; itr != itrEnd; ++itr) + CreateTabData(*itr); } void ScViewData::EnsureTabDataSize(size_t nSize) diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index acbc952e74d4..727910bff842 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -145,30 +145,28 @@ sal_Bool ScViewFunc::AdjustBlockHeight( sal_Bool bPaint, ScMarkData* pMarkData ) } sal_Bool bAnyChanged = false; - SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB nTab=0; nTab<nTabCount; nTab++) - { - if (pMarkData->GetTableSelect(nTab)) - { - SCCOLROW* pOneRange = pRanges; - sal_Bool bChanged = false; - SCROW nPaintY = 0; - for (SCROW nRangeNo=0; nRangeNo<nRangeCnt; nRangeNo++) + ScMarkData::iterator itr = pMarkData->begin(), itrEnd = pMarkData->end(); + for (; itr != itrEnd; ++itr) + { + SCTAB nTab = *itr; + SCCOLROW* pOneRange = pRanges; + sal_Bool bChanged = false; + SCROW nPaintY = 0; + for (SCROW nRangeNo=0; nRangeNo<nRangeCnt; nRangeNo++) + { + SCROW nStartNo = *(pOneRange++); + SCROW nEndNo = *(pOneRange++); + if (pDoc->SetOptimalHeight( nStartNo, nEndNo, nTab, 0, aProv.GetDevice(), + nPPTX, nPPTY, aZoomX, aZoomY, false )) { - SCROW nStartNo = *(pOneRange++); - SCROW nEndNo = *(pOneRange++); - if (pDoc->SetOptimalHeight( nStartNo, nEndNo, nTab, 0, aProv.GetDevice(), - nPPTX, nPPTY, aZoomX, aZoomY, false )) - { - if (!bChanged) - nPaintY = nStartNo; - bAnyChanged = bChanged = sal_True; - } + if (!bChanged) + nPaintY = nStartNo; + bAnyChanged = bChanged = sal_True; } - if ( bPaint && bChanged ) - pDocSh->PostPaint( 0, nPaintY, nTab, MAXCOL, MAXROW, nTab, - PAINT_GRID | PAINT_LEFT ); } + if ( bPaint && bChanged ) + pDocSh->PostPaint( 0, nPaintY, nTab, MAXCOL, MAXROW, nTab, + PAINT_GRID | PAINT_LEFT ); } delete[] pRanges; @@ -953,7 +951,6 @@ void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const String* pPrint, ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - SCTAB nTabCount = pDoc->GetTableCount(); ScMarkData& rMark = GetViewData()->GetMarkData(); SCTAB nTab; sal_Bool bUndo (pDoc->IsUndoEnabled()); @@ -962,75 +959,76 @@ void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const String* pPrint, ScAddress::Details aDetails(pDoc->GetAddressConvention(), 0, 0); - for (nTab=0; nTab<nTabCount; nTab++) - if (rMark.GetTableSelect(nTab)) - { - ScRange aRange( 0,0,nTab ); + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) + { + nTab = *itr; + ScRange aRange( 0,0,nTab ); - // print ranges + // print ranges - if( !bAddPrint ) - pDoc->ClearPrintRanges( nTab ); + if( !bAddPrint ) + pDoc->ClearPrintRanges( nTab ); - if( bEntireSheet ) - { - pDoc->SetPrintEntireSheet( nTab ); - } - else if ( pPrint ) + if( bEntireSheet ) + { + pDoc->SetPrintEntireSheet( nTab ); + } + else if ( pPrint ) + { + if ( pPrint->Len() ) { - if ( pPrint->Len() ) + const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); + sal_uInt16 nTCount = pPrint->GetTokenCount(sep); + for (sal_uInt16 i=0; i<nTCount; i++) { - const sal_Unicode sep = ScCompiler::GetNativeSymbol(ocSep).GetChar(0); - sal_uInt16 nTCount = pPrint->GetTokenCount(sep); - for (sal_uInt16 i=0; i<nTCount; i++) - { - String aToken = pPrint->GetToken(i, sep); - if ( aRange.ParseAny( aToken, pDoc, aDetails ) & SCA_VALID ) - pDoc->AddPrintRange( nTab, aRange ); - } + String aToken = pPrint->GetToken(i, sep); + if ( aRange.ParseAny( aToken, pDoc, aDetails ) & SCA_VALID ) + pDoc->AddPrintRange( nTab, aRange ); } } - else // NULL = use selection (print range is always set), use empty string to delete all ranges + } + else // NULL = use selection (print range is always set), use empty string to delete all ranges + { + if ( GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE ) { - if ( GetViewData()->GetSimpleArea( aRange ) == SC_MARK_SIMPLE ) - { - pDoc->AddPrintRange( nTab, aRange ); - } - else if ( rMark.IsMultiMarked() ) + pDoc->AddPrintRange( nTab, aRange ); + } + else if ( rMark.IsMultiMarked() ) + { + rMark.MarkToMulti(); + ScRangeListRef pList( new ScRangeList ); + rMark.FillRangeListWithMarks( pList, false ); + for (size_t i = 0, n = pList->size(); i < n; ++i) { - rMark.MarkToMulti(); - ScRangeListRef pList( new ScRangeList ); - rMark.FillRangeListWithMarks( pList, false ); - for (size_t i = 0, n = pList->size(); i < n; ++i) - { - ScRange* pR = (*pList)[i]; - pDoc->AddPrintRange(nTab, *pR); - } + ScRange* pR = (*pList)[i]; + pDoc->AddPrintRange(nTab, *pR); } } + } - // repeat columns + // repeat columns - if ( pRepCol ) - { - if ( !pRepCol->Len() ) - pDoc->SetRepeatColRange( nTab, NULL ); - else - if ( aRange.ParseAny( *pRepCol, pDoc, aDetails ) & SCA_VALID ) - pDoc->SetRepeatColRange( nTab, &aRange ); - } + if ( pRepCol ) + { + if ( !pRepCol->Len() ) + pDoc->SetRepeatColRange( nTab, NULL ); + else + if ( aRange.ParseAny( *pRepCol, pDoc, aDetails ) & SCA_VALID ) + pDoc->SetRepeatColRange( nTab, &aRange ); + } - // repeat rows + // repeat rows - if ( pRepRow ) - { - if ( !pRepRow->Len() ) - pDoc->SetRepeatRowRange( nTab, NULL ); - else - if ( aRange.ParseAny( *pRepRow, pDoc, aDetails ) & SCA_VALID ) - pDoc->SetRepeatRowRange( nTab, &aRange ); - } + if ( pRepRow ) + { + if ( !pRepRow->Len() ) + pDoc->SetRepeatRowRange( nTab, NULL ); + else + if ( aRange.ParseAny( *pRepRow, pDoc, aDetails ) & SCA_VALID ) + pDoc->SetRepeatRowRange( nTab, &aRange ); } + } // undo (for all tables) if (bUndo) @@ -1043,9 +1041,9 @@ void ScViewFunc::SetPrintRanges( sal_Bool bEntireSheet, const String* pPrint, // update page breaks - for (nTab=0; nTab<nTabCount; nTab++) - if (rMark.GetTableSelect(nTab)) - ScPrintFunc( pDocSh, pDocSh->GetPrinter(), nTab ).UpdatePages(); + itr = rMark.begin(); + for (; itr != itrEnd; ++itr) + ScPrintFunc( pDocSh, pDocSh->GetPrinter(), *itr ).UpdatePages(); SfxBindings& rBindings = GetViewData()->GetBindings(); rBindings.Invalidate( SID_DELETE_PRINTAREA ); @@ -1118,14 +1116,11 @@ sal_Bool ScViewFunc::MergeCells( sal_Bool bApi, sal_Bool& rDoContents, sal_Bool // Check for the contents of all selected tables. bool bAskDialog = false; - SCTAB nTabCount = pDoc->GetTableCount(); ScCellMergeOption aMergeOption(nStartCol, nStartRow, nEndCol, nEndRow, bCenter); - for (SCTAB i = 0; i < nTabCount; ++i) + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) { - if (!rMark.GetTableSelect(i)) - // this table is not selected. - continue; - + SCTAB i = *itr; aMergeOption.maTabs.insert(i); if (!pDoc->IsBlockEmpty(i, nStartCol, nStartRow+1, nStartCol, nEndRow) || @@ -1233,18 +1228,15 @@ sal_Bool ScViewFunc::RemoveMerge( sal_Bool bRecord ) pDoc->ExtendMerge( aExtended ); ScDocShell* pDocSh = GetViewData()->GetDocShell(); const ScMarkData& rMark = GetViewData()->GetMarkData(); - SCTAB nTabCount = pDoc->GetTableCount(); ScCellMergeOption aOption(aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row()); bool bExtended = false; do { bExtended = false; - for (SCTAB i = 0; i < nTabCount; ++i) + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) { - if (!rMark.GetTableSelect(i)) - // This table is not selected. - continue; - + SCTAB i = *itr; aOption.maTabs.insert(i); aExtended.aStart.SetTab(i); aExtended.aEnd.SetTab(i); @@ -1415,10 +1407,11 @@ void ScViewFunc::FillTab( sal_uInt16 nFlags, sal_uInt16 nFunction, sal_Bool bSki pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nTab, nTab ); - SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB i=0; i<nTabCount; i++) - if (i != nTab && rMark.GetTableSelect(i)) + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) + if (*itr != nTab ) { + SCTAB i = *itr; pUndoDoc->AddUndoTab( i, i ); aMarkRange.aStart.SetTab( i ); aMarkRange.aEnd.SetTab( i ); @@ -1624,12 +1617,8 @@ void ScViewFunc::SearchAndReplace( const SvxSearchItem* pSearchItem, } else { //! at least one is always selected - nStartTab = nEndTab = rMark.GetFirstSelected(); - for ( SCTAB j = nStartTab + 1; j <= nLastTab; j++ ) - { - if ( rMark.GetTableSelect( j ) ) - nEndTab = j; - } + nStartTab = rMark.GetFirstSelected(); + nEndTab = rMark.GetLastSelected(); } if ( nCommand == SVX_SEARCHCMD_FIND diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index c8d9123e667a..a2d3fce24d30 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -924,9 +924,9 @@ sal_Bool ScViewFunc::PasteOnDrawObject( const uno::Reference<datatransfer::XTran sal_Bool lcl_SelHasAttrib( ScDocument* pDoc, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const ScMarkData& rTabSelection, sal_uInt16 nMask ) { - SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB nTab=0; nTab<nTabCount; nTab++) - if ( rTabSelection.GetTableSelect(nTab) && pDoc->HasAttrib( nCol1, nRow1, nTab, nCol2, nRow2, nTab, nMask ) ) + ScMarkData::const_iterator itr = rTabSelection.begin(), itrEnd = rTabSelection.end(); + for (; itr != itrEnd; ++itr) + if ( pDoc->HasAttrib( nCol1, nRow1, *itr, nCol2, nRow2, *itr, nMask ) ) return sal_True; return false; } @@ -959,13 +959,10 @@ private: bool lcl_checkDestRangeForOverwrite(const ScRange& rDestRange, const ScDocument* pDoc, const ScMarkData& rMark, Window* pParentWnd) { bool bIsEmpty = true; - SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB nTab=0; nTab < nTabCount && bIsEmpty; ++nTab) + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && bIsEmpty; ++itr) { - if (!rMark.GetTableSelect(nTab)) - continue; - - bIsEmpty = pDoc->IsBlockEmpty(nTab, rDestRange.aStart.Col(), rDestRange.aStart.Row(), + bIsEmpty = pDoc->IsBlockEmpty(*itr, rDestRange.aStart.Col(), rDestRange.aStart.Row(), rDestRange.aEnd.Col(), rDestRange.aEnd.Row()); } @@ -1732,7 +1729,6 @@ void ScViewFunc::PostPasteFromClip(const ScRange& rPasteRange, const ScMarkData& { ScViewData* pViewData = GetViewData(); ScDocShell* pDocSh = pViewData->GetDocShell(); - ScDocument* pDoc = pViewData->GetDocument(); pDocSh->UpdateOle(pViewData); SelectionChanged(); @@ -1742,16 +1738,13 @@ void ScViewFunc::PostPasteFromClip(const ScRange& rPasteRange, const ScMarkData& if ( pModelObj && pModelObj->HasChangesListeners() ) { ScRangeList aChangeRanges; - SCTAB nTabCount = pDoc->GetTableCount(); - for ( SCTAB i = 0; i < nTabCount; ++i ) + ScMarkData::const_iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) { - if ( rMark.GetTableSelect( i ) ) - { - ScRange aChangeRange(rPasteRange); - aChangeRange.aStart.SetTab( i ); - aChangeRange.aEnd.SetTab( i ); - aChangeRanges.Append( aChangeRange ); - } + ScRange aChangeRange(rPasteRange); + aChangeRange.aStart.SetTab( *itr ); + aChangeRange.aEnd.SetTab( *itr ); + aChangeRanges.Append( aChangeRange ); } pModelObj->NotifyChanges( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "cell-change" ) ), aChangeRanges ); } diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index 17523bcab9d3..e0e4ee3bd537 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -227,9 +227,10 @@ void ScViewFunc::DoRefConversion( sal_Bool bRecord ) if ( rMark.GetSelectCount() > 1 ) { - for (SCTAB i=0; i<nTabCount; i++) - if ( rMark.GetTableSelect(i) && i != nTab ) - pUndoDoc->AddUndoTab( i, i ); + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) + if ( *itr != nTab ) + pUndoDoc->AddUndoTab( *itr, *itr ); } ScRange aCopyRange = aMarkRange; aCopyRange.aStart.SetTab(0); @@ -241,41 +242,40 @@ void ScViewFunc::DoRefConversion( sal_Bool bRecord ) GetViewData()->GetMultiArea( xRanges ); size_t nCount = xRanges->size(); - for (SCTAB i=0; i<nTabCount; i++) + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) { - if (rMark.GetTableSelect(i)) + SCTAB i = *itr; + for (size_t j = 0; j < nCount; ++j) { - for (size_t j = 0; j < nCount; ++j) + ScRange aRange = *(*xRanges)[j]; + aRange.aStart.SetTab(i); + aRange.aEnd.SetTab(i); + ScCellIterator aIter( pDoc, aRange ); + ScBaseCell* pCell = aIter.GetFirst(); + while ( pCell ) { - ScRange aRange = *(*xRanges)[j]; - aRange.aStart.SetTab(i); - aRange.aEnd.SetTab(i); - ScCellIterator aIter( pDoc, aRange ); - ScBaseCell* pCell = aIter.GetFirst(); - while ( pCell ) + if (pCell->GetCellType() == CELLTYPE_FORMULA) { - if (pCell->GetCellType() == CELLTYPE_FORMULA) + String aOld; + ((ScFormulaCell*)pCell)->GetFormula(aOld); + xub_StrLen nLen = aOld.Len(); + ScRefFinder aFinder( aOld, aIter.GetPos(), pDoc, pDoc->GetAddressConvention() ); + aFinder.ToggleRel( 0, nLen ); + if (aFinder.GetFound()) { - String aOld; - ((ScFormulaCell*)pCell)->GetFormula(aOld); - xub_StrLen nLen = aOld.Len(); - ScRefFinder aFinder( aOld, aIter.GetPos(), pDoc, pDoc->GetAddressConvention() ); - aFinder.ToggleRel( 0, nLen ); - if (aFinder.GetFound()) - { - ScAddress aPos = ((ScFormulaCell*)pCell)->aPos; - String aNew = aFinder.GetText(); - ScCompiler aComp( pDoc, aPos); - aComp.SetGrammar(pDoc->GetGrammar()); - ScTokenArray* pArr = aComp.CompileString( aNew ); - ScFormulaCell* pNewCell = new ScFormulaCell( pDoc, aPos, - pArr,formula::FormulaGrammar::GRAM_DEFAULT, MM_NONE ); - pDoc->PutCell( aPos, pNewCell ); - bOk = sal_True; - } + ScAddress aPos = ((ScFormulaCell*)pCell)->aPos; + String aNew = aFinder.GetText(); + ScCompiler aComp( pDoc, aPos); + aComp.SetGrammar(pDoc->GetGrammar()); + ScTokenArray* pArr = aComp.CompileString( aNew ); + ScFormulaCell* pNewCell = new ScFormulaCell( pDoc, aPos, + pArr,formula::FormulaGrammar::GRAM_DEFAULT, MM_NONE ); + pDoc->PutCell( aPos, pNewCell ); + bOk = sal_True; } - pCell = aIter.GetNext(); } + pCell = aIter.GetNext(); } } } @@ -287,9 +287,10 @@ void ScViewFunc::DoRefConversion( sal_Bool bRecord ) if ( rMark.GetSelectCount() > 1 ) { - for (SCTAB i=0; i<nTabCount; i++) - if ( rMark.GetTableSelect(i) && i != nTab ) - pRedoDoc->AddUndoTab( i, i ); + itr = rMark.begin(); + for (; itr != itrEnd; ++itr) + if ( *itr != nTab ) + pRedoDoc->AddUndoTab( *itr, *itr ); } ScRange aCopyRange = aMarkRange; aCopyRange.aStart.SetTab(0); @@ -518,12 +519,12 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, sal_Boo if ( rMark.GetSelectCount() > 1 ) { - SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB i=0; i<nTabCount; i++) - if ( rMark.GetTableSelect(i) && i != nTab ) + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) + if ( *itr != nTab ) { - pUndoDoc->AddUndoTab( i, i ); - pRedoDoc->AddUndoTab( i, i ); + pUndoDoc->AddUndoTab( *itr, *itr ); + pRedoDoc->AddUndoTab( *itr, *itr ); } } } diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 2f02565f0d0c..8e49287fb3be 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -360,7 +360,6 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS { ScDocument* pDoc = GetViewData()->GetDocument(); ScMarkData& rMark = GetViewData()->GetMarkData(); - SCTAB nTabCount = pDoc->GetTableCount(); SCTAB nSelCount = rMark.GetSelectCount(); SCTAB i; if (bRecord && !pDoc->IsUndoEnabled()) @@ -389,42 +388,43 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS pTabs = new SCTAB[nSelCount]; nUndoPos = 0; - for (i=0; i<nTabCount; i++) - if (rMark.GetTableSelect(i)) + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) + { + i = *itr; + pTabs[nUndoPos] = i; + ScBaseCell* pDocCell; + pDoc->GetCell( nCol, nRow, i, pDocCell ); + if ( pDocCell ) { - pTabs[nUndoPos] = i; - ScBaseCell* pDocCell; - pDoc->GetCell( nCol, nRow, i, pDocCell ); - if ( pDocCell ) - { - ppOldCells[nUndoPos] = pDocCell->CloneWithoutNote( *pDoc ); - if ( pDocCell->GetCellType() == CELLTYPE_EDIT ) - bEditDeleted = sal_True; - - sal_uInt8 nDocScript = pDoc->GetScriptType( nCol, nRow, i, pDocCell ); - if ( nOldScript == 0 ) - nOldScript = nDocScript; - else if ( nDocScript != nOldScript ) - bEditDeleted = sal_True; - } - else - { - ppOldCells[nUndoPos] = NULL; - } - - const SfxPoolItem* pItem; - const ScPatternAttr* pPattern = pDoc->GetPattern(nCol, nRow, i); - if ( SFX_ITEM_SET == pPattern->GetItemSet().GetItemState( - ATTR_VALUE_FORMAT,false,&pItem) ) - { - pHasFormat[nUndoPos] = sal_True; - pOldFormats[nUndoPos] = ((const SfxUInt32Item*)pItem)->GetValue(); - } - else - pHasFormat[nUndoPos] = false; + ppOldCells[nUndoPos] = pDocCell->CloneWithoutNote( *pDoc ); + if ( pDocCell->GetCellType() == CELLTYPE_EDIT ) + bEditDeleted = sal_True; + + sal_uInt8 nDocScript = pDoc->GetScriptType( nCol, nRow, i, pDocCell ); + if ( nOldScript == 0 ) + nOldScript = nDocScript; + else if ( nDocScript != nOldScript ) + bEditDeleted = sal_True; + } + else + { + ppOldCells[nUndoPos] = NULL; + } - ++nUndoPos; + const SfxPoolItem* pItem; + const ScPatternAttr* pPattern = pDoc->GetPattern(nCol, nRow, i); + if ( SFX_ITEM_SET == pPattern->GetItemSet().GetItemState( + ATTR_VALUE_FORMAT,false,&pItem) ) + { + pHasFormat[nUndoPos] = sal_True; + pOldFormats[nUndoPos] = ((const SfxUInt32Item*)pItem)->GetValue(); } + else + pHasFormat[nUndoPos] = false; + + ++nUndoPos; + } OSL_ENSURE( nUndoPos==nSelCount, "nUndoPos!=nSelCount" ); @@ -472,9 +472,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS sal_Bool bNumFmtChanged = false; if ( bFormula ) { // Formel, compile mit AutoCorrection - for (i=0; i<nTabCount; i++) - if (rMark.GetTableSelect(i)) - break; + i = rMark.GetFirstSelected(); ScAddress aPos( nCol, nRow, i ); ScCompiler aComp( pDoc, aPos); aComp.SetGrammar(pDoc->GetGrammar()); @@ -585,63 +583,61 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS delete pArr; sal_Bool bAutoCalc = pDoc->GetAutoCalc(); SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); - for ( ; i<nTabCount; i++) + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) { - if (rMark.GetTableSelect(i)) + i = *itr; + aPos.SetTab( i ); + sal_uLong nIndex = (sal_uLong) ((SfxUInt32Item*) pDoc->GetAttr( + nCol, nRow, i, ATTR_VALUE_FORMAT ))->GetValue(); + if ( pFormatter->GetType( nIndex ) == NUMBERFORMAT_TEXT || + ( ( rString.GetChar(0) == '+' || rString.GetChar(0) == '-' ) && nError && rString.Equals( aFormula ) ) ) { - aPos.SetTab( i ); - sal_uLong nIndex = (sal_uLong) ((SfxUInt32Item*) pDoc->GetAttr( - nCol, nRow, i, ATTR_VALUE_FORMAT ))->GetValue(); - if ( pFormatter->GetType( nIndex ) == NUMBERFORMAT_TEXT || - ( ( rString.GetChar(0) == '+' || rString.GetChar(0) == '-' ) && nError && rString.Equals( aFormula ) ) ) + if ( pData ) { - if ( pData ) - { - ScEditCell* pCell = new ScEditCell( pData, pDoc, NULL ); - pDoc->PutCell( aPos, pCell ); - } - else - { - ScStringCell* pCell = new ScStringCell( aFormula ); - pDoc->PutCell( aPos, pCell ); - } + ScEditCell* pCell = new ScEditCell( pData, pDoc, NULL ); + pDoc->PutCell( aPos, pCell ); } else { - DELETEZ(pUndoData); - ScFormulaCell* pCell = new ScFormulaCell( aCell, *pDoc, aPos ); - if ( nError ) - { - pCell->GetCode()->DelRPN(); - pCell->SetErrCode( nError ); - if(pCell->GetCode()->IsHyperLink()) - pCell->GetCode()->SetHyperLink(false); - } + ScStringCell* pCell = new ScStringCell( aFormula ); pDoc->PutCell( aPos, pCell ); - if ( !bAutoCalc ) - { // einmal nur die Zelle berechnen und wieder dirty setzen - pCell->Interpret(); - pCell->SetDirtyVar(); - pDoc->PutInFormulaTree( pCell ); - } } - + } + else + { + DELETEZ(pUndoData); + ScFormulaCell* pCell = new ScFormulaCell( aCell, *pDoc, aPos ); + if ( nError ) + { + pCell->GetCode()->DelRPN(); + pCell->SetErrCode( nError ); + if(pCell->GetCode()->IsHyperLink()) + pCell->GetCode()->SetHyperLink(false); + } + pDoc->PutCell( aPos, pCell ); + if ( !bAutoCalc ) + { // einmal nur die Zelle berechnen und wieder dirty setzen + pCell->Interpret(); + pCell->SetDirtyVar(); + pDoc->PutInFormulaTree( pCell ); + } } } } else { - for (i=0; i<nTabCount; i++) - if (rMark.GetTableSelect(i)) - if (pDoc->SetString( nCol, nRow, i, rString )) - bNumFmtChanged = sal_True; + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) + if (pDoc->SetString( nCol, nRow, *itr, rString )) + bNumFmtChanged = true; } // row height must be changed if new text has a different script type - for (i=0; i<nTabCount && !bEditDeleted; i++) - if (rMark.GetTableSelect(i)) - if ( pDoc->GetScriptType( nCol, nRow, i ) != nOldScript ) - bEditDeleted = sal_True; + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd && !bEditDeleted; ++itr) + if ( pDoc->GetScriptType( nCol, nRow, *itr ) != nOldScript ) + bEditDeleted = true; HideAllCursors(); @@ -660,9 +656,9 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS rString, pUndoData ) ); } - for (i=0; i<nTabCount; i++) - if (rMark.GetTableSelect(i)) - pDocSh->PostPaintCell( nCol, nRow, i ); + itr = rMark.begin(); + for (; itr != itrEnd; ++itr) + pDocSh->PostPaintCell( nCol, nRow, *itr ); ShowAllCursors(); @@ -673,12 +669,10 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rS if ( pModelObj && pModelObj->HasChangesListeners() ) { ScRangeList aChangeRanges; - for ( i = 0; i < nTabCount; ++i ) + itr = rMark.begin(); + for (; itr != itrEnd; ++itr) { - if ( rMark.GetTableSelect( i ) ) - { - aChangeRanges.Append( ScRange( nCol, nRow, i ) ); - } + aChangeRanges.Append( ScRange( nCol, nRow, *itr ) ); } pModelObj->NotifyChanges( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "cell-change" ) ), aChangeRanges ); } @@ -793,9 +787,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextOb // Undo // - SCTAB nTabCount = pDoc->GetTableCount(); SCTAB nSelCount = rMark.GetSelectCount(); - SCTAB i; ScBaseCell** ppOldCells = NULL; SCTAB* pTabs = NULL; SCTAB nPos = 0; @@ -806,15 +798,15 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextOb pTabs = new SCTAB[nSelCount]; nPos = 0; - for (i=0; i<nTabCount; i++) - if (rMark.GetTableSelect(i)) - { - pTabs[nPos] = i; - ScBaseCell* pDocCell; - pDoc->GetCell( nCol, nRow, i, pDocCell ); - ppOldCells[nPos] = pDocCell ? pDocCell->CloneWithoutNote( *pDoc ) : 0; - ++nPos; - } + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) + { + pTabs[nPos] = *itr; + ScBaseCell* pDocCell; + pDoc->GetCell( nCol, nRow, *itr, pDocCell ); + ppOldCells[nPos] = pDocCell ? pDocCell->CloneWithoutNote( *pDoc ) : 0; + ++nPos; + } OSL_ENSURE( nPos==nSelCount, "nPos!=nSelCount" ); @@ -837,9 +829,9 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextOb } else { - for (i=0; i<nTabCount; i++) - if (rMark.GetTableSelect(i)) - pDoc->PutCell( nCol, nRow, i, new ScEditCell( pData, pDoc, NULL ) ); + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) + pDoc->PutCell( nCol, nRow, *itr, new ScEditCell( pData, pDoc, NULL ) ); if ( bRecord ) { // wg. ChangeTrack erst jetzt @@ -853,9 +845,9 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextOb AdjustRowHeight(nRow,nRow); - for (i=0; i<nTabCount; i++) - if (rMark.GetTableSelect(i)) - pDocSh->PostPaintCell( nCol, nRow, i ); + itr = rMark.begin(); + for (; itr != itrEnd; ++itr) + pDocSh->PostPaintCell( nCol, nRow, *itr ); ShowAllCursors(); @@ -866,12 +858,10 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, const EditTextOb if ( pModelObj && pModelObj->HasChangesListeners() ) { ScRangeList aChangeRanges; - for ( i = 0; i < nTabCount; ++i ) + itr = rMark.begin(); + for (; itr != itrEnd; ++itr) { - if ( rMark.GetTableSelect( i ) ) - { - aChangeRanges.Append( ScRange( nCol, nRow, i ) ); - } + aChangeRanges.Append( ScRange( nCol, nRow, *itr ) ); } pModelObj->NotifyChanges( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "cell-change" ) ), aChangeRanges ); } @@ -1220,9 +1210,10 @@ void ScViewFunc::ApplyPatternLines( const ScPatternAttr& rAttr, const SvxBoxItem SCTAB nStartTab = aMarkRange.aStart.Tab(); SCTAB nTabCount = pDoc->GetTableCount(); pUndoDoc->InitUndo( pDoc, nStartTab, nStartTab ); - for (SCTAB i=0; i<nTabCount; i++) - if (i != nStartTab && aFuncMark.GetTableSelect(i)) - pUndoDoc->AddUndoTab( i, i ); + ScMarkData::iterator itr = aFuncMark.begin(), itrEnd = aFuncMark.end(); + for (; itr != itrEnd; ++itr) + if (*itr != nStartTab) + pUndoDoc->AddUndoTab( *itr, *itr ); ScRange aCopyRange = aMarkRange; aCopyRange.aStart.SetTab(0); @@ -1305,15 +1296,13 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, ScRange aMarkRange; aFuncMark.GetMultiMarkArea( aMarkRange ); SCTAB nTabCount = pDoc->GetTableCount(); - for ( SCTAB i = 0; i < nTabCount; ++i ) + ScMarkData::iterator itr = aFuncMark.begin(), itrEnd = aFuncMark.end(); + for (; itr != itrEnd; ++itr) { - if ( aFuncMark.GetTableSelect( i ) ) - { - ScRange aChangeRange( aMarkRange ); - aChangeRange.aStart.SetTab( i ); - aChangeRange.aEnd.SetTab( i ); - aChangeRanges.Append( aChangeRange ); - } + ScRange aChangeRange( aMarkRange ); + aChangeRange.aStart.SetTab( *itr ); + aChangeRange.aEnd.SetTab( *itr ); + aChangeRanges.Append( aChangeRange ); } SCCOL nStartCol = aMarkRange.aStart.Col(); @@ -1333,9 +1322,10 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr, ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nStartTab, nStartTab ); - for (SCTAB i=0; i<nTabCount; i++) - if (i != nStartTab && aFuncMark.GetTableSelect(i)) - pUndoDoc->AddUndoTab( i, i ); + itr = aFuncMark.begin(); + for (; itr != itrEnd; ++itr) + if (*itr != nStartTab) + pUndoDoc->AddUndoTab( *itr, *itr ); pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, bMulti, pUndoDoc, &aFuncMark ); aFuncMark.MarkToMulti(); @@ -1505,9 +1495,10 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, sal_Bool bRe SCTAB nTab = pViewData->GetTabNo(); ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nTab, nTab ); - for (SCTAB i=0; i<nTabCount; i++) - if (i != nTab && aFuncMark.GetTableSelect(i)) - pUndoDoc->AddUndoTab( i, i ); + ScMarkData::iterator itr = aFuncMark.begin(), itrEnd = aFuncMark.end(); + for (; itr != itrEnd; ++itr) + if (*itr != nTab) + pUndoDoc->AddUndoTab( *itr, *itr ); ScRange aCopyRange = aMarkRange; aCopyRange.aStart.SetTab(0); @@ -1537,9 +1528,10 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, sal_Bool bRe { ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nTab, nTab ); - for (SCTAB i=0; i<nTabCount; i++) - if (i != nTab && aFuncMark.GetTableSelect(i)) - pUndoDoc->AddUndoTab( i, i ); + ScMarkData::iterator itr = aFuncMark.begin(), itrEnd = aFuncMark.end(); + for (; itr != itrEnd; ++itr) + if (*itr != nTab) + pUndoDoc->AddUndoTab( *itr, *itr ); ScRange aCopyRange( nCol, nRow, 0, nCol, nRow, nTabCount-1 ); pDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, false, pUndoDoc ); @@ -1553,9 +1545,10 @@ void ScViewFunc::SetStyleSheetToMarked( SfxStyleSheet* pStyleSheet, sal_Bool bRe new ScUndoSelectionStyle( pDocSh, aUndoMark, aMarkRange, aName, pUndoDoc ) ); } - for (SCTAB i=0; i<nTabCount; i++) - if (aFuncMark.GetTableSelect(i)) - pDoc->ApplyStyle( nCol, nRow, i, (ScStyleSheet&)*pStyleSheet ); + ScMarkData::iterator itr = aFuncMark.begin(), itrEnd = aFuncMark.end(); + for (; itr != itrEnd; ++itr) + if (*itr != nTab) + pDoc->ApplyStyle( nCol, nRow, *itr, (ScStyleSheet&)*pStyleSheet ); if (!AdjustBlockHeight()) pViewData->GetDocShell()->PostPaintCell( nCol, nRow, nTab ); @@ -1985,9 +1978,9 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord ) if ( nFlags & IDF_OBJECTS ) { bObjects = sal_True; - SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB nTab=0; nTab<nTabCount; nTab++) - if (aFuncMark.GetTableSelect(nTab) && pDoc->IsTabProtected(nTab)) + ScMarkData::iterator itr = aFuncMark.begin(), itrEnd = aFuncMark.end(); + for (; itr != itrEnd; ++itr) + if (pDoc->IsTabProtected(*itr)) bObjects = false; } @@ -2022,9 +2015,10 @@ void ScViewFunc::DeleteContents( sal_uInt16 nFlags, sal_Bool bRecord ) SCTAB nTab = aMarkRange.aStart.Tab(); pUndoDoc->InitUndo( pDoc, nTab, nTab ); SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB i=0; i<nTabCount; i++) - if (i != nTab && aFuncMark.GetTableSelect(i)) - pUndoDoc->AddUndoTab( i, i ); + ScMarkData::iterator itr = aFuncMark.begin(), itrEnd = aFuncMark.end(); + for (; itr != itrEnd; ++itr) + if (*itr != nTab) + pUndoDoc->AddUndoTab( *itr, *itr ); ScRange aCopyRange = aExtendedRange; aCopyRange.aStart.SetTab(0); aCopyRange.aEnd.SetTab(nTabCount-1); @@ -2109,7 +2103,6 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW ScDocShell* pDocSh = GetViewData()->GetDocShell(); ScDocument* pDoc = pDocSh->GetDocument(); - SCTAB nTabCount = pDoc->GetTableCount(); SCTAB nFirstTab = pMarkData->GetFirstSelected(); SCTAB nCurTab = GetViewData()->GetTabNo(); SCTAB nTab; @@ -2119,22 +2112,20 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW ScDocShellModificator aModificator( *pDocSh ); sal_Bool bAllowed = sal_True; - for (nTab=0; nTab<nTabCount && bAllowed; nTab++) - if (pMarkData->GetTableSelect(nTab)) + ScMarkData::iterator itr = pMarkData->begin(), itrEnd = pMarkData->end(); + for (; itr != itrEnd && bAllowed; ++itr) + for ( SCCOLROW i=0; i<nRangeCnt && bAllowed; i++ ) { - for ( SCCOLROW i=0; i<nRangeCnt && bAllowed; i++ ) - { - sal_Bool bOnlyMatrix; - if (bWidth) - bAllowed = pDoc->IsBlockEditable( nTab, - static_cast<SCCOL>(pRanges[2*i]),0, - static_cast<SCCOL>(pRanges[2*i+1]),MAXROW, - &bOnlyMatrix ) || bOnlyMatrix; - else - bAllowed = pDoc->IsBlockEditable( nTab, 0,pRanges[2*i], - MAXCOL,pRanges[2*i+1], &bOnlyMatrix ) || - bOnlyMatrix; - } + sal_Bool bOnlyMatrix; + if (bWidth) + bAllowed = pDoc->IsBlockEditable( *itr, + static_cast<SCCOL>(pRanges[2*i]),0, + static_cast<SCCOL>(pRanges[2*i+1]),MAXROW, + &bOnlyMatrix ) || bOnlyMatrix; + else + bAllowed = pDoc->IsBlockEditable( *itr, 0,pRanges[2*i], + MAXCOL,pRanges[2*i+1], &bOnlyMatrix ) || + bOnlyMatrix; } // Allow users to resize cols/rows in readonly docs despite the r/o state. @@ -2164,28 +2155,28 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW pDoc->BeginDrawUndo(); // Drawing Updates pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - for (nTab=0; nTab<nTabCount; nTab++) - if (pMarkData->GetTableSelect(nTab)) + itr = pMarkData->begin(); + for (; itr != itrEnd; ++itr) + { + if (bWidth) { - if (bWidth) - { - if ( nTab == nFirstTab ) - pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, false ); - else - pUndoDoc->AddUndoTab( nTab, nTab, sal_True, false ); - pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab, - static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, - false, pUndoDoc ); - } + if ( *itr == nFirstTab ) + pUndoDoc->InitUndo( pDoc, *itr, *itr, true, false ); else - { - if ( nTab == nFirstTab ) - pUndoDoc->InitUndo( pDoc, nTab, nTab, false, sal_True ); - else - pUndoDoc->AddUndoTab( nTab, nTab, false, sal_True ); - pDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pUndoDoc ); - } + pUndoDoc->AddUndoTab( *itr, *itr, true, false ); + pDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, *itr, + static_cast<SCCOL>(nEnd), MAXROW, *itr, IDF_NONE, + false, pUndoDoc ); + } + else + { + if ( *itr == nFirstTab ) + pUndoDoc->InitUndo( pDoc, *itr, *itr, false, true ); + else + pUndoDoc->AddUndoTab( *itr, *itr, false, true ); + pDoc->CopyToDocument( 0, nStart, *itr, MAXCOL, nEnd, *itr, IDF_NONE, false, pUndoDoc ); } + } pUndoRanges = new SCCOLROW[ 2*nRangeCnt ]; memmove( pUndoRanges, pRanges, 2*nRangeCnt*sizeof(SCCOLROW) ); @@ -2202,110 +2193,111 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW sal_Bool bShow = nSizeTwips > 0 || eMode != SC_SIZE_DIRECT; sal_Bool bOutline = false; - for (nTab=0; nTab<nTabCount; nTab++) - if (pMarkData->GetTableSelect(nTab)) + itr = pMarkData->begin(); + for (; itr != itrEnd; ++itr) + { + nTab = *itr; + const SCCOLROW* pTabRanges = pRanges; + + pDoc->InitializeNoteCaptions( nTab ); + for (SCCOLROW nRangeNo=0; nRangeNo<nRangeCnt; nRangeNo++) { - const SCCOLROW* pTabRanges = pRanges; + SCCOLROW nStartNo = *(pTabRanges++); + SCCOLROW nEndNo = *(pTabRanges++); - pDoc->InitializeNoteCaptions( nTab ); - for (SCCOLROW nRangeNo=0; nRangeNo<nRangeCnt; nRangeNo++) + if ( !bWidth ) // Hoehen immer blockweise { - SCCOLROW nStartNo = *(pTabRanges++); - SCCOLROW nEndNo = *(pTabRanges++); - - if ( !bWidth ) // Hoehen immer blockweise + if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT ) { - if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT ) + sal_Bool bAll = ( eMode==SC_SIZE_OPTIMAL ); + if (!bAll) { - sal_Bool bAll = ( eMode==SC_SIZE_OPTIMAL ); - if (!bAll) + // fuer alle eingeblendeten CR_MANUALSIZE loeschen, + // dann SetOptimalHeight mit bShrink = FALSE + for (SCROW nRow = nStartNo; nRow <= nEndNo; ++nRow) { - // fuer alle eingeblendeten CR_MANUALSIZE loeschen, - // dann SetOptimalHeight mit bShrink = FALSE - for (SCROW nRow = nStartNo; nRow <= nEndNo; ++nRow) + SCROW nLastRow = nRow; + if (pDoc->RowHidden(nRow, nTab, NULL, &nLastRow)) { - SCROW nLastRow = nRow; - if (pDoc->RowHidden(nRow, nTab, NULL, &nLastRow)) - { - nRow = nLastRow; - continue; - } - - sal_uInt8 nOld = pDoc->GetRowFlags(nRow, nTab); - if (nOld & CR_MANUALSIZE) - pDoc->SetRowFlags(nRow, nTab, nOld & ~CR_MANUALSIZE); + nRow = nLastRow; + continue; } - } - - double nPPTX = GetViewData()->GetPPTX(); - double nPPTY = GetViewData()->GetPPTY(); - Fraction aZoomX = GetViewData()->GetZoomX(); - Fraction aZoomY = GetViewData()->GetZoomY(); - ScSizeDeviceProvider aProv(pDocSh); - if (aProv.IsPrinter()) - { - nPPTX = aProv.GetPPTX(); - nPPTY = aProv.GetPPTY(); - aZoomX = aZoomY = Fraction( 1, 1 ); + sal_uInt8 nOld = pDoc->GetRowFlags(nRow, nTab); + if (nOld & CR_MANUALSIZE) + pDoc->SetRowFlags(nRow, nTab, nOld & ~CR_MANUALSIZE); } + } - pDoc->SetOptimalHeight( nStartNo, nEndNo, nTab, nSizeTwips, aProv.GetDevice(), - nPPTX, nPPTY, aZoomX, aZoomY, bAll ); - if (bAll) - pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True ); + double nPPTX = GetViewData()->GetPPTX(); + double nPPTY = GetViewData()->GetPPTY(); + Fraction aZoomX = GetViewData()->GetZoomX(); + Fraction aZoomY = GetViewData()->GetZoomY(); - // Manual-Flag wird bei bAll=sal_True schon in SetOptimalHeight gesetzt - // (an bei Extra-Height, sonst aus). - } - else if ( eMode==SC_SIZE_DIRECT ) + ScSizeDeviceProvider aProv(pDocSh); + if (aProv.IsPrinter()) { - if (nSizeTwips) - { - pDoc->SetRowHeightRange( nStartNo, nEndNo, nTab, nSizeTwips ); - pDoc->SetManualHeight( nStartNo, nEndNo, nTab, sal_True ); // height was set manually - } - pDoc->ShowRows( nStartNo, nEndNo, nTab, nSizeTwips != 0 ); + nPPTX = aProv.GetPPTX(); + nPPTY = aProv.GetPPTY(); + aZoomX = aZoomY = Fraction( 1, 1 ); } - else if ( eMode==SC_SIZE_SHOW ) - { + + pDoc->SetOptimalHeight( nStartNo, nEndNo, nTab, nSizeTwips, aProv.GetDevice(), + nPPTX, nPPTY, aZoomX, aZoomY, bAll ); + if (bAll) pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True ); + + // Manual-Flag wird bei bAll=sal_True schon in SetOptimalHeight gesetzt + // (an bei Extra-Height, sonst aus). + } + else if ( eMode==SC_SIZE_DIRECT ) + { + if (nSizeTwips) + { + pDoc->SetRowHeightRange( nStartNo, nEndNo, nTab, nSizeTwips ); + pDoc->SetManualHeight( nStartNo, nEndNo, nTab, sal_True ); // height was set manually } + pDoc->ShowRows( nStartNo, nEndNo, nTab, nSizeTwips != 0 ); } - else // Spaltenbreiten + else if ( eMode==SC_SIZE_SHOW ) { - for (SCCOL nCol=static_cast<SCCOL>(nStartNo); nCol<=static_cast<SCCOL>(nEndNo); nCol++) + pDoc->ShowRows( nStartNo, nEndNo, nTab, sal_True ); + } + } + else // Spaltenbreiten + { + for (SCCOL nCol=static_cast<SCCOL>(nStartNo); nCol<=static_cast<SCCOL>(nEndNo); nCol++) + { + if ( eMode != SC_SIZE_VISOPT || !pDoc->ColHidden(nCol, nTab) ) { - if ( eMode != SC_SIZE_VISOPT || !pDoc->ColHidden(nCol, nTab) ) - { - sal_uInt16 nThisSize = nSizeTwips; + sal_uInt16 nThisSize = nSizeTwips; - if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT ) - nThisSize = nSizeTwips + GetOptimalColWidth( nCol, nTab, bFormula ); - if ( nThisSize ) - pDoc->SetColWidth( nCol, nTab, nThisSize ); + if ( eMode==SC_SIZE_OPTIMAL || eMode==SC_SIZE_VISOPT ) + nThisSize = nSizeTwips + GetOptimalColWidth( nCol, nTab, bFormula ); + if ( nThisSize ) + pDoc->SetColWidth( nCol, nTab, nThisSize ); - pDoc->ShowCol( nCol, nTab, bShow ); - } + pDoc->ShowCol( nCol, nTab, bShow ); } } + } // Outline anpassen - if (bWidth) - { - if ( pDoc->UpdateOutlineCol( static_cast<SCCOL>(nStartNo), - static_cast<SCCOL>(nEndNo), nTab, bShow ) ) - bOutline = sal_True; - } - else - { - if ( pDoc->UpdateOutlineRow( nStartNo, nEndNo, nTab, bShow ) ) - bOutline = sal_True; - } + if (bWidth) + { + if ( pDoc->UpdateOutlineCol( static_cast<SCCOL>(nStartNo), + static_cast<SCCOL>(nEndNo), nTab, bShow ) ) + bOutline = sal_True; + } + else + { + if ( pDoc->UpdateOutlineRow( nStartNo, nEndNo, nTab, bShow ) ) + bOutline = sal_True; } - pDoc->SetDrawPageSize(nTab); } + pDoc->SetDrawPageSize(nTab); + } if (!bOutline) @@ -2320,9 +2312,9 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW pUndoTab, eMode, nSizeTwips, bWidth ) ); } - for (nTab=0; nTab<nTabCount; nTab++) - if (pMarkData->GetTableSelect(nTab)) - pDoc->UpdatePageBreaks( nTab ); + itr = pMarkData->begin(); + for (; itr != itrEnd; ++itr) + pDoc->UpdatePageBreaks( *itr ); GetViewData()->GetView()->UpdateScrollBars(); @@ -2330,29 +2322,30 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW { HideCursor(); - for (nTab=0; nTab<nTabCount; nTab++) - if (pMarkData->GetTableSelect(nTab)) + itr = pMarkData->begin(); + for (; itr != itrEnd; ++itr) + { + nTab = *itr; + if (bWidth) { - if (bWidth) - { - if (pDoc->HasAttrib( static_cast<SCCOL>(nStart),0,nTab, - static_cast<SCCOL>(nEnd),MAXROW,nTab, - HASATTR_MERGED | HASATTR_OVERLAPPED )) - nStart = 0; - if (nStart > 0) // weiter oben anfangen wegen Linien und Cursor - --nStart; - pDocSh->PostPaint( static_cast<SCCOL>(nStart), 0, nTab, - MAXCOL, MAXROW, nTab, PAINT_GRID | PAINT_TOP ); - } - else - { - if (pDoc->HasAttrib( 0,nStart,nTab, MAXCOL,nEnd,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED )) - nStart = 0; - if (nStart != 0) - --nStart; - pDocSh->PostPaint( 0, nStart, nTab, MAXCOL, MAXROW, nTab, PAINT_GRID | PAINT_LEFT ); - } + if (pDoc->HasAttrib( static_cast<SCCOL>(nStart),0,nTab, + static_cast<SCCOL>(nEnd),MAXROW,nTab, + HASATTR_MERGED | HASATTR_OVERLAPPED )) + nStart = 0; + if (nStart > 0) // weiter oben anfangen wegen Linien und Cursor + --nStart; + pDocSh->PostPaint( static_cast<SCCOL>(nStart), 0, nTab, + MAXCOL, MAXROW, nTab, PAINT_GRID | PAINT_TOP ); } + else + { + if (pDoc->HasAttrib( 0,nStart,nTab, MAXCOL,nEnd,nTab, HASATTR_MERGED | HASATTR_OVERLAPPED )) + nStart = 0; + if (nStart != 0) + --nStart; + pDocSh->PostPaint( 0, nStart, nTab, MAXCOL, MAXROW, nTab, PAINT_GRID | PAINT_LEFT ); + } + } pDocSh->UpdateOle(GetViewData()); if( !pDocSh->IsReadOnly() ) @@ -2368,19 +2361,18 @@ void ScViewFunc::SetWidthOrHeight( sal_Bool bWidth, SCCOLROW nRangeCnt, SCCOLROW if ( pModelObj && pModelObj->HasChangesListeners() ) { ScRangeList aChangeRanges; - for ( nTab = 0; nTab < nTabCount; ++nTab ) + itr = pMarkData->begin(); + for (; itr != itrEnd; ++itr) { - if ( pMarkData->GetTableSelect( nTab ) ) + nTab = *itr; + const SCCOLROW* pTabRanges = pRanges; + for ( SCCOLROW nRange = 0; nRange < nRangeCnt; ++nRange ) { - const SCCOLROW* pTabRanges = pRanges; - for ( SCCOLROW nRange = 0; nRange < nRangeCnt; ++nRange ) + SCCOL nStartCol = static_cast< SCCOL >( *(pTabRanges++) ); + SCCOL nEndCol = static_cast< SCCOL >( *(pTabRanges++) ); + for ( SCCOL nCol = nStartCol; nCol <= nEndCol; ++nCol ) { - SCCOL nStartCol = static_cast< SCCOL >( *(pTabRanges++) ); - SCCOL nEndCol = static_cast< SCCOL >( *(pTabRanges++) ); - for ( SCCOL nCol = nStartCol; nCol <= nEndCol; ++nCol ) - { - aChangeRanges.Append( ScRange( nCol, 0, nTab ) ); - } + aChangeRanges.Append( ScRange( nCol, 0, nTab ) ); } } } @@ -2583,10 +2575,9 @@ void ScViewFunc::ProtectSheet( SCTAB nTab, const ScTableProtection& rProtect ) pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo ); } - SCTAB nCount = pDocSh->GetDocument()->GetTableCount(); - for ( SCTAB i=0; i<nCount; i++ ) - if ( rMark.GetTableSelect(i) ) - aFunc.ProtectSheet(i, rProtect); + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) + aFunc.ProtectSheet(*itr, rProtect); if (bUndo) pDocSh->GetUndoManager()->LeaveListAction(); @@ -2614,10 +2605,9 @@ void ScViewFunc::Protect( SCTAB nTab, const String& rPassword ) pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo ); } - SCTAB nCount = pDocSh->GetDocument()->GetTableCount(); - for ( SCTAB i=0; i<nCount; i++ ) - if ( rMark.GetTableSelect(i) ) - aFunc.Protect( i, rPassword, false ); + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) + aFunc.Protect( *itr, rPassword, false ); if (bUndo) pDocSh->GetUndoManager()->LeaveListAction(); @@ -2647,10 +2637,9 @@ sal_Bool ScViewFunc::Unprotect( SCTAB nTab, const String& rPassword ) pDocSh->GetUndoManager()->EnterListAction( aUndo, aUndo ); } - SCTAB nCount = pDocSh->GetDocument()->GetTableCount(); - for ( SCTAB i=0; i<nCount; i++ ) - if ( rMark.GetTableSelect(i) ) - if ( aFunc.Unprotect( i, rPassword, false ) ) + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) + if ( aFunc.Unprotect( *itr, rPassword, false ) ) bChanged = sal_True; if (bUndo) diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index a7cd41fc4578..482b6743a675 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -259,24 +259,24 @@ void ScViewUtil::UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc ) SCROW nEndRow = aMultiArea.aEnd.Row(); bool bChanged = false; - SCTAB nTabCount = pDoc->GetTableCount(); - for (SCTAB nTab=0; nTab<nTabCount; nTab++) - if ( rMark.GetTableSelect(nTab ) ) + ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end(); + for (; itr != itrEnd; ++itr) + { + SCTAB nTab = *itr; + for (SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow) { - for (SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow) + SCROW nLastRow = nRow; + if (pDoc->RowFiltered(nRow, nTab, NULL, &nLastRow)) { - SCROW nLastRow = nRow; - if (pDoc->RowFiltered(nRow, nTab, NULL, &nLastRow)) - { - // use nStartCol/nEndCol, so the multi mark area isn't extended to all columns - // (visible in repaint for indentation) - rMark.SetMultiMarkArea( - ScRange(nStartCol, nRow, nTab, nEndCol, nLastRow, nTab), false); - bChanged = true; - nRow = nLastRow; - } + // use nStartCol/nEndCol, so the multi mark area isn't extended to all columns + // (visible in repaint for indentation) + rMark.SetMultiMarkArea( + ScRange(nStartCol, nRow, nTab, nEndCol, nLastRow, nTab), false); + bChanged = true; + nRow = nLastRow; } } + } if ( bChanged && !rMark.HasAnyMultiMarks() ) rMark.ResetMark(); diff --git a/sc/uiconfig/scalc/toolbar/standardbar.xml b/sc/uiconfig/scalc/toolbar/standardbar.xml index 736797153d08..cb733829f67f 100644 --- a/sc/uiconfig/scalc/toolbar/standardbar.xml +++ b/sc/uiconfig/scalc/toolbar/standardbar.xml @@ -33,7 +33,7 @@ <toolbar:toolbaritem xlink:href=".uno:InsertObjectChart" toolbar:helpid="helpid:26155"/> <toolbar:toolbaritem xlink:href=".uno:InsertDraw" toolbar:helpid="helpid:10244"/> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:helpid="helpid:5961" /> + <toolbar:toolbaritem xlink:href=".uno:SearchDialog" toolbar:helpid="helpid:5961" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:Navigator" toolbar:helpid="helpid:10366"/> <toolbar:toolbaritem xlink:href=".uno:Gallery" toolbar:helpid="helpid:5960"/> <toolbar:toolbaritem xlink:href=".uno:ViewDataSourceBrowser" toolbar:helpid="helpid:6660"/> diff --git a/sc/workben/addin.cxx b/sc/workben/addin.cxx index d05da70d39af..11b32f3a6735 100644 --- a/sc/workben/addin.cxx +++ b/sc/workben/addin.cxx @@ -63,12 +63,6 @@ SMART_UNO_IMPLEMENTATION( ScTestAddIn, UsrObject ); extern "C" { -SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, registry::XRegistryKey * pRegistryKey ) { diff --git a/sc/workben/makefile.mk b/sc/workben/makefile.mk index ba5ebbbba15e..99005c2250f8 100644 --- a/sc/workben/makefile.mk +++ b/sc/workben/makefile.mk @@ -89,7 +89,6 @@ $(MISC)$/$(SHL1TARGET).def: makefile.mk @echo DATA READ WRITE NONSHARED >>$@ .ENDIF @echo EXPORTS >>$@ - @echo component_getImplementationEnvironment @24 >>$@ @echo component_writeInfo @25 >>$@ @echo component_getFactory @26 >>$@ .ENDIF |