f41
David Tardon 13 years ago
parent 213c9297f0
commit bb3b45fb4e

4
.gitignore vendored

@ -81,3 +81,7 @@
/libreoffice-core-3.5.2.1.tar.xz
/libreoffice-help-3.5.2.1.tar.xz
/libreoffice-translations-3.5.2.1.tar.xz
/libreoffice-binfilter-3.5.3.1.tar.xz
/libreoffice-core-3.5.3.1.tar.xz
/libreoffice-help-3.5.3.1.tar.xz
/libreoffice-translations-3.5.3.1.tar.xz

File diff suppressed because it is too large Load Diff

@ -1,111 +0,0 @@
From 05579aa8b26f593af650d8434ff1c25c0a2702a6 Mon Sep 17 00:00:00 2001
Message-Id: <05579aa8b26f593af650d8434ff1c25c0a2702a6.1334752453.git.erack@redhat.com>
From: Eike Rathke <erack@redhat.com>
Date: Tue, 17 Apr 2012 20:57:34 +0200
Subject: [PATCH] resolved rhbz#813280 the current document is not always the
first in list
i.e. if more than one document open and dialog invoked on any but the first
document.
Signed-off-by: Kohei Yoshida <kohei.yoshida@gmail.com>
---
sc/source/ui/inc/mvtabdlg.hxx | 2 ++
sc/source/ui/miscdlgs/mvtabdlg.cxx | 27 +++++++++++++++++----------
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx
index c53a59f..f9c63a3 100644
--- a/sc/source/ui/inc/mvtabdlg.hxx
+++ b/sc/source/ui/inc/mvtabdlg.hxx
@@ -58,6 +58,7 @@ private:
void ResetRenameInput();
void CheckNewTabName();
ScDocument* GetSelectedDoc();
+ bool IsCurrentDocSelected() const;
private:
FixedLine aFlAction;
@@ -82,6 +83,7 @@ private:
const rtl::OUString maDefaultName;
+ sal_uInt16 mnCurrentDocPos;
sal_uInt16 nDocument;
SCTAB nTable;
bool bCopyTable:1;
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index 831905d..ffe96af 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -70,6 +70,7 @@ ScMoveTableDlg::ScMoveTableDlg(Window* pParent, const rtl::OUString& rDefault)
maStrTabNameInvalid( ResId::toString(ScResId(STR_TABNAME_WARN_INVALID)) ),
//
maDefaultName( rDefault ),
+ mnCurrentDocPos( 0 ),
nDocument ( 0 ),
nTable ( 0 ),
bCopyTable ( false ),
@@ -127,8 +128,13 @@ void ScMoveTableDlg::EnableRenameTable(sal_Bool bFlag)
void ScMoveTableDlg::ResetRenameInput()
{
if (mbEverEdited)
+ {
// Don't reset the name when the sheet name has ever been edited.
+ // But check the name, as this is also called for change of copy/move
+ // buttons and document listbox selection.
+ CheckNewTabName();
return;
+ }
if (!aEdTabName.IsEnabled())
{
@@ -178,19 +184,15 @@ void ScMoveTableDlg::CheckNewTabName()
return;
}
- bool bFound = false;
+ bool bMoveInCurrentDoc = (aBtnMove.IsChecked() && IsCurrentDocSelected());
+ bool bFound = false;
sal_uInt16 nLast = aLbTable.GetEntryCount() - 1;
- for ( sal_uInt16 i=0; i<=nLast; ++i )
+ for ( sal_uInt16 i=0; i<=nLast && !bFound; ++i )
{
if ( aNewName.equals(aLbTable.GetEntry(i)) )
{
- if (aBtnMove.IsChecked() &&
- aLbDoc.GetSelectEntryPos() == 0 &&
- maDefaultName.equals(aEdTabName.GetText()))
-
- // Move inside same document, thus same name is allowed.
- bFound = false;
- else
+ // Only for move within same document the same name is allowed.
+ if (!bMoveInCurrentDoc || !maDefaultName.equals( aEdTabName.GetText()))
bFound = true;
}
}
@@ -214,6 +216,11 @@ ScDocument* ScMoveTableDlg::GetSelectedDoc()
return static_cast<ScDocument*>(aLbDoc.GetEntryData(nPos));
}
+bool ScMoveTableDlg::IsCurrentDocSelected() const
+{
+ return aLbDoc.GetSelectEntryPos() == mnCurrentDocPos;
+}
+
//------------------------------------------------------------------------
void ScMoveTableDlg::Init()
@@ -254,7 +261,7 @@ void ScMoveTableDlg::InitDocListBox()
if ( pScSh == SfxObjectShell::Current() )
{
- nSelPos = i;
+ mnCurrentDocPos = nSelPos = i;
aEntryName += sal_Unicode( ' ' );
aEntryName += String( ScResId( STR_CURRENTDOC ) );
}
--
1.7.7.6

