diff options
author | Niklas Nebel <nn@openoffice.org> | 2010-02-03 17:21:54 +0100 |
---|---|---|
committer | Niklas Nebel <nn@openoffice.org> | 2010-02-03 17:21:54 +0100 |
commit | 72bbe5092b059153f7b67fd81cd6cf49ce40fbce (patch) | |
tree | 34a2a42594169b9f3bc74a2f86a8393075d8a04a /sc/inc | |
parent | 0ef3cc16ea48abb2b997788ef98639d7ed99dd52 (diff) | |
parent | 25b005cbda460837f063ddf996c1ec72d4f4865b (diff) |
datapilotapi: merge with DEV300_m71
Diffstat (limited to 'sc/inc')
69 files changed, 897 insertions, 152 deletions
diff --git a/sc/inc/AccessibleFilterMenu.hxx b/sc/inc/AccessibleFilterMenu.hxx new file mode 100644 index 000000000000..76344a65ceda --- /dev/null +++ b/sc/inc/AccessibleFilterMenu.hxx @@ -0,0 +1,194 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleDataPilotControl.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SC_ACCESSIBLEFILTERMENU_HXX +#define SC_ACCESSIBLEFILTERMENU_HXX + +#include "AccessibleContextBase.hxx" +#include "cppuhelper/implbase1.hxx" + +#include <com/sun/star/accessibility/XAccessibleSelection.hpp> +#include <com/sun/star/accessibility/XAccessibleText.hpp> +#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp> +#include <com/sun/star/accessibility/TextSegment.hpp> + +#include <vector> + +namespace com { namespace sun { namespace star { + namespace accessibility { + struct AccessibleEventObject; + } +}}} + +class ScDocument; +class ScMenuFloatingWindow; + +typedef ::cppu::ImplHelper1< + ::com::sun::star::accessibility::XAccessibleSelection > ScAccessibleFilterMenu_BASE; + +class ScAccessibleFilterMenu : + public ScAccessibleContextBase, + public ScAccessibleFilterMenu_BASE +{ +public: + explicit ScAccessibleFilterMenu( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible>& rxParent, + ScMenuFloatingWindow* pWin, const ::rtl::OUString& rName, size_t nMenuPos, ScDocument* pDoc); + virtual ~ScAccessibleFilterMenu(); + + // XAccessibleComponent + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + SAL_CALL getAccessibleAtPoint( const ::com::sun::star::awt::Point& rPoint ) + throw (::com::sun::star::uno::RuntimeException); + + virtual sal_Bool SAL_CALL isVisible() + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL grabFocus() + throw (::com::sun::star::uno::RuntimeException); + + virtual sal_Int32 SAL_CALL getForeground() + throw (::com::sun::star::uno::RuntimeException); + + virtual sal_Int32 SAL_CALL getBackground() + throw (::com::sun::star::uno::RuntimeException); + + // XAccessibleContext + + virtual ::rtl::OUString SAL_CALL getAccessibleName() + throw (::com::sun::star::uno::RuntimeException); + + virtual sal_Int32 SAL_CALL getAccessibleChildCount() + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL + getAccessibleChild(sal_Int32 nIndex) + throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException); + + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL + getAccessibleStateSet() + throw (::com::sun::star::uno::RuntimeException); + + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + + // XAccessibleEventBroadcaster + + using ScAccessibleContextBase::addEventListener; + using ScAccessibleContextBase::removeEventListener; + + virtual void SAL_CALL + addEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleEventListener>& xListener) + throw (com::sun::star::uno::RuntimeException); + + // Remove an existing event listener. + virtual void SAL_CALL + removeEventListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleEventListener>& xListener) + throw (com::sun::star::uno::RuntimeException); + + // XAccessibleSelection + + virtual void SAL_CALL selectAccessibleChild(sal_Int32 nChildIndex) + throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + virtual sal_Bool SAL_CALL isAccessibleChildSelected(sal_Int32 nChildIndex) + throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL clearAccessibleSelection() + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL selectAllAccessibleChildren() + throw (::com::sun::star::uno::RuntimeException); + + virtual ::sal_Int32 SAL_CALL getSelectedAccessibleChildCount() + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL + getSelectedAccessibleChild(sal_Int32 nChildIndex) + throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL deselectAccessibleChild(sal_Int32 nChildIndex) + throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + // XInterface + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( + ::com::sun::star::uno::Type const & rType ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + + // XTypeProvider + + virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId() + throw (::com::sun::star::uno::RuntimeException); + + // non-UNO methods + + void appendMenuItem(const ::rtl::OUString& rName, bool bEnabled, size_t nMenuPos); + void setMenuPos(size_t nMenuPos); + void setEnabled(bool bEnabled); + +protected: + + sal_Int32 getMenuItemCount() const; + + virtual Rectangle GetBoundingBoxOnScreen() const + throw (::com::sun::star::uno::RuntimeException); + + virtual Rectangle GetBoundingBox() const + throw (::com::sun::star::uno::RuntimeException); + +private: + bool isSelected() const; + bool isFocused() const; + + void updateStates(); + +private: + ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > > maMenuItems; + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > mxStateSet; + + size_t mnMenuPos; + ScMenuFloatingWindow* mpWindow; + ScDocument* mpDoc; + + bool mbEnabled:1; +}; + +#endif diff --git a/sc/inc/AccessibleFilterMenuItem.hxx b/sc/inc/AccessibleFilterMenuItem.hxx new file mode 100644 index 000000000000..f5ad0fd5d74b --- /dev/null +++ b/sc/inc/AccessibleFilterMenuItem.hxx @@ -0,0 +1,124 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleDataPilotControl.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SC_ACCESSIBLEFILTERMENUITEM_HXX +#define SC_ACCESSIBLEFILTERMENUITEM_HXX + +#include "AccessibleContextBase.hxx" +#include "cppuhelper/implbase1.hxx" + +#include <com/sun/star/accessibility/XAccessibleAction.hpp> + +class ScMenuFloatingWindow; + +typedef ::cppu::ImplHelper1< + ::com::sun::star::accessibility::XAccessibleAction > ScAccessibleFilterMenuItem_BASE; + +class ScAccessibleFilterMenuItem : + public ScAccessibleContextBase, + public ScAccessibleFilterMenuItem_BASE +{ +public: + explicit ScAccessibleFilterMenuItem( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible>& rxParent, ScMenuFloatingWindow* pWin, const ::rtl::OUString& rName, size_t nMenuPos); + + virtual ~ScAccessibleFilterMenuItem(); + + // XAccessibleContext + + virtual sal_Int32 SAL_CALL getAccessibleChildCount() + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible > SAL_CALL + getAccessibleChild(sal_Int32 nIndex) + throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException); + + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleStateSet> SAL_CALL + getAccessibleStateSet() + throw (::com::sun::star::uno::RuntimeException); + + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + + // XAccessibleAction + + virtual ::sal_Int32 SAL_CALL getAccessibleActionCount() + throw (::com::sun::star::uno::RuntimeException); + + virtual ::sal_Bool SAL_CALL doAccessibleAction(sal_Int32 nIndex) + throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + virtual ::rtl::OUString SAL_CALL getAccessibleActionDescription(sal_Int32 nIndex) + throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessibleKeyBinding > SAL_CALL + getAccessibleActionKeyBinding(sal_Int32 nIndex) + throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); + + // XInterface + + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( + ::com::sun::star::uno::Type const & rType ) + throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL acquire() throw (); + virtual void SAL_CALL release() throw (); + + // Non-UNO Methods + + void setEnabled(bool bEnabled); + +protected: + + virtual Rectangle GetBoundingBoxOnScreen() const + throw (::com::sun::star::uno::RuntimeException); + + virtual Rectangle GetBoundingBox() const + throw (::com::sun::star::uno::RuntimeException); + +private: + bool isSelected() const; + bool isFocused() const; + void updateStateSet(); + +private: + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > mxStateSet; + + ScMenuFloatingWindow* mpWindow; + ::rtl::OUString maName; + size_t mnMenuPos; + bool mbEnabled; +}; + +#endif diff --git a/sc/inc/AccessibleFilterTopWindow.hxx b/sc/inc/AccessibleFilterTopWindow.hxx new file mode 100644 index 000000000000..e901949286a1 --- /dev/null +++ b/sc/inc/AccessibleFilterTopWindow.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleDataPilotControl.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SC_ACCESSIBLEFILTERTOPWINDOW_HXX +#define SC_ACCESSIBLEFILTERTOPWINDOW_HXX + +//#include "AccessibleContextBase.hxx" +#include "AccessibleFilterMenu.hxx" +#include "cppuhelper/implbase1.hxx" + +class ScDPFieldPopupWindow; +class ScDocument; + +class ScAccessibleFilterTopWindow : public ScAccessibleFilterMenu +{ +public: + ScAccessibleFilterTopWindow( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible>& rxParent, + ScDPFieldPopupWindow* pWin, const ::rtl::OUString& rName, ScDocument* pDoc); + virtual ~ScAccessibleFilterTopWindow(); + + // XAccessibleContext + + virtual sal_Int32 SAL_CALL getAccessibleChildCount() + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> SAL_CALL + getAccessibleChild(sal_Int32 nIndex) + throw (::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IndexOutOfBoundsException); + + virtual ::rtl::OUString SAL_CALL getImplementationName() + throw (::com::sun::star::uno::RuntimeException); + + // Non-UNO Methods + + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + getAccessibleChildMenu(); + + enum ChildControlType { + LISTBOX, TOGGLE_ALL, SINGLE_ON_BTN, SINGLE_OFF_BTN, OK_BTN, CANCEL_BTN + }; + void setAccessibleChild( + const ::com::sun::star::uno::Reference< + ::com::sun::star::accessibility::XAccessible >& rAccessible, + ChildControlType eType); + +private: + /** The top menu part */ + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + mxAccMenu; + + /** check list box for field member visibility */ + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + mxAccListBox; + + /** check box for toggling all field member's visibility. */ + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + mxAccToggleAll; + + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + mxAccSingleOnBtn; + + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + mxAccSingleOffBtn; + + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + mxAccOkBtn; + + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > + mxAccCancelBtn; + + ScDPFieldPopupWindow* mpWindow; + ScDocument* mpDoc; +}; + +#endif diff --git a/sc/inc/AccessibleGlobal.hxx b/sc/inc/AccessibleGlobal.hxx new file mode 100644 index 000000000000..9f17c2eaacae --- /dev/null +++ b/sc/inc/AccessibleGlobal.hxx @@ -0,0 +1,72 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: AccessibleDataPilotControl.hxx,v $ + * $Revision: 1.6 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SC_ACCESSIBLEGLOBAL_HXX +#define SC_ACCESSIBLEGLOBAL_HXX + +#include <com/sun/star/accessibility/XAccessibleStateSet.hpp> +#include "cppuhelper/implbase1.hxx" + +#include <set> + +/** + * Generic XAccessibleStateSet implementation. + */ +class ScAccessibleStateSet : public ::cppu::WeakImplHelper1< ::com::sun::star::accessibility::XAccessibleStateSet > +{ +public: + ScAccessibleStateSet(); + virtual ~ScAccessibleStateSet(); + + // XAccessibleStateSet + + virtual ::sal_Bool SAL_CALL isEmpty() + throw (::com::sun::star::uno::RuntimeException); + + virtual ::sal_Bool SAL_CALL contains(sal_Int16 nState) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::sal_Bool SAL_CALL containsAll( + const ::com::sun::star::uno::Sequence<sal_Int16>& aStateSet) + throw (::com::sun::star::uno::RuntimeException); + + virtual ::com::sun::star::uno::Sequence<sal_Int16> SAL_CALL getStates() + throw (::com::sun::star::uno::RuntimeException); + + // Non-UNO Methods + + void insert(sal_Int16 nState); + void clear(); + +private: + ::std::set<sal_Int16> maStates; +}; + +#endif diff --git a/sc/inc/addruno.hxx b/sc/inc/addruno.hxx index 1427d9b14a75..c9089ba48d2e 100644 --- a/sc/inc/addruno.hxx +++ b/sc/inc/addruno.hxx @@ -34,7 +34,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <cppuhelper/implbase2.hxx> -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include "global.hxx" #include "address.hxx" diff --git a/sc/inc/afmtuno.hxx b/sc/inc/afmtuno.hxx index ac7d444ca561..843fa673543f 100644 --- a/sc/inc/afmtuno.hxx +++ b/sc/inc/afmtuno.hxx @@ -31,8 +31,8 @@ #ifndef SC_AFMTUNO_HXX #define SC_AFMTUNO_HXX -#include <svtools/lstner.hxx> -#include <svtools/itemprop.hxx> +#include <svl/lstner.hxx> +#include <svl/itemprop.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/container/XContainer.hpp> #include <com/sun/star/container/XIndexContainer.hpp> diff --git a/sc/inc/appluno.hxx b/sc/inc/appluno.hxx index 09a1e9ced9ba..05de5a22cc90 100644 --- a/sc/inc/appluno.hxx +++ b/sc/inc/appluno.hxx @@ -31,7 +31,7 @@ #ifndef SC_APPLUNO_HXX #define SC_APPLUNO_HXX -#include <svtools/itemprop.hxx> +#include <svl/itemprop.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/sheet/XRecentFunctions.hpp> diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx index 8dd77cf68c3f..9db8b4001690 100644 --- a/sc/inc/attrib.hxx +++ b/sc/inc/attrib.hxx @@ -31,9 +31,9 @@ #ifndef SC_SCATTR_HXX #define SC_SCATTR_HXX -#include <svtools/poolitem.hxx> -#include <svtools/intitem.hxx> -#include <svtools/eitem.hxx> +#include <svl/poolitem.hxx> +#include <svl/intitem.hxx> +#include <svl/eitem.hxx> #include "scdllapi.h" #include "global.hxx" #include "address.hxx" @@ -42,13 +42,16 @@ // Flags fuer durch Merge verdeckte Zellen // und Control fuer Auto-Filter -#define SC_MF_HOR 1 -#define SC_MF_VER 2 -#define SC_MF_AUTO 4 -#define SC_MF_BUTTON 8 -#define SC_MF_SCENARIO 16 +#define SC_MF_HOR 0x0001 +#define SC_MF_VER 0x0002 +#define SC_MF_AUTO 0x0004 /// autofilter arrow +#define SC_MF_BUTTON 0x0008 /// field button for datapilot +#define SC_MF_SCENARIO 0x0010 +#define SC_MF_BUTTON_POPUP 0x0020 /// dp button with popup arrow +#define SC_MF_HIDDEN_MEMBER 0x0040 /// dp field button with presence of hidden member +#define SC_MF_DP_TABLE 0x0080 /// dp table output -#define SC_MF_ALL 31 +#define SC_MF_ALL 0x00FF class EditTextObject; @@ -103,6 +106,7 @@ public: BOOL HasAutoFilter() const { return ( GetValue() & SC_MF_AUTO ) != 0; } BOOL HasButton() const { return ( GetValue() & SC_MF_BUTTON ) != 0; } + bool HasDPTable() const { return ( GetValue() & SC_MF_DP_TABLE ) != 0; } BOOL IsScenario() const { return ( GetValue() & SC_MF_SCENARIO ) != 0; } }; diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx index f8df5e9fa236..8ec139ffa2d5 100644 --- a/sc/inc/autoform.hxx +++ b/sc/inc/autoform.hxx @@ -64,7 +64,7 @@ JP 20.07.95: #include <svx/udlnitem.hxx> #include <svx/wghtitem.hxx> #include <svx/rotmodit.hxx> -#include <svtools/intitem.hxx> +#include <svl/intitem.hxx> #include <svx/bolnitem.hxx> #include "scdllapi.h" #include "collect.hxx" diff --git a/sc/inc/brdcst.hxx b/sc/inc/brdcst.hxx index 0d4b9aac9fa7..e7418c8dedfe 100644 --- a/sc/inc/brdcst.hxx +++ b/sc/inc/brdcst.hxx @@ -33,8 +33,8 @@ #include "global.hxx" #include "address.hxx" #include <tools/rtti.hxx> -#include <svtools/hint.hxx> -#include <svtools/smplhint.hxx> +#include <svl/hint.hxx> +#include <svl/smplhint.hxx> class ScBaseCell; #define SC_HINT_DYING SFX_HINT_DYING diff --git a/sc/inc/cell.hxx b/sc/inc/cell.hxx index 1f2bff35ce98..9355176e3a62 100644 --- a/sc/inc/cell.hxx +++ b/sc/inc/cell.hxx @@ -35,14 +35,14 @@ #include <set> #include <tools/mempool.hxx> -#include <svtools/listener.hxx> +#include <svl/listener.hxx> #include "global.hxx" #include "rangenam.hxx" #include "formula/grammar.hxx" #include "tokenarray.hxx" #include "formularesult.hxx" #include <rtl/ustrbuf.hxx> -#include <vcl/fontcvt.hxx> +#include <unotools/fontcvt.hxx> #include "scdllapi.h" #define USE_MEMPOOL diff --git a/sc/inc/cellsuno.hxx b/sc/inc/cellsuno.hxx index 2dd0bd6cc16e..7d0cc1411263 100644 --- a/sc/inc/cellsuno.hxx +++ b/sc/inc/cellsuno.hxx @@ -35,9 +35,9 @@ #include "rangelst.hxx" // ScRangeList #include "formula/grammar.hxx" -#include <svtools/lstner.hxx> -#include <svtools/listener.hxx> -#include <svtools/itemprop.hxx> +#include <svl/lstner.hxx> +#include <svl/listener.hxx> +#include <svl/itemprop.hxx> #include <com/sun/star/table/XTableChartsSupplier.hpp> #include <com/sun/star/chart/XChartDataArray.hpp> #include <com/sun/star/text/XTextFieldsSupplier.hpp> @@ -152,8 +152,10 @@ public: namespace ooo { namespace vba { + namespace excel { class ScVbaCellRangeAccess; // Vba Helper class } + } } class SC_DLLPUBLIC ScCellRangesBase : public com::sun::star::beans::XPropertySet, @@ -175,7 +177,7 @@ class SC_DLLPUBLIC ScCellRangesBase : public com::sun::star::beans::XPropertySet { friend class ScTabViewObj; // fuer select() friend class ScTableSheetObj; // fuer createCursorByRange() - friend class ooo::vba::ScVbaCellRangeAccess; + friend class ooo::vba::excel::ScVbaCellRangeAccess; private: const SfxItemPropertySet* pPropSet; diff --git a/sc/inc/chart2uno.hxx b/sc/inc/chart2uno.hxx index dc0244dfcdb8..32dc3a777086 100644 --- a/sc/inc/chart2uno.hxx +++ b/sc/inc/chart2uno.hxx @@ -37,7 +37,7 @@ #include "token.hxx" #include "chartlis.hxx" -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <com/sun/star/chart/ChartDataRowSource.hpp> #include <com/sun/star/chart2/data/XDataProvider.hpp> #include <com/sun/star/chart2/data/XRangeXMLConversion.hpp> @@ -59,7 +59,7 @@ #include <cppuhelper/implbase6.hxx> #include <cppuhelper/implbase7.hxx> #include <rtl/ustring.hxx> -#include <svtools/itemprop.hxx> +#include <svl/itemprop.hxx> #include <hash_set> #include <list> diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx index 490c62743fb4..0ebc84268f74 100644 --- a/sc/inc/chartlis.hxx +++ b/sc/inc/chartlis.hxx @@ -33,7 +33,7 @@ #include <vcl/timer.hxx> -#include <svtools/listener.hxx> +#include <svl/listener.hxx> #include "collect.hxx" #include "rangelst.hxx" #include "token.hxx" diff --git a/sc/inc/chartuno.hxx b/sc/inc/chartuno.hxx index 914c48393573..7c82b4874fca 100644 --- a/sc/inc/chartuno.hxx +++ b/sc/inc/chartuno.hxx @@ -32,7 +32,7 @@ #define SC_CHARTUNO_HXX #include "address.hxx" -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <tools/string.hxx> #include <com/sun/star/table/XTableChart.hpp> diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx index 6707473f5610..0018f8b2ac3c 100644 --- a/sc/inc/chgtrack.hxx +++ b/sc/inc/chgtrack.hxx @@ -39,7 +39,7 @@ #include <tools/queue.hxx> #include <tools/mempool.hxx> #include <tools/link.hxx> -#include <svtools/lstner.hxx> +#include <unotools/options.hxx> #include "global.hxx" #include "bigrange.hxx" #include "collect.hxx" @@ -994,9 +994,7 @@ DECLARE_TABLE( ScChangeActionTable, ScChangeAction* ) // "normalen" Actions in die Quere zu kommen. #define SC_CHGTRACK_GENERATED_START ((UINT32) 0xfffffff0) -// SfxListener an der Applikation, um Aenderungen des Usernamens mitzubekommen - -class ScChangeTrack : public SfxListener +class ScChangeTrack : public utl::ConfigurationListener { friend void ScChangeAction::RejectRestoreContents( ScChangeTrack*, SCsCOL, SCsROW ); friend BOOL ScChangeActionDel::Reject( ScDocument* pDoc ); @@ -1059,7 +1057,6 @@ class ScChangeTrack : public SfxListener const ScBaseCell* pOldCell, const ScBaseCell* pNewCell ); - virtual void Notify( SfxBroadcaster&, const SfxHint& ); void Init(); void DtorClear(); void SetLoadSave( BOOL bVal ) { bLoadSave = bVal; } @@ -1130,6 +1127,7 @@ class ScChangeTrack : public SfxListener #endif // SC_CHGTRACK_CXX void ClearMsgQueue(); + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); public: diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index 3f1fbfc1c88f..b69fcb384e04 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -161,7 +161,7 @@ public: SCSIZE GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirection eDir ) const; BOOL HasDataAt(SCROW nRow) const; BOOL HasVisibleDataAt(SCROW nRow) const; -//UNUSED2009-05 SCROW GetFirstDataPos() const; + SCROW GetFirstDataPos() const; SCROW GetLastDataPos() const; SCROW GetLastVisDataPos(BOOL bNotes) const; // ohne Broadcaster SCROW GetFirstVisDataPos(BOOL bNotes) const; diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx index 141cb5706515..f659c52d0892 100644 --- a/sc/inc/conditio.hxx +++ b/sc/inc/conditio.hxx @@ -34,7 +34,7 @@ #include "global.hxx" #include "address.hxx" #include "formula/grammar.hxx" -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include "scdllapi.h" class ScBaseCell; diff --git a/sc/inc/confuno.hxx b/sc/inc/confuno.hxx index a7327402e5e0..a82e4fad1a09 100644 --- a/sc/inc/confuno.hxx +++ b/sc/inc/confuno.hxx @@ -31,8 +31,8 @@ #ifndef SC_CONFUNO_HXX #define SC_CONFUNO_HXX -#include <svtools/itemprop.hxx> -#include <svtools/lstner.hxx> +#include <svl/itemprop.hxx> +#include <svl/lstner.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <cppuhelper/implbase2.hxx> diff --git a/sc/inc/dapiuno.hxx b/sc/inc/dapiuno.hxx index 7857ce3b813b..c9c13ee2a98c 100644 --- a/sc/inc/dapiuno.hxx +++ b/sc/inc/dapiuno.hxx @@ -36,8 +36,8 @@ #include "rangeutl.hxx" // ScArea #include "cellsuno.hxx" // for XModifyListenerArr_Impl -#include <svtools/lstner.hxx> -#include <svtools/itemprop.hxx> +#include <svl/lstner.hxx> +#include <svl/itemprop.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> diff --git a/sc/inc/datauno.hxx b/sc/inc/datauno.hxx index a93bfc341573..6cd2d1555bdf 100644 --- a/sc/inc/datauno.hxx +++ b/sc/inc/datauno.hxx @@ -32,8 +32,8 @@ #define SC_DATAUNO_HXX #include "global.hxx" -#include <svtools/itemprop.hxx> -#include <svtools/lstner.hxx> +#include <svl/itemprop.hxx> +#include <svl/lstner.hxx> #include <com/sun/star/sheet/TableFilterField.hpp> #include <com/sun/star/sheet/GeneralFunction.hpp> #include <com/sun/star/sheet/XCellRangeReferrer.hpp> diff --git a/sc/inc/defltuno.hxx b/sc/inc/defltuno.hxx index 2f33dcdb3f48..b93c386a77f0 100644 --- a/sc/inc/defltuno.hxx +++ b/sc/inc/defltuno.hxx @@ -31,12 +31,12 @@ #ifndef SC_DEFLTUNO_HXX #define SC_DEFLTUNO_HXX -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertyState.hpp> #include <cppuhelper/implbase3.hxx> -#include <svtools/itemprop.hxx> +#include <svl/itemprop.hxx> class ScDocShell; diff --git a/sc/inc/detdata.hxx b/sc/inc/detdata.hxx index 06beb91790f1..b16b5a05778c 100644 --- a/sc/inc/detdata.hxx +++ b/sc/inc/detdata.hxx @@ -31,7 +31,7 @@ #ifndef SC_DETDATA_HXX #define SC_DETDATA_HXX -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include "global.hxx" #include "address.hxx" diff --git a/sc/inc/dispuno.hxx b/sc/inc/dispuno.hxx index 34578c64bacf..b09a064ee797 100644 --- a/sc/inc/dispuno.hxx +++ b/sc/inc/dispuno.hxx @@ -34,8 +34,8 @@ #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp> #include <com/sun/star/view/XSelectionChangeListener.hpp> #include <cppuhelper/implbase2.hxx> -#include <svtools/lstner.hxx> -#include <svtools/svarray.hxx> +#include <svl/lstner.hxx> +#include <svl/svarray.hxx> #include "global.hxx" // ScImportParam diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx index 325060f0c05a..f102b5ea966d 100644 --- a/sc/inc/docoptio.hxx +++ b/sc/inc/docoptio.hxx @@ -32,8 +32,8 @@ #define SC_DOCOPTIO_HXX #include <unotools/configitem.hxx> -#include <svtools/poolitem.hxx> -#include <svtools/itemprop.hxx> +#include <svl/poolitem.hxx> +#include <svl/itemprop.hxx> #include "scdllapi.h" #include "optutil.hxx" diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx index c81a68afe63d..52cf1a968163 100644 --- a/sc/inc/docpool.hxx +++ b/sc/inc/docpool.hxx @@ -31,7 +31,7 @@ #ifndef SC_SCDOCPOL_HXX #define SC_SCDOCPOL_HXX -#include <svtools/itempool.hxx> +#include <svl/itempool.hxx> #include "scdllapi.h" class ScStyleSheet; diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 5f75108c2ebf..cc575b529d73 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -155,7 +155,7 @@ namespace com { namespace sun { namespace star { } } } } -#include <svtools/zforlist.hxx> +#include <svl/zforlist.hxx> /* #ifdef _ZFORLIST_DECLARE_TABLE class SvNumberFormatterIndexTable; @@ -866,6 +866,8 @@ public: USHORT GetErrCode( const ScAddress& ) const; + bool ShrinkToDataArea(SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow) const; + void GetDataArea( SCTAB nTab, SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow, BOOL bIncludeOld ); SC_DLLPUBLIC BOOL GetCellArea( SCTAB nTab, SCCOL& rEndCol, SCROW& rEndRow ) const; diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx index 5966e446d0c3..95d9ebc35a7c 100644 --- a/sc/inc/docuno.hxx +++ b/sc/inc/docuno.hxx @@ -33,7 +33,7 @@ #include "address.hxx" #include <sfx2/sfxbasemodel.hxx> -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <svx/fmdmod.hxx> #include <com/sun/star/view/XRenderable.hpp> #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> @@ -61,7 +61,7 @@ #include <cppuhelper/implbase4.hxx> #include <cppuhelper/implbase5.hxx> #include <cppuhelper/interfacecontainer.h> -#include <svtools/itemprop.hxx> +#include <svl/itemprop.hxx> #include "drwlayer.hxx" class ScDocShell; @@ -75,6 +75,7 @@ class ScTableSheetObj; class SvxFmDrawPage; class SvxDrawPage; class ScRangeList; +class ScPrintUIOptions; class ScSheetSaveData; class SC_DLLPUBLIC ScModelObj : public SfxBaseModel, @@ -98,6 +99,7 @@ private: SfxItemPropertySet aPropSet; ScDocShell* pDocShell; ScPrintFuncCache* pPrintFuncCache; + ScPrintUIOptions* pPrinterOptions; com::sun::star::uno::Reference<com::sun::star::uno::XAggregation> xNumberAgg; com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawGradTab; com::sun::star::uno::Reference<com::sun::star::uno::XInterface> xDrawHatchTab; @@ -110,7 +112,8 @@ private: ::cppu::OInterfaceContainerHelper maChangesListeners; BOOL FillRenderMarkData( const com::sun::star::uno::Any& aSelection, - ScMarkData& rMark, ScPrintSelectionStatus& rStatus ) const; + const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rOptions, + ScMarkData& rMark, ScPrintSelectionStatus& rStatus, String& rPagesStr ) const; com::sun::star::uno::Reference<com::sun::star::uno::XAggregation> GetFormatter(); rtl::OUString maBuildId; diff --git a/sc/inc/dpgroup.hxx b/sc/inc/dpgroup.hxx index 99dac0e517db..cb933f4d2a98 100644 --- a/sc/inc/dpgroup.hxx +++ b/sc/inc/dpgroup.hxx @@ -33,6 +33,7 @@ #include <vector> #include <hash_set> +#include <boost/shared_ptr.hpp> #include "dptabdat.hxx" #include "scdllapi.h" @@ -182,7 +183,7 @@ class ScDPGroupTableData : public ScDPTableData { typedef ::std::hash_set< ::rtl::OUString, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > StringHashSet; - ScDPTableData* pSourceData; + ::boost::shared_ptr<ScDPTableData> pSourceData; long nSourceCount; ScDPGroupDimensionVec aGroups; ScDPNumGroupDimension* pNumGroups; // array[nSourceCount] @@ -200,7 +201,7 @@ class ScDPGroupTableData : public ScDPTableData public: // takes ownership of pSource - ScDPGroupTableData( ScDPTableData* pSource, ScDocument* pDocument ); + ScDPGroupTableData( const ::boost::shared_ptr<ScDPTableData>& pSource, ScDocument* pDocument ); virtual ~ScDPGroupTableData(); void AddGroupDimension( const ScDPGroupDimension& rGroup ); diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index 2dc8829485c8..ef7a2c491c50 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -36,8 +36,11 @@ #include "address.hxx" #include "collect.hxx" #include "dpoutput.hxx" +#include "pivot.hxx" #include <com/sun/star/sheet/XDimensionsSupplier.hpp> +#include <boost/shared_ptr.hpp> + //------------------------------------------------------------------ namespace com { namespace sun { namespace star { namespace sheet { @@ -64,6 +67,7 @@ class ScStrCollection; class TypedScStrCollection; struct PivotField; class ScDPCacheTable; +class ScDPTableData; struct ScDPServiceDesc { @@ -99,15 +103,19 @@ private: ScSheetSourceDesc* pSheetDesc; // for sheet data ScImportSourceDesc* pImpDesc; // for database data ScDPServiceDesc* pServDesc; // for external service + ::boost::shared_ptr<ScDPTableData> mpTableData; // cached data com::sun::star::uno::Reference<com::sun::star::sheet::XDimensionsSupplier> xSource; ScDPOutput* pOutput; BOOL bSettingsChanged; BOOL bAlive; // FALSE if only used to hold settings + sal_uInt16 mnAutoFormatIndex; BOOL bAllowMove; long nHeaderRows; // page fields plus filter button + bool mbHeaderLayout; // TRUE : grid, FALSE : standard + SC_DLLPRIVATE ScDPTableData* GetTableData(); SC_DLLPRIVATE void CreateObjects(); SC_DLLPRIVATE void CreateOutput(); @@ -135,6 +143,12 @@ public: void SetOutRange(const ScRange& rRange); const ScRange& GetOutRange() const { return aOutRange; } + void SetAutoFormatIndex (const sal_uInt16 nIndex); + sal_uInt16 GetAutoFormatIndex() const; + + void SetHeaderLayout(bool bUseGrid); + bool GetHeaderLayout() const; + void SetSheetDesc(const ScSheetSourceDesc& rDesc); void SetImportDesc(const ScImportSourceDesc& rDesc); void SetServiceData(const ScDPServiceDesc& rDesc); @@ -157,7 +171,14 @@ public: void SetTag(const String& rNew); const String& GetTag() const { return aTableTag; } - BOOL IsDimNameInUse( const String& rName ) const; + /** + * Data description cell displays the description of a data dimension if + * and only if there is only one data dimension. It's usually located at + * the upper-left corner of the table output. + */ + bool IsDataDescriptionCell(const ScAddress& rPos); + + bool IsDimNameInUse(const ::rtl::OUString& rName) const; String GetDimName( long nDim, BOOL& rIsDataLayout ); BOOL IsDuplicated( long nDim ); long GetDimCount(); @@ -190,16 +211,10 @@ public: sal_Int32 GetUsedHierarchy( sal_Int32 nDim ); BOOL GetMembersNA( sal_Int32 nDim, com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& xMembers ); - BOOL GetMembers( sal_Int32 nDim, - com::sun::star::uno::Sequence< rtl::OUString >& rMembers, - com::sun::star::uno::Sequence< sal_Bool >* pVisible = 0, - com::sun::star::uno::Sequence< sal_Bool >* pShowDet = 0 ); - BOOL GetMembersNA( sal_Int32 nDim, sal_Int32 nHier, com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >& xMembers ); - BOOL GetMembers( sal_Int32 nDim, sal_Int32 nHier, - com::sun::star::uno::Sequence< rtl::OUString >& rMembers, - com::sun::star::uno::Sequence< sal_Bool >* pVisible = 0, - com::sun::star::uno::Sequence< sal_Bool >* pShowDet = 0 ); + + bool GetMemberNames( sal_Int32 nDim, ::com::sun::star::uno::Sequence< ::rtl::OUString >& rNames ); + bool GetMembers( sal_Int32 nDim, sal_Int32 nHier, ::std::vector<ScDPLabelData::Member>& rMembers ); void UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ); @@ -221,6 +236,8 @@ public: // (button attribute must be present) void RefreshAfterLoad(); + void BuildAllDimensionMembers(); + static BOOL HasRegisteredSources(); static com::sun::star::uno::Sequence<rtl::OUString> GetRegisteredSources(); static com::sun::star::uno::Reference<com::sun::star::sheet::XDimensionsSupplier> @@ -291,6 +308,11 @@ public: ScSimpleSharedString& GetSharedString(); + void FreeTable(ScDPObject* pDPObj); + SC_DLLPUBLIC bool InsertNewTable(ScDPObject* pDPObj); + + bool HasDPTable(SCCOL nCol, SCROW nRow, SCTAB nTab) const; + ScDPCacheCell* getCacheCellFromPool(const ScDPCacheCell& rCell); void clearCacheCellPool(); }; diff --git a/sc/inc/dpoutput.hxx b/sc/inc/dpoutput.hxx index 58001e1183a6..e3ab86423d4b 100644 --- a/sc/inc/dpoutput.hxx +++ b/sc/inc/dpoutput.hxx @@ -94,6 +94,7 @@ private: com::sun::star::uno::Sequence< com::sun::star::sheet::DataResult> > aData; BOOL bResultsError; + bool mbHasDataLayout; String aDataDescription; // Number format related parameters @@ -109,6 +110,7 @@ private: long nColCount; long nRowCount; long nHeaderSize; + bool mbHeaderLayout; // TRUE : grid, FALSE : standard SCCOL nTabStartCol; SCROW nTabStartRow; SCCOL nMemberStartCol; @@ -124,7 +126,7 @@ private: const com::sun::star::sheet::MemberResult& rData, BOOL bColHeader, long nLevel ); void FieldCell( SCCOL nCol, SCROW nRow, SCTAB nTab, const String& rCaption, - BOOL bFrame = TRUE ); + bool bInTable, bool bPopup, bool bHasHiddenMember ); void CalcSizes(); /** Query which sub-area of the table the cell is in. See @@ -162,6 +164,9 @@ public: void GetMemberResultNames( ScStrCollection& rNames, long nDimension ); + void SetHeaderLayout(bool bUseGrid); + bool GetHeaderLayout() const; + static void GetDataDimensionNames( String& rSourceName, String& rGivenName, const com::sun::star::uno::Reference< com::sun::star::uno::XInterface>& xDim ); diff --git a/sc/inc/dpoutputgeometry.hxx b/sc/inc/dpoutputgeometry.hxx new file mode 100644 index 000000000000..b665c9cc88b4 --- /dev/null +++ b/sc/inc/dpoutputgeometry.hxx @@ -0,0 +1,80 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2008 by Sun Microsystems, Inc. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: xmldpimp.cxx,v $ + * $Revision: 1.27.134.1 $ + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef SC_DPOUTPUTGEOMETRY_HXX +#define SC_DPOUTPUTGEOMETRY_HXX + +#include "address.hxx" +#include <vector> + +class ScAddress; + +class SC_DLLPUBLIC ScDPOutputGeometry +{ +public: + enum FieldType { Column, Row, Page, Data, None }; + enum ImportType { ODF, XLS }; + + ScDPOutputGeometry(const ScRange& rOutRange, bool bShowFilter, ImportType eImportType); + ~ScDPOutputGeometry(); + + /** + * @param nCount number of row fields, <b>excluding the data layout + * field if exists</b>. + */ + void setRowFieldCount(sal_uInt32 nCount); + void setColumnFieldCount(sal_uInt32 nCount); + void setPageFieldCount(sal_uInt32 nCount); + void setDataFieldCount(sal_uInt32 nCount); + + void getColumnFieldPositions(::std::vector<ScAddress>& rAddrs) const; + void getRowFieldPositions(::std::vector<ScAddress>& rAddrs) const; + void getPageFieldPositions(::std::vector<ScAddress>& rAddrs) const; + + SCROW getRowFieldHeaderRow() const; + + FieldType getFieldButtonType(const ScAddress& rPos) const; + +private: + ScDPOutputGeometry(); // disabled + +private: + ScRange maOutRange; + sal_uInt32 mnRowFields; /// number of row fields (data layout field NOT included!) + sal_uInt32 mnColumnFields; + sal_uInt32 mnPageFields; + sal_uInt32 mnDataFields; + + ImportType meImportType; + + bool mbShowFilter; +}; + +#endif diff --git a/sc/inc/dpsave.hxx b/sc/inc/dpsave.hxx index d3d8d4354145..86093ac8614b 100644 --- a/sc/inc/dpsave.hxx +++ b/sc/inc/dpsave.hxx @@ -34,9 +34,11 @@ #include <tools/string.hxx> #include <tools/list.hxx> #include <com/sun/star/sheet/XDimensionsSupplier.hpp> +#include <com/sun/star/sheet/DataPilotFieldOrientation.hpp> #include "scdllapi.h" #include <hash_map> #include <list> +#include <memory> namespace com { namespace sun { namespace star { namespace sheet { struct DataPilotFieldReference; @@ -46,6 +48,7 @@ namespace com { namespace sun { namespace star { namespace sheet { } } } } class ScDPDimensionSaveData; +class ScDPTableData; // -------------------------------------------------------------------- // @@ -57,6 +60,7 @@ class ScDPSaveMember { private: String aName; + ::std::auto_ptr<rtl::OUString> mpLayoutName; // custom name to be displayed in the table. USHORT nVisibleMode; USHORT nShowDetailsMode; @@ -77,18 +81,23 @@ public: void SetName( const String& rNew ); // used if the source member was renamed (groups) + SC_DLLPUBLIC void SetLayoutName( const ::rtl::OUString& rName ); + SC_DLLPUBLIC const ::rtl::OUString* GetLayoutName() const; + void RemoveLayoutName(); + void WriteToSource( const com::sun::star::uno::Reference< com::sun::star::uno::XInterface>& xMember, sal_Int32 nPosition ); }; -class ScDPSaveDimension +class SC_DLLPUBLIC ScDPSaveDimension { private: String aName; - String* pLayoutName; // alternative name for layout, not used (yet) String* pSelectedPage; + ::std::auto_ptr<rtl::OUString> mpLayoutName; + ::std::auto_ptr<rtl::OUString> mpSubtotalName; BOOL bIsDataLayout; BOOL bDupFlag; USHORT nOrientation; @@ -127,43 +136,52 @@ public: void SetName( const String& rNew ); // used if the source dim was renamed (groups) - SC_DLLPUBLIC void SetOrientation(USHORT nNew); - SC_DLLPUBLIC void SetSubTotals(long nCount, const USHORT* pFuncs); + void SetOrientation(USHORT nNew); + void SetSubTotals(long nCount, const USHORT* pFuncs); long GetSubTotalsCount() const { return nSubTotalCount; } USHORT GetSubTotalFunc(long nIndex) const { return pSubTotalFuncs[nIndex]; } - SC_DLLPUBLIC void SetShowEmpty(BOOL bSet); + void SetShowEmpty(BOOL bSet); BOOL GetShowEmpty() const { return BOOL(nShowEmptyMode); } - SC_DLLPUBLIC void SetFunction(USHORT nNew); // enum GeneralFunction + void SetFunction(USHORT nNew); // enum GeneralFunction USHORT GetFunction() const { return nFunction; } void SetUsedHierarchy(long nNew); long GetUsedHierarchy() const { return nUsedHierarchy; } - SC_DLLPUBLIC void SetLayoutName(const String* pName); - SC_DLLPUBLIC const String& GetLayoutName() const; - SC_DLLPUBLIC BOOL HasLayoutName() const; + + void SetLayoutName(const ::rtl::OUString& rName); + const ::rtl::OUString* GetLayoutName() const; + void RemoveLayoutName(); + void SetSubtotalName(const ::rtl::OUString& rName); + const ::rtl::OUString* GetSubtotalName() const; + + bool IsMemberNameInUse(const ::rtl::OUString& rName) const; const ::com::sun::star::sheet::DataPilotFieldReference* GetReferenceValue() const { return pReferenceValue; } - SC_DLLPUBLIC void SetReferenceValue(const ::com::sun::star::sheet::DataPilotFieldReference* pNew); + void SetReferenceValue(const ::com::sun::star::sheet::DataPilotFieldReference* pNew); const ::com::sun::star::sheet::DataPilotFieldSortInfo* GetSortInfo() const { return pSortInfo; } - SC_DLLPUBLIC void SetSortInfo(const ::com::sun::star::sheet::DataPilotFieldSortInfo* pNew); + void SetSortInfo(const ::com::sun::star::sheet::DataPilotFieldSortInfo* pNew); const ::com::sun::star::sheet::DataPilotFieldAutoShowInfo* GetAutoShowInfo() const { return pAutoShowInfo; } - SC_DLLPUBLIC void SetAutoShowInfo(const ::com::sun::star::sheet::DataPilotFieldAutoShowInfo* pNew); + void SetAutoShowInfo(const ::com::sun::star::sheet::DataPilotFieldAutoShowInfo* pNew); const ::com::sun::star::sheet::DataPilotFieldLayoutInfo* GetLayoutInfo() const { return pLayoutInfo; } - SC_DLLPUBLIC void SetLayoutInfo(const ::com::sun::star::sheet::DataPilotFieldLayoutInfo* pNew); + void SetLayoutInfo(const ::com::sun::star::sheet::DataPilotFieldLayoutInfo* pNew); - SC_DLLPUBLIC void SetCurrentPage( const String* pPage ); // NULL = no selection (all) - SC_DLLPUBLIC BOOL HasCurrentPage() const; - SC_DLLPUBLIC const String& GetCurrentPage() const; + void SetCurrentPage( const String* pPage ); // NULL = no selection (all) + BOOL HasCurrentPage() const; + const String& GetCurrentPage() const; USHORT GetOrientation() const { return nOrientation; } ScDPSaveMember* GetExistingMemberByName(const String& rName); - SC_DLLPUBLIC ScDPSaveMember* GetMemberByName(const String& rName); + ScDPSaveMember* GetMemberByName(const String& rName); void SetMemberPosition( const String& rName, sal_Int32 nNewPos ); void WriteToSource( const com::sun::star::uno::Reference< com::sun::star::uno::XInterface>& xDim ); + + void UpdateMemberVisibility(const ::std::hash_map< ::rtl::OUString, bool, ::rtl::OUStringHash>& rData); + + bool HasInvisibleMember() const; }; @@ -179,6 +197,12 @@ private: BOOL bFilterButton; // not passed to DataPilotSource BOOL bDrillDown; // not passed to DataPilotSource + /** if true, all dimensions already have all of their member instances + * created. */ + bool mbDimensionMembersBuilt; + + ::std::auto_ptr<rtl::OUString> mpGrandTotalName; + public: SC_DLLPUBLIC ScDPSaveData(); ScDPSaveData(const ScDPSaveData& r); @@ -188,21 +212,26 @@ public: BOOL operator== ( const ScDPSaveData& r ) const; + SC_DLLPUBLIC void SetGrandTotalName(const ::rtl::OUString& rName); + SC_DLLPUBLIC const ::rtl::OUString* GetGrandTotalName() const; + const List& GetDimensions() const { return aDimList; } void AddDimension(ScDPSaveDimension* pDim) { aDimList.Insert(pDim, LIST_APPEND); } ScDPSaveDimension* GetDimensionByName(const String& rName); SC_DLLPUBLIC ScDPSaveDimension* GetDataLayoutDimension(); + SC_DLLPUBLIC ScDPSaveDimension* GetExistingDataLayoutDimension() const; ScDPSaveDimension* DuplicateDimension(const String& rName); SC_DLLPUBLIC ScDPSaveDimension& DuplicateDimension(const ScDPSaveDimension& rDim); - SC_DLLPUBLIC ScDPSaveDimension* GetExistingDimensionByName(const String& rName); + SC_DLLPUBLIC ScDPSaveDimension* GetExistingDimensionByName(const String& rName) const; SC_DLLPUBLIC ScDPSaveDimension* GetNewDimensionByName(const String& rName); void RemoveDimensionByName(const String& rName); ScDPSaveDimension* GetInnermostDimension(USHORT nOrientation); + ScDPSaveDimension* GetFirstDimension(::com::sun::star::sheet::DataPilotFieldOrientation eOrientation); long GetDataDimensionCount() const; @@ -229,6 +258,14 @@ public: const ScDPDimensionSaveData* GetExistingDimensionData() const { return pDimensionData; } SC_DLLPUBLIC ScDPDimensionSaveData* GetDimensionData(); // create if not there void SetDimensionData( const ScDPDimensionSaveData* pNew ); // copied + void BuildAllDimensionMembers(ScDPTableData* pData); + + /** + * Check whether a dimension has one or more invisible members. + * + * @param rDimName dimension name + */ + SC_DLLPUBLIC bool HasInvisibleMember(const ::rtl::OUString& rDimName) const; }; diff --git a/sc/inc/dptabres.hxx b/sc/inc/dptabres.hxx index 6dfb782b2313..a2574820da4a 100644 --- a/sc/inc/dptabres.hxx +++ b/sc/inc/dptabres.hxx @@ -31,7 +31,7 @@ #ifndef SC_DPTABRES_HXX #define SC_DPTABRES_HXX -#include <svtools/svarray.hxx> +#include <svl/svarray.hxx> #include <tools/string.hxx> #include <com/sun/star/sheet/MemberResult.hpp> #include <com/sun/star/sheet/DataResult.hpp> @@ -41,6 +41,7 @@ #include <hash_map> #include <hash_set> #include <vector> +#include <memory> namespace com { namespace sun { namespace star { namespace sheet { struct DataPilotFieldReference; @@ -262,7 +263,7 @@ public: long GetMeasureCount() const { return nMeasCount; } ScSubTotalFunc GetMeasureFunction(long nMeasure) const; - String GetMeasureString(long nMeasure, BOOL bForce, ScSubTotalFunc eForceFunc) const; + String GetMeasureString(long nMeasure, BOOL bForce, ScSubTotalFunc eForceFunc, bool& rbTotalResult) const; String GetMeasureDimensionName(long nMeasure) const; const ::com::sun::star::sheet::DataPilotFieldReference& GetMeasureRefVal(long nMeasure) const; USHORT GetMeasureRefOrient(long nMeasure) const; @@ -284,6 +285,8 @@ public: const ScDPItemData& rBaseData, long nBaseIndex ) const; BOOL HasCommonElement( const ScDPItemData& rFirstData, long nFirstIndex, const ScDPItemData& rSecondData, long nSecondIndex ) const; + + const ScDPSource* GetSource() const; }; diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx index 3b1d8e0e206e..94229f5b1d35 100644 --- a/sc/inc/dptabsrc.hxx +++ b/sc/inc/dptabsrc.hxx @@ -33,6 +33,7 @@ #include <vector> #include <hash_map> +#include <memory> #include <tools/string.hxx> #include <tools/list.hxx> #include "global.hxx" // enum ScSubTotalFunc @@ -108,7 +109,7 @@ class ScDPSource : public cppu::WeakImplHelper6< com::sun::star::lang::XServiceInfo > { private: - ScDPTableData* pData; // data source + ScDPTableData* pData; // data source (ScDPObject manages its life time) ScDPDimensions* pDimensions; // api objects // settings: long nColDims[SC_DAPI_MAXFIELDS]; @@ -136,6 +137,8 @@ private: List aRowLevelList; BOOL bResultOverflow; + ::std::auto_ptr<rtl::OUString> mpGrandTotalName; + void CreateRes_Impl(); void FillMemberResults(); void FillLevelList( USHORT nOrientation, List& rList ); @@ -162,11 +165,15 @@ public: ScDPTableData* GetData() { return pData; } const ScDPTableData* GetData() const { return pData; } + void SetGrandTotalName(const ::rtl::OUString& rName); + const ::rtl::OUString* GetGrandTotalName() const; + USHORT GetOrientation(long nColumn); void SetOrientation(long nColumn, USHORT nNew); long GetPosition(long nColumn); long GetDataDimensionCount(); + ScDPDimension* GetDataDimension(long nIndex); String GetDataDimName(long nIndex); BOOL IsDataLayoutDimension(long nDim); USHORT GetDataLayoutOrientation(); @@ -333,12 +340,15 @@ private: long nUsedHier; USHORT nFunction; // enum GeneralFunction String aName; // if empty, take from source + ::std::auto_ptr<rtl::OUString> mpLayoutName; + ::std::auto_ptr<rtl::OUString> mpSubtotalName; long nSourceDim; // >=0 if dup'ed ::com::sun::star::sheet::DataPilotFieldReference aReferenceValue; // settings for "show data as" / "displayed value" BOOL bHasSelectedPage; String aSelectedPage; ScDPItemData* pSelectedData; // internal, temporary, created from aSelectedPage + sal_Bool mbHasHiddenMember; public: ScDPDimension( ScDPSource* pSrc, long nD ); @@ -350,6 +360,9 @@ public: ScDPDimension* CreateCloneObject(); ScDPHierarchies* GetHierarchiesObject(); + SC_DLLPUBLIC const ::rtl::OUString* GetLayoutName() const; + const ::rtl::OUString* GetSubtotalName() const; + // XNamed virtual ::rtl::OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setName( const ::rtl::OUString& aName ) @@ -736,7 +749,7 @@ private: long nLev; ScDPItemData maData; -// String aCaption; // visible name (changeable by user) + ::std::auto_ptr<rtl::OUString> mpLayoutName; sal_Int32 nPosition; // manual sorting BOOL bVisible; @@ -750,6 +763,7 @@ public: BOOL IsNamedItem( const ScDPItemData& r ) const; String GetNameStr() const; void FillItemData( ScDPItemData& rData ) const; + SC_DLLPUBLIC const ::rtl::OUString* GetLayoutName() const; sal_Int32 Compare( const ScDPMember& rOther ) const; // visible order diff --git a/sc/inc/drawattr.hxx b/sc/inc/drawattr.hxx index 174b675ebcae..ad0ce37e35c3 100644 --- a/sc/inc/drawattr.hxx +++ b/sc/inc/drawattr.hxx @@ -30,7 +30,7 @@ #ifndef _IDLITEMS_HXX #define _IDLITEMS_HXX -#include <svtools/eitem.hxx> +#include <svl/eitem.hxx> #include <svx/svxenum.hxx> diff --git a/sc/inc/drdefuno.hxx b/sc/inc/drdefuno.hxx index 7eb45d3ea355..4b0a534dc655 100644 --- a/sc/inc/drdefuno.hxx +++ b/sc/inc/drdefuno.hxx @@ -32,7 +32,7 @@ #define SC_DRDEFUNO_HXX #include <svx/unopool.hxx> -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> class ScDocShell; diff --git a/sc/inc/editsrc.hxx b/sc/inc/editsrc.hxx index 950c3533e44a..3dd928384fe8 100644 --- a/sc/inc/editsrc.hxx +++ b/sc/inc/editsrc.hxx @@ -33,7 +33,7 @@ #include "address.hxx" #include <svx/unoedsrc.hxx> -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <memory> diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index bf795f04fe1c..90adedd6d346 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -37,7 +37,7 @@ #include "sfx2/lnkbase.hxx" #include "tools/time.hxx" #include "vcl/timer.hxx" -#include "svtools/zforlist.hxx" +#include "svl/zforlist.hxx" #include "scmatrix.hxx" #include <hash_map> diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx index d4319bcba50e..6d777b38424a 100644 --- a/sc/inc/fielduno.hxx +++ b/sc/inc/fielduno.hxx @@ -34,8 +34,8 @@ #include "address.hxx" #include "mutexhlp.hxx" -#include <svtools/lstner.hxx> -#include <svtools/itemprop.hxx> +#include <svl/lstner.hxx> +#include <svl/itemprop.hxx> #include <svx/editdata.hxx> #include <com/sun/star/text/XTextField.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> diff --git a/sc/inc/fillinfo.hxx b/sc/inc/fillinfo.hxx index b6d48254d06a..d0be5b0cb897 100644 --- a/sc/inc/fillinfo.hxx +++ b/sc/inc/fillinfo.hxx @@ -99,6 +99,8 @@ struct CellInfo BOOL bVOverlapped : 1; BOOL bAutoFilter : 1; BOOL bPushButton : 1; + bool bPopupButton: 1; + bool bFilterActive:1; BOOL bPrinted : 1; // bei Bedarf (Pagebreak-Modus) diff --git a/sc/inc/fmtuno.hxx b/sc/inc/fmtuno.hxx index 6005a849fb0f..ccd93d982bdf 100644 --- a/sc/inc/fmtuno.hxx +++ b/sc/inc/fmtuno.hxx @@ -35,7 +35,7 @@ #include "conditio.hxx" #include <formula/grammar.hxx> #include <tools/list.hxx> -#include <svtools/itemprop.hxx> +#include <svl/itemprop.hxx> #include <com/sun/star/sheet/XSheetConditionalEntries.hpp> #include <com/sun/star/sheet/XSheetCondition.hpp> #include <com/sun/star/sheet/XSheetConditionalEntry.hpp> diff --git a/sc/inc/forbiuno.hxx b/sc/inc/forbiuno.hxx index eb142b2166a1..305d818a299d 100644 --- a/sc/inc/forbiuno.hxx +++ b/sc/inc/forbiuno.hxx @@ -32,7 +32,7 @@ #define SC_FORBIUNO_HXX #include <svx/UnoForbiddenCharsTable.hxx> -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> class ScDocShell; diff --git a/sc/inc/funcuno.hxx b/sc/inc/funcuno.hxx index 2e5e167bc988..4c45cdb627bc 100644 --- a/sc/inc/funcuno.hxx +++ b/sc/inc/funcuno.hxx @@ -35,7 +35,7 @@ #include <com/sun/star/sheet/XFunctionAccess.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <cppuhelper/implbase3.hxx> -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> class ScDocument; class ScDocOptions; diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 1f6dc13d04ce..c938968ddfef 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -87,8 +87,6 @@ extern "C" { #endif //------------------------------------------------------------------------ -struct LabelData; -//------------------------------------------------------------------------ // die 1000 Namen des Calc... // Clipboard-Namen sind jetzt in so3/soapp.hxx diff --git a/sc/inc/hints.hxx b/sc/inc/hints.hxx index 11d5001a3912..58d2804c652e 100644 --- a/sc/inc/hints.hxx +++ b/sc/inc/hints.hxx @@ -33,7 +33,7 @@ #include "global.hxx" #include "address.hxx" -#include <svtools/hint.hxx> +#include <svl/hint.hxx> // --------------------------------------------------------------------------- diff --git a/sc/inc/linkuno.hxx b/sc/inc/linkuno.hxx index c45da4f35e27..1a9479dff278 100644 --- a/sc/inc/linkuno.hxx +++ b/sc/inc/linkuno.hxx @@ -31,8 +31,8 @@ #ifndef SC_LINKUNO_HXX #define SC_LINKUNO_HXX -#include <svtools/lstner.hxx> -#include <svtools/itemprop.hxx> +#include <svl/lstner.hxx> +#include <svl/itemprop.hxx> #include <com/sun/star/sheet/XDDELink.hpp> #include <com/sun/star/sheet/XDDELinkResults.hpp> #include <com/sun/star/sheet/XDDELinks.hpp> diff --git a/sc/inc/lookupcache.hxx b/sc/inc/lookupcache.hxx index 12b85d54cc49..9261a6db0395 100644 --- a/sc/inc/lookupcache.hxx +++ b/sc/inc/lookupcache.hxx @@ -34,7 +34,7 @@ #include "address.hxx" #include "global.hxx" #include "formula/token.hxx" -#include <svtools/listener.hxx> +#include <svl/listener.hxx> #include <tools/string.hxx> #include <hash_map> diff --git a/sc/inc/miscuno.hxx b/sc/inc/miscuno.hxx index 1486d3ce480b..df60b2822cb8 100644 --- a/sc/inc/miscuno.hxx +++ b/sc/inc/miscuno.hxx @@ -285,12 +285,29 @@ public: static sal_Int32 GetEnumProperty( const com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet>& xProp, const ::rtl::OUString& rName, long nDefault ); + static ::rtl::OUString GetStringProperty( + const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& xProp, + const ::rtl::OUString& rName, const ::rtl::OUString& rDefault ); static sal_Bool GetBoolFromAny( const com::sun::star::uno::Any& aAny ); static sal_Int16 GetInt16FromAny( const com::sun::star::uno::Any& aAny ); static sal_Int32 GetInt32FromAny( const com::sun::star::uno::Any& aAny ); static sal_Int32 GetEnumFromAny( const com::sun::star::uno::Any& aAny ); static void SetBoolInAny( com::sun::star::uno::Any& rAny, sal_Bool bValue ); + + static void SetOptionalPropertyValue( + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rPropSet, + const sal_Char* pPropName, const ::com::sun::star::uno::Any& rVal ); + + template<typename ValueType> + static void SetOptionalPropertyValue( + ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rPropSet, + const sal_Char* pPropName, const ValueType& rVal ) + { + ::com::sun::star::uno::Any any; + any <<= rVal; + SetOptionalPropertyValue(rPropSet, pPropName, any); + } }; diff --git a/sc/inc/nameuno.hxx b/sc/inc/nameuno.hxx index bac1dd9711d5..240cead3be83 100644 --- a/sc/inc/nameuno.hxx +++ b/sc/inc/nameuno.hxx @@ -31,7 +31,7 @@ #ifndef SC_NAMEUNO_HXX #define SC_NAMEUNO_HXX -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include "address.hxx" #include "formula/grammar.hxx" #include <com/sun/star/sheet/XLabelRange.hpp> diff --git a/sc/inc/notesuno.hxx b/sc/inc/notesuno.hxx index 3907f3d20967..4cf8148eff17 100644 --- a/sc/inc/notesuno.hxx +++ b/sc/inc/notesuno.hxx @@ -32,7 +32,7 @@ #define SC_NOTESUNO_HXX #include "address.hxx" -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <com/sun/star/sheet/XSheetAnnotation.hpp> #include <com/sun/star/sheet/XSheetAnnotationShapeSupplier.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> diff --git a/sc/inc/patattr.hxx b/sc/inc/patattr.hxx index 86506d7ccdb8..65d350455ddd 100644 --- a/sc/inc/patattr.hxx +++ b/sc/inc/patattr.hxx @@ -31,9 +31,9 @@ #ifndef SC_SCPATATR_HXX #define SC_SCPATATR_HXX -#include <svtools/poolitem.hxx> -#include <svtools/itemset.hxx> -#include <vcl/fontcvt.hxx> +#include <svl/poolitem.hxx> +#include <svl/itemset.hxx> +#include <unotools/fontcvt.hxx> #include <svx/svxenum.hxx> #include "scdllapi.h" diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx index b905bb19db03..dbb86fdf7484 100644 --- a/sc/inc/pch/precompiled_sc.hxx +++ b/sc/inc/pch/precompiled_sc.hxx @@ -152,16 +152,16 @@ #include <sot/exchange.hxx> #include <sot/factory.hxx> #include <sot/storage.hxx> -#include <svtools/brdcst.hxx> -#include <svtools/cenumitm.hxx> -#include <svtools/cintitem.hxx> -#include <svtools/fltrcfg.hxx> -#include <svtools/intitem.hxx> -#include <svtools/listener.hxx> -#include <svtools/lstner.hxx> -#include <svtools/pathoptions.hxx> -#include <svtools/solar.hrc> -#include <svtools/useroptions.hxx> +#include <svl/brdcst.hxx> +#include <svl/cenumitm.hxx> +#include <svl/cintitem.hxx> +#include <unotools/fltrcfg.hxx> +#include <svl/intitem.hxx> +#include <svl/listener.hxx> +#include <svl/lstner.hxx> +#include <unotools/pathoptions.hxx> +#include <svl/solar.hrc> +#include <unotools/useroptions.hxx> #include <svx/editobj.hxx> #include <svx/eeitem.hxx> #include <svx/fmglob.hxx> diff --git a/sc/inc/pivot.hxx b/sc/inc/pivot.hxx index e77dd60f18bb..100463cb5542 100644 --- a/sc/inc/pivot.hxx +++ b/sc/inc/pivot.hxx @@ -53,6 +53,7 @@ #include "address.hxx" #include <vector> +#include <boost/shared_ptr.hpp> class SubTotal; #include "collect.hxx" @@ -69,7 +70,9 @@ class SvStream; class ScDocument; class ScUserListData; class ScProgress; -struct LabelData; +struct ScDPLabelData; + +typedef ::boost::shared_ptr<ScDPLabelData> ScDPLabelDataRef; // ----------------------------------------------------------------------- @@ -93,8 +96,7 @@ struct ScPivotParam SCCOL nCol; // Cursor Position / SCROW nRow; // bzw. Anfang des Zielbereiches SCTAB nTab; - LabelData** ppLabelArr; - SCSIZE nLabels; + ::std::vector<ScDPLabelDataRef> maLabelArray; PivotField aPageArr[PIVOT_MAXPAGEFIELD]; PivotField aColArr[PIVOT_MAXFIELD]; PivotField aRowArr[PIVOT_MAXFIELD]; @@ -115,10 +117,8 @@ struct ScPivotParam ScPivotParam& operator= ( const ScPivotParam& r ); BOOL operator== ( const ScPivotParam& r ) const; //UNUSED2009-05 void Clear (); - void ClearLabelData (); void ClearPivotArrays(); - void SetLabelData ( LabelData** ppLabArr, - SCSIZE nLab ); + void SetLabelData (const ::std::vector<ScDPLabelDataRef>& r); void SetPivotArrays ( const PivotField* pPageArr, const PivotField* pColArr, const PivotField* pRowArr, @@ -136,24 +136,45 @@ typedef PivotField PivotPageFieldArr[PIVOT_MAXPAGEFIELD]; //------------------------------------------------------------------------ -struct LabelData +struct ScDPLabelData { - String maName; /// Visible name of the dimension. + ::rtl::OUString maName; /// Original name of the dimension. + ::rtl::OUString maLayoutName; /// Layout name (display name) SCsCOL mnCol; USHORT mnFuncMask; /// Page/Column/Row subtotal function. sal_Int32 mnUsedHier; /// Used hierarchy. bool mbShowAll; /// true = Show all (also empty) results. bool mbIsValue; /// true = Sum or count in data field. + struct Member + { + ::rtl::OUString maName; + ::rtl::OUString maLayoutName; + bool mbVisible; + bool mbShowDetails; + + Member(); + + /** + * return the name that should be displayed in the dp dialogs i.e. + * when the layout name is present, use it, or else use the original + * name. + */ + ::rtl::OUString SC_DLLPUBLIC getDisplayName() const; + }; + ::std::vector<Member> maMembers; ::com::sun::star::uno::Sequence< ::rtl::OUString > maHiers; /// Hierarchies. - ::com::sun::star::uno::Sequence< ::rtl::OUString > maMembers; /// Members. - ::com::sun::star::uno::Sequence< sal_Bool > maVisible; /// Visibility of members. - ::com::sun::star::uno::Sequence< sal_Bool > maShowDet; /// Show details of members. ::com::sun::star::sheet::DataPilotFieldSortInfo maSortInfo; /// Sorting info. ::com::sun::star::sheet::DataPilotFieldLayoutInfo maLayoutInfo; /// Layout info. ::com::sun::star::sheet::DataPilotFieldAutoShowInfo maShowInfo; /// AutoShow info. - explicit LabelData( const String& rName, short nCol, bool bIsValue ); + explicit ScDPLabelData( const String& rName, short nCol, bool bIsValue ); + + /** + * return the name that should be displayed in the dp dialogs i.e. when + * the layout name is present, use it, or else use the original name. + */ + ::rtl::OUString SC_DLLPUBLIC getDisplayName() const; }; // ============================================================================ @@ -171,7 +192,6 @@ struct ScDPFuncData // ============================================================================ -typedef LabelData ScDPLabelData; typedef std::vector< ScDPLabelData > ScDPLabelDataVec; typedef std::vector< String > ScDPNameVec; diff --git a/sc/inc/printopt.hxx b/sc/inc/printopt.hxx index 6c4a88d9df60..0c90ba4497fc 100644 --- a/sc/inc/printopt.hxx +++ b/sc/inc/printopt.hxx @@ -31,7 +31,7 @@ #ifndef SC_PRINTOPT_HXX #define SC_PRINTOPT_HXX -#include <svtools/poolitem.hxx> +#include <svl/poolitem.hxx> #include <unotools/configitem.hxx> #include "scdllapi.h" @@ -96,6 +96,7 @@ public: void SetOptions( const ScPrintOptions& rNew ); virtual void Commit(); + virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); }; #endif diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc index 375eebe30964..62114c892ec3 100644 --- a/sc/inc/sc.hrc +++ b/sc/inc/sc.hrc @@ -662,7 +662,9 @@ //#define SID_OPENDLG_MODCHART (SC_MESSAGE_START + 58) #define SID_OPENDLG_CONDFRMT (SC_MESSAGE_START + 59) #define SID_OPENDLG_OPTSOLVER (SC_MESSAGE_START + 60) - +//<!--Added by PengYunQuan for Validity Cell Range Picker +#define SID_VALIDITY_REFERENCE (SC_MESSAGE_START + 61) +//-->Added by PengYunQuan for Validity Cell Range Picker #define SC_HINT_NAVIGATOR_UPDATEALL (SC_MESSAGE_START + 65) // Funktionen ------------------------------------------------------------ @@ -1375,6 +1377,8 @@ #define SCSTR_RENAMEOBJECT (STR_START + 215) +#define SCSTR_PRINT_OPTIONS (STR_START+216) + // Navigator - in der Reihenfolge wie SC_CONTENT_... #define SCSTR_CONTENT_ROOT (STR_START + 250) #define SCSTR_CONTENT_TABLE (STR_START + 251) @@ -1437,6 +1441,8 @@ #define RID_IMG_H_DROP_URL (BMP_START + 5) #define RID_IMG_H_DROP_LINK (BMP_START + 6) #define RID_IMG_H_DROP_COPY (BMP_START + 7) +#define RID_IMG_SELECT_CURRENT (BMP_START + 8) +#define RID_IMG_UNSELECT_CURRENT (BMP_START + 9) #define RID_SCPTR_PIVOTCOL (BMP_START + 81) #define RID_SCPTR_PIVOTROW (BMP_START + 82) @@ -1628,8 +1634,9 @@ #define RID_SCDLG_DOCPROTECTION (SC_DIALOGS_START + 149) #define RID_SCDLG_RETYPEPASS (SC_DIALOGS_START + 150) #define RID_SCDLG_RETYPEPASS_INPUT (SC_DIALOGS_START + 151) +#define RID_POPUP_FILTER (SC_DIALOGS_START + 152) -#define SC_DIALOGS_END (SC_DIALOGS_START + 152) +#define SC_DIALOGS_END (SC_DIALOGS_START + 153) #ifndef STD_MASKCOLOR #define STD_MASKCOLOR Color { Red = 0xFF00; Green = 0x0000; Blue = 0xFF00; } diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index f9895ff15ebb..ba62b9a5de06 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -55,6 +55,9 @@ class SfxStyleSheetBase; class ScDPObject; struct ScDPFuncData; struct ScDPNumGroupInfo; +//<!--Added by PengYunQuan for Validity Cell Range Picker +class ScTabViewShell; +//-->Added by PengYunQuan for Validity Cell Range Picker namespace com { namespace sun { namespace star { namespace sheet { struct DataPilotFieldReference; @@ -235,7 +238,7 @@ class AbstractScDPSubtotalDlg : public VclAbstractDialog //add for ScDPSubtotal { public: virtual USHORT GetFuncMask() const = 0; - virtual void FillLabelData( LabelData& rLabelData ) const = 0; + virtual void FillLabelData( ScDPLabelData& rLabelData ) const = 0; }; class AbstractScDPNumGroupDlg : public VclAbstractDialog @@ -459,8 +462,13 @@ public: virtual SfxAbstractTabDialog * CreateScParagraphDlg( Window* pParent, const SfxItemSet* pAttr ,//add for ScParagraphDlg int nId ) = 0; + //<!--Modified by PengYunQuan for Validity Cell Range Picker + //virtual SfxAbstractTabDialog * CreateScValidationDlg( Window* pParent, //add for ScValidationDlg + // const SfxItemSet* pArgSet,int nId ) = 0; + virtual SfxAbstractTabDialog * CreateScValidationDlg( Window* pParent, //add for ScValidationDlg - const SfxItemSet* pArgSet,int nId ) = 0; + const SfxItemSet* pArgSet,int nId, ScTabViewShell *pTabVwSh ) = 0; + //-->Modified by PengYunQuan for Validity Cell Range Picker virtual SfxAbstractTabDialog * CreateScSortDlg( Window* pParent, //add for ScSortDlg const SfxItemSet* pArgSet,int nId ) = 0; // for tabpage diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx index 69f3def3efc5..bf7f8810fec3 100644 --- a/sc/inc/scmod.hxx +++ b/sc/inc/scmod.hxx @@ -34,13 +34,19 @@ #include "scdllapi.h" #include "scdll.hxx" #include <vcl/timer.hxx> -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include "global.hxx" // ScInputMode #include "markdata.hxx" //ScMarkData #include "shellids.hxx" - +#include <unotools/options.hxx> #include <tools/shl.hxx> +//<!--Added by PengYunQuan for Validity Cell Range Picker +#include <map> +#include <list> +#include <algorithm> +//-->Added by PengYunQuan for Validity Cell Range Picker + class KeyEvent; class SdrModel; @@ -113,7 +119,7 @@ struct ScClipData //================================================================== -class ScModule: public SfxModule, public SfxListener +class ScModule: public SfxModule, public SfxListener, utl::ConfigurationListener { Timer aIdleTimer; Timer aSpellTimer; @@ -145,6 +151,9 @@ class ScModule: public SfxModule, public SfxListener bool mbIsInSharedDocLoading; bool mbIsInSharedDocSaving; + //<!--Added by PengYunQuan for Validity Cell Range Picker + std::map<USHORT, std::list<Window*> > m_mapRefWindow; + //-->Added by PengYunQuan for Validity Cell Range Picker public: SFX_DECL_INTERFACE(SCID_APP) @@ -153,6 +162,7 @@ public: virtual void FillStatusBar(StatusBar &rBar); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ); void DeleteCfg(); // von der Applikation verschoben: @@ -253,7 +263,10 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO ScFormEditData* GetFormEditData() { return pFormEditData; } // Referenzeingabe: - void SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm = NULL ); + //<!--Added by PengYunQuan for Validity Cell Range Picker + //void SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm = NULL ); + SC_DLLPUBLIC void SetRefDialog( USHORT nId, BOOL bVis, SfxViewFrame* pViewFrm = NULL ); + //-->Added by PengYunQuan for Validity Cell Range Picker BOOL IsModalMode(SfxObjectShell* pDocSh = NULL); BOOL IsFormulaMode(); BOOL IsRefDialogOpen(); @@ -276,6 +289,14 @@ SC_DLLPUBLIC void SetAppOptions ( const ScAppOptions& rO bool IsInSharedDocLoading() const { return mbIsInSharedDocLoading; } void SetInSharedDocSaving( bool bNew ) { mbIsInSharedDocSaving = bNew; } bool IsInSharedDocSaving() const { return mbIsInSharedDocSaving; } + + //<!--Added by PengYunQuan for Validity Cell Range Picker + SC_DLLPUBLIC BOOL RegisterRefWindow( USHORT nSlotId, Window *pWnd ); + SC_DLLPUBLIC BOOL UnregisterRefWindow( USHORT nSlotId, Window *pWnd ); + SC_DLLPUBLIC BOOL IsAliveRefDlg( USHORT nSlotId, Window *pWnd ); + SC_DLLPUBLIC Window * Find1RefWindow( USHORT nSlotId, Window *pWndAncestor ); + SC_DLLPUBLIC Window * Find1RefWindow( Window *pWndAncestor ); + //-->Added by PengYunQuan for Validity Cell Range Picker }; #define SC_MOD() ( *(ScModule**) GetAppData(SHL_CALC) ) diff --git a/sc/inc/srchuno.hxx b/sc/inc/srchuno.hxx index d486d8b7e298..ffa54cf29d70 100644 --- a/sc/inc/srchuno.hxx +++ b/sc/inc/srchuno.hxx @@ -34,7 +34,7 @@ #include <com/sun/star/util/XReplaceDescriptor.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> -#include <svtools/itemprop.hxx> +#include <svl/itemprop.hxx> #include <cppuhelper/implbase3.hxx> diff --git a/sc/inc/stlpool.hxx b/sc/inc/stlpool.hxx index 1028bb5f7673..ce1d643cd27f 100644 --- a/sc/inc/stlpool.hxx +++ b/sc/inc/stlpool.hxx @@ -31,7 +31,7 @@ #ifndef SC_STLPOOL_HXX #define SC_STLPOOL_HXX -#include <svtools/style.hxx> +#include <svl/style.hxx> class ScStyleSheet; diff --git a/sc/inc/stlsheet.hxx b/sc/inc/stlsheet.hxx index 06786dfff69d..ddbbc41b4f80 100644 --- a/sc/inc/stlsheet.hxx +++ b/sc/inc/stlsheet.hxx @@ -31,7 +31,7 @@ #ifndef SC_STLSHEET_HXX #define SC_STLSHEET_HXX -#include <svtools/style.hxx> +#include <svl/style.hxx> //------------------------------------------------------------------------ diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx index 5fb28db3239a..34d1b8d3302c 100644 --- a/sc/inc/styleuno.hxx +++ b/sc/inc/styleuno.hxx @@ -31,8 +31,8 @@ #ifndef SC_STYLEUNO_HXX #define SC_STYLEUNO_HXX -#include <svtools/itemprop.hxx> -#include <svtools/lstner.hxx> +#include <svl/itemprop.hxx> +#include <svl/lstner.hxx> #include <rsc/rscsfx.hxx> #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/style/XStyle.hpp> diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 9fda5d522fdc..f400054d00b7 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -294,6 +294,7 @@ public: } ScBaseCell* GetCell( SCCOL nCol, SCROW nRow ) const; + void GetFirstDataPos(SCCOL& rCol, SCROW& rRow) const; void GetLastDataPos(SCCOL& rCol, SCROW& rRow) const; /** Returns the pointer to a cell note object at the passed cell address. */ diff --git a/sc/inc/targuno.hxx b/sc/inc/targuno.hxx index 3dc549656fa1..db8670521c25 100644 --- a/sc/inc/targuno.hxx +++ b/sc/inc/targuno.hxx @@ -31,7 +31,7 @@ #ifndef SC_TARGUNO_HXX #define SC_TARGUNO_HXX -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <tools/string.hxx> #include <com/sun/star/document/XLinkTargetSupplier.hpp> #include <com/sun/star/lang/XServiceName.hpp> diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx index 8ec7707874be..64eb2aaba696 100644 --- a/sc/inc/textuno.hxx +++ b/sc/inc/textuno.hxx @@ -34,8 +34,8 @@ #include "global.hxx" // ScRange, ScAddress #include "address.hxx" #include <svx/unotext.hxx> -#include <svtools/brdcst.hxx> -#include <svtools/lstner.hxx> +#include <svl/brdcst.hxx> +#include <svl/lstner.hxx> #include <com/sun/star/text/XTextFieldsSupplier.hpp> #include <com/sun/star/sheet/XHeaderFooterContent.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> diff --git a/sc/inc/tokenuno.hxx b/sc/inc/tokenuno.hxx index bcd3435668be..0c573c6961c1 100644 --- a/sc/inc/tokenuno.hxx +++ b/sc/inc/tokenuno.hxx @@ -38,7 +38,7 @@ #include <com/sun/star/sheet/FormulaToken.hpp> #include <com/sun/star/sheet/XFormulaParser.hpp> #include <cppuhelper/implbase3.hxx> -#include <svtools/lstner.hxx> +#include <svl/lstner.hxx> #include <formula/FormulaOpCodeMapperObj.hxx> #include "address.hxx" #include "compiler.hxx" diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx index f4c333656661..2c7dcfe80d91 100644 --- a/sc/inc/unonames.hxx +++ b/sc/inc/unonames.hxx @@ -561,6 +561,10 @@ #define SC_UNO_ROWFIELDCOUNT "RowFieldCount" #define SC_UNO_COLUMNFIELDCOUNT "ColumnFieldCount" #define SC_UNO_DATAFIELDCOUNT "DataFieldCount" +#define SC_UNO_LAYOUTNAME "LayoutName" +#define SC_UNO_FIELD_SUBTOTALNAME "FieldSubtotalName" +#define SC_UNO_GRANDTOTAL_NAME "GrandTotalName" +#define SC_UNO_HAS_HIDDEN_MEMBER "HasHiddenMember" // (preliminary:) #define SC_UNO_REFVALUE "ReferenceValue" diff --git a/sc/inc/unoreflist.hxx b/sc/inc/unoreflist.hxx index 42486071adef..08223d546c57 100644 --- a/sc/inc/unoreflist.hxx +++ b/sc/inc/unoreflist.hxx @@ -32,7 +32,7 @@ #define SC_UNOREFLIST_HXX #include <list> -#include <svtools/hint.hxx> +#include <svl/hint.hxx> #include "rangelst.hxx" diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx index e489cb718163..045ca7aac598 100644 --- a/sc/inc/viewuno.hxx +++ b/sc/inc/viewuno.hxx @@ -32,8 +32,8 @@ #define SC_VIEWUNO_HXX #include <sfx2/sfxbasecontroller.hxx> -#include <svtools/svarray.hxx> -#include <svtools/itemprop.hxx> +#include <svl/svarray.hxx> +#include <svl/itemprop.hxx> #include <com/sun/star/view/XFormLayerAccess.hpp> #include <com/sun/star/view/XSelectionChangeListener.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> @@ -96,13 +96,14 @@ private: USHORT nPane; // ScSplitPos oder SC_VIEWPANE_ACTIVE protected: - ScTabViewShell* GetViewShell() const { return pViewShell; } ::com::sun::star::awt::Rectangle GetVisArea() const; public: ScViewPaneBase(ScTabViewShell* pViewSh, USHORT nP); virtual ~ScViewPaneBase(); + ScTabViewShell* GetViewShell() const { return pViewShell; } + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); @@ -124,7 +125,7 @@ public: getReferredCells() throw(::com::sun::star::uno::RuntimeException); // XFormLayerAccess - virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::XFormController > SAL_CALL + virtual ::com::sun::star::uno::Reference< ::com::sun::star::form::runtime::XFormController > SAL_CALL getFormController( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XForm >& Form ) throw (::com::sun::star::uno::RuntimeException); |