[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - 2 commits - basctl/source svx/source
Julien Nabet
serval2412 at yahoo.fr
Mon Jun 18 12:32:43 UTC 2018
basctl/source/basicide/macrodlg.cxx | 15 ++++++++++++++-
svx/source/fmcomp/gridcell.cxx | 14 +++++++++++++-
2 files changed, 27 insertions(+), 2 deletions(-)
New commits:
commit 5c213d9f59a131fc80f9b6258771f6df6267041e
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat May 26 22:38:24 2018 +0200
tdf#117825: check if macros are allowed when double-click one
Change-Id: I4ebb38bdac543995ee7e73dbd67ff5f1402d1a0a
Reviewed-on: https://gerrit.libreoffice.org/54867
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 7667dda435b2671f1d78e967669fa0fe725b5af6)
Reviewed-on: https://gerrit.libreoffice.org/55212
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 986dfecb635e..ca0b9161de7d 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -460,10 +460,23 @@ void MacroChooser::CheckButtons()
IMPL_LINK_NOARG(MacroChooser, MacroDoubleClickHdl, SvTreeListBox*, bool)
{
+ SbMethod* pMethod = GetMacro();
+ SbModule* pModule = pMethod ? pMethod->GetModule() : nullptr;
+ StarBASIC* pBasic = pModule ? static_cast<StarBASIC*>(pModule->GetParent()) : nullptr;
+ BasicManager* pBasMgr = pBasic ? FindBasicManager(pBasic) : nullptr;
+ ScriptDocument aDocument(ScriptDocument::getDocumentForBasicManager(pBasMgr));
+ if (aDocument.isDocument() && !aDocument.allowMacros())
+ {
+ std::unique_ptr<weld::MessageDialog> xError(
+ Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Warning,
+ VclButtonsType::Ok, IDEResId(RID_STR_CANNOTRUNMACRO)));
+ xError->run();
+ return false;
+ }
+
StoreMacroDescription();
if (nMode == Recording)
{
- SbMethod* pMethod = GetMacro();
if (pMethod && !QueryReplaceMacro(pMethod->GetName(), GetFrameWeld()))
return false;
}
commit 00d244e984589697e9f4d5743ec08e963327e3b9
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Thu Jun 14 23:49:11 2018 +0200
tdf#118022: fix crash when searching record in form by handling SQLException
See https://bugs.documentfoundation.org/attachment.cgi?id=142760
Found thanks on gdb with command
catch throw com::sun::star::sdbc::SQLException
First SQLException was dealt but not the second one
Change-Id: I7d5d3ad612db132a3bda97cff14367912ae885f9
Reviewed-on: https://gerrit.libreoffice.org/55836
(cherry picked from commit f94292e8c4d469bd3123e1649b0f2a94d4b357b3)
Reviewed-on: https://gerrit.libreoffice.org/55852
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 8767b3efb0b5..222267f4b85e 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1150,10 +1150,22 @@ void DbTextField::PaintFieldToCell( OutputDevice& _rDev, const tools::Rectangle&
OUString DbTextField::GetFormatText(const Reference< XColumn >& _rxField, const Reference< XNumberFormatter >& xFormatter, Color** /*ppColor*/)
{
+ if (!_rxField.is())
+ return OUString();
+
const css::uno::Reference<css::beans::XPropertySet> xPS(_rxField, UNO_QUERY);
FormattedColumnValue fmter( xFormatter, xPS );
- return fmter.getFormattedValue();
+ try
+ {
+ return fmter.getFormattedValue();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION("svx");
+ }
+ return OUString();
+
}
More information about the Libreoffice-commits
mailing list