From b8918b363ea7242c304f438a64baf55d19eecddf Mon Sep 17 00:00:00 2001 From: Juergen Funk Date: Wed, 17 Dec 2014 16:23:47 +0100 Subject: fdo#88158 Display two "Open..." entries in the file-menu Migration from Version 3 to 4 make this fail Entry .uno:Open and .uno:OpenFromWriter are the same, skip the entry .uno:OpenFrom Change the operator, and a lot of comments change the match in startWith for better reading change test when old-cmd ".uno:Open" change to the stephan solution Change-Id: I0861c1e7d30b861acc753e3258707f3b6a338768 Signed-off-by: Stephan Bergmann --- desktop/source/migration/migration_impl.hxx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx index bffba28a546d..dc7d48ebf99c 100644 --- a/desktop/source/migration/migration_impl.hxx +++ b/desktop/source/migration/migration_impl.hxx @@ -114,12 +114,20 @@ struct MigrationItem return *this; } + bool areBothOpenFrom(OUString const & cmd1, OUString const & cmd2) + { + return cmd1 == ".uno:Open" && cmd2.startsWith(".uno:OpenFrom"); + } + + bool operator==(const MigrationItem& aMigrationItem) { - return ( aMigrationItem.m_sParentNodeName == m_sParentNodeName && - aMigrationItem.m_sPrevSibling == m_sPrevSibling && - aMigrationItem.m_sCommandURL == m_sCommandURL && - aMigrationItem.m_xPopupMenu.is() == m_xPopupMenu.is() ); + return ((aMigrationItem.m_sCommandURL == m_sCommandURL + || (areBothOpenFrom(aMigrationItem.m_sCommandURL, m_sCommandURL) + || areBothOpenFrom(m_sCommandURL, aMigrationItem.m_sCommandURL))) + && aMigrationItem.m_sParentNodeName == m_sParentNodeName + && aMigrationItem.m_sPrevSibling == m_sPrevSibling + && aMigrationItem.m_xPopupMenu.is() == m_xPopupMenu.is() ); } }; -- cgit value='distro/collabora/cd-5.3'>distro/collabora/cd-5.3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-10x.insert(x.getLength() -> x.appendNoel Grandin
Change-Id: I865dbca65a5b29e35f90070dc743c42289598d9d Reviewed-on: https://gerrit.libreoffice.org/80588 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10rename TakeUnitStr to GetUnitStrNoel Grandin
and return a value instead of an awkward out-parameter Change-Id: Ia78bf0188dd9ca1078230ed7cd020ab77d05757e Reviewed-on: https://gerrit.libreoffice.org/80555 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10rename TakeStr to GetStrNoel Grandin
and return a value instead of the awkward out-parameter Change-Id: I4c2c430329bab45787b3cd67339edce4c1c7a326 Reviewed-on: https://gerrit.libreoffice.org/80551 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-26svdtrans: nPi -> M_PI; nPi180 -> F_PI18000 to remove duplicatesMike Kaganski
Change-Id: Ia2c103a5b530d007f750e4a034b253b3ec5406ec Reviewed-on: https://gerrit.libreoffice.org/68368 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-10loplugin:indentation in svxNoel Grandin
Change-Id: Ifea8e24fb76025715ab2ff495d3949223584070a Reviewed-on: https://gerrit.libreoffice.org/67567 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-08Convert FieldUnit to scoped enumMike Kaganski
Change-Id: Id2df31daa596a18c79af5fc6ea162deb6e24d5af Reviewed-on: https://gerrit.libreoffice.org/62958 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-26tdf#42949 Fix IWYU warnings in include/unotools/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444c43b9d549977039f25bec2b5bf666c3e15e0e Reviewed-on: https://gerrit.libreoffice.org/62041 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-09-17New loplugin:externalStephan Bergmann
...warning about (for now only) functions and variables with external linkage that likely don't need it. The problems with moving entities into unnamed namespacs and breaking ADL (as alluded to in comments in compilerplugins/clang/external.cxx) are illustrated by the fact that while struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } returns 1, both moving just the struct S2 into an nunnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { namespace { struct S2: S1 { int f() { return 1; } }; } int f(S2 s) { return s.f(); } } int main() { return f(N::S2()); } as well as moving just the function f overload into an unnamed namespace, struct S1 { int f() { return 0; } }; int f(S1 s) { return s.f(); } namespace N { struct S2: S1 { int f() { return 1; } }; namespace { int f(S2 s) { return s.f(); } } } int main() { return f(N::S2()); } would each change the program to return 0 instead. Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c Reviewed-on: https://gerrit.libreoffice.org/60539 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-08-03Move angle normalization code from various places to toolsMike Kaganski
Also rename svx angle normalization functions in include/svx/svdtrans.hxx, that deal with 100ths of degree, to avoid confusion: NormAngle180 -> NormAngle18000; NormAngle360 -> NormAngle36000. Some places were fixed that previously returned inclusive ranges (i.e., both 0 and 360), see changes in these files: chart2/source/view/main/PlottingPositionHelper.cxx chart2/source/view/main/PolarLabelPositionHelper.cxx chart2/source/view/main/ShapeFactory.cxx filter/source/graphicfilter/idxf/dxf2mtf.cxx sw/source/core/graphic/grfatr.cxx (the latter now matches the comment in the function). Change-Id: I9f274bbb4168360d60dceff02aeba6332c519a59 Reviewed-on: https://gerrit.libreoffice.org/58556 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-03Remove svx::Round; use FRound from tools insteadMike Kaganski
Change-Id: Idb8d16f59823d9065b82d6312def36601457af1a Reviewed-on: https://gerrit.libreoffice.org/58546 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-03NormAngle180: avoid two extra operationsMike Kaganski
Change-Id: Ib661c57c652c407baef3b6b7390be731fa83ab5d Reviewed-on: https://gerrit.libreoffice.org/58545 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-08-02Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from stoc to svx Change-Id: If562b1aa1d676d2c1cf513e953238abbb846c65c Reviewed-on: https://gerrit.libreoffice.org/58224 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-21loplugin:changetoolsgen in svxNoel Grandin
and fix the regex in the plugin for matching += operator Change-Id: I26b3e3fac1d4ef3e756cc9431b983b5f27ee76d6 Reviewed-on: https://gerrit.libreoffice.org/50037 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-12More loplugin:cstylecast: svxStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I100e6c14cbf1d780f0e5ebca6b0c9e71ce1caaf7
2017-08-04rename Anz->Cnt in svxNoel Grandin
Change-Id: Idbe6849d36727c382ffd11d6bf04e78d6a66a878 Reviewed-on: https://gerrit.libreoffice.org/40740 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-07loplugin:unnecessaryparen handle parens inside call exprNoel Grandin
stick to single-arg function calls, sometimes parens in multi-arg calls might be there for clarity Change-Id: Ib80190c571ce65b5d219a88056687042de749e74 Reviewed-on: https://gerrit.libreoffice.org/39676 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08cleanup tools/debug.hxx includesJochen Nitschke
with command > git grep -l tools/debug.hxx | xargs grep -L DBG_ | xargs sed -i '/#include *\(<\|\"\)tools\/debug.hxx.*/d' don't change files in includes/ and */pch Change-Id: Ie429d6a7dca5dfa1073e0f5ba037f7c84bdbec08 Reviewed-on: https://gerrit.libreoffice.org/37349 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-27Translate German comments (rest of svx/ except svx/source/form/)Johnny_M
Change-Id: Ib0fccc41c71902861f450c6184f57be2c5da0811 Reviewed-on: https://gerrit.libreoffice.org/36804 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>