11#include <AccessibilityCheck.hxx>
12#include <AccessibilityIssue.hxx>
13#include <AccessibilityCheckStrings.hrc>
23#include <com/sun/star/frame/XModel.hpp>
24#include <com/sun/star/text/XTextContent.hpp>
25#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
26#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
62 if (pNode->IsTextNode())
70std::shared_ptr<sw::AccessibilityIssue>
74 auto pIssue = std::make_shared<sw::AccessibilityIssue>(eIssue);
75 pIssue->m_aIssueText = rText;
76 rIssueCollection.
getIssues().push_back(pIssue);
92class NoTextNodeAltTextCheck :
public NodeCheck
99 OUString sAlternative = pNoTextNode->
GetTitle();
100 if (!sAlternative.isEmpty())
105 OUString sIssueText =
SwResId(STR_NO_ALT).replaceAll(
"%OBJECT_NAME%",
sName);
109 auto pIssue = lclAddIssue(m_rIssueCollection, sIssueText,
111 pIssue->setDoc(pNoTextNode->
GetDoc());
117 auto pIssue = lclAddIssue(m_rIssueCollection, sIssueText,
119 pIssue->setDoc(pNoTextNode->
GetDoc());
127 : NodeCheck(rIssueCollection)
137 checkNoTextNode(pNoTextNode);
143class TableNodeMergeSplitCheck :
public NodeCheck
150 OUString sIssueText =
SwResId(STR_TABLE_MERGE_SPLIT).replaceAll(
"%OBJECT_NAME%",
sName);
151 auto pIssue = lclAddIssue(m_rIssueCollection, sIssueText,
153 pIssue->setDoc(rDoc);
155 pIssue->setObjectID(
sName);
167 addTableIssue(rTable, rDoc);
174 size_t nFirstLineSize = 0;
175 bool bAllColumnsSameSize =
true;
176 bool bCellSpansOverMoreRows =
false;
182 nFirstLineSize = pTableLine->GetTabBoxes().size();
186 size_t nLineSize = pTableLine->GetTabBoxes().size();
187 if (nFirstLineSize != nLineSize)
189 bAllColumnsSameSize =
false;
195 for (
SwTableBox const* pBox : pTableLine->GetTabBoxes())
197 if (pBox->getRowSpan() > 1)
198 bCellSpansOverMoreRows =
true;
201 if (!bAllColumnsSameSize || bCellSpansOverMoreRows)
203 addTableIssue(rTable, rDoc);
211 : NodeCheck(rIssueCollection)
221 checkTableNode(pTableNode);
226class TableFormattingCheck :
public NodeCheck
237 size_t nEmptyBoxes = 0;
238 size_t nBoxCount = 0;
241 nBoxCount += pTableLine->GetTabBoxes().size();
242 for (
const SwTableBox* pBox : pTableLine->GetTabBoxes())
247 if (nEmptyBoxes > nBoxCount / 2)
248 lclAddIssue(m_rIssueCollection,
SwResId(STR_TABLE_FORMATTING),
255 : NodeCheck(rIssueCollection)
265 checkTableNode(pTableNode);
270class NumberingCheck :
public NodeCheck
274 {
"1.",
"2." }, {
"(1)",
"(2)" }, {
"1)",
"2)" }, {
"a.",
"b." }, {
"(a)",
"(b)" },
275 {
"a)",
"b)" }, {
"A.",
"B." }, {
"(A)",
"(B)" }, {
"A)",
"B)" }
280 : NodeCheck(rIssueCollection)
290 SwTextNode* pNextTextNode = lclSearchNextTextNode(pCurrent);
297 if (pCurrentTextNode->
GetText().startsWith(rPair.first)
298 && pNextTextNode->
GetText().startsWith(rPair.second))
300 OUString sNumbering = rPair.first +
" " + rPair.second +
"...";
302 =
SwResId(STR_FAKE_NUMBERING).replaceAll(
"%NUMBERING%", sNumbering);
303 lclAddIssue(m_rIssueCollection, sIssueText,
310class HyperlinkCheck :
public NodeCheck
313 void checkTextRange(uno::Reference<text::XTextRange>
const& xTextRange,
SwTextNode* pTextNode,
316 uno::Reference<beans::XPropertySet> xProperties(xTextRange, uno::UNO_QUERY);
317 if (!xProperties->getPropertySetInfo()->hasPropertyByName(
"HyperLinkURL"))
321 xProperties->getPropertyValue(
"HyperLinkURL") >>= sHyperlink;
322 if (!sHyperlink.isEmpty())
324 OUString sText = xTextRange->getString();
328 =
SwResId(STR_HYPERLINK_TEXT_IS_LINK).replaceFirst(
"%LINK%", sHyperlink);
329 lclAddIssue(m_rIssueCollection, sIssueText,
332 else if (sText.getLength() <= 5)
334 auto pIssue = lclAddIssue(m_rIssueCollection,
SwResId(STR_HYPERLINK_TEXT_IS_SHORT),
337 pIssue->setNode(pTextNode);
339 pIssue->setDoc(rDocument);
340 pIssue->setStart(nStart);
341 pIssue->setEnd(nStart + sText.getLength());
348 : NodeCheck(rIssueCollection)
358 uno::Reference<text::XTextContent> xParagraph
360 if (!xParagraph.is())
363 uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xParagraph, uno::UNO_QUERY);
364 uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration();
365 sal_Int32 nStart = 0;
366 while (xRunEnum->hasMoreElements())
368 uno::Reference<text::XTextRange> xRun(xRunEnum->nextElement(), uno::UNO_QUERY);
371 checkTextRange(xRun, pTextNode, nStart);
372 nStart += xRun->getString().getLength();
379double calculateRelativeLuminance(
Color const& rColor)
385 double r = aBColor.
getRed();
390 r = (r <= 0.03928) ? r / 12.92 : std::pow((r + 0.055) / 1.055, 2.4);
391 g = (g <= 0.03928) ? g / 12.92 : std::pow((g + 0.055) / 1.055, 2.4);
392 b = (b <= 0.03928) ? b / 12.92 : std::pow((b + 0.055) / 1.055, 2.4);
394 return 0.2126 * r + 0.7152 * g + 0.0722 * b;
399double calculateContrastRatio(
Color const& rColor1,
Color const& rColor2)
401 const double fLuminance1 = calculateRelativeLuminance(rColor1);
402 const double fLuminance2 = calculateRelativeLuminance(rColor2);
403 const std::pair<const double, const double> aMinMax = std::minmax(fLuminance1, fLuminance2);
408 return (aMinMax.second + 0.05) / (aMinMax.first + 0.05);
411class TextContrastCheck :
public NodeCheck
414 void checkTextRange(uno::Reference<text::XTextRange>
const& xTextRange,
415 uno::Reference<text::XTextContent>
const& xParagraph,
SwTextNode* pTextNode,
416 sal_Int32 nTextStart)
418 Color nParaBackColor(COL_AUTO);
419 uno::Reference<beans::XPropertySet> xParagraphProperties(xParagraph, uno::UNO_QUERY);
420 if (!(xParagraphProperties->getPropertyValue(
"ParaBackColor") >>= nParaBackColor))
422 SAL_WARN(
"sw.a11y",
"ParaBackColor void");
426 uno::Reference<beans::XPropertySet> xProperties(xTextRange, uno::UNO_QUERY);
427 if (!xProperties.is())
431 sal_Int32 nCharColor = {};
432 if (!(xProperties->getPropertyValue(
"CharColor") >>= nCharColor))
434 SAL_WARN(
"sw.a11y",
"CharColor void");
444 Color aPageBackground(COL_AUTO);
446 if (pXFillStyleItem && pXFillStyleItem->GetValue() == css::drawing::FillStyle_SOLID)
453 Color nCharBackColor(COL_AUTO);
455 if (!(xProperties->getPropertyValue(
"CharBackColor") >>= nCharBackColor))
457 SAL_WARN(
"sw.a11y",
"CharBackColor void");
462 Color aBackgroundColor(nCharBackColor);
465 if (aBackgroundColor == COL_AUTO)
466 aBackgroundColor = nParaBackColor;
467 else if (!xTextRange->getString().isEmpty())
470 = lclAddIssue(m_rIssueCollection,
SwResId(STR_TEXT_FORMATTING_CONVEYS_MEANING),
473 pIssue->setNode(pTextNode);
475 pIssue->setDoc(rDocument);
476 pIssue->setStart(nTextStart);
477 pIssue->setEnd(nTextStart + xTextRange->getString().getLength());
480 Color aForegroundColor(ColorTransparency, nCharColor);
481 if (aForegroundColor == COL_AUTO)
485 if (aBackgroundColor == COL_AUTO)
486 aBackgroundColor = aPageBackground;
489 if (aBackgroundColor == COL_AUTO)
492 double fContrastRatio = calculateContrastRatio(aForegroundColor, aBackgroundColor);
493 if (fContrastRatio < 4.5)
495 lclAddIssue(m_rIssueCollection,
SwResId(STR_TEXT_CONTRAST));
501 : NodeCheck(rIssueCollection)
511 uno::Reference<text::XTextContent> xParagraph;
513 if (!xParagraph.is())
516 uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xParagraph, uno::UNO_QUERY);
517 uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration();
518 sal_Int32 nStart = 0;
519 while (xRunEnum->hasMoreElements())
521 uno::Reference<text::XTextRange> xRun(xRunEnum->nextElement(), uno::UNO_QUERY);
524 checkTextRange(xRun, xParagraph, pTextNode, nStart);
525 nStart += xRun->getString().getLength();
531class TextFormattingCheck :
public NodeCheck
535 : NodeCheck(rIssueCollection)
544 std::vector<OUString> aFormattings;
547 OUString sFormattingType;
548 switch (pItem->
Which())
553 sFormattingType =
"Weight";
558 sFormattingType =
"Posture";
562 sFormattingType =
"Shadowed";
566 sFormattingType =
"Font Color";
572 sFormattingType =
"Font Size";
578 sFormattingType =
"Font";
582 sFormattingType =
"Emphasis Mark";
586 sFormattingType =
"Underline";
590 sFormattingType =
"Overline";
594 sFormattingType =
"Strikethrough";
598 sFormattingType =
"Relief";
602 sFormattingType =
"Outline";
607 if (!sFormattingType.isEmpty())
608 aFormattings.push_back(sFormattingType);
609 pItem = aItemIter.NextItem();
611 if (aFormattings.empty())
615 auto pIssue = lclAddIssue(m_rIssueCollection,
SwResId(STR_TEXT_FORMATTING_CONVEYS_MEANING),
618 pIssue->setNode(pTextNode);
620 pIssue->setDoc(rDocument);
621 pIssue->setStart(pTextAttr->
GetStart());
634 for (
size_t i = 0;
i < rHints.
Count(); ++
i)
639 checkAutoFormat(pTextNode, pTextAttr);
647 auto nParagraphLength = pTextNode->
GetText().getLength();
648 if (nParagraphLength == 0)
663 = lclAddIssue(m_rIssueCollection,
SwResId(STR_TEXT_FORMATTING_CONVEYS_MEANING),
666 pIssue->setNode(pTextNode);
668 pIssue->setDoc(rDocument);
669 pIssue->setEnd(nParagraphLength);
675class NewlineSpacingCheck :
public NodeCheck
687 while (pTextNode ==
nullptr && nIndex < nCount)
690 if (pNode->IsTextNode())
700 : NodeCheck(rIssueCollection)
713 auto nParagraphLength = pTextNode->
GetText().getLength();
714 if (nParagraphLength == 0)
716 SwTextNode* pNextTextNode = getNextTextNode(pCurrent);
719 if (pNextTextNode->
GetText().getLength() == 0)
721 auto pIssue = lclAddIssue(m_rIssueCollection,
SwResId(STR_AVOID_NEWLINES_SPACE),
724 pIssue->setNode(pNextTextNode);
726 pIssue->setDoc(rDocument);
732 const OUString& sParagraphText = pTextNode->
GetText();
734 for (sal_Int32 i = 0;
i < nParagraphLength;
i++)
736 auto aChar = sParagraphText[
i];
745 = lclAddIssue(m_rIssueCollection,
SwResId(STR_AVOID_NEWLINES_SPACE),
748 pIssue->setNode(pTextNode);
750 pIssue->setDoc(rDocument);
756 else if (aChar !=
'\r')
765class SpaceSpacingCheck :
public NodeCheck
769 : NodeCheck(rIssueCollection)
777 auto nParagraphLength = pTextNode->
GetText().getLength();
778 const OUString& sParagraphText = pTextNode->
GetText();
779 sal_Int32 nSpaceCount = 0;
780 sal_Int32 nSpaceStart = 0;
781 sal_Int32 nTabCount = 0;
782 bool bNonSpaceFound =
false;
783 bool bPreviousWasChar =
false;
784 for (sal_Int32 i = 0;
i < nParagraphLength;
i++)
786 switch (sParagraphText[i])
793 if (nSpaceCount == 2)
800 if (bPreviousWasChar)
803 bPreviousWasChar =
false;
806 auto pIssue = lclAddIssue(m_rIssueCollection,
807 SwResId(STR_AVOID_TABS_FORMATTING),
810 pIssue->setNode(pTextNode);
812 pIssue->setDoc(rDocument);
814 pIssue->setEnd(nParagraphLength);
821 if (nSpaceCount >= 2)
824 = lclAddIssue(m_rIssueCollection,
SwResId(STR_AVOID_SPACES_SPACE),
827 pIssue->setNode(pTextNode);
829 pIssue->setDoc(rDocument);
830 pIssue->setStart(nSpaceStart);
831 pIssue->setEnd(nSpaceStart + nSpaceCount - 1);
833 bNonSpaceFound =
true;
834 bPreviousWasChar =
true;
843class FakeFootnoteCheck :
public NodeCheck
856 if (pEscapementItem->GetEscapement() == SvxEscapement::Superscript
859 auto pIssue = lclAddIssue(m_rIssueCollection,
SwResId(STR_AVOID_FAKE_FOOTNOTES),
862 pIssue->setNode(pTextNode);
864 pIssue->setDoc(rDocument);
866 pIssue->setEnd(pTextNode->
GetText().getLength());
870 pItem = aItemIter.NextItem();
876 : NodeCheck(rIssueCollection)
884 if (pTextNode->
GetText().getLength() == 0)
887 if (pTextNode->
GetText()[0] ==
'*')
889 auto pIssue = lclAddIssue(m_rIssueCollection,
SwResId(STR_AVOID_FAKE_FOOTNOTES),
892 pIssue->setNode(pTextNode);
894 pIssue->setDoc(rDocument);
896 pIssue->setEnd(pTextNode->
GetText().getLength());
901 for (
size_t i = 0;
i < rHints.
Count(); ++
i)
906 checkAutoFormat(pTextNode, pTextAttr);
913class FakeCaptionCheck :
public NodeCheck
917 : NodeCheck(rIssueCollection)
926 const OUString& sText = pTextNode->
GetText();
928 if (sText.getLength() == 0)
939 for (
auto aTextFrame = aIter.First(); aTextFrame; aTextFrame = aIter.Next())
941 auto aObjects = aTextFrame->GetDrawObjs();
943 nCount += aObjects->size();
953 sText.convertToString(&sTemp, RTL_TEXTENCODING_ASCII_US, 0);
954 if (sText.startsWith(
SwResId(STR_POOLCOLL_LABEL))
955 || sText.startsWith(
SwResId(STR_POOLCOLL_LABEL_ABB))
956 || sText.startsWith(
SwResId(STR_POOLCOLL_LABEL_TABLE))
957 || sText.startsWith(
SwResId(STR_POOLCOLL_LABEL_FRAME))
958 || sText.startsWith(
SwResId(STR_POOLCOLL_LABEL_DRAWING))
959 || sText.startsWith(
SwResId(STR_POOLCOLL_LABEL_FIGURE)))
961 auto pIssue = lclAddIssue(m_rIssueCollection,
SwResId(STR_AVOID_FAKE_CAPTIONS),
964 pIssue->setNode(pTextNode);
966 pIssue->setDoc(rDocument);
968 pIssue->setEnd(sText.getLength());
974class BlinkingTextCheck :
public NodeCheck
977 void checkTextRange(uno::Reference<text::XTextRange>
const& xTextRange)
979 uno::Reference<beans::XPropertySet> xProperties(xTextRange, uno::UNO_QUERY);
980 if (xProperties.is() && xProperties->getPropertySetInfo()->hasPropertyByName(
"CharFlash"))
982 bool bBlinking =
false;
983 xProperties->getPropertyValue(
"CharFlash") >>= bBlinking;
987 lclAddIssue(m_rIssueCollection,
SwResId(STR_TEXT_BLINKING));
994 : NodeCheck(rIssueCollection)
1004 uno::Reference<text::XTextContent> xParagraph;
1006 if (!xParagraph.is())
1009 uno::Reference<container::XEnumerationAccess> xRunEnumAccess(xParagraph, uno::UNO_QUERY);
1010 uno::Reference<container::XEnumeration> xRunEnum = xRunEnumAccess->createEnumeration();
1011 while (xRunEnum->hasMoreElements())
1013 uno::Reference<text::XTextRange> xRun(xRunEnum->nextElement(), uno::UNO_QUERY);
1015 checkTextRange(xRun);
1020class HeaderCheck :
public NodeCheck
1027 : NodeCheck(rIssueCollection)
1043 assert(nLevel >= 0);
1046 lclAddIssue(m_rIssueCollection,
SwResId(STR_HEADINGS_NOT_IN_ORDER));
1053class NonInteractiveFormCheck :
public NodeCheck
1057 : NodeCheck(rIssueCollection)
1070 bool bCheck =
text.indexOf(
"___") == -1;
1073 bCheck =
text.indexOf(
"....") == -1;
1076 bCheck =
text.indexOf(u
"……") == -1;
1079 bCheck =
text.indexOf(u
"….") == -1;
1082 bCheck =
text.indexOf(u
".…") == -1;
1086 lclAddIssue(m_rIssueCollection,
SwResId(STR_NON_INTERACTIVE_FORMS));
1091class FloatingTextCheck :
public NodeCheck
1095 : NodeCheck(rIssueCollection)
1103 if (!textNode || textNode->
GetText().isEmpty())
1110 lclAddIssue(m_rIssueCollection,
SwResId(STR_FLOATING_TEXT));
1115class TableHeadingCheck :
public NodeCheck
1123 : NodeCheck(rIssueCollection)
1142 lclAddIssue(m_rIssueCollection,
SwResId(STR_HEADING_IN_TABLE));
1149class HeadingOrderCheck :
public NodeCheck
1153 : NodeCheck(rIssueCollection)
1172 OUString resultString =
SwResId(STR_HEADING_ORDER);
1174 = resultString.replaceAll(
"%LEVEL_CURRENT%", OUString::number(currentLevel));
1175 resultString = resultString.replaceAll(
"%LEVEL_PREV%", OUString::number(
m_prevLevel));
1177 lclAddIssue(m_rIssueCollection, resultString);
1189class DocumentCheck :
public BaseCheck
1193 : BaseCheck(rIssueCollection)
1201class DocumentDefaultLanguageCheck :
public DocumentCheck
1205 : DocumentCheck(rIssueCollection)
1214 if (eLanguage == LANGUAGE_NONE)
1216 lclAddIssue(m_rIssueCollection,
SwResId(STR_DOCUMENT_DEFAULT_LANGUAGE),
1223 const SwAttrSet& rAttrSet = pTextFormatCollection->GetAttrSet();
1226 OUString
sName = pTextFormatCollection->GetName();
1228 =
SwResId(STR_STYLE_NO_LANGUAGE).replaceAll(
"%STYLE_NAME%", sName);
1229 lclAddIssue(m_rIssueCollection, sIssueText,
1237class DocumentTitleCheck :
public DocumentCheck
1241 : DocumentCheck(rIssueCollection)
1251 const uno::Reference<document::XDocumentPropertiesSupplier> xDPS(pShell->
GetModel(),
1252 uno::UNO_QUERY_THROW);
1253 const uno::Reference<document::XDocumentProperties> xDocumentProperties(
1254 xDPS->getDocumentProperties());
1255 OUString sTitle = xDocumentProperties->getTitle();
1256 if (sTitle.trim().isEmpty())
1258 lclAddIssue(m_rIssueCollection,
SwResId(STR_DOCUMENT_TITLE),
1264class FootnoteEndnoteCheck :
public DocumentCheck
1268 : DocumentCheck(rIssueCollection)
1279 lclAddIssue(m_rIssueCollection,
SwResId(STR_AVOID_ENDNOTES));
1283 lclAddIssue(m_rIssueCollection,
SwResId(STR_AVOID_FOOTNOTES));
1289class BackgroundImageCheck :
public DocumentCheck
1293 : DocumentCheck(rIssueCollection)
1299 uno::Reference<style::XStyleFamiliesSupplier> xStyleFamiliesSupplier(xDoc, uno::UNO_QUERY);
1300 if (!xStyleFamiliesSupplier.is())
1302 uno::Reference<container::XNameAccess> xStyleFamilies
1303 = xStyleFamiliesSupplier->getStyleFamilies();
1304 uno::Reference<container::XNameAccess> xStyleFamily(xStyleFamilies->getByName(
"PageStyles"),
1306 if (!xStyleFamily.is())
1308 const uno::Sequence<OUString>& xStyleFamilyNames = xStyleFamily->getElementNames();
1309 for (
const OUString& rStyleFamilyName : xStyleFamilyNames)
1311 uno::Reference<beans::XPropertySet> xPropertySet(
1312 xStyleFamily->getByName(rStyleFamilyName), uno::UNO_QUERY);
1313 if (!xPropertySet.is())
1315 auto aFillStyleContainer = xPropertySet->getPropertyValue(
"FillStyle");
1316 if (aFillStyleContainer.has<drawing::FillStyle>())
1318 drawing::FillStyle aFillStyle = aFillStyleContainer.get<drawing::FillStyle>();
1319 if (aFillStyle == drawing::FillStyle_BITMAP)
1321 lclAddIssue(m_rIssueCollection,
SwResId(STR_AVOID_BACKGROUND_IMAGES),
1344 if (pAny->get<OUString>().startsWith(
"fontwork-"))
1354 if (
pObject->GetObjIdentifier() == SdrObjKind::CustomShape
1355 ||
pObject->GetObjIdentifier() == SdrObjKind::Text)
1357 OUString sAlternative =
pObject->GetTitle();
1358 if (sAlternative.isEmpty())
1361 OUString sIssueText =
SwResId(STR_NO_ALT).replaceAll(
"%OBJECT_NAME%",
sName);
1401 if (
m_pDoc ==
nullptr || pNode ==
nullptr)
1406 for (std::shared_ptr<BaseCheck>& rpNodeCheck :
m_aNodeChecks)
1408 auto pNodeCheck =
dynamic_cast<NodeCheck*
>(rpNodeCheck.get());
1410 pNodeCheck->check(pNode);
1423 auto pDocumentCheck =
dynamic_cast<DocumentCheck*
>(rpDocumentCheck.get());
1425 pDocumentCheck->check(
m_pDoc);
1445 for (std::shared_ptr<BaseCheck>& rpNodeCheck :
m_aNodeChecks)
1447 auto pNodeCheck =
dynamic_cast<NodeCheck*
>(rpNodeCheck.get());
1449 pNodeCheck->check(pNode);
1456 for (sal_uInt16 nPage = 0; nPage < pModel->GetPageCount(); ++nPage)
1458 SdrPage* pPage = pModel->GetPage(nPage);
1459 for (
size_t nObject = 0; nObject < pPage->
GetObjCount(); ++nObject)
const std::vector< std::pair< OUString, OUString > > m_aNumberingCombinations
basegfx::BColor getBColor() const
virtual const SwDrawModel * GetDrawModel() const =0
Draw Model and id accessors.
css::uno::Any * GetPropertyValueByName(const OUString &rPropName)
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
css::uno::Reference< css::frame::XModel3 > GetModel() const
css::uno::Reference< css::frame::XModel3 > GetBaseModel() const
LanguageType GetLanguage() const
const SvxLanguageItem & GetLanguage(bool=true) const
bool HasSwAttrSet() const
const SwAttrSet & GetSwAttrSet() const
Does node has already its own auto-attributes? Access to SwAttrSet.
SwFootnoteIdxs & GetFootnoteIdxs()
const SfxPoolItem & GetDefault(sal_uInt16 nFormatHint) const
Get the default attribute in this document.
const SwTextFormatColls * GetTextFormatColls() const
IDocumentDrawModelAccess const & getIDocumentDrawModelAccess() const
SwDocShell * GetDocShell()
Layout frame for SwNoTextNode, i.e. graphics and OLE nodes (including charts).
OUString GetTitle() const
Base class of the Writer document model elements.
SwFrameFormat * GetFlyFormat() const
If node is in a fly return the respective format.
SwTextNode * GetTextNode()
Inline methods from Node.hxx.
SwNodeOffset GetIndex() const
SwNodes & GetNodes()
Node is in which nodes-array/doc?
SwTableBox * GetTableBox() const
If node is in a table return the respective table box.
const SwStartNode * FindFlyStartNode() const
const SwPageDesc * FindPageDesc(SwNodeOffset *pPgDescNdIdx=nullptr) const
Search PageDesc with which this node is formatted.
SwTableNode * FindTableNode()
Search table node, in which it is.
SwNoTextNode * GetNoTextNode()
SwTableNode * GetTableNode()
SwNodeType GetNodeType() const
SwNodeOffset Count() const
SwFrameFormat & GetMaster()
SwTableBox is one table cell in the document model.
SwTableLine is one table row in the document model.
const SwTable & GetTable() const
SwTable is one table in the document model, containing rows (which contain cells).
SwTableLines & GetTabLines()
SwTableFormat * GetFrameFormat()
bool IsTableComplex() const
A wrapper around SfxPoolItem to store the start position of (usually) a text portion,...
sal_Int32 GetAnyEnd() const
end (if available), else start
sal_Int32 GetStart() const
const SwFormatAutoFormat & GetAutoFormat() const
Represents the style of a paragraph.
bool IsAssignedToListLevelOfOutlineStyle() const
int GetAssignedOutlineStyleLevel() const
SwTextNode is a paragraph in the document model.
SwpHints & GetSwpHints()
getters for SwpHints
int GetAttrOutlineLevel() const
Returns outline level of this text node.
const OUString & GetText() const
SwTextFormatColl * GetTextColl() const
static rtl::Reference< SwXParagraph > CreateXParagraph(SwDoc &rDoc, SwTextNode *pTextNode, css::uno::Reference< css::text::XText > const &xParentText=nullptr, const sal_Int32 nSelStart=-1, const sal_Int32 nSelEnd=- 1)
An SwTextAttr container, stores all directly formatted text portions for a text node.
SwTextAttr * Get(size_t nPos) const
const Color & GetColorValue() const
AccessibilityIssueCollection m_aIssueCollection
std::vector< std::shared_ptr< AccessibilityIssue > > & getIssues()
std::vector< std::shared_ptr< BaseCheck > > m_aDocumentChecks
void checkNode(SwNode *pNode)
void checkObject(SdrObject *pObject)
std::vector< std::shared_ptr< BaseCheck > > m_aNodeChecks
void checkDocumentProperties()
Base class for accessibility checks.
constexpr ::Color COL_WHITE(0xFF, 0xFF, 0xFF)
EmbeddedObjectRef * pObject
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CTL_FONTSIZE(28)
constexpr TypedWhichId< SvxCrossedOutItem > RES_CHRATR_CROSSEDOUT(5)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CJK_FONT(22)
constexpr TypedWhichId< SvxUnderlineItem > RES_CHRATR_UNDERLINE(14)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_WEIGHT(15)
constexpr TypedWhichId< SvxShadowedItem > RES_CHRATR_SHADOWED(13)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_CJK_FONTSIZE(23)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
constexpr TypedWhichId< SwFormatAutoFormat > RES_TXTATR_AUTOFMT(50)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CTL_WEIGHT(31)
constexpr TypedWhichId< SvxContourItem > RES_CHRATR_CONTOUR(4)
constexpr TypedWhichId< SvxCharReliefItem > RES_CHRATR_RELIEF(36)
constexpr TypedWhichId< SvxEscapementItem > RES_CHRATR_ESCAPEMENT(6)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CTL_POSTURE(30)
constexpr TypedWhichId< SvxEmphasisMarkItem > RES_CHRATR_EMPHASIS_MARK(33)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_POSTURE(11)
constexpr TypedWhichId< SvxOverlineItem > RES_CHRATR_OVERLINE(38)
constexpr TypedWhichId< SvxWeightItem > RES_CHRATR_CJK_WEIGHT(26)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
constexpr TypedWhichId< SvxPostureItem > RES_CHRATR_CJK_POSTURE(25)
constexpr TypedWhichId< SvxColorItem > RES_CHRATR_COLOR(3)
#define SAL_WARN(area, stream)
DESKTOP_DEPLOYMENTMISC_DLLPUBLIC css::uno::Sequence< css::uno::Reference< css::xml::dom::XElement > > check(dp_misc::DescriptionInfoset const &infoset)
void remove_duplicates(std::vector< T > &rVector)
Dialog to specify the properties of date form field.
@ Table
SwTableNode is derived from SwStartNode.
SwNodeOffset abs(const SwNodeOffset &a)
constexpr TypedWhichId< SdrCustomShapeGeometryItem > SDRATTR_CUSTOMSHAPE_GEOMETRY(SDRATTR_CUSTOMSHAPE_FIRST+2)
OUString SwResId(TranslateId aId)
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)