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.hawkins@gmx.com>
Date: Wed, 9 Feb 2011 14:32:28 +0000
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; i<m_arrInvalidSlots.Count(); ++i)
+ for (std::vector<InvalidSlotInfo>::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::vector<InvalidSlotInfo> 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.hawkins@gmx.com>
Date: Wed, 9 Feb 2011 14:48:21 +0000
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
Context
- [Libreoffice] [PATCH][EasyHacks] Removal of SvBytes · Nigel Hawkins
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.