LibreOffice Module sw (master) 1
optload.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <officecfg/Office/Writer.hxx>
21#include <comphelper/string.hxx>
22#include <swtypes.hxx>
23#include <uiitems.hxx>
24#include <modcfg.hxx>
25#include <swmodule.hxx>
26#include <usrpref.hxx>
27#include <wrtsh.hxx>
28#include <linkenum.hxx>
29#include <uitool.hxx>
30#include <view.hxx>
31
32#include <strings.hrc>
33#include <optload.hrc>
34#include <cmdid.h>
35
36#include <optload.hxx>
37#include <sfx2/htmlmode.hxx>
38#include <fldmgr.hxx>
39#include <poolfmt.hxx>
40#include <expfld.hxx>
41
42#include <svtools/insdlg.hxx>
43#include <svtools/unitconv.hxx>
44#include <tools/resary.hxx>
45#include <vcl/settings.hxx>
46
49#include <SwStyleNameMapper.hxx>
50#include <numrule.hxx>
51
52#include <doc.hxx>
53#include <svl/cjkoptions.hxx>
54
55using namespace ::com::sun::star;
56
57#include <svl/eitem.hxx>
58
60{
61 return SAL_N_ELEMENTS(STR_ARR_METRIC);
62}
63
64OUString SwFieldUnitTable::GetString(sal_uInt32 nPos)
65{
67 return SwResId(STR_ARR_METRIC[nPos].first);
68 return OUString();
69}
70
72{
74 return STR_ARR_METRIC[nPos].second;
75 return FieldUnit::NONE;
76}
77
79 : SfxTabPage(pPage, pController, "modules/swriter/ui/optgeneralpage.ui", "OptGeneralPage", &rSet)
80 , m_pWrtShell(nullptr)
81 , m_nLastTab(0)
82 , m_nOldLinkMode(MANUAL)
83 , m_xAlwaysRB(m_xBuilder->weld_radio_button("always"))
84 , m_xRequestRB(m_xBuilder->weld_radio_button("onrequest"))
85 , m_xNeverRB(m_xBuilder->weld_radio_button("never"))
86 , m_xAutoUpdateFields(m_xBuilder->weld_check_button("updatefields"))
87 , m_xAutoUpdateCharts(m_xBuilder->weld_check_button("updatecharts"))
88 , m_xMetricLB(m_xBuilder->weld_combo_box("metric"))
89 , m_xTabFT(m_xBuilder->weld_label("tablabel"))
90 , m_xTabMF(m_xBuilder->weld_metric_spin_button("tab", FieldUnit::CM))
91 , m_xUseSquaredPageMode(m_xBuilder->weld_check_button("squaremode"))
92 , m_xUseCharUnit(m_xBuilder->weld_check_button("usecharunit"))
93 , m_xWordCountED(m_xBuilder->weld_entry("wordcount"))
94 , m_xShowStandardizedPageCount(m_xBuilder->weld_check_button("standardizedpageshow"))
95 , m_xStandardizedPageSizeNF(m_xBuilder->weld_spin_button("standardpagesize"))
96{
97 for (sal_uInt32 i = 0; i < SwFieldUnitTable::Count(); ++i)
98 {
99 const OUString sMetric = SwFieldUnitTable::GetString(i);
101
102 switch ( eFUnit )
103 {
104 case FieldUnit::MM:
105 case FieldUnit::CM:
106 case FieldUnit::POINT:
107 case FieldUnit::PICA:
108 case FieldUnit::INCH:
109 {
110 // use only these metrics
111 m_xMetricLB->append(OUString::number(static_cast<sal_uInt32>(eFUnit)), sMetric);
112 break;
113 }
114 default:; //prevent warning
115 }
116 }
117 m_xMetricLB->connect_changed(LINK(this, SwLoadOptPage, MetricHdl));
118
119 const SfxUInt16Item* pItem = rSet.GetItemIfSet(SID_HTML_MODE, false);
120 if (pItem && pItem->GetValue() & HTMLMODE_ON)
121 {
122 m_xTabFT->hide();
123 m_xTabMF->hide();
124 }
125
127 {
128 m_xUseSquaredPageMode->hide();
129 m_xUseCharUnit->hide();
130 }
131
132 m_xShowStandardizedPageCount->connect_toggled(LINK(this, SwLoadOptPage, StandardizedPageCountCheckHdl));
133}
134
136{
137}
138
139std::unique_ptr<SfxTabPage> SwLoadOptPage::Create( weld::Container* pPage, weld::DialogController* pController,
140 const SfxItemSet* rAttrSet )
141{
142 return std::make_unique<SwLoadOptPage>(pPage, pController, *rAttrSet );
143}
144
145IMPL_LINK_NOARG(SwLoadOptPage, StandardizedPageCountCheckHdl, weld::Toggleable&, void)
146{
147 m_xStandardizedPageSizeNF->set_sensitive(m_xShowStandardizedPageCount->get_active());
148}
149
151{
152 bool bRet = false;
153 SwModule* pMod = SW_MOD();
154
155 sal_Int32 nNewLinkMode = AUTOMATIC;
156 if (m_xNeverRB->get_active())
157 nNewLinkMode = NEVER;
158 else if (m_xRequestRB->get_active())
159 nNewLinkMode = MANUAL;
160
161 SwFieldUpdateFlags eFieldFlags = m_xAutoUpdateFields->get_active() ?
163
164 if (m_xAutoUpdateFields->get_state_changed_from_saved() ||
165 m_xAutoUpdateCharts->get_state_changed_from_saved())
166 {
167 pMod->ApplyFieldUpdateFlags(eFieldFlags);
168 if(m_pWrtShell)
169 {
170 m_pWrtShell->SetFieldUpdateFlags(eFieldFlags);
172 }
173 }
174
175 if (nNewLinkMode != m_nOldLinkMode)
176 {
177 pMod->ApplyLinkMode(nNewLinkMode);
178 if (m_pWrtShell)
179 {
180 m_pWrtShell->SetLinkUpdMode( nNewLinkMode );
182 }
183
184 bRet = true;
185 }
186
187 const sal_Int32 nMPos = m_xMetricLB->get_active();
188 if (m_xMetricLB->get_value_changed_from_saved())
189 {
190 // Double-Cast for VA3.0
191 const sal_uInt16 nFieldUnit = m_xMetricLB->get_id(nMPos).toUInt32();
192 rSet->Put( SfxUInt16Item( SID_ATTR_METRIC, nFieldUnit ) );
193 bRet = true;
194 }
195
196 if (m_xTabMF->get_visible() && m_xTabMF->get_value_changed_from_saved())
197 {
198 rSet->Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP,
199 o3tl::narrowing<sal_uInt16>(m_xTabMF->denormalize(m_xTabMF->get_value(FieldUnit::TWIP)))));
200 bRet = true;
201 }
202
203 bool bIsUseCharUnitFlag = m_xUseCharUnit->get_active();
204 bIsUseCharUnitFlag = bIsUseCharUnitFlag && SvtCJKOptions::IsAsianTypographyEnabled();
205 if( (bIsUseCharUnitFlag ? 1 : 0) != m_xUseCharUnit->get_saved_state())
206 {
207 rSet->Put(SfxBoolItem(SID_ATTR_APPLYCHARUNIT, bIsUseCharUnitFlag ));
208 bRet = true;
209 }
210
211 if (m_xWordCountED->get_value_changed_from_saved())
212 {
213 std::shared_ptr< comphelper::ConfigurationChanges > batch(
215 officecfg::Office::Writer::WordCount::AdditionalSeparators::set(m_xWordCountED->get_text(), batch);
216 batch->commit();
217 bRet = true;
218 }
219
220 if (m_xShowStandardizedPageCount->get_state_changed_from_saved())
221 {
222 std::shared_ptr< comphelper::ConfigurationChanges > batch(
224 officecfg::Office::Writer::WordCount::ShowStandardizedPageCount::set(
225 m_xShowStandardizedPageCount->get_active(),
226 batch);
227 batch->commit();
228 bRet = true;
229 }
230
231 if (m_xStandardizedPageSizeNF->get_value_changed_from_saved())
232 {
233 std::shared_ptr< comphelper::ConfigurationChanges > batch(
235 officecfg::Office::Writer::WordCount::StandardizedPageSize::set(
236 m_xStandardizedPageSizeNF->get_value(),
237 batch);
238 batch->commit();
239 bRet = true;
240 }
241
242 if (m_xUseSquaredPageMode->get_state_changed_from_saved())
243 {
244 bool bIsSquaredPageModeFlag = m_xUseSquaredPageMode->get_active();
245 pMod->ApplyDefaultPageMode( bIsSquaredPageModeFlag );
246 if ( m_pWrtShell )
247 {
248 SwDoc* pDoc = m_pWrtShell->GetDoc();
249 pDoc->SetDefaultPageMode( bIsSquaredPageModeFlag );
251 }
252 bRet = true;
253 }
254
255 return bRet;
256}
257
259{
260 const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref(false);
261 const SwPtrItem* pShellItem = rSet->GetItemIfSet(FN_PARAM_WRTSHELL, false);
262
263 if(pShellItem)
264 m_pWrtShell = static_cast<SwWrtShell*>(pShellItem->GetValue());
265
268 if (m_pWrtShell)
269 {
270 eFieldFlags = m_pWrtShell->GetFieldUpdateFlags();
272 }
274 m_nOldLinkMode = pUsrPref->GetUpdateLinkMode();
275 if(AUTOUPD_GLOBALSETTING == eFieldFlags)
276 eFieldFlags = pUsrPref->GetFieldUpdateFlags();
277
278 m_xAutoUpdateFields->set_active(eFieldFlags != AUTOUPD_OFF);
279 m_xAutoUpdateCharts->set_active(eFieldFlags == AUTOUPD_FIELD_AND_CHARTS);
280
281 switch (m_nOldLinkMode)
282 {
283 case NEVER: m_xNeverRB->set_active(true); break;
284 case MANUAL: m_xRequestRB->set_active(true); break;
285 case AUTOMATIC: m_xAlwaysRB->set_active(true); break;
286 }
287
288 m_xAutoUpdateFields->save_state();
289 m_xAutoUpdateCharts->save_state();
290 m_xMetricLB->set_active(-1);
291 if ( rSet->GetItemState( SID_ATTR_METRIC ) >= SfxItemState::DEFAULT )
292 {
293 const SfxUInt16Item& rItem = rSet->Get( SID_ATTR_METRIC );
294 FieldUnit eFieldUnit = static_cast<FieldUnit>(rItem.GetValue());
295
296 for (sal_Int32 i = 0, nEntryCount = m_xMetricLB->get_count(); i < nEntryCount; ++i)
297 {
298 if (m_xMetricLB->get_id(i).toUInt32() == static_cast<sal_uInt32>(eFieldUnit))
299 {
300 m_xMetricLB->set_active(i);
301 break;
302 }
303 }
304 ::SetFieldUnit(*m_xTabMF, eFieldUnit);
305 }
306 m_xMetricLB->save_value();
307 if(const SfxUInt16Item* pItem = rSet->GetItemIfSet(SID_ATTR_DEFTABSTOP, false))
308 {
309 m_nLastTab = pItem->GetValue();
310 m_xTabMF->set_value(m_xTabMF->normalize(m_nLastTab), FieldUnit::TWIP);
311 }
312 m_xTabMF->save_value();
313
314 //default page mode loading
315 if(m_pWrtShell)
316 {
317 bool bSquaredPageMode = m_pWrtShell->GetDoc()->IsSquaredPageMode();
318 m_xUseSquaredPageMode->set_active( bSquaredPageMode );
319 m_xUseSquaredPageMode->save_state();
320 }
321
322 if(const SfxBoolItem* pItem = rSet->GetItemIfSet(SID_ATTR_APPLYCHARUNIT, false))
323 {
324 bool bUseCharUnit = pItem->GetValue();
325 m_xUseCharUnit->set_active(bUseCharUnit);
326 }
327 else
328 {
329 m_xUseCharUnit->set_active(pUsrPref->IsApplyCharUnit());
330 }
331 m_xUseCharUnit->save_state();
332
334 m_xWordCountED->set_sensitive(!officecfg::Office::Writer::WordCount::AdditionalSeparators::isReadOnly());
335 m_xWordCountED->save_value();
337 m_xShowStandardizedPageCount->set_sensitive(!officecfg::Office::Writer::WordCount::ShowStandardizedPageCount::isReadOnly());
338 m_xShowStandardizedPageCount->save_state();
340 m_xStandardizedPageSizeNF->set_sensitive(!officecfg::Office::Writer::WordCount::StandardizedPageSize::isReadOnly());
341 m_xStandardizedPageSizeNF->save_value();
342 m_xStandardizedPageSizeNF->set_sensitive(m_xShowStandardizedPageCount->get_active());
343}
344
346{
347 const sal_Int32 nMPos = m_xMetricLB->get_active();
348 if(nMPos == -1)
349 return;
350
351 // Double-Cast for VA3.0
352 FieldUnit eFieldUnit = static_cast<FieldUnit>(m_xMetricLB->get_id(nMPos).toUInt32());
353 bool bModified = m_xTabMF->get_value_changed_from_saved();
354 tools::Long nVal = bModified ?
355 sal::static_int_cast<sal_Int32, sal_Int64 >( m_xTabMF->denormalize( m_xTabMF->get_value( FieldUnit::TWIP ) )) :
356 m_nLastTab;
357 ::SetFieldUnit( *m_xTabMF, eFieldUnit );
358 m_xTabMF->set_value( m_xTabMF->normalize( nVal ), FieldUnit::TWIP );
359 if (!bModified)
360 m_xTabMF->save_value();
361}
362
364 : SfxSingleTabDialogController(pParent, &rSet, "modules/swriter/ui/captiondialog.ui",
365 "CaptionDialog")
366{
367 // create TabPage
369}
370
372 : mbFontInitialized(false)
373{
374}
375
377{
378 const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings();
379 Wallpaper aBack(rSettings.GetWindowColor());
380 rRenderContext.SetBackground(aBack);
381 rRenderContext.SetFillColor(aBack.GetColor());
382 rRenderContext.SetLineColor(aBack.GetColor());
383 rRenderContext.SetTextColor(rSettings.GetWindowTextColor());
384
386 {
387 maFont = rRenderContext.GetFont();
389 mbFontInitialized = true;
390 }
391 rRenderContext.SetFont(maFont);
392}
393
394void SwCaptionPreview::SetPreviewText(const OUString& rText)
395{
396 if (rText != maText)
397 {
398 maText = rText;
399 Invalidate();
400 }
401}
402
404{
405 CustomWidgetController::SetDrawingArea(pDrawingArea);
406 Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(106 , 20), MapMode(MapUnit::MapAppFont)));
407 pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
408}
409
411{
412 ApplySettings(rRenderContext);
413
414 rRenderContext.DrawRect(tools::Rectangle(Point(0, 0), GetOutputSizePixel()));
415 rRenderContext.DrawText(Point(4, 6), maText);
416}
417
418IMPL_LINK(SwCaptionOptPage, TextFilterHdl, OUString&, rTest, bool)
419{
420 rTest = m_aTextFilter.filter(rTest);
421 return true;
422}
423
425 : SfxTabPage(pPage, pController, "modules/swriter/ui/optcaptionpage.ui", "OptCaptionPage", &rSet)
426 , m_sSWTable(SwResId(STR_CAPTION_TABLE))
427 , m_sSWFrame(SwResId(STR_CAPTION_FRAME))
428 , m_sSWGraphic(SwResId(STR_CAPTION_GRAPHIC))
429 , m_sOLE(SwResId(STR_CAPTION_OLE))
430 , m_sBegin(SwResId(STR_CAPTION_BEGINNING))
431 , m_sEnd(SwResId(STR_CAPTION_END))
432 , m_sAbove(SwResId(STR_CAPTION_ABOVE))
433 , m_sBelow(SwResId(STR_CAPTION_BELOW))
434 , m_sNone(SwResId(SW_STR_NONE))
435 , m_nPrevSelectedEntry(-1)
436 , m_pMgr(new SwFieldMgr)
437 , m_bHTMLMode(false)
438 , m_aTextFilter(m_sNone)
439 , m_xCheckLB(m_xBuilder->weld_tree_view("objects"))
440 , m_xLbCaptionOrder(m_xBuilder->weld_combo_box("captionorder"))
441 , m_xSettingsGroup(m_xBuilder->weld_widget("settings"))
442 , m_xCategoryBox(m_xBuilder->weld_combo_box("category"))
443 , m_xFormatText(m_xBuilder->weld_label("numberingft"))
444 , m_xFormatBox(m_xBuilder->weld_combo_box("numbering"))
445 , m_xNumberingSeparatorFT(m_xBuilder->weld_label("numseparatorft"))
446 , m_xNumberingSeparatorED(m_xBuilder->weld_entry("numseparator"))
447 , m_xTextText(m_xBuilder->weld_label("separatorft"))
448 , m_xTextEdit(m_xBuilder->weld_entry("separator"))
449 , m_xPosBox(m_xBuilder->weld_combo_box("position"))
450 , m_xNumCapt(m_xBuilder->weld_widget("numcaption"))
451 , m_xLbLevel(m_xBuilder->weld_combo_box("level"))
452 , m_xEdDelim(m_xBuilder->weld_entry("chapseparator"))
453 , m_xCategory(m_xBuilder->weld_widget("categoryformat"))
454 , m_xCharStyleLB(m_xBuilder->weld_combo_box("charstyle"))
455 , m_xApplyBorderCB(m_xBuilder->weld_check_button("applyborder"))
456 , m_xPreview(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreview))
457{
458 m_xCategoryBox->connect_entry_insert_text(LINK(this, SwCaptionOptPage, TextFilterHdl));
459
460 m_xCheckLB->enable_toggle_buttons(weld::ColumnToggleType::Check);
461
466
467
468 // m_xFormatBox
469 sal_uInt16 nSelFormat = SVX_NUM_ARABIC;
471
472 if (pSh)
473 {
474 for ( auto i = m_pMgr->GetFieldTypeCount(); i; )
475 {
476 SwFieldType* pFieldType = m_pMgr->GetFieldType(SwFieldIds::Unknown, --i);
477 if (!pFieldType->GetName().isEmpty()
478 && pFieldType->GetName() == m_xCategoryBox->get_active_text())
479 {
480 nSelFormat = o3tl::narrowing<sal_uInt16>(static_cast<SwSetExpFieldType*>(pFieldType)->GetSeqFormat());
481 break;
482 }
483 }
484
486 }
487
488 const sal_uInt16 nCount = m_pMgr->GetFormatCount(SwFieldTypesEnum::Sequence, false);
489 for ( sal_uInt16 i = 0; i < nCount; ++i )
490 {
491 const sal_uInt16 nFormatId = m_pMgr->GetFormatId(SwFieldTypesEnum::Sequence, i);
492 m_xFormatBox->append(OUString::number(nFormatId), m_pMgr->GetFormatStr(SwFieldTypesEnum::Sequence, i));
493 if (nFormatId == nSelFormat)
494 m_xFormatBox->set_active(i);
495 }
496
497 for (int i = 0; i < MAXLEVEL; ++i)
498 m_xLbLevel->append_text(OUString::number(i + 1));
499
500 sal_Unicode nLvl = MAXLEVEL;
501 OUString sDelim(": ");
502
503 if (pSh)
504 {
505 SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(m_pMgr->GetFieldType(
506 SwFieldIds::SetExp, m_xCategoryBox->get_active_text() ));
507 if( pFieldType )
508 {
509 sDelim = pFieldType->GetDelimiter();
510 nLvl = pFieldType->GetOutlineLvl();
511 }
512 }
513
514 m_xLbLevel->set_active(nLvl < MAXLEVEL ? nLvl + 1 : 0);
515 m_xEdDelim->set_text(sDelim);
516
517 m_xCategoryBox->connect_changed(LINK(this, SwCaptionOptPage, ModifyComboHdl));
518 Link<weld::Entry&,void> aLk = LINK(this, SwCaptionOptPage, ModifyEntryHdl);
519 m_xNumberingSeparatorED->connect_changed(aLk);
520 m_xTextEdit->connect_changed(aLk);
521
522 m_xCategoryBox->connect_changed(LINK(this, SwCaptionOptPage, SelectHdl));
523 m_xFormatBox->connect_changed(LINK(this, SwCaptionOptPage, SelectListBoxHdl));
524
525 m_xLbCaptionOrder->connect_changed(LINK(this, SwCaptionOptPage, OrderHdl));
526
527 m_xCheckLB->connect_changed(LINK(this, SwCaptionOptPage, ShowEntryHdl));
528 m_xCheckLB->connect_toggled(LINK(this, SwCaptionOptPage, ToggleEntryHdl));
529}
530
532{
533 DelUserData();
534 m_pMgr.reset();
535 m_xPreview.reset();
536}
537
538std::unique_ptr<SfxTabPage> SwCaptionOptPage::Create(weld::Container* pPage, weld::DialogController* pController,
539 const SfxItemSet* rAttrSet)
540{
541 return std::make_unique<SwCaptionOptPage>(pPage, pController, *rAttrSet);
542}
543
545{
546 bool bRet = false;
547 SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
548
549 SaveEntry(m_xCheckLB->get_selected_index()); // apply current entry
550
551 int nCheckCount = 0;
552 for (int i = 0, nCount = m_xCheckLB->n_children(); i < nCount; ++i)
553 {
554 if (m_xCheckLB->get_toggle(i) == TRISTATE_TRUE)
555 ++nCheckCount;
556 InsCaptionOpt* pData = weld::fromId<InsCaptionOpt*>(m_xCheckLB->get_id(i));
557 bRet |= pModOpt->SetCapOption(m_bHTMLMode, pData);
558 }
559
560 pModOpt->SetInsWithCaption(m_bHTMLMode, nCheckCount > 0);
561
562 int nPos = m_xLbCaptionOrder->get_active();
563 pModOpt->SetCaptionOrderNumberingFirst(nPos == 1);
564
565 return bRet;
566}
567
569{
570 if(const SfxUInt16Item* pItem = rSet->GetItemIfSet(SID_HTML_MODE, false))
571 {
572 m_bHTMLMode = 0 != (pItem->GetValue() & HTMLMODE_ON);
573 }
574
575 DelUserData();
576 m_xCheckLB->clear(); // remove all entries
577
578 // Writer objects
579 int nPos = 0;
580 m_xCheckLB->append();
581 m_xCheckLB->set_toggle(nPos, TRISTATE_FALSE);
582 m_xCheckLB->set_text(nPos, m_sSWTable, 0);
584 m_xCheckLB->append();
585 m_xCheckLB->set_toggle(nPos, TRISTATE_FALSE);
586 m_xCheckLB->set_text(nPos, m_sSWFrame, 0);
588 m_xCheckLB->append();
589 m_xCheckLB->set_toggle(nPos, TRISTATE_FALSE);
590 m_xCheckLB->set_text(nPos, m_sSWGraphic, 0);
592
593 // get Productname and -version
594 const OUString sWithoutVersion( utl::ConfigManager::getProductName() );
595 const OUString sComplete(
596 sWithoutVersion + " " +
598
599 SvObjectServerList aObjS;
600 aObjS.FillInsertObjects();
601 aObjS.Remove( SvGlobalName( SO3_SW_CLASSID ) ); // remove Writer-ID
602
603 for ( sal_uLong i = 0; i < aObjS.Count(); ++i )
604 {
605 const SvGlobalName &rOleId = aObjS[i].GetClassName();
606 OUString sClass;
607 if (rOleId == SvGlobalName(SO3_OUT_CLASSID))
608 sClass = m_sOLE;
609 else
610 sClass = aObjS[i].GetHumanName();
611 // don't show product version
612 sClass = sClass.replaceFirst( sComplete, sWithoutVersion );
613 m_xCheckLB->append();
614 m_xCheckLB->set_toggle(nPos, TRISTATE_FALSE);
615 m_xCheckLB->set_text(nPos, sClass, 0);
616 SetOptions( nPos++, OLE_CAP, &rOleId );
617 }
618 m_xLbCaptionOrder->set_active(
619 SW_MOD()->GetModuleConfig()->IsCaptionOrderNumberingFirst() ? 1 : 0);
620 m_xCheckLB->select(0);
621 ShowEntryHdl(*m_xCheckLB);
622}
623
625 const SwCapObjType eObjType, const SvGlobalName *pOleId)
626{
627 SwModuleOptions* pModOpt = SW_MOD()->GetModuleConfig();
628 const InsCaptionOpt* pOpt = pModOpt->GetCapOption(m_bHTMLMode, eObjType, pOleId);
629
630 if (pOpt)
631 {
632 InsCaptionOpt* pIns = new InsCaptionOpt(*pOpt);
633 m_xCheckLB->set_id(nPos, weld::toId(pIns));
634 m_xCheckLB->set_toggle(nPos, pOpt->UseCaption() ? TRISTATE_TRUE : TRISTATE_FALSE);
635 }
636 else
637 {
638 InsCaptionOpt* pIns = new InsCaptionOpt(eObjType, pOleId);
639 m_xCheckLB->set_id(nPos, weld::toId(pIns));
640 }
641}
642
644{
645 for (int i = 0, nCount = m_xCheckLB->n_children(); i < nCount; ++i)
646 {
647 delete weld::fromId<InsCaptionOpt*>(m_xCheckLB->get_id(i));
648 m_xCheckLB->set_id(i, "0");
649 }
650}
651
653{
654 if (nSelEntry != -1)
655 {
656 bool bChecked = m_xCheckLB->get_toggle(nSelEntry) == TRISTATE_TRUE;
657
658 m_xSettingsGroup->set_sensitive(bChecked);
659 bool bNumSep = bChecked && m_xLbCaptionOrder->get_active() == 1;
660 m_xNumberingSeparatorED->set_sensitive( bNumSep );
661 m_xNumberingSeparatorFT->set_sensitive( bNumSep );
662
663 m_xNumCapt->set_sensitive(bChecked);
664 m_xCategory->set_sensitive(bChecked);
665 m_xPreview->set_sensitive(bChecked);
666
667
668 InsCaptionOpt* pOpt = weld::fromId<InsCaptionOpt*>(m_xCheckLB->get_id(nSelEntry));
669
670 m_xCategoryBox->clear();
671 m_xCategoryBox->append_text(m_sNone);
673 {
674 const size_t nCount = m_pMgr->GetFieldTypeCount();
675
676 for (size_t i = 0; i < nCount; ++i)
677 {
678 SwFieldType *pType = m_pMgr->GetFieldType( SwFieldIds::Unknown, i );
679 if( pType->Which() == SwFieldIds::SetExp &&
680 static_cast<SwSetExpFieldType *>( pType)->GetType() & nsSwGetSetExpType::GSE_SEQ )
681 {
682 m_xCategoryBox->append_text(pType->GetName());
683 }
684 }
685 }
686 else
687 {
688 m_xCategoryBox->append_text(m_sIllustration);
689 m_xCategoryBox->append_text(m_sTable);
690 m_xCategoryBox->append_text(m_sText);
691 m_xCategoryBox->append_text(m_sDrawing);
692 }
693
694 if (!pOpt->GetCategory().isEmpty())
695 {
696 if (m_xCategoryBox->find_text(pOpt->GetCategory()) == -1)
697 m_xCategoryBox->insert_text(0, pOpt->GetCategory());
698 m_xCategoryBox->set_active_text(pOpt->GetCategory());
699 }
700 else
701 m_xCategoryBox->set_active_text(m_sNone);
702
703 if (m_xCategoryBox->get_active_text().isEmpty())
704 {
705 sal_Int32 nPos = 0;
706 switch(pOpt->GetObjType())
707 {
708 case OLE_CAP:
709 case GRAPHIC_CAP: nPos = 1; break;
710 case TABLE_CAP: nPos = 2; break;
711 case FRAME_CAP: nPos = 3; break;
712 }
713 m_xCategoryBox->set_active(nPos);
714 }
715
716 for (sal_Int32 i = 0; i < m_xFormatBox->get_count(); i++)
717 {
718 if (pOpt->GetNumType() == m_xFormatBox->get_id(i).toUInt32())
719 {
720 m_xFormatBox->set_active(i);
721 break;
722 }
723 }
724 m_xTextEdit->set_text(pOpt->GetCaption());
725
726 m_xPosBox->clear();
727 switch (pOpt->GetObjType())
728 {
729 case GRAPHIC_CAP:
730 case TABLE_CAP:
731 case OLE_CAP:
732 m_xPosBox->append_text(m_sAbove);
733 m_xPosBox->append_text(m_sBelow);
734 break;
735 case FRAME_CAP:
736 m_xPosBox->append_text(m_sBegin);
737 m_xPosBox->append_text(m_sEnd);
738 break;
739 }
740 m_xPosBox->set_active(pOpt->GetPos());
741
742 sal_Int32 nLevelPos = ( pOpt->GetLevel() < MAXLEVEL ) ? pOpt->GetLevel() + 1 : 0;
743 m_xLbLevel->set_active(nLevelPos);
744 m_xEdDelim->set_text(pOpt->GetSeparator());
745 m_xNumberingSeparatorED->set_text(pOpt->GetNumSeparator());
746 if (!pOpt->GetCharacterStyle().isEmpty())
747 m_xCharStyleLB->set_active_text(pOpt->GetCharacterStyle());
748 else
749 m_xCharStyleLB->set_active(0);
750 m_xApplyBorderCB->set_sensitive(m_xCategoryBox->get_sensitive() &&
751 pOpt->GetObjType() != TABLE_CAP && pOpt->GetObjType() != FRAME_CAP );
752 m_xApplyBorderCB->set_active(pOpt->CopyAttributes());
753 }
754
755 ModifyHdl();
756}
757
759{
760 if (m_nPrevSelectedEntry != -1)
761 SaveEntry(m_nPrevSelectedEntry);
762 UpdateEntry(m_xCheckLB->get_selected_index());
763 m_nPrevSelectedEntry = m_xCheckLB->get_selected_index();
764}
765
766IMPL_LINK(SwCaptionOptPage, ToggleEntryHdl, const weld::TreeView::iter_col&, rRowCol, void)
767{
768 UpdateEntry(m_xCheckLB->get_iter_index_in_parent(rRowCol.first));
769}
770
772{
773 if (nEntry == -1)
774 return;
775
776 InsCaptionOpt* pOpt = weld::fromId<InsCaptionOpt*>(m_xCheckLB->get_id(nEntry));
777
778 pOpt->UseCaption() = m_xCheckLB->get_toggle(nEntry) == TRISTATE_TRUE;
779 const OUString aName(m_xCategoryBox->get_active_text());
780 if (aName == m_sNone)
781 pOpt->SetCategory("");
782 else
784 pOpt->SetNumType(m_xFormatBox->get_active_id().toUInt32());
785 pOpt->SetCaption(m_xTextEdit->get_sensitive() ? m_xTextEdit->get_text() : OUString() );
786 pOpt->SetPos(m_xPosBox->get_active());
787 int nPos = m_xLbLevel->get_active();
788 sal_Int32 nLevel = (nPos > 0) ? nPos - 1 : MAXLEVEL;
789 pOpt->SetLevel(nLevel);
790 pOpt->SetSeparator(m_xEdDelim->get_text());
791 pOpt->SetNumSeparator(m_xNumberingSeparatorED->get_text());
792 if (m_xCharStyleLB->get_active() == -1)
793 pOpt->SetCharacterStyle("");
794 else
795 pOpt->SetCharacterStyle(m_xCharStyleLB->get_active_text());
796 pOpt->CopyAttributes() = m_xApplyBorderCB->get_active();
797}
798
800{
801 const OUString sFieldTypeName = m_xCategoryBox->get_active_text();
802
804 pDlg->GetOKButton().set_sensitive(!sFieldTypeName.isEmpty());
805 bool bEnable = m_xCategoryBox->get_sensitive() && sFieldTypeName != m_sNone;
806
807 m_xFormatText->set_sensitive(bEnable);
808 m_xFormatBox->set_sensitive(bEnable);
809 m_xTextText->set_sensitive(bEnable);
810 m_xTextEdit->set_sensitive(bEnable);
811
813}
814
816{
817 ModifyHdl();
818}
819
821{
822 ModifyHdl();
823}
824
826{
827 InvalidatePreview();
828}
829
831{
832 InvalidatePreview();
833}
834
836{
837 InvalidatePreview();
838
839 int nSelEntry = m_xCheckLB->get_selected_index();
840 bool bChecked = false;
841 if (nSelEntry != -1)
842 {
843 bChecked = m_xCheckLB->get_toggle(nSelEntry) == TRISTATE_TRUE;
844 }
845
846 int nPos = rBox.get_active();
847 m_xNumberingSeparatorFT->set_sensitive(bChecked && nPos == 1);
848 m_xNumberingSeparatorED->set_sensitive(bChecked && nPos == 1);
849}
850
852{
853 OUString aStr;
854
855 if (m_xCategoryBox->get_active_text() != m_sNone)
856 {
857 //#i61007# order of captions
858 bool bOrderNumberingFirst = m_xLbCaptionOrder->get_active() == 1;
859 // number
860 const sal_uInt16 nNumFormat = m_xFormatBox->get_active_id().toUInt32();
861 if (SVX_NUM_NUMBER_NONE != nNumFormat)
862 {
863 //#i61007# order of captions
864 if( !bOrderNumberingFirst )
865 {
866 // category
867 aStr += m_xCategoryBox->get_active_text() + " ";
868 }
869
870 if (SwWrtShell *pSh = ::GetActiveWrtShell())
871 {
872 SwSetExpFieldType* pFieldType = static_cast<SwSetExpFieldType*>(m_pMgr->GetFieldType(
873 SwFieldIds::SetExp, m_xCategoryBox->get_active_text() ));
874 if( pFieldType && pFieldType->GetOutlineLvl() < MAXLEVEL )
875 {
876 sal_uInt8 nLvl = pFieldType->GetOutlineLvl();
878 for( sal_uInt8 i = 0; i <= nLvl; ++i )
879 aNumVector.push_back(1);
880
881 const OUString sNumber( pSh->GetOutlineNumRule()->MakeNumString(
882 aNumVector, false ));
883 if( !sNumber.isEmpty() )
884 aStr += sNumber + pFieldType->GetDelimiter();
885 }
886 }
887
888 switch( nNumFormat )
889 {
890 case SVX_NUM_CHARS_UPPER_LETTER: aStr += "A"; break;
891 case SVX_NUM_CHARS_UPPER_LETTER_N: aStr += "A"; break;
892 case SVX_NUM_CHARS_LOWER_LETTER: aStr += "a"; break;
893 case SVX_NUM_CHARS_LOWER_LETTER_N: aStr += "a"; break;
894 case SVX_NUM_ROMAN_UPPER: aStr += "I"; break;
895 case SVX_NUM_ROMAN_LOWER: aStr += "i"; break;
896 //case ARABIC:
897 default: aStr += "1"; break;
898 }
899 }
900 //#i61007# order of captions
901 if( bOrderNumberingFirst )
902 {
903 aStr += m_xNumberingSeparatorED->get_text() + m_xCategoryBox->get_active_text();
904 }
905 aStr += m_xTextEdit->get_text();
906 }
908}
909
910/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SwCapObjType
@ TABLE_CAP
@ OLE_CAP
@ GRAPHIC_CAP
@ FRAME_CAP
const StyleSettings & GetStyleSettings() const
sal_uInt16 GetValue() const
void SetCategory(const OUString &rCat)
Definition: caption.hxx:56
const OUString & GetCategory() const
Definition: caption.hxx:55
void SetNumType(const sal_uInt16 nNT)
Definition: caption.hxx:59
void SetLevel(const sal_uInt16 nLvl)
Definition: caption.hxx:71
const OUString & GetNumSeparator() const
Definition: caption.hxx:61
sal_uInt16 GetPos() const
Definition: caption.hxx:67
bool & UseCaption()
Definition: caption.hxx:48
const OUString & GetCharacterStyle() const
Definition: caption.hxx:76
sal_uInt16 GetNumType() const
Definition: caption.hxx:58
bool & CopyAttributes()
Definition: caption.hxx:83
void SetCaption(const OUString &rCap)
Definition: caption.hxx:65
const OUString & GetCaption() const
Definition: caption.hxx:64
void SetSeparator(const OUString &rSep)
Definition: caption.hxx:74
void SetPos(const sal_uInt16 nP)
Definition: caption.hxx:68
const OUString & GetSeparator() const
Definition: caption.hxx:73
SwCapObjType GetObjType() const
Definition: caption.hxx:51
void SetCharacterStyle(const OUString &rStyle)
Definition: caption.hxx:77
sal_uInt16 GetLevel() const
Definition: caption.hxx:70
void SetNumSeparator(const OUString &rSet)
Definition: caption.hxx:62
const vcl::Font & GetFont() const
void SetFont(const vcl::Font &rNewFont)
void DrawRect(const tools::Rectangle &rRect)
void SetLineColor()
void SetTextColor(const Color &rColor)
void SetFillColor()
SAL_WARN_UNUSED_RESULT Point LogicToPixel(const Point &rLogicPt) const
void SetBackground()
void DrawText(const Point &rStartPt, const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, std::vector< tools::Rectangle > *pVector=nullptr, OUString *pDisplayText=nullptr, const SalLayoutGlyphs *pLayoutCache=nullptr)
const AllSettings & GetSettings() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void SetTabPage(std::unique_ptr< SfxTabPage > xTabPage)
weld::Container * get_content_area()
SfxOkDialogController * GetDialogController() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Color & GetWindowColor() const
const Color & GetWindowTextColor() const
size_t Count() const
void Remove(const SvGlobalName &)
SwCaptionOptDlg(weld::Window *pParent, const SfxItemSet &rSet)
Definition: optload.cxx:363
std::unique_ptr< weld::Entry > m_xNumberingSeparatorED
Definition: optload.hxx:154
std::unique_ptr< weld::ComboBox > m_xLbCaptionOrder
Definition: optload.hxx:146
std::unique_ptr< weld::ComboBox > m_xCharStyleLB
Definition: optload.hxx:164
std::unique_ptr< weld::Label > m_xNumberingSeparatorFT
Definition: optload.hxx:153
std::unique_ptr< weld::Entry > m_xEdDelim
Definition: optload.hxx:161
OUString m_sSWTable
Definition: optload.hxx:120
std::unique_ptr< weld::Widget > m_xCategory
Definition: optload.hxx:163
std::unique_ptr< weld::ComboBox > m_xCategoryBox
Definition: optload.hxx:149
OUString m_sEnd
Definition: optload.hxx:131
std::unique_ptr< weld::Widget > m_xNumCapt
Definition: optload.hxx:159
void UpdateEntry(int nRow)
Definition: optload.cxx:652
OUString m_sSWGraphic
Definition: optload.hxx:122
OUString m_sSWFrame
Definition: optload.hxx:121
void DelUserData()
Definition: optload.cxx:643
OUString m_sDrawing
Definition: optload.hxx:128
void SaveEntry(int nEntry)
Definition: optload.cxx:771
void InvalidatePreview()
Definition: optload.cxx:851
std::unique_ptr< SwFieldMgr > m_pMgr
Definition: optload.hxx:139
std::unique_ptr< weld::Entry > m_xTextEdit
Definition: optload.hxx:156
virtual void Reset(const SfxItemSet *rSet) override
Definition: optload.cxx:568
SwCaptionPreview m_aPreview
Definition: optload.hxx:144
std::unique_ptr< weld::CustomWeld > m_xPreview
Definition: optload.hxx:166
std::unique_ptr< weld::ComboBox > m_xLbLevel
Definition: optload.hxx:160
std::unique_ptr< weld::ComboBox > m_xPosBox
Definition: optload.hxx:157
OUString m_sNone
Definition: optload.hxx:135
OUString m_sTable
Definition: optload.hxx:126
std::unique_ptr< weld::Widget > m_xSettingsGroup
Definition: optload.hxx:148
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optload.cxx:538
std::unique_ptr< weld::TreeView > m_xCheckLB
Definition: optload.hxx:145
std::unique_ptr< weld::Label > m_xFormatText
Definition: optload.hxx:150
virtual ~SwCaptionOptPage() override
Definition: optload.cxx:531
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optload.cxx:544
SwCaptionOptPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optload.cxx:424
OUString m_sBelow
Definition: optload.hxx:133
void ModifyHdl()
Definition: optload.cxx:799
OUString m_sIllustration
Definition: optload.hxx:125
std::unique_ptr< weld::ComboBox > m_xFormatBox
Definition: optload.hxx:151
std::unique_ptr< weld::CheckButton > m_xApplyBorderCB
Definition: optload.hxx:165
OUString m_sAbove
Definition: optload.hxx:132
OUString m_sBegin
Definition: optload.hxx:130
OUString m_sText
Definition: optload.hxx:127
void SetOptions(const sal_uLong nPos, const SwCapObjType eType, const SvGlobalName *pOleId=nullptr)
Definition: optload.cxx:624
OUString m_sOLE
Definition: optload.hxx:123
std::unique_ptr< weld::Label > m_xTextText
Definition: optload.hxx:155
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: optload.cxx:403
vcl::Font maFont
Definition: optload.hxx:106
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: optload.cxx:410
void SetPreviewText(const OUString &rText)
Definition: optload.cxx:394
bool mbFontInitialized
Definition: optload.hxx:105
OUString maText
Definition: optload.hxx:104
void ApplySettings(vcl::RenderContext &rRenderContext)
Definition: optload.cxx:376
Definition: doc.hxx:197
bool IsSquaredPageMode() const
Definition: docdesc.cxx:1038
void SetDefaultPageMode(bool bSquaredPageMode)
Definition: docdesc.cxx:1013
void SetLinkUpdMode(sal_uInt16 nMode)
Definition: editsh.cxx:947
void SetFieldUpdateFlags(SwFieldUpdateFlags eFlags)
Definition: edfld.cxx:359
SwFieldUpdateFlags GetFieldUpdateFlags() const
Definition: edfld.cxx:364
void SetModified()
Definition: edws.cxx:70
sal_uInt16 GetLinkUpdMode() const
Embeds all local links (ranges/graphics).
Definition: editsh.cxx:942
Instances of SwFields and those derived from it occur 0 to n times.
Definition: fldbas.hxx:247
virtual OUString GetName() const
Only in derived classes.
Definition: fldbas.cxx:139
SwFieldIds Which() const
Definition: fldbas.hxx:276
static sal_uInt32 Count()
Definition: optload.cxx:59
static FieldUnit GetValue(sal_uInt32 i)
Definition: optload.cxx:71
static OUString GetString(sal_uInt32 i)
Definition: optload.cxx:64
std::unique_ptr< weld::ComboBox > m_xMetricLB
Definition: optload.hxx:72
std::unique_ptr< weld::RadioButton > m_xNeverRB
Definition: optload.hxx:67
virtual void Reset(const SfxItemSet *rSet) override
Definition: optload.cxx:258
sal_uInt16 m_nLastTab
Definition: optload.hxx:62
std::unique_ptr< weld::CheckButton > m_xShowStandardizedPageCount
Definition: optload.hxx:78
sal_Int32 m_nOldLinkMode
Definition: optload.hxx:63
SwWrtShell * m_pWrtShell
Definition: optload.hxx:61
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optload.cxx:139
std::unique_ptr< weld::CheckButton > m_xAutoUpdateFields
Definition: optload.hxx:69
std::unique_ptr< weld::SpinButton > m_xStandardizedPageSizeNF
Definition: optload.hxx:79
std::unique_ptr< weld::CheckButton > m_xAutoUpdateCharts
Definition: optload.hxx:70
std::unique_ptr< weld::Entry > m_xWordCountED
Definition: optload.hxx:77
std::unique_ptr< weld::Label > m_xTabFT
Definition: optload.hxx:73
std::unique_ptr< weld::CheckButton > m_xUseCharUnit
Definition: optload.hxx:76
std::unique_ptr< weld::MetricSpinButton > m_xTabMF
Definition: optload.hxx:74
std::unique_ptr< weld::CheckButton > m_xUseSquaredPageMode
Definition: optload.hxx:75
virtual ~SwLoadOptPage() override
Definition: optload.cxx:135
std::unique_ptr< weld::RadioButton > m_xRequestRB
Definition: optload.hxx:66
SwLoadOptPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optload.cxx:78
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optload.cxx:150
std::unique_ptr< weld::RadioButton > m_xAlwaysRB
Definition: optload.hxx:65
sal_Int32 GetUpdateLinkMode() const
Definition: usrpref.hxx:173
SwFieldUpdateFlags GetFieldUpdateFlags() const
Definition: usrpref.hxx:188
bool IsApplyCharUnit() const
Definition: usrpref.hxx:232
void SetCaptionOrderNumberingFirst(bool bSet)
Definition: modcfg.hxx:273
bool SetCapOption(bool bHTML, const InsCaptionOpt *pOpt)
Definition: modcfg.cxx:83
const InsCaptionOpt * GetCapOption(bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId)
Definition: modcfg.cxx:61
void SetInsWithCaption(bool bHTML, bool b)
Definition: modcfg.hxx:267
void ApplyFieldUpdateFlags(SwFieldUpdateFlags eFieldFlags)
Definition: swmodul1.cxx:626
void ApplyDefaultPageMode(bool bIsSquaredPageMode)
Definition: swmodul1.cxx:665
void ApplyLinkMode(sal_Int32 nNewLinkMode)
Definition: swmodul1.cxx:634
void * GetValue() const
Definition: uiitems.hxx:71
const OUString & GetDelimiter() const
Number sequence fields chapterwise if required.
Definition: expfld.hxx:181
sal_uInt16 GetType() const
Definition: expfld.hxx:198
sal_uInt8 GetOutlineLvl() const
Definition: expfld.hxx:183
static void FillUIName(const OUString &rName, OUString &rFillName, SwGetPoolIdFromName)
SwDoc * GetDoc() const
Definition: viewsh.hxx:308
SwDocShell * GetDocShell()
Definition: view.cxx:1193
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
const SwView & GetView() const
Definition: wrtsh.hxx:443
const Color & GetColor() const
static std::shared_ptr< ConfigurationChanges > create()
#define SO3_OUT_CLASSID
#define SO3_SW_CLASSID
std::unique_ptr< weld::ComboBox > m_xCategory
static OUString getProductVersion()
static OUString getProductName()
tools::Long GetFontHeight() const
void SetFontHeight(tools::Long nHeight)
Size const & GetOutputSizePixel() const
virtual OutputDevice & get_ref_device()=0
std::pair< const TreeIter &, int > iter_col
virtual void set_size_request(int nWidth, int nHeight)=0
#define FN_PARAM_WRTSHELL
Definition: cmdid.h:829
int nCount
FieldUnit
SwFieldUpdateFlags
Definition: fldupde.hxx:23
@ AUTOUPD_FIELD_ONLY
Definition: fldupde.hxx:25
@ AUTOUPD_GLOBALSETTING
Definition: fldupde.hxx:27
@ AUTOUPD_OFF
Definition: fldupde.hxx:24
@ AUTOUPD_FIELD_AND_CHARTS
Definition: fldupde.hxx:26
TRISTATE_FALSE
TRISTATE_TRUE
HTMLMODE_ON
OUString aName
@ NEVER
Definition: linkenum.hxx:24
@ MANUAL
Definition: linkenum.hxx:25
@ GLOBALSETTING
Definition: linkenum.hxx:27
sal_uInt16 nPos
#define SAL_N_ELEMENTS(arr)
aStr
std::unique_ptr< sal_Int32[]> pData
bool IsAsianTypographyEnabled()
std::vector< tSwNumTreeNumber > tNumberVector
OString strip(const OString &rIn, char c)
AUTOMATIC
int i
constexpr OUStringLiteral first
const SwGetSetExpType GSE_SEQ
Sequence.
Definition: fldbas.hxx:209
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
long Long
OUString toId(const void *pValue)
IMPL_LINK(SwCaptionOptPage, TextFilterHdl, OUString &, rTest, bool)
Definition: optload.cxx:418
IMPL_LINK_NOARG(SwLoadOptPage, StandardizedPageCountCheckHdl, weld::Toggleable &, void)
Definition: optload.cxx:145
@ RES_POOLCOLL_LABEL_DRAWING
Label drawing objects.
Definition: poolfmt.hxx:358
@ RES_POOLCOLL_LABEL_FRAME
Label frame.
Definition: poolfmt.hxx:348
@ RES_POOLCOLL_LABEL_TABLE
Label table.
Definition: poolfmt.hxx:347
@ RES_POOLCOLL_LABEL_ABB
Label illustration.
Definition: poolfmt.hxx:346
#define RESARRAY_INDEX_NOTFOUND
static SfxItemSet & rSet
sal_uIntPtr sal_uLong
SVX_NUM_NUMBER_NONE
SVX_NUM_CHARS_LOWER_LETTER_N
SVX_NUM_CHARS_LOWER_LETTER
SVX_NUM_CHARS_UPPER_LETTER
SVX_NUM_ROMAN_UPPER
SVX_NUM_ROMAN_LOWER
SVX_NUM_ARABIC
SVX_NUM_CHARS_UPPER_LETTER_N
SwWrtShell * GetActiveWrtShell()
Definition: swmodul1.cxx:108
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:168
#define SW_MOD()
Definition: swmodule.hxx:254
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:92
unsigned char sal_uInt8
sal_uInt16 sal_Unicode
SW_DLLPUBLIC void FillCharStyleListBox(weld::ComboBox &rToFill, SwDocShell *pDocSh, bool bSorted=false, bool bWithDefault=false)
Definition: uitool.cxx:781