@ -1,4 +1,4 @@
%define libo_version 3.5.2
%define libo_version 3.5.3
# rhbz#715152 state vendor
%if 0%{?rhel}
%define vendoroption --with-vendor="Red Hat, Inc."
@ -14,8 +14,8 @@
%define langpacks 1
# make it easier to download sources from pre-release site
# http://dev-builds.libreoffice.org/pre-releases/src
#%define source_url http://dev-builds.libreoffice.org/pre-releases/src
%define source_url http://download.documentfoundation.org/libreoffice/src/%{libo_version}
%define source_url http://dev-builds.libreoffice.org/pre-releases/src
# %%define source_url http://download.documentfoundation.org/libreoffice/src/%{libo_version}
%if %{langpacks}
%if %{defined rhel} && 0%{?rhel} < 7
@ -35,7 +35,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.1
Release: 7%{?dist}
Release: 1%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic
Group: Applications/Productivity
URL: http://www.documentfoundation.org/develop
@ -142,10 +142,7 @@ Patch26: 0001-fix-setting-of-paper-tray-from-print-dialog-fdo-4393.patch
Patch27: 0001-Resolves-rhbz-806663-SlideshowImpl-can-outlive-SdMod.patch
Patch28: 0001-desktop-do-not-complain-about-soffice-command-line-o.patch
Patch29: 0001-Resolves-fdo-48096-torn-off-popups-trigger-keyboard-.patch
Patch30: 0001-Introduced-SystemShellExecuteFlags-URIS_ONLY.patch
Patch31: 0001-Simplify-code-and-use-proper-register-names-for-linu.patch
Patch32: 0001-fdo-38088-better-CSV-import-default-separators.patch
Patch33: 0001-resolved-rhbz-813280-the-current-document-is-not-alw.patch
Patch30: 0001-fdo-38088-better-CSV-import-default-separators.patch
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define instdir %{_libdir}
@ -999,10 +996,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
%patch27 -p1 -b .rhbz-806663-SlideshowImpl-can-outlive-SdMod.patch
%patch28 -p1 -b .do-not-complain-about-soffice-command-line-o.patch
%patch29 -p1 -b .fdo48096-torn-off-popups-trigger-keyboard-.patch
%patch30 -p1 -b .Introduced-SystemShellExecuteFlags-URIS_ONLY.patch
%patch31 -p1 -b .Simplify-code-and-use-proper-register-names-for-linu.patch
%patch32 -p1 -b .fdo-38088-better-CSV-import-default-separators.patch
%patch33 -p1 -b .resolved-rhbz-813280-the-current-document-is-not-alw.patch
%patch30 -p1 -b .fdo-38088-better-CSV-import-default-separators.patch
# TODO: check this
# these are horribly incomplete--empty translations and copied english
@ -2290,6 +2284,12 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%endif
%changelog
* Thu Apr 19 2012 David Tardon <dtardon@redhat.com> - 3.5.3.1-1
- 3.5.3 rc1
- drop integrated 0001-Introduced-SystemShellExecuteFlags-URIS_ONLY.patch
- drop integrated 0001-Simplify-code-and-use-proper-register-names-for-linu.patch
- drop integrated 0001-resolved-rhbz-813280-the-current-document-is-not-alw.patch
* Wed Apr 18 2012 Eike Rathke <erack@redhat.com> - 3.5.2.1-7
- Resolves: rhbz#813280 sheets cannot be moved in Calc

@ -13,3 +13,7 @@ d18c2dcdb448d2ee17cd9eed0d94cb8c libreoffice-binfilter-3.5.2.1.tar.xz
100dd5e9de3496dd412d78a4afdcb4cc libreoffice-core-3.5.2.1.tar.xz
41cca7337c78df96c7b473f80d27f31f libreoffice-help-3.5.2.1.tar.xz
74ecbd5aca5b696b817457ec6f1cd05e libreoffice-translations-3.5.2.1.tar.xz
d0844c545fada25c406732b025b8e991 libreoffice-binfilter-3.5.3.1.tar.xz
a130f16f02815502fa9e69c0416aae00 libreoffice-core-3.5.3.1.tar.xz
82249b6d6dfe9fc68118cd85f0297cba libreoffice-help-3.5.3.1.tar.xz
152de336535b8a2da4a694c1dfd64275 libreoffice-translations-3.5.3.1.tar.xz

Loading…
Cancel
Save