21#include <osl/diagnose.h>
27#include <svx/svxids.hrc>
32#include <svx/strings.hrc>
59 SID_ATTR_PARA_LINESPACE, SID_ATTR_PARA_LINESPACE,
60 SID_ATTR_PARA_LEFTSPACE, SID_ATTR_PARA_FIRSTLINESPACE,
61 SID_ATTR_LRSPACE, SID_ATTR_ULSPACE,
62 SID_ATTR_PARA_REGISTER, SID_ATTR_PARA_REGISTER
66 svl::Items<SID_ATTR_PARA_ADJUST, SID_ATTR_PARA_ADJUST>);
70 SDRATTR_TEXT_VERTADJUST, SDRATTR_TEXT_VERTADJUST,
71 SID_ATTR_PARA_ADJUST, SID_ATTR_PARA_ADJUST ,
72 SID_ATTR_FRAMEDIRECTION, SID_ATTR_FRAMEDIRECTION
76 SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_WIDOWS,
77 SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP
80#define MAX_DURCH 31680
81#define FIX_DIST_DEF 283
151 sal_uInt16 nHtmlMode = 0;
156 pItem = pShell->GetItem(SID_HTML_MODE);
193 if ( aTmp.isEmpty() )
199 if ( aTmp.isEmpty() )
212 return std::make_unique<SvxStdParagraphTabPage>(pPage, pController, *
rSet);
221 bool bModified =
false;
231 nWhich =
GetWhich( SID_ATTR_PARA_LINESPACE );
259 OSL_FAIL(
"unknown LineDist entry" );
262 pOld =
GetOldItem( *rOutSet, SID_ATTR_PARA_LINESPACE );
266 SfxItemState::DONTCARE ==
GetItemSet().GetItemState( nWhich ) )
268 rOutSet->
Put( aSpacing );
276 nWhich =
GetWhich( SID_ATTR_ULSPACE );
278 pOld =
GetOldItem( *rOutSet, SID_ATTR_ULSPACE );
308 if ( !pOld || *
static_cast<const SvxULSpaceItem*
>(pOld) != aMargin ||
311 rOutSet->
Put( aMargin );
315 bool bNullTab =
false;
319 nWhich =
GetWhich(SID_ATTR_PARA_LEFTSPACE);
322 pOld =
GetOldItem(*rOutSet, SID_ATTR_PARA_LEFTSPACE);
346 || SfxItemState::DONTCARE ==
GetItemSet().GetItemState(nWhich))
355 nWhich =
GetWhich(SID_ATTR_PARA_RIGHTSPACE);
358 pOld =
GetOldItem(*rOutSet, SID_ATTR_PARA_RIGHTSPACE);
382 || SfxItemState::DONTCARE ==
GetItemSet().GetItemState(nWhich))
390 ||
m_xAutoCB->get_state_changed_from_saved()))
392 nWhich =
GetWhich(SID_ATTR_PARA_FIRSTLINESPACE);
395 pOld =
GetOldItem(*rOutSet, SID_ATTR_PARA_FIRSTLINESPACE);
425 || SfxItemState::DONTCARE ==
GetItemSet().GetItemState(nWhich))
436 m_xAutoCB->get_state_changed_from_saved()))
438 nWhich =
GetWhich( SID_ATTR_LRSPACE );
441 pOld =
GetOldItem( *rOutSet, SID_ATTR_LRSPACE );
478 if ( !pOld || *
static_cast<const SvxLRSpaceItem*
>(pOld) != aMargin ||
481 rOutSet->
Put( aMargin );
489 if ( MapUnit::Map100thMM != eUnit )
493 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_TABSTOP );
496 if ( rInSet.
GetItemState( _nWhich ) >= SfxItemState::DEFAULT )
503 rOutSet->
Put( aNullTab );
510 *rOutSet, SID_ATTR_PARA_REGISTER));
513 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_PARA_REGISTER );
518 std::unique_ptr<SfxBoolItem> pRegItem(pBoolItem->
Clone());
519 pRegItem->SetValue(!bSet);
520 rOutSet->
Put(std::move(pRegItem));
523 else if ( SfxItemState::DEFAULT ==
GetItemSet().GetItemState( _nWhich,
false ) )
541 eFUnit = FieldUnit::CHAR;
546 if ( eFUnit == FieldUnit::CHAR )
559 sal_uInt16
const nWhichFL(
GetWhich(SID_ATTR_PARA_FIRSTLINESPACE));
562 sal_uInt16
const nWhichLM(
GetWhich(SID_ATTR_PARA_LEFTSPACE));
564 sal_uInt16
const nWhichRM(
GetWhich(SID_ATTR_PARA_RIGHTSPACE));
664 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_LRSPACE );
733 _nWhich =
GetWhich( SID_ATTR_ULSPACE );
736 if ( eItemState >= SfxItemState::DEFAULT )
753 if (eFUnit == FieldUnit::CHAR)
768 if (eFUnit == FieldUnit::CHAR)
788 _nWhich =
GetWhich( SID_ATTR_PARA_LINESPACE );
791 if ( eItemState >= SfxItemState::DEFAULT )
796 _nWhich =
GetWhich( SID_ATTR_PARA_REGISTER );
799 if ( eItemState >= SfxItemState::DEFAULT )
845 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_PARA_ADJUST );
848 if ( eItemState < SfxItemState::DEFAULT )
853 if ( eAdjust == SvxAdjust::Center || eAdjust == SvxAdjust::Block )
855 _nWhich =
GetWhich( SID_ATTR_FRAMEDIRECTION );
858 if ( eItemState >= SfxItemState::DEFAULT )
863 m_aExampleWin.EnableRTL( SvxFrameDirection::Horizontal_RL_TB == eFrameDirection );
865 if ( eAdjust == SvxAdjust::Block )
872 eAdjust = SvxAdjust::Left;
886 return DeactivateRC::LeavePage;
890 :
SfxTabPage(pPage, pController,
"cui/ui/paraindentspacing.ui",
"ParaIndentSpacing", &rAttr)
893 , bRelativeMode(false)
894 , m_aLeftIndent(m_xBuilder->weld_metric_spin_button(
"spinED_LEFTINDENT",
FieldUnit::
CM))
895 , m_aRightIndent(m_xBuilder->weld_metric_spin_button(
"spinED_RIGHTINDENT",
FieldUnit::
CM))
896 , m_xFLineLabel(m_xBuilder->weld_label(
"labelFT_FLINEINDENT"))
897 , m_aFLineIndent(m_xBuilder->weld_metric_spin_button(
"spinED_FLINEINDENT",
FieldUnit::
CM))
898 , m_xAutoCB(m_xBuilder->weld_check_button(
"checkCB_AUTO"))
899 , m_aTopDist(m_xBuilder->weld_metric_spin_button(
"spinED_TOPDIST",
FieldUnit::
CM))
900 , m_aBottomDist(m_xBuilder->weld_metric_spin_button(
"spinED_BOTTOMDIST",
FieldUnit::
CM))
901 , m_xContextualCB(m_xBuilder->weld_check_button(
"checkCB_CONTEXTUALSPACING"))
902 , m_xLineDist(m_xBuilder->weld_combo_box(
"comboLB_LINEDIST"))
903 , m_xLineDistAtPercentBox(m_xBuilder->weld_metric_spin_button(
"spinED_LINEDISTPERCENT",
FieldUnit::
PERCENT))
904 , m_xLineDistAtMetricBox(m_xBuilder->weld_metric_spin_button(
"spinED_LINEDISTMETRIC",
FieldUnit::
CM))
905 , m_xLineDistAtPlaceHolderBox(m_xBuilder->weld_metric_spin_button(
"spinED_BLANK",
FieldUnit::
CM))
906 , m_xLineDistAtLabel(m_xBuilder->weld_label(
"labelFT_LINEDIST"))
907 , m_xAbsDist(m_xBuilder->weld_label(
"labelST_LINEDIST_ABS"))
908 , m_xRegisterCB(m_xBuilder->weld_check_button(
"checkCB_REGISTER"))
909 , m_xExampleWin(new
weld::CustomWeld(*m_xBuilder,
"drawingareaWN_EXAMPLE", m_aExampleWin))
945 case SvxLineSpaceRule::Auto:
952 case SvxInterLineSpaceRule::Off:
957 case SvxInterLineSpaceRule::Prop:
986 case SvxInterLineSpaceRule::Fix:
994 case SvxLineSpaceRule::Fix:
999 case SvxLineSpaceRule::Min:
1010 m_bLineDistToggled =
true;
1015 switch (rBox.get_active())
1021 m_xLineDistAtLabel->set_sensitive(
false);
1022 m_xLineDistAtPercentBox->hide();
1023 m_xLineDistAtMetricBox->hide();
1024 m_xLineDistAtPlaceHolderBox->show();
1030 m_xLineDistAtMetricBox->set_min(0, FieldUnit::NONE);
1032 if (m_xLineDistAtPlaceHolderBox->get_visible())
1033 m_xLineDistAtMetricBox->set_value(m_xLineDistAtMetricBox->normalize(1), FieldUnit::NONE);
1034 m_xLineDistAtPlaceHolderBox->hide();
1035 m_xLineDistAtPercentBox->hide();
1036 m_xLineDistAtMetricBox->show();
1037 m_xLineDistAtLabel->set_sensitive(
true);
1041 m_xLineDistAtMetricBox->set_min(0, FieldUnit::NONE);
1043 if (m_xLineDistAtPlaceHolderBox->get_visible())
1044 m_xLineDistAtMetricBox->set_value(m_xLineDistAtMetricBox->normalize(10), FieldUnit::TWIP);
1045 m_xLineDistAtPlaceHolderBox->hide();
1046 m_xLineDistAtPercentBox->hide();
1047 m_xLineDistAtMetricBox->show();
1048 m_xLineDistAtLabel->set_sensitive(
true);
1053 if (m_xLineDistAtPlaceHolderBox->get_visible())
1054 m_xLineDistAtPercentBox->set_value(m_xLineDistAtPercentBox->normalize(100), FieldUnit::TWIP);
1055 m_xLineDistAtPlaceHolderBox->hide();
1056 m_xLineDistAtMetricBox->hide();
1057 m_xLineDistAtPercentBox->show();
1058 m_xLineDistAtLabel->set_sensitive(
true);
1062 auto nTemp = m_xLineDistAtMetricBox->get_value(FieldUnit::NONE);
1063 m_xLineDistAtMetricBox->set_min(m_xLineDistAtMetricBox->normalize(nMinFixDist), FieldUnit::TWIP);
1067 if (m_xLineDistAtMetricBox->get_value(FieldUnit::NONE) != nTemp)
1069 m_xLineDistAtPlaceHolderBox->hide();
1070 m_xLineDistAtPercentBox->hide();
1071 m_xLineDistAtMetricBox->show();
1072 m_xLineDistAtLabel->set_sensitive(
true);
1076 UpdateExample_Impl();
1081 UpdateExample_Impl();
1146 bool bEnable = !rBox.get_active();
1147 m_xFLineLabel->set_sensitive(bEnable);
1148 m_aFLineIndent.set_sensitive(bEnable);
1181 if (( 0x0001 & pFlagSetItem->GetValue())== 0x0001 )
1184 if (( 0x0002 & pFlagSetItem->GetValue())== 0x0002 )
1187 if ( ( 0x0004 & pFlagSetItem->GetValue())== 0x0004 )
1196 if (( 0x0008 & pFlagSetItem->GetValue()) == 0x0008 )
1199 if (( 0x0010 & pFlagSetItem->GetValue()) == 0x0010 )
1204#define LASTLINEPOS_DEFAULT 0
1205#define LASTLINEPOS_LEFT 1
1207#define LASTLINECOUNT_OLD 3
1208#define LASTLINECOUNT_NEW 4
1211 :
SfxTabPage(pPage, pController,
"cui/ui/paragalignpage.ui",
"ParaAlignPage", &
rSet)
1212 , m_bSdrVertAlign(false)
1213 , m_xLeft(m_xBuilder->weld_radio_button(
"radioBTN_LEFTALIGN"))
1214 , m_xRight(m_xBuilder->weld_radio_button(
"radioBTN_RIGHTALIGN"))
1215 , m_xCenter(m_xBuilder->weld_radio_button(
"radioBTN_CENTERALIGN"))
1216 , m_xJustify(m_xBuilder->weld_radio_button(
"radioBTN_JUSTIFYALIGN"))
1217 , m_xLeftBottom(m_xBuilder->weld_label(
"labelST_LEFTALIGN_ASIAN"))
1218 , m_xRightTop(m_xBuilder->weld_label(
"labelST_RIGHTALIGN_ASIAN"))
1219 , m_xLastLineFT(m_xBuilder->weld_label(
"labelLB_LASTLINE"))
1220 , m_xLastLineLB(m_xBuilder->weld_combo_box(
"comboLB_LASTLINE"))
1221 , m_xExpandCB(m_xBuilder->weld_check_button(
"checkCB_EXPAND"))
1222 , m_xSnapToGridCB(m_xBuilder->weld_check_button(
"checkCB_SNAP"))
1223 , m_xExampleWin(new
weld::CustomWeld(*m_xBuilder,
"drawingareaWN_EXAMPLE", m_aExampleWin))
1224 , m_xVertAlignFL(m_xBuilder->weld_widget(
"frameFL_VERTALIGN"))
1225 , m_xVertAlignLB(m_xBuilder->weld_combo_box(
"comboLB_VERTALIGN"))
1226 , m_xVertAlign(m_xBuilder->weld_label(
"labelFL_VERTALIGN"))
1227 , m_xVertAlignSdr(m_xBuilder->weld_label(
"labelST_VERTALIGN_SDR"))
1228 , m_xTextDirectionLB(new
svx::FrameDirectionListBox(m_xBuilder->weld_combo_box(
"comboLB_TEXTDIRECTION")))
1239 OUString sLeft(
m_xLeft->get_label());
1256 m_xLeft->connect_toggled(aLink);
1276 return DeactivateRC::LeavePage;
1281 return std::make_unique<SvxParaAlignTabPage>(pPage, pController, *
rSet);
1286 bool bModified =
false;
1293 eAdjust = SvxAdjust::Left;
1298 eAdjust = SvxAdjust::Right;
1303 eAdjust = SvxAdjust::Center;
1308 eAdjust = SvxAdjust::Block;
1314 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_PARA_ADJUST );
1323 eLastBlock = SvxAdjust::Center;
1324 else if ( 2 == nLBPos )
1325 eLastBlock = SvxAdjust::Block;
1331 rOutSet->
Put( aAdj );
1370 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_PARA_ADJUST );
1373 sal_Int32 nLBSelect = 0;
1374 if ( eItemState >= SfxItemState::DEFAULT )
1380 case SvxAdjust::Left:
m_xLeft->set_active(
true);
break;
1382 case SvxAdjust::Right:
m_xRight->set_active(
true);
break;
1384 case SvxAdjust::Center:
m_xCenter->set_active(
true);
break;
1386 case SvxAdjust::Block:
m_xJustify->set_active(
true);
break;
1395 case SvxAdjust::Left: nLBSelect = 0;
break;
1397 case SvxAdjust::Center: nLBSelect = 1;
break;
1399 case SvxAdjust::Block: nLBSelect = 2;
break;
1402 m_xExpandCB->set_sensitive(bEnable && nLBSelect == 2);
1424 _nWhich =
GetWhich(SID_ATTR_PARA_SNAPTOGRID);
1426 if ( eItemState >= SfxItemState::DEFAULT )
1435 if ( eItemState >= SfxItemState::DEFAULT )
1451 _nWhich =
GetWhich( SID_ATTR_FRAMEDIRECTION );
1453 if( SfxItemState::DEFAULT <= rSet->GetItemState( _nWhich ) )
1487 bool bJustify = m_xJustify->get_active();
1488 m_xLastLineFT->set_sensitive(bJustify);
1489 m_xLastLineLB->set_sensitive(bJustify);
1490 bool bLastLineIsBlock = m_xLastLineLB->get_active() == 2;
1491 m_xExpandCB->set_sensitive(bJustify && bLastLineIsBlock);
1493 if (!m_xLastLineLB->get_sensitive())
1494 m_xLastLineLB->set_active(0);
1496 if (!m_xExpandCB->get_sensitive())
1497 m_xExpandCB->set_active(
false);
1498 UpdateExample_Impl();
1504 bool bLastLineIsBlock = m_xLastLineLB->get_active() == 2;
1505 m_xExpandCB->set_sensitive(bLastLineIsBlock);
1507 if (!m_xExpandCB->get_sensitive())
1508 m_xExpandCB->set_active(
false);
1509 UpdateExample_Impl();
1514 UpdateExample_Impl();
1536 case SvxFrameDirection::Environment :
1540 case SvxFrameDirection::Horizontal_RL_TB :
1544 case SvxFrameDirection::Horizontal_LR_TB :
1558 else if (nLBPos == 1)
1560 else if (nLBPos == 2)
1590 if (pBoolItem && pBoolItem->
GetValue())
1596 return std::make_unique<SvxExtParagraphTabPage>(pPage, pController, *
rSet);
1601 bool bModified =
false;
1602 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_PARA_HYPHENZONE );
1638 rOutSet->
Put( aHyphen );
1646 pOld =
GetOldItem( *rOutSet, SID_ATTR_PARA_PAGENUM );
1654 rOutSet->
Put( aPageNum );
1669 bool bIsPageModel =
false;
1679 bIsPageModel = !sPage.isEmpty();
1681 pOld =
GetOldItem( *rOutSet, SID_ATTR_PARA_MODEL );
1689 bIsPageModel =
false;
1692 bIsPageModel =
true;
1696 _nWhich =
GetWhich( SID_ATTR_PARA_PAGEBREAK );
1724 aBreak.SetValue( SvxBreak::PageBefore );
1726 aBreak.SetValue( SvxBreak::PageAfter );
1731 aBreak.SetValue( SvxBreak::ColumnBefore );
1733 aBreak.SetValue( SvxBreak::ColumnAfter );
1739 aBreak.SetValue( SvxBreak::NONE );
1743 pOld =
GetOldItem( *rOutSet, SID_ATTR_PARA_PAGEBREAK );
1749 rOutSet->
Put( aBreak );
1755 _nWhich =
GetWhich( SID_ATTR_PARA_SPLIT );
1760 pOld =
GetOldItem( *rOutSet, SID_ATTR_PARA_SPLIT );
1771 _nWhich =
GetWhich( SID_ATTR_PARA_KEEP );
1785 if (
m_xWidowBox->get_state_changed_from_saved() ||
1790 pOld =
GetOldItem( *rOutSet, SID_ATTR_PARA_WIDOWS );
1792 if (
m_xWidowBox->get_state_changed_from_saved() || !pOld || !( *
static_cast<const SvxWidowsItem*
>(pOld) == rItem ) )
1794 rOutSet->
Put( rItem );
1807 pOld =
GetOldItem( *rOutSet, SID_ATTR_PARA_ORPHANS );
1813 rOutSet->
Put( rItem );
1831 eFUnit = FieldUnit::CHAR;
1833 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_PARA_HYPHENZONE );
1836 bool bItemAvailable = eItemState >= SfxItemState::DEFAULT;
1837 bool bIsHyphen =
false;
1862 bool bEnable = bItemAvailable && bIsHyphen;
1878 case SfxItemState::SET:
1883 const sal_uInt16 nPageNum(pItem->
GetValue());
1887 case SfxItemState::DONTCARE:
1893 case SfxItemState::UNKNOWN:
1894 case SfxItemState::DEFAULT:
1895 case SfxItemState::DISABLED:
1909 bool bIsPageModel =
false;
1912 if ( eItemState >= SfxItemState::SET )
1917 const OUString&
aStr( rModel.GetValue() );
1923 bIsPageModel =
true;
1945 else if ( SfxItemState::DONTCARE == eItemState )
1959 if ( !bIsPageModel )
1961 _nWhich =
GetWhich( SID_ATTR_PARA_PAGEBREAK );
1964 if ( eItemState >= SfxItemState::DEFAULT )
1982 bool _bEnable = eBreak != SvxBreak::NONE &&
1983 eBreak != SvxBreak::ColumnBefore &&
1984 eBreak != SvxBreak::ColumnAfter;
1993 if ( eBreak == SvxBreak::NONE )
1996 sal_Int32
nType = 0;
1997 sal_Int32 nPosition = 0;
2000 case SvxBreak::PageBefore:
2002 case SvxBreak::PageAfter:
2005 case SvxBreak::ColumnBefore:
2008 case SvxBreak::ColumnAfter:
2017 else if ( SfxItemState::DONTCARE == eItemState )
2033 _nWhich =
GetWhich( SID_ATTR_PARA_KEEP );
2036 if ( eItemState >= SfxItemState::DEFAULT )
2042 if ( rKeep.GetValue() )
2047 else if ( SfxItemState::DONTCARE == eItemState )
2052 _nWhich =
GetWhich( SID_ATTR_PARA_SPLIT );
2055 if ( eItemState >= SfxItemState::DEFAULT )
2061 if ( !rSplit.GetValue() )
2072 _nWhich =
GetWhich( SID_ATTR_PARA_WIDOWS );
2075 if ( eTmpState >= SfxItemState::DEFAULT )
2080 const sal_uInt16 nLines = rWidow.GetValue();
2082 bool _bEnable = nLines > 0;
2087 else if ( SfxItemState::DONTCARE == eTmpState )
2092 _nWhich =
GetWhich( SID_ATTR_PARA_ORPHANS );
2095 if ( eTmpState >= SfxItemState::DEFAULT )
2099 const sal_uInt16 nLines = rOrphan.GetValue();
2102 bool _bEnable = nLines > 0;
2109 else if ( SfxItemState::DONTCARE == eTmpState )
2115 else if ( SfxItemState::DONTCARE == eItemState )
2159 return DeactivateRC::LeavePage;
2176 :
SfxTabPage(pPage, pController,
"cui/ui/textflowpage.ui",
"TextFlowPage", &rAttr)
2181 , m_xHyphenBox(m_xBuilder->weld_check_button(
"checkAuto"))
2182 , m_xHyphenNoCapsBox(m_xBuilder->weld_check_button(
"checkNoCaps"))
2183 , m_xHyphenNoLastWordBox(m_xBuilder->weld_check_button(
"checkNoLastWord"))
2184 , m_xBeforeText(m_xBuilder->weld_label(
"labelLineBegin"))
2185 , m_xExtHyphenBeforeBox(m_xBuilder->weld_spin_button(
"spinLineEnd"))
2186 , m_xAfterText(m_xBuilder->weld_label(
"labelLineEnd"))
2187 , m_xExtHyphenAfterBox(m_xBuilder->weld_spin_button(
"spinLineBegin"))
2188 , m_xMaxHyphenLabel(m_xBuilder->weld_label(
"labelMaxNum"))
2189 , m_xMaxHyphenEdit(m_xBuilder->weld_spin_button(
"spinMaxNum"))
2190 , m_xMinWordLabel(m_xBuilder->weld_label(
"labelMinLen"))
2191 , m_xMinWordLength(m_xBuilder->weld_spin_button(
"spinMinLen"))
2192 , m_xHyphenZoneLabel(m_xBuilder->weld_label(
"labelHyphenZone"))
2193 , m_aHyphenZone(m_xBuilder->weld_metric_spin_button(
"spinHyphenZone",
FieldUnit::
CM))
2195 , m_xPageBreakBox(m_xBuilder->weld_check_button(
"checkInsert"))
2196 , m_xBreakTypeFT(m_xBuilder->weld_label(
"labelType"))
2197 , m_xBreakTypeLB(m_xBuilder->weld_combo_box(
"comboBreakType"))
2198 , m_xBreakPositionFT(m_xBuilder->weld_label(
"labelPosition"))
2199 , m_xBreakPositionLB(m_xBuilder->weld_combo_box(
"comboBreakPosition"))
2200 , m_xApplyCollBtn(m_xBuilder->weld_check_button(
"checkPageStyle"))
2201 , m_xApplyCollBox(m_xBuilder->weld_combo_box(
"comboPageStyle"))
2202 , m_xPageNumBox(m_xBuilder->weld_check_button(
"labelPageNum"))
2203 , m_xPagenumEdit(m_xBuilder->weld_spin_button(
"spinPageNumber"))
2205 , m_xKeepTogetherBox(m_xBuilder->weld_check_button(
"checkSplitPara"))
2206 , m_xKeepParaBox(m_xBuilder->weld_check_button(
"checkKeepPara"))
2207 , m_xOrphanBox(m_xBuilder->weld_check_button(
"checkOrphan"))
2208 , m_xOrphanRowNo(m_xBuilder->weld_spin_button(
"spinOrphan"))
2209 , m_xOrphanRowLabel(m_xBuilder->weld_label(
"labelOrphan"))
2210 , m_xWidowBox(m_xBuilder->weld_check_button(
"checkWidow"))
2211 , m_xWidowRowNo(m_xBuilder->weld_spin_button(
"spinWidow"))
2212 , m_xWidowRowLabel(m_xBuilder->weld_label(
"labelWidow"))
2238 if ( aStdName.isEmpty() )
2242 pStyle = pPool->
Next();
2317 aPageBreakState.ButtonToggled(rToggle);
2330 aKeepTogetherState.ButtonToggled(rToggle);
2356 aWidowState.ButtonToggled(rToggle);
2362 aOrphanState.ButtonToggled(rToggle);
2407 aHyphenState.ButtonToggled(rToggle);
2413 bool bEnable =
false;
2433 aApplyCollState.ButtonToggled(rToggle);
2434 ApplyCollClickHdl();
2439 if (0 == rListBox.get_active())
2441 m_xApplyCollBtn->set_sensitive(
true);
2443 bool bEnable = m_xApplyCollBtn->get_state() ==
TRISTATE_TRUE && m_xApplyCollBox->get_count();
2445 m_xApplyCollBox->set_sensitive(bEnable);
2448 m_xPageNumBox->set_sensitive(bEnable);
2449 m_xPagenumEdit->set_sensitive(bEnable && m_xPageNumBox->get_state() ==
TRISTATE_TRUE);
2452 else if (1 == rListBox.get_active())
2455 m_xApplyCollBtn->set_sensitive(
false);
2456 m_xApplyCollBox->set_sensitive(
false);
2457 m_xPageNumBox->set_sensitive(
false);
2458 m_xPagenumEdit->set_sensitive(
false);
2465 int nBreakPos = m_xBreakPositionLB->get_active();
2466 if (rListBox.get_active() == 1 || 1 == nBreakPos)
2469 m_xApplyCollBtn->set_sensitive(
false);
2470 m_xApplyCollBox->set_sensitive(
false);
2471 m_xPageNumBox->set_sensitive(
false);
2472 m_xPagenumEdit->set_sensitive(
false);
2475 PageBreakPosHdl_Impl(*m_xBreakPositionLB);
2485 aPageNumState.ButtonToggled(rToggle);
2486 PageNumBoxClickHdl();
2491 aKeepParaState.ButtonToggled(rToggle);
2498 if (pDisablePageBreakItem)
2499 if ( pDisablePageBreakItem->
GetValue())
2504 :
SfxTabPage(pPage, pController,
"cui/ui/asiantypography.ui",
"AsianTypography", &
rSet)
2505 , m_xForbiddenRulesCB(m_xBuilder->weld_check_button(
"checkForbidList"))
2506 , m_xHangingPunctCB(m_xBuilder->weld_check_button(
"checkHangPunct"))
2507 , m_xScriptSpaceCB(m_xBuilder->weld_check_button(
"checkApplySpacing"))
2517 return std::make_unique<SvxAsianTabPage>(pPage, pController, *
rSet);
2522 return WhichRangesContainer(svl::Items<SID_ATTR_PARA_SCRIPTSPACE, SID_ATTR_PARA_FORBIDDEN_RULES>);
2534 rSet->
Put(std::move(pNewItem));
2542 rSet->
Put(std::move(pNewItem));
2550 rSet->
Put(std::move(pNewItem));
2560 if( eState == SfxItemState::UNKNOWN || eState == SfxItemState::DISABLED )
2562 else if(eState >= SfxItemState::DEFAULT)
static bool GetLayoutRTL()
sal_uInt16 GetValue() const
static OUString EraseAllMnemonicChars(const OUString &rStr)
virtual SfxBoolItem * Clone(SfxItemPool *=nullptr) const override
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
virtual MapUnit GetMetric(sal_uInt16 nWhich) const
SfxItemPool * GetPool() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
const SfxItemSet * GetParent() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void DisableItem(sal_uInt16 nWhich)
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
SfxStyleSheetBase * Next()
const OUString & GetName() const
const SfxItemSet & GetItemSet() const
void SetExchangeSupport()
const SfxPoolItem * GetOldItem(const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true)
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
SvxAdjust GetLastBlock() const
SvxAdjust GetAdjust() const
SvxAdjust GetOneWord() const
void SetAdjust(const SvxAdjust eType)
void SetOneWord(const SvxAdjust eType)
void SetLastBlock(const SvxAdjust eType)
virtual void Reset(const SfxItemSet *rSet) override
std::unique_ptr< weld::CheckButton > m_xHangingPunctCB
virtual ~SvxAsianTabPage() override
static WhichRangesContainer GetRanges()
virtual void ChangesApplied() override
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
std::unique_ptr< weld::CheckButton > m_xScriptSpaceCB
std::unique_ptr< weld::CheckButton > m_xForbiddenRulesCB
SvxAsianTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
virtual bool FillItemSet(SfxItemSet *rSet) override
std::unique_ptr< weld::SpinButton > m_xWidowRowNo
weld::TriStateEnabled aKeepTogetherState
SvxExtParagraphTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
weld::TriStateEnabled aHyphenState
std::unique_ptr< weld::ComboBox > m_xApplyCollBox
std::unique_ptr< weld::CheckButton > m_xHyphenNoLastWordBox
std::unique_ptr< weld::Label > m_xBreakPositionFT
weld::TriStateEnabled aApplyCollState
std::unique_ptr< weld::CheckButton > m_xWidowBox
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
std::unique_ptr< weld::SpinButton > m_xOrphanRowNo
static const WhichRangesContainer pExtRanges
virtual bool FillItemSet(SfxItemSet *rSet) override
std::unique_ptr< weld::Label > m_xAfterText
SvxRelativeField m_aHyphenZone
std::unique_ptr< weld::Label > m_xHyphenZoneLabel
weld::TriStateEnabled aPageNumState
weld::TriStateEnabled aKeepParaState
std::unique_ptr< weld::CheckButton > m_xKeepTogetherBox
std::unique_ptr< weld::Label > m_xMinWordLabel
std::unique_ptr< weld::ComboBox > m_xBreakPositionLB
virtual void PageCreated(const SfxAllItemSet &aSet) override
std::unique_ptr< weld::CheckButton > m_xPageBreakBox
std::unique_ptr< weld::SpinButton > m_xMaxHyphenEdit
weld::TriStateEnabled aPageBreakState
std::unique_ptr< weld::CheckButton > m_xHyphenNoCapsBox
std::unique_ptr< weld::SpinButton > m_xPagenumEdit
weld::TriStateEnabled aWidowState
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< weld::Label > m_xWidowRowLabel
weld::TriStateEnabled aOrphanState
std::unique_ptr< weld::CheckButton > m_xKeepParaBox
void PageNumBoxClickHdl()
std::unique_ptr< weld::CheckButton > m_xOrphanBox
std::unique_ptr< weld::SpinButton > m_xExtHyphenAfterBox
std::unique_ptr< weld::SpinButton > m_xMinWordLength
std::unique_ptr< weld::SpinButton > m_xExtHyphenBeforeBox
std::unique_ptr< weld::CheckButton > m_xHyphenBox
std::unique_ptr< weld::Label > m_xBreakTypeFT
virtual void Reset(const SfxItemSet *rSet) override
std::unique_ptr< weld::Label > m_xBeforeText
virtual ~SvxExtParagraphTabPage() override
std::unique_ptr< weld::CheckButton > m_xPageNumBox
std::unique_ptr< weld::ComboBox > m_xBreakTypeLB
std::unique_ptr< weld::Label > m_xOrphanRowLabel
std::unique_ptr< weld::Label > m_xMaxHyphenLabel
std::unique_ptr< weld::CheckButton > m_xApplyCollBtn
virtual void ChangesApplied() override
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
sal_uInt16 GetPropTextFirstLineOffset() const
void SetAutoFirst(const bool bNew)
short GetTextFirstLineOffset() const
bool IsNoLastWordHyphenation() const
sal_uInt16 & GetTextHyphenZone()
sal_uInt8 & GetMinWordLength()
void SetHyphen(const bool bNew)
sal_uInt8 & GetMaxHyphens()
void SetNoCapsHyphenation(const bool bNew)
bool IsNoCapsHyphenation() const
void SetNoLastWordHyphenation(const bool bNew)
sal_uInt8 & GetMinTrail()
sal_uInt16 GetPropLeft() const
sal_uInt16 GetPropRight() const
short GetTextFirstLineOffset() const
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
tools::Long GetRight() const
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
tools::Long GetTextLeft() const
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
void SetAutoFirst(const bool bNew)
sal_uInt16 GetPropTextFirstLineOffset() const
void SetPropLineSpace(const sal_uInt16 nProp)
void SetInterLineSpaceRule(SvxInterLineSpaceRule e)
sal_uInt16 GetPropLineSpace() const
SvxInterLineSpaceRule GetInterLineSpaceRule() const
SvxLineSpaceRule GetLineSpaceRule() const
sal_uInt16 GetLineHeight() const
void SetLineSpaceRule(SvxLineSpaceRule e)
void SetLineHeight(const sal_uInt16 nHeight)
short GetInterLineSpace() const
void SetInterLineSpace(const short nSpace)
std::unique_ptr< weld::Label > m_xVertAlignSdr
std::unique_ptr< weld::Label > m_xLastLineFT
virtual void ActivatePage(const SfxItemSet &rSet) override
std::unique_ptr< weld::ComboBox > m_xVertAlignLB
virtual void PageCreated(const SfxAllItemSet &aSet) override
std::unique_ptr< weld::Label > m_xLeftBottom
std::unique_ptr< svx::FrameDirectionListBox > m_xTextDirectionLB
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
SvxParaPrevWindow m_aExampleWin
std::unique_ptr< weld::RadioButton > m_xCenter
SvxParaAlignTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
virtual void ChangesApplied() override
virtual ~SvxParaAlignTabPage() override
void EnableSdrVertAlign()
std::unique_ptr< weld::Label > m_xVertAlign
void UpdateExample_Impl()
virtual bool FillItemSet(SfxItemSet *rSet) override
std::unique_ptr< weld::CheckButton > m_xExpandCB
std::unique_ptr< weld::RadioButton > m_xJustify
std::unique_ptr< weld::RadioButton > m_xLeft
static const WhichRangesContainer pAlignRanges
static const WhichRangesContainer pSdrAlignRanges
virtual void Reset(const SfxItemSet *rSet) override
std::unique_ptr< weld::RadioButton > m_xRight
std::unique_ptr< weld::Label > m_xRightTop
std::unique_ptr< weld::ComboBox > m_xLastLineLB
std::unique_ptr< weld::Widget > m_xVertAlignFL
std::unique_ptr< weld::CheckButton > m_xSnapToGridCB
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
void SetRightMargin(tools::Long nNew)
void SetLeftMargin(tools::Long nNew)
void SetUpper(sal_uInt16 nNew)
void SetLineSpace(SvxPrevLineSpace eNew)
void SetAdjust(SvxAdjust eNew)
void SetLower(sal_uInt16 nNew)
void SetLastLine(SvxAdjust eNew)
void SetFirstLineOffset(short nNew)
bool get_value_changed_from_saved() const
void set_text(const OUString &rText)
int normalize(int nValue) const
int GetCoreValue(MapUnit eUnit) const
void SetMetricValue(int lCoreValue, MapUnit eUnit)
void connect_value_changed(const Link< weld::MetricSpinButton &, void > &rLink)
void EnableRelativeMode(sal_uInt16 nMin, sal_uInt16 nMax)
void set_min(int min, FieldUnit eValueUnit)
int denormalize(int nValue) const
void EnableNegativeMode()
int get_min(FieldUnit eValueUnit) const
void SetFieldUnit(FieldUnit eUnit, bool bAll=false)
void set_max(int max, FieldUnit eValueUnit)
int get_value(FieldUnit eDestUnit) const
void set_value(int nValue, FieldUnit eValueUnit)
OUString get_text() const
void set_sensitive(bool sensitive)
void SetRelative(bool bRelative)
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
tools::Long GetRight() const
sal_uInt16 GetPropRight() const
std::unique_ptr< weld::CheckButton > m_xRegisterCB
bool m_bSplitLRSpace
which items to use?
std::unique_ptr< weld::CheckButton > m_xAutoCB
void EnableContextualMode()
std::unique_ptr< weld::MetricSpinButton > m_xLineDistAtPlaceHolderBox
SvxRelativeField m_aLeftIndent
virtual bool FillItemSet(SfxItemSet *rSet) override
std::unique_ptr< weld::MetricSpinButton > m_xLineDistAtMetricBox
SvxRelativeField m_aRightIndent
void EnableRegisterMode()
virtual ~SvxStdParagraphTabPage() override
SvxRelativeField m_aFLineIndent
virtual void Reset(const SfxItemSet *rSet) override
void EnableAutoFirstLine()
virtual void PageCreated(const SfxAllItemSet &aSet) override
void EnableNegativeMode()
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
void SetLineSpacing_Impl(const SvxLineSpacingItem &rAttr)
void EnableRelativeMode()
void EnableAbsLineDist(tools::Long nMinTwip)
std::unique_ptr< weld::CheckButton > m_xContextualCB
SvxParaPrevWindow m_aExampleWin
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
virtual void ActivatePage(const SfxItemSet &rSet) override
SvxRelativeField m_aBottomDist
std::unique_ptr< weld::Label > m_xAbsDist
static const WhichRangesContainer pStdRanges
virtual void ChangesApplied() override
SvxRelativeField m_aTopDist
std::unique_ptr< weld::MetricSpinButton > m_xLineDistAtPercentBox
SvxStdParagraphTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
void UpdateExample_Impl()
std::unique_ptr< weld::ComboBox > m_xLineDist
bool Insert(const SvxTabStop &rTab)
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
sal_uInt16 GetPropLeft() const
tools::Long GetTextLeft() const
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
sal_uInt16 GetPropLower() const
sal_uInt16 GetUpper() const
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
sal_uInt16 GetLower() const
sal_uInt16 GetPropUpper() const
void SetContextValue(const bool bC)
virtual void set_active(bool active)=0
void set_state(TriState eState)
#define DBG_ASSERT(sCon, aError)
SVXCORE_DLLPUBLIC OUString SvxResId(TranslateId aId)
virtual tools::Long GetValue() const override
SVXCORE_DLLPUBLIC FieldUnit GetModuleFieldUnit(const SfxItemSet &)
SVXCORE_DLLPUBLIC bool GetApplyCharUnit(const SfxItemSet &)
constexpr tools::Long MM50
#define LINK(Instance, Class, Member)
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
bool IsAsianTypographyEnabled()
static constexpr auto Items
static sal_uInt16 GetHtmlMode_Impl(const SfxItemSet &rSet)
#define LASTLINECOUNT_OLD
IMPL_LINK(SvxStdParagraphTabPage, LineDistHdl_Impl, weld::ComboBox &, rBox, void)
static void SetLineSpace_Impl(SvxLineSpacingItem &, int, tools::Long lValue=0)
#define LASTLINEPOS_DEFAULT
static void lcl_SetBox(const SfxItemSet &rSet, sal_uInt16 nSlotId, weld::CheckButton &rBox)
IMPL_LINK_NOARG(SvxStdParagraphTabPage, ELRLoseFocusHdl, weld::MetricSpinButton &, void)
#define LASTLINECOUNT_NEW
bool IsInvalidItem(const SfxPoolItem *pItem)
constexpr TypedWhichId< SdrTextVertAdjustItem > SDRATTR_TEXT_VERTADJUST(SDRATTR_MISC_FIRST+8)
SVT_DLLPUBLIC sal_Int64 GetCoreValue(const weld::MetricSpinButton &rField, MapUnit eUnit)
SVT_DLLPUBLIC void SetMetricValue(weld::MetricSpinButton &rField, sal_Int64 nCoreValue, MapUnit eUnit)
SVT_DLLPUBLIC void SetFieldUnit(weld::MetricSpinButton &rCtrl, FieldUnit eUnit, bool bAll=false)
SVT_DLLPUBLIC FieldUnit MapToFieldUnit(const MapUnit eUnit)
constexpr OUStringLiteral PERCENT(u"Percent")