Some packaging changes: * java filters are gone * agenda.jar has been converted to python * reportbuilder is not an extension anymore: merged into -basef41
parent
d67e552164
commit
6222204cf7
@ -1,104 +0,0 @@
|
||||
From 3d6424a752902bba513102834966868f609d91e6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Thu, 18 Apr 2013 13:13:43 +0100
|
||||
Subject: [PATCH] Related: rhbz#761009 lp#766153 lp#892904 HandleFontOptions
|
||||
crash
|
||||
|
||||
The mpServerFont member of a ImplServerFontEntry must not be deleted while the
|
||||
ImplServerFontEntry still exists
|
||||
|
||||
see also 39cbce553da1834f78b77f48b2f1be9578d6cc05 for another reason a crash in
|
||||
the same place can happen. Its impossible from traces in crashes before
|
||||
39cbce553da1834f78b77f48b2f1be9578d6cc05 was fixed to distinguish those crashes
|
||||
from this crash.
|
||||
|
||||
This crash is a regression due to 7a416820ab5e03f8b988656e0f6a592cb1e81d07
|
||||
where we went from modifying pServerFont in X11SalGraphics::setFont directly to
|
||||
modifying it/a-different-one indirectly via ImplServerFontEntry
|
||||
|
||||
The various font caches and font thing lifecycles of LibreOffice are somewhat
|
||||
confusing.
|
||||
|
||||
This crash had eluded me for years, to reproduce:
|
||||
insert->special chars->select a font with loads of glyphs, i.e. "AR PL UKai CN"
|
||||
click on the first row of glyphs and hold down page-down until you hit the
|
||||
bottom, then page-up until you hit the top. Pre patch it won't survive the
|
||||
whole down+up (and valgrind will moan quite a bit)
|
||||
|
||||
Change-Id: Ifde0cb375f487c556b04a640d77765a7dc2f0913
|
||||
---
|
||||
vcl/generic/glyphs/glyphcache.cxx | 13 +++++++++++++
|
||||
vcl/inc/generic/glyphcache.hxx | 3 ++-
|
||||
vcl/unx/generic/gdi/salgdi3.cxx | 8 ++++----
|
||||
3 files changed, 19 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
|
||||
index fa3659a..a6849ec 100644
|
||||
--- a/vcl/generic/glyphs/glyphcache.cxx
|
||||
+++ b/vcl/generic/glyphs/glyphcache.cxx
|
||||
@@ -411,9 +411,22 @@ ImplServerFontEntry::ImplServerFontEntry( FontSelectPattern& rFSD )
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
+void ImplServerFontEntry::SetServerFont(ServerFont* p)
|
||||
+{
|
||||
+ if (p == mpServerFont)
|
||||
+ return;
|
||||
+ if (mpServerFont)
|
||||
+ mpServerFont->Release();
|
||||
+ mpServerFont = p;
|
||||
+ if (mpServerFont)
|
||||
+ mpServerFont->AddRef();
|
||||
+}
|
||||
+
|
||||
ImplServerFontEntry::~ImplServerFontEntry()
|
||||
{
|
||||
// TODO: remove the ServerFont here instead of in the GlyphCache
|
||||
+ if (mpServerFont)
|
||||
+ mpServerFont->Release();
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx
|
||||
index 24cda3c..d9f8378 100644
|
||||
--- a/vcl/inc/generic/glyphcache.hxx
|
||||
+++ b/vcl/inc/generic/glyphcache.hxx
|
||||
@@ -225,6 +225,7 @@ public:
|
||||
private:
|
||||
friend class GlyphCache;
|
||||
friend class ServerFontLayout;
|
||||
+ friend class ImplServerFontEntry;
|
||||
friend class X11SalGraphics;
|
||||
|
||||
void AddRef() const { ++mnRefCount; }
|
||||
@@ -302,7 +303,7 @@ private:
|
||||
public:
|
||||
ImplServerFontEntry( FontSelectPattern& );
|
||||
virtual ~ImplServerFontEntry();
|
||||
- void SetServerFont( ServerFont* p) { mpServerFont = p; }
|
||||
+ void SetServerFont(ServerFont* p);
|
||||
void HandleFontOptions();
|
||||
};
|
||||
|
||||
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
|
||||
index 30a1e3b..ba6628a 100644
|
||||
--- a/vcl/unx/generic/gdi/salgdi3.cxx
|
||||
+++ b/vcl/unx/generic/gdi/salgdi3.cxx
|
||||
@@ -194,10 +194,10 @@ bool X11SalGraphics::setFont( const FontSelectPattern *pEntry, int nFallbackLeve
|
||||
|
||||
// apply font specific-hint settings if needed
|
||||
// TODO: also disable it for reference devices
|
||||
- if( !bPrinter_ )
|
||||
- {
|
||||
- ImplServerFontEntry* pSFE = static_cast<ImplServerFontEntry*>( pEntry->mpFontEntry );
|
||||
- pSFE->HandleFontOptions();
|
||||
+ if( !bPrinter_ )
|
||||
+ {
|
||||
+ ImplServerFontEntry* pSFE = static_cast<ImplServerFontEntry*>( pEntry->mpFontEntry );
|
||||
+ pSFE->HandleFontOptions();
|
||||
}
|
||||
|
||||
return true;
|
||||
--
|
||||
1.8.1.2
|
||||
|
@ -1,35 +0,0 @@
|
||||
From 8159a10df959638004bae19cd108f855180d00f2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Thu, 7 Mar 2013 14:30:54 +0000
|
||||
Subject: [PATCH] Related: rhbz#902884 check for GetSelectedMasterPage failure
|
||||
anyway
|
||||
|
||||
backtrace doesn't indicate that its NULL however, but the rest of
|
||||
our GetSelectedMasterPage check for NULL so fix that anyway
|
||||
|
||||
Change-Id: I9e0b15f4a18523ff1e787ef230de1ca227aa2980
|
||||
---
|
||||
sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
|
||||
index 512fd1d..58fa05f 100644
|
||||
--- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
|
||||
+++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
|
||||
@@ -553,8 +553,11 @@ void MasterPagesSelector::Execute (SfxRequest& rRequest)
|
||||
case SID_TP_EDIT_MASTER:
|
||||
{
|
||||
using namespace ::com::sun::star;
|
||||
- uno::Reference<drawing::XDrawPage> xSelectedMaster (
|
||||
- GetSelectedMasterPage()->getUnoPage(), uno::UNO_QUERY);
|
||||
+ uno::Reference<drawing::XDrawPage> xSelectedMaster;
|
||||
+ SdPage* pMasterPage = GetSelectedMasterPage();
|
||||
+ assert(pMasterPage); //rhbz#902884
|
||||
+ if (pMasterPage)
|
||||
+ xSelectedMaster = uno::Reference<drawing::XDrawPage>(pMasterPage->getUnoPage(), uno::UNO_QUERY);
|
||||
SfxViewFrame* pViewFrame = mrBase.GetViewFrame();
|
||||
if (pViewFrame != NULL && xSelectedMaster.is())
|
||||
{
|
||||
--
|
||||
1.8.1.2
|
||||
|
@ -1,31 +0,0 @@
|
||||
From 02917cb57e2c2e9fcab2db8f72960023f3e4edaf Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Tue, 16 Apr 2013 13:40:04 +0100
|
||||
Subject: [PATCH] Resolves: fdo#47209 and rhbz#927223 syntax highlighter crash
|
||||
|
||||
when trying to parse empty lines looking for the matching
|
||||
bracket
|
||||
|
||||
Change-Id: I3961a3d0e804d136de286e21934c6ba5ab0496cf
|
||||
---
|
||||
svtools/source/edit/editsyntaxhighlighter.cxx | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx
|
||||
index 62a7a25..3f1cd8d 100644
|
||||
--- a/svtools/source/edit/editsyntaxhighlighter.cxx
|
||||
+++ b/svtools/source/edit/editsyntaxhighlighter.cxx
|
||||
@@ -89,6 +89,10 @@ void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 aKey)
|
||||
continue;
|
||||
|
||||
String aLine( GetTextEngine()->GetText( aPara ) );
|
||||
+
|
||||
+ if (aLine.Len() == 0)
|
||||
+ continue;
|
||||
+
|
||||
for (sal_uInt16 i = ((unsigned long)aPara==nStartPara) ? aStartPos-1 : (sal_uInt16)(aLine.Len()-1); i>0; --i)
|
||||
{
|
||||
if (aLine.GetChar(i)==aChar)
|
||||
--
|
||||
1.8.1.2
|
||||
|
@ -1,88 +0,0 @@
|
||||
From b1beaf3f7a7d332890ea3877b657cd014562cf33 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Tue, 12 Mar 2013 16:33:01 +0000
|
||||
Subject: [PATCH] Resolves: rhbz#920697, #i110881#, rhbz#623191 presentation
|
||||
not fullscreen
|
||||
|
||||
Undecorated windows don't go full-screen correctly. Lets try and avoid using
|
||||
gtk_window_set_decorated and rely on gtk_window_set_role to get the WM to do
|
||||
the right thing.
|
||||
|
||||
Change-Id: I0f9e9c26372ac50398fa69c404013e3035ed637b
|
||||
---
|
||||
vcl/unx/gtk/window/gtkframe.cxx | 32 --------------------------------
|
||||
1 file changed, 32 deletions(-)
|
||||
|
||||
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
|
||||
index 07f6fb3..9433ae5 100644
|
||||
--- a/vcl/unx/gtk/window/gtkframe.cxx
|
||||
+++ b/vcl/unx/gtk/window/gtkframe.cxx
|
||||
@@ -1091,7 +1091,6 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
|
||||
|
||||
if( bDecoHandling )
|
||||
{
|
||||
- bool bNoDecor = ! (nStyle & (SAL_FRAME_STYLE_MOVEABLE | SAL_FRAME_STYLE_SIZEABLE | SAL_FRAME_STYLE_CLOSEABLE ) );
|
||||
GdkWindowTypeHint eType = GDK_WINDOW_TYPE_HINT_NORMAL;
|
||||
if( (nStyle & SAL_FRAME_STYLE_DIALOG) && m_pParent != 0 )
|
||||
eType = GDK_WINDOW_TYPE_HINT_DIALOG;
|
||||
@@ -1109,7 +1108,6 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
|
||||
{
|
||||
eType = GDK_WINDOW_TYPE_HINT_TOOLBAR;
|
||||
lcl_set_accept_focus( GTK_WINDOW(m_pWindow), sal_False, true );
|
||||
- bNoDecor = true;
|
||||
}
|
||||
else if( (nStyle & SAL_FRAME_STYLE_FLOAT_FOCUSABLE) )
|
||||
{
|
||||
@@ -1124,8 +1122,6 @@ void GtkSalFrame::Init( SalFrame* pParent, sal_uLong nStyle )
|
||||
}
|
||||
#endif
|
||||
gtk_window_set_type_hint( GTK_WINDOW(m_pWindow), eType );
|
||||
- if( bNoDecor )
|
||||
- gtk_window_set_decorated( GTK_WINDOW(m_pWindow), FALSE );
|
||||
gtk_window_set_gravity( GTK_WINDOW(m_pWindow), GDK_GRAVITY_STATIC );
|
||||
if( m_pParent && ! (m_pParent->m_nStyle & SAL_FRAME_STYLE_PLUG) )
|
||||
gtk_window_set_transient_for( GTK_WINDOW(m_pWindow), GTK_WINDOW(m_pParent->m_pWindow) );
|
||||
@@ -3331,40 +3327,12 @@ gboolean GtkSalFrame::signalFocus( GtkWidget*, GdkEventFocus* pEvent, gpointer f
|
||||
return sal_False;
|
||||
}
|
||||
|
||||
-extern "C" {
|
||||
-gboolean implDelayedFullScreenHdl (void *pWindow)
|
||||
-{
|
||||
- SolarMutexGuard aGuard;
|
||||
-
|
||||
- /* #i110881# workaround a gtk issue (see
|
||||
- https://bugzilla.redhat.com/show_bug.cgi?id=623191#c8)
|
||||
- gtk_window_fullscreen can fail due to a race condition,
|
||||
- request an additional status change to fullscreen to be
|
||||
- safe: if the window is now mapped ... and wasn't
|
||||
- previously, ie. the race; we'll end up doing a nice
|
||||
- gdk_wmspec_change_state here anyway.
|
||||
- */
|
||||
- if( pWindow )
|
||||
- {
|
||||
- gdk_window_fullscreen( GDK_WINDOW( pWindow ) );
|
||||
- g_object_unref( pWindow );
|
||||
- }
|
||||
-
|
||||
- return FALSE;
|
||||
-}
|
||||
-}
|
||||
-
|
||||
gboolean GtkSalFrame::signalMap( GtkWidget *pWidget, GdkEvent*, gpointer frame )
|
||||
{
|
||||
GtkSalFrame* pThis = (GtkSalFrame*)frame;
|
||||
|
||||
GTK_YIELD_GRAB();
|
||||
|
||||
- if( pThis->m_bFullscreen )
|
||||
- g_idle_add_full( G_PRIORITY_HIGH, implDelayedFullScreenHdl,
|
||||
- g_object_ref( widget_get_window( pThis->m_pWindow ) ),
|
||||
- NULL );
|
||||
-
|
||||
bool bSetFocus = pThis->m_bSetFocusOnMap;
|
||||
pThis->m_bSetFocusOnMap = false;
|
||||
|
||||
--
|
||||
1.8.1.2
|
||||
|
@ -1,33 +0,0 @@
|
||||
From b62048701cea5024383e19314592f2edcd9810fd Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Bergmann <sbergman@redhat.com>
|
||||
Date: Sat, 16 Feb 2013 22:39:13 +0100
|
||||
Subject: [PATCH] Work around problem with boost::shared_array(NULL) ctor and
|
||||
Boost 1.53.0
|
||||
|
||||
...claiming
|
||||
|
||||
template<class Y> boost::shared_array<T>::shared_array(Y*)
|
||||
|
||||
is not a viable option due to mismatched types 'Y*' and 'long int'
|
||||
|
||||
Change-Id: I8db321cd25cd73c84fa2a3124c9ec1018c131d5f
|
||||
---
|
||||
vcl/source/gdi/svgdata.cxx | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/vcl/source/gdi/svgdata.cxx b/vcl/source/gdi/svgdata.cxx
|
||||
index 01707e6..e64646f 100644
|
||||
--- a/vcl/source/gdi/svgdata.cxx
|
||||
+++ b/vcl/source/gdi/svgdata.cxx
|
||||
@@ -166,7 +166,7 @@ SvgData::SvgData(const SvgDataArray& rSvgDataArray, sal_uInt32 nSvgDataArrayLeng
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
SvgData::SvgData(const OUString& rPath):
|
||||
- maSvgDataArray(NULL),
|
||||
+ maSvgDataArray(),
|
||||
mnSvgDataArrayLength(0),
|
||||
maPath(rPath),
|
||||
maRange(),
|
||||
--
|
||||
1.8.1.2
|
||||
|
@ -0,0 +1,42 @@
|
||||
From 9f3a7f6e99a8df8b5680fd1ac3aaf11ef2cd8b7c Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Thu, 23 May 2013 15:50:48 +0200
|
||||
Subject: [PATCH] disable failing perf test
|
||||
|
||||
Change-Id: I8fabaa349be0c69ac2a1bc730bb1e134a9cde515
|
||||
---
|
||||
sc/qa/unit/ucalc.cxx | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
|
||||
index 36a59fa..7306bb8 100644
|
||||
--- a/sc/qa/unit/ucalc.cxx
|
||||
+++ b/sc/qa/unit/ucalc.cxx
|
||||
@@ -284,7 +284,7 @@ public:
|
||||
|
||||
CPPUNIT_TEST_SUITE(Test);
|
||||
#if !defined(DBG_UTIL) && !defined(_WIN32_WINNT)
|
||||
- CPPUNIT_TEST(testPerf);
|
||||
+ // CPPUNIT_TEST(testPerf);
|
||||
#endif
|
||||
CPPUNIT_TEST(testCollator);
|
||||
CPPUNIT_TEST(testRangeList);
|
||||
@@ -508,6 +508,7 @@ void Test::tearDown()
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
+#if 0
|
||||
void Test::testPerf()
|
||||
{
|
||||
CPPUNIT_ASSERT_MESSAGE ("failed to insert sheet", m_pDoc->InsertTab (0, "foo"));
|
||||
@@ -792,6 +793,7 @@ void Test::testPerf()
|
||||
|
||||
m_pDoc->DeleteTab(0);
|
||||
}
|
||||
+#endif
|
||||
|
||||
void Test::testCollator()
|
||||
{
|
||||
--
|
||||
1.8.1.4
|
||||
|
@ -0,0 +1,27 @@
|
||||
From ac58f62832260af9473eca69e764586258692bb6 Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Thu, 23 May 2013 14:21:31 +0200
|
||||
Subject: [PATCH] do not build LibreOffice_Test
|
||||
|
||||
Change-Id: I74d8d5192b007432a0943d10e82d0c5dad3a605c
|
||||
---
|
||||
instsetoo_native/CustomTarget_install.mk | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/instsetoo_native/CustomTarget_install.mk b/instsetoo_native/CustomTarget_install.mk
|
||||
index 0962ac8..d3d922285 100644
|
||||
--- a/instsetoo_native/CustomTarget_install.mk
|
||||
+++ b/instsetoo_native/CustomTarget_install.mk
|
||||
@@ -118,9 +118,6 @@ else # LIBO_DEV_INSTALL
|
||||
ifeq (ODK,$(filter ODK,$(BUILD_TYPE)))
|
||||
$(call instsetoo_native_install_command,sdkoo,en-US,_SDK,,$(PKGFORMAT))
|
||||
endif
|
||||
-ifeq (,$(filter WNT MACOSX,$(OS)))
|
||||
- $(call instsetoo_native_install_command,not-used,en-US,_Test,,$(PKGFORMAT))
|
||||
-endif
|
||||
ifeq (HELP,$(filter HELP,$(BUILD_TYPE))$(filter MACOSX,$(OS)))
|
||||
$(foreach lang,$(filter-out $(WITH_POOR_HELP_LOCALIZATIONS),$(instsetoo_native_WITH_LANG)), \
|
||||
$(call instsetoo_native_install_command,ooohelppack,$(lang),,-helppack,$(PKGFORMAT)))
|
||||
--
|
||||
1.8.1.4
|
||||
|
@ -1,187 +0,0 @@
|
||||
From d4bab97023e3569571a92551040574b20aceca7c Mon Sep 17 00:00:00 2001
|
||||
From: Mark Wright <markwright@internode.on.net>
|
||||
Date: Sun, 10 Feb 2013 02:04:02 +1100
|
||||
Subject: [PATCH] fix compile for change to boost 1.53.0 declaring smart
|
||||
pointer operator bool as explicity for C++11 compilers
|
||||
|
||||
Change-Id: If2c3ad68b2ffea645a9f2035cd802553edc0ee79
|
||||
Reviewed-on: https://gerrit.libreoffice.org/2064
|
||||
Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org>
|
||||
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
|
||||
---
|
||||
comphelper/inc/comphelper/scoped_disposing_ptr.hxx | 2 +-
|
||||
sc/source/filter/excel/xechart.cxx | 2 +-
|
||||
sc/source/filter/excel/xehelper.cxx | 2 +-
|
||||
sc/source/filter/excel/xichart.cxx | 2 +-
|
||||
sc/source/filter/inc/xichart.hxx | 4 ++--
|
||||
slideshow/source/engine/animatedsprite.cxx | 2 +-
|
||||
slideshow/source/engine/shapes/viewshape.cxx | 2 +-
|
||||
slideshow/source/engine/shapesubset.cxx | 2 +-
|
||||
slideshow/source/engine/slide/slideanimations.cxx | 2 +-
|
||||
slideshow/source/inc/shapeattributelayer.hxx | 2 +-
|
||||
slideshow/source/inc/shapeattributelayerholder.hxx | 2 +-
|
||||
sw/source/core/inc/bookmrk.hxx | 2 +-
|
||||
12 files changed, 13 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/comphelper/inc/comphelper/scoped_disposing_ptr.hxx b/comphelper/inc/comphelper/scoped_disposing_ptr.hxx
|
||||
index 9b4fe1b..6c34074 100644
|
||||
--- a/comphelper/inc/comphelper/scoped_disposing_ptr.hxx
|
||||
+++ b/comphelper/inc/comphelper/scoped_disposing_ptr.hxx
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
|
||||
operator bool () const
|
||||
{
|
||||
- return m_aItem;
|
||||
+ return static_cast< bool >(m_aItem);
|
||||
}
|
||||
|
||||
virtual ~scoped_disposing_ptr()
|
||||
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
|
||||
index fd99e8b..75a2eb2 100644
|
||||
--- a/sc/source/filter/excel/xechart.cxx
|
||||
+++ b/sc/source/filter/excel/xechart.cxx
|
||||
@@ -683,7 +683,7 @@ void XclExpChEscherFormat::Convert( const ScfPropertySet& rPropSet, XclChObjectT
|
||||
|
||||
bool XclExpChEscherFormat::IsValid() const
|
||||
{
|
||||
- return maData.mxEscherSet;
|
||||
+ return static_cast< bool >(maData.mxEscherSet);
|
||||
}
|
||||
|
||||
void XclExpChEscherFormat::Save( XclExpStream& rStrm )
|
||||
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
|
||||
index c493560..81e9ac2 100644
|
||||
--- a/sc/source/filter/excel/xehelper.cxx
|
||||
+++ b/sc/source/filter/excel/xehelper.cxx
|
||||
@@ -303,7 +303,7 @@ rtl::OUString XclExpHyperlinkHelper::ProcessUrlField( const SvxURLField& rUrlFie
|
||||
if( GetBiff() == EXC_BIFF8 ) // no HLINK records in BIFF2-BIFF7
|
||||
{
|
||||
// there was/is already a HLINK record
|
||||
- mbMultipleUrls = mxLinkRec;
|
||||
+ mbMultipleUrls = static_cast< bool >(mxLinkRec);
|
||||
|
||||
mxLinkRec.reset( new XclExpHyperlink( GetRoot(), rUrlField, maScPos ) );
|
||||
|
||||
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
|
||||
index 63c9c43..f2321bf 100644
|
||||
--- a/sc/source/filter/excel/xichart.cxx
|
||||
+++ b/sc/source/filter/excel/xichart.cxx
|
||||
@@ -2690,7 +2690,7 @@ void XclImpChTypeGroup::Finalize()
|
||||
maType.Finalize( bStockChart );
|
||||
|
||||
// extended type info
|
||||
- maTypeInfo.Set( maType.GetTypeInfo(), mxChart3d, false );
|
||||
+ maTypeInfo.Set( maType.GetTypeInfo(), static_cast< bool >(mxChart3d), false );
|
||||
|
||||
// reverse series order for some unstacked 2D chart types
|
||||
if( maTypeInfo.mbReverseSeries && !Is3dChart() && !maType.IsStacked() && !maType.IsPercent() )
|
||||
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
|
||||
index 57538f0..7c44412 100644
|
||||
--- a/sc/source/filter/inc/xichart.hxx
|
||||
+++ b/sc/source/filter/inc/xichart.hxx
|
||||
@@ -1230,9 +1230,9 @@ public:
|
||||
/** Returns true, if the axis contains caption labels. */
|
||||
inline bool HasLabels() const { return !mxTick || mxTick->HasLabels(); }
|
||||
/** Returns true, if the axis shows its major grid lines. */
|
||||
- inline bool HasMajorGrid() const { return mxMajorGrid; }
|
||||
+ inline bool HasMajorGrid() const { return static_cast< bool >(mxMajorGrid); }
|
||||
/** Returns true, if the axis shows its minor grid lines. */
|
||||
- inline bool HasMinorGrid() const { return mxMinorGrid; }
|
||||
+ inline bool HasMinorGrid() const { return static_cast< bool >(mxMinorGrid); }
|
||||
|
||||
/** Creates an API axis object. */
|
||||
XAxisRef CreateAxis( const XclImpChTypeGroup& rTypeGroup, const XclImpChAxis* pCrossingAxis ) const;
|
||||
diff --git a/slideshow/source/engine/animatedsprite.cxx b/slideshow/source/engine/animatedsprite.cxx
|
||||
index e63d600..5d421c2 100644
|
||||
--- a/slideshow/source/engine/animatedsprite.cxx
|
||||
+++ b/slideshow/source/engine/animatedsprite.cxx
|
||||
@@ -151,7 +151,7 @@ namespace slideshow
|
||||
}
|
||||
}
|
||||
|
||||
- return mpSprite;
|
||||
+ return static_cast< bool >(mpSprite);
|
||||
}
|
||||
|
||||
void AnimatedSprite::setPixelOffset( const ::basegfx::B2DSize& rPixelOffset )
|
||||
diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx
|
||||
index 20c73de..621535f 100644
|
||||
--- a/slideshow/source/engine/shapes/viewshape.cxx
|
||||
+++ b/slideshow/source/engine/shapes/viewshape.cxx
|
||||
@@ -178,7 +178,7 @@ namespace slideshow
|
||||
}
|
||||
}
|
||||
|
||||
- return io_rCacheEntry.mpRenderer;
|
||||
+ return static_cast< bool >(io_rCacheEntry.mpRenderer);
|
||||
}
|
||||
|
||||
bool ViewShape::draw( const ::cppcanvas::CanvasSharedPtr& rDestinationCanvas,
|
||||
diff --git a/slideshow/source/engine/shapesubset.cxx b/slideshow/source/engine/shapesubset.cxx
|
||||
index c5636cc..da28159 100644
|
||||
--- a/slideshow/source/engine/shapesubset.cxx
|
||||
+++ b/slideshow/source/engine/shapesubset.cxx
|
||||
@@ -104,7 +104,7 @@ namespace slideshow
|
||||
maTreeNode );
|
||||
}
|
||||
|
||||
- return mpSubsetShape;
|
||||
+ return static_cast< bool >(mpSubsetShape);
|
||||
}
|
||||
|
||||
void ShapeSubset::disableSubsetShape()
|
||||
diff --git a/slideshow/source/engine/slide/slideanimations.cxx b/slideshow/source/engine/slide/slideanimations.cxx
|
||||
index 5f5e9f5..7d4c788 100644
|
||||
--- a/slideshow/source/engine/slide/slideanimations.cxx
|
||||
+++ b/slideshow/source/engine/slide/slideanimations.cxx
|
||||
@@ -74,7 +74,7 @@ namespace slideshow
|
||||
|
||||
SHOW_NODE_TREE( mpRootNode );
|
||||
|
||||
- return mpRootNode;
|
||||
+ return static_cast< bool >(mpRootNode);
|
||||
}
|
||||
|
||||
bool SlideAnimations::isAnimated() const
|
||||
diff --git a/slideshow/source/inc/shapeattributelayer.hxx b/slideshow/source/inc/shapeattributelayer.hxx
|
||||
index 88405f8..d725255 100644
|
||||
--- a/slideshow/source/inc/shapeattributelayer.hxx
|
||||
+++ b/slideshow/source/inc/shapeattributelayer.hxx
|
||||
@@ -467,7 +467,7 @@ namespace slideshow
|
||||
// ShapeAttributeLayer(const ShapeAttributeLayer&);
|
||||
// ShapeAttributeLayer& operator=( const ShapeAttributeLayer& );
|
||||
|
||||
- bool haveChild() const { return mpChild; }
|
||||
+ bool haveChild() const { return static_cast< bool >(mpChild); }
|
||||
void updateStateIds();
|
||||
|
||||
template< typename T > T calcValue( const T& rCurrValue,
|
||||
diff --git a/slideshow/source/inc/shapeattributelayerholder.hxx b/slideshow/source/inc/shapeattributelayerholder.hxx
|
||||
index e53be46..22ce4f3 100644
|
||||
--- a/slideshow/source/inc/shapeattributelayerholder.hxx
|
||||
+++ b/slideshow/source/inc/shapeattributelayerholder.hxx
|
||||
@@ -83,7 +83,7 @@ namespace slideshow
|
||||
if( mpShape )
|
||||
mpAttributeLayer = mpShape->createAttributeLayer();
|
||||
|
||||
- return mpAttributeLayer;
|
||||
+ return static_cast< bool >(mpAttributeLayer);
|
||||
}
|
||||
|
||||
ShapeAttributeLayerSharedPtr get() const
|
||||
diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx
|
||||
index 6937a19..bab92bb 100644
|
||||
--- a/sw/source/core/inc/bookmrk.hxx
|
||||
+++ b/sw/source/core/inc/bookmrk.hxx
|
||||
@@ -75,7 +75,7 @@ namespace sw {
|
||||
|
||||
virtual bool IsCoveringPosition(const SwPosition& rPos) const;
|
||||
virtual bool IsExpanded() const
|
||||
- { return m_pPos2; }
|
||||
+ { return static_cast< bool >(m_pPos2); }
|
||||
|
||||
virtual void SetName(const ::rtl::OUString& rName)
|
||||
{ m_aName = rName; }
|
||||
--
|
||||
1.8.1.2
|
||||
|
@ -0,0 +1,46 @@
|
||||
From b646f2063ab74f6c5f6a7e08baad10e446a166fb Mon Sep 17 00:00:00 2001
|
||||
From: David Tardon <dtardon@redhat.com>
|
||||
Date: Fri, 24 May 2013 09:54:20 +0200
|
||||
Subject: [PATCH] fix syntax errors in python wizards
|
||||
|
||||
Change-Id: Ia237a0095c2cc783f52224bdde5d525baafacc52
|
||||
---
|
||||
wizards/com/sun/star/wizards/web/LogTaskListener.py | 2 +-
|
||||
wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.py | 6 +++---
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/wizards/com/sun/star/wizards/web/LogTaskListener.py b/wizards/com/sun/star/wizards/web/LogTaskListener.py
|
||||
index 13b7e59..a1fba5f 100644
|
||||
--- a/wizards/com/sun/star/wizards/web/LogTaskListener.py
|
||||
+++ b/wizards/com/sun/star/wizards/web/LogTaskListener.py
|
||||
@@ -35,7 +35,7 @@ class LogTaskListener(TaskListener, ErrorHandler):
|
||||
out.println("TASK " + te.getTask().getTaskName() + " FINISHED: " + te.getTask().getSuccessfull() + "/" + te.getTask().getMax() + "Succeeded.")
|
||||
|
||||
#@see com.sun.star.wizards.web.status.TaskListener#taskStatusChanged(com.sun.star.wizards.web.status.TaskEvent)
|
||||
- def taskStatusChanged(te)
|
||||
+ def taskStatusChanged(te):
|
||||
out.println("TASK " + te.getTask().getTaskName() + " status : " + te.getTask().getSuccessfull() + "(+" + te.getTask().getFailed() + ")/" + te.getTask().getMax())
|
||||
|
||||
#@see com.sun.star.wizards.web.status.TaskListener#subtaskNameChanged(com.sun.star.wizards.web.status.TaskEvent)
|
||||
diff --git a/wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.py b/wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.py
|
||||
index c60a6dd..0b620c1 100644
|
||||
--- a/wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.py
|
||||
+++ b/wizards/com/sun/star/wizards/web/export/ImpressHTMLExporter.py
|
||||
@@ -60,11 +60,11 @@ class ImpressHTMLExporter(ConfiguredExporter):
|
||||
size = session.cp_Design.cp_OptimizeDisplaySize
|
||||
if (size == 0):
|
||||
return self.SMALL_IMAGE
|
||||
- elif (size == 1)
|
||||
+ elif (size == 1):
|
||||
return self.MEDIUM_IMAGE
|
||||
- elif (size == 2)
|
||||
+ elif (size == 2):
|
||||
return self.LARGE_IMAGE
|
||||
return self.MEDIUM_IMAGE
|
||||
|
||||
- def getSession(doc)
|
||||
+ def getSession(doc):
|
||||
return doc.getSettings().cp_DefaultSession
|
||||
--
|
||||
1.8.1.4
|
||||
|
@ -1,975 +0,0 @@
|
||||
From e41d94885aeee12b9d00ad52611517901ff3d2c3 Mon Sep 17 00:00:00 2001
|
||||
From: Caolán McNamara <caolanm@redhat.com>
|
||||
Date: Thu, 7 Feb 2013 17:18:09 +0000
|
||||
Subject: [PATCH] make evolution-3.6 work with address book
|
||||
|
||||
Change-Id: I04d2a4d7d1520567dd0eb929ffb5d9fa53d35dd4
|
||||
---
|
||||
connectivity/source/drivers/evoab2/EApi.cxx | 109 ++---
|
||||
connectivity/source/drivers/evoab2/EApi.h | 25 ++
|
||||
.../source/drivers/evoab2/NDatabaseMetaData.cxx | 136 +++++--
|
||||
connectivity/source/drivers/evoab2/NResultSet.cxx | 441 ++++++++++++++-------
|
||||
connectivity/source/drivers/evoab2/NResultSet.hxx | 24 +-
|
||||
.../source/core/api/SingleSelectQueryComposer.cxx | 12 +
|
||||
6 files changed, 510 insertions(+), 237 deletions(-)
|
||||
|
||||
diff --git a/connectivity/source/drivers/evoab2/EApi.cxx b/connectivity/source/drivers/evoab2/EApi.cxx
|
||||
index 84701e1..608b1f9 100644
|
||||
--- a/connectivity/source/drivers/evoab2/EApi.cxx
|
||||
+++ b/connectivity/source/drivers/evoab2/EApi.cxx
|
||||
@@ -22,6 +22,7 @@
|
||||
#define DECLARE_FN_POINTERS 1
|
||||
#include "EApi.h"
|
||||
static const char *eBookLibNames[] = {
|
||||
+ "libebook-1.2.so.14", // bumped again (evolution-3.6)
|
||||
"libebook-1.2.so.13", // bumped again (evolution-3.4)
|
||||
"libebook-1.2.so.12", // bumped again
|
||||
"libebook-1.2.so.10", // bumped again
|
||||
@@ -34,25 +35,23 @@ static const char *eBookLibNames[] = {
|
||||
typedef void (*SymbolFunc) (void);
|
||||
|
||||
#define SYM_MAP(a) { #a, (SymbolFunc *)&a }
|
||||
- static struct {
|
||||
+struct ApiMap
|
||||
+{
|
||||
const char *sym_name;
|
||||
SymbolFunc *ref_value;
|
||||
- } aApiMap[] = {
|
||||
+};
|
||||
+
|
||||
+static ApiMap aCommonApiMap[] =
|
||||
+{
|
||||
+ SYM_MAP( eds_check_version ),
|
||||
SYM_MAP( e_contact_field_name ),
|
||||
SYM_MAP( e_contact_get ),
|
||||
SYM_MAP( e_contact_get_type ),
|
||||
SYM_MAP( e_contact_field_id ),
|
||||
- SYM_MAP( e_source_peek_name ),
|
||||
- SYM_MAP( e_source_get_property ),
|
||||
- SYM_MAP( e_source_list_peek_groups ),
|
||||
- SYM_MAP( e_source_group_peek_sources ),
|
||||
SYM_MAP( e_book_new ),
|
||||
SYM_MAP( e_book_open ),
|
||||
- SYM_MAP( e_book_get_uri ),
|
||||
SYM_MAP( e_book_get_source ),
|
||||
- SYM_MAP( e_book_get_addressbooks ),
|
||||
SYM_MAP( e_book_get_contacts ),
|
||||
- SYM_MAP( e_book_authenticate_user ),
|
||||
SYM_MAP( e_book_query_field_test ),
|
||||
SYM_MAP( e_book_query_and ),
|
||||
SYM_MAP( e_book_query_or ),
|
||||
@@ -61,26 +60,55 @@ typedef void (*SymbolFunc) (void);
|
||||
SYM_MAP( e_book_query_unref ),
|
||||
SYM_MAP( e_book_query_from_string ),
|
||||
SYM_MAP( e_book_query_to_string ),
|
||||
- SYM_MAP( e_book_query_field_exists ),
|
||||
- SYM_MAP( e_source_group_peek_base_uri)
|
||||
- };
|
||||
+ SYM_MAP( e_book_query_field_exists )
|
||||
+};
|
||||
+
|
||||
+//< 3-6 api
|
||||
+static ApiMap aOldApiMap[] =
|
||||
+{
|
||||
+ SYM_MAP( e_book_get_addressbooks ),
|
||||
+ SYM_MAP( e_book_get_uri ),
|
||||
+ SYM_MAP( e_book_authenticate_user ),
|
||||
+ SYM_MAP( e_source_group_peek_base_uri),
|
||||
+ SYM_MAP( e_source_peek_name ),
|
||||
+ SYM_MAP( e_source_get_property ),
|
||||
+ SYM_MAP( e_source_list_peek_groups ),
|
||||
+ SYM_MAP( e_source_group_peek_sources )
|
||||
+};
|
||||
+
|
||||
+//>= 3-6 api
|
||||
+static ApiMap aNewApiMap[] =
|
||||
+{
|
||||
+ SYM_MAP( e_source_registry_list_sources ),
|
||||
+ SYM_MAP( e_source_registry_new_sync ),
|
||||
+ SYM_MAP( e_source_has_extension ),
|
||||
+ SYM_MAP( e_source_get_extension ),
|
||||
+ SYM_MAP( e_source_backend_get_backend_name ),
|
||||
+ SYM_MAP( e_source_get_display_name ),
|
||||
+ SYM_MAP( e_source_get_uid ),
|
||||
+ SYM_MAP( e_source_registry_ref_source),
|
||||
+ SYM_MAP( e_book_client_new ),
|
||||
+ SYM_MAP( e_client_open_sync ),
|
||||
+ SYM_MAP( e_client_get_source ),
|
||||
+ SYM_MAP( e_book_client_get_contacts_sync ),
|
||||
+ SYM_MAP( e_client_util_free_object_slist )
|
||||
+};
|
||||
#undef SYM_MAP
|
||||
|
||||
static bool
|
||||
-tryLink( oslModule &aModule, const char *pName )
|
||||
+tryLink( oslModule &aModule, const char *pName, ApiMap *pMap, guint nEntries )
|
||||
{
|
||||
- for( guint i = 0; i < G_N_ELEMENTS( aApiMap ); i++ )
|
||||
+ for (guint i = 0; i < nEntries; ++i)
|
||||
{
|
||||
- SymbolFunc aMethod;
|
||||
- aMethod = (SymbolFunc) osl_getFunctionSymbol
|
||||
- ( aModule, rtl::OUString::createFromAscii ( aApiMap[ i ].sym_name ).pData );
|
||||
- if( !aMethod )
|
||||
- {
|
||||
- fprintf( stderr, "Warning: missing symbol '%s' in '%s'",
|
||||
- aApiMap[ i ].sym_name, pName );
|
||||
- return false;
|
||||
- }
|
||||
- * aApiMap[ i ].ref_value = aMethod;
|
||||
+ SymbolFunc aMethod = (SymbolFunc)osl_getFunctionSymbol
|
||||
+ (aModule, OUString::createFromAscii ( pMap[ i ].sym_name ).pData);
|
||||
+ if( !aMethod )
|
||||
+ {
|
||||
+ fprintf( stderr, "Warning: missing symbol '%s' in '%s'\n",
|
||||
+ pMap[ i ].sym_name, pName );
|
||||
+ return false;
|
||||
+ }
|
||||
+ *pMap[ i ].ref_value = aMethod;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -96,8 +124,18 @@ bool EApiInit()
|
||||
SAL_LOADMODULE_DEFAULT );
|
||||
if( aModule)
|
||||
{
|
||||
- if ( tryLink( aModule, eBookLibNames[ j ] ) )
|
||||
- return true;
|
||||
+ if (tryLink( aModule, eBookLibNames[ j ], aCommonApiMap, G_N_ELEMENTS(aCommonApiMap)))
|
||||
+ {
|
||||
+ if (eds_check_version(3, 6, 0) == NULL)
|
||||
+ {
|
||||
+ if (tryLink( aModule, eBookLibNames[ j ], aNewApiMap, G_N_ELEMENTS(aNewApiMap)))
|
||||
+ return true;
|
||||
+ }
|
||||
+ else if (tryLink( aModule, eBookLibNames[ j ], aOldApiMap, G_N_ELEMENTS(aOldApiMap)))
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
osl_unloadModule( aModule );
|
||||
}
|
||||
}
|
||||
@@ -105,23 +143,4 @@ bool EApiInit()
|
||||
return false;
|
||||
}
|
||||
|
||||
-#if 0
|
||||
-// hjs: SOLARDEF does no longer exist please lookup the required
|
||||
-// defines in a regular compile line
|
||||
-/*
|
||||
- * Test code - enable &
|
||||
- *
|
||||
- * Compile with ( after source LinuxIntelEnv.Set.sh )
|
||||
- gcc $SOLARDEF -I $SOLARVER/$UPD/$INPATH/inc \
|
||||
- -I. `pkg-config --cflags --libs gobject-2.0` \
|
||||
- -L $SOLARVER/$UPD/$INPATH/lib -luno_sal -lstdc++ EApi.cxx
|
||||
- */
|
||||
-
|
||||
-int main( int argc, char **argv)
|
||||
-{
|
||||
- return EApiInit();
|
||||
-}
|
||||
-
|
||||
-#endif
|
||||
-
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
diff --git a/connectivity/source/drivers/evoab2/EApi.h b/connectivity/source/drivers/evoab2/EApi.h
|
||||
index bf3a901..8d188a9 100644
|
||||
--- a/connectivity/source/drivers/evoab2/EApi.h
|
||||
+++ b/connectivity/source/drivers/evoab2/EApi.h
|
||||
@@ -130,6 +130,31 @@ typedef struct {
|
||||
char *code;
|
||||
char *country;
|
||||
} EContactAddress;
|
||||
+
|
||||
+#define E_SOURCE_EXTENSION_ADDRESS_BOOK "Address Book"
|
||||
+typedef void ESourceRegistry;
|
||||
+typedef void GCancellable;
|
||||
+typedef void ESourceBackend;
|
||||
+typedef void EClient;
|
||||
+typedef EClient EBookClient;
|
||||
+EAPI_EXTERN ESourceRegistry* (*e_source_registry_new_sync) (GCancellable *cancellable, GError **error);
|
||||
+EAPI_EXTERN GList* (*e_source_registry_list_sources) (ESourceRegistry *registry, const gchar *extension_name);
|
||||
+EAPI_EXTERN gboolean (*e_source_has_extension) (ESource *source, const gchar *extension_name);
|
||||
+EAPI_EXTERN gpointer (*e_source_get_extension) (ESource *source, const gchar *extension_name);
|
||||
+EAPI_EXTERN const gchar* (*e_source_backend_get_backend_name) (ESourceBackend *extension);
|
||||
+EAPI_EXTERN const gchar* (*e_source_get_display_name) (ESource *source);
|
||||
+EAPI_EXTERN const gchar* (*eds_check_version) (guint required_major, guint required_minor, guint required_micro);
|
||||
+EAPI_EXTERN const gchar* (*e_source_get_uid) (ESource *source);
|
||||
+EAPI_EXTERN ESource* (*e_source_registry_ref_source) (ESourceRegistry *registry, const gchar *uid);
|
||||
+EAPI_EXTERN EBookClient* (*e_book_client_new) (ESource *source, GError **error);
|
||||
+EAPI_EXTERN gboolean (*e_client_open_sync) (EClient *client, gboolean only_if_exists, GCancellable *cancellable, GError **error);
|
||||
+EAPI_EXTERN ESource* (*e_client_get_source) (EClient *client);
|
||||
+EAPI_EXTERN gboolean (*e_book_client_get_contacts_sync) (EBookClient *client, const gchar *sexp, GSList **contacts, GCancellable *cancellable, GError **error);
|
||||
+EAPI_EXTERN void (*e_client_util_free_object_slist) (GSList *objects);
|
||||
+
|
||||
+ESourceRegistry *get_e_source_registry();
|
||||
+bool isSourceBackend(ESource *pSource, const char *backendname);
|
||||
+
|
||||
G_END_DECLS
|
||||
#endif
|
||||
|
||||
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
|
||||
index d0198e5..a83de24 100644
|
||||
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
|
||||
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
|
||||
@@ -1074,7 +1074,25 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getColumns(
|
||||
pResultSet->setRows( getColumnRows( columnNamePattern ) );
|
||||
return xResultSet;
|
||||
}
|
||||
+
|
||||
+ESourceRegistry *get_e_source_registry()
|
||||
+{
|
||||
+ static ESourceRegistry *theInstance;
|
||||
+ if (!theInstance)
|
||||
+ theInstance = e_source_registry_new_sync(NULL, NULL);
|
||||
+ return theInstance;
|
||||
+}
|
||||
+
|
||||
// -------------------------------------------------------------------------
|
||||
+bool isSourceBackend(ESource *pSource, const char *backendname)
|
||||
+{
|
||||
+ if (!pSource || !e_source_has_extension (pSource, E_SOURCE_EXTENSION_ADDRESS_BOOK))
|
||||
+ return false;
|
||||
+
|
||||
+ gpointer extension = e_source_get_extension (pSource, E_SOURCE_EXTENSION_ADDRESS_BOOK);
|
||||
+ return extension && g_strcmp0 (e_source_backend_get_backend_name (extension), backendname) == 0;
|
||||
+}
|
||||
+
|
||||
Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
|
||||
const Any& /*catalog*/, const ::rtl::OUString& /*schemaPattern*/,
|
||||
const ::rtl::OUString& /*tableNamePattern*/, const Sequence< ::rtl::OUString >& types ) throw(SQLException, RuntimeException)
|
||||
@@ -1111,50 +1129,96 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
|
||||
|
||||
ODatabaseMetaDataResultSet::ORows aRows;
|
||||
|
||||
- ESourceList *pSourceList;
|
||||
- if( !e_book_get_addressbooks (&pSourceList, NULL) )
|
||||
- pSourceList = NULL;
|
||||
-
|
||||
- GSList *g;
|
||||
- for( g = e_source_list_peek_groups( pSourceList ); g; g = g->next)
|
||||
+ if (eds_check_version(3, 6, 0) == NULL)
|
||||
{
|
||||
- GSList *s;
|
||||
- const char *p = e_source_group_peek_base_uri(E_SOURCE_GROUP(g->data));
|
||||
-
|
||||
- switch (m_pConnection->getSDBCAddressType()) {
|
||||
- case SDBCAddress::EVO_GWISE:
|
||||
- if ( !strncmp( "groupwise://", p, 11 ))
|
||||
- break;
|
||||
- else
|
||||
- continue;
|
||||
- case SDBCAddress::EVO_LOCAL:
|
||||
- if ( !strncmp( "file://", p, 6 ) ||
|
||||
- !strncmp( "local://", p, 6 ) )
|
||||
- break;
|
||||
- else
|
||||
- continue;
|
||||
- case SDBCAddress::EVO_LDAP:
|
||||
- if ( !strncmp( "ldap://", p, 6 ))
|
||||
- break;
|
||||
- else
|
||||
- continue;
|
||||
- case SDBCAddress::Unknown:
|
||||
- break;
|
||||
- }
|
||||
- for (s = e_source_group_peek_sources (E_SOURCE_GROUP (g->data)); s; s = s->next)
|
||||
- {
|
||||
- ESource *pSource = E_SOURCE (s->data);
|
||||
+ GList *pSources = e_source_registry_list_sources(get_e_source_registry(), E_SOURCE_EXTENSION_ADDRESS_BOOK);
|
||||
|
||||
- rtl::OUString aName = rtl::OStringToOUString( e_source_peek_name( pSource ),
|
||||
- RTL_TEXTENCODING_UTF8 );
|
||||
+ for (GList* liter = pSources; liter; liter = liter->next)
|
||||
+ {
|
||||
+ ESource *pSource = E_SOURCE (liter->data);
|
||||
+ bool can = false;
|
||||
+ switch (m_pConnection->getSDBCAddressType())
|
||||
+ {
|
||||
+ case SDBCAddress::EVO_GWISE:
|
||||
+ can = isSourceBackend( pSource, "groupwise"); // not supported in evo/eds 3.6.x+, somehow
|
||||
+ break;
|
||||
+ case SDBCAddress::EVO_LOCAL:
|
||||
+ can = isSourceBackend( pSource, "local");
|
||||
+ break;
|
||||
+ case SDBCAddress::EVO_LDAP:
|
||||
+ can = isSourceBackend( pSource, "ldap");
|
||||
+ break;
|
||||
+ case SDBCAddress::Unknown:
|
||||
+ can = true;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (!can)
|
||||
+ continue;
|
||||
|
||||
ODatabaseMetaDataResultSet::ORow aRow(3);
|
||||
aRow.reserve(6);
|
||||
- aRow.push_back(new ORowSetValueDecorator(aName));
|
||||
+ OUString aHumanName = OStringToOUString( e_source_get_display_name( pSource ),
|
||||
+ RTL_TEXTENCODING_UTF8 );
|
||||
+ aRow.push_back(new ORowSetValueDecorator(aHumanName)); //tablename
|
||||
aRow.push_back(new ORowSetValueDecorator(aTable));
|
||||
- aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
|
||||
+ OUString aUID = OStringToOUString( e_source_get_uid( pSource ),
|
||||
+ RTL_TEXTENCODING_UTF8 );
|
||||
+ aRow.push_back(new ORowSetValueDecorator(aUID)); //comment
|
||||
+ //I'd prefer to swap the comment and the human name and
|
||||
+ //just use e_source_registry_ref_source(get_e_source_registry(), aUID);
|
||||
+ //in open book rather than search for the name again
|
||||
aRows.push_back(aRow);
|
||||
}
|
||||
+
|
||||
+ g_list_free_full (pSources, g_object_unref);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ ESourceList *pSourceList;
|
||||
+ if( !e_book_get_addressbooks (&pSourceList, NULL) )
|
||||
+ pSourceList = NULL;
|
||||
+
|
||||
+ GSList *g;
|
||||
+ for( g = e_source_list_peek_groups( pSourceList ); g; g = g->next)
|
||||
+ {
|
||||
+ GSList *s;
|
||||
+ const char *p = e_source_group_peek_base_uri(E_SOURCE_GROUP(g->data));
|
||||
+
|
||||
+ switch (m_pConnection->getSDBCAddressType()) {
|
||||
+ case SDBCAddress::EVO_GWISE:
|
||||
+ if ( !strncmp( "groupwise://", p, 11 ))
|
||||
+ break;
|
||||
+ else
|
||||
+ continue;
|
||||
+ case SDBCAddress::EVO_LOCAL:
|
||||
+ if ( !strncmp( "file://", p, 6 ) ||
|
||||
+ !strncmp( "local://", p, 6 ) )
|
||||
+ break;
|
||||
+ else
|
||||
+ continue;
|
||||
+ case SDBCAddress::EVO_LDAP:
|
||||
+ if ( !strncmp( "ldap://", p, 6 ))
|
||||
+ break;
|
||||
+ else
|
||||
+ continue;
|
||||
+ case SDBCAddress::Unknown:
|
||||
+ break;
|
||||
+ }
|
||||
+ for (s = e_source_group_peek_sources (E_SOURCE_GROUP (g->data)); s; s = s->next)
|
||||
+ {
|
||||
+ ESource *pSource = E_SOURCE (s->data);
|
||||
+
|
||||
+ rtl::OUString aName = rtl::OStringToOUString( e_source_peek_name( pSource ),
|
||||
+ RTL_TEXTENCODING_UTF8 );
|
||||
+
|
||||
+ ODatabaseMetaDataResultSet::ORow aRow(3);
|
||||
+ aRow.reserve(6);
|
||||
+ aRow.push_back(new ORowSetValueDecorator(aName));
|
||||
+ aRow.push_back(new ORowSetValueDecorator(aTable));
|
||||
+ aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
|
||||
+ aRows.push_back(aRow);
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
pResult->setRows(aRows);
|
||||
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
|
||||
index b5f4640..26690b1 100644
|
||||
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
|
||||
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
|
||||
@@ -87,109 +87,17 @@ sal_Bool SAL_CALL OEvoabResultSet::supportsService( const ::rtl::OUString& _rSer
|
||||
return pSupported != pEnd;
|
||||
}
|
||||
|
||||
-// -------------------------------------------------------------------------
|
||||
-OEvoabResultSet::OEvoabResultSet( OCommonStatement* pStmt, OEvoabConnection *pConnection )
|
||||
- :OResultSet_BASE(m_aMutex)
|
||||
- ,::comphelper::OPropertyContainer( OResultSet_BASE::rBHelper )
|
||||
- ,m_pStatement(pStmt)
|
||||
- ,m_pConnection(pConnection)
|
||||
- ,m_xMetaData(NULL)
|
||||
- ,m_bWasNull(sal_True)
|
||||
- ,m_nFetchSize(0)
|
||||
- ,m_nResultSetType(ResultSetType::SCROLL_INSENSITIVE)
|
||||
- ,m_nFetchDirection(FetchDirection::FORWARD)
|
||||
- ,m_nResultSetConcurrency(ResultSetConcurrency::READ_ONLY)
|
||||
- ,m_pContacts(NULL)
|
||||
- ,m_nIndex(-1)
|
||||
- ,m_nLength(0)
|
||||
-{
|
||||
- #define REGISTER_PROP( id, member ) \
|
||||
- registerProperty( \
|
||||
- OMetaConnection::getPropMap().getNameByIndex( id ), \
|
||||
- id, \
|
||||
- PropertyAttribute::READONLY, \
|
||||
- &member, \
|
||||
- ::getCppuType( &member ) \
|
||||
- );
|
||||
-
|
||||
- REGISTER_PROP( PROPERTY_ID_FETCHSIZE, m_nFetchSize );
|
||||
- REGISTER_PROP( PROPERTY_ID_RESULTSETTYPE, m_nResultSetType );
|
||||
- REGISTER_PROP( PROPERTY_ID_FETCHDIRECTION, m_nFetchDirection );
|
||||
- REGISTER_PROP( PROPERTY_ID_RESULTSETCONCURRENCY, m_nResultSetConcurrency );
|
||||
-}
|
||||
-
|
||||
-// -------------------------------------------------------------------------
|
||||
-OEvoabResultSet::~OEvoabResultSet()
|
||||
-{
|
||||
-}
|
||||
-
|
||||
-// -------------------------------------------------------------------------
|
||||
-
|
||||
-static ESource *
|
||||
-findSource( const char *name )
|
||||
+struct ComparisonData
|
||||
{
|
||||
- ESourceList *pSourceList = NULL;
|
||||
+ const SortDescriptor& rSortOrder;
|
||||
+ IntlWrapper aIntlWrapper;
|
||||
|
||||
- g_return_val_if_fail (name != NULL, NULL);
|
||||
-
|
||||
- if (!e_book_get_addressbooks (&pSourceList, NULL))
|
||||
- pSourceList = NULL;
|
||||
-
|
||||
- for ( GSList *g = e_source_list_peek_groups (pSourceList); g; g = g->next)
|
||||
+ ComparisonData( const SortDescriptor& _rSortOrder, const Reference< XComponentContext >& _rxContext )
|
||||
+ :rSortOrder( _rSortOrder )
|
||||
+ ,aIntlWrapper( _rxContext, SvtSysLocale().GetLanguageTag() )
|
||||
{
|
||||
- for (GSList *s = e_source_group_peek_sources (E_SOURCE_GROUP (g->data)); s; s = s->next)
|
||||
- {
|
||||
- ESource *pSource = E_SOURCE (s->data);
|
||||
- if (!strcmp (e_source_peek_name (pSource), name))
|
||||
- return pSource;
|
||||
- }
|
||||
}
|
||||
- return NULL;
|
||||
-}
|
||||
-
|
||||
-static EBook *
|
||||
-openBook( const char *abname )
|
||||
-{
|
||||
- ESource *pSource = findSource (abname);
|
||||
- EBook *pBook = NULL;
|
||||
- if (pSource)
|
||||
- pBook = e_book_new (pSource, NULL);
|
||||
-
|
||||
- if (pBook && !e_book_open (pBook, TRUE, NULL))
|
||||
- {
|
||||
- g_object_unref (G_OBJECT (pBook));
|
||||
- pBook = NULL;
|
||||
- }
|
||||
-
|
||||
- return pBook;
|
||||
-}
|
||||
-
|
||||
-static bool isLDAP( EBook *pBook )
|
||||
-{
|
||||
- return pBook && !strncmp( "ldap://", e_book_get_uri( pBook ), 6 );
|
||||
-}
|
||||
-
|
||||
-static bool isLocal( EBook *pBook )
|
||||
-{
|
||||
- return pBook && ( !strncmp( "file://", e_book_get_uri( pBook ), 6 ) ||
|
||||
- !strncmp( "local:", e_book_get_uri( pBook ), 6 ) );
|
||||
-}
|
||||
-
|
||||
-static bool isAuthRequired( EBook *pBook )
|
||||
-{
|
||||
- return e_source_get_property( e_book_get_source( pBook ),
|
||||
- "auth" ) != NULL;
|
||||
-}
|
||||
-
|
||||
-static rtl::OString getUserName( EBook *pBook )
|
||||
-{
|
||||
- rtl::OString aName;
|
||||
- if( isLDAP( pBook ) )
|
||||
- aName = e_source_get_property( e_book_get_source( pBook ), "binddn" );
|
||||
- else
|
||||
- aName = e_source_get_property( e_book_get_source( pBook ), "user" );
|
||||
- return aName;
|
||||
-}
|
||||
+};
|
||||
|
||||
static ::rtl::OUString
|
||||
valueToOUString( GValue& _rValue )
|
||||
@@ -209,29 +117,6 @@ valueToBool( GValue& _rValue )
|
||||
return bResult;
|
||||
}
|
||||
|
||||
-static bool
|
||||
-executeQuery (EBook* pBook, EBookQuery* pQuery, GList **ppList,
|
||||
- rtl::OString &rPassword, GError **pError)
|
||||
-{
|
||||
- ESource *pSource = e_book_get_source( pBook );
|
||||
- bool bSuccess = false;
|
||||
- bool bAuthSuccess = true;
|
||||
-
|
||||
- *ppList = NULL;
|
||||
-
|
||||
- if( isAuthRequired( pBook ) )
|
||||
- {
|
||||
- rtl::OString aUser( getUserName( pBook ) );
|
||||
- const char *pAuth = e_source_get_property( pSource, "auth" );
|
||||
- bAuthSuccess = e_book_authenticate_user( pBook, aUser.getStr(), rPassword.getStr(), pAuth, pError );
|
||||
- }
|
||||
-
|
||||
- if (bAuthSuccess)
|
||||
- bSuccess = e_book_get_contacts( pBook, pQuery, ppList, pError );
|
||||
-
|
||||
- return bSuccess;
|
||||
-}
|
||||
-
|
||||
static int
|
||||
whichAddress(int value)
|
||||
{
|
||||
@@ -368,6 +253,7 @@ handleSplitAddress( EContact *pContact,GValue *pStackValue, int value )
|
||||
|
||||
return false;
|
||||
}
|
||||
+
|
||||
static bool
|
||||
getValue( EContact* pContact, sal_Int32 nColumnNum, GType nType, GValue* pStackValue, bool& _out_rWasNull )
|
||||
{
|
||||
@@ -420,21 +306,6 @@ getValue( EContact* pContact, sal_Int32 nColumnNum, GType nType, GValue* pStackV
|
||||
return true;
|
||||
}
|
||||
|
||||
-namespace
|
||||
-{
|
||||
- struct ComparisonData
|
||||
- {
|
||||
- const SortDescriptor& rSortOrder;
|
||||
- IntlWrapper aIntlWrapper;
|
||||
-
|
||||
- ComparisonData( const SortDescriptor& _rSortOrder, const Reference< XComponentContext >& _rxContext )
|
||||
- :rSortOrder( _rSortOrder )
|
||||
- ,aIntlWrapper( _rxContext, SvtSysLocale().GetLanguageTag() )
|
||||
- {
|
||||
- }
|
||||
- };
|
||||
-}
|
||||
-
|
||||
extern "C"
|
||||
int CompareContacts( gconstpointer _lhs, gconstpointer _rhs, gpointer _userData )
|
||||
{
|
||||
@@ -493,13 +364,278 @@ int CompareContacts( gconstpointer _lhs, gconstpointer _rhs, gpointer _userData
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static GList*
|
||||
-sortContacts( GList* _pContactList, const ComparisonData& _rCompData )
|
||||
+OString OEvoabVersionHelper::getUserName( EBook *pBook )
|
||||
{
|
||||
- OSL_ENSURE( !_rCompData.rSortOrder.empty(), "sortContacts: no need to call this without any sort order!" );
|
||||
- ENSURE_OR_THROW( _rCompData.aIntlWrapper.getCaseCollator(), "no collator for comparing strings" );
|
||||
+ OString aName;
|
||||
+ if( isLDAP( pBook ) )
|
||||
+ aName = e_source_get_property( e_book_get_source( pBook ), "binddn" );
|
||||
+ else
|
||||
+ aName = e_source_get_property( e_book_get_source( pBook ), "user" );
|
||||
+ return aName;
|
||||
+}
|
||||
+
|
||||
+class OEvoabVersion36Helper : public OEvoabVersionHelper
|
||||
+{
|
||||
+private:
|
||||
+ GSList *m_pContacts;
|
||||
+public:
|
||||
+ OEvoabVersion36Helper()
|
||||
+ : m_pContacts(NULL)
|
||||
+ {
|
||||
+ }
|
||||
+
|
||||
+ ~OEvoabVersion36Helper()
|
||||
+ {
|
||||
+ freeContacts();
|
||||
+ }
|
||||
+
|
||||
+ virtual EBook* openBook(const char *abname)
|
||||
+ {
|
||||
+ //It would be better if here we had id to begin with, see
|
||||
+ //NDatabaseMetaData.cxx
|
||||
+ const char *id = NULL;
|
||||
+ GList *pSources = e_source_registry_list_sources(get_e_source_registry(), E_SOURCE_EXTENSION_ADDRESS_BOOK);
|
||||
+ for (GList* liter = pSources; liter; liter = liter->next)
|
||||
+ {
|
||||
+ ESource *pSource = E_SOURCE (liter->data);
|
||||
|
||||
- return g_list_sort_with_data( _pContactList, &CompareContacts, const_cast< gpointer >( static_cast< gconstpointer >( &_rCompData ) ) );
|
||||
+ if (strcmp(abname, e_source_get_display_name( pSource )) == 0)
|
||||
+ {
|
||||
+ id = e_source_get_uid( pSource );
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ g_list_free_full (pSources, g_object_unref);
|
||||
+ if (!id)
|
||||
+ return NULL;
|
||||
+
|
||||
+ ESource *pSource = e_source_registry_ref_source(get_e_source_registry(), id);
|
||||
+ EBookClient *pBook = pSource ? e_book_client_new (pSource, NULL) : NULL;
|
||||
+ if (pBook && !e_client_open_sync (pBook, TRUE, NULL, NULL))
|
||||
+ {
|
||||
+ g_object_unref (G_OBJECT (pBook));
|
||||
+ pBook = NULL;
|
||||
+ }
|
||||
+ if (pSource)
|
||||
+ g_object_unref (pSource);
|
||||
+ return pBook;
|
||||
+ }
|
||||
+
|
||||
+ bool isBookBackend( EBookClient *pBook, const char *backendname)
|
||||
+ {
|
||||
+ if (!pBook)
|
||||
+ return false;
|
||||
+ ESource *pSource = e_client_get_source ((EClient *) pBook);
|
||||
+ return isSourceBackend(pSource, backendname);
|
||||
+ }
|
||||
+
|
||||
+ virtual bool isLDAP( EBook *pBook )
|
||||
+ {
|
||||
+ return isBookBackend(pBook, "ldap");
|
||||
+ }
|
||||
+
|
||||
+ virtual bool isLocal( EBook *pBook )
|
||||
+ {
|
||||
+ return isBookBackend(pBook, "local");
|
||||
+ }
|
||||
+
|
||||
+ virtual void freeContacts()
|
||||
+ {
|
||||
+ e_client_util_free_object_slist(m_pContacts);
|
||||
+ m_pContacts = NULL;
|
||||
+ }
|
||||
+
|
||||
+ virtual bool executeQuery (EBook* pBook, EBookQuery* pQuery, OString &/*rPassword*/)
|
||||
+ {
|
||||
+ freeContacts();
|
||||
+ char *sexp = e_book_query_to_string( pQuery );
|
||||
+ bool bSuccess = e_book_client_get_contacts_sync( pBook, sexp, &m_pContacts, NULL, NULL );
|
||||
+ g_free (sexp);
|
||||
+ return bSuccess;
|
||||
+ }
|
||||
+
|
||||
+ virtual EContact *getContact(sal_Int32 nIndex)
|
||||
+ {
|
||||
+ gpointer pData = g_slist_nth_data (m_pContacts, nIndex);
|
||||
+ return pData ? E_CONTACT (pData) : NULL;
|
||||
+ }
|
||||
+
|
||||
+ virtual sal_Int32 getNumContacts()
|
||||
+ {
|
||||
+ return g_slist_length( m_pContacts );
|
||||
+ }
|
||||
+
|
||||
+ virtual bool hasContacts()
|
||||
+ {
|
||||
+ return m_pContacts != NULL;
|
||||
+ }
|
||||
+
|
||||
+ virtual void sortContacts( const ComparisonData& _rCompData )
|
||||
+ {
|
||||
+ OSL_ENSURE( !_rCompData.rSortOrder.empty(), "sortContacts: no need to call this without any sort order!" );
|
||||
+ ENSURE_OR_THROW( _rCompData.aIntlWrapper.getCaseCollator(), "no collator for comparing strings" );
|
||||
+
|
||||
+ m_pContacts = g_slist_sort_with_data( m_pContacts, &CompareContacts,
|
||||
+ const_cast< gpointer >( static_cast< gconstpointer >( &_rCompData ) ) );
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+class OEvoabVersion35Helper : public OEvoabVersionHelper
|
||||
+{
|
||||
+private:
|
||||
+ GList *m_pContacts;
|
||||
+
|
||||
+ ESource * findSource( const char *id )
|
||||
+ {
|
||||
+ ESourceList *pSourceList = NULL;
|
||||
+
|
||||
+ g_return_val_if_fail (id != NULL, NULL);
|
||||
+
|
||||
+ if (!e_book_get_addressbooks (&pSourceList, NULL))
|
||||
+ pSourceList = NULL;
|
||||
+
|
||||
+ for ( GSList *g = e_source_list_peek_groups (pSourceList); g; g = g->next)
|
||||
+ {
|
||||
+ for (GSList *s = e_source_group_peek_sources (E_SOURCE_GROUP (g->data)); s; s = s->next)
|
||||
+ {
|
||||
+ ESource *pSource = E_SOURCE (s->data);
|
||||
+ if (!strcmp (e_source_peek_name (pSource), id))
|
||||
+ return pSource;
|
||||
+ }
|
||||
+ }
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ bool isAuthRequired( EBook *pBook )
|
||||
+ {
|
||||
+ return e_source_get_property( e_book_get_source( pBook ),
|
||||
+ "auth" ) != NULL;
|
||||
+ }
|
||||
+
|
||||
+public:
|
||||
+ OEvoabVersion35Helper()
|
||||
+ : m_pContacts(NULL)
|
||||
+ {
|
||||
+ }
|
||||
+
|
||||
+ ~OEvoabVersion35Helper()
|
||||
+ {
|
||||
+ freeContacts();
|
||||
+ }
|
||||
+
|
||||
+ virtual EBook* openBook(const char *abname)
|
||||
+ {
|
||||
+ ESource *pSource = findSource (abname);
|
||||
+ EBook *pBook = pSource ? e_book_new (pSource, NULL) : NULL;
|
||||
+ if (pBook && !e_book_open (pBook, TRUE, NULL))
|
||||
+ {
|
||||
+ g_object_unref (G_OBJECT (pBook));
|
||||
+ pBook = NULL;
|
||||
+ }
|
||||
+ return pBook;
|
||||
+ }
|
||||
+
|
||||
+ virtual bool isLDAP( EBook *pBook )
|
||||
+ {
|
||||
+ return pBook && !strncmp( "ldap://", e_book_get_uri( pBook ), 6 );
|
||||
+ }
|
||||
+
|
||||
+ virtual bool isLocal( EBook *pBook )
|
||||
+ {
|
||||
+ return pBook && ( !strncmp( "file://", e_book_get_uri( pBook ), 6 ) ||
|
||||
+ !strncmp( "local:", e_book_get_uri( pBook ), 6 ) );
|
||||
+ }
|
||||
+
|
||||
+ virtual void freeContacts()
|
||||
+ {
|
||||
+ g_list_free(m_pContacts);
|
||||
+ m_pContacts = NULL;
|
||||
+ }
|
||||
+
|
||||
+ virtual bool executeQuery (EBook* pBook, EBookQuery* pQuery, OString &rPassword)
|
||||
+ {
|
||||
+ freeContacts();
|
||||
+
|
||||
+ ESource *pSource = e_book_get_source( pBook );
|
||||
+ bool bSuccess = false;
|
||||
+ bool bAuthSuccess = true;
|
||||
+
|
||||
+ if( isAuthRequired( pBook ) )
|
||||
+ {
|
||||
+ rtl::OString aUser( getUserName( pBook ) );
|
||||
+ const char *pAuth = e_source_get_property( pSource, "auth" );
|
||||
+ bAuthSuccess = e_book_authenticate_user( pBook, aUser.getStr(), rPassword.getStr(), pAuth, NULL );
|
||||
+ }
|
||||
+
|
||||
+ if (bAuthSuccess)
|
||||
+ bSuccess = e_book_get_contacts( pBook, pQuery, &m_pContacts, NULL );
|
||||
+
|
||||
+ return bSuccess;
|
||||
+ }
|
||||
+
|
||||
+ virtual EContact *getContact(sal_Int32 nIndex)
|
||||
+ {
|
||||
+ gpointer pData = g_list_nth_data (m_pContacts, nIndex);
|
||||
+ return pData ? E_CONTACT (pData) : NULL;
|
||||
+ }
|
||||
+
|
||||
+ virtual sal_Int32 getNumContacts()
|
||||
+ {
|
||||
+ return g_list_length( m_pContacts );
|
||||
+ }
|
||||
+
|
||||
+ virtual bool hasContacts()
|
||||
+ {
|
||||
+ return m_pContacts != NULL;
|
||||
+ }
|
||||
+
|
||||
+ virtual void sortContacts( const ComparisonData& _rCompData )
|
||||
+ {
|
||||
+ OSL_ENSURE( !_rCompData.rSortOrder.empty(), "sortContacts: no need to call this without any sort order!" );
|
||||
+ ENSURE_OR_THROW( _rCompData.aIntlWrapper.getCaseCollator(), "no collator for comparing strings" );
|
||||
+
|
||||
+ m_pContacts = g_list_sort_with_data( m_pContacts, &CompareContacts,
|
||||
+ const_cast< gpointer >( static_cast< gconstpointer >( &_rCompData ) ) );
|
||||
+ }
|
||||
+};
|
||||
+
|
||||
+OEvoabResultSet::OEvoabResultSet( OCommonStatement* pStmt, OEvoabConnection *pConnection )
|
||||
+ :OResultSet_BASE(m_aMutex)
|
||||
+ ,::comphelper::OPropertyContainer( OResultSet_BASE::rBHelper )
|
||||
+ ,m_pStatement(pStmt)
|
||||
+ ,m_pConnection(pConnection)
|
||||
+ ,m_xMetaData(NULL)
|
||||
+ ,m_bWasNull(sal_True)
|
||||
+ ,m_nFetchSize(0)
|
||||
+ ,m_nResultSetType(ResultSetType::SCROLL_INSENSITIVE)
|
||||
+ ,m_nFetchDirection(FetchDirection::FORWARD)
|
||||
+ ,m_nResultSetConcurrency(ResultSetConcurrency::READ_ONLY)
|
||||
+ ,m_nIndex(-1)
|
||||
+ ,m_nLength(0)
|
||||
+{
|
||||
+ if (eds_check_version(3, 6, 0) == NULL)
|
||||
+ m_pVersionHelper = new OEvoabVersion36Helper;
|
||||
+ else
|
||||
+ m_pVersionHelper = new OEvoabVersion35Helper;
|
||||
+
|
||||
+ #define REGISTER_PROP( id, member ) \
|
||||
+ registerProperty( \
|
||||
+ OMetaConnection::getPropMap().getNameByIndex( id ), \
|
||||
+ id, \
|
||||
+ PropertyAttribute::READONLY, \
|
||||
+ &member, \
|
||||
+ ::getCppuType( &member ) \
|
||||
+ );
|
||||
+
|
||||
+ REGISTER_PROP( PROPERTY_ID_FETCHSIZE, m_nFetchSize );
|
||||
+ REGISTER_PROP( PROPERTY_ID_RESULTSETTYPE, m_nResultSetType );
|
||||
+ REGISTER_PROP( PROPERTY_ID_FETCHDIRECTION, m_nFetchDirection );
|
||||
+ REGISTER_PROP( PROPERTY_ID_RESULTSETCONCURRENCY, m_nResultSetConcurrency );
|
||||
+}
|
||||
+
|
||||
+// -------------------------------------------------------------------------
|
||||
+OEvoabResultSet::~OEvoabResultSet()
|
||||
+{
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
@@ -507,17 +643,16 @@ void OEvoabResultSet::construct( const QueryData& _rData )
|
||||
{
|
||||
ENSURE_OR_THROW( _rData.getQuery(), "internal error: no EBookQuery" );
|
||||
|
||||
- EBook *pBook = openBook(::rtl::OUStringToOString(_rData.sTable, RTL_TEXTENCODING_UTF8).getStr());
|
||||
+ EBook *pBook = m_pVersionHelper->openBook(OUStringToOString(_rData.sTable, RTL_TEXTENCODING_UTF8).getStr());
|
||||
if ( !pBook )
|
||||
m_pConnection->throwGenericSQLException( STR_CANNOT_OPEN_BOOK, *this );
|
||||
|
||||
- g_list_free(m_pContacts);
|
||||
- m_pContacts = NULL;
|
||||
+ m_pVersionHelper->freeContacts();
|
||||
bool bExecuteQuery = true;
|
||||
switch ( _rData.eFilterType )
|
||||
{
|
||||
case eFilterNone:
|
||||
- if ( !isLocal( pBook ) )
|
||||
+ if ( !m_pVersionHelper->isLocal( pBook ) )
|
||||
{
|
||||
SQLError aErrorFactory( m_pConnection->getDriver().getMSFactory() );
|
||||
SQLException aAsException = aErrorFactory.getSQLException( ErrorCondition::DATA_CANNOT_SELECT_UNFILTERED, *this );
|
||||
@@ -541,16 +676,16 @@ void OEvoabResultSet::construct( const QueryData& _rData )
|
||||
if ( bExecuteQuery )
|
||||
{
|
||||
rtl::OString aPassword = m_pConnection->getPassword();
|
||||
- executeQuery( pBook, _rData.getQuery(), &m_pContacts, aPassword, NULL );
|
||||
+ m_pVersionHelper->executeQuery(pBook, _rData.getQuery(), aPassword);
|
||||
m_pConnection->setPassword( aPassword );
|
||||
|
||||
- if ( m_pContacts && !_rData.aSortOrder.empty() )
|
||||
+ if ( m_pVersionHelper->hasContacts() && !_rData.aSortOrder.empty() )
|
||||
{
|
||||
ComparisonData aCompData( _rData.aSortOrder, comphelper::getComponentContext(getConnection()->getDriver().getMSFactory()) );
|
||||
- m_pContacts = sortContacts( m_pContacts, aCompData );
|
||||
+ m_pVersionHelper->sortContacts( aCompData );
|
||||
}
|
||||
}
|
||||
- m_nLength = g_list_length( m_pContacts );
|
||||
+ m_nLength = m_pVersionHelper->getNumContacts();
|
||||
OSL_TRACE( "Query return %d records", m_nLength );
|
||||
m_nIndex = -1;
|
||||
|
||||
@@ -567,10 +702,10 @@ void OEvoabResultSet::disposing(void)
|
||||
::comphelper::OPropertyContainer::disposing();
|
||||
|
||||
::osl::MutexGuard aGuard(m_aMutex);
|
||||
- g_list_free(m_pContacts);
|
||||
- m_pContacts = NULL;
|
||||
+ delete m_pVersionHelper;
|
||||
+ m_pVersionHelper = NULL;
|
||||
m_pStatement = NULL;
|
||||
-m_xMetaData.clear();
|
||||
+ m_xMetaData.clear();
|
||||
}
|
||||
// -------------------------------------------------------------------------
|
||||
Any SAL_CALL OEvoabResultSet::queryInterface( const Type & rType ) throw(RuntimeException)
|
||||
diff --git a/connectivity/source/drivers/evoab2/NResultSet.hxx b/connectivity/source/drivers/evoab2/NResultSet.hxx
|
||||
index fd049fd..c3d7ab4 100644
|
||||
--- a/connectivity/source/drivers/evoab2/NResultSet.hxx
|
||||
+++ b/connectivity/source/drivers/evoab2/NResultSet.hxx
|
||||
@@ -45,6 +45,24 @@ namespace connectivity
|
||||
{
|
||||
namespace evoab
|
||||
{
|
||||
+ class ComparisonData;
|
||||
+
|
||||
+ class OEvoabVersionHelper
|
||||
+ {
|
||||
+ public:
|
||||
+ virtual EBook* openBook(const char *abname) = 0;
|
||||
+ virtual bool executeQuery (EBook* pBook, EBookQuery* pQuery, OString &rPassword) = 0;
|
||||
+ virtual void freeContacts() = 0;
|
||||
+ virtual bool isLDAP( EBook *pBook ) = 0;
|
||||
+ virtual bool isLocal( EBook *pBook ) = 0;
|
||||
+ virtual EContact *getContact(sal_Int32 nIndex) = 0;
|
||||
+ virtual sal_Int32 getNumContacts() = 0;
|
||||
+ virtual bool hasContacts() = 0;
|
||||
+ virtual void sortContacts( const ComparisonData& _rCompData ) = 0;
|
||||
+ OString getUserName( EBook *pBook );
|
||||
+ virtual ~OEvoabVersionHelper() {}
|
||||
+ };
|
||||
+
|
||||
typedef ::cppu::WeakComponentImplHelper8 < ::com::sun::star::sdbc::XResultSet
|
||||
, ::com::sun::star::sdbc::XRow
|
||||
, ::com::sun::star::sdbc::XResultSetMetaDataSupplier
|
||||
@@ -61,6 +79,8 @@ namespace connectivity
|
||||
,public ::comphelper::OPropertyContainer
|
||||
,public ::comphelper::OPropertyArrayUsageHelper<OEvoabResultSet>
|
||||
{
|
||||
+ private:
|
||||
+ OEvoabVersionHelper *m_pVersionHelper;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -79,13 +99,11 @@ namespace connectivity
|
||||
// </properties>
|
||||
|
||||
// Data & iteration
|
||||
- GList *m_pContacts;
|
||||
sal_Int32 m_nIndex;
|
||||
sal_Int32 m_nLength;
|
||||
EContact *getCur()
|
||||
{
|
||||
- gpointer pData = g_list_nth_data (m_pContacts, m_nIndex);
|
||||
- return pData ? E_CONTACT (pData) : NULL;
|
||||
+ return m_pVersionHelper->getContact(m_nIndex);
|
||||
}
|
||||
|
||||
// OPropertyArrayUsageHelper
|
||||
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
|
||||
index 837836d..ad68908 100644
|
||||
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
|
||||
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
|
||||
@@ -955,6 +955,18 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) thr
|
||||
|
||||
} while ( false );
|
||||
|
||||
+ bool bMissingSomeColumnLabels = !aNames.empty() && aNames.size() != aSelectColumns->get().size();
|
||||
+ SAL_WARN_IF(bMissingSomeColumnLabels, "dbaccess", "We have column labels for *some* columns but not all");
|
||||
+ //^^this happens in the evolution address book where we have real column names of e.g.
|
||||
+ //first_name, second_name and city. On parsing via
|
||||
+ //OSQLParseTreeIterator::appendColumns it creates some labels using those real names
|
||||
+ //but the evo address book gives them proper labels of First Name, Second Name and City
|
||||
+ //the munge means that here we have e.g. just "City" as a label because it matches
|
||||
+ //
|
||||
+ //This is all a horrible mess
|
||||
+ if (bMissingSomeColumnLabels)
|
||||
+ aNames.clear();
|
||||
+
|
||||
if ( aNames.empty() )
|
||||
m_aCurrentColumns[ SelectColumns ] = OPrivateColumns::createWithIntrinsicNames( aSelectColumns, bCase, *this, m_aMutex );
|
||||
else
|
||||
--
|
||||
1.8.1
|
||||
|
@ -1,54 +0,0 @@
|
||||
From ecf6b9a9020d086ce411c26a1972811002d500a5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||||
Date: Mon, 11 Feb 2013 15:58:42 +0000
|
||||
Subject: [PATCH] no g_list_free_full in RHEL-6 glib
|
||||
|
||||
Change-Id: I213bb62c2a9318d98f0736cc23431dca3dfd4708
|
||||
---
|
||||
connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx | 3 ++-
|
||||
connectivity/source/drivers/evoab2/NResultSet.cxx | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
|
||||
index a83de24..11742c1 100644
|
||||
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
|
||||
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
|
||||
@@ -1170,7 +1170,8 @@ Reference< XResultSet > SAL_CALL OEvoabDatabaseMetaData::getTables(
|
||||
aRows.push_back(aRow);
|
||||
}
|
||||
|
||||
- g_list_free_full (pSources, g_object_unref);
|
||||
+ g_list_foreach (pSources, (GFunc)g_object_unref, NULL);
|
||||
+ g_list_free (pSources);
|
||||
}
|
||||
else
|
||||
{
|
||||
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
|
||||
index 4baf3ae..154db40 100644
|
||||
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
|
||||
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
|
||||
@@ -405,7 +405,8 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
- g_list_free_full (pSources, g_object_unref);
|
||||
+ g_list_foreach (pSources, (GFunc)g_object_unref, NULL);
|
||||
+ g_list_free (pSources);
|
||||
if (!id)
|
||||
return NULL;
|
||||
|
||||
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
|
||||
index a33a558..63d066a 100644
|
||||
--- a/vcl/inc/unx/gtk/gtkframe.hxx
|
||||
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
|
||||
@@ -54,6 +54,10 @@ typedef XLIB_Window GdkNativeWindow;
|
||||
#define gdk_window_foreign_new_for_display(a,b) gdk_x11_window_foreign_new_for_display(a,b)
|
||||
#endif
|
||||
|
||||
+#if !(GLIB_MAJOR_VERSION > 2 || GLIB_MINOR_VERSION >= 26)
|
||||
+ typedef void GDBusConnection;
|
||||
+#endif
|
||||
+
|
||||
class GtkSalFrame : public SalFrame
|
||||
{
|
||||
static const int nMaxGraphics = 2;
|
@ -1,124 +0,0 @@
|
||||
From a14eedf997daf30379ceabc1933273360d4d3188 Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Bergmann <sbergman@redhat.com>
|
||||
Date: Wed, 20 Feb 2013 17:49:20 +0100
|
||||
Subject: [PATCH] rhbz#742780: Let make OPT_FLAGS=... override SDK
|
||||
optimization/debugging flags
|
||||
|
||||
Change-Id: I639fa16f74342b108a395d7d0335d116f96677f1
|
||||
---
|
||||
odk/settings/settings.mk | 52 ++++++++++++++++++++----------------------------
|
||||
1 file changed, 22 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk
|
||||
index a71be27..eecde50 100644
|
||||
--- a/odk/settings/settings.mk
|
||||
+++ b/odk/settings/settings.mk
|
||||
@@ -95,17 +95,16 @@ EMPTYSTRING=
|
||||
PATH_SEPARATOR=;
|
||||
|
||||
# use this for release version
|
||||
-CC_FLAGS_JNI=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa
|
||||
-CC_FLAGS=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa
|
||||
+ifeq "$(DEBUG)" "yes"
|
||||
+OPT_FLAGS=-Zi
|
||||
+endif
|
||||
+CC_FLAGS_JNI=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa $(OPT_FLAGS)
|
||||
+CC_FLAGS=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa $(OPT_FLAGS)
|
||||
ifeq "$(CPP_MANIFEST)" "true"
|
||||
LINK_MANIFEST=mt -manifest $@.manifest "-outputresource:$@;2"
|
||||
else
|
||||
LINK_MANIFEST=
|
||||
endif
|
||||
-ifeq "$(DEBUG)" "yes"
|
||||
-CC_FLAGS_JNI+=-Zi
|
||||
-CC_FLAGS+=-Zi
|
||||
-endif
|
||||
|
||||
CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
|
||||
SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/win32"
|
||||
@@ -213,14 +212,13 @@ STORELIB=-lstore
|
||||
EMPTYSTRING=
|
||||
PATH_SEPARATOR=:
|
||||
|
||||
-#CC_FLAGS_JNI=-c -KPIC
|
||||
-#CC_FLAGS=-c -KPIC -xldscope=hidden
|
||||
-CC_FLAGS_JNI=-c -fpic
|
||||
-CC_FLAGS=-c -fpic -fvisibility=hidden
|
||||
ifeq "$(DEBUG)" "yes"
|
||||
-CC_FLAGS_JNI+=-g
|
||||
-CC_FLAGS+=-g
|
||||
+OPT_FLAGS=-g
|
||||
endif
|
||||
+#CC_FLAGS_JNI=-c -KPIC $(OPT_FLAGS)
|
||||
+#CC_FLAGS=-c -KPIC -xldscope=hidden $(OPT_FLAGS)
|
||||
+CC_FLAGS_JNI=-c -fpic $(OPT_FLAGS)
|
||||
+CC_FLAGS=-c -fpic -fvisibility=hidden $(OPT_FLAGS)
|
||||
CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
|
||||
SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/solaris"
|
||||
|
||||
@@ -341,16 +339,14 @@ STORELIB=-lstore
|
||||
EMPTYSTRING=
|
||||
PATH_SEPARATOR=:
|
||||
|
||||
-CC_FLAGS_JNI=-c -fpic
|
||||
-CC_FLAGS=-c -fpic -fvisibility=hidden
|
||||
# -O is necessary for inlining (see gcc documentation)
|
||||
ifeq "$(DEBUG)" "yes"
|
||||
-CC_FLAGS_JNI+=-g
|
||||
-CC_FLAGS+=-g
|
||||
+OPT_FLAGS=-g
|
||||
else
|
||||
-CC_FLAGS_JNI+=-O
|
||||
-CC_FLAGS+=-O
|
||||
+OPT_FLAGS=-O
|
||||
endif
|
||||
+CC_FLAGS_JNI=-c -fpic $(OPT_FLAGS)
|
||||
+CC_FLAGS=-c -fpic -fvisibility=hidden $(OPT_FLAGS)
|
||||
|
||||
ifeq "$(PROCTYPE)" "ppc"
|
||||
CC_FLAGS+=-fPIC
|
||||
@@ -466,16 +462,14 @@ INSTALL_NAME_URELIBS_BIN=$(XCRUN) install_name_tool -change @___________________
|
||||
EMPTYSTRING=
|
||||
PATH_SEPARATOR=:
|
||||
|
||||
-CC_FLAGS_JNI=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION)
|
||||
-CC_FLAGS=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden
|
||||
# -O is necessary for inlining (see gcc documentation)
|
||||
ifeq "$(DEBUG)" "yes"
|
||||
-CC_FLAGS_JNI+=-g
|
||||
-CC_FLAGS+=-g
|
||||
+OPT_FLAGS=-g
|
||||
else
|
||||
-CC_FLAGS_JNI+=-O
|
||||
-CC_FLAGS+=-O
|
||||
+OPT_FLAGS=-O
|
||||
endif
|
||||
+CC_FLAGS_JNI=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) $(OPT_FLAGS)
|
||||
+CC_FLAGS=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden $(OPT_FLAGS)
|
||||
|
||||
SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers
|
||||
CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
|
||||
@@ -580,16 +574,14 @@ STORELIB=-lstore
|
||||
EMPTYSTRING=
|
||||
PATH_SEPARATOR=:
|
||||
|
||||
-CC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS)
|
||||
-CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden
|
||||
# -O is necessary for inlining (see gcc documentation)
|
||||
ifeq "$(DEBUG)" "yes"
|
||||
-CC_FLAGS_JNI+=-g
|
||||
-CC_FLAGS+=-g
|
||||
+OPT_FLAGS=-g
|
||||
else
|
||||
-CC_FLAGS_JNI+=-O
|
||||
-CC_FLAGS+=-O
|
||||
+OPT_FLAGS=-O
|
||||
endif
|
||||
+CC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) $(OPT_FLAGS)
|
||||
+CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden $(OPT_FLAGS)
|
||||
|
||||
SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd"
|
||||
CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
|
||||
--
|
||||
1.8.1.2
|
||||
|
@ -1,221 +0,0 @@
|
||||
From f2d801284657b496d0a9498a4db825dbceaafa8c Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Bergmann <sbergman@redhat.com>
|
||||
Date: Tue, 16 Apr 2013 13:52:02 +0200
|
||||
Subject: [PATCH] rhbz#867808 Do not throw RuntimeException by pointer
|
||||
|
||||
(cherry picked from commit e46564a0a6a74da90785a1b910d33e2b5bfdcfd9, plus
|
||||
63b4633cf7b0da9eba63e752cec72cb10ed9d93e "Related: rhbz#867808 if one person
|
||||
threw by pointer..." and 336353a87e6003e685aab87ea74a158546e1f297 "Related
|
||||
rhbz#867808: More apparently bogus 'throw new ...' in C++ code")
|
||||
Conflicts:
|
||||
bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
|
||||
bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
|
||||
sdext/source/presenter/PresenterController.cxx
|
||||
stoc/source/registry_tdprovider/functiondescription.cxx
|
||||
stoc/source/registry_tdprovider/methoddescription.cxx
|
||||
toolkit/source/awt/vclxwindow1.cxx
|
||||
|
||||
Change-Id: I22b7d3d642e7ee0488d6b726a331d328065bbee7
|
||||
---
|
||||
.../nativethreadpool/testnativethreadpoolclient.cxx | 4 ++--
|
||||
.../nativethreadpool/testnativethreadpoolserver.cxx | 2 +-
|
||||
.../source/transliteration/transliteration_Numeric.cxx | 6 +++---
|
||||
sdext/source/presenter/PresenterController.cxx | 2 +-
|
||||
stoc/source/registry_tdprovider/functiondescription.cxx | 4 ++--
|
||||
stoc/source/registry_tdprovider/methoddescription.cxx | 2 +-
|
||||
testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx | 6 +++---
|
||||
toolkit/source/awt/stylesettings.cxx | 2 +-
|
||||
toolkit/source/awt/vclxwindow1.cxx | 14 ++++++--------
|
||||
9 files changed, 20 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
|
||||
index df0991c..b7a5ff3 100644
|
||||
--- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
|
||||
+++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx
|
||||
@@ -74,7 +74,7 @@ sal_Int32 Client::run(css::uno::Sequence< rtl::OUString > const &)
|
||||
css::uno::Reference< css::lang::XMultiComponentFactory > factory(
|
||||
context->getServiceManager());
|
||||
if (!factory.is()) {
|
||||
- throw new css::uno::RuntimeException(
|
||||
+ throw css::uno::RuntimeException(
|
||||
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no component context service manager" )),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
@@ -94,7 +94,7 @@ sal_Int32 Client::run(css::uno::Sequence< rtl::OUString > const &)
|
||||
}
|
||||
relay->start(this);
|
||||
if (!data.setData(reinterpret_cast< void * >(12345))) {
|
||||
- throw new css::uno::RuntimeException(
|
||||
+ throw css::uno::RuntimeException(
|
||||
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "osl::ThreadData::setData failed" )),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
diff --git a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
|
||||
index 607a054..3952ce9 100644
|
||||
--- a/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
|
||||
+++ b/bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx
|
||||
@@ -63,7 +63,7 @@ sal_Int32 Server::get() throw (css::uno::RuntimeException) {
|
||||
css::uno::Reference< css::lang::XMultiComponentFactory > factory(
|
||||
context->getServiceManager());
|
||||
if (!factory.is()) {
|
||||
- throw new css::uno::RuntimeException(
|
||||
+ throw css::uno::RuntimeException(
|
||||
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "no component context service manager" )),
|
||||
static_cast< cppu::OWeakObject * >(this));
|
||||
}
|
||||
diff --git a/i18npool/source/transliteration/transliteration_Numeric.cxx b/i18npool/source/transliteration/transliteration_Numeric.cxx
|
||||
index eec4236..de24368 100644
|
||||
--- a/i18npool/source/transliteration/transliteration_Numeric.cxx
|
||||
+++ b/i18npool/source/transliteration/transliteration_Numeric.cxx
|
||||
@@ -38,21 +38,21 @@ OUString SAL_CALL
|
||||
transliteration_Numeric::folding( const OUString& /*inStr*/, sal_Int32 /*startPos*/, sal_Int32 /*nCount*/, Sequence< sal_Int32 >& /*offset*/ )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
- throw (new RuntimeException());
|
||||
+ throw RuntimeException();
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL
|
||||
transliteration_Numeric::equals( const OUString& /*str1*/, sal_Int32 /*pos1*/, sal_Int32 /*nCount1*/, sal_Int32& /*nMatch1*/, const OUString& /*str2*/, sal_Int32 /*pos2*/, sal_Int32 /*nCount2*/, sal_Int32& /*nMatch2*/ )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
- throw (new RuntimeException());
|
||||
+ throw RuntimeException();
|
||||
}
|
||||
|
||||
Sequence< OUString > SAL_CALL
|
||||
transliteration_Numeric::transliterateRange( const OUString& /*str1*/, const OUString& /*str2*/ )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
- throw (new RuntimeException());
|
||||
+ throw RuntimeException();
|
||||
}
|
||||
|
||||
|
||||
diff --git a/sdext/source/presenter/PresenterController.cxx b/sdext/source/presenter/PresenterController.cxx
|
||||
index 14820da..44b5bea 100644
|
||||
--- a/sdext/source/presenter/PresenterController.cxx
|
||||
+++ b/sdext/source/presenter/PresenterController.cxx
|
||||
@@ -119,7 +119,7 @@ PresenterController::PresenterController (
|
||||
OSL_ASSERT(mxController.is());
|
||||
|
||||
if ( ! mxSlideShowController.is())
|
||||
- throw new lang::IllegalArgumentException(
|
||||
+ throw lang::IllegalArgumentException(
|
||||
A2S("missing slide show controller"),
|
||||
static_cast<XWeak*>(this),
|
||||
2);
|
||||
diff --git a/stoc/source/registry_tdprovider/functiondescription.cxx b/stoc/source/registry_tdprovider/functiondescription.cxx
|
||||
index 8840451..3cb9635 100644
|
||||
--- a/stoc/source/registry_tdprovider/functiondescription.cxx
|
||||
+++ b/stoc/source/registry_tdprovider/functiondescription.cxx
|
||||
@@ -71,7 +71,7 @@ FunctionDescription::getExceptions() const {
|
||||
try {
|
||||
any = m_manager->getByHierarchicalName(name);
|
||||
} catch (const css::container::NoSuchElementException & e) {
|
||||
- throw new css::uno::RuntimeException(
|
||||
+ throw css::uno::RuntimeException(
|
||||
(rtl::OUString(
|
||||
RTL_CONSTASCII_USTRINGPARAM(
|
||||
"com.sun.star.container.NoSuchElementException: "))
|
||||
@@ -81,7 +81,7 @@ FunctionDescription::getExceptions() const {
|
||||
if (!(any >>= exceptions[i])
|
||||
|| exceptions[i]->getTypeClass() != css::uno::TypeClass_EXCEPTION)
|
||||
{
|
||||
- throw new css::uno::RuntimeException(
|
||||
+ throw css::uno::RuntimeException(
|
||||
(rtl::OUString(
|
||||
RTL_CONSTASCII_USTRINGPARAM("not an exception type: "))
|
||||
+ name),
|
||||
diff --git a/stoc/source/registry_tdprovider/methoddescription.cxx b/stoc/source/registry_tdprovider/methoddescription.cxx
|
||||
index fd2d6c3..f018d1f 100644
|
||||
--- a/stoc/source/registry_tdprovider/methoddescription.cxx
|
||||
+++ b/stoc/source/registry_tdprovider/methoddescription.cxx
|
||||
@@ -90,7 +90,7 @@ css::uno::Reference< css::reflection::XTypeDescription > Parameter::getType()
|
||||
m_manager->getByHierarchicalName(m_typeName),
|
||||
css::uno::UNO_QUERY_THROW);
|
||||
} catch (const css::container::NoSuchElementException & e) {
|
||||
- throw new css::uno::RuntimeException(
|
||||
+ throw css::uno::RuntimeException(
|
||||
(rtl::OUString(
|
||||
RTL_CONSTASCII_USTRINGPARAM(
|
||||
"com.sun.star.container.NoSuchElementException: "))
|
||||
diff --git a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
|
||||
index c2e7bda..7d08eab 100644
|
||||
--- a/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
|
||||
+++ b/testtools/source/bridgetest/cli/cli_cpp_bridgetest.cxx
|
||||
@@ -799,7 +799,7 @@ static bool raiseException(XBridgeTest* xLBT )
|
||||
bRet = performQueryForUnknownType( xLBT ) && bRet;
|
||||
if (! bRet)
|
||||
{
|
||||
- throw new unoidl::com::sun::star::uno::RuntimeException(
|
||||
+ throw unoidl::com::sun::star::uno::RuntimeException(
|
||||
new String("error: test failed!"), 0);
|
||||
}
|
||||
}
|
||||
@@ -819,7 +819,7 @@ static bool raiseException(XBridgeTest* xLBT )
|
||||
{
|
||||
if (args->Length < 1)
|
||||
{
|
||||
- throw new RuntimeException(
|
||||
+ throw RuntimeException(
|
||||
"missing argument for bridgetest!", this );
|
||||
}
|
||||
Object* test_obj =
|
||||
@@ -846,7 +846,7 @@ static bool raiseException(XBridgeTest* xLBT )
|
||||
s->Append(exc->GetType()->Name);
|
||||
s->Append(S"\n Message: ");
|
||||
s->Append(exc->Message);
|
||||
- throw new unoidl::com::sun::star::uno::RuntimeException(
|
||||
+ throw unoidl::com::sun::star::uno::RuntimeException(
|
||||
s->ToString(), 0);
|
||||
}
|
||||
}
|
||||
diff --git a/toolkit/source/awt/stylesettings.cxx b/toolkit/source/awt/stylesettings.cxx
|
||||
index 97d5e29..fc0fbaa 100644
|
||||
--- a/toolkit/source/awt/stylesettings.cxx
|
||||
+++ b/toolkit/source/awt/stylesettings.cxx
|
||||
@@ -116,7 +116,7 @@ namespace toolkit
|
||||
{
|
||||
Window* pWindow = i_rOwningWindow.GetWindow();
|
||||
if ( !pWindow )
|
||||
- throw new RuntimeException();
|
||||
+ throw RuntimeException();
|
||||
pWindow->AddEventListener( LINK( m_pData.get(), WindowStyleSettings_Data, OnWindowEvent ) );
|
||||
}
|
||||
|
||||
diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx
|
||||
index f38a95c..77af1b2 100644
|
||||
--- a/toolkit/source/awt/vclxwindow1.cxx
|
||||
+++ b/toolkit/source/awt/vclxwindow1.cxx
|
||||
@@ -46,10 +46,9 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle )
|
||||
Window *pWindow = GetWindow();
|
||||
if ( pWindow->GetType() != WINDOW_WORKWINDOW )
|
||||
{
|
||||
- ::com::sun::star::uno::Exception *pException =
|
||||
- new ::com::sun::star::uno::RuntimeException;
|
||||
- pException->Message = ::rtl::OUString("not a work window");
|
||||
- throw pException;
|
||||
+ com::sun::star::uno::Exception aException;
|
||||
+ aException.Message = ::rtl::OUString("not a work window");
|
||||
+ throw aException;
|
||||
}
|
||||
|
||||
// use sal_Int64 here to accomodate all int types
|
||||
@@ -77,10 +76,9 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle )
|
||||
}
|
||||
if( bThrow )
|
||||
{
|
||||
- ::com::sun::star::uno::Exception *pException =
|
||||
- new ::com::sun::star::uno::RuntimeException;
|
||||
- pException->Message = ::rtl::OUString("incorrect window handle type");
|
||||
- throw pException;
|
||||
+ com::sun::star::uno::Exception aException;
|
||||
+ aException.Message = ::rtl::OUString("incorrect window handle type");
|
||||
+ throw aException;
|
||||
}
|
||||
// create system parent data
|
||||
SystemParentData aSysParentData;
|
||||
--
|
||||
1.8.1.4
|
||||
|
@ -1,58 +0,0 @@
|
||||
From ddd2de79573ab9eee065c21a5657c8a065a05d57 Mon Sep 17 00:00:00 2001
|
||||
From: Stephan Bergmann <sbergman@redhat.com>
|
||||
Date: Mon, 22 Apr 2013 16:21:57 +0200
|
||||
Subject: [PATCH] rhbz#954991 Avoid static data (causing trouble at exit)
|
||||
|
||||
(cherry picked from commit aa1aedb2a0ef97cb6110f18a1de86abc8dbcd304)
|
||||
Conflicts:
|
||||
vcl/inc/unx/salinst.h
|
||||
vcl/unx/generic/dtrans/X11_service.cxx
|
||||
|
||||
Change-Id: Ifc8275276811ba24b62f93096e7cb98a5dbf658c
|
||||
---
|
||||
vcl/inc/unx/salinst.h | 10 ++++++++++
|
||||
vcl/unx/generic/dtrans/X11_service.cxx | 2 --
|
||||
2 files changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/vcl/inc/unx/salinst.h b/vcl/inc/unx/salinst.h
|
||||
index 83ba4b8..ea997d6 100644
|
||||
--- a/vcl/inc/unx/salinst.h
|
||||
+++ b/vcl/inc/unx/salinst.h
|
||||
@@ -27,11 +27,21 @@
|
||||
#include <vcl/solarmutex.hxx>
|
||||
#include "generic/geninst.h"
|
||||
|
||||
+#include <tools/prex.h>
|
||||
+#include <X11/Xlib.h>
|
||||
+#include <tools/postx.h>
|
||||
+
|
||||
+namespace com { namespace sun { namespace star { namespace datatransfer {
|
||||
+ namespace clipboard { class XClipboard; }
|
||||
+} } } }
|
||||
|
||||
// -=-= SalInstanceData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
class SalXLib;
|
||||
class VCLPLUG_GEN_PUBLIC X11SalInstance : public SalGenericInstance
|
||||
{
|
||||
+private:
|
||||
+ boost::unordered_map< OUString, boost::unordered_map< Atom, com::sun::star::uno::Reference< com::sun::star::datatransfer::clipboard::XClipboard > >, OUStringHash > m_aInstances;
|
||||
+
|
||||
protected:
|
||||
SalXLib *mpXLib;
|
||||
public:
|
||||
diff --git a/vcl/unx/generic/dtrans/X11_service.cxx b/vcl/unx/generic/dtrans/X11_service.cxx
|
||||
index dc2ff17..5d4ac5e 100644
|
||||
--- a/vcl/unx/generic/dtrans/X11_service.cxx
|
||||
+++ b/vcl/unx/generic/dtrans/X11_service.cxx
|
||||
@@ -62,8 +62,6 @@ Sequence< OUString > SAL_CALL x11::Xdnd_dropTarget_getSupportedServiceNames()
|
||||
|
||||
css::uno::Reference< XInterface > X11SalInstance::CreateClipboard( const Sequence< Any >& arguments )
|
||||
{
|
||||
- static boost::unordered_map< OUString, ::boost::unordered_map< Atom, Reference< XClipboard > >, ::rtl::OUStringHash > m_aInstances;
|
||||
-
|
||||
OUString aDisplayName;
|
||||
Atom nSelection;
|
||||
|
||||
--
|
||||
1.8.1.4
|
||||
|
Loading…
Reference in new issue