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/namedefdlg.hxx7
-rw-r--r--sc/source/ui/inc/namedlg.hxx31
-rw-r--r--sc/source/ui/inc/namemgrtable.hxx59
-rw-r--r--sc/source/ui/inc/namepast.hxx5
4 files changed, 69 insertions, 33 deletions
diff --git a/sc/source/ui/inc/namedefdlg.hxx b/sc/source/ui/inc/namedefdlg.hxx
index 2ab03b18997b..33a1ae2cacbf 100644
--- a/sc/source/ui/inc/namedefdlg.hxx
+++ b/sc/source/ui/inc/namedefdlg.hxx
@@ -38,7 +38,7 @@
class ScRangeName;
class ScDocument;
-class ScNameDefDlg : public ModalDialog
+class ScNameDefDlg : public ScAnyRefDlg
{
private:
PushButton maBtnAdd;
@@ -77,9 +77,10 @@ private:
DECL_LINK( AddBtnHdl, void* );
DECL_LINK( NameModifyHdl, void* );
public:
- ScNameDefDlg(Window* pParent, ScDocument* pDoc, std::map<rtl::OUString, ScRangeName*> aRangeMap, const ScAddress& aCursorPos, const bool bUndo);
+ ScNameDefDlg( SfxBindings* pB, SfxChildWindow* pCW, Window* pParent,
+ ScDocument* pDoc, std::map<rtl::OUString, ScRangeName*> aRangeMap,
+ const ScAddress& aCursorPos, const bool bUndo);
};
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx
index 1f087d13fa6b..7dc6a0d9f009 100644
--- a/sc/source/ui/inc/namedlg.hxx
+++ b/sc/source/ui/inc/namedlg.hxx
@@ -35,10 +35,10 @@
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/ctrl.hxx>
-#include <svtools/headbar.hxx>
-#include <svtools/svtabbx.hxx>
+
#include "rangenam.hxx"
#include "anyrefdg.hxx"
+#include "namemgrtable.hxx"
#include <boost/ptr_container/ptr_map.hpp>
#include <boost/ptr_container/ptr_set.hpp>
@@ -48,35 +48,8 @@
class ScViewData;
class ScDocument;
-struct ScNameDlgImpl;
-struct ScRangeNameLine
-{
- rtl::OUString aName;
- rtl::OUString aExpression;
- rtl::OUString aScope;
-};
-//Implements the table for the manage names dialog
-//TODO: cache the lines for performance improvements
-//otherwise handling of a large set of range names might get extremely slow
-//Need some sort of a filter to handle several range names
-class ScRangeManagerTable : public SvTabListBox
-{
-private:
- HeaderBar maHeaderBar;
- ScRangeName* mpGlobalRangeName;
- std::map<rtl::OUString, ScRangeName*> maTabRangeNames;
- rtl::OUString maGlobalString;
-public:
- ScRangeManagerTable( Window* pParent, ScRangeName* pGlobalRangeName, std::map<rtl::OUString, ScRangeName*> aTabRangeNames );
- ~ScRangeManagerTable() {};
-
- void addEntry( const ScRangeNameLine& rLine );
-
- void GetCurrentLine(ScRangeNameLine& rLine);
- void UpdateEntries();
-};
class ScRangeManagerCtrl : public Control
{
diff --git a/sc/source/ui/inc/namemgrtable.hxx b/sc/source/ui/inc/namemgrtable.hxx
new file mode 100644
index 000000000000..52d864f235e2
--- /dev/null
+++ b/sc/source/ui/inc/namemgrtable.hxx
@@ -0,0 +1,59 @@
+/* -*- 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 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.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2011 Markus Mohrhard <markus.mohrhard@googlemail.com> (initial developer)
+ *
+ * All Rights Reserved.
+ *
+ * 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.
+ */
+#include <svtools/headbar.hxx>
+#include <svtools/svtabbx.hxx>
+
+struct ScRangeNameLine
+{
+ rtl::OUString aName;
+ rtl::OUString aExpression;
+ rtl::OUString aScope;
+};
+
+//Implements the table for the manage names dialog
+//TODO: cache the lines for performance improvements
+//otherwise handling of a large set of range names might get extremely slow
+//Need some sort of a filter to handle several range names
+SC_DLLPUBLIC class ScRangeManagerTable : public SvTabListBox
+{
+private:
+ HeaderBar maHeaderBar;
+ ScRangeName* mpGlobalRangeName;
+ std::map<rtl::OUString, ScRangeName*> maTabRangeNames;
+ rtl::OUString maGlobalString;
+public:
+ ScRangeManagerTable( Window* pParent, ScRangeName* pGlobalRangeName, std::map<rtl::OUString, ScRangeName*> aTabRangeNames );
+ ~ScRangeManagerTable() {};
+
+ void addEntry( const ScRangeNameLine& rLine );
+
+ void GetCurrentLine(ScRangeNameLine& rLine);
+ void UpdateEntries();
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/namepast.hxx b/sc/source/ui/inc/namepast.hxx
index a5d7e8127ab7..618201aead6c 100644
--- a/sc/source/ui/inc/namepast.hxx
+++ b/sc/source/ui/inc/namepast.hxx
@@ -34,6 +34,8 @@
#include <vcl/fixed.hxx>
#include <vcl/lstbox.hxx>
+#include <vector>
+
#include "scui_def.hxx"
class ScRangeName;
@@ -53,7 +55,8 @@ protected:
public:
ScNamePasteDlg( Window * pParent, const ScRangeName* pList, const ScRangeName* pLocalList, bool bInsList=true );
- String GetSelectedName() const;
+ std::vector<rtl::OUString> GetSelectedNames() const;
+ bool IsAllSelected() const;
};