[Libreoffice-commits] .: 2 commits - svx/inc svx/source
Eike Rathke
erack at kemper.freedesktop.org
Wed Aug 10 05:36:10 PDT 2011
svx/inc/svx/numfmtsh.hxx | 9 +-
svx/source/dialog/makefile.mk | 154 ----------------------------------------
svx/source/form/makefile.mk | 117 ------------------------------
svx/source/gallery2/makefile.mk | 65 ----------------
svx/source/gengal/makefile.mk | 80 --------------------
svx/source/items/makefile.mk | 84 ---------------------
svx/source/items/numfmtsh.cxx | 63 +++++-----------
svx/source/stbctrls/makefile.mk | 75 -------------------
8 files changed, 29 insertions(+), 618 deletions(-)
New commits:
commit 0ad32ea62a4c6c066c74c6be507071ff4e7be331
Author: Eike Rathke <erack at erack.de>
Date: Wed Aug 10 14:34:38 2011 +0200
remove superfluous makefile.mk
diff --git a/svx/source/dialog/makefile.mk b/svx/source/dialog/makefile.mk
deleted file mode 100755
index 2f1d36c..0000000
--- a/svx/source/dialog/makefile.mk
+++ /dev/null
@@ -1,154 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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.
-#
-#*************************************************************************
-PRJ=..$/..
-PRJNAME=svx
-TARGET=dialogs
-LIBTARGET=NO
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-#
-.IF "$(GUI)"=="WNT"
-CFLAGS+= -DUNICODE -D_UNICODE
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=dialogs
-SRC1FILES = \
- bmpmask.src \
- contdlg.src \
- ctredlin.src \
- dlgctrl.src \
- docrecovery.src \
- fontwork.src \
- frmsel.src \
- hdft.src \
- imapdlg.src \
- langbox.src \
- language.src \
- linkwarn.src \
- passwd.src \
- prtqry.src \
- rubydialog.src\
- ruler.src \
- srchdlg.src \
- svxbmpnumvalueset.src \
- swframeposstrings.src \
- txenctab.src \
- ucsubset.src \
- optgrid.src
-
-SRS2NAME=drawdlgs
-SRC2FILES = \
- sdstring.src
-
-LIB1TARGET=$(SLB)$/$(TARGET)-core.lib
-
-LIB1OBJFILES= \
- $(SLO)$/checklbx.obj \
- $(SLO)$/dialmgr.obj\
- $(SLO)$/dlgutil.obj \
- $(SLO)$/framelink.obj\
- $(SLO)$/langbox.obj \
- $(SLO)$/simptabl.obj \
- $(SLO)$/svxdlg.obj \
- $(SLO)$/stddlg.obj \
-
-LIB2TARGET=$(SLB)$/$(TARGET).lib
-
-LIB2OBJFILES= \
- $(SLO)$/charmap.obj \
- $(SLO)$/connctrl.obj \
- $(SLO)$/contwnd.obj \
- $(SLO)$/ctredlin.obj \
- $(SLO)$/databaseregistrationui.obj \
- $(SLO)$/dialcontrol.obj \
- $(SLO)$/dlgctl3d.obj \
- $(SLO)$/dlgctrl.obj \
- $(SLO)$/docrecovery.obj \
- $(SLO)$/fntctrl.obj \
- $(SLO)$/fontlb.obj \
- $(SLO)$/fontwork.obj \
- $(SLO)$/framelinkarray.obj \
- $(SLO)$/frmdirlbox.obj \
- $(SLO)$/frmsel.obj \
- $(SLO)$/graphctl.obj \
- $(SLO)$/grfflt.obj \
- $(SLO)$/hdft.obj \
- $(SLO)$/hyperdlg.obj \
- $(SLO)$/imapdlg.obj \
- $(SLO)$/imapwnd.obj \
- $(SLO)$/linkwarn.obj \
- $(SLO)$/measctrl.obj \
- $(SLO)$/orienthelper.obj \
- $(SLO)$/pagectrl.obj \
- $(SLO)$/paraprev.obj \
- $(SLO)$/passwd.obj \
- $(SLO)$/pfiledlg.obj \
- $(SLO)$/prtqry.obj \
- $(SLO)$/relfld.obj \
- $(SLO)$/rlrcitem.obj \
- $(SLO)$/rubydialog.obj \
- $(SLO)$/rulritem.obj \
- $(SLO)$/SpellDialogChildWindow.obj \
- $(SLO)$/srchctrl.obj \
- $(SLO)$/srchdlg.obj \
- $(SLO)$/strarray.obj \
- $(SLO)$/svxbmpnumvalueset.obj\
- $(SLO)$/svxgrahicitem.obj \
- $(SLO)$/svxruler.obj \
- $(SLO)$/swframeexample.obj \
- $(SLO)$/swframeposstrings.obj \
- $(SLO)$/txencbox.obj \
- $(SLO)$/txenctab.obj \
- $(SLO)$/wrapfield.obj \
- $(SLO)$/_bmpmask.obj \
- $(SLO)$/_contdlg.obj \
- $(SLO)$/optgrid.obj
-
-
-.IF "$(GUI)"=="UNX"
-LIB2OBJFILES += $(SLO)$/sendreportunx.obj
-.ELSE
-.IF "$(GUI)"=="WNT"
-LIB2OBJFILES += $(SLO)$/sendreportw32.obj
-.ELSE
-LIB2OBJFILES += $(SLO)$/sendreportgen.obj
-.ENDIF
-.ENDIF
-
-SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/svx/source/form/makefile.mk b/svx/source/form/makefile.mk
deleted file mode 100755
index 1088283..0000000
--- a/svx/source/form/makefile.mk
+++ /dev/null
@@ -1,117 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=svx
-TARGET=form
-LIBTARGET=NO
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-CDEFS+=-DENABLE_VBA
-
-SRS1NAME=form
-SRC1FILES= \
- fmexpl.src \
- filtnav.src \
- fmstring.src \
- formshell.src \
- datanavi.src
-
-LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
-LIB1OBJFILES= \
- $(SLO)$/formtoolbars.obj \
- $(SLO)$/fmdocumentclassification.obj \
- $(SLO)$/fmcontrolbordermanager.obj \
- $(SLO)$/fmcontrollayout.obj \
- $(SLO)$/fmtextcontroldialogs.obj \
- $(SLO)$/fmtextcontrolfeature.obj \
- $(SLO)$/fmtextcontrolshell.obj \
- $(SLO)$/ParseContext.obj \
- $(SLO)$/typeconversionclient.obj \
- $(SLO)$/dbtoolsclient.obj \
- $(SLO)$/sqlparserclient.obj \
- $(SLO)$/dataaccessdescriptor.obj \
- $(SLO)$/fmpage.obj \
- $(SLO)$/fmundo.obj \
- $(SLO)$/fmmodel.obj \
- $(SLO)$/navigatortree.obj \
- $(SLO)$/navigatortreemodel.obj \
- $(SLO)$/fmexpl.obj \
- $(SLO)$/formcontroller.obj \
- $(SLO)$/fmpgeimp.obj \
- $(SLO)$/fmvwimp.obj \
- $(SLO)$/fmdpage.obj \
- $(SLO)$/fmitems.obj \
- $(SLO)$/fmobj.obj \
- $(SLO)$/fmdmod.obj \
- $(SLO)$/fmservs.obj \
- $(SLO)$/typemap.obj \
- $(SLO)$/fmexch.obj \
- $(SLO)$/fmtools.obj \
- $(SLO)$/fmshimp.obj \
- $(SLO)$/fmshell.obj \
- $(SLO)$/fmview.obj \
- $(SLO)$/sdbdatacolumn.obj \
- $(SLO)$/formcontrolling.obj \
- $(SLO)$/formfeaturedispatcher.obj \
- $(SLO)$/formdispatchinterceptor.obj \
- $(SLO)$/datanavi.obj \
- $(SLO)$/xfm_addcondition.obj \
- $(SLO)$/datalistener.obj \
- $(SLO)$/fmscriptingenv.obj \
- $(SLO)$/stringlistresource.obj \
- $(SLO)$/delayedevent.obj \
- $(SLO)$/formcontrolfactory.obj \
- $(SLO)$/legacyformcontroller.obj
-
-LIB2TARGET= $(SLB)$/$(TARGET).lib
-LIB2OBJFILES= \
- $(SLO)$/dbcharsethelper.obj \
- $(SLO)$/fmPropBrw.obj \
- $(SLO)$/tbxform.obj \
- $(SLO)$/fmobjfac.obj \
- $(SLO)$/fmsrccfg.obj \
- $(SLO)$/tabwin.obj \
- $(SLO)$/filtnav.obj \
- $(SLO)$/fmsrcimp.obj \
- $(SLO)$/databaselocationinput.obj
-
-SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
-
-# --- Targets ----------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/svx/source/gallery2/makefile.mk b/svx/source/gallery2/makefile.mk
deleted file mode 100755
index 7f1a3bb..0000000
--- a/svx/source/gallery2/makefile.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ=..$/..
-PRJNAME=svx
-TARGET=gal
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- gallery.src \
- galtheme.src
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/codec.obj
-
-EXCEPTIONSFILES = \
- $(SLO)$/galbrws.obj \
- $(SLO)$/galbrws1.obj \
- $(SLO)$/galbrws2.obj \
- $(SLO)$/galctrl.obj \
- $(SLO)$/galexpl.obj \
- $(SLO)$/gallery1.obj \
- $(SLO)$/galmisc.obj \
- $(SLO)$/galobj.obj \
- $(SLO)$/galtheme.obj
-
-RESLIB1NAME = $(TARGET)
-RESLIB1IMAGES = $(PRJ)$/res
-RESLIB1SRSFILES = $(SRS)$/$(TARGET).srs
-
-# --- Targets --------------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/svx/source/gengal/makefile.mk b/svx/source/gengal/makefile.mk
deleted file mode 100755
index 82e4822..0000000
--- a/svx/source/gengal/makefile.mk
+++ /dev/null
@@ -1,80 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=svx
-
-TARGET=gengal
-TARGETTYPE=GUI
-LIBTARGET=NO
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SCRIPTFILES = $(BIN)$/gengal
-
-OBJFILES= $(OBJ)$/gengal.obj
-
-.IF "$(GUI)"=="WNT"
-APP1TARGET= $(TARGET)
-.ELSE # .IF "$(GUI)"=="WNT"
-APP1TARGET= $(TARGET).bin
-.ENDIF # .IF "$(GUI)"=="WNT"
-
-APP1OBJS= $(OBJFILES)
-
-APP1STDLIBS=$(TOOLSLIB) \
- $(SO2LIB) \
- $(SVLLIB) \
- $(COMPHELPERLIB) \
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(SALLIB) \
- $(VCLLIB) \
- $(UCBHELPERLIB) \
- $(SVXCORELIB)
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-ALLTAR : \
- $(SCRIPTFILES)\
- $(BIN)/gengalrc
-
-$(SCRIPTFILES) : $$(@:f:+".sh")
- @tr -d "\015" < $(@:f:+".sh") > $@
-
-$(BIN)/%: %.in
- cp $< $@
-
diff --git a/svx/source/items/makefile.mk b/svx/source/items/makefile.mk
deleted file mode 100755
index b2f2033..0000000
--- a/svx/source/items/makefile.mk
+++ /dev/null
@@ -1,84 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PROJECTPCH4DLL=TRUE
-PROJECTPCH=svxpch
-PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch
-
-PRJNAME=svx
-TARGET=items
-LIBTARGET=NO
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=svxitems
-SRC1FILES = \
- svxerr.src \
- svxitems.src
-
-LIB1TARGET= $(SLB)$/$(TARGET)-core.lib
-LIB1OBJFILES= \
- $(SLO)$/algitem.obj \
- $(SLO)$/chrtitem.obj \
- $(SLO)$/clipfmtitem.obj \
- $(SLO)$/customshapeitem.obj \
- $(SLO)$/drawitem.obj \
- $(SLO)$/e3ditem.obj \
- $(SLO)$/grfitem.obj
-
-LIB2TARGET= $(SLB)$/$(TARGET).lib
-LIB2OBJFILES= \
- $(SLO)$/SmartTagItem.obj \
- $(SLO)$/hlnkitem.obj \
- $(SLO)$/numfmtsh.obj \
- $(SLO)$/numinf.obj \
- $(SLO)$/ofaitem.obj \
- $(SLO)$/pageitem.obj \
- $(SLO)$/postattr.obj \
- $(SLO)$/rotmodit.obj \
- $(SLO)$/svxempty.obj \
- $(SLO)$/svxerr.obj \
- $(SLO)$/viewlayoutitem.obj \
- $(SLO)$/zoomitem.obj \
- $(SLO)$/zoomslideritem.obj
-
-SLOFILES = $(LIB1OBJFILES) $(LIB2OBJFILES)
-
-EXCEPTIONSFILES= \
- $(SLO)$/chrtitem.obj \
- $(SLO)$/customshapeitem.obj \
- $(SLO)$/numfmtsh.obj
-
-.INCLUDE : target.mk
-
diff --git a/svx/source/stbctrls/makefile.mk b/svx/source/stbctrls/makefile.mk
deleted file mode 100755
index ac9445d..0000000
--- a/svx/source/stbctrls/makefile.mk
+++ /dev/null
@@ -1,75 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# 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.
-#
-#*************************************************************************
-PRJ=..$/..
-
-PROJECTPCH4DLL=TRUE
-PROJECTPCH=svxpch
-PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch
-
-PRJNAME=svx
-TARGET=stbctrls
-AUTOSEG=true
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES = \
- stbctrls.src
-
-SLOFILES= \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES= \
- $(SLO)$/insctrl.obj \
- $(SLO)$/modctrl.obj \
- $(SLO)$/pszctrl.obj \
- $(SLO)$/selctrl.obj \
- $(SLO)$/xmlsecctrl.obj \
- $(SLO)$/zoomctrl.obj \
- $(SLO)$/zoomsliderctrl.obj
-
-HXX1TARGET=stbctrls
-HXX1EXT= hxx
-HXX1EXCL= -E:*include*
-HXX1DEPN=\
- $(INC)$/insctrl.hxx \
- $(INC)$/zoomctrl.hxx \
- $(INC)$/pszctrl.hxx \
- $(INC)$/selctrl.hxx \
- $(INC)$/modctrl.hxx \
- $(INC)$/xmlsecctrl.hxx \
- $(INC)$/zoomsliderctrl.hxx \
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
commit 45fdd31fb986214f1086fe548d99139204b7a460
Author: Maciej Rumianowski <maciej.rumianowski at gmail.com>
Date: Tue Aug 9 01:15:16 2011 +0200
Use STL find() in SvxNumberFormatShell
With SvULongs replaced by std::vector std::find can be used in IsRemoved_Impl IsAdded_Impl
diff --git a/svx/inc/svx/numfmtsh.hxx b/svx/inc/svx/numfmtsh.hxx
index 5217e29..c29f71d 100644
--- a/svx/inc/svx/numfmtsh.hxx
+++ b/svx/inc/svx/numfmtsh.hxx
@@ -256,9 +256,12 @@ private:
SVX_DLLPRIVATE short FillEListWithSysCurrencys( SvStrings& rList,short nSelPos);
SVX_DLLPRIVATE short FillEListWithUserCurrencys( SvStrings& rList,short nSelPos);
- SVX_DLLPRIVATE short FillEListWithUsD_Impl( SvStrings& rList, sal_uInt16 nPrivCat, short Pos );
- SVX_DLLPRIVATE bool IsRemoved_Impl( sal_uInt32 nKey );
- SVX_DLLPRIVATE bool IsAdded_Impl( sal_uInt32 nKey );
+ SVX_DLLPRIVATE short FillEListWithUsD_Impl( SvStrings& rList, sal_uInt16 nPrivCat, short Pos );
+ SVX_DLLPRIVATE ::std::vector<sal_uInt32>::iterator GetRemoved_Impl( size_t nKey );
+ SVX_DLLPRIVATE bool IsRemoved_Impl( size_t nKey );
+ SVX_DLLPRIVATE ::std::vector<sal_uInt32>::iterator GetAdded_Impl( size_t nKey );
+ SVX_DLLPRIVATE bool IsAdded_Impl( size_t nKey );
+
SVX_DLLPRIVATE void GetPreviewString_Impl( String& rString,
Color*& rpColor );
SVX_DLLPRIVATE void PosToCategory_Impl( sal_uInt16 nPos, short& rCategory );
diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx
index b06042b..c759768 100644
--- a/svx/source/items/numfmtsh.cxx
+++ b/svx/source/items/numfmtsh.cxx
@@ -255,20 +255,9 @@ bool SvxNumberFormatShell::AddFormat( String& rFormat, xub_StrLen& rErrPos,
if ( nAddKey != NUMBERFORMAT_ENTRY_NOT_FOUND ) // bereits vorhanden?
{
- if ( IsRemoved_Impl( nAddKey ) )
+ ::std::vector<sal_uInt32>::iterator nAt = GetRemoved_Impl( nAddKey );
+ if ( nAt != aDelList.end() )
{
- bool bFound = false;
- std::vector<sal_uInt32>::iterator nAt = aDelList.begin();
-
- for (std::vector<sal_uInt32>::iterator it(aDelList.begin()); !bFound && it != aDelList.end(); ++it )
- {
- if ( *it == nAddKey )
- {
- bFound = true;
- nAt = it;
- }
- }
- DBG_ASSERT( bFound, "Key not found" );
aDelList.erase( nAt );
bInserted = true;
}
@@ -340,22 +329,10 @@ bool SvxNumberFormatShell::RemoveFormat( const String& rFormat,
{
aDelList.push_back( nDelKey );
- if ( IsAdded_Impl( nDelKey ) )
+ ::std::vector<sal_uInt32>::iterator nAt = GetAdded_Impl( nDelKey );
+ if( nAt != aAddList.end() )
{
- bool bFound = false;
- std::vector<sal_uInt32>::iterator nAt = aAddList.begin();
-
- for ( std::vector<sal_uInt32>::iterator it(aAddList.begin()); !bFound && it != aAddList.end(); ++it )
- {
- if ( *it == nDelKey )
- {
- bFound = true;
- nAt = it;
- }
- }
- DBG_ASSERT( bFound, "Key not found" );
- if( bFound )
- aAddList.erase( nAt );
+ aAddList.erase( nAt );
}
nCurCategory=pFormatter->GetType(nDelKey);
@@ -1178,24 +1155,30 @@ void SvxNumberFormatShell::GetPreviewString_Impl( String& rString, Color*& rpCol
// -----------------------------------------------------------------------
-bool SvxNumberFormatShell::IsRemoved_Impl( sal_uInt32 nKey )
+::std::vector<sal_uInt32>::iterator SvxNumberFormatShell::GetRemoved_Impl( size_t nKey )
{
- bool bFound = false;
- for (std::vector<sal_uInt32>::const_iterator it(aDelList.begin()); !bFound && it != aDelList.end(); ++it )
- if ( *it == nKey )
- bFound = true;
- return bFound;
+ return ::std::find(aDelList.begin(), aDelList.end(), nKey);
}
// -----------------------------------------------------------------------
-bool SvxNumberFormatShell::IsAdded_Impl( sal_uInt32 nKey )
+bool SvxNumberFormatShell::IsRemoved_Impl( size_t nKey )
+{
+ return GetRemoved_Impl( nKey ) != aDelList.end();
+}
+
+// -----------------------------------------------------------------------
+
+::std::vector<sal_uInt32>::iterator SvxNumberFormatShell::GetAdded_Impl( size_t nKey )
+{
+ return ::std::find(aAddList.begin(), aAddList.end(), nKey);
+}
+
+//------------------------------------------------------------------------
+
+bool SvxNumberFormatShell::IsAdded_Impl( size_t nKey )
{
- bool bFound = false;
- for ( std::vector<sal_uInt32>::const_iterator it(aAddList.begin()); !bFound && it != aAddList.end(); ++it )
- if ( *it == nKey )
- bFound = true;
- return bFound;
+ return GetAdded_Impl( nKey ) != aAddList.end();
}
// -----------------------------------------------------------------------
More information about the Libreoffice-commits
mailing list