[Libreoffice-commits] core.git: writerfilter/source

2015-07-30 Thread Matthew Pottage
 writerfilter/source/dmapper/PropertyMap.cxx |  117 +---
 1 file changed, 55 insertions(+), 62 deletions(-)

New commits:
commit 6dd913da63a74907499d492f8169c581803c5893
Author: Matthew Pottage matthewpott...@invincitech.com
Date:   Tue Jul 28 12:10:23 2015 +0100

Cleaned up PropertyMap::GetPropertyValues in writerfilter::dmapper.

Removed unused variable.
Used comphelper::makePropertyValue.

Change-Id: I39ec3e51da484a1792bb980b166d5a10c597fe7b
Reviewed-on: https://gerrit.libreoffice.org/17383
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Miklos Vajna vmik...@collabora.co.uk

diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index 57b0c88..afff853 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -42,6 +42,7 @@
 #include com/sun/star/text/TextGridMode.hpp
 #include com/sun/star/text/XTextCopy.hpp
 #include comphelper/sequence.hxx
+#include comphelper/propertyvalue.hxx
 #include PropertyMapHelper.hxx
 
 using namespace ::com::sun::star;
@@ -65,12 +66,12 @@ PropertyMap::~PropertyMap()
 
 uno::Sequence beans::PropertyValue  PropertyMap::GetPropertyValues(bool 
bCharGrabBag)
 {
+using comphelper::makePropertyValue;
 if(m_aValues.empty()  !m_vMap.empty())
 {
 size_t nCharGrabBag = 0;
 size_t nParaGrabBag = 0;
 size_t nCellGrabBag = 0;
-size_t nCellGrabBagSaved = 0; // How many entries do we save from the 
returned sequence.
 size_t nRowGrabBag = 0;
 for (MapIterator i = m_vMap.begin(); i != m_vMap.end(); ++i)
 {
@@ -79,61 +80,60 @@ uno::Sequence beans::PropertyValue  
PropertyMap::GetPropertyValues(bool bCharG
 else if ( i-second.getGrabBagType() == PARA_GRAB_BAG )
 nParaGrabBag++;
 else if ( i-second.getGrabBagType() == CELL_GRAB_BAG )
-{
 nCellGrabBag++;
-nCellGrabBagSaved++;
-}
 else if ( i-first == PROP_CELL_INTEROP_GRAB_BAG)
 {
 uno::Sequencebeans::PropertyValue aSeq;
 i-second.getValue() = aSeq;
 nCellGrabBag += aSeq.getLength();
-nCellGrabBagSaved++;
 }
 else if ( i-second.getGrabBagType() == ROW_GRAB_BAG )
 nRowGrabBag++;
 }
 
-// If there are any grab bag properties, we need one slot for them.
-uno::Sequencebeans::PropertyValue aCharGrabBagValues(nCharGrabBag);
-uno::Sequencebeans::PropertyValue aParaGrabBagValues(nParaGrabBag);
-uno::Sequencebeans::PropertyValue aCellGrabBagValues(nCellGrabBag);
-uno::Sequencebeans::PropertyValue aRowGrabBagValues(nRowGrabBag);
-beans::PropertyValue* pCharGrabBagValues = 
aCharGrabBagValues.getArray();
-beans::PropertyValue* pParaGrabBagValues = 
aParaGrabBagValues.getArray();
-beans::PropertyValue* pCellGrabBagValues = 
aCellGrabBagValues.getArray();
-beans::PropertyValue* pRowGrabBagValues = aRowGrabBagValues.getArray();
 //style names have to be the first elements within the property 
sequence
 //otherwise they will overwrite 'hard' attributes
-sal_Int32 nRowGrabBagValue = 0;
-sal_Int32 nCellGrabBagValue = 0;
-sal_Int32 nParaGrabBagValue = 0;
-sal_Int32 nCharGrabBagValue = 0;
 MapIterator aParaStyleIter = m_vMap.find(PROP_PARA_STYLE_NAME);
 if( aParaStyleIter != m_vMap.end())
 {
-beans::PropertyValue aValue;
-aValue.Name = getPropertyName( aParaStyleIter-first );
-aValue.Value = aParaStyleIter-second.getValue();
-m_aValues.push_back(aValue);
+m_aValues.push_back( makePropertyValue(
+getPropertyName( aParaStyleIter-first ),
+aParaStyleIter-second.getValue()
+) );
 }
 
 MapIterator aCharStyleIter = m_vMap.find(PROP_CHAR_STYLE_NAME);
 if( aCharStyleIter != m_vMap.end())
 {
-beans::PropertyValue aValue;
-aValue.Name = getPropertyName( aCharStyleIter-first );
-aValue.Value = aCharStyleIter-second.getValue();
-m_aValues.push_back(aValue);
+m_aValues.push_back( makePropertyValue(
+getPropertyName( aCharStyleIter-first ),
+aCharStyleIter-second.getValue()
+) );
 }
 MapIterator aNumRuleIter = m_vMap.find(PROP_NUMBERING_RULES);
 if( aNumRuleIter != m_vMap.end())
 {
-beans::PropertyValue aValue;
-aValue.Name = getPropertyName( aNumRuleIter-first );
-aValue.Value = aNumRuleIter-second.getValue();
-m_aValues.push_back(aValue);
+m_aValues.push_back( makePropertyValue

[Libreoffice-commits] core.git: writerfilter/source

2015-07-16 Thread Matthew Pottage
 writerfilter/source/dmapper/DomainMapper.cxx|   34 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx   |  364 -
 writerfilter/source/dmapper/DomainMapper_Impl.hxx   |7 
 writerfilter/source/dmapper/GraphicHelpers.cxx  |6 
 writerfilter/source/dmapper/GraphicImport.cxx   |   91 +-
 writerfilter/source/dmapper/ModelEventListener.cxx  |6 
 writerfilter/source/dmapper/NumberingManager.cxx|   34 
 writerfilter/source/dmapper/OLEHandler.cxx  |6 
 writerfilter/source/dmapper/PropertyIds.cxx |  761 +---
 writerfilter/source/dmapper/PropertyIds.hxx |   15 
 writerfilter/source/dmapper/PropertyMap.cxx |   88 --
 writerfilter/source/dmapper/StyleSheetTable.cxx |   36 
 writerfilter/source/dmapper/TrackChangesHandler.cxx |   18 
 13 files changed, 669 insertions(+), 797 deletions(-)

New commits:
commit 091f6c382394390206f784a5ec79842709e0f3bc
Author: Matthew Pottage matthewpott...@invincitech.com
Date:   Wed Jul 1 16:51:45 2015 +0100

Removed singleton PropertyNameSupplier and replaced it with single function.

Measurements showed that the optimisation of caching PropertyIds and their
string equivalent leads to an increase of approx. 6 times in the total 
overall
time spent in PropertyNameSupplier::getName(eId), when running the unit 
tests.

PropertyNameSupplier was the only PropertyNameSupplier (no derived classes).
This means that getPropertyName can easily provide the same functionality.

Change-Id: I933b67c11d4cc35395a0c70e15f1c24ac9842ab0
Reviewed-on: https://gerrit.libreoffice.org/16665
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Noel Grandin noelgran...@gmail.com

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index becde28..8a875ae 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -104,13 +104,13 @@ DomainMapper::DomainMapper( const uno::Reference 
uno::XComponentContext  xCon
 {
 // #i24363# tab stops relative to indent
 m_pImpl-SetDocumentSettingsProperty(
-PropertyNameSupplier::GetPropertyNameSupplier().GetName( 
PROP_TABS_RELATIVE_TO_INDENT ),
+getPropertyName( PROP_TABS_RELATIVE_TO_INDENT ),
 uno::makeAny( false ) );
 m_pImpl-SetDocumentSettingsProperty(
-PropertyNameSupplier::GetPropertyNameSupplier().GetName( 
PROP_SURROUND_TEXT_WRAP_SMALL ),
+getPropertyName( PROP_SURROUND_TEXT_WRAP_SMALL ),
 uno::makeAny( true ) );
 m_pImpl-SetDocumentSettingsProperty(
-PropertyNameSupplier::GetPropertyNameSupplier().GetName( 
PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING ),
+getPropertyName( PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING ),
 uno::makeAny( true ) );
 
 // Don't load the default style definitions to avoid weird mix
@@ -271,7 +271,7 @@ void DomainMapper::lcl_attribute(Id nName, Value  val)
 {
 uno::Reference beans::XPropertySet  xAnchorProps( 
m_pImpl-GetTopContext()-GetFootnote()-getAnchor(), uno::UNO_QUERY );
 xAnchorProps-setPropertyValue(
-PropertyNameSupplier::GetPropertyNameSupplier().GetName( 
PROP_CHAR_FONT_NAME),
+getPropertyName( PROP_CHAR_FONT_NAME),
 uno::makeAny( sStringValue ));
 }
 else //a real symbol
@@ -1166,7 +1166,6 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext )
 Value::Pointer_t pValue = rSprm.getValue();
 sal_Int32 nIntValue = pValue-getInt();
 const OUString sStringValue = pValue-getString();
-PropertyNameSupplier rPropNameSupplier = 
PropertyNameSupplier::GetPropertyNameSupplier();
 
 switch(nSprmId)
 {
@@ -1525,7 +1524,7 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext )
 
 uno::Referencebeans::XPropertySet 
xCharStyle(m_pImpl-GetCurrentNumberingCharStyle());
 if (xCharStyle.is())
-
xCharStyle-setPropertyValue(rPropNameSupplier.GetName(PROP_CHAR_WEIGHT), 
aBold);
+
xCharStyle-setPropertyValue(getPropertyName(PROP_CHAR_WEIGHT), aBold);
 if (nSprmId == NS_ooxml::LN_EG_RPrBase_b)
 m_pImpl-appendGrabBag(m_pImpl-m_aInteropGrabBag, 
b, OUString::number(nIntValue));
 else if (nSprmId == NS_ooxml::LN_EG_RPrBase_bCs)
@@ -1605,7 +1604,7 @@ void DomainMapper::sprmWithProps( Sprm rSprm, 
PropertyMapPtr rContext )
 
 uno::Referencebeans::XPropertySet 
xCharStyle(m_pImpl-GetCurrentNumberingCharStyle());
 if (xCharStyle.is())
-
xCharStyle-setPropertyValue(rPropNameSupplier.GetName(PROP_CHAR_HEIGHT), aVal);
+
xCharStyle-setPropertyValue(getPropertyName(PROP_CHAR_HEIGHT), aVal

[Libreoffice-commits] core.git: 2 commits - comphelper/source configmgr/inc configmgr/source cui/inc cui/source editeng/source extensions/source filter/source fpicker/source framework/source include/c

2015-02-06 Thread Matthew Pottage
  |1 
 xmloff/source/core/RDFaImportHelper.cxx|6 -
 xmloff/source/meta/xmlmetae.cxx|6 -
 75 files changed, 273 insertions(+), 262 deletions(-)

New commits:
commit 4f7a1f5b9499d5fbeff413a4914283c2bfe7c2d9
Author: Matthew Pottage matthewpott...@invincitech.com
Date:   Tue Oct 28 16:50:02 2014 +

fdo#75757: Remove inheritance from std::vector

Deprecated comphelper/sequenceasvector.hxx.

Rewritten code using it. Using instead the functions containerToSequence and
sequenceToContainer, found in include/comphelper/sequence.hxx.

One class that inherits from it (in framework/inc/stdtypes.h), and
the code using that has been left.

Signed-off-by: Michael Stahl mst...@redhat.com

Conflicts:
writerfilter/source/dmapper/DomainMapper.cxx
writerfilter/source/dmapper/TblStylePrHandler.hxx
writerfilter/source/dmapper/WrapPolygonHandler.hxx

Change-Id: Ice61c94ffb052e389281aebb7cdf185134221061

diff --git a/comphelper/source/misc/configurationhelper.cxx 
b/comphelper/source/misc/configurationhelper.cxx
index b388162..b3f7472 100644
--- a/comphelper/source/misc/configurationhelper.cxx
+++ b/comphelper/source/misc/configurationhelper.cxx
@@ -19,6 +19,7 @@
 
 #include comphelper/configurationhelper.hxx
 #include comphelper/processfactory.hxx
+#include comphelper/sequence.hxx
 #include com/sun/star/beans/XPropertySet.hpp
 #include com/sun/star/configuration/theDefaultProvider.hpp
 #include com/sun/star/container/XNameAccess.hpp
@@ -36,8 +37,8 @@ css::uno::Reference css::uno::XInterface  
ConfigurationHelper::openConfig(cons
 css::uno::Reference css::lang::XMultiServiceFactory  xConfigProvider(
 css::configuration::theDefaultProvider::get( rxContext ) );
 
-::comphelper::SequenceAsVector css::uno::Any  lParams;
-css::beans::PropertyValue   aParam ;
+::std::vector css::uno::Any  lParams;
+css::beans::PropertyValue  aParam ;
 
 // set root path
 aParam.Name= nodepath;
@@ -65,11 +66,11 @@ css::uno::Reference css::uno::XInterface  
ConfigurationHelper::openConfig(cons
 if (bReadOnly)
 xCFG = xConfigProvider-createInstanceWithArguments(
 OUString(com.sun.star.configuration.ConfigurationAccess),
-lParams.getAsConstList());
+comphelper::containerToSequence(lParams));
 else
 xCFG = xConfigProvider-createInstanceWithArguments(
 
OUString(com.sun.star.configuration.ConfigurationUpdateAccess),
-lParams.getAsConstList());
+comphelper::containerToSequence(lParams));
 
 return xCFG;
 }
diff --git a/configmgr/inc/pch/precompiled_configmgr.hxx 
b/configmgr/inc/pch/precompiled_configmgr.hxx
index d924b7b..4a1909c 100644
--- a/configmgr/inc/pch/precompiled_configmgr.hxx
+++ b/configmgr/inc/pch/precompiled_configmgr.hxx
@@ -99,7 +99,6 @@
 #include com/sun/star/util/XFlushable.hpp
 #include com/sun/star/util/XRefreshListener.hpp
 #include com/sun/star/util/XRefreshable.hpp
-#include comphelper/sequenceasvector.hxx
 #include comphelper/servicehelper.hxx
 #include config_folders.h
 #include cppu/unotype.hxx
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index 7402897..1fff9fe 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -69,7 +69,7 @@
 #include com/sun/star/uno/XInterface.hpp
 #include com/sun/star/uno/XWeak.hpp
 #include com/sun/star/util/ElementChange.hpp
-#include comphelper/sequenceasvector.hxx
+#include comphelper/sequence.hxx
 #include cppu/unotype.hxx
 #include cppuhelper/queryinterface.hxx
 #include cppuhelper/supportsservice.hxx
@@ -156,7 +156,7 @@ css::uno::Sequence css::uno::Type  Access::getTypes()
 assert(thisIs(IS_ANY));
 osl::MutexGuard g(*lock_);
 checkLocalizedPropertyAccess();
-comphelper::SequenceAsVector css::uno::Type  types;
+std::vector css::uno::Type  types;
 types.push_back(cppu::UnoType css::uno::XInterface ::get());
 types.push_back(cppu::UnoType css::uno::XWeak ::get());
 types.push_back(cppu::UnoType css::lang::XTypeProvider ::get());
@@ -199,7 +199,7 @@ css::uno::Sequence css::uno::Type  Access::getTypes()
 cppu::UnoType css::container::XHierarchicalNameAccess ::get());
 }
 addTypes(types);
-return types.getAsConstList();
+return comphelper::containerToSequence(types);
 }
 
 css::uno::Sequence sal_Int8  Access::getImplementationId()
@@ -231,7 +231,7 @@ css::uno::Sequence OUString  
Access::getSupportedServiceNames()
 assert(thisIs(IS_ANY));
 osl::MutexGuard g(*lock_);
 checkLocalizedPropertyAccess();
-comphelper::SequenceAsVector OUString  services;
+std::vector OUString  services;
 services.push_back(com.sun.star.configuration.ConfigurationAccess);
 if (getRootAccess()-isUpdate()) {
 services.push_back(
@@ -254,7 +254,7

[Libreoffice-commits] core.git: sfx2/source

2015-01-07 Thread Matthew Pottage
 sfx2/source/appl/appopen.cxx |   10 +++---
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 1079ccf05b1441649a8232e2ed112e4fceed5943
Author: Matthew Pottage matthewpott...@invincitech.com
Date:   Mon Dec 22 09:20:26 2014 +

Completed TODO: simplify appending to sequence.

File sfx2/source/appl/appopen.cxx. Fixed by using std::vector instead of
Sequence; Simplifying the code.

Change-Id: Iecb45ba3429be86d03fad5275d0f0a92b659a542
Reviewed-on: https://gerrit.libreoffice.org/13605
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index b76bbb4..27fefa9 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -862,7 +862,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest rReq )
 else
 {
 // check for internal protocols that should not be 
forwarded to the system
-Sequence  OUString  aProtocols(2);
+std::vector  OUString  aProtocols(2);
 
 // add special protocols that always should be treated as 
internal
 aProtocols[0] = private:*;
@@ -883,16 +883,12 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest rReq )
 Sequence  OUString  aTmp;
 aRet = aTmp;
 
-// todo: add operator+= to SequenceAsVector class 
and use SequenceAsVector for aProtocols
-sal_Int32 nLength = aProtocols.getLength();
-aProtocols.realloc( nLength+aTmp.getLength() );
-for ( sal_Int32 n=0; naTmp.getLength(); n++ )
-aProtocols[(++nLength)-1] = aTmp[n];
+
aProtocols.insert(aProtocols.end(),aTmp.begin(),aTmp.end());
 }
 }
 
 bool bFound = false;
-for ( sal_Int32 nProt=0; nProtaProtocols.getLength(); 
nProt++ )
+for ( size_t nProt=0; nProtaProtocols.size(); nProt++ )
 {
 WildCard aPattern(aProtocols[nProt]);
 if ( aPattern.Matches( aURL.Complete ) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: framework/inc framework/source

2015-01-07 Thread Matthew Pottage
 framework/inc/classes/filtercachedata.hxx   |   22 +--
 framework/inc/jobs/jobdata.hxx  |2 -
 framework/inc/stdtypes.h|   48 +---
 framework/source/accelerators/storageholder.cxx |2 +
 framework/source/jobs/jobdata.cxx   |2 -
 framework/source/jobs/jobexecutor.cxx   |   16 
 framework/source/services/pathsettings.cxx  |   48 +---
 7 files changed, 67 insertions(+), 73 deletions(-)

New commits:
commit 2c71f383019e0ac13b83aabd3011d7f7b55a62b3
Author: Matthew Pottage matthewpott...@invincitech.com
Date:   Mon Dec 22 17:35:47 2014 +

fdo#75757: Remove inheritance from std::vector.

In framework/inc/stdtypes.h. class OUStringList.

Removed inheritance and separated additional functionality into more general
functions. Changed to using std::vectorOUString rather than 
SequenceAsVector.

The functions now work for any vector. Although they could be made more 
general
and support any container by altering the arguments.

Change-Id: I472267029dc69da1ad0a98d55e26e3784f6b07cd
Reviewed-on: https://gerrit.libreoffice.org/13612
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/framework/inc/classes/filtercachedata.hxx 
b/framework/inc/classes/filtercachedata.hxx
index 8825a6b..ad82d07 100644
--- a/framework/inc/classes/filtercachedata.hxx
+++ b/framework/inc/classes/filtercachedata.hxx
@@ -90,8 +90,8 @@ struct FileType
 sClipboardFormat.clear();
 nDocumentIconID = 0;
 lUINames.free   ();
-lURLPattern.free();
-lExtensions.free();
+framework::free(lURLPattern);
+framework::free(lExtensions);
 }
 
 inline FileType impl_copy( const FileType rCopy )
@@ -153,8 +153,8 @@ struct Filter
 nFlags  = 0;
 nFileFormatVersion  = 0;
 sTemplateName.clear();
-lUINames.free   ();
-lUserData.free  ();
+lUINames.free();
+framework::free(lUserData);
 }
 
 inline Filter impl_copy( const Filter rCopy )
@@ -213,7 +213,7 @@ struct Detector
 inline void impl_clear()
 {
 sName.clear();
-lTypes.free();
+framework::free(lTypes);
 }
 
 inline Detector impl_copy( const Detector rCopy )
@@ -254,8 +254,8 @@ struct Loader
 inline void impl_clear()
 {
 sName.clear();
-lUINames.free   ();
-lTypes.free ();
+lUINames.free();
+framework::free(lTypes);
 }
 
 inline Loader impl_copy( const Loader rCopy )
@@ -297,7 +297,7 @@ struct ContentHandler
 inline void impl_clear()
 {
 sName.clear();
-lTypes.free();
+framework::free(lTypes);
 }
 
 inline ContentHandler impl_copy( const ContentHandler rCopy )
@@ -335,9 +335,9 @@ class SetNodeHash : public std::unordered_map OUString 
   ,
 inline void free()
 {
 SetNodeHash().swap( *this ); // get rid of reserved capacity
-lAddedItems.free  ();
-lChangedItems.free();
-lRemovedItems.free();
+framework::free(lAddedItems);
+framework::free(lChangedItems);
+framework::free(lRemovedItems);
 }
 
 // Append changed, added or removed items to special lists
diff --git a/framework/inc/jobs/jobdata.hxx b/framework/inc/jobs/jobdata.hxx
index 18d01e8..d60256f 100644
--- a/framework/inc/jobs/jobdata.hxx
+++ b/framework/inc/jobs/jobdata.hxx
@@ -209,7 +209,7 @@ class JobData
 
 static void appendEnabledJobsForEvent( const css::uno::Reference 
css::uno::XComponentContext   rxContext,
const OUString 
sEvent ,
- 
::comphelper::SequenceAsVector JobData::TJob2DocEventBinding  lJobs  );
+ ::std::vector 
JobData::TJob2DocEventBinding  lJobs  );
 
 // private helper
 
diff --git a/framework/inc/stdtypes.h b/framework/inc/stdtypes.h
index 8e9dfaf..faf2c73 100644
--- a/framework/inc/stdtypes.h
+++ b/framework/inc/stdtypes.h
@@ -20,6 +20,7 @@
 #ifndef INCLUDED_FRAMEWORK_INC_STDTYPES_H
 #define INCLUDED_FRAMEWORK_INC_STDTYPES_H
 
+#include algorithm
 #include queue
 #include unordered_map
 #include vector
@@ -28,7 +29,6 @@
 
 #include com/sun/star/awt/KeyEvent.hpp
 
-#include comphelper/sequenceasvector.hxx
 #include cppuhelper/interfacecontainer.hxx
 #include rtl/ustring.hxx
 
@@ -79,38 +79,26 @@ struct KeyEventEqualsFunc
 }
 };
 
