[Libreoffice-commits] core.git: 3 commits - dbaccess/source external/libebook include/svtools svtools/source
Caolán McNamara
caolanm at redhat.com
Thu Nov 28 02:08:15 PST 2013
dbaccess/source/ui/app/AppControllerDnD.cxx | 7 +-
external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch | 30 ++++++++++
external/libebook/ExternalProject_libebook.mk | 2
external/libebook/UnpackedTarball_libebook.mk | 6 ++
include/svtools/fileview.hxx | 16 +----
svtools/source/contnr/fileview.cxx | 29 ---------
6 files changed, 43 insertions(+), 47 deletions(-)
New commits:
commit 3b65cd24408bb78676dfa42cf01669970125068a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 28 09:53:47 2013 +0000
Fix crash on abi2010-1.doc example
Change-Id: Ib3e43e14f9223bc53f20f1241d9b8c0eaa5470ad
diff --git a/external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch b/external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch
new file mode 100644
index 0000000..21ab72b
--- /dev/null
+++ b/external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch
@@ -0,0 +1,30 @@
+From 30021c75542a008ccf8814fa70d519f00bc69776 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Thu, 28 Nov 2013 09:50:00 +0000
+Subject: [PATCH] Fix crash on abi2010-1.doc example
+
+---
+ src/lib/FB2Parser.cpp | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib/FB2Parser.cpp b/src/lib/FB2Parser.cpp
+index d258c09..3cd3e3c 100644
+--- a/src/lib/FB2Parser.cpp
++++ b/src/lib/FB2Parser.cpp
+@@ -357,8 +357,11 @@ FB2XMLParserContext *processNode(FB2XMLParserContext *const context, const xmlTe
+ {
+ case XML_READER_TYPE_ELEMENT :
+ {
+- const EBOOKToken *name = getFB2Token(xmlTextReaderConstLocalName(reader));
+- const EBOOKToken *ns = getFB2Token(xmlTextReaderConstNamespaceUri(reader));
++ const xmlChar *name_str = xmlTextReaderConstLocalName(reader);
++ const xmlChar *ns_str = xmlTextReaderConstNamespaceUri(reader);
++
++ const EBOOKToken *name = name_str ? getFB2Token(name_str) : 0;
++ const EBOOKToken *ns = ns_str ? getFB2Token(ns_str) : 0;
+
+ if (!name || !ns)
+ // TODO: unknown elements should not be skipped entirely, but
+--
+1.8.3.1
+
diff --git a/external/libebook/UnpackedTarball_libebook.mk b/external/libebook/UnpackedTarball_libebook.mk
index 555837b..3cf21e6 100644
--- a/external/libebook/UnpackedTarball_libebook.mk
+++ b/external/libebook/UnpackedTarball_libebook.mk
@@ -11,4 +11,10 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libebook))
$(eval $(call gb_UnpackedTarball_set_tarball,libebook,$(EBOOK_TARBALL)))
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,1))
+
+$(eval $(call gb_UnpackedTarball_add_patches,libebook,\
+ external/libebook/0001-Fix-crash-on-abi2010-1.doc-example.patch \
+))
+
# vim: set noet sw=4 ts=4:
commit 8fe3c0bd644b963284d535175f61e457a25f2c61
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 28 09:43:10 2013 +0000
enable-debug in libebook if the ENABLE_DEBUG is active
Change-Id: If26bdd6ed0be59a4fff137ac3166b9d644e1aea7
diff --git a/external/libebook/ExternalProject_libebook.mk b/external/libebook/ExternalProject_libebook.mk
index 0983177..05f8566 100644
--- a/external/libebook/ExternalProject_libebook.mk
+++ b/external/libebook/ExternalProject_libebook.mk
@@ -31,7 +31,7 @@ $(call gb_ExternalProject_get_state_target,libebook,build) :
--enable-static \
--disable-shared \
--without-docs \
- --disable-debug \
+ $(if $(filter TRUE,$(ENABLE_DEBUG)),--enable-debug,--disable-debug) \
--disable-werror \
--disable-weffc \
CXXFLAGS="$(if $(filter NO,$(SYSTEM_BOOST)),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side),$(BOOST_CPPFLAGS))" \
commit 282a6fb530e3b78c1e83a9276aea0a528b9e5752
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 28 08:58:21 2013 +0000
Finish rework of QueryDeleteDlg_Impl
This reverts commit a74b3e89c9b853338506249b0fac8d5f54909de7.
Change-Id: Id670a2b66e61d3a4dceb9640d6ae34e9116691c0
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 906e341..f4d65fc 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -188,7 +188,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
if ( xNames.is() )
{
OString sDialogPosition;
- svtools::QueryDeleteResult_Impl eResult = _bConfirm ? svtools::QUERYDELETE_YES : svtools::QUERYDELETE_ALL;
+ short eResult = _bConfirm ? svtools::QUERYDELETE_YES : svtools::QUERYDELETE_ALL;
// The list of elements to delete is allowed to contain related elements: A given element may
// be the ancestor or child of another element from the list.
@@ -218,9 +218,8 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
if ( nObjectsLeft > 1 )
aDlg.EnableAllButton();
- if ( aDlg.Execute() == RET_OK )
- eResult = aDlg.GetQueryDeleteResult();
- else
+ eResult = aDlg.Execute();
+ if (eResult == svtools::QUERYDELETE_CANCEL)
return;
sDialogPosition = aDlg.GetWindowState( );
diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx
index 6135385..e617aac 100644
--- a/include/svtools/fileview.hxx
+++ b/include/svtools/fileview.hxx
@@ -225,23 +225,13 @@ enum QueryDeleteResult_Impl
class SVT_DLLPUBLIC QueryDeleteDlg_Impl : public MessageDialog
{
- PushButton* m_pYesButton;
- PushButton* m_pAllButton;
- PushButton* m_pNoButton;
-
- QueryDeleteResult_Impl m_eResult;
-
private:
-
- DECL_DLLPRIVATE_STATIC_LINK( QueryDeleteDlg_Impl, ClickLink, PushButton* );
-
+ PushButton* m_pAllButton;
public:
- QueryDeleteDlg_Impl( Window* pParent,
- const OUString& rName );
+ QueryDeleteDlg_Impl(Window* pParent, const OUString& rName);
- QueryDeleteResult_Impl GetQueryDeleteResult() const { return m_eResult; }
- void EnableAllButton() { m_pAllButton->Enable(true); }
+ void EnableAllButton() { m_pAllButton->Enable(true); }
};
}
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 32ee18b..a4f671f 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -2534,44 +2534,15 @@ void SvtFileView_Impl::SetActualFolder( const INetURLObject& rActualFolder )
namespace svtools {
-// -----------------------------------------------------------------------
-// QueryDeleteDlg_Impl
-// -----------------------------------------------------------------------
-
QueryDeleteDlg_Impl::QueryDeleteDlg_Impl(Window* pParent, const OUString& rName)
: MessageDialog(pParent, "QueryDeleteDialog", "svt/ui/querydeletedialog.ui")
- , m_eResult( QUERYDELETE_YES )
{
- get(m_pNoButton, "no");
get(m_pAllButton, "all");
- get(m_pYesButton, "yes");
-
- // Handler
- Link aLink( STATIC_LINK( this, QueryDeleteDlg_Impl, ClickLink ) );
- m_pYesButton->SetClickHdl( aLink );
- m_pAllButton->SetClickHdl( aLink );
- m_pNoButton->SetClickHdl( aLink );
// display specified texts
set_secondary_text(get_secondary_text().replaceFirst("%s", rName));
}
-// -----------------------------------------------------------------------
-
-IMPL_STATIC_LINK( QueryDeleteDlg_Impl, ClickLink, PushButton*, pBtn )
-{
- if (pBtn == pThis->m_pYesButton)
- pThis->m_eResult = QUERYDELETE_YES;
- else if ( pBtn == pThis->m_pNoButton )
- pThis->m_eResult = QUERYDELETE_NO;
- else if (pBtn == pThis->m_pAllButton)
- pThis->m_eResult = QUERYDELETE_ALL;
-
- pThis->EndDialog( RET_OK );
-
- return 0;
-}
-
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list