21 #include <osl/diagnose.h>
27 #include <svx/svxids.hrc>
31 #include <svx/strings.hrc>
55 SID_ATTR_PARA_LINESPACE, SID_ATTR_PARA_LINESPACE,
56 SID_ATTR_LRSPACE, SID_ATTR_ULSPACE,
57 SID_ATTR_PARA_REGISTER, SID_ATTR_PARA_REGISTER
61 svl::Items<SID_ATTR_PARA_ADJUST, SID_ATTR_PARA_ADJUST>);
64 SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_WIDOWS,
65 SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP
68 #define MAX_DURCH 5670 // 10 cm makes sense as maximum interline lead
70 #define FIX_DIST_DEF 283 // standard fix distance 0,5 cm
140 sal_uInt16 nHtmlMode = 0;
146 pItem = pShell->
GetItem(SID_HTML_MODE);
180 nTmp =
nWidth - nR - MM50;
183 if ( aTmp.isEmpty() )
186 nTmp =
nWidth - nL - MM50;
189 if ( aTmp.isEmpty() )
202 return std::make_unique<SvxStdParagraphTabPage>(pPage, pController, *rSet);
211 bool bModified =
false;
221 nWhich =
GetWhich( SID_ATTR_PARA_LINESPACE );
224 static_cast<const SvxLineSpacingItem&>(
GetItemSet().
Get( nWhich )) );
249 OSL_FAIL(
"unknown LineDist entry" );
252 pOld =
GetOldItem( *rOutSet, SID_ATTR_PARA_LINESPACE );
255 !pOld || !( *static_cast<const SvxLineSpacingItem*>(pOld) == aSpacing ) ||
256 SfxItemState::DONTCARE ==
GetItemSet().GetItemState( nWhich ) )
258 rOutSet->
Put( aSpacing );
266 nWhich =
GetWhich( SID_ATTR_ULSPACE );
268 pOld =
GetOldItem( *rOutSet, SID_ATTR_ULSPACE );
280 static_cast<sal_uInt16
>(
m_xTopDist->get_value(FieldUnit::NONE)) );
286 static_cast<sal_uInt16
>(
m_xBottomDist->get_value(FieldUnit::NONE)) );
298 if ( !pOld || *static_cast<const SvxULSpaceItem*>(pOld) != aMargin ||
301 rOutSet->
Put( aMargin );
305 bool bNullTab =
false;
310 m_xAutoCB->get_state_changed_from_saved() )
312 nWhich =
GetWhich( SID_ATTR_LRSPACE );
315 pOld =
GetOldItem( *rOutSet, SID_ATTR_LRSPACE );
326 static_cast<sal_uInt16
>(
m_xLeftIndent->get_value(FieldUnit::NONE)) );
332 static_cast<sal_uInt16
>(
m_xRightIndent->get_value(FieldUnit::NONE)) );
338 static_cast<sal_uInt16
>(
m_xFLineIndent->get_value(FieldUnit::NONE)) );
352 if ( !pOld || *static_cast<const SvxLRSpaceItem*>(pOld) != aMargin ||
355 rOutSet->
Put( aMargin );
363 if ( MapUnit::Map100thMM != eUnit )
367 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_TABSTOP );
370 if ( rInSet.
GetItemState( _nWhich ) >= SfxItemState::DEFAULT )
377 rOutSet->
Put( aNullTab );
384 *rOutSet, SID_ATTR_PARA_REGISTER));
387 std::unique_ptr<SfxBoolItem> pRegItem(pBoolItem->
Clone());
388 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_PARA_REGISTER );
389 bool bSet = pRegItem->GetValue();
393 pRegItem->SetValue(!bSet);
394 rOutSet->
Put(*pRegItem);
397 else if ( SfxItemState::DEFAULT ==
GetItemSet().GetItemState( _nWhich,
false ) )
415 eFUnit = FieldUnit::CHAR;
420 if ( eFUnit == FieldUnit::CHAR )
433 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_LRSPACE );
436 if ( eItemState >= SfxItemState::DEFAULT )
502 _nWhich =
GetWhich( SID_ATTR_ULSPACE );
505 if ( eItemState >= SfxItemState::DEFAULT )
522 if (eFUnit == FieldUnit::CHAR)
537 if (eFUnit == FieldUnit::CHAR)
557 _nWhich =
GetWhich( SID_ATTR_PARA_LINESPACE );
560 if ( eItemState >= SfxItemState::DEFAULT )
565 _nWhich =
GetWhich( SID_ATTR_PARA_REGISTER );
568 if ( eItemState >= SfxItemState::DEFAULT )
614 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_PARA_ADJUST );
617 if ( eItemState < SfxItemState::DEFAULT )
622 if ( eAdjust == SvxAdjust::Center || eAdjust == SvxAdjust::Block )
624 _nWhich =
GetWhich( SID_ATTR_FRAMEDIRECTION );
627 if ( eItemState >= SfxItemState::DEFAULT )
632 m_aExampleWin.EnableRTL( SvxFrameDirection::Horizontal_RL_TB == eFrameDirection );
634 if ( eAdjust == SvxAdjust::Block )
641 eAdjust = SvxAdjust::Left;
655 return DeactivateRC::LeavePage;
659 :
SfxTabPage(pPage, pController,
"cui/ui/paraindentspacing.ui",
"ParaIndentSpacing", &rAttr)
662 , bRelativeMode(
false)
664 , m_xRightLabel(m_xBuilder->weld_label(
"labelFT_RIGHTINDENT"))
666 , m_xFLineLabel(m_xBuilder->weld_label(
"labelFT_FLINEINDENT"))
668 , m_xAutoCB(m_xBuilder->weld_check_button(
"checkCB_AUTO"))
671 , m_xContextualCB(m_xBuilder->weld_check_button(
"checkCB_CONTEXTUALSPACING"))
672 , m_xLineDist(m_xBuilder->weld_combo_box(
"comboLB_LINEDIST"))
673 , m_xLineDistAtPercentBox(m_xBuilder->weld_metric_spin_button(
"spinED_LINEDISTPERCENT",
FieldUnit::
PERCENT))
674 , m_xLineDistAtMetricBox(m_xBuilder->weld_metric_spin_button(
"spinED_LINEDISTMETRIC",
FieldUnit::
CM))
675 , m_xLineDistAtLabel(m_xBuilder->weld_label(
"labelFT_LINEDIST"))
676 , m_xAbsDist(m_xBuilder->weld_label(
"labelST_LINEDIST_ABS"))
677 , m_xRegisterCB(m_xBuilder->weld_check_button(
"checkCB_REGISTER"))
678 , m_xExampleWin(new
weld::CustomWeld(*m_xBuilder,
"drawingareaWN_EXAMPLE", m_aExampleWin))
712 case SvxLineSpaceRule::Auto:
719 case SvxInterLineSpaceRule::Off:
724 case SvxInterLineSpaceRule::Prop:
749 m_xLineDistAtPercentBox->set_value(m_xLineDistAtPercentBox->normalize(rAttr.
GetPropLineSpace()), FieldUnit::NONE);
753 case SvxInterLineSpaceRule::Fix:
761 case SvxLineSpaceRule::Fix:
766 case SvxLineSpaceRule::Min:
772 LineDistHdl_Impl( *m_xLineDist );
777 m_bLineDistToggled =
true;
782 switch (rBox.get_active())
788 m_xLineDistAtLabel->set_sensitive(
false);
789 m_xLineDistAtPercentBox->set_sensitive(
false);
790 m_xLineDistAtPercentBox->set_text(OUString());
791 m_xLineDistAtMetricBox->set_sensitive(
false);
792 m_xLineDistAtMetricBox->set_text(OUString());
798 m_xLineDistAtMetricBox->set_min(0, FieldUnit::NONE);
800 if (m_xLineDistAtMetricBox->get_text().isEmpty())
801 m_xLineDistAtMetricBox->set_value(m_xLineDistAtMetricBox->normalize(1), FieldUnit::NONE);
802 m_xLineDistAtPercentBox->hide();
803 m_xLineDistAtMetricBox->show();
804 m_xLineDistAtMetricBox->set_sensitive(
true);
805 m_xLineDistAtLabel->set_sensitive(
true);
809 m_xLineDistAtMetricBox->set_min(0, FieldUnit::NONE);
811 if (m_xLineDistAtMetricBox->get_text().isEmpty())
812 m_xLineDistAtMetricBox->set_value(m_xLineDistAtMetricBox->normalize(10), FieldUnit::TWIP);
813 m_xLineDistAtPercentBox->hide();
814 m_xLineDistAtMetricBox->show();
815 m_xLineDistAtMetricBox->set_sensitive(
true);
816 m_xLineDistAtLabel->set_sensitive(
true);
821 if (m_xLineDistAtPercentBox->get_text().isEmpty())
822 m_xLineDistAtPercentBox->set_value(m_xLineDistAtPercentBox->normalize(100), FieldUnit::TWIP);
823 m_xLineDistAtMetricBox->hide();
824 m_xLineDistAtPercentBox->show();
825 m_xLineDistAtPercentBox->set_sensitive(
true);
826 m_xLineDistAtLabel->set_sensitive(
true);
830 auto nTemp = m_xLineDistAtMetricBox->get_value(FieldUnit::NONE);
831 m_xLineDistAtMetricBox->set_min(m_xLineDistAtMetricBox->normalize(nMinFixDist), FieldUnit::TWIP);
835 if (m_xLineDistAtMetricBox->get_value(FieldUnit::NONE) != nTemp)
837 m_xLineDistAtPercentBox->hide();
838 m_xLineDistAtMetricBox->show();
839 m_xLineDistAtMetricBox->set_sensitive(
true);
840 m_xLineDistAtLabel->set_sensitive(
true);
844 UpdateExample_Impl();
849 UpdateExample_Impl();
914 bool bEnable = !rBox.get_active();
915 m_xFLineLabel->set_sensitive(bEnable);
916 m_xFLineIndent->set_sensitive(bEnable);
949 if (( 0x0001 & pFlagSetItem->GetValue())== 0x0001 )
952 if (( 0x0002 & pFlagSetItem->GetValue())== 0x0002 )
955 if ( ( 0x0004 & pFlagSetItem->GetValue())== 0x0004 )
964 if (( 0x0008 & pFlagSetItem->GetValue()) == 0x0008 )
967 if (( 0x0010 & pFlagSetItem->GetValue()) == 0x0010 )
972 #define LASTLINEPOS_DEFAULT 0
973 #define LASTLINEPOS_LEFT 1
975 #define LASTLINECOUNT_OLD 3
976 #define LASTLINECOUNT_NEW 4
979 :
SfxTabPage(pPage, pController,
"cui/ui/paragalignpage.ui",
"ParaAlignPage", &rSet)
980 , m_xLeft(m_xBuilder->weld_radio_button(
"radioBTN_LEFTALIGN"))
981 , m_xRight(m_xBuilder->weld_radio_button(
"radioBTN_RIGHTALIGN"))
982 , m_xCenter(m_xBuilder->weld_radio_button(
"radioBTN_CENTERALIGN"))
983 , m_xJustify(m_xBuilder->weld_radio_button(
"radioBTN_JUSTIFYALIGN"))
984 , m_xLeftBottom(m_xBuilder->weld_label(
"labelST_LEFTALIGN_ASIAN"))
985 , m_xRightTop(m_xBuilder->weld_label(
"labelST_RIGHTALIGN_ASIAN"))
986 , m_xLastLineFT(m_xBuilder->weld_label(
"labelLB_LASTLINE"))
987 , m_xLastLineLB(m_xBuilder->weld_combo_box(
"comboLB_LASTLINE"))
988 , m_xExpandCB(m_xBuilder->weld_check_button(
"checkCB_EXPAND"))
989 , m_xSnapToGridCB(m_xBuilder->weld_check_button(
"checkCB_SNAP"))
990 , m_xExampleWin(new
weld::CustomWeld(*m_xBuilder,
"drawingareaWN_EXAMPLE", m_aExampleWin))
991 , m_xVertAlignFL(m_xBuilder->weld_widget(
"frameFL_VERTALIGN"))
992 , m_xVertAlignLB(m_xBuilder->weld_combo_box(
"comboLB_VERTALIGN"))
993 , m_xPropertiesFL(m_xBuilder->weld_widget(
"framePROPERTIES"))
994 , m_xTextDirectionLB(new
svx::FrameDirectionListBox(m_xBuilder->weld_combo_box(
"comboLB_TEXTDIRECTION")))
1005 OUString sLeft(
m_xLeft->get_label());
1022 m_xLeft->connect_toggled(aLink);
1042 return DeactivateRC::LeavePage;
1047 return std::make_unique<SvxParaAlignTabPage>(pPage, pController, *rSet);
1052 bool bModified =
false;
1059 eAdjust = SvxAdjust::Left;
1064 eAdjust = SvxAdjust::Right;
1069 eAdjust = SvxAdjust::Center;
1074 eAdjust = SvxAdjust::Block;
1080 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_PARA_ADJUST );
1089 eLastBlock = SvxAdjust::Center;
1090 else if ( 2 == nLBPos )
1091 eLastBlock = SvxAdjust::Block;
1097 rOutSet->
Put( aAdj );
1133 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_PARA_ADJUST );
1136 sal_Int32 nLBSelect = 0;
1137 if ( eItemState >= SfxItemState::DEFAULT )
1143 case SvxAdjust::Left:
m_xLeft->set_active(
true);
break;
1145 case SvxAdjust::Right:
m_xRight->set_active(
true);
break;
1147 case SvxAdjust::Center:
m_xCenter->set_active(
true);
break;
1149 case SvxAdjust::Block:
m_xJustify->set_active(
true);
break;
1158 case SvxAdjust::Left: nLBSelect = 0;
break;
1160 case SvxAdjust::Center: nLBSelect = 1;
break;
1162 case SvxAdjust::Block: nLBSelect = 2;
break;
1165 m_xExpandCB->set_sensitive(bEnable && nLBSelect == 2);
1187 _nWhich =
GetWhich(SID_ATTR_PARA_SNAPTOGRID);
1189 if ( eItemState >= SfxItemState::DEFAULT )
1195 _nWhich =
GetWhich( SID_PARA_VERTALIGN );
1198 if ( eItemState >= SfxItemState::DEFAULT )
1207 _nWhich =
GetWhich( SID_ATTR_FRAMEDIRECTION );
1209 if( SfxItemState::DEFAULT <= rSet->GetItemState( _nWhich ) )
1243 bool bJustify = m_xJustify->get_active();
1244 m_xLastLineFT->set_sensitive(bJustify);
1245 m_xLastLineLB->set_sensitive(bJustify);
1246 bool bLastLineIsBlock = m_xLastLineLB->get_active() == 2;
1247 m_xExpandCB->set_sensitive(bJustify && bLastLineIsBlock);
1249 if (!m_xLastLineLB->get_sensitive())
1250 m_xLastLineLB->set_active(0);
1252 if (!m_xExpandCB->get_sensitive())
1253 m_xExpandCB->set_active(
false);
1254 UpdateExample_Impl();
1260 bool bLastLineIsBlock = m_xLastLineLB->get_active() == 2;
1261 m_xExpandCB->set_sensitive(bLastLineIsBlock);
1263 if (!m_xExpandCB->get_sensitive())
1264 m_xExpandCB->set_active(
false);
1265 UpdateExample_Impl();
1270 UpdateExample_Impl();
1292 case SvxFrameDirection::Environment :
1296 case SvxFrameDirection::Horizontal_RL_TB :
1300 case SvxFrameDirection::Horizontal_LR_TB :
1314 else if (nLBPos == 1)
1316 else if (nLBPos == 2)
1337 if (pBoolItem && pBoolItem->
GetValue())
1343 return std::make_unique<SvxExtParagraphTabPage>(pPage, pController, *rSet);
1348 bool bModified =
false;
1349 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_PARA_HYPHENZONE );
1360 static_cast<const SvxHyphenZoneItem&>(
GetItemSet().
Get( _nWhich )) );
1372 *static_cast<const SvxHyphenZoneItem*>(pOld) != aHyphen ||
1375 rOutSet->
Put( aHyphen );
1383 pOld =
GetOldItem( *rOutSet, SID_ATTR_PARA_PAGENUM );
1391 rOutSet->
Put( aPageNum );
1406 bool bIsPageModel =
false;
1416 bIsPageModel = !sPage.isEmpty();
1418 pOld =
GetOldItem( *rOutSet, SID_ATTR_PARA_MODEL );
1420 if ( !pOld || static_cast<const SvxPageModelItem*>(pOld)->
GetValue() != sPage )
1426 bIsPageModel =
false;
1429 bIsPageModel =
true;
1433 _nWhich =
GetWhich( SID_ATTR_PARA_PAGEBREAK );
1449 static_cast<const SvxFormatBreakItem&>(
GetItemSet().
Get( _nWhich )));
1461 aBreak.SetValue( SvxBreak::PageBefore );
1463 aBreak.SetValue( SvxBreak::PageAfter );
1468 aBreak.SetValue( SvxBreak::ColumnBefore );
1470 aBreak.SetValue( SvxBreak::ColumnAfter );
1476 aBreak.SetValue( SvxBreak::NONE );
1480 pOld =
GetOldItem( *rOutSet, SID_ATTR_PARA_PAGEBREAK );
1486 rOutSet->
Put( aBreak );
1492 _nWhich =
GetWhich( SID_ATTR_PARA_SPLIT );
1497 pOld =
GetOldItem( *rOutSet, SID_ATTR_PARA_SPLIT );
1499 if ( !pOld || static_cast<const SvxFormatSplitItem*>(pOld)->
GetValue() !=
1508 _nWhich =
GetWhich( SID_ATTR_PARA_KEEP );
1519 _nWhich =
GetWhich( SID_ATTR_PARA_WIDOWS );
1522 if (
m_xWidowBox->get_state_changed_from_saved() ||
1526 static_cast<sal_uInt8>(
m_xWidowRowNo->get_value()) : 0, _nWhich );
1527 pOld =
GetOldItem( *rOutSet, SID_ATTR_PARA_WIDOWS );
1529 if (
m_xWidowBox->get_state_changed_from_saved() || !pOld || !( *
static_cast<const SvxWidowsItem*
>(pOld) == rItem ) )
1531 rOutSet->
Put( rItem );
1536 _nWhich =
GetWhich( SID_ATTR_PARA_ORPHANS );
1543 static_cast<sal_uInt8>(
m_xOrphanRowNo->get_value()) : 0, _nWhich );
1544 pOld =
GetOldItem( *rOutSet, SID_ATTR_PARA_ORPHANS );
1550 rOutSet->
Put( rItem );
1559 sal_uInt16 _nWhich =
GetWhich( SID_ATTR_PARA_HYPHENZONE );
1562 bool bItemAvailable = eItemState >= SfxItemState::DEFAULT;
1563 bool bIsHyphen =
false;
1583 bool bEnable = bItemAvailable && bIsHyphen;
1594 case SfxItemState::SET:
1599 const sal_uInt16 nPageNum(pItem->
GetValue());
1603 case SfxItemState::DONTCARE:
1609 case SfxItemState::UNKNOWN:
1610 case SfxItemState::DEFAULT:
1611 case SfxItemState::DISABLED:
1625 bool bIsPageModel =
false;
1626 eItemState = rSet->
GetItemState( SID_ATTR_PARA_MODEL );
1628 if ( eItemState >= SfxItemState::SET )
1633 const OUString&
aStr( rModel.GetValue() );
1639 bIsPageModel =
true;
1661 else if ( SfxItemState::DONTCARE == eItemState )
1675 if ( !bIsPageModel )
1677 _nWhich =
GetWhich( SID_ATTR_PARA_PAGEBREAK );
1680 if ( eItemState >= SfxItemState::DEFAULT )
1698 bool _bEnable = eBreak != SvxBreak::NONE &&
1699 eBreak != SvxBreak::ColumnBefore &&
1700 eBreak != SvxBreak::ColumnAfter;
1709 if ( eBreak == SvxBreak::NONE )
1712 sal_Int32
nType = 0;
1713 sal_Int32 nPosition = 0;
1716 case SvxBreak::PageBefore:
1718 case SvxBreak::PageAfter:
1721 case SvxBreak::ColumnBefore:
1724 case SvxBreak::ColumnAfter:
1733 else if ( SfxItemState::DONTCARE == eItemState )
1749 _nWhich =
GetWhich( SID_ATTR_PARA_KEEP );
1752 if ( eItemState >= SfxItemState::DEFAULT )
1758 if ( rKeep.GetValue() )
1763 else if ( SfxItemState::DONTCARE == eItemState )
1768 _nWhich =
GetWhich( SID_ATTR_PARA_SPLIT );
1771 if ( eItemState >= SfxItemState::DEFAULT )
1777 if ( !rSplit.GetValue() )
1788 _nWhich =
GetWhich( SID_ATTR_PARA_WIDOWS );
1791 if ( eTmpState >= SfxItemState::DEFAULT )
1796 const sal_uInt16 nLines = rWidow.GetValue();
1798 bool _bEnable = nLines > 0;
1803 else if ( SfxItemState::DONTCARE == eTmpState )
1808 _nWhich =
GetWhich( SID_ATTR_PARA_ORPHANS );
1811 if ( eTmpState >= SfxItemState::DEFAULT )
1815 const sal_uInt16 nLines = rOrphan.GetValue();
1818 bool _bEnable = nLines > 0;
1825 else if ( SfxItemState::DONTCARE == eTmpState )
1831 else if ( SfxItemState::DONTCARE == eItemState )
1868 return DeactivateRC::LeavePage;
1885 :
SfxTabPage(pPage, pController,
"cui/ui/textflowpage.ui",
"TextFlowPage", &rAttr)
1890 , m_xHyphenBox(m_xBuilder->weld_check_button(
"checkAuto"))
1891 , m_xHyphenNoCapsBox(m_xBuilder->weld_check_button(
"checkNoCaps"))
1892 , m_xBeforeText(m_xBuilder->weld_label(
"labelLineBegin"))
1893 , m_xExtHyphenBeforeBox(m_xBuilder->weld_spin_button(
"spinLineEnd"))
1894 , m_xAfterText(m_xBuilder->weld_label(
"labelLineEnd"))
1895 , m_xExtHyphenAfterBox(m_xBuilder->weld_spin_button(
"spinLineBegin"))
1896 , m_xMaxHyphenLabel(m_xBuilder->weld_label(
"labelMaxNum"))
1897 , m_xMaxHyphenEdit(m_xBuilder->weld_spin_button(
"spinMaxNum"))
1899 , m_xPageBreakBox(m_xBuilder->weld_check_button(
"checkInsert"))
1900 , m_xBreakTypeFT(m_xBuilder->weld_label(
"labelType"))
1901 , m_xBreakTypeLB(m_xBuilder->weld_combo_box(
"comboBreakType"))
1902 , m_xBreakPositionFT(m_xBuilder->weld_label(
"labelPosition"))
1903 , m_xBreakPositionLB(m_xBuilder->weld_combo_box(
"comboBreakPosition"))
1904 , m_xApplyCollBtn(m_xBuilder->weld_check_button(
"checkPageStyle"))
1905 , m_xApplyCollBox(m_xBuilder->weld_combo_box(
"comboPageStyle"))
1906 , m_xPageNumBox(m_xBuilder->weld_check_button(
"labelPageNum"))
1907 , m_xPagenumEdit(m_xBuilder->weld_spin_button(
"spinPageNumber"))
1909 , m_xKeepTogetherBox(m_xBuilder->weld_check_button(
"checkSplitPara"))
1910 , m_xKeepParaBox(m_xBuilder->weld_check_button(
"checkKeepPara"))
1911 , m_xOrphanBox(m_xBuilder->weld_check_button(
"checkOrphan"))
1912 , m_xOrphanRowNo(m_xBuilder->weld_spin_button(
"spinOrphan"))
1913 , m_xOrphanRowLabel(m_xBuilder->weld_label(
"labelOrphan"))
1914 , m_xWidowBox(m_xBuilder->weld_check_button(
"checkWidow"))
1915 , m_xWidowRowNo(m_xBuilder->weld_spin_button(
"spinWidow"))
1916 , m_xWidowRowLabel(m_xBuilder->weld_label(
"labelWidow"))
1943 if ( aStdName.isEmpty() )
1947 pStyle = pPool->
Next();
2017 aPageBreakState.ButtonToggled(rToggle);
2030 aKeepTogetherState.ButtonToggled(rToggle);
2056 aWidowState.ButtonToggled(rToggle);
2062 aOrphanState.ButtonToggled(rToggle);
2102 aHyphenState.ButtonToggled(rToggle);
2108 bool bEnable =
false;
2128 aApplyCollState.ButtonToggled(rToggle);
2129 ApplyCollClickHdl();
2134 if (0 == rListBox.get_active())
2136 m_xApplyCollBtn->set_sensitive(
true);
2138 bool bEnable = m_xApplyCollBtn->get_state() ==
TRISTATE_TRUE && m_xApplyCollBox->get_count();
2140 m_xApplyCollBox->set_sensitive(bEnable);
2143 m_xPageNumBox->set_sensitive(bEnable);
2144 m_xPagenumEdit->set_sensitive(bEnable && m_xPageNumBox->get_state() ==
TRISTATE_TRUE);
2147 else if (1 == rListBox.get_active())
2150 m_xApplyCollBtn->set_sensitive(
false);
2151 m_xApplyCollBox->set_sensitive(
false);
2152 m_xPageNumBox->set_sensitive(
false);
2153 m_xPagenumEdit->set_sensitive(
false);
2160 int nBreakPos = m_xBreakPositionLB->get_active();
2161 if (rListBox.get_active() == 1 || 1 == nBreakPos)
2164 m_xApplyCollBtn->set_sensitive(
false);
2165 m_xApplyCollBox->set_sensitive(
false);
2166 m_xPageNumBox->set_sensitive(
false);
2167 m_xPagenumEdit->set_sensitive(
false);
2170 PageBreakPosHdl_Impl(*m_xBreakPositionLB);
2180 aPageNumState.ButtonToggled(rToggle);
2181 PageNumBoxClickHdl();
2186 aKeepParaState.ButtonToggled(rToggle);
2193 if (pDisablePageBreakItem)
2194 if ( pDisablePageBreakItem->
GetValue())
2199 :
SfxTabPage(pPage, pController,
"cui/ui/asiantypography.ui",
"AsianTypography", &rSet)
2200 , m_xForbiddenRulesCB(m_xBuilder->weld_check_button(
"checkForbidList"))
2201 , m_xHangingPunctCB(m_xBuilder->weld_check_button(
"checkHangPunct"))
2202 , m_xScriptSpaceCB(m_xBuilder->weld_check_button(
"checkApplySpacing"))
2212 return std::make_unique<SvxAsianTabPage>(pPage, pController, *rSet);
2217 return WhichRangesContainer(svl::Items<SID_ATTR_PARA_SCRIPTSPACE, SID_ATTR_PARA_FORBIDDEN_RULES>);
2226 std::unique_ptr<SfxBoolItem> pNewItem(static_cast<SfxBoolItem*>(rSet->
Get(
2229 rSet->
Put(std::move(pNewItem));
2234 std::unique_ptr<SfxBoolItem> pNewItem(static_cast<SfxBoolItem*>(rSet->
Get(
2237 rSet->
Put(std::move(pNewItem));
2242 std::unique_ptr<SfxBoolItem> pNewItem(static_cast<SfxBoolItem*>(rSet->
Get(
2245 rSet->
Put(std::move(pNewItem));
2255 if( eState == SfxItemState::UNKNOWN || eState == SfxItemState::DISABLED )
2257 else if(eState >= SfxItemState::DEFAULT)
std::unique_ptr< weld::CheckButton > m_xRegisterCB
#define LINK(Instance, Class, Member)
constexpr tools::Long MM50
SfxStyleSheetBase * First(SfxStyleFamily eFamily, SfxStyleSearchBits eMask=SfxStyleSearchBits::All)
sal_uInt8 & GetMaxHyphens()
void SetFieldUnit(weld::MetricSpinButton &rField, FieldUnit eUnit, bool bAll)
SvxStdParagraphTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
weld::TriStateEnabled aOrphanState
void SetAdjust(SvxAdjust eNew)
bool Insert(const SvxTabStop &rTab)
void SetMetricValue(weld::MetricSpinButton &rField, sal_Int64 nCoreValue, MapUnit eUnit)
void SetRight(const tools::Long nR, const sal_uInt16 nProp=100)
sal_uInt16 GetPropLineSpace() const
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
virtual void PageCreated(const SfxAllItemSet &aSet) override
void SetHyphen(const bool bNew)
void set_state(TriState eState)
std::unique_ptr< weld::Label > m_xWidowRowLabel
virtual SfxBoolItem * Clone(SfxItemPool *=nullptr) const override
sal_uInt16 GetLower() const
SvxAdjust GetAdjust() const
std::unique_ptr< weld::ComboBox > m_xLineDist
void SetLower(sal_uInt16 nNew)
void SetInterLineSpace(const short nSpace)
virtual void ChangesApplied() override
void SetFirstLineOffset(short nNew)
std::unique_ptr< weld::RadioButton > m_xLeft
static constexpr auto Items
static WhichRangesContainer GetRanges()
std::unique_ptr< weld::MetricSpinButton > m_xLineDistAtPercentBox
void SetRightMargin(tools::Long nNew)
std::unique_ptr< weld::CheckButton > m_xHyphenNoCapsBox
IMPL_LINK(SvxStdParagraphTabPage, LineDistHdl_Impl, weld::ComboBox &, rBox, void)
std::unique_ptr< weld::Label > m_xBreakPositionFT
std::unique_ptr< weld::Label > m_xOrphanRowLabel
bool IsNoCapsHyphenation() const
std::unique_ptr< weld::ComboBox > m_xApplyCollBox
tools::Long GetRight() const
virtual void Reset(const SfxItemSet *rSet) override
std::unique_ptr< weld::CheckButton > m_xWidowBox
constexpr OUStringLiteral PERCENT(u"Percent")
#define LASTLINECOUNT_OLD
virtual ~SvxExtParagraphTabPage() override
virtual void ActivatePage(const SfxItemSet &rSet) override
sal_uInt16 GetPropTextFirstLineOffset() const
SvxExtParagraphTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
sal_uInt16 GetValue() const
std::unique_ptr< weld::CheckButton > m_xHangingPunctCB
weld::TriStateEnabled aApplyCollState
std::unique_ptr< weld::RadioButton > m_xRight
void EnableAbsLineDist(tools::Long nMinTwip)
std::unique_ptr< weld::CheckButton > m_xSnapToGridCB
std::unique_ptr< weld::Label > m_xAfterText
std::unique_ptr< weld::ComboBox > m_xBreakTypeLB
std::unique_ptr< SvxRelativeField > m_xLeftIndent
void EnableAutoFirstLine()
static SfxObjectShell * Current()
std::unique_ptr< weld::Label > m_xLeftBottom
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
void SetLineSpaceRule(SvxLineSpaceRule e)
sal_uInt16 GetPropLower() const
SvxAdjust GetOneWord() const
virtual void ActivatePage(const SfxItemSet &rSet) override
SvxLineSpaceRule GetLineSpaceRule() const
virtual bool FillItemSet(SfxItemSet *rSet) override
std::unique_ptr< SvxRelativeField > m_xRightIndent
FieldUnit GetModuleFieldUnit(const SfxItemSet &rSet)
std::unique_ptr< weld::SpinButton > m_xWidowRowNo
void SetLastBlock(const SvxAdjust eType)
virtual SfxStyleSheetBasePool * GetStyleSheetPool()
std::unique_ptr< SvxRelativeField > m_xBottomDist
virtual MapUnit GetMetric(sal_uInt16 nWhich) const
static sal_uInt16 GetHtmlMode_Impl(const SfxItemSet &rSet)
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
sal_uInt16 GetLineHeight() const
void SetPropLineSpace(const sal_uInt16 nProp)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
#define LASTLINEPOS_DEFAULT
const OUString & GetName() const
virtual void ChangesApplied() override
void SetExchangeSupport()
OUString SvxResId(TranslateId aId)
void SetOneWord(const SvxAdjust eType)
void SetUpper(sal_uInt16 nNew)
weld::TriStateEnabled aPageBreakState
std::unique_ptr< svx::FrameDirectionListBox > m_xTextDirectionLB
std::unique_ptr< weld::Label > m_xMaxHyphenLabel
std::unique_ptr< weld::SpinButton > m_xExtHyphenBeforeBox
std::unique_ptr< weld::Label > m_xLastLineFT
virtual ~SvxAsianTabPage() override
static const WhichRangesContainer pStdRanges
SvxParaPrevWindow m_aExampleWin
void SetLower(const sal_uInt16 nL, const sal_uInt16 nProp=100)
virtual ~SvxStdParagraphTabPage() override
std::unique_ptr< weld::CheckButton > m_xForbiddenRulesCB
const SfxItemSet & GetItemSet() const
virtual bool FillItemSet(SfxItemSet *rSet) override
void EnableRelativeMode()
virtual tools::Long GetValue() const override
sal_uInt16 GetPropRight() const
std::unique_ptr< weld::SpinButton > m_xOrphanRowNo
const SfxPoolItem * GetItem(sal_uInt16 nSlotId) const
const SfxPoolItem * GetOldItem(const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true)
std::unique_ptr< weld::CheckButton > m_xKeepParaBox
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
tools::Long GetTextLeft() const
sal_uInt16 ClearItem(sal_uInt16 nWhich=0)
void EnableContextualMode()
const SfxItemSet * GetParent() const
std::unique_ptr< weld::CheckButton > m_xApplyCollBtn
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
#define DBG_ASSERT(sCon, aError)
virtual void Reset(const SfxItemSet *rSet) override
Reference< XAnimationNode > Clone(const Reference< XAnimationNode > &xSourceNode, const SdPage *pSource, const SdPage *pTarget)
std::unique_ptr< weld::Label > m_xRightTop
std::unique_ptr< weld::CheckButton > m_xContextualCB
static const WhichRangesContainer pExtRanges
std::unique_ptr< weld::Label > m_xBeforeText
std::unique_ptr< weld::ComboBox > m_xBreakPositionLB
std::unique_ptr< weld::CheckButton > m_xScriptSpaceCB
void UpdateExample_Impl()
std::unique_ptr< weld::MetricSpinButton > m_xLineDistAtMetricBox
std::unique_ptr< weld::SpinButton > m_xMaxHyphenEdit
std::unique_ptr< weld::SpinButton > m_xPagenumEdit
sal_uInt16 GetPropLeft() const
virtual void set_active(bool active)=0
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
SvxAdjust GetLastBlock() const
std::unique_ptr< weld::RadioButton > m_xJustify
SvxAsianTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
static const WhichRangesContainer pAlignRanges
static bool GetLayoutRTL()
std::unique_ptr< weld::Label > m_xBreakTypeFT
bool IsAsianTypographyEnabled()
SvxInterLineSpaceRule GetInterLineSpaceRule() const
short GetTextFirstLineOffset() const
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< weld::RadioButton > m_xCenter
SvxParaPrevWindow m_aExampleWin
virtual void ChangesApplied() override
void SetAdjust(const SvxAdjust eType)
virtual void ChangesApplied() override
SfxItemPool * GetPool() const
short GetInterLineSpace() const
std::unique_ptr< weld::SpinButton > m_xExtHyphenAfterBox
void EnableNegativeMode()
void UpdateExample_Impl()
virtual void PageCreated(const SfxAllItemSet &aSet) override
weld::TriStateEnabled aPageNumState
weld::TriStateEnabled aKeepParaState
void SetNoCapsHyphenation(const bool bNew)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
void EnableRegisterMode()
void SetInterLineSpaceRule(SvxInterLineSpaceRule e)
void DisableItem(sal_uInt16 nWhich)
static void lcl_SetBox(const SfxItemSet &rSet, sal_uInt16 nSlotId, weld::CheckButton &rBox)
weld::TriStateEnabled aHyphenState
weld::TriStateEnabled aKeepTogetherState
virtual void Reset(const SfxItemSet *rSet) override
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
std::unique_ptr< weld::ComboBox > m_xVertAlignLB
std::unique_ptr< weld::CheckButton > m_xAutoCB
sal_Int64 GetCoreValue(const weld::MetricSpinButton &rField, MapUnit eUnit)
void SetLineHeight(const sal_uInt16 nHeight)
void SetLineSpace(SvxPrevLineSpace eNew)
std::unique_ptr< weld::CheckButton > m_xOrphanBox
SfxStyleSheetBase * Next()
std::unique_ptr< weld::CheckButton > m_xKeepTogetherBox
virtual ~SvxParaAlignTabPage() override
std::unique_ptr< weld::Label > m_xAbsDist
void SetContextValue(const bool bC)
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< weld::Widget > m_xVertAlignFL
#define LASTLINECOUNT_NEW
weld::TriStateEnabled aWidowState
virtual void PageCreated(const SfxAllItemSet &aSet) override
void SetLeftMargin(tools::Long nNew)
std::unique_ptr< weld::ComboBox > m_xLastLineLB
void SetLastLine(SvxAdjust eNew)
FieldUnit MapToFieldUnit(const MapUnit eUnit)
IMPL_LINK_NOARG(SvxStdParagraphTabPage, ELRLoseFocusHdl, weld::MetricSpinButton &, void)
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
std::unique_ptr< weld::CheckButton > m_xPageNumBox
static OUString EraseAllMnemonicChars(const OUString &rStr)
std::unique_ptr< SvxRelativeField > m_xTopDist
std::unique_ptr< weld::CheckButton > m_xExpandCB
std::unique_ptr< SvxRelativeField > m_xFLineIndent
static void SetLineSpace_Impl(SvxLineSpacingItem &, int, tools::Long lValue=0)
virtual bool FillItemSet(SfxItemSet *rSet) override
bool IsInvalidItem(const SfxPoolItem *pItem)
void SetAutoFirst(const bool bNew)
std::unique_ptr< weld::CheckButton > m_xHyphenBox
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
virtual bool FillItemSet(SfxItemSet *rSet) override
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
void SetUpper(const sal_uInt16 nU, const sal_uInt16 nProp=100)
bool GetApplyCharUnit(const SfxItemSet &rSet)
void SetLineSpacing_Impl(const SvxLineSpacingItem &rAttr)
sal_uInt8 & GetMinTrail()
SvxParaAlignTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
virtual void Reset(const SfxItemSet *rSet) override
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
std::unique_ptr< weld::CheckButton > m_xPageBreakBox
void PageNumBoxClickHdl()
sal_uInt16 GetUpper() const
bool m_bDetectedRangeSegmentation false
sal_uInt16 GetPropUpper() const