31 std::unique_ptr<SwTableAutoFormat>& prTAFormat )
49 rAutoName = prTAFormat->GetName();
57 rTest = m_aTextFilter.filter(rTest);
63 , m_aTextFilter(
" .<>")
65 , m_nEnteredValRepeatHeaderNF(-1)
66 , m_xNameEdit(m_xBuilder->weld_entry(
"nameedit"))
67 , m_xWarning(m_xBuilder->weld_label(
"lbwarning"))
68 , m_xColSpinButton(m_xBuilder->weld_spin_button(
"colspin"))
69 , m_xRowSpinButton(m_xBuilder->weld_spin_button(
"rowspin"))
70 , m_xHeaderCB(m_xBuilder->weld_check_button(
"headercb"))
71 , m_xRepeatHeaderCB(m_xBuilder->weld_check_button(
"repeatcb"))
72 , m_xRepeatHeaderNF(m_xBuilder->weld_spin_button(
"repeatheaderspin"))
73 , m_xRepeatGroup(m_xBuilder->weld_widget(
"repeatgroup"))
74 , m_xDontSplitCB(m_xBuilder->weld_check_button(
"dontsplitcb"))
75 , m_xInsertBtn(m_xBuilder->weld_button(
"ok"))
76 , m_xLbFormat(m_xBuilder->weld_tree_view(
"formatlbinstable"))
77 , m_xWndPreview(new
weld::CustomWeld(*m_xBuilder,
"previewinstable", m_aWndPreview))
78 , m_xStyleFrame(m_xBuilder->weld_frame(
"stylesframe"))
83 const int nWidth =
m_xLbFormat->get_approximate_digit_width() * 32;
84 const int nHeight =
m_xLbFormat->get_height_rows(8);
176 pTableAutoFormat->
SetFont( bVal );
187 m_lbIndex =
static_cast<sal_uInt8>(m_xLbFormat->get_selected_index());
188 m_tbIndex = lbIndexToTableIndex( m_lbIndex );
192 if( m_tbIndex < 255 )
193 m_aWndPreview.NotifyChange( (*m_xTableTable)[m_tbIndex] );
199 m_aWndPreview.NotifyChange( aTmp );
205 if( m_tbIndex < 255 )
206 m_pShell->SetTableStyle((*m_xTableTable)[m_tbIndex]);
208 if( m_tbIndex < 255 )
211 *m_xTAutoFormat = (*m_xTableTable)[ m_tbIndex ];
226 OUString sTableName = rEdit.get_text();
227 m_xInsertBtn->set_sensitive(
m_pShell->GetTableStyle(sTableName) ==
nullptr);
240 sal_Int64 nRow = m_xRowSpinButton->get_text().toInt64();
241 sal_Int64 nCol = m_xColSpinButton->get_text().toInt64();
245 m_xWarning->set_visible(
true);
254 m_xWarning->set_visible(
true);
260 if (nRow <= 255 && nCol <= 63)
262 m_xWarning->set_visible(
false);
264 if (&rEdit == m_xColSpinButton.get())
271 sal_Int64 nMax = ( nRow == 1 )? 1 : nRow - 1 ;
272 sal_Int64 nActVal = m_xRepeatHeaderNF->get_value();
274 m_xRepeatHeaderNF->set_max( nMax );
277 m_xRepeatHeaderNF->set_value( nMax );
278 else if( nActVal < m_nEnteredValRepeatHeaderNF )
279 m_xRepeatHeaderNF->set_value(
std::min(m_nEnteredValRepeatHeaderNF, nMax));
284 m_xRepeatHeaderCB->set_sensitive(m_xHeaderCB->get_active());
285 RepeatHeaderCheckBoxHdl(*m_xRepeatHeaderCB);
290 m_xRepeatGroup->set_sensitive(m_xHeaderCB->get_active() && m_xRepeatHeaderCB->get_active());
295 m_nEnteredValRepeatHeaderNF = m_xRepeatHeaderNF->get_value();
Reference< XExecutableDialog > m_xDialog
OUString GetUniqueTableName() const
std::unique_ptr< weld::SpinButton > m_xRowSpinButton
sal_uInt8 minTableIndexInLb
std::unique_ptr< weld::Entry > m_xNameEdit
std::unique_ptr< weld::Label > m_xWarning
std::unique_ptr< weld::SpinButton > m_xColSpinButton
std::unique_ptr< weld::CheckButton > m_xDontSplitCB
std::unique_ptr< weld::CustomWeld > m_xWndPreview
std::unique_ptr< weld::CheckButton > m_xHeaderCB
SwInsTableDlg(SwView &rView)
std::unique_ptr< weld::Button > m_xInsertBtn
std::unique_ptr< weld::SpinButton > m_xRepeatHeaderNF
std::unique_ptr< SwTableAutoFormat > m_xTAutoFormat
std::unique_ptr< weld::Frame > m_xStyleFrame
sal_uInt8 maxTableIndexInLb
AutoFormatPreview m_aWndPreview
std::unique_ptr< SwTableAutoFormatTable > m_xTableTable
void InitAutoTableFormat()
std::unique_ptr< weld::CheckButton > m_xRepeatHeaderCB
sal_uInt8 lbIndexToTableIndex(const sal_uInt8 listboxIndex)
void GetValues(OUString &rName, sal_uInt16 &rRow, sal_uInt16 &rCol, SwInsertTableOptions &rInsTableOpts, OUString &rTableAutoFormatName, std::unique_ptr< SwTableAutoFormat > &prTAFormat)
std::unique_ptr< weld::TreeView > m_xLbFormat
const SwInsertTableOptions & GetInsTableFlags(bool bHTML) const
static ShellResource * GetShellRes()
SwDocShell * GetDocShell()
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
IMPL_LINK(SwInsTableDlg, TextFilterHdl, OUString &, rTest, bool)
IMPL_LINK_NOARG(SwInsTableDlg, SelFormatHdl, weld::TreeView &, void)
static void lcl_SetProperties(SwTableAutoFormat *pTableAutoFormat, bool bVal)
#define LINK(Instance, Class, Member)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
sal_uInt16 mnRowsToRepeat
SwInsertTableFlags mnInsMode
sal_uInt16 GetHtmlMode(const SwDocShell *pShell)