summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/inc')
-rw-r--r--sc/source/ui/inc/AccessibleContextBase.hxx2
-rw-r--r--sc/source/ui/inc/docfunc.hxx4
-rwxr-xr-x[-rw-r--r--]sc/source/ui/inc/docsh.hxx14
-rw-r--r--sc/source/ui/inc/dpcontrol.hxx4
-rw-r--r--sc/source/ui/inc/gridwin.hxx20
-rw-r--r--sc/source/ui/inc/miscdlgs.hrc6
-rw-r--r--sc/source/ui/inc/tabbgcolordlg.hxx80
-rw-r--r--sc/source/ui/inc/undotab.hxx28
-rw-r--r--sc/source/ui/inc/viewfunc.hxx5
-rw-r--r--sc/source/ui/inc/viewutil.hxx4
10 files changed, 158 insertions, 9 deletions
diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx
index 191f56c22d3d..ecfeff96af39 100644
--- a/sc/source/ui/inc/AccessibleContextBase.hxx
+++ b/sc/source/ui/inc/AccessibleContextBase.hxx
@@ -316,8 +316,6 @@ protected:
/// Use this method to set initial Description without notification
void SetDescription(const rtl::OUString& rDesc) { msDescription = rDesc; }
- void SetRole(sal_Int16 nRole);
-
/// Reference to the parent object.
::com::sun::star::uno::Reference<
::com::sun::star::accessibility::XAccessible> mxParent;
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index df4ff685816f..c92cc082986d 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -31,6 +31,7 @@
#include <tools/link.hxx>
#include "global.hxx"
#include "formula/grammar.hxx"
+#include "tabbgcolor.hxx"
class ScEditEngineDefaulter;
class SdrUndoAction;
@@ -117,6 +118,9 @@ public:
BOOL RenameTable( SCTAB nTab, const String& rName, BOOL bRecord, BOOL bApi );
BOOL DeleteTable( SCTAB nTab, BOOL bRecord, BOOL bApi );
+ bool SetTabBgColor( SCTAB nTab, const Color& rColor, bool bRecord, bool bApi );
+ bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoTabColorList, bool bRecord, bool bApi );
+
BOOL SetTableVisible( SCTAB nTab, BOOL bVisible, BOOL bApi );
BOOL SetLayoutRTL( SCTAB nTab, BOOL bRTL, BOOL bApi );
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 09d34c661995..5b4fc6227225 100644..100755
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -125,7 +125,7 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener
SC_DLLPRIVATE void InitItems();
SC_DLLPRIVATE void DoEnterHandler();
- SC_DLLPRIVATE void InitOptions();
+ SC_DLLPRIVATE void InitOptions(bool bForLoading);
SC_DLLPRIVATE void ResetDrawObjectShell();
// SUNWS needs a forward declared friend, otherwise types and members
@@ -418,8 +418,20 @@ public:
sal_Bool AcceptStateUpdate() const;
//-->Added by PengYunQuan for Validity Cell Range Picker
ScSheetSaveData* GetSheetSaveData();
+
+ // passwword protection for Calc (derived from SfxObjectShell)
+ // see also: FID_CHG_RECORD, SID_CHG_PROTECT
+ virtual bool IsChangeRecording() const;
+ virtual bool HasChangeRecordProtection() const;
+ virtual void SetChangeRecording( bool bActivate );
+ virtual bool SetProtectionPassword( const String &rPassword );
+ virtual bool GetProtectionHash( /*out*/ ::com::sun::star::uno::Sequence< sal_Int8 > &rPasswordHash );
};
+
+void UpdateAcceptChangesDialog();
+
+
SO2_DECL_REF(ScDocShell)
SO2_IMPL_REF(ScDocShell)
diff --git a/sc/source/ui/inc/dpcontrol.hxx b/sc/source/ui/inc/dpcontrol.hxx
index 40e6167aee48..15f0c9174cc8 100644
--- a/sc/source/ui/inc/dpcontrol.hxx
+++ b/sc/source/ui/inc/dpcontrol.hxx
@@ -76,7 +76,6 @@ public:
void draw();
void getPopupBoundingBox(Point& rPos, Size& rSize) const;
- bool isPopupButton() const;
private:
void drawPopupButton();
@@ -127,9 +126,6 @@ public:
void selectMenuItem(size_t nPos, bool bSelected, bool bSubMenuTimer);
void clearSelectedMenuItem();
ScMenuFloatingWindow* getSubMenuWindow(size_t nPos) const;
- size_t getMenuItemCount() const;
- ::rtl::OUString getMenuItemName(size_t nPos) const;
- bool isMenuItemEnabled(size_t nPos) const;
bool isMenuItemSelected(size_t nPos) const;
size_t getSelectedMenuItem() const;
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 4d6ef782aed6..a2283bf2b7de 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -39,6 +39,7 @@
#include <vector>
#include <memory>
+#include <boost/shared_ptr.hpp>
// ---------------------------------------------------------------------------
@@ -112,6 +113,25 @@ private:
::sdr::overlay::OverlayObjectList* mpOOHeader;
::sdr::overlay::OverlayObjectList* mpOOShrink;
+ ::boost::shared_ptr<Rectangle> mpAutoFillRect;
+
+ /**
+ * Stores current visible column and row ranges, used to avoid expensive
+ * operations on objects that are outside visible area.
+ */
+ struct VisibleRange
+ {
+ SCCOL mnCol1;
+ SCCOL mnCol2;
+ SCROW mnRow1;
+ SCROW mnRow2;
+
+ VisibleRange();
+
+ bool isInside(SCCOL nCol, SCROW nRow) const;
+ };
+ VisibleRange maVisibleRange;
+
private:
ScViewData* pViewData;
ScSplitPos eWhich;
diff --git a/sc/source/ui/inc/miscdlgs.hrc b/sc/source/ui/inc/miscdlgs.hrc
index 908a6bd2221c..becd05165a4e 100644
--- a/sc/source/ui/inc/miscdlgs.hrc
+++ b/sc/source/ui/inc/miscdlgs.hrc
@@ -181,3 +181,9 @@
#define BTN_GROUP_ROWS 3
#define STR_GROUP 1
#define STR_UNGROUP 2
+
+// Tab Bg Color
+#define TAB_BG_COLOR_CT_BORDER 1
+#define TAB_BG_COLOR_SET_BGDCOLOR 2
+#define TAB_BG_COLOR_GB_BGDCOLOR 3
+
diff --git a/sc/source/ui/inc/tabbgcolordlg.hxx b/sc/source/ui/inc/tabbgcolordlg.hxx
new file mode 100644
index 000000000000..241fc806022d
--- /dev/null
+++ b/sc/source/ui/inc/tabbgcolordlg.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: tabbgcolordlg.hxx,v $
+ * $Revision: 1.0 $
+ *
+ * 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_TABBGCOLORDLG_HXX
+#define SC_TABBGCOLORDLG_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/imagebtn.hxx>
+#include <svtools/valueset.hxx>
+
+//------------------------------------------------------------------------
+
+class ScTabBgColorDlg : public ModalDialog
+{
+public:
+ ScTabBgColorDlg( Window* pParent,
+ const String& rTitle,
+ const String& rTabBgColorNoColorText,
+ const Color& rDefaultColor,
+ ULONG nHelpId );
+ ~ScTabBgColorDlg();
+
+ void GetSelectedColor( Color& rColor ) const;
+
+private:
+ class ScTabBgColorValueSet : public ValueSet
+ {
+ public:
+ ScTabBgColorValueSet(Control* pParent, const ResId& rResId, ScTabBgColorDlg* pTabBgColorDlg);
+
+ virtual void KeyInput( const KeyEvent& rKEvt );
+ private:
+ ScTabBgColorDlg* aTabBgColorDlg;
+ };
+
+ Control aBorderWin;
+ ScTabBgColorValueSet aTabBgColorSet;
+ FixedLine aTabBgColorBox;
+ OKButton aBtnOk;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+ Color aTabBgColor;
+ const String aTabBgColorNoColorText;
+ ULONG mnHelpId;
+
+ void FillColorValueSets_Impl();
+
+ DECL_LINK( TabBgColorDblClickHdl_Impl, ValueSet* );
+ DECL_LINK( TabBgColorOKHdl_Impl, OKButton* pBtn );
+};
+
+#endif // SC_TABBGCOLORDLG_HXX
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index 276ea3d7e204..c8d135070ab1 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -32,6 +32,7 @@
#include "markdata.hxx"
#include "formula/grammar.hxx"
#include <tools/color.hxx>
+#include "tabbgcolor.hxx"
#ifndef _SVSTDARR_SHORTS
@@ -223,6 +224,33 @@ private:
void DoChange() const;
};
+class ScUndoTabColor: public ScSimpleUndo
+{
+public:
+ TYPEINFO();
+ ScUndoTabColor(
+ ScDocShell* pNewDocShell,
+ SCTAB nT,
+ const Color& aOTabBgColor,
+ const Color& aNTabBgColor);
+ ScUndoTabColor(
+ ScDocShell* pNewDocShell,
+ const ScUndoTabColorInfo::List& rUndoTabColorList);
+ virtual ~ScUndoTabColor();
+
+ virtual void Undo();
+ virtual void Redo();
+ virtual void Repeat(SfxRepeatTarget& rTarget);
+ virtual BOOL CanRepeat(SfxRepeatTarget& rTarget) const;
+
+virtual String GetComment() const;
+
+private:
+ ScUndoTabColorInfo::List aTabColorList;
+ bool bIsMultipleUndo;
+
+ void DoChange(bool bUndoType) const;
+};
class ScUndoMakeScenario: public ScSimpleUndo
{
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index 21feb272c339..59da2966cc60 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -29,6 +29,8 @@
#include "tabview.hxx"
+#include "tabbgcolor.hxx"
+
#ifndef _SVSTDARR_SHORTS
#define _SVSTDARR_SHORTS
#include <svl/svstdarr.hxx>
@@ -273,6 +275,9 @@ public:
SCTAB nCount, const SCTAB* pSrcTabs,
BOOL bLink,SCTAB nTab);
+ bool SetTabBgColor( const Color& rColor, SCTAB nTabNr );
+ bool SetTabBgColor( ScUndoTabColorInfo::List& rUndoSetTabBgColorInfoList );
+
void InsertTableLink( const String& rFile,
const String& rFilter, const String& rOptions,
const String& rTabName );
diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx
index 8b103d3761d8..eb1c6df2f902 100644
--- a/sc/source/ui/inc/viewutil.hxx
+++ b/sc/source/ui/inc/viewutil.hxx
@@ -68,10 +68,10 @@ public:
static sal_Int32 GetTransliterationType( USHORT nSlotID );
- static bool HasFiltered( const ScRange& rRange, const ScDocument* pDoc );
+ static bool HasFiltered( const ScRange& rRange, ScDocument* pDoc );
/** Fit a range to cover nRows number of unfiltered rows.
@return <TRUE/> if the resulting range covers nRows unfiltered rows. */
- static bool FitToUnfilteredRows( ScRange & rRange, const ScDocument * pDoc, size_t nRows );
+ static bool FitToUnfilteredRows( ScRange & rRange, ScDocument * pDoc, size_t nRows );
static void UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc );
static void HideDisabledSlot( SfxItemSet& rSet, SfxBindings& rBindings, USHORT nSlotId );