32#include <sfx2/strings.hrc>
34#include <bitmaps.hlst>
36#include <rtl/ustrbuf.hxx>
41#include <com/sun/star/beans/PropertyValue.hpp>
42#include <com/sun/star/beans/XPropertySetInfo.hpp>
43#include <com/sun/star/container/XIndexAccess.hpp>
44#include <com/sun/star/frame/XComponentLoader.hpp>
45#include <com/sun/star/frame/XTitle.hpp>
46#include <com/sun/star/frame/XLayoutManager.hpp>
47#include <com/sun/star/frame/XController.hpp>
48#include <com/sun/star/frame/XDispatch.hpp>
49#include <com/sun/star/frame/XDispatchProvider.hpp>
50#include <com/sun/star/frame/Frame.hpp>
51#include <com/sun/star/i18n/XBreakIterator.hpp>
52#include <com/sun/star/i18n/WordType.hpp>
53#include <com/sun/star/lang/XComponent.hpp>
54#include <com/sun/star/style/XStyle.hpp>
55#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
56#include <com/sun/star/text/XText.hpp>
57#include <com/sun/star/text/XTextCursor.hpp>
58#include <com/sun/star/text/XTextDocument.hpp>
59#include <com/sun/star/text/XTextViewCursor.hpp>
60#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
61#include <com/sun/star/ucb/CommandAbortedException.hpp>
62#include <com/sun/star/util/URL.hpp>
63#include <com/sun/star/util/XSearchable.hpp>
64#include <com/sun/star/util/XSearchDescriptor.hpp>
65#include <com/sun/star/util/URLTransformer.hpp>
66#include <com/sun/star/util/XURLTransformer.hpp>
67#include <com/sun/star/util/XModifiable.hpp>
68#include <com/sun/star/util/XCloseable.hpp>
69#include <com/sun/star/util/CloseVetoException.hpp>
70#include <com/sun/star/view/XSelectionSupplier.hpp>
71#include <com/sun/star/view/XViewSettingsSupplier.hpp>
90#include <unordered_map>
123constexpr OUStringLiteral
HELP_URL =
u"vnd.sun.star.help://";
147 const Reference< XBreakIterator >& xBreak,
bool bForSearch )
149 OUStringBuffer sSearchStr;
150 sal_Int32 nStartPos = 0;
152 Boundary aBoundary = xBreak->getWordBoundary(
153 rSearchString, nStartPos, aLocale, WordType::ANYWORD_IGNOREWHITESPACES,
true );
155 while ( aBoundary.startPos < aBoundary.endPos )
157 nStartPos = aBoundary.endPos;
158 OUString sSearchToken( rSearchString.copy(
159 static_cast<sal_uInt16
>(aBoundary.startPos),
static_cast<sal_uInt16
>(aBoundary.endPos) -
static_cast<sal_uInt16
>(aBoundary.startPos) ) );
160 if ( !sSearchToken.isEmpty() && ( sSearchToken.getLength() > 1 || sSearchToken[0] !=
'.' ) )
162 if ( bForSearch && sSearchToken[ sSearchToken.getLength() - 1 ] !=
'*' )
165 if ( sSearchToken.getLength() > 1 ||
166 ( sSearchToken.getLength() > 0 && sSearchToken[ 0 ] !=
'*' ) )
168 if ( !sSearchStr.isEmpty() )
171 sSearchStr.append(
" ");
173 sSearchStr.append(
"|");
175 sSearchStr.append(sSearchToken);
178 aBoundary = xBreak->nextWord( rSearchString, nStartPos,
179 aLocale, WordType::ANYWORD_IGNOREWHITESPACES );
182 return sSearchStr.makeStringAndClear();
193struct IndexEntry_Impl
198 IndexEntry_Impl( OUString aURL,
bool bSubEntry ) :
204struct ContentEntry_Impl
209 ContentEntry_Impl( OUString _aURL,
bool bFolder ) :
210 aURL(
std::move( _aURL )), bIsFolder( bFolder ) {}
217 std::vector< OUString > aList =
220 for (
const OUString & aRow : aList)
223 OUString aTitle = aRow.getToken( 0,
'\t', nIdx );
224 OUString
aURL = aRow.getToken( 0,
'\t', nIdx );
226 bool bIsFolder = (
'1' == cFolder );
237 std::unique_ptr<weld::TreeIter> xEntry =
m_xContentBox->make_iterator(pParent);
242 delete weld::fromId<ContentEntry_Impl*>(
m_xContentBox->get_id(*xEntry));
250 ContentEntry_Impl* pContentEntry = weld::fromId<ContentEntry_Impl*>(m_xContentBox->get_id(rIter));
251 if (!m_xContentBox->iter_has_child(rIter))
259 for (
const OUString & aRow : aList)
262 OUString aTitle = aRow.getToken( 0,
'\t', nIdx );
263 OUString
aURL = aRow.getToken( 0,
'\t', nIdx );
265 bool bIsFolder = (
'1' == cFolder );
269 m_xContentBox->insert(&rIter, -1, &aTitle, &
sId,
nullptr,
nullptr,
true, m_xScratchIter.get());
270 m_xContentBox->set_image(*m_xScratchIter, aClosedBookImage);
274 Any aAny( ::utl::UCBContentHelper::GetProperty(
aURL,
"TargetURL" ) );
279 m_xContentBox->insert(&rIter, -1, &aTitle, &
sId,
nullptr,
nullptr,
false, m_xScratchIter.get());
280 m_xContentBox->set_image(*m_xScratchIter, aDocumentImage);
287 TOOLS_WARN_EXCEPTION(
"sfx.appl",
"ContentListBox_Impl::RequestingChildren(): unexpected exception" );
291 if (!pContentEntry || pContentEntry->bIsFolder)
292 m_xContentBox->set_image(rIter, aOpenBookImage);
299 ContentEntry_Impl* pContentEntry = weld::fromId<ContentEntry_Impl*>(m_xContentBox->get_id(rIter));
300 if (!pContentEntry || pContentEntry->bIsFolder)
301 m_xContentBox->set_image(rIter, aClosedBookImage);
309 ContentEntry_Impl* pEntry = weld::fromId<ContentEntry_Impl*>(
m_xContentBox->get_selected_id());
310 if (pEntry && !pEntry->bIsFolder)
317 const OUString& rID,
const OUString& rUIXMLDescription)
318 :
BuilderPage(pParent, nullptr, rUIXMLDescription, rID)
330 "sfx/ui/helpcontentpage.ui")
331 , m_xContentBox(m_xBuilder->weld_tree_view(
"content"))
332 , m_xScratchIter(m_xContentBox->make_iterator())
333 , aOpenBookImage(BMP_HELP_CONTENT_BOOK_OPEN)
334 , aClosedBookImage(BMP_HELP_CONTENT_BOOK_CLOSED)
335 , aDocumentImage(BMP_HELP_CONTENT_DOC)
348 aDoubleClickHdl.Call(
nullptr);
359 std::unique_ptr<weld::TreeIter> xEntry =
m_xContentBox->make_iterator();
364 delete weld::fromId<ContentEntry_Impl*>(
m_xContentBox->get_id(*xEntry));
375 sal_Int32 nOldPos =
nPos;
377 IndexEntry_Impl* pEntry = weld::fromId<IndexEntry_Impl*>(
m_xIndexList->get_id(
nPos));
379 while (
nPos <
nCount && ( !pEntry || pEntry->m_aURL.isEmpty() ) )
385 if ( nOldPos !=
nPos )
391 :
HelpTabPage_Impl(pParent, pIdxWin,
"HelpIndexPage",
"sfx/ui/helpindexpage.ui")
392 , m_xIndexEntry(m_xBuilder->weld_entry(
"termentry"))
393 , m_xIndexList(m_xBuilder->weld_tree_view(
"termlist"))
394 , m_xOpenBtn(m_xBuilder->weld_button(
"display"))
395 , aFactoryIdle(
"sfx2 appl IndexTabPage_Impl Factory")
396 , aAutoCompleteIdle(
"sfx2 appl IndexTabPage_Impl AutoComplete")
397 , aKeywordTimer(
"sfx2::IndexTabPage_Impl aKeywordTimer")
398 , bIsActivated(false)
399 , nRowHeight(m_xIndexList->get_height_rows(1))
422 nAllHeight = rSize.Height();
427 return Size(m_xIndexList->get_size_request().Width(), nRowHeight);
433 const ::tools::Rectangle& rRect = std::get<1>(aPayload);
434 bool bSelected = std::get<2>(aPayload);
435 const OUString& rId = std::get<3>(aPayload);
444 Point aPos(rRect.TopLeft());
447 int nIndex = m_xIndexList->find_id(rId);
448 OUString aEntry(m_xIndexList->get_text(
nIndex));
450 IndexEntry_Impl* pEntry = weld::fromId<IndexEntry_Impl*>(rId);
451 if (pEntry && pEntry->m_bSubEntry)
455 sal_Int32
nPos = aEntry.indexOf(
';');
456 rRenderContext.
DrawText(aPos, (
nPos !=-1) ? aEntry.copy(
nPos + 1) : aEntry);
459 rRenderContext.
DrawText(aPos, aEntry);
461 rRenderContext.
Pop();
466 m_xIndexEntry->set_text(m_xIndexList->get_selected_text());
471 switch (nLastCharCode)
473 case css::awt::Key::DELETE_WORD_BACKWARD:
474 case css::awt::Key::DELETE_WORD_FORWARD:
475 case css::awt::Key::DELETE_TO_BEGIN_OF_LINE:
476 case css::awt::Key::DELETE_TO_END_OF_LINE:
479 aAutoCompleteIdle.Stop();
482 aAutoCompleteIdle.Start();
493 sal_uInt16 nCode = rKCode.
GetCode();
499 sal_Int32
nIndex = m_xIndexList->get_selected_index();
500 sal_Int32 nOrigIndex =
nIndex;
501 sal_Int32
nCount = m_xIndexList->n_children();
504 m_xIndexList->set_cursor(0);
505 m_xIndexList->select(0);
506 m_xIndexEntry->set_text(m_xIndexList->get_selected_text());
516 int nVisRows = nAllHeight / nRowHeight;
521 int nVisRows = nAllHeight / nRowHeight;
532 m_xIndexList->set_cursor(
nIndex);
533 m_xIndexList->select(
nIndex);
534 m_xIndexEntry->set_text(m_xIndexList->get_selected_text());
542 m_xIndexEntry->select_region(0, -1);
550 nLastCharCode = nCode;
582 css::uno::Reference< css::beans::XPropertySetInfo > xInfo = aCnt.getProperties();
589 css::uno::Sequence< css::uno::Any > aAnySeq =
590 aCnt.getPropertyValues( aPropSeq );
592 css::uno::Sequence< OUString > aKeywordList;
593 css::uno::Sequence< css::uno::Sequence< OUString > > aKeywordRefList;
594 css::uno::Sequence< css::uno::Sequence< OUString > > aAnchorRefList;
595 css::uno::Sequence< css::uno::Sequence< OUString > > aTitleRefList;
597 if ( ( aAnySeq[0] >>= aKeywordList ) && ( aAnySeq[1] >>= aKeywordRefList ) &&
598 ( aAnySeq[2] >>= aAnchorRefList ) && ( aAnySeq[3] >>= aTitleRefList ) )
601 OUString
aIndex, aTempString;
602 sfx2::KeywordInfo::iterator it;
604 for (
int i = 0;
i < aKeywordList.getLength(); ++
i )
607 const OUString& aKeywordPair = aKeywordList[
i];
608 DBG_ASSERT( !aKeywordPair.isEmpty(),
"invalid help index" );
609 const css::uno::Sequence< OUString >& aRefList = aKeywordRefList[
i];
610 const css::uno::Sequence< OUString >& aAnchorList = aAnchorRefList[
i];
611 const css::uno::Sequence< OUString >& aTitleList = aTitleRefList[
i];
613 DBG_ASSERT( aRefList.getLength() == aAnchorList.getLength(),
"reference list and title list of different length" );
615 ndx = aKeywordPair.indexOf(
';' );
616 const bool insert = ndx != -1;
622 aTempString = aKeywordPair.copy( 0, ndx );
623 if (
aIndex != aTempString )
626 it = aInfo.emplace(aTempString, 0).first;
628 if ( (tmp = it->second++) != 0)
630 sId, aTempString + std::u16string_view(append, tmp));
638 sal_uInt32 nRefListLen = aRefList.getLength();
640 DBG_ASSERT( aAnchorList.hasElements(),
"*IndexTabPage_Impl::InitializeIndex(): AnchorList is empty!" );
641 DBG_ASSERT( nRefListLen,
"*IndexTabPage_Impl::InitializeIndex(): RefList is empty!" );
643 if ( aAnchorList.hasElements() && nRefListLen )
647 sId =
weld::toId(
new IndexEntry_Impl(aRefList[0] +
"#" + aAnchorList[0], insert));
654 it = aInfo.emplace(aKeywordPair, 0).first;
655 if ((tmp = it->second++) != 0)
656 m_xIndexList->append(
sId, aKeywordPair + std::u16string_view(append, tmp));
660 for ( sal_uInt32 j = 1; j < nRefListLen ; ++j )
662 aTempString = aKeywordPair +
" - " + aTitleList[j];
665 sId =
weld::toId(
new IndexEntry_Impl(aRefList[j] +
"#" + aAnchorList[j], insert));
669 it = aInfo.emplace(aTempString, 0).first;
670 if ( (tmp = it->second++) != 0 )
672 sId, aTempString + std::u16string_view(append, tmp));
682 TOOLS_WARN_EXCEPTION(
"sfx.appl",
"IndexTabPage_Impl::InitializeIndex(): unexpected exception" );
695 delete weld::fromId<IndexEntry_Impl*>(
m_xIndexList->get_id(
i));
701 aDoubleClickHdl.Call(
nullptr);
706 aDoubleClickHdl.Call(
nullptr);
712 aDoubleClickHdl.Call(
nullptr);
725 int nRet = nStartRow;
730 const bool bMatch = !bCaseSensitive ? rI18nHelper.
MatchString(rStr,
aStr) :
aStr.startsWith(rStr);
741 OUString aStartText = m_xIndexEntry->get_text();
742 int nStartPos, nEndPos;
743 m_xIndexEntry->get_selection_bounds(nStartPos, nEndPos);
744 int nMaxSelection = std::max(nStartPos, nEndPos);
745 if (nMaxSelection != aStartText.getLength())
748 int nActive = m_xIndexList->get_selected_index();
749 int nStart = nActive;
756 if (
nPos == -1 && nStart != 0)
766 if (
nPos == -1 && nStart != 0)
775 m_xIndexList->set_cursor(
nPos);
776 m_xIndexList->select(
nPos);
777 OUString aText = m_xIndexList->get_text(
nPos);
778 if (aText != aStartText)
779 m_xIndexEntry->set_text(aText);
780 m_xIndexEntry->select_region(aText.getLength(), aStartText.getLength());
786 if(&aKeywordTimer == pTimer && !sKeyword.isEmpty())
787 aKeywordLink.Call(*
this);
806 OUString sNewFactory( rFactory );
807 DBG_ASSERT( !sNewFactory.isEmpty(),
"empty factory" );
810 if (
sFactory.isEmpty() && !bValid )
816 if ( sNewFactory !=
sFactory && bValid )
830 aRet = pEntry->m_aURL;
865 for ( sal_Int32
n = 0;
n < nEntries;
n++)
899 "sfx/ui/helpsearchpage.ui")
900 , m_xSearchED(m_xBuilder->weld_combo_box(
"search"))
901 , m_xSearchBtn(m_xBuilder->weld_button(
"find"))
902 , m_xFullWordsCB(m_xBuilder->weld_check_button(
"completewords"))
903 , m_xScopeCB(m_xBuilder->weld_check_button(
"headings"))
904 , m_xResultsLB(m_xBuilder->weld_tree_view(
"results"))
905 , m_xOpenBtn(m_xBuilder->weld_button(
"display"))
922 if ( aUserItem >>= aUserData )
945 OUStringBuffer aUserData =
948 OUString::number(
m_xScopeCB->get_active() ? 1 : 0);
953 aUserData.append(
";" +
960 Any aUserItem( aUserData.makeStringAndClear() );
978 for (sal_Int32
i = 0, nEntryCount =
m_xSearchED->get_count();
i < nEntryCount; ++
i)
998 if ( aSearchText.isEmpty() )
1007 aSearchURL.append(aSearchText);
1010 aSearchURL.append(
"&Scope=Heading");
1012 for (
const OUString & rRow : aFactories)
1015 OUString aTitle = rRow.getToken(0,
'\t', nIdx);
1016 OUString sURL(rRow.getToken(1,
'\t', nIdx));
1019 xWaitCursor.reset();
1021 if ( aFactories.empty() )
1024 VclMessageType::Info, VclButtonsType::Ok,
1025 SfxResId(STR_INFO_NOSEARCHRESULTS)));
1032 aDoubleClickHdl.Call(
nullptr);
1038 m_xSearchBtn->set_sensitive(!aSearchText.isEmpty());
1040 if (rComboBox.changed_by_direct_pick())
1046 aDoubleClickHdl.Call(
nullptr);
1085 if (rAction ==
u"display")
1087 else if (rAction ==
u"rename")
1104 else if (rAction ==
u"delete")
1123 if (rCEvt.GetCommand() != CommandEventId::ContextMenu)
1127 std::unique_ptr<weld::Menu> xMenu = xBuilder->weld_menu(
"menu");
1129 OUString sIdent = xMenu->popup_at_rect(m_xBookmarksBox.get(),
::tools::Rectangle(rCEvt.GetMousePosPixel(),
Size(1,1)));
1130 if (!sIdent.isEmpty())
1137 bool bHandled =
false;
1138 sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
1139 if (
KEY_DELETE == nCode && m_xBookmarksBox->n_children() > 0)
1141 DoAction(
u"delete");
1150 "sfx/ui/helpbookmarkpage.ui")
1151 , m_xBookmarksBox(m_xBuilder->weld_tree_view(
"bookmarks"))
1152 , m_xBookmarksPB(m_xBuilder->weld_button(
"display"))
1163 const std::vector< SvtHistoryOptions::HistoryItem > aBookmarkSeq =
SvtHistoryOptions::GetList( EHistoryType::HelpBookmarks );
1164 for (
const auto& rBookmark : aBookmarkSeq )
1187 aDoubleClickHdl.Call(
nullptr);
1192 aDoubleClickHdl.Call(
nullptr);
1213 std::u16string_view sContent ,
1214 std::u16string_view sAnchor)
1216 OUStringBuffer sHelpURL(256);
1217 sHelpURL.append(
HELP_URL + sFactory + sContent);
1219 if (!sAnchor.empty())
1220 sHelpURL.append(sAnchor);
1221 return sHelpURL.makeStringAndClear();
1226 Reference< XComponentLoader > xLoader(
getTextFrame(), UNO_QUERY);
1231 Reference< XFrame2 > xTextFrame =
pTextWin->getFrame();
1232 Reference< XController > xTextController ;
1233 if (xTextFrame.is())
1234 xTextController = xTextFrame->getController ();
1235 if ( xTextController.is() && !xTextController->suspend(
true ) )
1237 xTextController->suspend(
false );
1247 bool bSuccess =
false;
1252 Reference< XComponent > xContent = xLoader->loadComponentFromURL(sHelpURL,
"_self", 0, Sequence< PropertyValue >());
1274 GetPage(rPage)->Activate();
1278 : m_xBuilder(
Application::CreateBuilder(pContainer,
"sfx/ui/helpcontrol.ui"))
1279 ,
m_xContainer(m_xBuilder->weld_container(
"HelpControl"))
1280 , m_xActiveLB(m_xBuilder->weld_combo_box(
"active"))
1281 , m_xTabCtrl(m_xBuilder->weld_notebook(
"tabcontrol"))
1282 , aIdle(
"sfx2 appl SfxHelpIndexWindow_Impl")
1284 , pParentWin(_pParent)
1285 , bIsInitDone(false)
1293 OUString sPageId(
"index");
1297 OUString sSavedPageId = aViewOpt.
GetPageID();
1298 if (
m_xTabCtrl->get_page_index(sSavedPageId) != -1)
1299 sPageId = sSavedPageId;
1302 ActivatePageHdl(sPageId);
1329 for (
const OUString & rRow : aFactories)
1332 OUString aTitle = rRow.getToken( 0,
'\t', nIdx );
1351 for (sal_Int32
i = 0, nEntryCount =
m_xActiveLB->get_count();
i < nEntryCount; ++
i)
1354 aFactory = aFactory.toAsciiLowerCase();
1355 if (aFactory ==
xIPage->GetFactory())
1371 if (rName ==
u"contents")
1373 else if (rName ==
u"index")
1375 else if (rName ==
u"find")
1377 else if (rName ==
u"bookmarks")
1380 assert(pPage &&
"SfxHelpIndexWindow_Impl::GetCurrentPage(): no current page");
1397 aIdle.SetPriority( TaskPriority::LOWEST );
1402 OUString aFactory = m_xActiveLB->get_active_id();
1403 if (!aFactory.isEmpty())
1405 SetFactory(aFactory.toAsciiLowerCase(),
false);
1406 aSelectFactoryLink.Call(
this);
1413 bool bIndex = xIPage->HasKeyword();
1416 bIndex = xIPage->HasKeywordIgnoreCase();
1418 OUString sPageId = bIndex ? OUString(
"index") : OUString(
"find");
1419 if (sPageId != m_xTabCtrl->get_current_page_ident())
1420 m_xTabCtrl->set_current_page(sPageId);
1424 xIPage->OpenKeyword();
1425 else if ( !xSPage->OpenKeyword( sKeyword ) )
1426 pParentWin->ShowStartPage();
1431 aPageDoubleClickLink.Call(
nullptr);
1441 aPageDoubleClickLink.Call(
nullptr);
1446 aPageDoubleClickLink.Call(
nullptr);
1451 if ( !rFactory.isEmpty() )
1468 if (
sName ==
"contents")
1470 sRet =
xCPage->GetSelectedEntry();
1472 else if (
sName ==
"index")
1474 sRet =
xIPage->GetSelectedEntry();
1476 else if (
sName ==
"find")
1478 sRet =
xSPage->GetSelectedEntry();
1480 else if (
sName ==
"bookmarks")
1482 sRet =
xBPage->GetSelectedEntry();
1495 bool bValid =
false;
1496 for (sal_Int32
i = 0, nEntryCount =
m_xActiveLB->get_count();
i < nEntryCount; ++
i)
1499 if (aFactory == _rFactory)
1533 bRet =
xIPage->HasFocusOnEdit();
1535 bRet =
xSPage->HasFocusOnEdit();
1544 sRet =
xSPage->GetSearchText();
1553 bRet =
xSPage->IsFullWordSearch();
1568 xIPage->SelectExecutableEntry();
1593 xFrame->setLayoutManager( Reference< XLayoutManager >() );
1602 xToolBox ( rBuilder.weld_toolbar(
"toolbar") ),
1603 xOnStartupCB ( rBuilder.weld_check_button(
"checkbutton") ),
1604 xMenu ( rBuilder.weld_menu(
"menu") ),
1605 aSelectIdle (
"sfx2 appl SfxHelpTextWindow_Impl Select" ),
1606 aIndexOnImage ( BMP_HELP_TOOLBOX_INDEX_ON ),
1607 aIndexOffImage ( BMP_HELP_TOOLBOX_INDEX_OFF ),
1608 aIndexOnText (
SfxResId( STR_HELP_BUTTON_INDEX_ON ) ),
1609 aIndexOffText (
SfxResId( STR_HELP_BUTTON_INDEX_OFF ) ),
1610 aOnStartupText (
SfxResId( RID_HELP_ONSTARTUP_TEXT ) ),
1611 xHelpWin ( pHelpWin ),
1614 bIsIndexOn ( false ),
1615 bIsInClose ( false ),
1616 bIsFullWordSearch ( false )
1618 xFrame = Frame::create( ::comphelper::getProcessComponentContext() );
1620 xFrame->setName(
"OFFICE_HELP" );
1641 char* pEnv = getenv(
"help_debug" );
1669 Reference < XTextRange > xRange =
getCursor();
1672 Reference < XText > xText = xRange->getText();
1673 Reference < XTextCursor > xCursor = xText->createTextCursorByRange( xRange );
1674 bRet = !xCursor->isCollapsed();
1689 Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
1696 bool bHideBox =
true;
1697 bool bHelpAtStartup =
false;
1705 if (aAny >>= bHelpAtStartup)
1719 OUString sModuleName;
1733 sModuleName = sTemp;
1736 if ( !sModuleName.isEmpty() )
1760 Reference< XTextRange > xCursor;
1764 Reference < XSelectionSupplier > xSelSup(
xFrame->getController(), UNO_QUERY );
1767 Any aAny = xSelSup->getSelection();
1768 Reference < XIndexAccess > xSelection;
1769 if ( aAny >>= xSelection )
1771 if ( xSelection->getCount() == 1 )
1773 aAny = xSelection->getByIndex(0);
1781 TOOLS_WARN_EXCEPTION(
"sfx.appl",
"SfxHelpTextWindow_Impl::getCursor(): unexpected exception" );
1791 sal_uInt16 nCode = _rKeyCode.
GetCode();
1796 if ( _rKeyCode.
IsMod1() &&
1799 if (
KEY_F == nCode )
1818 Reference < XSearchable > xSearchable(
xController->getModel(), UNO_QUERY );
1819 if ( xSearchable.is() )
1822 Reference < XSearchDescriptor > xSrchDesc = xSearchable->createSearchDescriptor();
1823 xSrchDesc->setPropertyValue(
"SearchRegularExpression",
Any(
true ) );
1824 if ( bIsFullWordSearch )
1825 xSrchDesc->setPropertyValue(
"SearchWords",
Any(
true ) );
1828 Reference< XIndexAccess > xSelection = xSearchable->findAll( xSrchDesc );
1831 Reference < XSelectionSupplier > xSelectionSup(
xController, UNO_QUERY );
1832 if ( xSelectionSup.is() )
1834 xSelectionSup->select(
Any(xSelection) );
1841 TOOLS_WARN_EXCEPTION(
"sfx.appl",
"SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" );
1848 InitToolBoxImages();
1858 bool bWrapAround = (
nullptr == pDlg );
1869 Reference < XSearchable > xSearchable(
xController->getModel(), UNO_QUERY );
1870 if ( xSearchable.is() )
1873 Reference < XSearchDescriptor > xSrchDesc = xSearchable->createSearchDescriptor();
1875 xSrchDesc->setPropertyValue(
"SearchCaseSensitive",
Any(pDlg->
IsMarchCase()) );
1878 Reference< XInterface > xSelection;
1879 Reference< XTextRange > xCursor =
getCursor();
1884 xCursor = xCursor->getStart();
1885 xSelection = xSearchable->findNext( xCursor, xSrchDesc );
1888 xSelection = xSearchable->findFirst( xSrchDesc );
1891 if ( xSelection.is() )
1893 Reference < XSelectionSupplier > xSelectionSup(
xController, UNO_QUERY );
1894 if ( xSelectionSup.is() )
1896 xSelectionSup->select(
Any(xSelection) );
1901 Reference < text::XTextViewCursorSupplier > xCrsrSupp(
xController, uno::UNO_QUERY );
1902 Reference < text::XTextViewCursor > xTVCrsr = xCrsrSupp->getViewCursor();
1905 Reference < text::XTextDocument > xDoc(
xController->getModel(), uno::UNO_QUERY );
1906 Reference < text::XText > xText = xDoc->getText();
1910 xTVCrsr->gotoRange( xText->getEnd(),
false );
1912 xTVCrsr->gotoRange( xText->getStart(),
false );
1921 VclMessageType::Info, VclButtonsType::Ok,
SfxResId(STR_INFO_NOSEARCHTEXTFOUND)));
1930 TOOLS_WARN_EXCEPTION(
"sfx.appl",
"SfxHelpTextWindow_Impl::SelectHdl(): unexpected exception" );
1941 if ( !xConfiguration.is() )
1944 bool bChecked = xOnStartupCB->get_active();
1947 ConfigurationHelper::writeRelativeKey(
1949 ConfigurationHelper::flush( xConfiguration );
1972 if ( pCmdEvt->
GetCommand() == CommandEventId::ContextMenu && pCmdWin !=
this )
1987 xMenu->append_separator(
"separator1");
1988 xMenu->append(
"backward",
SfxResId(STR_HELP_BUTTON_PREV), BMP_HELP_TOOLBOX_PREV);
1989 xMenu->set_sensitive(
"backward",
xHelpWin->HasHistoryPredecessor());
1990 xMenu->append(
"forward",
SfxResId(STR_HELP_BUTTON_NEXT), BMP_HELP_TOOLBOX_NEXT);
1991 xMenu->set_sensitive(
"forward",
xHelpWin->HasHistorySuccessor());
1992 xMenu->append(
"start",
SfxResId(STR_HELP_BUTTON_START), BMP_HELP_TOOLBOX_START);
1993 xMenu->append_separator(
"separator2");
1994 xMenu->append(
"print",
SfxResId(STR_HELP_BUTTON_PRINT), BMP_HELP_TOOLBOX_PRINT);
1995 xMenu->append(
"bookmarks",
SfxResId(STR_HELP_BUTTON_ADDBOOKMARK), BMP_HELP_TOOLBOX_BOOKMARKS);
1996 xMenu->append(
"searchdialog",
SfxResId(STR_HELP_BUTTON_SEARCHDIALOG), BMP_HELP_TOOLBOX_SEARCHDIALOG);
1997 xMenu->append_separator(
"separator3");
1998 xMenu->append_check(
"selectionmode",
SfxResId(STR_HELP_MENU_TEXT_SELECTION_MODE));
2000 aURL.Complete =
".uno:SelectTextMode";
2001 Reference< util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
2002 xTrans->parseStrict(
aURL);
2003 Reference < XDispatch > xDisp =
xFrame->queryDispatch(
aURL, OUString(), 0 );
2008 FeatureStateEvent rEvent = pStateListener->GetStateEvent();
2009 bool bCheck =
false;
2010 rEvent.State >>= bCheck;
2011 xMenu->set_active(
"selectionmode", bCheck);
2013 xMenu->append_separator(
"separator4");
2014 xMenu->append(
"copy",
SfxResId(STR_HELP_MENU_TEXT_COPY), BMP_HELP_TOOLBOX_COPY);
2019 xMenu->append_separator(
"separator5");
2020 xMenu->append(
"sourceview",
SfxResId(STR_HELP_BUTTON_SOURCEVIEW));
2023 int x,
y, width, height;
2025 xHelpWin->GetContainer()->get_extents_relative_to(*pTopLevel,
x,
y, width, height);
2037 sal_uInt16 nKeyGroup = rKeyCode.
GetGroup();
2038 sal_uInt16 nKey = rKeyCode.
GetCode();
2057 return bDone || Window::PreNotify( rNEvt );
2070 Reference< css::awt::XWindow > xWindow =
xFrame->getComponentWindow();
2072 xWindow->setFocus();
2084 Window::DataChanged( rDCEvt );
2086 if ( ( ( rDCEvt.
GetType() == DataChangedEventType::SETTINGS ) ||
2087 ( rDCEvt.
GetType() == DataChangedEventType::DISPLAY ) ) &&
2088 ( rDCEvt.
GetFlags() & AllSettingsFlags::STYLE ) )
2120 bool bSetOff =
false;
2125 Reference < XSelectionSupplier > xSelSup(
xController, UNO_QUERY );
2128 Reference < XIndexAccess > xSelection;
2129 if ( xSelSup->getSelection() >>= xSelection )
2131 Reference < XTextRange > xRange;
2132 if ( xSelection->getByIndex(0) >>= xRange )
2134 Reference < XText > xText = xRange->getText();
2135 Reference < XPropertySet > xProps( xText->createTextCursorByRange( xRange ), UNO_QUERY );
2136 OUString sStyleName;
2137 if ( xProps->getPropertyValue(
"PageStyleName" ) >>= sStyleName )
2139 Reference < XStyleFamiliesSupplier > xStyles(
xController->getModel(), UNO_QUERY );
2140 Reference < XNameContainer > xContainer;
2141 if ( xStyles->getStyleFamilies()->getByName(
"PageStyles" )
2144 Reference < XStyle > xStyle;
2145 if ( xContainer->getByName( sStyleName ) >>= xStyle )
2147 Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
2148 xPropSet->setPropertyValue(
"HeaderIsOn",
Any(
false ) );
2150 Reference< XModifiable > xReset(xStyles, UNO_QUERY);
2151 xReset->setModified(
false);
2165 SAL_WARN_IF( !bSetOff,
"sfx.appl",
"SfxHelpTextWindow_Impl::SetPageStyleHeaderOff(): set off failed" );
2174 css::uno::Reference< css::util::XCloseable > xCloseable (
xFrame, css::uno::UNO_QUERY );
2175 if (xCloseable.is())
2176 xCloseable->close(
true);
2178 catch( css::util::CloseVetoException& )
2190 m_xSrchDlg = std::make_shared<sfx2::SearchDialog>(
pTextWin->GetFrameWeld(),
"HelpSearchDialog");
2195 Reference< XTextRange > xCursor =
getCursor();
2198 OUString sText = xCursor->getString();
2199 if ( !sText.isEmpty() )
2222 int nNewWidth = rSize.Width();
2243 if ( !aViewOpt.
Exists() )
2249 if ( aUserItem >>= aUserData )
2268 sal_Int32 nW = 0, nH = 0;
2272 css::awt::Rectangle aRect =
xWindow->getPosSize();
2279 aWinPos = pScreenWin->GetWindowExtentsAbsolute().TopLeft();
2282 const OUString aUserData = OUString::number(
nIndexSize )
2284 +
";" + OUString::number( nW )
2285 +
";" + OUString::number( nH )
2286 +
";" + OUString::number(
aWinPos.
X() )
2287 +
";" + OUString::number(
aWinPos.
Y() );
2299 bGrabFocusToToolBox = pTextWin->GetToolBox().has_focus();
2305 xIndexWin->SelectExecutableEntry();
2306 OUString aEntry = xIndexWin->GetSelectedEntry();
2308 if ( aEntry.isEmpty() )
2313 bool bComplete = aEntry.toAsciiLowerCase().match(
"vnd.sun.star.help");
2319 std::u16string_view aId;
2320 OUString aAnchor(
'#');
2323 sal_Int32 nIdx{ 0 };
2333 loadHelpContent(sHelpURL);
2338 if ( sTitle.isEmpty() )
2339 sTitle = GetParent()->GetText();
2341 Reference< XTitle > xTitle(
xFrame, UNO_QUERY);
2343 xTitle->setTitle(sTitle +
" - " + xIndexWin->GetActiveFactoryTitle());
2347 xIndexWin->ClearSearchPage();
2353 SetFactory( rListener.GetFactory() );
2361 if ( aObj.
GetProtocol() == INetProtocol::VndSunStarHelp )
2367 pTextWin->GetToolBox().grab_focus();
2381 Reference < XViewSettingsSupplier > xSettings(
xController, UNO_QUERY );
2382 Reference < XPropertySet > xViewProps = xSettings->getViewSettings();
2383 Reference< XPropertySetInfo > xInfo = xViewProps->getPropertySetInfo();
2384 xViewProps->setPropertyValue(
"ShowContentTips",
Any(
false ) );
2385 xViewProps->setPropertyValue(
"ShowGraphics",
Any(
true ) );
2386 xViewProps->setPropertyValue(
"ShowTables",
Any(
true ) );
2387 xViewProps->setPropertyValue(
"HelpURL",
Any( OUString(
"HID:SFX2_HID_HELP_ONHELP") ) );
2388 OUString sProperty(
"IsExecuteHyperlinks" );
2389 if ( xInfo->hasPropertyByName( sProperty ) )
2390 xViewProps->setPropertyValue( sProperty,
Any(
true ) );
2401 if ( !sSearchText.isEmpty() )
2410 const css::uno::Reference < css::frame::XFrame2 >& rFrame,
2416 pTextWin ( nullptr ),
2420 bGrabFocusToToolBox ( false ),
2426 sTitle ( pParent->GetText() )
2445 Reference < XFrames > xFrames = rFrame->getFrames();
2446 xFrames->append( Reference<XFrame>(
pTextWin->getFrame(), UNO_QUERY_THROW) );
2478 bool bHandled =
false;
2479 if ( rNEvt.
GetType() == NotifyEventType::KEYINPUT )
2483 sal_uInt16 nKey = rKeyCode.
GetCode();
2497 return bHandled || Window::PreNotify( rNEvt );
2510 pScreenWin->SetPosPixel(
aWinPos);
2516 xIndexWin->SetFactory( rFactory,
true );
2522 if ( aObj.
GetProtocol() == INetProtocol::VndSunStarHelp )
2528 if (rActionId ==
u"index")
2534 else if (rActionId ==
u"start")
2538 else if (rActionId ==
u"backward" || rActionId ==
u"forward")
2541 aURL.Complete =
".uno:Backward";
2542 if (rActionId ==
u"forward")
2543 aURL.Complete =
".uno:Forward";
2544 Reference< util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
2545 xTrans->parseStrict(
aURL);
2548 else if (rActionId ==
u"searchdialog")
2552 else if (rActionId ==
u"print" || rActionId ==
u"sourceview" || rActionId ==
u"copy" || rActionId ==
u"selectionmode")
2554 Reference < XDispatchProvider > xProv =
pTextWin->getFrame();
2558 if (rActionId ==
u"print")
2559 aURL.Complete =
".uno:Print";
2560 else if (rActionId ==
u"sourceview")
2561 aURL.Complete =
".uno:SourceView";
2562 else if (rActionId ==
u"copy")
2563 aURL.Complete =
".uno:Copy";
2565 aURL.Complete =
".uno:SelectTextMode";
2566 Reference< util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
2567 xTrans->parseStrict(
aURL);
2568 Reference < XDispatch > xDisp = xProv->queryDispatch(
aURL, OUString(), 0 );
2570 xDisp->dispatch(
aURL, Sequence < PropertyValue >() );
2573 else if (rActionId ==
u"bookmarks")
2576 if ( !
aURL.isEmpty() )
2581 css::uno::Reference< css::beans::XPropertySetInfo > xInfo = aCnt.getProperties();
2586 if ( aAny >>= aValue )
2610 Reference< XFramesSupplier > xCreator =
getTextFrame()->getCreator();
2611 while ( xCreator.is() && !xCreator->isTop() )
2613 xCreator = xCreator->getCreator();
2617 if ( xCreator.is() && xCreator->isTop() )
2619 Reference < XCloseable > xCloser( xCreator, UNO_QUERY );
2621 xCloser->close(
false );
2652 : GenericDialogController(pParent,
"sfx/ui/bookmarkdialog.ui",
"BookmarkDialog")
2653 , m_xTitleED(m_xBuilder->weld_entry(
"entry"))
2654 , m_xAltTitle(m_xBuilder->weld_label(
"alttitle"))
const vcl::I18nHelper & GetUILocaleI18nHelper() const
const vcl::I18nHelper & GetLocaleI18nHelper() const
const LanguageTag & GetUILanguageTag() const
const StyleSettings & GetStyleSettings() const
static std::unique_ptr< weld::Builder > CreateInterimBuilder(vcl::Window *pParent, const OUString &rUIFile, bool bAllowCycleFocusOut, sal_uInt64 nLOKWindowId=0)
static const AllSettings & GetSettings()
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
BookmarksTabPage_Impl(weld::Widget *pParent, SfxHelpIndexWindow_Impl *pIdxWin)
std::unique_ptr< weld::TreeView > m_xBookmarksBox
void SetDoubleClickHdl(const Link< LinkParamNone *, void > &rLink)
OUString GetSelectedEntry() const
std::unique_ptr< weld::Button > m_xBookmarksPB
virtual ~BookmarksTabPage_Impl() override
Link< LinkParamNone *, void > aDoubleClickHdl
void AddBookmarks(const OUString &rTitle, const OUString &rURL)
void DoAction(std::u16string_view rAction)
std::unique_ptr< weld::Container > m_xContainer
CommandEventId GetCommand() const
const Point & GetMousePosPixel() const
bool IsMouseEvent() const
OUString aClosedBookImage
std::unique_ptr< weld::TreeIter > m_xScratchIter
void SetDoubleClickHdl(const Link< LinkParamNone *, void > &rLink)
ContentTabPage_Impl(weld::Widget *pParent, SfxHelpIndexWindow_Impl *_pIdxWin)
void ClearChildren(const weld::TreeIter *pParent)
Link< LinkParamNone *, void > aDoubleClickHdl
std::unique_ptr< weld::TreeView > m_xContentBox
virtual ~ContentTabPage_Impl() override
OUString GetSelectedEntry() const
DataChangedEventType GetType() const
AllSettingsFlags GetFlags() const
virtual bool EventNotify(NotifyEvent &rNEvt) override
virtual void SAL_CALL dispatch(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
void setInterception(const css::uno::Reference< css::frame::XFrame > &xFrame)
void addURL(const OUString &rURL)
bool HasHistorySucc() const
const OUString & GetCurrentURL() const
bool HasHistoryPred() const
void InitWaiter(SfxHelpWindow_Impl *pWindow)
HelpTabPage_Impl(weld::Widget *pParent, SfxHelpIndexWindow_Impl *_pIdxWin, const OUString &rID, const OUString &rUIXMLDescription)
SfxHelpIndexWindow_Impl * m_pIdxWin
virtual ~HelpTabPage_Impl() override
static OUString decode(std::u16string_view rText, DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
OUString GetHost(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
INetProtocol GetProtocol() const
static OUString encode(std::u16string_view rText, Part ePart, EncodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
virtual void Start(bool bStartTimer=true) override
void SelectExecutableEntry()
OUString GetSelectedEntry() const
Link< IndexTabPage_Impl &, void > aKeywordLink
std::unique_ptr< weld::TreeView > m_xIndexList
std::unique_ptr< weld::Button > m_xOpenBtn
Link< LinkParamNone *, void > aDoubleClickHdl
bool HasKeywordIgnoreCase()
void SetDoubleClickHdl(const Link< LinkParamNone *, void > &rLink)
int starts_with(const OUString &rStr, int nStartRow, bool bCaseSensitive)
std::unique_ptr< weld::Entry > m_xIndexEntry
virtual void Activate() override
void SetFactory(const OUString &rFactory)
virtual ~IndexTabPage_Impl() override
IndexTabPage_Impl(weld::Widget *pParent, SfxHelpIndexWindow_Impl *pIdxWin)
void SetKeyword(const OUString &rKeyword)
const vcl::KeyCode & GetKeyCode() const
const css::lang::Locale & getLocale(bool bResolveSystem=true) const
const KeyEvent * GetKeyEvent() const
vcl::Window * GetWindow() const
const CommandEvent * GetCommandEvent() const
NotifyEventType GetType() const
void SetTextColor(const Color &rColor)
void Push(vcl::PushFlags nFlags=vcl::PushFlags::ALL)
tools::Long GetTextHeight() const
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)
constexpr tools::Long Y() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
VclPtr< vcl::Window > m_xBox
virtual void dispose() override
std::unique_ptr< weld::Button > m_xOpenBtn
std::unique_ptr< weld::CheckButton > m_xFullWordsCB
Link< LinkParamNone *, void > aDoubleClickHdl
void ClearSearchResults()
void SetFactory(const OUString &rFactory)
void RememberSearchText(const OUString &rSearchText)
std::unique_ptr< weld::Button > m_xSearchBtn
std::unique_ptr< weld::CheckButton > m_xScopeCB
OUString GetSelectedEntry() const
std::unique_ptr< weld::ComboBox > m_xSearchED
void SetDoubleClickHdl(const Link< LinkParamNone *, void > &rLink)
SearchTabPage_Impl(weld::Widget *pParent, SfxHelpIndexWindow_Impl *pIdxWin)
css::uno::Reference< css::i18n::XBreakIterator > xBreakIterator
virtual ~SearchTabPage_Impl() override
bool OpenKeyword(const OUString &rKeyword)
std::unique_ptr< weld::TreeView > m_xResultsLB
SfxAddHelpBookmarkDialog_Impl(weld::Widget *pParent, bool bRename)
std::unique_ptr< weld::Entry > m_xTitleED
std::unique_ptr< weld::Label > m_xAltTitle
OUString GetTitle() const
void SetTitle(const OUString &rTitle)
static std::vector< OUString > GetResultSet(const OUString &rURL)
static std::vector< OUString > GetHelpTreeViewContents(const OUString &rURL)
HelpTabPage_Impl * GetPage(std::u16string_view)
void OpenKeyword(const OUString &rKeyword)
BookmarksTabPage_Impl * GetBookmarksPage()
SearchTabPage_Impl * GetSearchPage()
bool HasFocusOnEdit() const
Link< LinkParamNone *, void > aPageDoubleClickLink
void SelectExecutableEntry()
std::unique_ptr< weld::Notebook > m_xTabCtrl
std::unique_ptr< weld::Container > m_xContainer
Link< SfxHelpIndexWindow_Impl *, void > aSelectFactoryLink
~SfxHelpIndexWindow_Impl()
std::unique_ptr< ContentTabPage_Impl > xCPage
bool IsFullWordSearch() const
void AddBookmarks(const OUString &rTitle, const OUString &rURL)
void SetFactory(const OUString &rFactory, bool bActive)
std::unique_ptr< SearchTabPage_Impl > xSPage
ContentTabPage_Impl * GetContentPage()
SfxHelpIndexWindow_Impl(SfxHelpWindow_Impl *pParent, weld::Container *pContainer)
OUString GetSelectedEntry() const
IndexTabPage_Impl * GetIndexPage()
VclPtr< SfxHelpWindow_Impl > pParentWin
std::unique_ptr< BookmarksTabPage_Impl > xBPage
std::unique_ptr< weld::ComboBox > m_xActiveLB
std::unique_ptr< IndexTabPage_Impl > xIPage
weld::Window * GetFrameWeld() const
OUString const & GetFactory() const
void SetDoubleClickHdl(const Link< LinkParamNone *, void > &rLink)
bool IsValidFactory(std::u16string_view _rFactory)
OUString GetSearchText() const
virtual void GetFocus() override
css::uno::Reference< css::frame::XFrame2 > xFrame
bool HasSelection() const
virtual void Resize() override
void FindHdl(sfx2::SearchDialog *)
SfxHelpTextWindow_Impl(SfxHelpWindow_Impl *pHelpWin, weld::Builder &rBuilder, vcl::Window *pParent)
std::shared_ptr< sfx2::SearchDialog > m_xSrchDlg
VclPtr< vcl::Window > pTextWin
bool isHandledKey(const vcl::KeyCode &_rKeyCode)
void SelectSearchText(const OUString &rSearchText, bool _bIsFullWordSearch)
void SetPageStyleHeaderOff() const
void ToggleIndex(bool bOn)
virtual ~SfxHelpTextWindow_Impl() override
css::uno::Reference< css::text::XTextRange > getCursor() const
VclPtr< SfxHelpWindow_Impl > xHelpWin
css::uno::Reference< css::i18n::XBreakIterator > const & GetBreakIterator()
css::uno::Reference< css::uno::XInterface > xConfiguration
std::unique_ptr< weld::Toolbar > xToolBox
virtual void dispose() override
css::uno::Reference< css::i18n::XBreakIterator > xBreakIterator
virtual void DataChanged(const DataChangedEvent &rDCEvt) override
std::unique_ptr< weld::Menu > xMenu
virtual bool PreNotify(NotifyEvent &rNEvt) override
std::unique_ptr< weld::CheckButton > xOnStartupCB
bool HasHistorySuccessor() const
css::uno::Reference< css::awt::XWindow > m_xHelpTextXWindow
std::unique_ptr< SfxHelpIndexWindow_Impl > xIndexWin
void SetFactory(const OUString &rFactory)
virtual void GetFocus() override
virtual ~SfxHelpWindow_Impl() override
friend class SfxHelpIndexWindow_Impl
std::unique_ptr< weld::Paned > m_xContainer
HelpInterceptor_Impl * pHelpInterceptor
std::unique_ptr< weld::Container > m_xHelpPaneWindow
void SetHelpURL(std::u16string_view rURL)
std::unique_ptr< weld::Builder > m_xBuilder
void openDone(std::u16string_view sURL, bool bSuccess)
css::uno::Reference< css::awt::XWindow > xWindow
std::unique_ptr< weld::Container > m_xHelpTextWindow
virtual bool PreNotify(NotifyEvent &rNEvt) override
static OUString buildHelpURL(std::u16string_view sFactory, std::u16string_view sContent, std::u16string_view sAnchor)
void DoAction(std::u16string_view rAction)
virtual void dispose() override
void loadHelpContent(const OUString &sHelpURL, bool bAddToHistory=true)
css::uno::Reference< css::frame::XFrame2 > const & getTextFrame() const
void setContainerWindow(const css::uno::Reference< css::awt::XWindow > &xWin)
rtl::Reference< HelpListener_Impl > pHelpListener
bool HasHistoryPredecessor() const
SfxHelpWindow_Impl(const css::uno::Reference< css::frame::XFrame2 > &rFrame, vcl::Window *pParent)
VclPtr< SfxHelpTextWindow_Impl > pTextWin
static OUString GetCurrentModuleIdentifier()
static OUString GetDefaultHelpModule()
constexpr tools::Long Height() const
constexpr tools::Long Width() const
const Color & GetDialogTextColor() const
const Color & GetHighlightTextColor() const
void RemoveListenerLink(const Link< LinkParamNone *, void > &rLink)
void AddListenerLink(const Link< LinkParamNone *, void > &rLink)
void SetPageID(const OUString &rID)
css::uno::Any GetUserItem(const OUString &sName) const
void SetUserItem(const OUString &sName, const css::uno::Any &aValue)
OUString GetPageID() const
void SetVisible(bool bState)
void SetPriority(TaskPriority ePriority)
virtual bool EventNotify(NotifyEvent &rNEvt) override
TextWin_Impl(vcl::Window *pParent)
void SetInvokeHandler(const Link< Timer *, void > &rLink)
virtual void Start(bool bStartTimer=true) override
static css::uno::Reference< css::awt::XWindow > GetInterface(vcl::Window *pWindow)
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
reference_type * get() const
static VclPtr< reference_type > Create(Arg &&... arg)
bool IsOnlyWholeWords() const
bool IsWrapAround() const
OUString GetSearchText() const
bool IsSearchBackwards() const
static void runAsync(const std::shared_ptr< SearchDialog > &rController)
bool MatchString(const OUString &rStr1, const OUString &rStr2) const
sal_uInt16 GetGroup() const
sal_uInt16 GetCode() const
sal_uInt16 GetModifier() const
virtual void dispose() override
void SetStyle(WinBits nStyle)
vcl::Window * GetParent() const
const AllSettings & GetSettings() const
Size GetOutputSizePixel() const
weld::Window * GetFrameWeld() const
virtual bool EventNotify(NotifyEvent &rNEvt)
void SetHelpId(const OUString &)
std::shared_ptr< weld::Dialog > m_xDialog
std::tuple< vcl::RenderContext &, const tools::Rectangle &, bool, const OUString & > render_args
std::pair< vcl::RenderContext &, const OUString & > get_size_args
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
std::deque< AttacherIndex_Impl > aIndex
constexpr OUStringLiteral HID_HELP_TOOLBOXITEM_INDEX
constexpr OUStringLiteral HID_HELP_TOOLBOXITEM_BACKWARD
constexpr OUStringLiteral HID_HELP_TOOLBOXITEM_PRINT
constexpr OUStringLiteral HID_HELP_WINDOW
constexpr OUStringLiteral HID_HELP_TOOLBOXITEM_SEARCHDIALOG
constexpr OUStringLiteral HID_HELP_TOOLBOXITEM_START
constexpr OUStringLiteral HID_HELP_TOOLBOXITEM_BOOKMARKS
constexpr OUStringLiteral HID_HELP_TOOLBOXITEM_FORWARD
constexpr OUStringLiteral HID_HELP_TOOLBOX
constexpr sal_uInt16 KEYGROUP_ALPHA
constexpr sal_uInt16 KEY_LEFT
constexpr sal_uInt16 KEY_F4
constexpr sal_uInt16 KEY_PAGEDOWN
constexpr sal_uInt16 KEY_TAB
constexpr sal_uInt16 KEY_UP
constexpr sal_uInt16 KEY_A
constexpr sal_uInt16 KEY_RIGHT
constexpr sal_uInt16 KEY_F
constexpr sal_uInt16 KEY_DELETE
constexpr sal_uInt16 KEY_DOWN
constexpr sal_uInt16 KEY_PAGEUP
constexpr sal_uInt16 KEY_C
constexpr sal_uInt16 KEY_W
constexpr sal_uInt16 KEY_P
constexpr sal_uInt16 KEY_BACKSPACE
#define LINK(Instance, Class, Member)
#define SAL_WARN_IF(condition, area, stream)
void Clear(EHistoryType eHistory)
std::vector< HistoryItem > GetList(EHistoryType eHistory)
void AppendItem(EHistoryType eHistory, const OUString &sURL, const OUString &sFilter, const OUString &sTitle, const std::optional< OUString > &sThumbnail, ::std::optional< bool > const oIsReadOnly)
double getLength(const B2DPolygon &rCandidate)
OString strip(const OString &rIn, char c)
sal_Int32 getTokenCount(std::string_view rIn, char cTok)
Reference< XComponentContext > getProcessComponentContext()
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
constexpr bool starts_with(std::basic_string_view< charT, traits > sv, std::basic_string_view< charT, traits > x) noexcept
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
std::unordered_map< OUString, int > KeywordInfo
static OUString PrepareSearchString(const OUString &rSearchString, const Reference< XBreakIterator > &xBreak, bool bForSearch)
Prepare a search string for searching or selecting.
VCL_DLLPUBLIC css::uno::Reference< css::i18n::XBreakIterator > CreateBreakIterator()
OUString toId(const void *pValue)
IMPL_LINK_NOARG(ContentTabPage_Impl, DoubleClickHdl, weld::TreeView &, bool)
constexpr OUStringLiteral PROPERTY_TITLE
constexpr OUStringLiteral KEY_HELP_ON_OPEN
constexpr OUStringLiteral PROPERTY_TITLEREF
constexpr OUStringLiteral PROPERTY_KEYWORDREF
constexpr OUStringLiteral PROPERTY_KEYWORDLIST
constexpr OUStringLiteral CONFIGNAME_SEARCHPAGE
constexpr OUStringLiteral PROPERTY_ANCHORREF
constexpr OUStringLiteral PATH_OFFICE_FACTORIES
constexpr OUStringLiteral USERITEM_NAME
constexpr OUStringLiteral HELP_SEARCH_TAG
constexpr OUStringLiteral IMAGE_URL
constexpr OUStringLiteral CONFIGNAME_HELPWIN
constexpr OUStringLiteral PACKAGE_SETUP
constexpr OUStringLiteral KEY_UI_NAME
constexpr OUStringLiteral HELP_URL
static void lcl_disableLayoutOfFrame(const Reference< XFrame2 > &xFrame)
IMPL_LINK(ContentTabPage_Impl, ExpandingHdl, const weld::TreeIter &, rIter, bool)
constexpr OUStringLiteral CONFIGNAME_INDEXWIN
void AppendConfigToken(OUStringBuffer &rURL, bool bQuestionMark)
Appends ?Language=xy&System=abc to the help URL in rURL.
Reference< XNameAccess > m_xContainer
OUString SfxResId(TranslateId aId)
Reference< XController > xController
Reference< XFrame > xFrame
WinBits const WB_DIALOGCONTROL
WinBits const WB_DOCKABLE
WinBits const WB_CLIPCHILDREN