-/**
-Basic string list based on a std::vector()
-It implements

[Libreoffice-commits] core.git: Changes to 'refs/changes/97/10797/1'

2014-09-29 Thread Matthew Pottage

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/97/10797/2'

2014-09-29 Thread Matthew Pottage

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/09/10809/2'

2014-09-29 Thread Matthew Pottage

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/09/10809/1'

2014-09-29 Thread Matthew Pottage

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/09/10809/4'

2014-09-29 Thread Matthew Pottage

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/83/10783/2'

2014-09-29 Thread Matthew Pottage

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/83/10783/3'

2014-09-29 Thread Matthew Pottage

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/83/10783/1'

2014-09-29 Thread Matthew Pottage

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/58/10558/2'

2014-09-29 Thread Matthew Pottage

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/58/10558/3'

2014-09-29 Thread Matthew Pottage

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/58/10558/4'

2014-09-29 Thread Matthew Pottage

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/58/10558/5'

2014-09-29 Thread Matthew Pottage

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/58/10558/6'

2014-09-29 Thread Matthew Pottage

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/58/10558/1'

2014-09-29 Thread Matthew Pottage

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: writerfilter/source

2014-08-09 Thread Matthew Pottage
 writerfilter/source/dmapper/PropertyMap.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 053435d20a2206ecfb2b7d522895b0a89b66a649
Author: Matthew Pottage matthewpott...@invincitech.com
Date:   Thu Aug 7 15:13:26 2014 +0100

Fixed erroneous comment (by me).

Change-Id: Ie2430d0ef63bed95fd86f927260442814b0e5566
Reviewed-on: https://gerrit.libreoffice.org/10809
Reviewed-by: Thomas Arnhold tho...@arnhold.org
Tested-by: Thomas Arnhold tho...@arnhold.org

diff --git a/writerfilter/source/dmapper/PropertyMap.hxx 
b/writerfilter/source/dmapper/PropertyMap.hxx
index 4c1d2e2..63e7c2c 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -135,7 +135,7 @@ public:
 //Returns a copy of the property if it exists, .first is its PropertyIds 
and .second is its Value (type css::uno::Any)
 boost::optionalProperty getProperty( PropertyIds eId ) const;
 
-//Has the property named been set (via Insert or Set)?
+//Has the property named been set (via Insert)?
 bool isSet( PropertyIds eId ) const;
 
 const ::com::sun::star::uno::Reference 
::com::sun::star::text::XFootnote  GetFootnote() const { return m_xFootnote;}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cppuhelper/source filter/source include/cppuhelper odk/examples odk/Package_odk_headers.mk

2014-08-08 Thread Matthew Pottage
 cppuhelper/source/compat.cxx   
|   56 +
 cppuhelper/source/implbase.cxx 
|  144 
 filter/source/odfflatxml/OdfFlatXml.cxx
|1 
 filter/source/xsltfilter/LibXSLTTransformer.cxx
|1 
 filter/source/xsltfilter/LibXSLTTransformer.hxx
|1 
 filter/source/xsltfilter/OleHandler.hxx
|1 
 filter/source/xsltfilter/XSLTFilter.cxx
|1 
 include/cppuhelper/compbase.hxx
|  107 ---
 include/cppuhelper/implbase.hxx
|  293 --
 odk/Package_odk_headers.mk 
|2 
 
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
 |1 
 11 files changed, 57 insertions(+), 551 deletions(-)

New commits:
commit 03e0bd6b3b4314e2476030da7ddc71cf30f8b2e9
Author: Matthew Pottage matthewpott...@invincitech.com
Date:   Wed Aug 6 08:32:04 2014 +0100

[API CHANGE] Removed two cppuhelper deprecated headers.

The headers cppuheader/compbase.hxx and implbase.hxx. They have been 
deprecated
since 2001. Moved the definitions of the deprecated functions to
cppuhelper/source/compat.cxx.

Signed-off-by: Stephan Bergmann sberg...@redhat.com, adding fixes and 
clean-up
in cppuhelper/source/compat.cxx and odk/Package_odk_headers.mk

Change-Id: I48b3cbf551b59d72614737a883a96aab55fc2090

diff --git a/cppuhelper/source/compat.cxx b/cppuhelper/source/compat.cxx
index 2141f8b..092e244 100644
--- a/cppuhelper/source/compat.cxx
+++ b/cppuhelper/source/compat.cxx
@@ -32,6 +32,7 @@ namespace com { namespace sun { namespace star {
 namespace lang {
 class XMultiComponentFactory;
 class XMultiServiceFactory;
+class XTypeProvider;
 }
 namespace reflection { class XIdlClass; }
 namespace registry {
@@ -112,6 +113,61 @@ loadSharedLibComponentFactory(
 for (;;) { std::abort(); } // avoid must return a value warnings
 }
 
+struct SAL_DLLPUBLIC_EXPORT ClassData {
+css::uno::Sequencesal_Int8 SAL_CALL getImplementationId();
+
+css::uno::Sequencecss::uno::Type SAL_CALL getTypes();
+
+void SAL_CALL initTypeProvider();
+
+css::uno::Any SAL_CALL query(
+css::uno::Type const , css::lang::XTypeProvider *);
+
+void SAL_CALL writeTypeOffset(css::uno::Type const , sal_Int32);
+};
+
+css::uno::Sequencesal_Int8 ClassData::getImplementationId() {
+for (;;) { std::abort(); } // avoid must return a value warnings
+}
+
+css::uno::Sequencecss::uno::Type ClassData::getTypes() {
+for (;;) { std::abort(); } // avoid must return a value warnings
+}
+
+void ClassData::initTypeProvider() {
+std::abort();
+}
+
+css::uno::Any ClassData::query(
+css::uno::Type const , css::lang::XTypeProvider *)
+{
+for (;;) { std::abort(); } // avoid must return a value warnings
+}
+
+void ClassData::writeTypeOffset(css::uno::Type const , sal_Int32) {
+std::abort();
+}
+
+struct SAL_DLLPUBLIC_EXPORT ClassDataBase {
+ClassDataBase();
+
+ClassDataBase(sal_Int32);
+
+~ClassDataBase();
+};
+
+ClassDataBase::ClassDataBase() {
+std::abort();
+}
+
+ClassDataBase::ClassDataBase(sal_Int32) {
+std::abort();
+}
+
+ClassDataBase::~ClassDataBase() {
+std::abort();
+}
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index 1ffb856..aa75e9e 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include cppuhelper/implbase.hxx
-#include cppuhelper/compbase.hxx
+#include cppuhelper/compbase_ex.hxx
 #include osl/diagnose.h
 #include rtl/instance.hxx
 #include rtl/string.hxx
@@ -36,147 +35,6 @@ using rtl::OString;
 namespace cppu
 {
 
-// ClassDataBase
-
-ClassDataBase::ClassDataBase()
-: bOffsetsInit( sal_False )
-, nType2Offset( 0 )
-, nClassCode( 0 )
-, pTypes( 0 )
-, pId( 0 )
-{
-}
-
-ClassDataBase::ClassDataBase( sal_Int32 nClassCode_ )
-: bOffsetsInit( sal_False )
-, nType2Offset( 0 )
-, nClassCode( nClassCode_ )
-, pTypes( 0 )
-, pId( 0 )
-{
-}
-
-ClassDataBase::~ClassDataBase()
-{
-delete pTypes;
-delete pId;
-
-for ( sal_Int32 nPos = nType2Offset; nPos--; )
-{
-typelib_typedescription_release(
-(typelib_TypeDescription *)((ClassData 
*)this)-arType2Offset[nPos].pTD );
-}
-}
-
-// ClassData
-
-void ClassData::writeTypeOffset( const Type  rType, sal_Int32 nOffset )
-{
-arType2Offset[nType2Offset].nOffset = nOffset

[Libreoffice-commits] core.git: cli_ure/source cppuhelper/source

2014-08-08 Thread Matthew Pottage
 cli_ure/source/climaker/climaker_app.cxx |1 -
 cppuhelper/source/factory.cxx|1 -
 cppuhelper/source/servicemanager.cxx |1 -
 3 files changed, 3 deletions(-)

New commits:
commit 608ebc6f01db5d9d86bab58f9cabce56c8b48326
Author: Matthew Pottage matthewpott...@invincitech.com
Date:   Wed Aug 6 18:12:46 2014 +0100

Remove redundant inclusions of header cppuhelper/shlib.h

Change-Id: Iab402035613a6cc96b7b4ebd2981a1fd0f8bed23
Signed-off-by: Stephan Bergmann sberg...@redhat.com

diff --git a/cli_ure/source/climaker/climaker_app.cxx 
b/cli_ure/source/climaker/climaker_app.cxx
index 0f14a17..1a3335c 100644
--- a/cli_ure/source/climaker/climaker_app.cxx
+++ b/cli_ure/source/climaker/climaker_app.cxx
@@ -31,7 +31,6 @@
 #include osl/file.hxx
 #include osl/thread.h
 #include rtl/ustrbuf.hxx
-#include cppuhelper/shlib.hxx
 #include cppuhelper/bootstrap.hxx
 #include com/sun/star/lang/XComponent.hpp
 #include com/sun/star/container/XHierarchicalNameAccess.hpp
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index ef80fb8..11734e1 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -24,7 +24,6 @@
 #include cppuhelper/component.hxx
 #include cppuhelper/factory.hxx
 #include cppuhelper/implbase3.hxx
-#include cppuhelper/shlib.hxx
 #include cppuhelper/supportsservice.hxx
 #include cppuhelper/typeprovider.hxx
 #include rtl/instance.hxx
diff --git a/cppuhelper/source/servicemanager.cxx 
b/cppuhelper/source/servicemanager.cxx
index d682cd6..84b29b3 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -33,7 +33,6 @@
 #include cppuhelper/component_context.hxx
 #include cppuhelper/implbase1.hxx
 #include cppuhelper/implbase3.hxx
-#include cppuhelper/shlib.hxx
 #include cppuhelper/supportsservice.hxx
 #include osl/file.hxx
 #include rtl/ref.hxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: writerfilter/source

2014-07-31 Thread Matthew Pottage
 writerfilter/source/dmapper/DomainMapper.cxx |   46 +--
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |  159 --
 writerfilter/source/dmapper/DomainMapperTableManager.cxx |2 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|   44 +-
 writerfilter/source/dmapper/NumberingManager.cxx |   85 ++---
 writerfilter/source/dmapper/PropertyMap.cxx  |  230 ---
 writerfilter/source/dmapper/PropertyMap.hxx  |   35 +-
 writerfilter/source/dmapper/SdtHelper.cxx|   12 
 writerfilter/source/dmapper/StyleSheetTable.cxx  |   44 +-
 9 files changed, 325 insertions(+), 332 deletions(-)

New commits:
commit 4c3ba3a413be7339115ea5e6edc825a8434cd345
Author: Matthew Pottage matthewpott...@invincitech.com
Date:   Sat Jul 26 17:17:27 2014 +0100

fdo#75757: Remove inheritance from std::map.

Done for writerfilter::dmapper::PropertyMap.

Added public functions getPropertyValue, bool isSet and Erase. The function
getPropertyValue returns boost::optionalPropertyMap::Property,
where PropertyMap::Property is an alias for 
std::pairPropertyIds,css::uno::Any.

Fixed all resulting compilation errors. The functions which iterated the map
(ListLevel::GetCharStyleProperties, ListLevel::GetLevelProperties and
SectionPropertyMap::_ApplyProperties) have been written to either used
GetPropertyValues or not iterate over the PropertyMap's attributes.

The properties of the public member functions are now properly used
(Erase and Insert(...,false)).

Change-Id: Ibd90a4ad831c9b7d18b2a50d4aa4eb3f2610cff8
Reviewed-on: https://gerrit.libreoffice.org/10558
Reviewed-by: Michael Stahl mst...@redhat.com
Tested-by: Michael Stahl mst...@redhat.com

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index c9973c2..5507934 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -184,7 +184,6 @@ void DomainMapper::lcl_attribute(Id nName, Value  val)
 OUString sStringValue = val.getString();
 
 SectionPropertyMap * pSectionContext = m_pImpl-GetSectionContext();
-PropertyMap::iterator oldPropValue;
 switch( nName )
 {
 case NS_ooxml::LN_CT_Lvl_start:
@@ -374,16 +373,10 @@ void DomainMapper::lcl_attribute(Id nName, Value  val)
 #define SINGLE_LINE_SPACING 240
 style::LineSpacing aSpacing;
 PropertyMapPtr pTopContext = m_pImpl-GetTopContext();
-bool bFound = false;
-PropertyMap::iterator aLineSpacingIter;
-if (pTopContext)
-{
-aLineSpacingIter = pTopContext-find(PROP_PARA_LINE_SPACING);
-bFound = aLineSpacingIter != pTopContext-end();
-}
-if (bFound)
+boost::optionalPropertyMap::Property aLineSpacingVal;
+if (pTopContext  (aLineSpacingVal = 
pTopContext-getProperty(PROP_PARA_LINE_SPACING)) )
 {
-aLineSpacingIter-second.getValue() = aSpacing;
+aLineSpacingVal-second = aSpacing;
 }
 else
 {
@@ -404,7 +397,7 @@ void DomainMapper::lcl_attribute(Id nName, Value  val)
 {
 // direct formatting is applied for table cell data
 TablePropertyMapPtr pTblCellWithDirectFormatting(new 
TablePropertyMap);
-pTblCellWithDirectFormatting-insert(std::pair 
PropertyIds, PropValue (PROP_PARA_LINE_SPACING, uno::makeAny( aSpacing )));
+
pTblCellWithDirectFormatting-Insert(PROP_PARA_LINE_SPACING, uno::makeAny( 
aSpacing ), false);
 
m_pImpl-getTableManager().cellProps(pTblCellWithDirectFormatting);
 }
 }
@@ -1035,11 +1028,11 @@ sal_Int32 lcl_getCurrentNumberingProperty(
 static bool ExchangeLeftRight( const PropertyMapPtr rContext, 
DomainMapper_Impl* m_pImpl )
 {
 bool bExchangeLeftRight = false;
-PropertyMap::const_iterator aPropParaIte = 
rContext-find(PROP_WRITING_MODE);
-if( aPropParaIte != rContext-end())
+boost::optionalPropertyMap::Property aPropPara = 
rContext-getProperty(PROP_WRITING_MODE);
+if( aPropPara )
 {
 sal_Int32 aAdjust ;
-if( (aPropParaIte-second.getValue() = aAdjust)  aAdjust == 
text::WritingMode2::RL_TB )
+if( (aPropPara-second = aAdjust)  aAdjust == 
text::WritingMode2::RL_TB )
 bExchangeLeftRight = true;
 }
 else
@@ -1048,11 +1041,11 @@ static bool ExchangeLeftRight( const PropertyMapPtr 
rContext, DomainMapper_Impl*
 StyleSheetEntryPtr pTable = 
m_pImpl-GetStyleSheetTable()-FindDefaultParaStyle();
 if ( pTable )
 {
-PropertyMap::const_iterator aPropStyle = 
pTable-pProperties-find(PROP_WRITING_MODE);
-if( aPropStyle != pTable-pProperties-end

Matthew Pottage license statement

2014-07-26 Thread Matthew Pottage
All of my past  future contributions to LibreOffice may be licensed under the 
MPLv2/LGPLv3+ dual license.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice