Licence statement

2012-05-04 Thread Nigel Hawkins

Hi all,

All of my past  future contributions to LibreOffice may be licensed 
under the MPL/LGPLv3+ dual license


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


Re: [Libreoffice] Class Time and its funny ideas about time

2011-08-11 Thread Nigel Hawkins
On Thu, 2011-08-11 at 14:43 +0200, Lubos Lunak wrote:
 Does somebody know why the Time class does either of these and how much would 
 break if I fixed these two to be sane?

I don't know, but I would guess that it is used for delta times as well
as wall clock times. That would certainly explain why the first
example was legal. Not so sure about the second.

Nigel


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


Re: [Libreoffice] Bug 38831 - [EasyHack] Get rid of SV_DECL_VARARR, SV_DECL_VARARR_PLAIN, SV_DECL_VARARR_SORT ....

2011-07-12 Thread Nigel Hawkins
Hi Maciej,

On Tue, 2011-07-12 at 00:31 +0200, Maciej Rumianowski wrote:
 I picked up this bug and tried to get rid of SvULongs.

I'm the person who's been (slowly) picking away at this, so welcome to
Libreoffice.

 I found for example in ScImportExport::Sylk2Doc and thought it would be
 good to first write a unit test (since there are unit tests of calc).
 But I wasn't successful using ScImportExport::ImportStream and
 ScImportExport::ExportStream, which use Sylk2Doc.

Proper unit tests (as in testing a small piece of functionality) can be
difficult to set up in LO as a lot of stuff is quite tightly coupled.
You can very soon find yourself having to load up the majority of calc
(or writer etc.) to test a very small piece of code. This is not trivial
and I suspect this is the situation you're in.

Check the mailing list archives for the past couple of days - Caolan
McNamara made a post that gave some details about adding unit tests.
That included some examples that might help.

Is it a right way I'm going to start develop LibreOffice or you what me
somewhere else in code?

Anything listed on the EasyHacks page (or marked EasyHack in bugzilla)
is a good place to start. They're all relatively simple but once you've
done a couple you should have a good feel for how the work-flow goes on
this project and how the various components fit together. That will help
a lot when you try something more complex.

Nigel.



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


Re: [Libreoffice] [SOLVED] Debug-mode getline-using sal unittest crashes, triggered by _GLIBCXX_DEBUG

2011-06-30 Thread Nigel Hawkins
On Wed, 2011-06-29 at 23:26 +0200, Julien Nabet wrote:
 diff --git a/sal/qa/osl/process/osl_process.cxx 
 b/sal/qa/osl/process/osl_process.cxx
 index 2535c4c..8695d79 100644
 --- a/sal/qa/osl/process/osl_process.cxx
 +++ b/sal/qa/osl/process/osl_process.cxx
 @@ -477,6 +477,7 @@ public:
   );
 
   std::string line;
 +   line.reserve(1);
   while (std::getline(file, line, '\0'))
   env_container-push_back(line);
   tidy_container(*env_container);

That change fixes the problem here.

Nigel

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


Re: [Libreoffice] Debug compilation fails in sal module

2011-06-23 Thread Nigel Hawkins
On Thu, 2011-06-23 at 13:06 +0100, serv serva wrote:
 I'm curious to know if I'm the only one to have this problem with debug 
 compilation.

No. I'm getting it as well now. I wasn't when you first mentioned it but
I've done a g pull -r since then.

For reference, I'm on Ubuntu 11.04 (Natty) 64-bit.

Just checked the md5sums as Caolan suggested. They match.
I'll try the _GLIBCXX_DEBUG thing later today if I get time.

Nigel

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


[Libreoffice] Build Dependencies

2011-05-31 Thread Nigel Hawkins
I've just upgraded my machine (Kubuntu 11.04 64bit) and had to re-get all the 
build dependencies. One thing I noticed is that doing:

sudo apt-get build-dep libreoffice

as suggested on the wiki pulls in (amongst other stuff) all of the mono 
libraries. Does the build really depend on these?

Nigel


signature.asc
Description: This is a digitally signed message part.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] [REVIEW] fix for a chart crasher

2011-03-03 Thread Nigel Hawkins
On Thu, 2011-03-03 at 10:32 -0500, Kohei Yoshida wrote:
 One thing to note when reading LibO's code (and also OOo's) is that, a
 lot of code that are written by the Oracle folks avoid using unsigned
 integers in favor of signed ones even though unsigned ones would make
 more sense logically.  This is the case especially in newer code, such
 as chart2 and oox.
 
 I have no explanation for this other than to say that this practice was
 probably largely inspired by Java, which doesn't have unsigned integer
 types.

Well, there is the following quote from Stroustrup:

The unsigned integer types are ideal for uses that treat storage as a
bit array. Using an unsigned instead of an int to gain one more bit to
represent positive integers is almost never a good idea. Attempts to
ensure that some values are positive by declaring variables unsigned
will typically be defeated by the implicit conversion rules.

The implicit conversions are implementation dependent when the value is
outside the allowed range for the type you're converting to. For some
compilers that means a bitwise conversion. I've read C++ books that
recommend avoiding unsigned for precisely that reason.

That said, I would favour using unsigned's because it makes your intent
clearer. But you do need to be very careful about mixing types.

Nigel


signature.asc
Description: This is a digitally signed message part
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] [PATCH][EasyHacks] Removal of SvBytes

2011-02-09 Thread Nigel Hawkins
Hi all,

The first attached patch removes the last use of SvBytes (from svx).
The second patch removes the declaration of it from svl.

This should eradicate it from the main code, but still leaves another
definition of it inside binfilter.

Nigel
From 44f75dd90a6693add7bd905333b9d76f11e493ac Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Wed, 9 Feb 2011 14:32:28 +
Subject: [PATCH] Remove InvalidSlot svArray stuff in FmXFormShell

---
 svx/source/form/fmshimp.cxx |   19 ++-
 svx/source/inc/fmshimp.hxx  |8 ++--
 2 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index aa36fa5..32a3c9d 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -116,6 +116,7 @@
 
 #include algorithm
 #include functional
+#include vector
 
 // wird fuer Invalidate verwendet - mitpflegen
 sal_uInt16 DatabaseSlotMap[] =
@@ -1050,9 +1051,8 @@ void FmXFormShell::InvalidateSlot( sal_Int16 nId, sal_Bool bWithId )
 ::osl::MutexGuard aGuard(m_aInvalidationSafety);
 if (m_nLockSlotInvalidation)
 {
-m_arrInvalidSlots.Insert(nId, m_arrInvalidSlots.Count());
 BYTE nFlags = ( bWithId ? 0x01 : 0 );
-m_arrInvalidSlots_Flags.Insert(nFlags, m_arrInvalidSlots_Flags.Count());
+m_arrInvalidSlots.push_back( InvalidSlotInfo(nId, nFlags) );
 }
 else
 if (nId)
@@ -1090,21 +1090,14 @@ IMPL_LINK(FmXFormShell, OnInvalidateSlots, void*, EMPTYARG)
 ::osl::MutexGuard aGuard(m_aInvalidationSafety);
 m_nInvalidationEvent = 0;
 
-DBG_ASSERT(m_arrInvalidSlots.Count() == m_arrInvalidSlots_Flags.Count(),
-FmXFormShell::OnInvalidateSlots : inconsistent slot arrays !);
-BYTE nFlags;
-for (sal_Int16 i=0; im_arrInvalidSlots.Count(); ++i)
+for (std::vectorInvalidSlotInfo::const_iterator i = m_arrInvalidSlots.begin(); i  m_arrInvalidSlots.end(); ++i)
 {
-nFlags = m_arrInvalidSlots_Flags[i];
-
-if (m_arrInvalidSlots[i])
-m_pShell-GetViewShell()-GetViewFrame()-GetBindings().Invalidate(m_arrInvalidSlots[i], sal_True, (nFlags  0x01));
+if (i-id)
+m_pShell-GetViewShell()-GetViewFrame()-GetBindings().Invalidate(i-id, sal_True, (i-flags  0x01));
 else
 m_pShell-GetViewShell()-GetViewFrame()-GetBindings().InvalidateShell(*m_pShell);
 }
-
-m_arrInvalidSlots.Remove(0, m_arrInvalidSlots.Count());
-m_arrInvalidSlots_Flags.Remove(0, m_arrInvalidSlots_Flags.Count());
+m_arrInvalidSlots.clear();
 return 0L;
 }
 
diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index c085544..8ae5b1b 100644
--- a/svx/source/inc/fmshimp.hxx
+++ b/svx/source/inc/fmshimp.hxx
@@ -180,8 +180,12 @@ class SAL_DLLPRIVATE FmXFormShell   :public FmXFormShell_BASE
 // We enable a permanent cursor for the grid we found a searched text, it's disabled in the next found event.
 FmFormArray			m_aSearchForms;
 
-SvUShorts	m_arrInvalidSlots;
-SvBytes		m_arrInvalidSlots_Flags;
+struct InvalidSlotInfo {
+USHORT id;
+BYTE   flags;
+inline InvalidSlotInfo(USHORT slotId, BYTE flgs) : id(slotId), flags(flgs) {};
+};
+std::vectorInvalidSlotInfo m_arrInvalidSlots;
 // we explicitly switch off the propbrw before leaving the design mode
 // this flag tells us if we have to switch it on again when reentering
 
-- 
1.7.0.4

From 5c56bd1fe9f74131db6ecbc98417869fba4f1886 Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Wed, 9 Feb 2011 14:48:21 +
Subject: [PATCH] Remove SvBytes completely

---
 svl/inc/svl/svstdarr.hxx|5 -
 svl/source/memtools/svarray.cxx |1 -
 2 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/svl/inc/svl/svstdarr.hxx b/svl/inc/svl/svstdarr.hxx
index 5f385b8..e92a31c 100644
--- a/svl/inc/svl/svstdarr.hxx
+++ b/svl/inc/svl/svstdarr.hxx
@@ -47,11 +47,6 @@ SV_DECL_VARARR_VISIBILITY( SvBools, BOOL, 1, 1, SVL_DLLPUBLIC )
 #define _SVSTDARR_BOOLS_DECL
 #endif
 
-#ifndef _SVSTDARR_BYTES_DECL
-SV_DECL_VARARR_VISIBILITY( SvBytes, BYTE, 1, 1, SVL_DLLPUBLIC )
-#define _SVSTDARR_BYTES_DECL
-#endif
-
 #ifndef _SVSTDARR_ULONGS_DECL
 SV_DECL_VARARR_VISIBILITY( SvULongs, ULONG, 1, 1, SVL_DLLPUBLIC )
 #define _SVSTDARR_ULONGS_DECL
diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx
index cdc49ce..c281904 100644
--- a/svl/source/memtools/svarray.cxx
+++ b/svl/source/memtools/svarray.cxx
@@ -77,7 +77,6 @@ USHORT SvPtrarrPlain::GetPos( const VoidPtr aElement ) const
 
 
 SV_IMPL_VARARR( SvBools, BOOL )
-SV_IMPL_VARARR( SvBytes, BYTE )
 SV_IMPL_VARARR( SvULongs, ULONG )
 SV_IMPL_VARARR( SvUShorts, USHORT )
 SV_IMPL_VARARR( SvLongs, long)
-- 
1.7.0.4

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


Re: [Libreoffice] [PATCH][EasyHacks] Removal of SvBytes

2011-02-09 Thread Nigel Hawkins
On Wed, 2011-02-09 at 14:57 +, Nigel Hawkins wrote:
 This should eradicate it from the main code, but still leaves another
 definition of it inside binfilter.

My mistake. There were still a couple of #defines kicking around for
include guards. The attached should get rid of them. Plus remaining
defines for SvShorts (which were done some time ago).

Nigel
From fa9d9b53ef584a77274393b618d9f279ab088c23 Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Wed, 9 Feb 2011 15:20:37 +
Subject: [PATCH] Remove last traces of SvBytes and SvShorts in sw

---
 sw/inc/undobj.hxx |1 -
 sw/source/core/inc/scriptinfo.hxx |2 --
 sw/source/core/layout/layhelp.hxx |1 -
 3 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index ae86015..1efb36f 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -40,7 +40,6 @@
 #define _SVSTDARR_USHORTS
 #define _SVSTDARR_ULONGS
 #define _SVSTDARR_BOOLS
-#define _SVSTDARR_BYTES
 #define _SVSTDARR_USHORTSSORT
 #include svl/svstdarr.hxx
 #endif
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index 4a70226..8f09d68 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -28,8 +28,6 @@
 #ifndef _SCRIPTINFO_HXX
 #define _SCRIPTINFO_HXX
 #ifndef _SVSTDARR_HXX
-#define _SVSTDARR_SHORTS
-#define _SVSTDARR_BYTES
 #define _SVSTDARR_USHORTS
 #define _SVSTDARR_XUB_STRLEN
 #include svl/svstdarr.hxx
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index 009e462..66a5d85 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -30,7 +30,6 @@
 #ifndef _SVSTDARR_HXX
 #define _SVSTDARR_USHORTS
 #define _SVSTDARR_ULONGS
-#define _SVSTDARR_BYTES
 #define _SVSTDARR_XUB_STRLEN
 #include svl/svstdarr.hxx
 #endif
-- 
1.7.0.4

From dbc5345757cecf856f45364d06c85dcb80261d7d Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Wed, 9 Feb 2011 15:22:46 +
Subject: [PATCH] Remove last traces of SvBytes from svl

---
 svl/source/memtools/svarray.cxx |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/svl/source/memtools/svarray.cxx b/svl/source/memtools/svarray.cxx
index c281904..b104056 100644
--- a/svl/source/memtools/svarray.cxx
+++ b/svl/source/memtools/svarray.cxx
@@ -32,7 +32,6 @@
 #define _SVARRAY_CXX
 
 #define _SVSTDARR_BOOLS
-#define _SVSTDARR_BYTES
 #define _SVSTDARR_ULONGS
 #define _SVSTDARR_ULONGSSORT
 #define _SVSTDARR_USHORTS
-- 
1.7.0.4

From 070670a7b0fb3b49db8d70749b7d3f815c798718 Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Wed, 9 Feb 2011 15:22:09 +
Subject: [PATCH] Remove last traces of SvBytes from svx

---
 svx/source/inc/fmshimp.hxx |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/svx/source/inc/fmshimp.hxx b/svx/source/inc/fmshimp.hxx
index 8ae5b1b..2424658 100644
--- a/svx/source/inc/fmshimp.hxx
+++ b/svx/source/inc/fmshimp.hxx
@@ -57,7 +57,6 @@
 #include svl/lstner.hxx
 
 #define _SVSTDARR_BOOLS
-#define _SVSTDARR_BYTES
 #define _SVSTDARR_LONGS
 #define _SVSTDARR_ULONGS
 #define _SVSTDARR_USHORTS
-- 
1.7.0.4

From 0cf0ff68eb86bafe6431701f55a4f1cb9fff36a1 Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Wed, 9 Feb 2011 15:21:35 +
Subject: [PATCH] Remove last traces of SvShorts from sc

---
 sc/source/ui/inc/undotab.hxx  |7 ---
 sc/source/ui/inc/viewfunc.hxx |6 --
 2 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index 26eb8a2..f37c2a3 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -35,13 +35,6 @@
 #include tools/color.hxx
 #include tabbgcolor.hxx
 
-#ifndef _SVSTDARR_SHORTS
-
-#define _SVSTDARR_SHORTS
-#include svl/svstdarr.hxx
-
-#endif
-
 #ifndef _SVSTDARR_STRINGS
 
 #define _SVSTDARR_STRINGS
diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx
index b07bf00..77fbc43 100644
--- a/sc/source/ui/inc/viewfunc.hxx
+++ b/sc/source/ui/inc/viewfunc.hxx
@@ -32,12 +32,6 @@
 
 #include tabbgcolor.hxx
 
-#ifndef _SVSTDARR_SHORTS
-#define _SVSTDARR_SHORTS
-#include svl/svstdarr.hxx
-
-#endif
-
 #ifndef _SVSTDARR_STRINGS
 
 #define _SVSTDARR_STRINGS
-- 
1.7.0.4

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


Re: [Libreoffice] [libreoffice] [PUSHED] EasyHacks: Reanimating more tests in ure/sal

2011-02-08 Thread Nigel Hawkins
Hi David,

 4. Special preprocessor magic is required...
 
 5. sal tests are 'special' with regard to cppunit...

Could you summarise this sort of information on the wiki somewhere?

A lot of the code-base seems to have very little testing in place and
dependency issues make it hard enough to add any. Having a reference for
all this background stuff would be very useful. 

Nigel.

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


Re: [Libreoffice] [PATCH] Get rid of SvBytes/SvSvULongs in SwUndoDelNum

2011-02-08 Thread Nigel Hawkins
On Mon, 2011-02-07 at 23:31 +0300, Andrey Turkin wrote:
 So that would be the next step? Should I squash the two patches and resubmit 
 it?

Hopefully, Michael or somebody will push the pair of them.

Since we both seem to be looking at this section of the EasyHacks, can I
suggest we follow Michael's suggestion and add a note on the wiki that
we've started a bit. Then we can avoid duplicating effort.

Nigel.

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


[Libreoffice] [PATCH][EasyHacks] Get rid of SvBytes and SvULongs in SwLayCacheIoImpl

2011-02-08 Thread Nigel Hawkins
Hi,

Attached is a patch to remove a couple more uses of svarray stuff from
writer.

Nigel
From 54529e04dcd47306724c478d3ac177a63ce24a42 Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Thu, 3 Feb 2011 16:09:53 +
Subject: [PATCH 2/2] Remove svArrays from SwLayCacheIoImpl

---
 sw/source/core/layout/laycache.cxx |   44 ++--
 sw/source/core/layout/layhelp.hxx  |   10 ++-
 2 files changed, 25 insertions(+), 29 deletions(-)

diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index a2ec1d2..89620a9 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -1186,13 +1186,10 @@ SwLayCacheIoImpl::SwLayCacheIoImpl( SvStream rStrm, BOOL bWrtMd ) :
 BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
 {
 BOOL bRes = TRUE;
-UINT16 nLvl = aRecTypes.Count();
-OSL_ENSURE( nLvl == aRecSizes.Count(), OpenRec: Level );
 UINT32 nPos = pStream-Tell();
 if( bWriteMode )
 {
-aRecTypes.Insert( cType, nLvl );
-aRecSizes.Insert( nPos, nLvl );
+aRecords.push_back( RecTypeSize(cType, nPos) );
 *pStream  (UINT32) 0;
 }
 else
@@ -1200,20 +1197,20 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
 UINT32 nVal;
 *pStream  nVal;
 BYTE cRecTyp = (BYTE)nVal;
-aRecTypes.Insert( cRecTyp, nLvl );
-sal_uInt32 nSize = nVal  8;
-aRecSizes.Insert( nPos + nSize, nLvl );
 if( !nVal || cRecTyp != cType ||
 pStream-GetErrorCode() != SVSTREAM_OK || pStream-IsEof() )
 {
 OSL_ENSURE( nVal, OpenRec: Record-Header is 0 );
-OSL_ENSURE( cRecTyp == cType,
-OpenRec: Wrong Record Type );
-aRecTypes[nLvl] = 0;
-aRecSizes[nLvl] = pStream-Tell();
+OSL_ENSURE( cRecTyp == cType, OpenRec: Wrong Record Type );
+aRecords.push_back( RecTypeSize(0, pStream-Tell()) );
 bRes = sal_False;
 bError = TRUE;
 }
+else
+{
+sal_uInt32 nSize = nVal  8;
+aRecords.push_back( RecTypeSize(cRecTyp, nPos+nSize) );
+}
 }
 return bRes;
 }
@@ -1223,19 +1220,16 @@ BOOL SwLayCacheIoImpl::OpenRec( BYTE cType )
 BOOL SwLayCacheIoImpl::CloseRec( BYTE )
 {
 BOOL bRes = TRUE;
-UINT16 nLvl = aRecTypes.Count();
-OSL_ENSURE( nLvl == aRecSizes.Count(), CloseRec: wrong Level );
-OSL_ENSURE( nLvl, CloseRec: no levels );
-if( nLvl )
+OSL_ENSURE( !aRecords.empty(), CloseRec: no levels );
+if( !aRecords.empty() )
 {
-nLvl--;
 UINT32 nPos = pStream-Tell();
 if( bWriteMode )
 {
-UINT32 nBgn = aRecSizes[nLvl];
+UINT32 nBgn = aRecords.back().size;
 pStream-Seek( nBgn );
 UINT32 nSize = nPos - nBgn;
-UINT32 nVal = ( nSize  8 ) | aRecTypes[nLvl];
+UINT32 nVal = ( nSize  8 ) | aRecords.back().type;
 *pStream  nVal;
 pStream-Seek( nPos );
 if( pStream-GetError() != SVSTREAM_OK )
@@ -1243,7 +1237,7 @@ BOOL SwLayCacheIoImpl::CloseRec( BYTE )
 }
 else
 {
-UINT32 n = aRecSizes[nLvl];
+UINT32 n = aRecords.back().size;
 OSL_ENSURE( n = nPos, CloseRec: to much data read );
 if( n != nPos )
 {
@@ -1254,9 +1248,7 @@ BOOL SwLayCacheIoImpl::CloseRec( BYTE )
 if( pStream-GetErrorCode() != SVSTREAM_OK )
 bRes = FALSE;
 }
-
-aRecTypes.Remove( nLvl, 1 );
-aRecSizes.Remove( nLvl, 1 );
+aRecords.pop_back();
 }
 
 if( !bRes )
@@ -1267,16 +1259,14 @@ BOOL SwLayCacheIoImpl::CloseRec( BYTE )
 
 UINT32 SwLayCacheIoImpl::BytesLeft()
 {
-UINT16 nLvl = aRecSizes.Count();
 UINT32 n = 0;
-if( !bError  nLvl )
+if( !bError  !aRecords.empty() )
 {
-UINT32 nEndPos = aRecSizes[ nLvl-1 ];
+UINT32 nEndPos = aRecords.back().size;
 UINT32 nPos = pStream-Tell();
 if( nEndPos  nPos )
 n = nEndPos - nPos;
 }
-
 return n;
 }
 
@@ -1301,7 +1291,7 @@ void SwLayCacheIoImpl::SkipRec()
 {
 BYTE c = Peek();
 OpenRec( c );
-pStream-Seek( aRecSizes[aRecSizes.Count()-1] );
+pStream-Seek( aRecords.back().size );
 CloseRec( c );
 }
 
diff --git a/sw/source/core/layout/layhelp.hxx b/sw/source/core/layout/layhelp.hxx
index 71f74a2..009e462 100644
--- a/sw/source/core/layout/layhelp.hxx
+++ b/sw/source/core/layout/layhelp.hxx
@@ -35,6 +35,7 @@
 #include svl/svstdarr.hxx
 #endif
 #include swrect.hxx
+#include vector
 
 class SwDoc;
 class SwFrm;
@@ -167,8 +168,13 @@ public:
 
 class SwLayCacheIoImpl
 {
-SvBytes		   	aRecTypes;
-SvULongs		aRecSizes;
+private:
+struct RecTypeSize {
+BYTE  type;
+ULONG size;
+RecTypeSize(BYTE typ, ULONG siz) : type(typ), size(siz) {}
+};
+std

[Libreoffice] [PATCH][EasyHacks] Remove some use of svarray stuff in SwScriptInfo

2011-02-08 Thread Nigel Hawkins
Hi,

The attached patch removes one use of SvBytes and SvXub_StrLens from
SwScriptInfo.

There are still other uses in there to be replaced, but the bits don't
interact very much.

Changes under LGPLv3+/MPL

Nigel.
From 8d92a6e07a576a76b429f98c10ab48975a69768f Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Tue, 8 Feb 2011 14:05:29 +
Subject: [PATCH 3/3] Remove some svArray usage in SwScriptInfo

---
 sw/source/core/inc/scriptinfo.hxx |   23 +++-
 sw/source/core/text/porlay.cxx|   52 
 2 files changed, 39 insertions(+), 36 deletions(-)

diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index 5b46b8d..ef3a365 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -99,8 +99,16 @@ public:
 class SwScriptInfo
 {
 private:
-SvXub_StrLens aScriptChg;
-SvBytes aScriptType;
+//! Records a single change in script type.
+struct ScriptChangeInfo
+{
+xub_StrLen position; //! Character position at which we change script
+BYTE   type; //! Script type (Latin/Asian/Complex) that we change to.
+inline ScriptChangeInfo(xub_StrLen pos, BYTE typ) : position(pos), type(typ) {};
+};
+//TODO - This is sorted, so should probably be a std::set rather than vector.
+//   But we also use random access (probably unnecessarily).
+std::vectorScriptChangeInfo aScriptChanges;
 SvXub_StrLens aDirChg;
 SvBytes aDirType;
 SvXub_StrLens aKashida;
@@ -357,16 +365,17 @@ inline void SwScriptInfo::SetInvalidity( const xub_StrLen nPos )
 if ( nPos  nInvalidityPos )
 nInvalidityPos = nPos;
 };
-inline USHORT SwScriptInfo::CountScriptChg() const { return aScriptChg.Count(); }
+
+inline USHORT SwScriptInfo::CountScriptChg() const { return aScriptChanges.size(); }
 inline xub_StrLen SwScriptInfo::GetScriptChg( const USHORT nCnt ) const
 {
-OSL_ENSURE( nCnt  aScriptChg.Count(),No ScriptChange today!);
-return aScriptChg[ nCnt ];
+OSL_ENSURE( nCnt  aScriptChanges.size(),No ScriptChange today!);
+return aScriptChanges[nCnt].position;
 }
 inline BYTE SwScriptInfo::GetScriptType( const xub_StrLen nCnt ) const
 {
-OSL_ENSURE( nCnt  aScriptChg.Count(),No ScriptType today!);
-return aScriptType[ nCnt ];
+OSL_ENSURE( nCnt  aScriptChanges.size(),No ScriptType today!);
+return aScriptChanges[nCnt].type;
 }
 
 inline USHORT SwScriptInfo::CountDirChg() const { return aDirChg.Count(); }
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 7c6a4b3..51d6c55 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -915,9 +915,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode rNode, sal_Bool bRTL )
 //
 
 // remove invalid entries from script information arrays
-const USHORT nScriptRemove = aScriptChg.Count() - nCnt;
-aScriptChg.Remove( nCnt, nScriptRemove );
-aScriptType.Remove( nCnt, nScriptRemove );
+aScriptChanges.erase( aScriptChanges.begin() + nCnt, aScriptChanges.end() );
 
 // get the start of the last compression group
 USHORT nLastCompression = nChg;
@@ -981,8 +979,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode rNode, sal_Bool bRTL )
 
 if ( nScript != nNextScript )
 {
-aScriptChg.Insert( nEnd, nCnt );
-aScriptType.Insert( nScript, nCnt++ );
+aScriptChanges.push_back( ScriptChangeInfo(nEnd, nScript) );
+nCnt++;
 nScript = nNextScript;
 }
 }
@@ -991,7 +989,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode rNode, sal_Bool bRTL )
 // UPDATE THE SCRIPT INFO ARRAYS:
 //
 
-while ( nChg  rTxt.Len() || ( !aScriptChg.Count()  !rTxt.Len() ) )
+while ( nChg  rTxt.Len() || ( !aScriptChanges.empty()  !rTxt.Len() ) )
 {
 OSL_ENSURE( i18n::ScriptType::WEAK != nScript,
 Inserting WEAK into SwScriptInfo structure );
@@ -1032,18 +1030,18 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode rNode, sal_Bool bRTL )
 if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK ||
 nType == U_COMBINING_SPACING_MARK )
 {
-aScriptChg.Insert( nChg - 1, nCnt );
+aScriptChanges.push_back( ScriptChangeInfo(nChg-1, nScript) );
 }
 else
 {
-aScriptChg.Insert( nChg, nCnt );
+aScriptChanges.push_back( ScriptChangeInfo(nChg, nScript) );
 }
 }
 else
 {
-aScriptChg.Insert( nChg, nCnt );
+aScriptChanges.push_back( ScriptChangeInfo(nChg, nScript) );
 }
-aScriptType.Insert( nScript, nCnt++ );
+++nCnt;
 
 // if current script is asian, we search for compressable characters
 // in this range
@@ -1360,37 +1358,33 @@ void SwScriptInfo::InitScriptInfo( const

Re: [Libreoffice] [PATCH][EasyHacks] Remove some use of svarray stuff in SwScriptInfo

2011-02-08 Thread Nigel Hawkins
The attached patch removes some more SvBytes and SvXub_StrLens usage
from SwScriptInfo.

Changes under LGPLv3+/MPL

Nigel.
From bdbe75e3715a5e553c26edcefb09abff7ebf936b Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Tue, 8 Feb 2011 15:05:14 +
Subject: [PATCH 4/4] Remove direction svArray usage in SwScriptInfo

---
 sw/source/core/inc/scriptinfo.hxx |   20 +---
 sw/source/core/text/porlay.cxx|   17 -
 2 files changed, 17 insertions(+), 20 deletions(-)

diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index ef3a365..f8cf486 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -109,8 +109,14 @@ private:
 //TODO - This is sorted, so should probably be a std::set rather than vector.
 //   But we also use random access (probably unnecessarily).
 std::vectorScriptChangeInfo aScriptChanges;
-SvXub_StrLens aDirChg;
-SvBytes aDirType;
+//! Records a single change in direction.
+struct DirectionChangeInfo
+{
+xub_StrLen position; //! Character position at which we change direction.
+BYTE   type; //! Direction that we change to.
+inline DirectionChangeInfo(xub_StrLen pos, BYTE typ) : position(pos), type(typ) {};
+};
+std::vectorDirectionChangeInfo aDirectionChanges;
 SvXub_StrLens aKashida;
 SvXub_StrLens aKashidaInvalid;
 SvXub_StrLens aNoKashidaLine;
@@ -378,16 +384,16 @@ inline BYTE SwScriptInfo::GetScriptType( const xub_StrLen nCnt ) const
 return aScriptChanges[nCnt].type;
 }
 
-inline USHORT SwScriptInfo::CountDirChg() const { return aDirChg.Count(); }
+inline USHORT SwScriptInfo::CountDirChg() const { return aDirectionChanges.size(); }
 inline xub_StrLen SwScriptInfo::GetDirChg( const USHORT nCnt ) const
 {
-OSL_ENSURE( nCnt  aDirChg.Count(),No DirChange today!);
-return aDirChg[ nCnt ];
+OSL_ENSURE( nCnt  aDirectionChanges.size(),No DirChange today!);
+return aDirectionChanges[ nCnt ].position;
 }
 inline BYTE SwScriptInfo::GetDirType( const xub_StrLen nCnt ) const
 {
-OSL_ENSURE( nCnt  aDirChg.Count(),No DirType today!);
-return aDirType[ nCnt ];
+OSL_ENSURE( nCnt  aDirectionChanges.size(),No DirType today!);
+return aDirectionChanges[ nCnt ].type;
 }
 
 inline USHORT SwScriptInfo::CountKashida() const { return aKashida.Count(); }
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 51d6c55..b7db718 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -1304,9 +1304,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode rNode, sal_Bool bRTL )
 #endif
 
 // remove invalid entries from direction information arrays
-const USHORT nDirRemove = aDirChg.Count();
-aDirChg.Remove( 0, nDirRemove );
-aDirType.Remove( 0, nDirRemove );
+aDirectionChanges.clear();
 
 // Perform Unicode Bidi Algorithm for text direction information
 bool bPerformUBA = UBIDI_LTR != nDefaultDir;
@@ -1326,7 +1324,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode rNode, sal_Bool bRTL )
 // 1. All text in RTL runs will use the CTL font
 // #i89825# change the script type also to CTL (hennerdrewes)
 // 2. Text in embedded LTR runs that does not have any strong LTR characters (numbers!)
-for ( USHORT nDirIdx = 0; nDirIdx  aDirChg.Count(); ++nDirIdx )
+for ( USHORT nDirIdx = 0; nDirIdx  aDirectionChanges.size(); ++nDirIdx )
 {
 const BYTE nCurrDirType = GetDirType( nDirIdx );
 // nStart ist start of RTL run:
@@ -1395,10 +1393,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode rNode, sal_Bool bRTL )
 void SwScriptInfo::UpdateBidiInfo( const String rTxt )
 {
 // remove invalid entries from direction information arrays
-const USHORT nDirRemove = aDirChg.Count();
-aDirChg.Remove( 0, nDirRemove );
-aDirType.Remove( 0, nDirRemove );
-
+aDirectionChanges.clear();
 //
 // Bidi functions from icu 2.0
 //
@@ -1413,14 +1408,10 @@ void SwScriptInfo::UpdateBidiInfo( const String rTxt )
 int32_t nStart = 0;
 int32_t nEnd;
 UBiDiLevel nCurrDir;
-// counter for direction information arrays
-USHORT nCntDir = 0;
-
 for ( USHORT nIdx = 0; nIdx  nCount; ++nIdx )
 {
 ubidi_getLogicalRun( pBidi, nStart, nEnd, nCurrDir );
-aDirChg.Insert( (USHORT)nEnd, nCntDir );
-aDirType.Insert( (BYTE)nCurrDir, nCntDir++ );
+aDirectionChanges.push_back( DirectionChangeInfo(nEnd, nCurrDir) );
 nStart = nEnd;
 }
 
-- 
1.7.0.4

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


Re: [Libreoffice] [PATCH][EasyHacks] Remove some use of svarray stuff in SwScriptInfo

2011-02-08 Thread Nigel Hawkins
This patch removes the last use of SvBytes from SwScriptInfo. And should
be the last usage in sw.

Nigel
From 3d1e455ca3ede76235e769b65342f0f31d9f44ee Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Tue, 8 Feb 2011 16:12:13 +
Subject: [PATCH 5/5] Remove compression svArray usage from SwScriptInfo

---
 sw/source/core/inc/scriptinfo.hxx |   26 --
 sw/source/core/text/porlay.cxx|   15 +++
 2 files changed, 19 insertions(+), 22 deletions(-)

diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index f8cf486..4a70226 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -121,10 +121,16 @@ private:
 SvXub_StrLens aKashidaInvalid;
 SvXub_StrLens aNoKashidaLine;
 SvXub_StrLens aNoKashidaLineEnd;
-SvXub_StrLens aCompChg;
-SvXub_StrLens aCompLen;
 SvXub_StrLens aHiddenChg;
-SvBytes aCompType;
+//! Records a single change in compression.
+struct CompressionChangeInfo
+{
+xub_StrLen position; //! Character position where the change occurs.
+xub_StrLen length;   //! Length of the segment.
+BYTE   type; //! Type of compression that we change to.
+inline CompressionChangeInfo(xub_StrLen pos, xub_StrLen len, BYTE typ) : position(pos), length(len), type(typ) {};
+};
+std::vectorCompressionChangeInfo aCompressionChanges;
 xub_StrLen nInvalidityPos;
 BYTE nDefaultDir;
 
@@ -403,22 +409,22 @@ inline xub_StrLen SwScriptInfo::GetKashida( const USHORT nCnt ) const
 return aKashida[ nCnt ];
 }
 
-inline USHORT SwScriptInfo::CountCompChg() const { return aCompChg.Count(); };
+inline USHORT SwScriptInfo::CountCompChg() const { return aCompressionChanges.size(); };
 inline xub_StrLen SwScriptInfo::GetCompStart( const USHORT nCnt ) const
 {
-OSL_ENSURE( nCnt  aCompChg.Count(),No CompressionStart today!);
-return aCompChg[ nCnt ];
+OSL_ENSURE( nCnt  aCompressionChanges.size(),No CompressionStart today!);
+return aCompressionChanges[ nCnt ].position;
 }
 inline xub_StrLen SwScriptInfo::GetCompLen( const USHORT nCnt ) const
 {
-OSL_ENSURE( nCnt  aCompChg.Count(),No CompressionLen today!);
-return aCompLen[ nCnt ];
+OSL_ENSURE( nCnt  aCompressionChanges.size(),No CompressionLen today!);
+return aCompressionChanges[ nCnt ].length;
 }
 
 inline BYTE SwScriptInfo::GetCompType( const USHORT nCnt ) const
 {
-OSL_ENSURE( nCnt  aCompChg.Count(),No CompressionType today!);
-return aCompType[ nCnt ];
+OSL_ENSURE( nCnt  aCompressionChanges.size(),No CompressionType today!);
+return aCompressionChanges[ nCnt ].type;
 }
 
 inline USHORT SwScriptInfo::CountHiddenChg() const { return aHiddenChg.Count(); };
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index b7db718..8ca3535 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -931,10 +931,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode rNode, sal_Bool bRTL )
 }
 
 // remove invalid entries from compression information arrays
-const USHORT nCompRemove = aCompChg.Count() - nCntComp;
-aCompChg.Remove( nCntComp, nCompRemove );
-aCompLen.Remove( nCntComp, nCompRemove );
-aCompType.Remove( nCntComp, nCompRemove );
+aCompressionChanges.erase(aCompressionChanges.begin() + nCntComp, aCompressionChanges.end() );
 
 // get the start of the last kashida group
 USHORT nLastKashida = nChg;
@@ -1085,10 +1082,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode rNode, sal_Bool bRTL )
 if ( CHARCOMPRESS_PUNCTUATION_KANA == aCompEnum ||
  ePrevState != KANA )
 {
-aCompChg.Insert( nPrevChg, nCntComp );
-BYTE nTmpType = ePrevState;
-aCompType.Insert( nTmpType, nCntComp );
-aCompLen.Insert( nLastCompression - nPrevChg, nCntComp++ );
+aCompressionChanges.push_back( CompressionChangeInfo(nPrevChg, nLastCompression - nPrevChg, ePrevState) );
 }
 }
 
@@ -1106,10 +1100,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode rNode, sal_Bool bRTL )
 if ( CHARCOMPRESS_PUNCTUATION_KANA == aCompEnum ||
  ePrevState != KANA )
 {
-aCompChg.Insert( nPrevChg, nCntComp );
-BYTE nTmpType = ePrevState;
-aCompType.Insert( nTmpType, nCntComp );
-aCompLen.Insert( nLastCompression - nPrevChg, nCntComp++ );
+aCompressionChanges.push_back( CompressionChangeInfo(nPrevChg, nLastCompression - nPrevChg, ePrevState) );
 }
 }
 }
-- 
1.7.0.4

___
LibreOffice mailing list
LibreOffice

Re: [Libreoffice] [PATCH] Get rid of SvBytes/SvSvULongs in SwUndoDelNum

2011-02-07 Thread Nigel Hawkins
Hi Andrey,

 This is my first patch to LibreOffice so I'd be grateful for feedback on any 
 issues.

Oddly enough, I was looking at this the other day but didn't get round
to submitting a patch because I couldn't get sw to compile (for totally
unrelated reasons). My changes were almost identical to yours, though I
have one suggestion.

Changing to a std::pair means we go from descriptively named items
(aNodeIdx and aLevels) to the generic first/second. Which is less clear
to the reader. Can I suggest you either:

A) Add a comment above the SvNode definition to say (very briefly) what
the ULONG and int are used for.

or:

B) Define a local class/struct instead of the pair with more descriptive
names for the elements.

Nigel

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


Re: [Libreoffice] [PATCH] Get rid of SvBytes/SvSvULongs in SwUndoDelNum

2011-02-07 Thread Nigel Hawkins
On Mon, 2011-02-07 at 15:30 +, Michael Meeks wrote:
 Perhaps you can build your patch on top of Andrey's to capture that
 goodness ?

OK. Attached.

  I'm busy adding a few more easy hacks to try to make such
 conflicts less likely: it can help to add your name and a date vs. an
 easy hack (with perhaps a sub-portion of what you're working on).

I shall try and remember to do this in future.

Nigel
From 00f1b9804c1f19c1bb7e6c790910f9005f89321b Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Mon, 7 Feb 2011 16:19:59 +
Subject: [PATCH] Replace std::pair with more descriptive names in SwUndoDelNum

---
 sw/inc/undobj.hxx |   10 +++---
 sw/source/core/undo/unnum.cxx |   10 +-
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index e6ea274..ae86015 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -1371,9 +1371,13 @@ public:
 
 class SwUndoDelNum : public SwUndo, private SwUndRng
 {
-typedef std::vector std::pair ULONG, int   SvNode;
-SvNode aNodes;
-SvBools aRstLRSpaces;
+struct NodeLevel
+{
+ULONG index;
+int level;
+inline NodeLevel(ULONG idx, int lvl) : index(idx), level(lvl) {};
+};
+std::vectorNodeLevel aNodes;
 SwHistory* pHistory;
 public:
 SwUndoDelNum( const SwPaM rPam );
diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx
index d5afd1f..f13f94c 100644
--- a/sw/source/core/undo/unnum.cxx
+++ b/sw/source/core/undo/unnum.cxx
@@ -214,11 +214,11 @@ void SwUndoDelNum::Undo( SwUndoIter rUndoIter )
 pHistory-TmpRollback( rDoc, 0 );
 pHistory-SetTmpEnd( pHistory-Count() );
 
-for( SvNode::const_iterator i = aNodes.begin(); i != aNodes.end(); ++i )
+for( std::vectorNodeLevel::const_iterator i = aNodes.begin(); i != aNodes.end(); ++i )
 {
-SwTxtNode* pNd = rDoc.GetNodes()[ i-first ]-GetTxtNode();
-OSL_ENSURE( pNd, wo ist der TextNode geblieben? );
-pNd-SetAttrListLevel( i-second );
+SwTxtNode* pNd = rDoc.GetNodes()[ i-index ]-GetTxtNode();
+OSL_ENSURE( pNd, Where has the TextNode gone? );
+pNd-SetAttrListLevel( i-level );
 
 if( pNd-GetCondFmtColl() )
 pNd-ChkCondColl();
@@ -246,7 +246,7 @@ void SwUndoDelNum::AddNode( const SwTxtNode rNd, BOOL )
 {
 if( rNd.GetNumRule() )
 {
-aNodes.push_back( SvNode::value_type( rNd.GetIndex(), rNd.GetActualListLevel() ) );
+aNodes.push_back( NodeLevel( rNd.GetIndex(), rNd.GetActualListLevel() ) );
 }
 }
 
-- 
1.7.0.4

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


[Libreoffice] [PATCH] EasyHacks 4.13 - get rid of macros from svarray.hxx

2011-01-28 Thread Nigel Hawkins
Hi,

I've started looking at the easy hack for removing the macro-defined
vectors in svl/avarray. Chose an easy one to start with. First
attached patch removes all usage of SvShorts from sc (only place it was
used), and the second removes the declaration of it from svl.

Changes are LGPLv3+/MPL

Nigel.

--
NEW Zoner Photo Studio Free - is a free program for every step in the process
of managing, editing, and sharing pictures.  --- freephotostudio.com 
From d3f6f0744dd828ca6cebddcbf9598e73ac496637 Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Thu, 27 Jan 2011 13:52:52 +
Subject: [PATCH] Replace SvShorts with std::vector

---
 sc/source/ui/docshell/docfunc.cxx |   21 ++-
 sc/source/ui/inc/undotab.hxx  |8 +++---
 sc/source/ui/inc/viewfunc.hxx |3 +-
 sc/source/ui/undo/undotab.cxx |   41 ++---
 sc/source/ui/view/tabvwshf.cxx|   10 +---
 sc/source/ui/view/viewfun2.cxx|   37 -
 6 files changed, 61 insertions(+), 59 deletions(-)

diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 85e31a5..0fe04f7 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2,7 +2,7 @@
 /*
  *
  * 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
@@ -105,6 +105,7 @@
 #include basic/basmgr.hxx
 #include boost/scoped_ptr.hpp
 #include set
+#include vector
 
 using namespace com::sun::star;
 using ::com::sun::star::uno::Sequence;
@@ -2625,8 +2626,8 @@ uno::Reference uno::XInterface  GetDocModuleObject( SfxObjectShell rDocSh, St
 uno::Reference uno::XInterface  xDocModuleApiObject;
 if ( xSF.is() )
 {
-xVBACodeNamedObjectAccess.set( xSF-createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ooo.vba.VBAObjectModuleObjectProvider))), uno::UNO_QUERY );
-xDocModuleApiObject.set( xVBACodeNamedObjectAccess-getByName( sCodeName ), uno::UNO_QUERY );
+xVBACodeNamedObjectAccess.set( xSF-createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ooo.vba.VBAObjectModuleObjectProvider))), uno::UNO_QUERY );
+xDocModuleApiObject.set( xVBACodeNamedObjectAccess-getByName( sCodeName ), uno::UNO_QUERY );
 }
 return xDocModuleApiObject;
 
@@ -2661,7 +2662,7 @@ void VBA_InsertModule( ScDocument rDoc, SCTAB nTab, String sModuleName, String
 // if the Module with codename exists then find a new name
 sal_Int32 nNum = 0;
 String genModuleName;
-if ( sModuleName.Len() ) 
+if ( sModuleName.Len() )
 genModuleName = sModuleName;
 else
 {
@@ -2670,7 +2671,7 @@ void VBA_InsertModule( ScDocument rDoc, SCTAB nTab, String sModuleName, String
 }
 while( xLib-hasByName( genModuleName ) )
 genModuleName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( Sheet)) + rtl::OUString::valueOf( ++nNum );
-
+
 uno::Any aSourceAny;
 rtl::OUString sTmpSource = sSource;
 if ( sTmpSource.getLength() == 0 )
@@ -2728,7 +2729,7 @@ BOOL ScDocFunc::InsertTable( SCTAB nTab, const String rName, BOOL bRecord, BOOL
 
 
 // Strange loop, also basic is loaded too early ( InsertTable )
-// is called via the xml import for sheets in described in odf 
+// is called via the xml import for sheets in described in odf
 BOOL bInsertDocModule = false;
 
 if(  !rDocShell.GetDocument()-IsImportingXML() )
@@ -2833,8 +2834,8 @@ BOOL ScDocFunc::DeleteTable( SCTAB nTab, BOOL bRecord, BOOL /* bApi */ )
 {
 if (bRecord)
 {
-SvShorts theTabs;
-theTabs.Insert(nTab,theTabs.Count());
+vectorSCTAB theTabs;
+theTabs.push_back(nTab);
 rDocShell.GetUndoManager()-AddUndoAction(
 new ScUndoDeleteTab( rDocShell, theTabs, pUndoDoc, pUndoData ));
 }
@@ -3295,8 +3296,8 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress rPos,
 if (nPos == 0)
 return FALSE;	// erste Spalte / Zeile
 
-ScBreakType nBreak = bColumn ? 
-pDoc-HasColBreak(static_castSCCOL(nPos), nTab) : 
+ScBreakType nBreak = bColumn ?
+pDoc-HasColBreak(static_castSCCOL(nPos), nTab) :
 pDoc-HasRowBreak(static_castSCROW(nPos), nTab);
 if (nBreak  BREAK_MANUAL)
 return true;
diff --git a/sc/source/ui/inc/undotab.hxx b/sc/source/ui/inc/undotab.hxx
index bf43322..26eb8a2 100644
--- a/sc/source/ui/inc/undotab.hxx
+++ b/sc/source/ui/inc/undotab.hxx
@@ -2,7 +2,7 @@
 /*
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its

Re: [Libreoffice] [PATCH] EasyHacks 4.13 - get rid of macros from svarray.hxx

2011-01-28 Thread Nigel Hawkins
On Fri, 2011-01-28 at 10:57 -0500, Kohei Yoshida wrote:
 You don't need to remove all trailing whitespaces in those files you
 modify, as that would create unnecessary hunks making it harder for us
 to review your patches.

I wasn't aware I had. I suspect my pesky editor is doing it behind my
back. I'll set a trap for it and see if I can catch it red-handed.

Nigel.

--
NEW Zoner Photo Studio Free - is a free program for every step in the process
of managing, editing, and sharing pictures.  --- freephotostudio.com 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] SCID_NEWDOCUMENT

2011-01-28 Thread Nigel Hawkins
On Fri, 2011-01-28 at 21:59 +0100, Christina Roßmanith wrote:
 I'm still translating comments and came across a constant named
 SCID_NEWDOCUMENT. When I asked opengrok the only place where this
 constant was found was the file rechead.hxx itself. Does that mean
 that the constant can be removed (and probably a lot of similar
 constants too)?

As I discovered earlier today, opengrok doesn't index binfilter. So it
might get used in there (though if it does, it may well duplicate the
definition there). Kohei suggested using git grep (or g grep) to look
for it instead.

I don't know if any other modules are skipped by opengrok.

Nigel

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


Re: [Libreoffice] LO status bar annoyances

2010-11-30 Thread Nigel Hawkins
On Tue, 2010-11-30 at 12:12 +0100, Sebastian Spaeth wrote:
 2) Remove the Selection mode thing. Unless people are really using
 that.

I use it. Probably not often enough to warrant it being on the status
bar permanently, but it does get used.

Nigel

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


Re: [Libreoffice] [Patch][EasyHacks] Replace ScfRef with boost::shared_ptr in calc filter code

2010-11-20 Thread Nigel Hawkins
On Fri, 2010-11-19 at 20:31 -0500, Kohei Yoshida wrote:
 Great work!  I've applied all your patches and committed as a single
 commit.  I hope that's okay.  

Not a problem. I generally commit locally in very small chunks and then
format-patch generates one patch per commit. I can squash them together
in future if that is the preferred style.
 
 Here, you replaced all instances of xFoo.is() with xFoo.get(), which is
 itself not incorrect.  But boost::shared_ptr overloads the operator
 bool() which returns the wrapped pointer value when a boolean value is
 expected, so in this example simply replacing xFoo.is() with xFoo is
 sufficient (and cleaner).  I've made this change while applying your
 last patch.

I have learnt something new today, so this is good. Having said that,
even after reading about the safe bool idiom, operator
unspecified_bool_type still seems a bit obscure.

Nigel

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


[Libreoffice] Error Building

2010-11-16 Thread Nigel Hawkins
Just done a pull and am now getting a build error:

Entering .../build/rawbuild/svtools/util

Making:svten-US.res
Compiling: rsc_svt
f268: Error: The image(s) lxh03124 lxh03125 lxh03131 lxh03132 lxh03134
lxh03135 lxh03136 lxh03137 lxh03138 lxh03139 lxh03140 lxh03141 lxh03142
lxh03145 lxh03150 lxh03151 lxh03152 lxh03153 lxh03154 lxh03155 lxh03156
lxh03157 lxh03158 lxh03159 lxh03160 lxh03161 lxh03164 lxh03165 lxh03166
lxh03167 lxh03168 lxh03187 lxh03188 lxh03189 lxh03190 lxh03193 lxh03198
lxh03201 lxh03202 lxh03203 lxh03204 lxh03205 lxh03206 lxh03214 lxh03217
lxh03218 lxh03219 lxh03220 lxh03221 lxh03222 lxh03236 lxh03237 lxh03239
lxh03241 lxh03243 lxh03244 lxh03245 lxh03246 lxh03247 lxh03248 lxh03249
lxh03250 lxh03251 lxh03252 lxh03253 lxh03254 lxh03255 lxh03256 sxh03124
sxh03125 sxh03131 sxh03132 sxh03134 sxh03135 sxh03136 sxh03137 sxh03138
sxh03139 sxh03140 sxh03141 sxh03142 sxh03145 sxh03150 sxh03151 sxh03152
sxh03153 sxh03154 sxh03155 sxh03156 sxh03157 sxh03158 sxh03159 sxh03160
sxh03161 sxh03164 sxh03165 sxh03166 sxh03167 sxh03168 sxh03187 sxh03188
sxh03189 sxh03190 sxh03193 sxh03198 sxh03201 sxh03202 sxh03203 sxh03204
sxh03205 sxh03206 sxh03214 sxh03217 sxh03218 sxh03219 sxh03220 sxh03221
sxh03222 sxh03236 sxh03237 sxh03239 sxh03241 sxh03243 sxh03244 sxh03245
sxh03246 sxh03247 sxh03248 sxh03249 sxh03250 sxh03251 sxh03252 sxh03253
sxh03254 sxh03255 sxh03256 could not be found.
Terminating compiler
dmake:  Error code 1, while making '../unxlngx6.pro/misc/rsc_svt'

Nigel

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


[Libreoffice] [Patch][EasyHacks] Replace ScfNoCopy in calc with boost::noncopyable

2010-11-10 Thread Nigel Hawkins
Hi,

This should address the first item in the removal of duplicate template
classes in calc filter code section from the easy hacks page.

Not quite a simple search-and-replace but pretty close.

The second item (ScfNoInstance) is slightly more involved. All of the
classes derived from ScfNoInstance are just collections of static
methods and none of them are derived from. Since C++ doesn't support
declaring classes as static, I'm thinking that converting those classes
to namespaces is the correct route? (My C++ skills are a bit rusty).

Nigel
From d881db70d4b0577cf0286a73efea702a57ada612 Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Wed, 10 Nov 2010 13:27:57 +
Subject: [PATCH] Replace ScfNoCopy with boost::noncopyable

Make boost::noncopyable references private
---
 sc/source/filter/inc/fprogressbar.hxx |3 ++-
 sc/source/filter/inc/ftools.hxx   |   15 ++-
 sc/source/filter/inc/xehelper.hxx |3 ++-
 sc/source/filter/inc/xicontent.hxx|4 +++-
 sc/source/filter/inc/xihelper.hxx |5 +++--
 sc/source/filter/inc/xistyle.hxx  |   11 ++-
 sc/source/filter/inc/xlpage.hxx   |3 ++-
 7 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/sc/source/filter/inc/fprogressbar.hxx b/sc/source/filter/inc/fprogressbar.hxx
index 751c9c6..11e0657 100644
--- a/sc/source/filter/inc/fprogressbar.hxx
+++ b/sc/source/filter/inc/fprogressbar.hxx
@@ -29,6 +29,7 @@
 #ifndef SC_FPROGRESSBAR_HXX
 #define SC_FPROGRESSBAR_HXX
 
+#include boost/noncopyable.hpp
 #include globstr.hrc
 #include ftools.hxx
 #include scdllapi.h
@@ -111,7 +112,7 @@ const sal_Int32 SCF_INV_SEGMENT = -1;
 // not allowed (second segment active):   aProgress.Progress();
 // not allowed (first segment not empty): aProgress.GetSegmentProgressBar( nSeg1 );
  */
-class ScfProgressBar : ScfNoCopy
+class ScfProgressBar : private boost::noncopyable
 {
 public:
 explicitScfProgressBar( SfxObjectShell* pDocShell, const String rText );
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 394c213..ab11beb 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -37,6 +37,7 @@
 #include tools/list.hxx
 #include tools/debug.hxx
 #include oox/helper/helper.hxx
+#include boost/noncopyable.hpp
 #include filter.hxx
 #include scdllapi.h
 
@@ -138,20 +139,8 @@ void insert_value( Type rnBitField, InsertType nValue, sal_uInt8 nStartBit, sal
 
 // 
 
-/** Deriving from this class prevents copy construction. */
-class ScfNoCopy
-{
-private:
-ScfNoCopy( const ScfNoCopy );
-ScfNoCopy  operator=( const ScfNoCopy );
-protected:
-inline  ScfNoCopy() {}
-};
-
-// 
-
 /** Deriving from this class prevents construction in general. */
-class ScfNoInstance : private ScfNoCopy {};
+class ScfNoInstance : private boost::noncopyable {};
 
 // 
 
diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx
index e82eaca..fe27f6e 100644
--- a/sc/source/filter/inc/xehelper.hxx
+++ b/sc/source/filter/inc/xehelper.hxx
@@ -29,6 +29,7 @@
 #ifndef SC_XEHELPER_HXX
 #define SC_XEHELPER_HXX
 
+#include boost/noncopyable.hpp
 #include xladdress.hxx
 #include xeroot.hxx
 #include xestring.hxx
@@ -364,7 +365,7 @@ class EditEngine;
 Known but unsupported control sequences:
 G  picture
  */
-class XclExpHFConverter : protected XclExpRoot, ScfNoCopy
+class XclExpHFConverter : protected XclExpRoot, private boost::noncopyable
 {
 public:
 explicitXclExpHFConverter( const XclExpRoot rRoot );
diff --git a/sc/source/filter/inc/xicontent.hxx b/sc/source/filter/inc/xicontent.hxx
index 982cfae..904ea2e 100644
--- a/sc/source/filter/inc/xicontent.hxx
+++ b/sc/source/filter/inc/xicontent.hxx
@@ -38,6 +38,8 @@
 
 #include map
 #include boost/ptr_container/ptr_vector.hpp
+#include boost/noncopyable.hpp
+
 
 /* 
 Classes to import the big Excel document contents (related to several cells or
@@ -193,7 +195,7 @@ private:
 // Web queries 
 
 /** Stores the data of one web query. */
-class XclImpWebQuery : ScfNoCopy
+class XclImpWebQuery : private boost::noncopyable
 {
 public:
 explicitXclImpWebQuery( const ScRange rDestRange );
diff --git a/sc/source/filter/inc/xihelper.hxx b/sc/source/filter/inc/xihelper.hxx
index 6ee969c..eeb12e8 100644
--- a/sc/source/filter/inc/xihelper.hxx
+++ b/sc/source/filter/inc/xihelper.hxx
@@ -30,6 +30,7 @@
 #define SC_XIHELPER_HXX
 
 #include editeng/editdata.hxx
+#include boost/noncopyable.hpp
 #include scmatrix.hxx

[Libreoffice] [PATCH] Fix a couple of simple compiler warnings

2010-11-03 Thread Nigel Hawkins
Hi,

A couple of simple one-line patches to remove a couple of compiler
warnings (format not a string literal and no format arguments).

Nigel.
From 3aada43619b93fcd7897fcdec80bb6c35dde7cef Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Wed, 3 Nov 2010 15:41:00 +
Subject: [PATCH] ure: fix fprintf compile warnings in unoexe.cxx

---
 cpputools/source/unoexe/unoexe.cxx |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx
index bac822b..83afad1 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -132,7 +132,7 @@ static sal_Bool s_quiet = false;
 static inline void out( const sal_Char * pText )
 {
 if (! s_quiet)
-fprintf( stderr, pText );
+fprintf( stderr, %s, pText );
 }
 //--
 static inline void out( const OUString  rText )
@@ -140,7 +140,7 @@ static inline void out( const OUString  rText )
 if (! s_quiet)
 {
 OString aText( OUStringToOString( rText, RTL_TEXTENCODING_ASCII_US ) );
-fprintf( stderr, aText.getStr() );
+fprintf( stderr, %s, aText.getStr() );
 }
 }
 
-- 
1.7.0.4

From 63dad46d5567755a320a577c7cef11100ee81626 Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Wed, 3 Nov 2010 16:02:56 +
Subject: [PATCH 1/2] vcl: fix fprintf compile warnings in sft.cxx

---
 vcl/source/fontsubset/sft.cxx |   16 
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index aa6fd99..5a54ef2 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -2058,7 +2058,7 @@ int  CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname, /*FO
 fprintf(outf, h02, modname, modver, modextra);
 fprintf(outf, h09, ttf-psname);
 
-fprintf(outf, h10);
+fprintf(outf, %s, h10);
 fprintf(outf, h11, fname);
 /*fprintf(outf, h12, 400); */
 
@@ -2073,17 +2073,17 @@ int  CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname, /*FO
  */
 
 fprintf(outf, h17, rtl_crc32(0, ttf-ptr, ttf-fsize), nGlyphs, rtl_crc32(0, glyphArray, nGlyphs * 2), rtl_crc32(0, encoding, nGlyphs));
-fprintf(outf, h13);
+fprintf(outf, %s, h13);
 fprintf(outf, h14, XUnits(UPEm, GetInt16(table, 36, 1)), XUnits(UPEm, GetInt16(table, 38, 1)), XUnits(UPEm, GetInt16(table, 40, 1)), XUnits(UPEm, GetInt16(table, 42, 1)));
-fprintf(outf, h15);
+fprintf(outf, %s, h15);
 
 for (i = 0; i  nGlyphs; i++) {
 fprintf(outf, h16, encoding[i], i);
 }
 
 fprintf(outf, h30, nGlyphs+1);
-fprintf(outf, h31);
-fprintf(outf, h32);
+fprintf(outf, %s, h31);
+fprintf(outf, %s, h32);
 
 for (i = 0; i  nGlyphs; i++) {
 fprintf(outf, h33, i);
@@ -2131,14 +2131,14 @@ int  CreateT3FromTTGlyphs(TrueTypeFont *ttf, FILE *outf, const char *fname, /*FO
 }
 if (n  0) fprintf(outf, \tfill\n); /* if glyph is not a whitespace character */
 
-fprintf(outf, h34);
+fprintf(outf, %s, h34);
 
 free(pa);
 free(path);
 }
-fprintf(outf, h35);
+fprintf(outf, %s, h35);
 
-fprintf(outf, h40);
+fprintf(outf, %s, h40);
 fprintf(outf, h41, fname);
 
 return SF_OK;
-- 
1.7.0.4

From 85ccb726a7cc6dbe7809ba4b7ac2e58ff88c5e1c Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Wed, 3 Nov 2010 16:05:28 +
Subject: [PATCH 2/2] vcl: fix fprintf compile warnings in cff.cxx

---
 vcl/source/fontsubset/cff.cxx |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 854c03a..8536961 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -2048,7 +2048,7 @@ void Type1Emitter::emitValVector( const char* pLineHead, const char* pLineTail,
 return;
 
 // emit the line head
-mpPtr += sprintf( mpPtr, pLineHead);
+mpPtr += sprintf( mpPtr, %s, pLineHead);
 // emit the vector values
 ValVector::value_type aVal = 0;
 for( ValVector::const_iterator it = rVector.begin();;) {
@@ -2061,7 +2061,7 @@ void Type1Emitter::emitValVector( const char* pLineHead, const char* pLineTail,
 // emit the last value
 mpPtr += dbl2str( mpPtr, aVal);
 // emit the line tail
-mpPtr += sprintf( mpPtr, pLineTail);
+mpPtr += sprintf( mpPtr, %s, pLineTail);
 }
 
 // 
-- 
1.7.0.4

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


Re: [Libreoffice] [PATCH] Fix comments in filters/xmerge

2010-11-01 Thread Nigel Hawkins
Well, since the first lot worked, a few more patches on the same lines.

Nigel
From a4d81a4e0da75696c8210cecb57a3e4c7bcc0e93 Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Thu, 28 Oct 2010 13:41:37 +0100
Subject: [PATCH 10/17] Fix javadoc comments in EmbeddedXMLObject.java

---
 .../xmerge/converter/xml/EmbeddedXMLObject.java|2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedXMLObject.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedXMLObject.java
index 623e61d..c5d31df 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedXMLObject.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/EmbeddedXMLObject.java
@@ -138,7 +138,7 @@ public class EmbeddedXMLObject extends EmbeddedObject {
 /**
  * Sets the settings data for the embedded object.
  *
- * @param   styles DOM representation of the object's styles.
+ * @param   settings DOM representation of the object's styles.
  */
 public void setSettingsDOM(Document settings) {
 settingsDOM = settings;
-- 
1.7.0.4

From 736b92fb94f970d1caf6fc15c233bd9e19483068 Mon Sep 17 00:00:00 2001
From: Nigel Hawkins n.hawk...@gmx.com
Date: Thu, 28 Oct 2010 13:45:44 +0100
Subject: [PATCH 11/17] Fix javadoc comments in ParaStyle.java

---
 .../openoffice/xmerge/converter/xml/ParaStyle.java |   44 ++--
 1 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java
index 3955222..2006d75 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java
@@ -269,15 +269,15 @@ public class ParaStyle extends Style implements Cloneable {
 /**
  *  Constructor for use when going from client device format to DOM.
  *
- *  @param  name Name of the codeStyle/code.  Can be null.
- *  @param  family   Family of the codeStyle/code - usually
- *   iparagraph/i, itext/i, etc.  Can be null.
- *  @param  parent   Name of the parent codeStyle/code, or null
- *   if none.
- *  @param  attribs  Array of attributes to set.
- *  @param  values   Array of values to set.
- *  @param  sc   The codeStyleCatalog/code, which is used for
- *   looking up ancestor codeStyle/code objects.
+ *  @param  name   Name of the codeStyle/code.  Can be null.
+ *  @param  familyName Family of the codeStyle/code - usually
+ * iparagraph/i, itext/i, etc.  Can be null.
+ *  @param  parentName Name of the parent codeStyle/code, or null
+ * if none.
+ *  @param  attribsArray of attributes to set.
+ *  @param  values Array of values to set.
+ *  @param  sc The codeStyleCatalog/code, which is used for
+ * looking up ancestor codeStyle/code objects.
  */
 public ParaStyle(String name, String familyName, String parentName,
 String attribs[], String values[], StyleCatalog sc) {
@@ -292,15 +292,15 @@ public class ParaStyle extends Style implements Cloneable {
  *  Alternate constructor for use when going from client device 
  *  format to DOM.
  *
- *  @param  name Name of the codeStyle/code.  Can be null.
- *  @param  family   Family of the codeStyle/code - usually
- *   iparagraph/i, itext/i, etc.  Can be null.
- *  @param  parent   Name of the parent codeStyle/code, or
- *   null if none.
- *  @param  attribs  Array of attributes indices to set.
- *  @param  values   Array of values to set.
- *  @param  sc   The codeStyleCatalog/code, which is used for
- *   looking up ancestor codeStyle/code objects.
+ *  @param  name   Name of the codeStyle/code.  Can be null.
+ *  @param  familyName Family of the codeStyle/code - usually
+ * iparagraph/i, itext/i, etc.  Can be null.
+ *  @param  parentName Name of the parent codeStyle/code, or
+ * null if none.
+ *  @param  attribsArray of attributes indices to set.
+ *  @param  values Array of values to set.
+ *  @param  lookup The codeStyleCatalog/code, which is used for
+ * looking up ancestor codeStyle/code objects.
  */
 public ParaStyle(String name, String familyName, String parentName,
 int attribs[], String values[], StyleCatalog lookup) {
@@ -377,7 +377,7 @@ public class ParaStyle extends Style implements Cloneable {
  *  Set an attribute for this paragraph codeStyle/code.
  *
  *  @param  attr