[Libreoffice-commits] core.git: 2 commits - sc/source sw/source sw/uiconfig
Caolán McNamara
caolanm at redhat.com
Tue Apr 3 14:43:11 UTC 2018
sc/source/filter/excel/excel.cxx | 5 -
sw/source/ui/chrdlg/break.cxx | 6 -
sw/source/ui/frmdlg/cption.cxx | 143 +++++++++++++---------------
sw/source/uibase/inc/uitool.hxx | 4
sw/source/uibase/utlui/uitool.cxx | 45 ++++++++-
sw/uiconfig/swriter/ui/captionoptions.ui | 155 +++++++++++++++----------------
6 files changed, 195 insertions(+), 163 deletions(-)
New commits:
commit 8c6e7d38eb0afeb1c1248fb03bbf241edd9e8de0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 3 12:35:11 2018 +0100
weld SwSequenceOptionDialog
Change-Id: I44571088ad6ffbb3a66acca8c3e7010a27b094b2
Reviewed-on: https://gerrit.libreoffice.org/52323
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index 14d66f1927f8..f350262e44ad 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -158,7 +158,7 @@ SwBreakDlg::SwBreakDlg(weld::Window *pParent, SwWrtShell &rS)
for (size_t i = 0; i < nCount; ++i)
{
const SwPageDesc &rPageDesc = rSh.GetPageDesc(i);
- ::InsertStringSorted(rPageDesc.GetName(), *m_xPageCollBox, 1 );
+ ::InsertStringSorted("", rPageDesc.GetName(), *m_xPageCollBox, 1 );
}
OUString aFormatName;
@@ -166,12 +166,12 @@ SwBreakDlg::SwBreakDlg(weld::Window *pParent, SwWrtShell &rS)
{
aFormatName = SwStyleNameMapper::GetUIName( i, aFormatName );
if (m_xPageCollBox->find_text(aFormatName) == -1)
- ::InsertStringSorted(aFormatName, *m_xPageCollBox, 1 );
+ ::InsertStringSorted("", aFormatName, *m_xPageCollBox, 1 );
}
//add landscape page
aFormatName = SwStyleNameMapper::GetUIName( RES_POOLPAGE_LANDSCAPE, aFormatName );
if (m_xPageCollBox->find_text(aFormatName) == -1)
- ::InsertStringSorted(aFormatName, *m_xPageCollBox, 1);
+ ::InsertStringSorted("", aFormatName, *m_xPageCollBox, 1);
CheckEnable();
m_xPageNumEdit->set_text(OUString());
}
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 5e675a3e91c5..b8860053de0c 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -41,6 +41,7 @@
#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/text/XTextFrame.hpp>
#include <comphelper/string.hxx>
+#include <vcl/weld.hxx>
#include <initui.hxx>
#include <globals.hrc>
#include <strings.hrc>
@@ -48,36 +49,41 @@
using namespace ::com::sun::star;
-class SwSequenceOptionDialog : public SvxStandardDialog
+class SwSequenceOptionDialog : public weld::GenericDialogController
{
- VclPtr<ListBox> m_pLbLevel;
- VclPtr<Edit> m_pEdDelim;
+ SwView& m_rView;
+ OUString m_aFieldTypeName;
- VclPtr<ListBox> m_pLbCharStyle;
- VclPtr<CheckBox> m_pApplyBorderAndShadowCB;
+ std::unique_ptr<weld::ComboBoxText> m_xLbLevel;
+ std::unique_ptr<weld::Entry> m_xEdDelim;
- //#i61007# order of captions
- VclPtr<ListBox> m_pLbCaptionOrder;
+ std::unique_ptr<weld::ComboBoxText> m_xLbCharStyle;
+ std::unique_ptr<weld::CheckButton> m_xApplyBorderAndShadowCB;
- SwView& rView;
- OUString aFieldTypeName;
+ //#i61007# order of captions
+ std::unique_ptr<weld::ComboBoxText> m_xLbCaptionOrder;
public:
- SwSequenceOptionDialog( vcl::Window *pParent, SwView &rV,
- const OUString& rSeqFieldType );
- virtual ~SwSequenceOptionDialog() override;
- virtual void dispose() override;
- virtual void Apply() override;
+ SwSequenceOptionDialog(weld::Window *pParent, SwView &rV, const OUString& rSeqFieldType);
+ void Apply();
- bool IsApplyBorderAndShadow() { return m_pApplyBorderAndShadowCB->IsChecked(); }
- void SetApplyBorderAndShadow( bool bSet ) { m_pApplyBorderAndShadowCB->Check(bSet); }
+ bool IsApplyBorderAndShadow() { return m_xApplyBorderAndShadowCB->get_active(); }
+ void SetApplyBorderAndShadow( bool bSet ) { m_xApplyBorderAndShadowCB->set_active(bSet); }
//#i61007# order of captions
- bool IsOrderNumberingFirst() const {return m_pLbCaptionOrder->GetSelectedEntryPos() == 1;}
- void SetOrderNumberingFirst(bool bSet) { m_pLbCaptionOrder->SelectEntryPos( bSet ? 1 : 0 ); }
+ bool IsOrderNumberingFirst() const { return m_xLbCaptionOrder->get_active() == 1; }
+ void SetOrderNumberingFirst(bool bSet) { m_xLbCaptionOrder->set_active(bSet ? 1 : 0); }
void SetCharacterStyle(const OUString& rStyle);
OUString GetCharacterStyle() const;
+
+ short execute()
+ {
+ int nRet = run();
+ if (nRet == RET_OK)
+ Apply();
+ return nRet;
+ }
};
OUString SwCaptionDialog::our_aSepTextSave(": "); // Caption separator text
@@ -285,22 +291,22 @@ void SwCaptionDialog::Apply()
our_aSepTextSave = m_pSepEdit->GetText();
}
-IMPL_LINK( SwCaptionDialog, OptionHdl, Button*, pButton, void )
+IMPL_LINK_NOARG( SwCaptionDialog, OptionHdl, Button*, void )
{
OUString sFieldTypeName = m_pCategoryBox->GetText();
if(sFieldTypeName == m_sNone)
sFieldTypeName.clear();
- ScopedVclPtrInstance< SwSequenceOptionDialog > aDlg( pButton, rView, sFieldTypeName );
- aDlg->SetApplyBorderAndShadow(bCopyAttributes);
- aDlg->SetCharacterStyle( sCharacterStyle );
- aDlg->SetOrderNumberingFirst( bOrderNumberingFirst );
- aDlg->Execute();
- bCopyAttributes = aDlg->IsApplyBorderAndShadow();
- sCharacterStyle = aDlg->GetCharacterStyle();
+ SwSequenceOptionDialog aDlg(GetFrameWeld(), rView, sFieldTypeName);
+ aDlg.SetApplyBorderAndShadow(bCopyAttributes);
+ aDlg.SetCharacterStyle( sCharacterStyle );
+ aDlg.SetOrderNumberingFirst( bOrderNumberingFirst );
+ aDlg.execute();
+ bCopyAttributes = aDlg.IsApplyBorderAndShadow();
+ sCharacterStyle = aDlg.GetCharacterStyle();
//#i61007# order of captions
- if( bOrderNumberingFirst != aDlg->IsOrderNumberingFirst() )
+ if( bOrderNumberingFirst != aDlg.IsOrderNumberingFirst() )
{
- bOrderNumberingFirst = aDlg->IsOrderNumberingFirst();
+ bOrderNumberingFirst = aDlg.IsOrderNumberingFirst();
SW_MOD()->GetModuleConfig()->SetCaptionOrderNumberingFirst(bOrderNumberingFirst);
ApplyCaptionOrder();
}
@@ -433,28 +439,26 @@ void SwCaptionDialog::dispose()
SvxStandardDialog::dispose();
}
-SwSequenceOptionDialog::SwSequenceOptionDialog( vcl::Window *pParent, SwView &rV,
- const OUString& rSeqFieldType )
- : SvxStandardDialog( pParent, "CaptionOptionsDialog", "modules/swriter/ui/captionoptions.ui" ),
- rView( rV ),
- aFieldTypeName( rSeqFieldType )
+SwSequenceOptionDialog::SwSequenceOptionDialog(weld::Window *pParent, SwView &rV, const OUString& rSeqFieldType )
+ : GenericDialogController(pParent, "modules/swriter/ui/captionoptions.ui", "CaptionOptionsDialog")
+ , m_rView(rV)
+ , m_aFieldTypeName(rSeqFieldType)
+ , m_xLbLevel(m_xBuilder->weld_combo_box_text("level"))
+ , m_xEdDelim(m_xBuilder->weld_entry("separator"))
+ , m_xLbCharStyle(m_xBuilder->weld_combo_box_text("style"))
+ , m_xApplyBorderAndShadowCB(m_xBuilder->weld_check_button("border_and_shadow"))
+ , m_xLbCaptionOrder(m_xBuilder->weld_combo_box_text("caption_order"))
{
- get(m_pLbLevel, "level");
- get(m_pEdDelim, "separator");
- get(m_pLbCharStyle, "style");
- get(m_pApplyBorderAndShadowCB, "border_and_shadow");
- get(m_pLbCaptionOrder, "caption_order");
-
- SwWrtShell &rSh = rView.GetWrtShell();
+ SwWrtShell &rSh = m_rView.GetWrtShell();
const OUString sNone(SwResId(SW_STR_NONE));
- m_pLbLevel->InsertEntry(sNone);
- for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
- m_pLbLevel->InsertEntry( OUString::number(n+1) );
+ m_xLbLevel->append_text(sNone);
+ for (sal_uInt16 n = 0; n < MAXLEVEL; ++n)
+ m_xLbLevel->append_text(OUString::number(n + 1));
SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(rSh.GetFieldType(
- SwFieldIds::SetExp, aFieldTypeName ));
+ SwFieldIds::SetExp, m_aFieldTypeName ));
sal_Unicode nLvl = MAXLEVEL;
OUString sDelim(": ");
@@ -464,38 +468,22 @@ SwSequenceOptionDialog::SwSequenceOptionDialog( vcl::Window *pParent, SwView &rV
nLvl = pFieldType->GetOutlineLvl();
}
- m_pLbLevel->SelectEntryPos( nLvl < MAXLEVEL ? nLvl + 1 : 0 );
- m_pEdDelim->SetText(sDelim);
-
- m_pLbCharStyle->InsertEntry(sNone);
- ::FillCharStyleListBox( *m_pLbCharStyle, rView.GetDocShell(), true, true );
- m_pLbCharStyle->SelectEntryPos( 0 );
-}
-
-SwSequenceOptionDialog::~SwSequenceOptionDialog()
-{
- disposeOnce();
-}
+ m_xLbLevel->set_active(nLvl < MAXLEVEL ? nLvl + 1 : 0);
+ m_xEdDelim->set_text(sDelim);
-void SwSequenceOptionDialog::dispose()
-{
- m_pLbLevel.clear();
- m_pEdDelim.clear();
- m_pLbCharStyle.clear();
- m_pApplyBorderAndShadowCB.clear();
- m_pLbCaptionOrder.clear();
- SvxStandardDialog::dispose();
+ m_xLbCharStyle->append_text(sNone);
+ ::FillCharStyleListBox(*m_xLbCharStyle, m_rView.GetDocShell(), true, true);
+ m_xLbCharStyle->set_active(0);
}
-
void SwSequenceOptionDialog::Apply()
{
- SwWrtShell &rSh = rView.GetWrtShell();
+ SwWrtShell &rSh = m_rView.GetWrtShell();
SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(rSh.GetFieldType(
- SwFieldIds::SetExp, aFieldTypeName ));
+ SwFieldIds::SetExp, m_aFieldTypeName ));
- sal_Int8 nLvl = static_cast<sal_Int8>( m_pLbLevel->GetSelectedEntryPos() - 1);
- sal_Unicode cDelim = m_pEdDelim->GetText()[0];
+ sal_Int8 nLvl = static_cast<sal_Int8>(m_xLbLevel->get_active() - 1);
+ sal_Unicode cDelim = m_xEdDelim->get_text()[0];
bool bUpdate = true;
if( pFieldType )
@@ -503,10 +491,10 @@ void SwSequenceOptionDialog::Apply()
pFieldType->SetDelimiter( OUString(cDelim) );
pFieldType->SetOutlineLvl( nLvl );
}
- else if( !aFieldTypeName.isEmpty() && nLvl < MAXLEVEL )
+ else if( !m_aFieldTypeName.isEmpty() && nLvl < MAXLEVEL )
{
// then we have to insert that
- SwSetExpFieldType aFieldType( rSh.GetDoc(), aFieldTypeName, nsSwGetSetExpType::GSE_SEQ );
+ SwSetExpFieldType aFieldType( rSh.GetDoc(), m_aFieldTypeName, nsSwGetSetExpType::GSE_SEQ );
aFieldType.SetDelimiter( OUString(cDelim) );
aFieldType.SetOutlineLvl( nLvl );
rSh.InsertFieldType( aFieldType );
@@ -520,15 +508,18 @@ void SwSequenceOptionDialog::Apply()
OUString SwSequenceOptionDialog::GetCharacterStyle() const
{
- if(m_pLbCharStyle->GetSelectedEntryPos())
- return m_pLbCharStyle->GetSelectedEntry();
+ if (m_xLbCharStyle->get_active() != -1)
+ return m_xLbCharStyle->get_active_text();
return OUString();
}
-void SwSequenceOptionDialog::SetCharacterStyle(const OUString& rStyle)
+void SwSequenceOptionDialog::SetCharacterStyle(const OUString& rStyle)
{
- m_pLbCharStyle->SelectEntryPos(0);
- m_pLbCharStyle->SelectEntry(rStyle);
+ const int nPos = m_xLbCharStyle->find_text(rStyle);
+ if (nPos == -1)
+ m_xLbCharStyle->set_active(0);
+ else
+ m_xLbCharStyle->set_active(nPos);
}
// #i61007# order of captions
diff --git a/sw/source/uibase/inc/uitool.hxx b/sw/source/uibase/inc/uitool.hxx
index ec42b067593f..54f2268a7cfe 100644
--- a/sw/source/uibase/inc/uitool.hxx
+++ b/sw/source/uibase/inc/uitool.hxx
@@ -21,6 +21,7 @@
#include <tools/wintypes.hxx>
#include <vcl/field.hxx>
+#include <vcl/weld.hxx>
#include <swtypes.hxx>
#include <swdllapi.h>
@@ -86,10 +87,11 @@ void SetApplyCharUnit(bool bApplyChar, bool bWeb);
// fill ListBox with all char style templates, except the standard ones
SW_DLLPUBLIC void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted = false, bool bWithDefault = false);
+SW_DLLPUBLIC void FillCharStyleListBox(weld::ComboBoxText& rToFill, SwDocShell* pDocSh, bool bSorted = false, bool bWithDefault = false);
//inserts a string sorted into a ListBox,
SW_DLLPUBLIC sal_Int32 InsertStringSorted(const OUString& rEntry, ListBox& rToFill, sal_Int32 nOffset);
-SW_DLLPUBLIC void InsertStringSorted(const OUString& rEntry, weld::ComboBoxText& rToFill, int nOffset);
+SW_DLLPUBLIC void InsertStringSorted(const OUString& rId, const OUString& rEntry, weld::ComboBoxText& rToFill, int nOffset);
// Get table width and alignment
SwTwips GetTableWidth( SwFrameFormat const * pFormat, SwTabCols const & rCols, sal_uInt16 *pPercent,
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index 04a175077474..e2b19a3b2575 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -678,7 +678,7 @@ sal_Int32 InsertStringSorted(const OUString& rEntry, ListBox& rToFill, sal_Int32
return rToFill.InsertEntry(rEntry, nOffset);
}
-void InsertStringSorted(const OUString& rEntry, weld::ComboBoxText& rToFill, int nOffset)
+void InsertStringSorted(const OUString& rId, const OUString& rEntry, weld::ComboBoxText& rToFill, int nOffset)
{
CollatorWrapper& rCaseColl = ::GetAppCaseCollator();
const int nCount = rToFill.get_count();
@@ -688,7 +688,7 @@ void InsertStringSorted(const OUString& rEntry, weld::ComboBoxText& rToFill, int
break;
++nOffset;
}
- rToFill.insert_text(nOffset, rEntry);
+ rToFill.insert(nOffset, rId, rEntry);
}
void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted, bool bWithDefault)
@@ -730,6 +730,47 @@ void FillCharStyleListBox(ListBox& rToFill, SwDocShell* pDocSh, bool bSorted, bo
}
};
+void FillCharStyleListBox(weld::ComboBoxText& rToFill, SwDocShell* pDocSh, bool bSorted, bool bWithDefault)
+{
+ const int nOffset = rToFill.get_count() > 0 ? 1 : 0;
+ SfxStyleSheetBasePool* pPool = pDocSh->GetStyleSheetPool();
+ pPool->SetSearchMask(SfxStyleFamily::Char);
+ SwDoc* pDoc = pDocSh->GetDoc();
+ const SfxStyleSheetBase* pBase = pPool->First();
+ OUString sStandard;
+ SwStyleNameMapper::FillUIName( RES_POOLCOLL_STANDARD, sStandard );
+ while(pBase)
+ {
+ if(bWithDefault || pBase->GetName() != sStandard)
+ {
+ sal_IntPtr nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( pBase->GetName(), SwGetPoolIdFromName::ChrFmt );
+ OUString sId(OUString::number(nPoolId));
+ if (bSorted)
+ InsertStringSorted(sId, pBase->GetName(), rToFill, nOffset);
+ else
+ rToFill.append(sId, pBase->GetName());
+ }
+ pBase = pPool->Next();
+ }
+ // non-pool styles
+ const SwCharFormats* pFormats = pDoc->GetCharFormats();
+ for(size_t i = 0; i < pFormats->size(); ++i)
+ {
+ const SwCharFormat* pFormat = (*pFormats)[i];
+ if(pFormat->IsDefault())
+ continue;
+ const OUString& rName = pFormat->GetName();
+ if (rToFill.find_text(rName) == -1)
+ {
+ OUString sId(OUString::number(USHRT_MAX));
+ if (bSorted)
+ InsertStringSorted(sId, rName, rToFill, nOffset);
+ else
+ rToFill.append(sId, rName);
+ }
+ }
+};
+
SwTwips GetTableWidth( SwFrameFormat const * pFormat, SwTabCols const & rCols, sal_uInt16 *pPercent,
SwWrtShell* pSh )
{
diff --git a/sw/uiconfig/swriter/ui/captionoptions.ui b/sw/uiconfig/swriter/ui/captionoptions.ui
index d234f256473b..10f05f316588 100644
--- a/sw/uiconfig/swriter/ui/captionoptions.ui
+++ b/sw/uiconfig/swriter/ui/captionoptions.ui
@@ -1,31 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.4 -->
<interface domain="sw">
<requires lib="gtk+" version="3.18"/>
- <object class="GtkListStore" id="liststore1">
- <columns>
- <!-- column-name gchararray1 -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes" context="captionoptions|liststore1">Category first</col>
- </row>
- <row>
- <col id="0" translatable="yes" context="captionoptions|liststore1">Numbering first</col>
- </row>
- </data>
- </object>
<object class="GtkDialog" id="CaptionOptionsDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" context="captionoptions|CaptionOptionsDialog">Caption Options</property>
+ <property name="modal">True</property>
+ <property name="default_width">0</property>
+ <property name="default_height">0</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ <property name="secondary">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
@@ -55,7 +101,7 @@
<property name="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
- <object class="GtkComboBox" id="level">
+ <object class="GtkComboBoxText" id="level">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
@@ -80,10 +126,10 @@
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
<property name="label" translatable="yes" context="captionoptions|label5">_Level:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">level</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -94,10 +140,10 @@
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
<property name="label" translatable="yes" context="captionoptions|label6">_Separator:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">separator</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -149,10 +195,10 @@
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
<property name="label" translatable="yes" context="captionoptions|label4">Character style:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">style</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -160,7 +206,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="style">
+ <object class="GtkComboBoxText" id="style">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
@@ -232,10 +278,10 @@
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
<property name="label" translatable="yes" context="captionoptions|label7">Caption order:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">caption_order</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -243,11 +289,14 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="caption_order">
+ <object class="GtkComboBoxText" id="caption_order">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
- <property name="model">liststore1</property>
+ <items>
+ <item translatable="yes" context="captionoptions|liststore1">Category first</item>
+ <item translatable="yes" context="captionoptions|liststore1">Numbering first</item>
+ </items>
</object>
<packing>
<property name="left_attach">1</property>
@@ -282,63 +331,6 @@
<property name="position">0</property>
</packing>
</child>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="ok">
- <property name="label">gtk-ok</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="cancel">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="help">
- <property name="label">gtk-help</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
- <property name="secondary">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
- </packing>
- </child>
</object>
</child>
<action-widgets>
@@ -346,6 +338,9 @@
<action-widget response="-6">cancel</action-widget>
<action-widget response="-11">help</action-widget>
</action-widgets>
+ <child>
+ <placeholder/>
+ </child>
</object>
<object class="GtkSizeGroup" id="sizegroup1">
<widgets>
commit 98553da6b8bc0e8038310f82213f4cf9d47005db
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Apr 3 13:48:01 2018 +0100
ofz#7334 catch mdds exception
Change-Id: I4c52b07893f60765d730267c3becbfe5d2ada6ae
Reviewed-on: https://gerrit.libreoffice.org/52322
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index ca7983a21891..cd09f365b844 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -262,7 +262,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportXLS(SvStream& rStream)
{
bRet = ScFormatFilter::Get().ScImportExcel(aMedium, &rDoc, EIF_AUTO) == ERRCODE_NONE;
}
- catch (const css::ucb::ContentCreationException &)
+ catch (const css::ucb::ContentCreationException&)
+ {
+ }
+ catch (const std::out_of_range&)
{
}
xDocShell->DoClose();
More information about the Libreoffice-commits
mailing list