20#include <com/sun/star/text/VertOrientation.hpp>
47#include <com/sun/star/style/NumberingType.hpp>
48#include <com/sun/star/lang/XMultiServiceFactory.hpp>
49#include <com/sun/star/container/XIndexAccess.hpp>
50#include <com/sun/star/text/XDefaultNumberingProvider.hpp>
51#include <com/sun/star/text/XNumberingFormatter.hpp>
52#include <com/sun/star/beans/PropertyValue.hpp>
55#include <svx/svxids.hrc>
68#include <com/sun/star/ucb/SimpleFileAccess.hpp>
75#include <osl/diagnose.h>
78using namespace css::uno;
79using namespace css::beans;
80using namespace css::lang;
81using namespace css::text;
82using namespace css::container;
83using namespace css::style;
85#define SHOW_NUMBERING 0
89#define MAX_BMP_WIDTH 16
90#define MAX_BMP_HEIGHT 16
91#define SEARCHPATH_DELIMITER u';'
92#define SEARCHFILENAME_DELIMITER u'/'
98 const PropertyValue*
pValues = rLevelProps.getConstArray();
100 for(sal_Int32 j = 0; j < rLevelProps.getLength(); j++)
139 sal_uInt16 nMask = 1;
142 if(nLevelMask & nMask)
143 bRet |=
nullptr != pNum->
Get(
i );
161 return aDefBulletFont;
165 :
SfxTabPage(pPage, pController,
"cui/ui/picknumberingpage.ui",
"PickNumberingPage", &
rSet)
169 , nNumItemId(SID_ATTR_NUMBERING_RULE)
170 , m_xExamplesVS(new
SvxNumValueSet(m_xBuilder->weld_scrolled_window(
"valuesetwin", true)))
171 , m_xExamplesVSWin(new
weld::CustomWeld(*m_xBuilder,
"valueset", *m_xExamplesVS))
182 Sequence< Sequence< PropertyValue > > aNumberings;
187 xDefNum->getDefaultContinuousNumberingLevels( rLocale );
192 const Sequence<PropertyValue>* pValuesArr = aNumberings.getConstArray();
202 Reference<XNumberingFormatter> xFormat(xDefNum, UNO_QUERY);
203 m_xExamplesVS->SetNumberingSettings(aNumberings, xFormat, rLocale);
215 return std::make_unique<SvxSingleNumPickTabPage>(pPage, pController, *rAttrSet);
233 bool bIsPreset =
false;
238 bIsPreset = pPresetItem->GetValue();
267 return DeactivateRC::LeavePage;
276 if(eState != SfxItemState::SET)
281 if( eState != SfxItemState::SET )
284 eState = SfxItemState::SET;
287 DBG_ASSERT(eState == SfxItemState::SET,
"no item found!");
303 sal_uInt16 nIdx = m_xExamplesVS->GetSelectedItemId() - 1;
304 DBG_ASSERT(aNumSettingsArr.size() > nIdx,
"wrong index");
305 if(aNumSettingsArr.size() <= nIdx)
312 sal_uInt16 nMask = 1;
313 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
315 if(nActNumLvl & nMask)
320 cLocalSuffix ==
' ' ?
"" : _pSet->
sSuffix,
i);
323 pActNum->SetLevel(
i, aFmt);
331 NumSelectHdl_Impl(m_xExamplesVS.get());
332 weld::Button& rOk = GetDialogController()->GetOKButton();
337 :
SfxTabPage(pPage, pController,
"cui/ui/pickbulletpage.ui",
"PickBulletPage", &
rSet)
341 , nNumItemId(SID_ATTR_NUMBERING_RULE)
342 , m_xExamplesVS(new
SvxNumValueSet(m_xBuilder->weld_scrolled_window(
"valuesetwin", true)))
343 , m_xExamplesVSWin(new
weld::CustomWeld(*m_xBuilder,
"valueset", *m_xExamplesVS))
360 return std::make_unique<SvxBulletPickTabPage>(pPage, pController, *rAttrSet);
377 bool bIsPreset =
false;
382 bIsPreset = pPresetItem->GetValue();
410 return DeactivateRC::LeavePage;
446 sal_uInt16 nMask = 1;
447 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
449 if(nActNumLvl & nMask)
459 pActNum->SetLevel(
i, aFmt);
467 NumSelectHdl_Impl(m_xExamplesVS.get());
468 weld::Button& rOk = GetDialogController()->GetOKButton();
481 :
SfxTabPage(pPage, pController,
"cui/ui/pickoutlinepage.ui",
"PickOutlinePage", &
rSet)
483 , nNumItemId(SID_ATTR_NUMBERING_RULE)
486 , m_xExamplesVS(new
SvxNumValueSet(m_xBuilder->weld_scrolled_window(
"valuesetwin", true)))
487 , m_xExamplesVSWin(new
weld::CustomWeld(*m_xBuilder,
"valueset", *m_xExamplesVS))
499 Sequence<Reference<XIndexAccess> > aOutlineAccess;
503 aOutlineAccess = xDefNum->getDefaultOutlineNumberings( rLocale );
505 for(sal_Int32 nItem = 0;
511 Reference<XIndexAccess> xLevel = aOutlineAccess.getConstArray()[nItem];
512 for(sal_Int32 nLevel = 0; nLevel <
SVX_MAX_NUM; nLevel++)
515 sal_Int32 nLocaleLevel = std::min(nLevel, xLevel->getCount() - 1);
516 Sequence<PropertyValue> aLevelProps;
517 if (nLocaleLevel >= 0)
518 xLevel->getByIndex(nLocaleLevel) >>= aLevelProps;
521 rItemArr.push_back( std::unique_ptr<SvxNumSettings_Impl>(pNew) );
528 Reference<XNumberingFormatter> xFormat(xDefNum, UNO_QUERY);
529 m_xExamplesVS->SetOutlineNumberingSettings(aOutlineAccess, xFormat, rLocale);
541 return std::make_unique<SvxNumPickTabPage>(pPage, pController, *rAttrSet);
558 bool bIsPreset =
false;
563 bIsPreset = pPresetItem->GetValue();
591 return DeactivateRC::LeavePage;
632 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
634 if(rItemArr.size() >
i)
635 pLevelSettings = rItemArr[
i].get();
640 sal_uInt16 nUpperLevelOrChar =
static_cast<sal_uInt16
>(pLevelSettings->
nParentNumbering);
655 ->GetItem( SID_ATTR_CHAR_FONTLIST ));
656 pList = pFontListItem ? pFontListItem->
GetFontList() :
nullptr;
670 OUString(),
Size( 0, 14 ) );
671 aCreateFont.
SetCharSet( RTL_TEXTENCODING_DONTKNOW );
691 aFmt.
SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != nUpperLevelOrChar ? pActNum->GetLevelCount() : 1));
702 pActNum->SetLevel(
i, aFmt);
708 NumSelectHdl_Impl(m_xExamplesVS.get());
709 weld::Button& rOk = GetDialogController()->GetOKButton();
719 if (pNumCharFmt &&pBulletCharFmt)
724 :
SfxTabPage(pPage, pController,
"cui/ui/pickgraphicpage.ui",
"PickGraphicPage", &
rSet)
726 , nNumItemId(SID_ATTR_NUMBERING_RULE)
729 , m_xErrorText(m_xBuilder->weld_label(
"errorft"))
730 , m_xBtBrowseFile(m_xBuilder->weld_button(
"browseBtn"))
731 , m_xExamplesVS(new
SvxBmpNumValueSet(m_xBuilder->weld_scrolled_window(
"valuesetwin", true)))
732 , m_xExamplesVSWin(new
weld::CustomWeld(*m_xBuilder,
"valueset", *m_xExamplesVS))
784 return std::make_unique<SvxBitmapPickTabPage>(pPage, pController, *rAttrSet);
790 bool bIsPreset =
false;
795 bIsPreset = pPresetItem->GetValue();
824 return DeactivateRC::LeavePage;
874 sal_uInt16 nIdx = m_xExamplesVS->GetSelectedItemId() - 1;
876 sal_uInt16 nMask = 1;
877 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
879 if(nActNumLvl & nMask)
890 sal_Int16 eOrient = text::VertOrientation::LINE_CENTER;
895 else if(aGrfNames.size() > nIdx)
897 pActNum->SetLevel(
i, aFmt);
905 NumSelectHdl_Impl(m_xExamplesVS.get());
906 weld::Button& rOk = GetDialogController()->GetOKButton();
921 OUString aUserImageURL = aFileDialog.
GetPath();
926 aFileName = aUserImageURL;
927 else if (
nPos<aUserImageURL.getLength())
928 aFileName = aUserImageURL.copy(
nPos);
930 OUString aUserGalleryURL = OUString::Concat(aPathToken) +
"/" + aFileName;
932 DBG_ASSERT(
aURL.GetProtocol() != INetProtocol::NotValid,
"invalid URL" );
935 if (!aDescriptor.
Detect())
940 ucb::SimpleFileAccess::create( ::comphelper::getComponentContext(
xFactory) ) );
941 if ( !xSimpleFileAccess->exists( aUserImageURL ))
944 xSimpleFileAccess->copy( aUserImageURL, aUserGalleryURL );
957 double ratio = nPixelY/
static_cast<double>(nPixelX);
969 aBitmap.
Scale(
Size( nPixelX, nPixelY ), BmpScaleFlag::Fast );
970 Graphic aScaledGraphic( aBitmap );
973 Sequence< PropertyValue > aFilterData{
979 rFilter.
ExportGraphic( aScaledGraphic, gURL , nFilterFormat, &aFilterData );
982 aGrfNames.push_back(aUserGalleryURL);
984 for (
auto & grfName : aGrfNames)
986 m_xExamplesVS->InsertItem(
i + 1,
i);
994 m_xExamplesVS->SetItemText(
i + 1, grfName );
998 if(aGrfNames.empty())
1000 m_xErrorText->show();
1004 m_xExamplesVS->Show();
1005 m_xExamplesVS->SetFormat();
1012 :
SfxTabPage(pPage, pController,
"cui/ui/numberingoptionspage.ui",
"NumberingOptionsPage", &
rSet)
1013 , aInvalidateTimer(
"cui SvxNumOptionsTabPage aInvalidateTimer")
1014 , m_pLevelHdlEvent(nullptr)
1015 , bLastWidthModified(false)
1018 , bAutomaticCharStyles(true)
1022 , nNumItemId(SID_ATTR_NUMBERING_RULE)
1023 , m_xGrid(m_xBuilder->weld_widget(
"grid2"))
1024 , m_xLevelLB(m_xBuilder->weld_tree_view(
"levellb"))
1025 , m_xFmtLB(m_xBuilder->weld_combo_box(
"numfmtlb"))
1026 , m_xSeparatorFT(m_xBuilder->weld_label(
"separator"))
1027 , m_xPrefixFT(m_xBuilder->weld_label(
"prefixft"))
1028 , m_xPrefixED(m_xBuilder->weld_entry(
"prefix"))
1029 , m_xSuffixFT(m_xBuilder->weld_label(
"suffixft"))
1030 , m_xSuffixED(m_xBuilder->weld_entry(
"suffix"))
1031 , m_xCharFmtFT(m_xBuilder->weld_label(
"charstyleft"))
1032 , m_xCharFmtLB(m_xBuilder->weld_combo_box(
"charstyle"))
1033 , m_xBulColorFT(m_xBuilder->weld_label(
"colorft"))
1034 , m_xBulColLB(new
ColorListBox(m_xBuilder->weld_menu_button(
"color"),
1036 , m_xBulRelSizeFT(m_xBuilder->weld_label(
"relsizeft"))
1037 , m_xBulRelSizeMF(m_xBuilder->weld_metric_spin_button(
"relsize", FieldUnit::PERCENT))
1038 , m_xAllLevelFT(m_xBuilder->weld_label(
"sublevelsft"))
1039 , m_xAllLevelNF(m_xBuilder->weld_spin_button(
"sublevels"))
1040 , m_xIsLegalCB(m_xBuilder->weld_check_button(
"islegal"))
1041 , m_xStartFT(m_xBuilder->weld_label(
"startatft"))
1042 , m_xStartED(m_xBuilder->weld_spin_button(
"startat"))
1043 , m_xBulletFT(m_xBuilder->weld_label(
"bulletft"))
1044 , m_xBulletPB(m_xBuilder->weld_button(
"bullet"))
1045 , m_xBitmapFT(m_xBuilder->weld_label(
"bitmapft"))
1046 , m_xBitmapMB(m_xBuilder->weld_menu_button(
"bitmap"))
1047 , m_xWidthFT(m_xBuilder->weld_label(
"widthft"))
1048 , m_xWidthMF(m_xBuilder->weld_metric_spin_button(
"widthmf", FieldUnit::CM))
1049 , m_xHeightFT(m_xBuilder->weld_label(
"heightft"))
1050 , m_xHeightMF(m_xBuilder->weld_metric_spin_button(
"heightmf", FieldUnit::CM))
1051 , m_xRatioCB(m_xBuilder->weld_check_button(
"keepratio"))
1052 , m_xOrientFT(m_xBuilder->weld_label(
"orientft"))
1053 , m_xOrientLB(m_xBuilder->weld_combo_box(
"orientlb"))
1054 , m_xAllLevelsFrame(m_xBuilder->weld_widget(
"levelsframe"))
1055 , m_xSameLevelCB(m_xBuilder->weld_check_button(
"allsame"))
1056 , m_xPreviewWIN(
new weld::CustomWeld(*m_xBuilder,
"preview", m_aPreviewWIN))
1058 m_xBulColLB->SetSlotId(SID_ATTR_CHAR_COLOR);
1059 m_xBulRelSizeMF->set_min(SVX_NUM_REL_SIZE_MIN, FieldUnit::PERCENT);
1060 m_xBulRelSizeMF->set_increments(5, 50, FieldUnit::PERCENT);
1061 SetExchangeSupport();
1068 m_xLevelLB->set_selection_mode(SelectionMode::Multiple);
1084 aInvalidateTimer.SetTimeout(50);
1090 for (sal_uInt32 i = 0;
i <
nCount; ++
i)
1101 m_xFmtLB->set_active(0);
1103 m_xCharFmtLB->set_size_request(m_xCharFmtLB->get_approximate_digit_width() * 10, -1);
1104 Size aSize(m_xGrid->get_preferred_size());
1105 m_xGrid->set_size_request(aSize.Width(), -1);
1123 if(eMetric == FieldUnit::MM)
1135 return std::make_unique<SvxNumOptionsTabPage>(pPage, pController, *rAttrSet);
1141 sal_uInt16 nTmpNumLvl = 1;
1145 bPreset = pPresetItem->GetValue();
1147 nTmpNumLvl = pLevelItem->GetValue();
1159 sal_uInt16 nMask = 1;
1165 for(sal_uInt16
i = 0;
i <
pActNum->GetLevelCount();
i++)
1181 return DeactivateRC::LeavePage;
1217 for(sal_uInt16
i = 1;
i <=
pSaveNum->GetLevelCount();
i++)
1221 OUString sEntry =
"1 - " + OUString::number(
pSaveNum->GetLevelCount() );
1231 sal_uInt16 nMask = 1;
1239 for(sal_uInt16
i = 0;
i <
pSaveNum->GetLevelCount();
i++)
1259 pHtmlModeItem = pShell->GetItem( SID_HTML_MODE );
1261 if ( pHtmlModeItem )
1263 sal_uInt16 nHtmlMode = pHtmlModeItem->
GetValue();
1267 bool bCharFmt =
pActNum->IsFeatureSupported(SvxNumRuleFlags::CHAR_STYLE);
1271 bool bContinuous =
pActNum->IsFeatureSupported(SvxNumRuleFlags::CONTINUOUS);
1273 bool bAllLevel = bContinuous && !
bHTMLMode;
1285 sal_Int32 nFmtCount =
m_xFmtLB->get_count();
1286 for(sal_Int32
i = nFmtCount;
i;
i--)
1288 sal_uInt16 nEntryData =
m_xFmtLB->get_id(
i - 1).toUInt32();
1295 if(!
pActNum->IsFeatureSupported(SvxNumRuleFlags::ENABLE_LINKED_BMP))
1301 else if(!
pActNum->IsFeatureSupported(SvxNumRuleFlags::ENABLE_EMBEDDED_BMP))
1310 if(
pActNum->IsFeatureSupported(SvxNumRuleFlags::NO_NUMBERS))
1312 sal_Int32 nFmtCount =
m_xFmtLB->get_count();
1313 for(sal_Int32
i = nFmtCount;
i;
i--)
1315 sal_uInt16 nEntryData =
m_xFmtLB->get_id(
i - 1).toUInt32();
1327 bool bShowBullet =
true;
1328 bool bShowBitmap =
true;
1329 bool bSameType =
true;
1330 bool bSameStart =
true;
1331 bool bSamePrefix =
true;
1332 bool bSameSuffix =
true;
1333 bool bAllLevel =
true;
1334 bool bSameCharFmt =
true;
1335 bool bSameVOrient =
true;
1336 bool bSameSize =
true;
1337 bool bSameBulColor =
true;
1338 bool bSameBulRelSize=
true;
1343 OUString sFirstCharFmt;
1344 sal_Int16 eFirstOrient = text::VertOrientation::NONE;
1345 Size aFirstSize(0,0);
1346 sal_uInt16 nMask = 1;
1348 sal_uInt16 nHighestLevel = 0;
1350 bool bBullColor =
pActNum->IsFeatureSupported(SvxNumRuleFlags::BULLET_COLOR);
1351 bool bBullRelSize =
pActNum->IsFeatureSupported(SvxNumRuleFlags::BULLET_REL_SIZE);
1352 for(sal_uInt16
i = 0;
i <
pActNum->GetLevelCount();
i++)
1376 if (aNumFmtArr[
i]->GetIsLegal() != aNumFmtArr[nLvl]->
GetIsLegal())
1380 if(bShowBitmap && bSameSize)
1388 aNumFmtArr[
i] =
nullptr;
1394 sal_uInt16 nNumberingType;
1401 bSameBulRelSize =
false;
1402 bSameBulColor =
false;
1404 bSamePrefix =
false;
1405 bSameSuffix =
false;
1412 if(!bSameVOrient || eFirstOrient == text::VertOrientation::NONE)
1416 sal::static_int_cast< sal_Int32 >(eFirstOrient - 1));
1433 sal_uInt16 nLBData = nNumberingType;
1434 m_xFmtLB->set_active_id(OUString::number(nLBData));
1443 m_xAllLevelNF->set_value(aNumFmtArr[nLvl]->GetIncludeUpperLevels());
1456 m_xBulRelSizeMF->set_value(aNumFmtArr[nLvl]->GetBulletRelSize(), FieldUnit::PERCENT);
1463 m_xBulColLB->SelectEntry(aNumFmtArr[nLvl]->GetBulletColor());
1472 m_xStartED->set_value(aNumFmtArr[nLvl]->GetStart());
1484 m_xPrefixED->set_text(aNumFmtArr[nLvl]->GetPrefix());
1488 m_xSuffixED->set_text(aNumFmtArr[nLvl]->GetSuffix());
1494 if (!sFirstCharFmt.isEmpty())
1515 bool bNumeric = !(bBitmap||bBullet);
1522 bool bCharFmt =
pActNum->IsFeatureSupported(SvxNumRuleFlags::CHAR_STYLE);
1528 bool bAllLevelFeature =
pActNum->IsFeatureSupported(SvxNumRuleFlags::CONTINUOUS);
1529 bool bAllLevel = bNumeric && bAllLevelFeature && !
bHTMLMode;
1534 m_xStartFT->set_visible(!(bBullet||bBitmap));
1535 m_xStartED->set_visible(!(bBullet||bBitmap));
1539 bool bBullColor =
pActNum->IsFeatureSupported(SvxNumRuleFlags::BULLET_COLOR);
1542 bool bBullResSize =
pActNum->IsFeatureSupported(SvxNumRuleFlags::BULLET_REL_SIZE);
1555 m_xOrientFT->set_visible(bBitmap && bAllLevelFeature);
1556 m_xOrientLB->set_visible(bBitmap && bAllLevelFeature);
1569 if (m_pLevelHdlEvent)
1579 m_pLevelHdlEvent =
nullptr;
1581 sal_uInt16 nSaveNumLvl = nActNumLvl;
1583 std::vector<int> aSelectedRows = m_xLevelLB->get_selected_rows();
1584 if (std::find(aSelectedRows.begin(), aSelectedRows.end(), pActNum->GetLevelCount()) != aSelectedRows.end() &&
1585 (aSelectedRows.size() == 1 || nSaveNumLvl != 0xffff))
1587 nActNumLvl = 0xFFFF;
1588 for( sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++ )
1589 m_xLevelLB->unselect(
i);
1591 else if (!aSelectedRows.empty())
1593 sal_uInt16 nMask = 1;
1594 for( sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++ )
1596 if (std::find(aSelectedRows.begin(), aSelectedRows.end(),
i) != aSelectedRows.end())
1597 nActNumLvl |= nMask;
1600 m_xLevelLB->unselect(pActNum->GetLevelCount());
1604 nActNumLvl = nSaveNumLvl;
1605 sal_uInt16 nMask = 1;
1606 for( sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++ )
1608 if(nActNumLvl & nMask)
1610 m_xLevelLB->select(
i);
1621 m_aPreviewWIN.Invalidate();
1626 sal_uInt16 nMask = 1;
1627 for(sal_uInt16 e = 0; e < pActNum->GetLevelCount(); e++)
1629 if(nActNumLvl & nMask)
1635 pActNum->SetLevel(e, aNumFmt);
1644 bool bSet = rBox.get_active();
1645 for (sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
1647 if (nActNumLvl & (sal_uInt16(1) <<
i))
1651 pActNum->SetLevel(
i, aNumFmt);
1659 OUString sSelectStyle;
1660 bool bShowOrient =
false;
1662 sal_uInt16 nMask = 1;
1663 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
1665 if(nActNumLvl & nMask)
1674 bBmp |=
nullptr != aNumFmt.
GetBrush();
1679 pActNum->SetLevel(
i, aNumFmt);
1691 pActNum->SetLevel(
i, aNumFmt);
1694 if(bAutomaticCharStyles)
1696 sSelectStyle = m_sBulletCharFormatName;
1701 aNumFmt.
SetListFormat(m_xPrefixED->get_text(), m_xSuffixED->get_text(),
i);
1704 pActNum->SetLevel(
i, aNumFmt);
1705 CheckForStartValue_Impl(nNumberingType);
1708 if(bAutomaticCharStyles)
1710 sSelectStyle = m_sNumCharFmtName;
1716 bool bAllLevelFeature = pActNum->IsFeatureSupported(SvxNumRuleFlags::CONTINUOUS);
1717 if(bShowOrient && bAllLevelFeature)
1719 m_xOrientFT->show();
1720 m_xOrientLB->show();
1724 m_xOrientFT->hide();
1725 m_xOrientLB->hide();
1728 if(!sSelectStyle.isEmpty())
1730 m_xCharFmtLB->set_active_text(sSelectStyle);
1731 CharFmtHdl_Impl(*m_xCharFmtLB);
1732 bAutomaticCharStyles =
true;
1743 if (bIsNull && bNoZeroAllowed)
1749 sal_Int32
nPos = rBox.get_active();
1752 sal_uInt16 nMask = 1;
1753 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
1755 if(nActNumLvl & nMask)
1762 sal_Int16 eOrient =
static_cast<sal_Int16
>(
nPos);
1764 pActNum->SetLevel(
i, aNumFmt);
1774 bool bSet = rBox.get_active();
1775 pActNum->SetContinuousNumbering(bSet);
1776 bool bRepaint =
false;
1777 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
1786 SetModified(bRepaint);
1792 Color nSetColor = rColorBox.GetSelectEntryColor();
1794 sal_uInt16 nMask = 1;
1795 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
1797 if(nActNumLvl & nMask)
1801 pActNum->SetLevel(
i, aNumFmt);
1810 sal_uInt16 nRelSize = rField.get_value(FieldUnit::PERCENT);
1812 sal_uInt16 nMask = 1;
1813 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
1815 if(nActNumLvl & nMask)
1819 pActNum->SetLevel(
i, aNumFmt);
1834 if (rIdent.startsWith(
"gallery", &sNumber))
1836 auto idx = sNumber.toUInt32();
1837 if (
idx < aGrfNames.size())
1839 aGrfName = aGrfNames[
idx];
1848 else if (rIdent ==
"fromfile")
1870 sal_uInt16 nMask = 1;
1871 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
1873 if(nActNumLvl & nMask)
1886 pActNum->SetLevel(
i, aNumFmt);
1890 m_xRatioCB->set_sensitive(
true);
1891 m_xWidthFT->set_sensitive(
true);
1892 m_xHeightFT->set_sensitive(
true);
1893 m_xWidthMF->set_sensitive(
true);
1894 m_xHeightMF->set_sensitive(
true);
1897 m_xOrientFT->set_sensitive(
true);
1898 m_xOrientLB->set_sensitive(
true);
1901 aInvalidateTimer.Start();
1909 m_xGalleryMenu = m_xBuilder->weld_menu(
"gallerysubmenu");
1921 for (
const auto & grfName : aGrfNames)
1924 OUString sItemId =
"gallery" + OUString::number(
i);
1940 double nScale = bWidth ?
1943 aBitmap.
Scale(nScale, nScale);
1945 pVD->SetOutputSizePixel(aBitmap.
GetSizePixel(),
false);
1946 pVD->DrawBitmapEx(
Point(), aBitmap);
1947 m_xGalleryMenu->append(sItemId, sGrfName, *pVD);
1951 m_xGalleryMenu->append(sItemId, sGrfName);
1962 sal_uInt16 nMask = 1;
1963 std::optional<vcl::Font> pFmtFont;
1964 bool bSameBullet =
true;
1967 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
1969 if(nActNumLvl & nMask)
1978 bSameBullet =
false;
1990 aMap.SetCharFont(*pFmtFont);
1992 aMap.SetCharFont(aActBulletFont);
1994 aMap.SetChar(cBullet);
1999 aActBulletFont =
aMap.GetCharFont();
2001 sal_uInt16 _nMask = 1;
2002 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
2004 if(nActNumLvl & _nMask)
2009 pActNum->SetLevel(
i, aNumFmt);
2019 bool bWidth = &rField == m_xWidthMF.get();
2020 bLastWidthModified = bWidth;
2021 bool bRatio = m_xRatioCB->get_active();
2022 tools::Long nWidthVal =
static_cast<tools::Long>(m_xWidthMF->denormalize(m_xWidthMF->get_value(FieldUnit::MM_100TH)));
2023 tools::Long nHeightVal =
static_cast<tools::Long>(m_xHeightMF->denormalize(m_xHeightMF->get_value(FieldUnit::MM_100TH)));
2025 MapUnit::Map100thMM, eCoreUnit );
2027 MapUnit::Map100thMM, eCoreUnit);
2030 bool bRepaint =
false;
2031 sal_uInt16 nMask = 1;
2032 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
2034 if(nActNumLvl & nMask)
2040 Size aSaveSize(aSize);
2043 fSizeRatio =
static_cast<double>(aInitSize[
i].Width()) /
static_cast<double>(aInitSize[
i].
Height());
2045 fSizeRatio = double(1);
2054 m_xHeightMF->set_value(m_xHeightMF->normalize(
2056 FieldUnit::MM_100TH);
2061 tools::Long nDelta = nHeightVal - aInitSize[
i].Height();
2066 m_xWidthMF->set_value(m_xWidthMF->normalize(
2068 FieldUnit::MM_100TH);
2073 if(aSize != aSaveSize)
2076 pActNum->SetLevel(
i, aNumFmt);
2081 SetModified(bRepaint);
2086 if (rBox.get_active())
2088 if (bLastWidthModified)
2089 SizeHdl_Impl(*m_xWidthMF);
2091 SizeHdl_Impl(*m_xHeightMF);
2097 bAutomaticCharStyles =
false;
2098 sal_Int32 nEntryPos = m_xCharFmtLB->get_active();
2099 OUString sEntry = m_xCharFmtLB->get_active_text();
2100 sal_uInt16 nMask = 1;
2101 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
2103 if(nActNumLvl & nMask)
2106 if( 0 == nEntryPos )
2113 pActNum->SetLevel(
i, aNumFmt);
2122 EditModifyHdl_Impl(&rEdit);
2127 EditModifyHdl_Impl(&rSpinButton);
2134 sal_uInt16 nMask = 1;
2135 for(sal_uInt16
i = 0;
i <
pActNum->GetLevelCount();
i++)
2163 nRet = aGSize.
Width();
2181 Size aTmpSize(rSize);
2199 OUString aText(&cChar, 1);
2227 pVDev->SetMapMode(rRenderContext.
GetMapMode());
2228 pVDev->SetOutputSize(aSize);
2231 if (aLineColor == aBackColor)
2233 pVDev->SetLineColor(aLineColor);
2234 pVDev->SetFillColor(aBackColor);
2235 pVDev->SetBackground(
Wallpaper(aBackColor));
2236 pVDev->DrawWallpaper(pVDev->GetOutputRectPixel(), pVDev->GetBackground());
2256 nFontHeight = nYStep * 15 / 10;
2276 for (
sal_uInt8 nLevel = nStart; nLevel < nEnd; ++nLevel)
2282 short nTextOffset( 0 );
2288 nNumberXPos = nXStart;
2296 if (nTextOffset < 0)
2297 nNumberXPos = nNumberXPos + nTextOffset;
2302 if (nTmpNumberXPos < 0)
2308 nNumberXPos = nTmpNumberXPos;
2315 tools::Long nYMiddle = nYStart + ( nFontHeight / 2 );
2334 else if (pVDev->GetBackgroundColor().IsDark() == aTmpBulletColor.
IsDark())
2336 aColorFont.
SetColor(aTmpBulletColor);
2337 pVDev->SetFont(aColorFont);
2338 pVDev->DrawText(
Point(nNumberXPos, nYStart), aText);
2339 pVDev->SetFont(aSaveFont);
2340 nBulletWidth = pVDev->GetTextWidth(aText);
2347 OUString aText(
' ');
2348 pVDev->DrawText(
Point(nNumberXPos, nYStart), aText );
2349 nBulletWidth = nBulletWidth + pVDev->GetTextWidth(aText);
2355 nTextXPos = nXStart;
2356 if (nTextOffset < 0)
2357 nTextXPos = nTextXPos + nTextOffset;
2358 if (nNumberXPos + nBulletWidth + nTextOffset > nTextXPos)
2359 nTextXPos = nNumberXPos + nBulletWidth + nTextOffset;
2368 if (nTextXPos < nNumberXPos + nBulletWidth)
2370 nTextXPos = nNumberXPos + nBulletWidth;
2378 nTextXPos = nNumberXPos + nBulletWidth;
2387 pVDev->SetFillColor(aBackColor);
2388 pVDev->DrawRect(aRect1);
2391 pVDev->DrawRect(aRect2);
2392 nYStart += 2 * nLineHeight;
2401 tools::Long nWidth = pVDev->GetTextWidth(
"Preview");
2404 tools::Long nTopOffset = nTextHeight - nRectHeight;
2407 for (sal_uInt16 nLevel = 0; nLevel <
pActNum->
GetLevelCount(); ++nLevel, nYStart = nYStart + nYStep)
2412 pVDev->SetFillColor( aBackColor );
2427 nXStart = nTmpXStart;
2437 tools::Long nYMiddle = nYStart + ( nFontHeight / 2 );
2438 nTextOffset =
lcl_DrawGraphic(*pVDev, rFmt, nXStart, nYMiddle, nWidthRelation);
2439 nTextOffset = nTextOffset + nXStep;
2447 nTextOffset = nTextOffset + nXStep;
2467 else if (pVDev->GetBackgroundColor().IsDark() == aTmpBulletColor.
IsDark())
2470 pVDev->SetFont(aFont);
2476 nY -= (pVDev->GetTextHeight() - nTextHeight - pVDev->GetFontMetric().GetDescent());
2477 pVDev->DrawText(
Point(nXStart, nY), aText);
2478 nTextOffset = pVDev->GetTextWidth(aText);
2479 nTextOffset = nTextOffset + nXStep;
2486 pVDev->SetFillColor( aSelRectColor );
2487 pVDev->SetLineColor( aSelRectColor );
2492 pVDev->SetFillColor( aLineColor );
2493 pVDev->SetLineColor( aLineColor );
2496 pVDev->DrawRect(aRect1);
2509 :
SfxTabPage(pPage, pController,
"cui/ui/numberingpositionpage.ui",
"NumberingPositionPage", &
rSet)
2510 , m_pLevelHdlEvent(nullptr)
2512 , nNumItemId(SID_ATTR_NUMBERING_RULE)
2515 , bInInintControl(false)
2516 , bLabelAlignmentPosAndSpaceModeActive(false)
2517 , m_xLevelLB(m_xBuilder->weld_tree_view(
"levellb"))
2518 , m_xDistBorderFT(m_xBuilder->weld_label(
"indent"))
2519 , m_xDistBorderMF(m_xBuilder->weld_metric_spin_button(
"indentmf",
FieldUnit::
CM))
2520 , m_xRelativeCB(m_xBuilder->weld_check_button(
"relative"))
2521 , m_xIndentFT(m_xBuilder->weld_label(
"numberingwidth"))
2522 , m_xIndentMF(m_xBuilder->weld_metric_spin_button(
"numberingwidthmf",
FieldUnit::
CM))
2523 , m_xDistNumFT(m_xBuilder->weld_label(
"numdist"))
2524 , m_xDistNumMF(m_xBuilder->weld_metric_spin_button(
"numdistmf",
FieldUnit::
CM))
2525 , m_xAlignFT(m_xBuilder->weld_label(
"numalign"))
2526 , m_xAlignLB(m_xBuilder->weld_combo_box(
"numalignlb"))
2527 , m_xLabelFollowedByFT(m_xBuilder->weld_label(
"numfollowedby"))
2528 , m_xLabelFollowedByLB(m_xBuilder->weld_combo_box(
"numfollowedbylb"))
2529 , m_xListtabFT(m_xBuilder->weld_label(
"at"))
2530 , m_xListtabMF(m_xBuilder->weld_metric_spin_button(
"atmf",
FieldUnit::
CM))
2531 , m_xAlign2FT(m_xBuilder->weld_label(
"num2align"))
2532 , m_xAlign2LB(m_xBuilder->weld_combo_box(
"num2alignlb"))
2533 , m_xAlignedAtFT(m_xBuilder->weld_label(
"alignedat"))
2534 , m_xAlignedAtMF(m_xBuilder->weld_metric_spin_button(
"alignedatmf",
FieldUnit::
CM))
2535 , m_xIndentAtFT(m_xBuilder->weld_label(
"indentat"))
2536 , m_xIndentAtMF(m_xBuilder->weld_metric_spin_button(
"indentatmf",
FieldUnit::
CM))
2537 , m_xStandardPB(m_xBuilder->weld_button(
"standard"))
2538 , m_xPreviewWIN(new
weld::CustomWeld(*m_xBuilder,
"preview", m_aPreviewWIN))
2572 m_xLevelLB->set_selection_mode(SelectionMode::Multiple);
2599 const bool bSingleSelection =
m_xLevelLB->count_selected_rows() == 1 &&
2603 ( bSingleSelection || bRelative ) );
2605 ( bSingleSelection || bRelative ) );
2607 bool bSetDistEmpty =
false;
2611 bool bSameAdjust =
true;
2619 sal_uInt16 nMask = 1;
2622 for(sal_uInt16
i = 0;
i <
pActNum->GetLevelCount();
i++)
2637 if(nFirstBorderTextRelative == -1)
2638 nFirstBorderTextRelative =
2642 bSameDistBorderNum &= nFirstBorderTextRelative ==
2647 bSameDistBorderNum &=
2656 bSameLabelFollowedBy &=
2673 OSL_ENSURE(
false,
"cannot happen.");
2677 if(bSameDistBorderNum)
2682 nDistBorderNum =
static_cast<tools::Long>(aNumFmtArr[nLvl]->
GetAbsLSpace())+ aNumFmtArr[nLvl]->GetFirstLineOffset();
2684 nDistBorderNum -=
static_cast<tools::Long>(aNumFmtArr[nLvl - 1]->
GetAbsLSpace())+ aNumFmtArr[nLvl - 1]->GetFirstLineOffset();
2688 nDistBorderNum =
static_cast<tools::Long>(aNumFmtArr[nLvl]->
GetAbsLSpace())+ aNumFmtArr[nLvl]->GetFirstLineOffset();
2693 bSetDistEmpty =
true;
2707 if(aNumFmtArr[nLvl]->GetNumAdjust() == SvxAdjust::Left)
2709 else if(aNumFmtArr[nLvl]->GetNumAdjust() == SvxAdjust::Right)
2720 if ( bSameLabelFollowedBy )
2765 aNumFmtArr[nLvl]->GetIndentAt() + aNumFmtArr[nLvl]->GetFirstLineIndent(),
2773 if ( bSameIndentAt )
2782 if ( bSetDistEmpty )
2790 sal_uInt16 nTmpNumLvl = 1;
2795 bPreset = pPresetItem->GetValue();
2797 nTmpNumLvl = pLevelItem->GetValue();
2809 sal_uInt16 nMask = 1;
2814 for (sal_uInt16
i = 0;
i <
pActNum->GetLevelCount();
i++)
2840 return DeactivateRC::LeavePage;
2877 for(sal_uInt16
i = 1;
i <=
pSaveNum->GetLevelCount();
i++)
2881 OUString sEntry =
"1 - " + OUString::number(
pSaveNum->GetLevelCount() );
2890 sal_uInt16 nMask = 1;
2898 for(sal_uInt16
i = 0;
i <
pSaveNum->GetLevelCount();
i++)
2924 "<SvxNumPositionTabPage::InitPosAndSpaceMode()> - misusage of method -> <pAktNum> has to be already set!" );
2930 sal_uInt16 nMask = 1;
2931 for( sal_uInt16
i = 0;
i <
pActNum->GetLevelCount(); ++
i )
2957 pActNum->IsFeatureSupported(SvxNumRuleFlags::CONTINUOUS) );
2959 pActNum->IsFeatureSupported(SvxNumRuleFlags::CONTINUOUS));
2978 return std::make_unique<SvxNumPositionTabPage>(pPage, pController, *rAttrSet);
2983 if (eMetric == FieldUnit::MM)
3002 sal_uInt16 nMask = 1;
3003 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
3005 if(nActNumLvl & nMask)
3009 const sal_Int32
nPos = m_xAlignLB->get_visible()
3010 ? m_xAlignLB->get_active()
3011 : m_xAlign2LB->get_active();
3014 eAdjust = SvxAdjust::Left;
3016 eAdjust = SvxAdjust::Right;
3018 pActNum->SetLevel(
i, aNumFmt);
3027 if (m_pLevelHdlEvent)
3037 m_pLevelHdlEvent =
nullptr;
3039 sal_uInt16 nSaveNumLvl = nActNumLvl;
3041 std::vector<int> aSelectedRows = m_xLevelLB->get_selected_rows();
3042 if (std::find(aSelectedRows.begin(), aSelectedRows.end(), pActNum->GetLevelCount()) != aSelectedRows.end() &&
3043 (aSelectedRows.size() == 1 || nSaveNumLvl != 0xffff))
3045 nActNumLvl = 0xFFFF;
3046 for( sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++ )
3047 m_xLevelLB->unselect(
i);
3049 else if (!aSelectedRows.empty())
3051 sal_uInt16 nMask = 1;
3052 for( sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++ )
3054 if (std::find(aSelectedRows.begin(), aSelectedRows.end(),
i) != aSelectedRows.end())
3055 nActNumLvl |= nMask;
3058 m_xLevelLB->unselect(pActNum->GetLevelCount());
3062 nActNumLvl = nSaveNumLvl;
3063 sal_uInt16 nMask = 1;
3064 for( sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++ )
3066 if(nActNumLvl & nMask)
3068 m_xLevelLB->select(
i);
3074 m_xRelativeCB->set_sensitive(nActNumLvl != 1);
3076 InitPosAndSpaceMode();
3077 ShowControlsDependingOnPosAndSpaceMode();
3086 sal_uInt16 nMask = 1;
3087 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
3089 if(nActNumLvl & nMask)
3092 if (&rFld == m_xDistBorderMF.get())
3095 if (m_xRelativeCB->get_active())
3104 tools::Long nTmp = pActNum->GetLevel(
i - 1 ).GetAbsLSpace() +
3105 pActNum->GetLevel(
i - 1 ).GetFirstLineOffset() -
3106 pActNum->GetLevel(
i ).GetFirstLineOffset();
3116 else if (&rFld == m_xDistNumMF.get())
3120 else if (&rFld == m_xIndentMF.get())
3129 pActNum->SetLevel(
i, aNumFmt );
3135 if (!m_xDistBorderMF->get_sensitive())
3137 m_xDistBorderMF->set_text(
"");
3143 bool bOn = rBox.get_active();
3144 bool bSingleSelection = m_xLevelLB->count_selected_rows() == 1 &&
SAL_MAX_UINT16 != nActNumLvl;
3145 bool bSetValue =
false;
3147 if(bOn || bSingleSelection)
3149 sal_uInt16 nMask = 1;
3152 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
3154 if(nActNumLvl & nMask)
3161 nValue -= (pActNum->GetLevel(
i - 1).GetAbsLSpace() + pActNum->GetLevel(
i - 1).GetFirstLineOffset());
3166 (pActNum->GetLevel(
i - 1).GetAbsLSpace() + pActNum->GetLevel(
i - 1).GetFirstLineOffset());
3176 m_xDistBorderMF->set_text(
"");
3177 m_xDistBorderMF->set_sensitive(bOn || bSingleSelection);
3178 m_xDistBorderFT->set_sensitive(bOn || bSingleSelection);
3187 const auto nPos = m_xLabelFollowedByLB->get_active();
3192 else if (
nPos == 2 )
3196 else if (
nPos == 3 )
3203 bool bSameListtabPos =
true;
3205 sal_uInt16 nMask = 1;
3206 for( sal_uInt16
i = 0;
i < pActNum->GetLevelCount(); ++
i )
3208 if ( nActNumLvl & nMask )
3212 pActNum->SetLevel(
i, aNumFmt );
3221 pActNum->GetLevel( nFirstLvl ).GetListtabPos();
3233 SetMetricValue(*m_xListtabMF, pActNum->GetLevel( nFirstLvl ).GetListtabPos(), eCoreUnit);
3237 m_xListtabMF->set_text(OUString());
3249 sal_uInt16 nMask = 1;
3250 for( sal_uInt16
i = 0;
i < pActNum->GetLevelCount(); ++
i )
3252 if ( nActNumLvl & nMask )
3256 pActNum->SetLevel(
i, aNumFmt );
3270 sal_uInt16 nMask = 1;
3271 for( sal_uInt16
i = 0;
i < pActNum->GetLevelCount(); ++
i )
3273 if ( nActNumLvl & nMask )
3278 pActNum->SetLevel(
i, aNumFmt );
3292 sal_uInt16 nMask = 1;
3293 for( sal_uInt16
i = 0;
i < pActNum->GetLevelCount(); ++
i )
3295 if ( nActNumLvl & nMask )
3303 pActNum->SetLevel(
i, aNumFmt );
3313 sal_uInt16 nMask = 1;
3314 SvxNumRule aTmpNumRule( pActNum->GetFeatureFlags(),
3315 pActNum->GetLevelCount(),
3316 pActNum->IsContinuousNumbering(),
3317 SvxNumRuleType::NUMBERING,
3318 pActNum->GetLevel( 0 ).GetPositionAndSpaceMode() );
3319 for(sal_uInt16
i = 0;
i < pActNum->GetLevelCount();
i++)
3321 if(nActNumLvl & nMask)
3341 pActNum->SetLevel(
i, aNumFmt );
3374 if (pNumCharFmt &&pBulletCharFmt)
3375 SetCharFmts( pNumCharFmt->GetValue(),pBulletCharFmt->GetValue());
3379 const std::vector<OUString> &aList = pListItem->
GetList();
3380 sal_uInt32
nCount = aList.size();
const PropertyValue * pValues
const LanguageTag & GetLanguageTag() const
static const AllSettings & GetSettings()
static ImplSVEvent * PostUserEvent(const Link< void *, void > &rLink, void *pCaller=nullptr, bool bReferenceLink=false)
static void RemoveUserEvent(ImplSVEvent *nUserEvent)
bool Scale(const Size &rNewSize, BmpScaleFlag nScaleFlag=BmpScaleFlag::Default)
const Size & GetSizePixel() const
sal_uInt16 GetValue() const
const OUString & GetValue() const
FontMetric Get(const OUString &rName, const OUString &rStyleName) const
bool IsAvailable(std::u16string_view rName) const
static bool EndLocking(std::u16string_view rThemeName)
static bool GetGraphicObj(std::u16string_view rThemeName, sal_uInt32 nPos, Graphic *pGraphic)
static bool FillObjList(std::u16string_view rThemeName, std::vector< OUString > &rObjList)
static bool InsertURL(std::u16string_view rThemeName, std::u16string_view rURL)
static bool BeginLocking(std::u16string_view rThemeName)
static ErrCode Import(SvStream &rIStm, Graphic &rGraphic, ConvertDataFormat nFormat=ConvertDataFormat::Unknown)
bool Detect(bool bExtendedInfo=false)
sal_uInt16 GetExportFormatNumberForShortName(std::u16string_view rShortName)
static GraphicFilter & GetGraphicFilter()
ErrCode ExportGraphic(const Graphic &rGraphic, const INetURLObject &rPath, sal_uInt16 nFormat, const css::uno::Sequence< css::beans::PropertyValue > *pFilterData=nullptr)
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
void Draw(OutputDevice &rOutDev, const Point &rDestPt) const
bool removeExtension(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true)
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
OUString GetFileExtension() const
OUString GetLastName(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
INetProtocol GetProtocol() const
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
static LanguageType getConfiguredSystemLanguage()
virtual Color GetBackgroundColor() const
const vcl::Font & GetFont() const
void SetFont(const vcl::Font &rNewFont)
SAL_WARN_UNUSED_RESULT Point PixelToLogic(const Point &rDevicePt) const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
tools::Long GetTextWidth(const OUString &rStr, sal_Int32 nIndex=0, sal_Int32 nLen=-1, vcl::text::TextLayoutCache const *=nullptr, SalLayoutGlyphs const *const pLayoutCache=nullptr) const
bool IsRTLEnabled() const
SAL_DLLPRIVATE void DrawOutDev(const Point &, const Size &, const Point &, const Size &, const Printer &)=delete
const MapMode & GetMapMode() const
static vcl::Font GetDefaultFont(DefaultFontType nType, LanguageType eLang, GetDefaultFontFlags nFlags, const OutputDevice *pOutDev=nullptr)
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)
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
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
static SAL_WARN_UNUSED_RESULT SfxObjectShell * Current()
std::vector< OUString > & GetList()
SfxOkDialogController * GetDialogController() const
void SetExchangeSupport()
const SfxItemSet * GetDialogExampleSet() const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
const OUString & GetGalleryPath() const
virtual ~SvxBitmapPickTabPage() override
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
virtual bool FillItemSet(SfxItemSet *rSet) override
std::unique_ptr< weld::CustomWeld > m_xExamplesVSWin
std::unique_ptr< weld::Label > m_xErrorText
std::unique_ptr< weld::Button > m_xBtBrowseFile
std::vector< OUString > aGrfNames
std::unique_ptr< SvxNumRule > pActNum
TypedWhichId< SvxNumBulletItem > nNumItemId
virtual void ActivatePage(const SfxItemSet &rSet) override
SvxBitmapPickTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
std::unique_ptr< SvxNumRule > pSaveNum
virtual void Reset(const SfxItemSet *rSet) override
std::unique_ptr< SvxBmpNumValueSet > m_xExamplesVS
const Graphic * GetGraphic(OUString const &referer=OUString()) const
virtual ~SvxBulletPickTabPage() override
std::unique_ptr< SvxNumValueSet > m_xExamplesVS
SvxBulletPickTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
OUString sBulletCharFormatName
virtual void ActivatePage(const SfxItemSet &rSet) override
std::unique_ptr< SvxNumRule > pActNum
std::unique_ptr< SvxNumRule > pSaveNum
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
virtual bool FillItemSet(SfxItemSet *rSet) override
TypedWhichId< SvxNumBulletItem > nNumItemId
std::unique_ptr< weld::CustomWeld > m_xExamplesVSWin
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
virtual void Reset(const SfxItemSet *rSet) override
virtual void PageCreated(const SfxAllItemSet &aSet) override
The main purpose of this dialog is to enable the use of characters that are not easily accessible fro...
const FontList * GetFontList() const
void SetLevel(sal_uInt8 nVal)
const sal_uInt16 * GetLevelVal() const
const SvxNumRule & GetNumRule() const
static void GetI18nNumbering(weld::ComboBox &rFmtLB, sal_uInt16 nDoNotRemove)
static Reference< XDefaultNumberingProvider > GetNumberingProvider()
SvxNumOptionsTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
std::unique_ptr< SvxNumRule > pSaveNum
virtual void ActivatePage(const SfxItemSet &rSet) override
std::unique_ptr< weld::Label > m_xOrientFT
std::unique_ptr< weld::CheckButton > m_xSameLevelCB
std::unique_ptr< weld::ComboBox > m_xCharFmtLB
TypedWhichId< SvxNumBulletItem > nNumItemId
std::unique_ptr< weld::Label > m_xBulColorFT
std::unique_ptr< weld::MetricSpinButton > m_xWidthMF
void SetModified(bool bRepaint=true)
ImplSVEvent * m_pLevelHdlEvent
std::unique_ptr< weld::SpinButton > m_xStartED
std::unique_ptr< weld::TreeView > m_xLevelLB
virtual bool FillItemSet(SfxItemSet *rSet) override
void CheckForStartValue_Impl(sal_uInt16 nNumberingType)
std::unique_ptr< weld::Label > m_xBulletFT
std::unique_ptr< weld::Label > m_xStartFT
std::unique_ptr< weld::Label > m_xPrefixFT
std::unique_ptr< weld::CheckButton > m_xIsLegalCB
std::unique_ptr< weld::ComboBox > m_xFmtLB
SvxNumberingPreview m_aPreviewWIN
std::unique_ptr< weld::Label > m_xBulRelSizeFT
virtual ~SvxNumOptionsTabPage() override
std::unique_ptr< weld::Entry > m_xPrefixED
std::unique_ptr< weld::Label > m_xSeparatorFT
void EditModifyHdl_Impl(const weld::Entry *)
std::unique_ptr< weld::Widget > m_xAllLevelsFrame
std::unique_ptr< weld::Label > m_xCharFmtFT
void SwitchNumberType(sal_uInt8 nType)
To switch between the numbering type 0 - Number; 1 - Bullet; 2 - Bitmap;.
virtual void Reset(const SfxItemSet *rSet) override
virtual void PageCreated(const SfxAllItemSet &aSet) override
std::unique_ptr< weld::Label > m_xWidthFT
std::unique_ptr< ColorListBox > m_xBulColLB
std::unique_ptr< weld::Label > m_xSuffixFT
std::unique_ptr< weld::ComboBox > m_xOrientLB
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
std::unique_ptr< weld::SpinButton > m_xAllLevelNF
std::unique_ptr< weld::MenuButton > m_xBitmapMB
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< weld::CheckButton > m_xRatioCB
std::unique_ptr< SvxNumRule > pActNum
std::unique_ptr< weld::Label > m_xAllLevelFT
std::unique_ptr< weld::MetricSpinButton > m_xHeightMF
std::unique_ptr< weld::Label > m_xHeightFT
std::unique_ptr< weld::Button > m_xBulletPB
void SetCharFmts(const OUString &rNumName, const OUString &rBulletName)
std::unique_ptr< weld::CustomWeld > m_xPreviewWIN
void SetMetric(FieldUnit eSet)
std::unique_ptr< weld::Label > m_xBitmapFT
std::unique_ptr< weld::MetricSpinButton > m_xBulRelSizeMF
std::unique_ptr< weld::Entry > m_xSuffixED
TabPage for complete numeration.
std::unique_ptr< SvxNumValueSet > m_xExamplesVS
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< weld::CustomWeld > m_xExamplesVSWin
TypedWhichId< SvxNumBulletItem > nNumItemId
virtual ~SvxNumPickTabPage() override
std::unique_ptr< SvxNumRule > pActNum
virtual bool FillItemSet(SfxItemSet *rSet) override
virtual void Reset(const SfxItemSet *rSet) override
virtual void PageCreated(const SfxAllItemSet &aSet) override
SvxNumSettingsArr_Impl aNumSettingsArrays[NUM_VALUSET_COUNT]
SvxNumPickTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
std::unique_ptr< SvxNumRule > pSaveNum
virtual void ActivatePage(const SfxItemSet &rSet) override
void SetCharFormatNames(const OUString &rCharName, const OUString &rBulName)
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
std::unique_ptr< weld::Label > m_xAlign2FT
std::unique_ptr< weld::MetricSpinButton > m_xAlignedAtMF
std::unique_ptr< weld::Label > m_xIndentFT
virtual bool FillItemSet(SfxItemSet *rSet) override
SvxNumberingPreview m_aPreviewWIN
std::unique_ptr< weld::ComboBox > m_xAlignLB
virtual ~SvxNumPositionTabPage() override
TypedWhichId< SvxNumBulletItem > nNumItemId
ImplSVEvent * m_pLevelHdlEvent
std::unique_ptr< weld::Label > m_xListtabFT
std::unique_ptr< weld::Label > m_xDistNumFT
virtual void PageCreated(const SfxAllItemSet &aSet) override
std::unique_ptr< weld::MetricSpinButton > m_xDistBorderMF
std::unique_ptr< weld::ComboBox > m_xLabelFollowedByLB
std::unique_ptr< SvxNumRule > pSaveNum
std::unique_ptr< weld::Button > m_xStandardPB
std::unique_ptr< weld::MetricSpinButton > m_xIndentAtMF
std::unique_ptr< SvxNumRule > pActNum
std::unique_ptr< weld::ComboBox > m_xAlign2LB
SvxNumPositionTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
void SetMetric(FieldUnit eSet)
void InitPosAndSpaceMode()
void ShowControlsDependingOnPosAndSpaceMode()
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
std::unique_ptr< weld::MetricSpinButton > m_xListtabMF
virtual void Reset(const SfxItemSet *rSet) override
std::unique_ptr< weld::Label > m_xAlignedAtFT
std::unique_ptr< weld::MetricSpinButton > m_xIndentMF
std::unique_ptr< weld::Label > m_xLabelFollowedByFT
std::unique_ptr< weld::CustomWeld > m_xPreviewWIN
std::unique_ptr< weld::Label > m_xAlignFT
std::unique_ptr< weld::TreeView > m_xLevelLB
bool bLabelAlignmentPosAndSpaceModeActive
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< weld::Label > m_xIndentAtFT
std::unique_ptr< weld::CheckButton > m_xRelativeCB
std::unique_ptr< weld::MetricSpinButton > m_xDistNumMF
std::unique_ptr< weld::Label > m_xDistBorderFT
virtual void ActivatePage(const SfxItemSet &rSet) override
OUString MakeNumString(const SvxNodeNum &) const
sal_uInt16 GetLevelCount() const
const SvxNumberFormat * Get(sal_uInt16 nLevel) const
const SvxNumberFormat & GetLevel(sal_uInt16 nLevel) const
bool IsContinuousNumbering() const
bool IsFeatureSupported(SvxNumRuleFlags nFeature) const
bool IsShowSymbol() const
void SetNumberingType(SvxNumType nSet)
SvxNumType GetNumberingType() const
void SetNumRule(const SvxNumRule *pNum)
const SvxNumRule * pActNum
void SetLevel(sal_uInt16 nSet)
virtual void Paint(vcl::RenderContext &rRenderContext, const ::tools::Rectangle &rRect) override
static int GetValue(sal_uInt32 i)
static sal_uInt32 Count()
static OUString GetString(sal_uInt32 i)
ErrCode GetGraphic(Graphic &) const
std::unique_ptr< SvxNumRule > pActNum
SvxNumSettingsArr_Impl aNumSettingsArr
virtual void Reset(const SfxItemSet *rSet) override
std::unique_ptr< weld::CustomWeld > m_xExamplesVSWin
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
std::unique_ptr< SvxNumValueSet > m_xExamplesVS
virtual bool FillItemSet(SfxItemSet *rSet) override
std::unique_ptr< SvxNumRule > pSaveNum
virtual ~SvxSingleNumPickTabPage() override
TypedWhichId< SvxNumBulletItem > nNumItemId
SvxSingleNumPickTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
virtual void ActivatePage(const SfxItemSet &rSet) override
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
reference_type * get() const
void SetTitle(const OUString &rNewTitle)
void SetContext(Context _eNewContext)
static std::unique_ptr< SvStream > CreateStream(const OUString &rFileName, StreamMode eOpenMode, css::uno::Reference< css::awt::XWindow > xParentWin=nullptr)
void SetFontSize(const Size &)
void SetPitch(FontPitch ePitch)
void SetTransparent(bool bTransparent)
void SetFillColor(const Color &)
void SetColor(const Color &)
void SetWeight(FontWeight)
const OUString & GetFamilyName() const
void SetFamily(FontFamily)
void SetCharSet(rtl_TextEncoding)
const Size & GetFontSize() const
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
constexpr ::Color COL_LIGHTGRAY(0xC0, 0xC0, 0xC0)
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
OUString CuiResId(TranslateId aKey)
#define DBG_ASSERT(sCon, aError)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
SVXCORE_DLLPUBLIC FieldUnit GetModuleFieldUnit(const SfxItemSet &)
Reference< XSingleServiceFactory > xFactory
#define GALLERY_THEME_BULLETS
#define LINK(Instance, Class, Member)
sal_Int32 nFirstLineOffset
#define SAL_WARN(area, stream)
SwNumRule * GetNumRule(SwTextFormatColl &rTextFormatColl)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
constexpr T & temporary(T &&x)
HashMap_OWString_Interface aMap
static SvxNumSettings_Impl * lcl_CreateNumSettingsPtr(const Sequence< PropertyValue > &rLevelProps)
IMPL_LINK(SvxNumOptionsTabPage, AllLevelHdl_Impl, weld::SpinButton &, rBox, void)
const sal_Unicode aBulletTypes[]
static tools::Long lcl_DrawGraphic(VirtualDevice &rVDev, const SvxNumberFormat &rFmt, tools::Long nXStart, tools::Long nYMiddle, tools::Long nDivision)
static bool bLastRelative
#define SEARCHPATH_DELIMITER
static tools::Long lcl_DrawBullet(VirtualDevice *pVDev, const SvxNumberFormat &rFmt, tools::Long nXStart, tools::Long nYStart, const Size &rSize)
static bool lcl_IsNumFmtSet(SvxNumRule const *pNum, sal_uInt16 nLevelMask)
static const vcl::Font & lcl_GetDefaultBulletFont()
IMPL_LINK_NOARG(SvxSingleNumPickTabPage, NumSelectHdl_Impl, ValueSet *, void)
#define SEARCHFILENAME_DELIMITER
std::vector< std::unique_ptr< SvxNumSettings_Impl > > SvxNumSettingsArr_Impl
#define NUM_VALUSET_COUNT
SVX_NUM_CHARS_LOWER_LETTER_N
SVX_NUM_CHARS_UPPER_LETTER_N
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)