convert help search page to .ui
Change-Id: Ib40ab75ce04c60df29895b0b14450d507d67db23
This commit is contained in:
@@ -21,6 +21,12 @@
|
|||||||
<glade-widget-class title="Index Box" name="sfxlo-IndexBox"
|
<glade-widget-class title="Index Box" name="sfxlo-IndexBox"
|
||||||
generic-name="IndexBox" parent="GtkComboBoxText"
|
generic-name="IndexBox" parent="GtkComboBoxText"
|
||||||
icon-name="widget-gtk-comboboxtext"/>
|
icon-name="widget-gtk-comboboxtext"/>
|
||||||
|
<glade-widget-class title="Search Box" name="sfxlo-SearchBox"
|
||||||
|
generic-name="SearchBox" parent="GtkComboBoxText"
|
||||||
|
icon-name="widget-gtk-comboboxtext"/>
|
||||||
|
<glade-widget-class title="Search Results Box" name="sfxlo-SearchResultsBox"
|
||||||
|
generic-name="SearchResultsBox" parent="GtkComboBoxText"
|
||||||
|
icon-name="widget-gtk-comboboxtext"/>
|
||||||
<glade-widget-class title="Font PickListBox" name="smlo-SmFontPickListBox"
|
<glade-widget-class title="Font PickListBox" name="smlo-SmFontPickListBox"
|
||||||
generic-name="SmFontPickListBox" parent="GtkComboBoxText"
|
generic-name="SmFontPickListBox" parent="GtkComboBoxText"
|
||||||
icon-name="widget-gtk-comboboxtext"/>
|
icon-name="widget-gtk-comboboxtext"/>
|
||||||
|
@@ -24,6 +24,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
|
|||||||
sfx2/uiconfig/ui/errorfindemaildialog \
|
sfx2/uiconfig/ui/errorfindemaildialog \
|
||||||
sfx2/uiconfig/ui/helpbookmarkpage \
|
sfx2/uiconfig/ui/helpbookmarkpage \
|
||||||
sfx2/uiconfig/ui/helpindexpage \
|
sfx2/uiconfig/ui/helpindexpage \
|
||||||
|
sfx2/uiconfig/ui/helpsearchpage \
|
||||||
sfx2/uiconfig/ui/inputdialog \
|
sfx2/uiconfig/ui/inputdialog \
|
||||||
sfx2/uiconfig/ui/licensedialog \
|
sfx2/uiconfig/ui/licensedialog \
|
||||||
sfx2/uiconfig/ui/managestylepage \
|
sfx2/uiconfig/ui/managestylepage \
|
||||||
|
@@ -43,7 +43,6 @@
|
|||||||
|
|
||||||
#define WIN_HELPINDEX (RID_SFX_APP_START+99)
|
#define WIN_HELPINDEX (RID_SFX_APP_START+99)
|
||||||
#define TP_HELP_CONTENT (RID_SFX_APP_START+100)
|
#define TP_HELP_CONTENT (RID_SFX_APP_START+100)
|
||||||
#define TP_HELP_SEARCH (RID_SFX_APP_START+102)
|
|
||||||
|
|
||||||
#define MENU_HELP_BOOKMARKS (RID_SFX_APP_START+105)
|
#define MENU_HELP_BOOKMARKS (RID_SFX_APP_START+105)
|
||||||
#define RID_INFO_NOSEARCHRESULTS (RID_SFX_APP_START+106)
|
#define RID_INFO_NOSEARCHRESULTS (RID_SFX_APP_START+106)
|
||||||
|
@@ -873,6 +873,15 @@ void IndexTabPage_Impl::OpenKeyword()
|
|||||||
|
|
||||||
// class SearchBox_Impl --------------------------------------------------
|
// class SearchBox_Impl --------------------------------------------------
|
||||||
|
|
||||||
|
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSearchBox(Window *pParent,
|
||||||
|
VclBuilder::stringmap &)
|
||||||
|
{
|
||||||
|
WinBits nWinBits = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE|WB_DROPDOWN;
|
||||||
|
SearchBox_Impl* pComboBox = new SearchBox_Impl(pParent, nWinBits);
|
||||||
|
pComboBox->EnableAutoSize(true);
|
||||||
|
return pComboBox;
|
||||||
|
}
|
||||||
|
|
||||||
bool SearchBox_Impl::PreNotify( NotifyEvent& rNEvt )
|
bool SearchBox_Impl::PreNotify( NotifyEvent& rNEvt )
|
||||||
{
|
{
|
||||||
sal_Bool bHandled = sal_False;
|
sal_Bool bHandled = sal_False;
|
||||||
@@ -897,6 +906,18 @@ void SearchBox_Impl::Select()
|
|||||||
|
|
||||||
// class SearchResultsBox_Impl -------------------------------------------
|
// class SearchResultsBox_Impl -------------------------------------------
|
||||||
|
|
||||||
|
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSearchResultsBox(Window *pParent,
|
||||||
|
VclBuilder::stringmap &rMap)
|
||||||
|
{
|
||||||
|
WinBits nWinBits = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK;
|
||||||
|
OString sBorder = VclBuilder::extractCustomProperty(rMap);
|
||||||
|
if (!sBorder.isEmpty())
|
||||||
|
nWinBits |= WB_BORDER;
|
||||||
|
SearchResultsBox_Impl* pListBox = new SearchResultsBox_Impl(pParent, nWinBits);
|
||||||
|
pListBox->EnableAutoSize(true);
|
||||||
|
return pListBox;
|
||||||
|
}
|
||||||
|
|
||||||
bool SearchResultsBox_Impl::Notify( NotifyEvent& rNEvt )
|
bool SearchResultsBox_Impl::Notify( NotifyEvent& rNEvt )
|
||||||
{
|
{
|
||||||
bool bHandled = false;
|
bool bHandled = false;
|
||||||
@@ -912,29 +933,30 @@ bool SearchResultsBox_Impl::Notify( NotifyEvent& rNEvt )
|
|||||||
|
|
||||||
// class SearchTabPage_Impl ----------------------------------------------
|
// class SearchTabPage_Impl ----------------------------------------------
|
||||||
|
|
||||||
SearchTabPage_Impl::SearchTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin ) :
|
SearchTabPage_Impl::SearchTabPage_Impl(Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin)
|
||||||
|
: HelpTabPage_Impl(pParent, _pIdxWin, "HelpSearchPage",
|
||||||
|
"sfx/ui/helpsearchpage.ui")
|
||||||
|
|
||||||
HelpTabPage_Impl( pParent, _pIdxWin, SfxResId( TP_HELP_SEARCH ) ),
|
,
|
||||||
|
|
||||||
aSearchFT ( this, SfxResId( FT_SEARCH ) ),
|
|
||||||
aSearchED ( this, SfxResId( ED_SEARCH ) ),
|
|
||||||
aSearchBtn ( this, SfxResId( PB_SEARCH ) ),
|
|
||||||
aFullWordsCB ( this, SfxResId( CB_FULLWORDS ) ),
|
|
||||||
aScopeCB ( this, SfxResId( CB_SCOPE ) ),
|
|
||||||
aResultsLB ( this, SfxResId( LB_RESULT ) ),
|
|
||||||
aOpenBtn ( this, SfxResId( PB_OPEN_SEARCH ) ),
|
|
||||||
xBreakIterator ( vcl::unohelper::CreateBreakIterator() )
|
xBreakIterator ( vcl::unohelper::CreateBreakIterator() )
|
||||||
|
|
||||||
{
|
{
|
||||||
FreeResource();
|
get(m_pSearchED, "search");
|
||||||
|
get(m_pSearchBtn, "find");
|
||||||
|
get(m_pFullWordsCB, "completewords");
|
||||||
|
get(m_pScopeCB, "headings");
|
||||||
|
get(m_pResultsLB, "results");
|
||||||
|
Size aSize(LogicToPixel(Size(128 , 30), MAP_APPFONT));
|
||||||
|
m_pResultsLB->set_width_request(aSize.Width());
|
||||||
|
m_pResultsLB->set_height_request(aSize.Height());
|
||||||
|
get(m_pOpenBtn, "display");
|
||||||
|
|
||||||
Link aLink = LINK( this, SearchTabPage_Impl, SearchHdl );
|
Link aLink = LINK( this, SearchTabPage_Impl, SearchHdl );
|
||||||
aSearchED.SetSearchLink( aLink );
|
m_pSearchED->SetSearchLink( aLink );
|
||||||
aSearchBtn.SetClickHdl( aLink );
|
m_pSearchBtn->SetClickHdl(aLink);
|
||||||
aSearchED.SetModifyHdl( LINK( this, SearchTabPage_Impl, ModifyHdl ) );
|
m_pSearchED->SetModifyHdl( LINK( this, SearchTabPage_Impl, ModifyHdl ) );
|
||||||
aOpenBtn.SetClickHdl( LINK( this, SearchTabPage_Impl, OpenHdl ) );
|
m_pOpenBtn->SetClickHdl( LINK( this, SearchTabPage_Impl, OpenHdl ) );
|
||||||
|
|
||||||
aMinSize = GetSizePixel();
|
|
||||||
|
|
||||||
SvtViewOptions aViewOpt( E_TABPAGE, CONFIGNAME_SEARCHPAGE );
|
SvtViewOptions aViewOpt( E_TABPAGE, CONFIGNAME_SEARCHPAGE );
|
||||||
if ( aViewOpt.Exists() )
|
if ( aViewOpt.Exists() )
|
||||||
@@ -944,38 +966,36 @@ SearchTabPage_Impl::SearchTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl
|
|||||||
if ( aUserItem >>= aUserData )
|
if ( aUserItem >>= aUserData )
|
||||||
{
|
{
|
||||||
sal_Bool bChecked = ( 1 == aUserData.getToken(0, ';').toInt32() ) ? sal_True : sal_False;
|
sal_Bool bChecked = ( 1 == aUserData.getToken(0, ';').toInt32() ) ? sal_True : sal_False;
|
||||||
aFullWordsCB.Check( bChecked );
|
m_pFullWordsCB->Check( bChecked );
|
||||||
bChecked = ( 1 == aUserData.getToken(1, ';').toInt32() ) ? sal_True : sal_False;
|
bChecked = ( 1 == aUserData.getToken(1, ';').toInt32() ) ? sal_True : sal_False;
|
||||||
aScopeCB.Check( bChecked );
|
m_pScopeCB->Check( bChecked );
|
||||||
|
|
||||||
for ( sal_uInt16 i = 2; i < comphelper::string::getTokenCount(aUserData, ';'); ++i )
|
for ( sal_uInt16 i = 2; i < comphelper::string::getTokenCount(aUserData, ';'); ++i )
|
||||||
{
|
{
|
||||||
OUString aToken = aUserData.getToken(i, ';');
|
OUString aToken = aUserData.getToken(i, ';');
|
||||||
aSearchED.InsertEntry( INetURLObject::decode(
|
m_pSearchED->InsertEntry( INetURLObject::decode(
|
||||||
aToken, '%', INetURLObject::DECODE_WITH_CHARSET ) );
|
aToken, '%', INetURLObject::DECODE_WITH_CHARSET ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ModifyHdl( &aSearchED );
|
ModifyHdl(m_pSearchED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SearchTabPage_Impl::~SearchTabPage_Impl()
|
SearchTabPage_Impl::~SearchTabPage_Impl()
|
||||||
{
|
{
|
||||||
SvtViewOptions aViewOpt( E_TABPAGE, CONFIGNAME_SEARCHPAGE );
|
SvtViewOptions aViewOpt( E_TABPAGE, CONFIGNAME_SEARCHPAGE );
|
||||||
sal_Int32 nChecked = aFullWordsCB.IsChecked() ? 1 : 0;
|
sal_Int32 nChecked = m_pFullWordsCB->IsChecked() ? 1 : 0;
|
||||||
OUString aUserData = OUString::number( nChecked );
|
OUString aUserData = OUString::number( nChecked );
|
||||||
aUserData += ";";
|
aUserData += ";";
|
||||||
nChecked = aScopeCB.IsChecked() ? 1 : 0;
|
nChecked = m_pScopeCB->IsChecked() ? 1 : 0;
|
||||||
aUserData += OUString::number( nChecked );
|
aUserData += OUString::number( nChecked );
|
||||||
aUserData += ";";
|
aUserData += ";";
|
||||||
sal_uInt16 nCount = std::min( aSearchED.GetEntryCount(), (sal_uInt16)10 ); // save only 10 entries
|
sal_uInt16 nCount = std::min( m_pSearchED->GetEntryCount(), (sal_uInt16)10 ); // save only 10 entries
|
||||||
|
|
||||||
for ( sal_uInt16 i = 0; i < nCount; ++i )
|
for ( sal_uInt16 i = 0; i < nCount; ++i )
|
||||||
{
|
{
|
||||||
OUString aText = aSearchED.GetEntry(i);
|
OUString aText = m_pSearchED->GetEntry(i);
|
||||||
aUserData += INetURLObject::encode(
|
aUserData += INetURLObject::encode(
|
||||||
aText, INetURLObject::PART_UNO_PARAM_VALUE, '%',
|
aText, INetURLObject::PART_UNO_PARAM_VALUE, '%',
|
||||||
INetURLObject::ENCODE_ALL );
|
INetURLObject::ENCODE_ALL );
|
||||||
@@ -991,34 +1011,34 @@ SearchTabPage_Impl::~SearchTabPage_Impl()
|
|||||||
|
|
||||||
void SearchTabPage_Impl::ClearSearchResults()
|
void SearchTabPage_Impl::ClearSearchResults()
|
||||||
{
|
{
|
||||||
sal_uInt16 nCount = aResultsLB.GetEntryCount();
|
sal_uInt16 nCount = m_pResultsLB->GetEntryCount();
|
||||||
for ( sal_uInt16 i = 0; i < nCount; ++i )
|
for ( sal_uInt16 i = 0; i < nCount; ++i )
|
||||||
delete (OUString*)(sal_uIntPtr)aResultsLB.GetEntryData(i);
|
delete (OUString*)(sal_uIntPtr)m_pResultsLB->GetEntryData(i);
|
||||||
aResultsLB.Clear();
|
m_pResultsLB->Clear();
|
||||||
aResultsLB.Update();
|
m_pResultsLB->Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SearchTabPage_Impl::RememberSearchText( const OUString& rSearchText )
|
void SearchTabPage_Impl::RememberSearchText( const OUString& rSearchText )
|
||||||
{
|
{
|
||||||
for ( sal_uInt16 i = 0; i < aSearchED.GetEntryCount(); ++i )
|
for ( sal_uInt16 i = 0; i < m_pSearchED->GetEntryCount(); ++i )
|
||||||
{
|
{
|
||||||
if ( rSearchText == aSearchED.GetEntry(i) )
|
if ( rSearchText == m_pSearchED->GetEntry(i) )
|
||||||
{
|
{
|
||||||
aSearchED.RemoveEntryAt(i);
|
m_pSearchED->RemoveEntryAt(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
aSearchED.InsertEntry( rSearchText, 0 );
|
m_pSearchED->InsertEntry( rSearchText, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IMPL_LINK_NOARG(SearchTabPage_Impl, SearchHdl)
|
IMPL_LINK_NOARG(SearchTabPage_Impl, SearchHdl)
|
||||||
{
|
{
|
||||||
OUString aSearchText = comphelper::string::strip(aSearchED.GetText(), ' ');
|
OUString aSearchText = comphelper::string::strip(m_pSearchED->GetText(), ' ');
|
||||||
if ( !aSearchText.isEmpty() )
|
if ( !aSearchText.isEmpty() )
|
||||||
{
|
{
|
||||||
EnterWait();
|
EnterWait();
|
||||||
@@ -1027,11 +1047,11 @@ IMPL_LINK_NOARG(SearchTabPage_Impl, SearchHdl)
|
|||||||
OUStringBuffer aSearchURL(HELP_URL);
|
OUStringBuffer aSearchURL(HELP_URL);
|
||||||
aSearchURL.append(aFactory);
|
aSearchURL.append(aFactory);
|
||||||
aSearchURL.append(HELP_SEARCH_TAG);
|
aSearchURL.append(HELP_SEARCH_TAG);
|
||||||
if ( !aFullWordsCB.IsChecked() )
|
if ( !m_pFullWordsCB->IsChecked() )
|
||||||
aSearchText = sfx2::PrepareSearchString( aSearchText, xBreakIterator, true );
|
aSearchText = sfx2::PrepareSearchString( aSearchText, xBreakIterator, true );
|
||||||
aSearchURL.append(aSearchText);
|
aSearchURL.append(aSearchText);
|
||||||
AppendConfigToken(aSearchURL, sal_False);
|
AppendConfigToken(aSearchURL, sal_False);
|
||||||
if ( aScopeCB.IsChecked() )
|
if ( m_pScopeCB->IsChecked() )
|
||||||
aSearchURL.append("&Scope=Heading");
|
aSearchURL.append("&Scope=Heading");
|
||||||
std::vector< OUString > aFactories = SfxContentHelper::GetResultSet(aSearchURL.makeStringAndClear());
|
std::vector< OUString > aFactories = SfxContentHelper::GetResultSet(aSearchURL.makeStringAndClear());
|
||||||
for (size_t i = 0, n = aFactories.size(); i < n; ++i )
|
for (size_t i = 0, n = aFactories.size(); i < n; ++i )
|
||||||
@@ -1041,8 +1061,8 @@ IMPL_LINK_NOARG(SearchTabPage_Impl, SearchHdl)
|
|||||||
OUString aTitle = rRow.getToken( 0, '\t', nIdx );
|
OUString aTitle = rRow.getToken( 0, '\t', nIdx );
|
||||||
nIdx = 0;
|
nIdx = 0;
|
||||||
OUString* pURL = new OUString( rRow.getToken( 2, '\t', nIdx ) );
|
OUString* pURL = new OUString( rRow.getToken( 2, '\t', nIdx ) );
|
||||||
sal_uInt16 nPos = aResultsLB.InsertEntry( aTitle );
|
sal_uInt16 nPos = m_pResultsLB->InsertEntry( aTitle );
|
||||||
aResultsLB.SetEntryData( nPos, pURL );
|
m_pResultsLB->SetEntryData( nPos, pURL );
|
||||||
}
|
}
|
||||||
LeaveWait();
|
LeaveWait();
|
||||||
|
|
||||||
@@ -1056,86 +1076,33 @@ IMPL_LINK_NOARG(SearchTabPage_Impl, SearchHdl)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IMPL_LINK_NOARG(SearchTabPage_Impl, OpenHdl)
|
IMPL_LINK_NOARG(SearchTabPage_Impl, OpenHdl)
|
||||||
{
|
{
|
||||||
aResultsLB.GetDoubleClickHdl().Call( &aResultsLB );
|
m_pResultsLB->GetDoubleClickHdl().Call(m_pResultsLB);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IMPL_LINK_NOARG(SearchTabPage_Impl, ModifyHdl)
|
IMPL_LINK_NOARG(SearchTabPage_Impl, ModifyHdl)
|
||||||
{
|
{
|
||||||
OUString aSearchText = comphelper::string::strip(aSearchED.GetText(), ' ');
|
OUString aSearchText = comphelper::string::strip(m_pSearchED->GetText(), ' ');
|
||||||
aSearchBtn.Enable( !aSearchText.isEmpty() );
|
m_pSearchBtn->Enable(!aSearchText.isEmpty());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SearchTabPage_Impl::Resize()
|
|
||||||
{
|
|
||||||
Size a6Size = LogicToPixel( Size( 6, 6 ), MAP_APPFONT );
|
|
||||||
Size aSize = GetSizePixel();
|
|
||||||
if ( aSize.Width() < aMinSize.Width() )
|
|
||||||
aSize.Width() = aMinSize.Width();
|
|
||||||
Point aPnt = aSearchFT.GetPosPixel();
|
|
||||||
Size aNewSize = aSearchFT.GetSizePixel();
|
|
||||||
aNewSize.Width() = aSize.Width() - ( aPnt.X() * 2 );
|
|
||||||
aSearchFT.SetSizePixel( aNewSize );
|
|
||||||
aNewSize.Height() = aResultsLB.GetSizePixel().Height();
|
|
||||||
aResultsLB.SetSizePixel( aNewSize );
|
|
||||||
aNewSize.Height() = aFullWordsCB.GetSizePixel().Height();
|
|
||||||
aFullWordsCB.SetSizePixel( aNewSize );
|
|
||||||
aScopeCB.SetSizePixel( aNewSize );
|
|
||||||
aNewSize = aSearchED.GetSizePixel();
|
|
||||||
aNewSize.Width() = aSize.Width() - ( aPnt.X() * 2 ) -
|
|
||||||
( aSearchBtn.GetSizePixel().Width() + ( aPnt.X() / 2 ) );
|
|
||||||
aSearchED.SetSizePixel( aNewSize );
|
|
||||||
Point aNewPnt = aSearchBtn.GetPosPixel();
|
|
||||||
aNewPnt.X() = aPnt.X() + aNewSize.Width() + ( aPnt.X() / 2 );
|
|
||||||
aSearchBtn.SetPosPixel( aNewPnt );
|
|
||||||
|
|
||||||
if ( aSize.Height() > aMinSize.Height() )
|
|
||||||
{
|
|
||||||
long n3Height = a6Size.Height() / 2;
|
|
||||||
Size aBtnSize = aOpenBtn.GetSizePixel();
|
|
||||||
long nExtraHeight = aBtnSize.Height() + n3Height;
|
|
||||||
|
|
||||||
aPnt = aResultsLB.GetPosPixel();
|
|
||||||
aNewSize = aResultsLB.GetSizePixel();
|
|
||||||
aNewSize.Height() = aSize.Height() - aPnt.Y();
|
|
||||||
aNewSize.Height() -= ( nExtraHeight + ( a6Size.Height() * 3 / 2 ) );
|
|
||||||
aResultsLB.SetSizePixel( aNewSize );
|
|
||||||
|
|
||||||
aPnt.X() += ( aNewSize.Width() - aBtnSize.Width() );
|
|
||||||
aPnt.Y() += aNewSize.Height() + a6Size.Height();
|
|
||||||
aOpenBtn.SetPosPixel( aPnt );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SearchTabPage_Impl::ActivatePage()
|
void SearchTabPage_Impl::ActivatePage()
|
||||||
{
|
{
|
||||||
if ( !m_pIdxWin->WasCursorLeftOrRight() )
|
if ( !m_pIdxWin->WasCursorLeftOrRight() )
|
||||||
aSearchED.GrabFocus();
|
m_pSearchED->GrabFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Control* SearchTabPage_Impl::GetLastFocusControl()
|
Control* SearchTabPage_Impl::GetLastFocusControl()
|
||||||
{
|
{
|
||||||
return &aOpenBtn;
|
return m_pOpenBtn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SearchTabPage_Impl::SetDoubleClickHdl( const Link& rLink )
|
void SearchTabPage_Impl::SetDoubleClickHdl( const Link& rLink )
|
||||||
{
|
{
|
||||||
aResultsLB.SetDoubleClickHdl( rLink );
|
m_pResultsLB->SetDoubleClickHdl( rLink );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1143,7 +1110,7 @@ void SearchTabPage_Impl::SetDoubleClickHdl( const Link& rLink )
|
|||||||
OUString SearchTabPage_Impl::GetSelectEntry() const
|
OUString SearchTabPage_Impl::GetSelectEntry() const
|
||||||
{
|
{
|
||||||
OUString aRet;
|
OUString aRet;
|
||||||
OUString* pData = (OUString*)(sal_uIntPtr)aResultsLB.GetEntryData( aResultsLB.GetSelectEntryPos() );
|
OUString* pData = (OUString*)(sal_uIntPtr)m_pResultsLB->GetEntryData( m_pResultsLB->GetSelectEntryPos() );
|
||||||
if ( pData )
|
if ( pData )
|
||||||
aRet = *pData;
|
aRet = *pData;
|
||||||
return aRet;
|
return aRet;
|
||||||
@@ -1154,7 +1121,7 @@ OUString SearchTabPage_Impl::GetSelectEntry() const
|
|||||||
void SearchTabPage_Impl::ClearPage()
|
void SearchTabPage_Impl::ClearPage()
|
||||||
{
|
{
|
||||||
ClearSearchResults();
|
ClearSearchResults();
|
||||||
aSearchED.SetText( OUString() );
|
m_pSearchED->SetText( OUString() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1162,12 +1129,12 @@ void SearchTabPage_Impl::ClearPage()
|
|||||||
sal_Bool SearchTabPage_Impl::OpenKeyword( const OUString& rKeyword )
|
sal_Bool SearchTabPage_Impl::OpenKeyword( const OUString& rKeyword )
|
||||||
{
|
{
|
||||||
sal_Bool bRet = sal_False;
|
sal_Bool bRet = sal_False;
|
||||||
aSearchED.SetText( rKeyword );
|
m_pSearchED->SetText( rKeyword );
|
||||||
SearchHdl( NULL );
|
SearchHdl( NULL );
|
||||||
if ( aResultsLB.GetEntryCount() > 0 )
|
if ( m_pResultsLB->GetEntryCount() > 0 )
|
||||||
{
|
{
|
||||||
// found keyword -> open it
|
// found keyword -> open it
|
||||||
aResultsLB.SelectEntryPos(0);
|
m_pResultsLB->SelectEntryPos(0);
|
||||||
OpenHdl( NULL );
|
OpenHdl( NULL );
|
||||||
bRet = sal_True;
|
bRet = sal_True;
|
||||||
}
|
}
|
||||||
|
@@ -26,16 +26,6 @@
|
|||||||
#define FL_ACTIVE 11
|
#define FL_ACTIVE 11
|
||||||
#define TC_INDEX 12
|
#define TC_INDEX 12
|
||||||
|
|
||||||
// Search TabPage
|
|
||||||
#define FT_SEARCH 10
|
|
||||||
#define ED_SEARCH 11
|
|
||||||
#define PB_SEARCH 12
|
|
||||||
#define FT_RESULT 13
|
|
||||||
#define CB_FULLWORDS 14
|
|
||||||
#define CB_SCOPE 15
|
|
||||||
#define LB_RESULT 16
|
|
||||||
#define PB_OPEN_SEARCH 17
|
|
||||||
|
|
||||||
// Content TabPage
|
// Content TabPage
|
||||||
#define LB_CONTENTS 10
|
#define LB_CONTENTS 10
|
||||||
|
|
||||||
|
@@ -169,8 +169,11 @@ private:
|
|||||||
Link aSearchLink;
|
Link aSearchLink;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SearchBox_Impl( Window* pParent, const ResId& rResId ) :
|
SearchBox_Impl(Window* pParent, WinBits nStyle)
|
||||||
ComboBox( pParent, rResId ) { SetDropDownLineCount( 5 ); }
|
: ComboBox(pParent, nStyle)
|
||||||
|
{
|
||||||
|
SetDropDownLineCount(5);
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool PreNotify( NotifyEvent& rNEvt );
|
virtual bool PreNotify( NotifyEvent& rNEvt );
|
||||||
virtual void Select();
|
virtual void Select();
|
||||||
@@ -181,7 +184,10 @@ public:
|
|||||||
class SearchResultsBox_Impl : public ListBox
|
class SearchResultsBox_Impl : public ListBox
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SearchResultsBox_Impl( Window* pParent, const ResId& rResId ) : ListBox( pParent, rResId ) {}
|
SearchResultsBox_Impl(Window* pParent, WinBits nStyle)
|
||||||
|
: ListBox(pParent, nStyle)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool Notify( NotifyEvent& rNEvt );
|
virtual bool Notify( NotifyEvent& rNEvt );
|
||||||
};
|
};
|
||||||
@@ -189,15 +195,13 @@ public:
|
|||||||
class SearchTabPage_Impl : public HelpTabPage_Impl
|
class SearchTabPage_Impl : public HelpTabPage_Impl
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
FixedText aSearchFT;
|
SearchBox_Impl* m_pSearchED;
|
||||||
SearchBox_Impl aSearchED;
|
PushButton* m_pSearchBtn;
|
||||||
PushButton aSearchBtn;
|
CheckBox* m_pFullWordsCB;
|
||||||
CheckBox aFullWordsCB;
|
CheckBox* m_pScopeCB;
|
||||||
CheckBox aScopeCB;
|
SearchResultsBox_Impl* m_pResultsLB;
|
||||||
SearchResultsBox_Impl aResultsLB;
|
PushButton* m_pOpenBtn;
|
||||||
PushButton aOpenBtn;
|
|
||||||
|
|
||||||
Size aMinSize;
|
|
||||||
OUString aFactory;
|
OUString aFactory;
|
||||||
|
|
||||||
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >
|
::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator >
|
||||||
@@ -214,7 +218,6 @@ public:
|
|||||||
SearchTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin );
|
SearchTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin );
|
||||||
~SearchTabPage_Impl();
|
~SearchTabPage_Impl();
|
||||||
|
|
||||||
virtual void Resize();
|
|
||||||
virtual void ActivatePage();
|
virtual void ActivatePage();
|
||||||
virtual Control* GetLastFocusControl();
|
virtual Control* GetLastFocusControl();
|
||||||
|
|
||||||
@@ -222,10 +225,10 @@ public:
|
|||||||
inline void SetFactory( const OUString& rFactory ) { aFactory = rFactory; }
|
inline void SetFactory( const OUString& rFactory ) { aFactory = rFactory; }
|
||||||
OUString GetSelectEntry() const;
|
OUString GetSelectEntry() const;
|
||||||
void ClearPage();
|
void ClearPage();
|
||||||
inline void SetFocusOnBox() { aResultsLB.GrabFocus(); }
|
inline void SetFocusOnBox() { m_pResultsLB->GrabFocus(); }
|
||||||
inline sal_Bool HasFocusOnEdit() const { return aSearchED.HasChildPathFocus(); }
|
inline sal_Bool HasFocusOnEdit() const { return m_pSearchED->HasChildPathFocus(); }
|
||||||
inline OUString GetSearchText() const { return aSearchED.GetText(); }
|
inline OUString GetSearchText() const { return m_pSearchED->GetText(); }
|
||||||
inline sal_Bool IsFullWordSearch() const { return aFullWordsCB.IsChecked(); }
|
inline sal_Bool IsFullWordSearch() const { return m_pFullWordsCB->IsChecked(); }
|
||||||
sal_Bool OpenKeyword( const OUString& rKeyword );
|
sal_Bool OpenKeyword( const OUString& rKeyword );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -71,63 +71,6 @@ Window WIN_HELPINDEX
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
TabPage TP_HELP_SEARCH
|
|
||||||
{
|
|
||||||
HelpId = HID_HELP_TABPAGE_SEARCH;
|
|
||||||
Hide = TRUE ;
|
|
||||||
DialogControl = TRUE;
|
|
||||||
Size = MAP_APPFONT ( 140 , 122 ) ;
|
|
||||||
FixedText FT_SEARCH
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 6 , 6 ) ;
|
|
||||||
Size = MAP_APPFONT ( 128 , 10 ) ;
|
|
||||||
Text [ en-US ] = "S~earch term" ;
|
|
||||||
};
|
|
||||||
ComboBox ED_SEARCH
|
|
||||||
{
|
|
||||||
HelpID = "sfx2:ComboBox:TP_HELP_SEARCH:ED_SEARCH";
|
|
||||||
Border = TRUE ;
|
|
||||||
DropDown = TRUE;
|
|
||||||
Pos = MAP_APPFONT ( 6 , 17 ) ;
|
|
||||||
Size = MAP_APPFONT ( 92 , 40 ) ;
|
|
||||||
};
|
|
||||||
PushButton PB_SEARCH
|
|
||||||
{
|
|
||||||
HelpID = "sfx2:PushButton:TP_HELP_SEARCH:PB_SEARCH";
|
|
||||||
Pos = MAP_APPFONT ( 101 , 17 ) ;
|
|
||||||
Size = MAP_APPFONT ( 50 , 14 ) ;
|
|
||||||
Text [ en-US ] = "~Find";
|
|
||||||
};
|
|
||||||
CheckBox CB_FULLWORDS
|
|
||||||
{
|
|
||||||
HelpID = "sfx2:CheckBox:TP_HELP_SEARCH:CB_FULLWORDS";
|
|
||||||
Pos = MAP_APPFONT ( 6, 34 ) ;
|
|
||||||
Size = MAP_APPFONT ( 128 , 10 ) ;
|
|
||||||
Text [ en-US ] = "~Complete words only";
|
|
||||||
};
|
|
||||||
CheckBox CB_SCOPE
|
|
||||||
{
|
|
||||||
HelpID = "sfx2:CheckBox:TP_HELP_SEARCH:CB_SCOPE";
|
|
||||||
Pos = MAP_APPFONT ( 6, 47 ) ;
|
|
||||||
Size = MAP_APPFONT ( 128 , 10 ) ;
|
|
||||||
Text [ en-US ] = "Find in ~headings only";
|
|
||||||
};
|
|
||||||
ListBox LB_RESULT
|
|
||||||
{
|
|
||||||
HelpID = "sfx2:ListBox:TP_HELP_SEARCH:LB_RESULT";
|
|
||||||
Border = TRUE ;
|
|
||||||
Pos = MAP_APPFONT ( 6 , 60 ) ;
|
|
||||||
Size = MAP_APPFONT ( 128 , 30 ) ;
|
|
||||||
};
|
|
||||||
PushButton PB_OPEN_SEARCH
|
|
||||||
{
|
|
||||||
HelpID = "sfx2:PushButton:TP_HELP_SEARCH:PB_OPEN_SEARCH";
|
|
||||||
Pos = MAP_APPFONT ( 84 , 182 ) ;
|
|
||||||
Size = MAP_APPFONT ( 50 , 14 ) ;
|
|
||||||
Text [ en-US ] = "~Display" ;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
TabPage TP_HELP_CONTENT
|
TabPage TP_HELP_CONTENT
|
||||||
{
|
{
|
||||||
HelpId = HID_HELP_TABPAGE_CONTENTS;
|
HelpId = HID_HELP_TABPAGE_CONTENTS;
|
||||||
|
@@ -105,7 +105,6 @@
|
|||||||
#define HID_HELP_TOOLBOXITEM_PRINT "SFX2_HID_HELP_TOOLBOXITEM_PRINT"
|
#define HID_HELP_TOOLBOXITEM_PRINT "SFX2_HID_HELP_TOOLBOXITEM_PRINT"
|
||||||
#define HID_HELP_TOOLBOXITEM_BOOKMARKS "SFX2_HID_HELP_TOOLBOXITEM_BOOKMARKS"
|
#define HID_HELP_TOOLBOXITEM_BOOKMARKS "SFX2_HID_HELP_TOOLBOXITEM_BOOKMARKS"
|
||||||
#define HID_HELP_TABPAGE_CONTENTS "SFX2_HID_HELP_TABPAGE_CONTENTS"
|
#define HID_HELP_TABPAGE_CONTENTS "SFX2_HID_HELP_TABPAGE_CONTENTS"
|
||||||
#define HID_HELP_TABPAGE_SEARCH "SFX2_HID_HELP_TABPAGE_SEARCH"
|
|
||||||
#define HID_TBXCONTROL_FILENEW "SFX2_HID_TBXCONTROL_FILENEW"
|
#define HID_TBXCONTROL_FILENEW "SFX2_HID_TBXCONTROL_FILENEW"
|
||||||
#define HID_HELP_TOOLBOXITEM_SEARCHDIALOG "SFX2_HID_HELP_TOOLBOXITEM_SEARCHDIALOG"
|
#define HID_HELP_TOOLBOXITEM_SEARCHDIALOG "SFX2_HID_HELP_TOOLBOXITEM_SEARCHDIALOG"
|
||||||
#define HID_HELP_BOOKMARKS_OPEN "SFX2_HID_HELP_BOOKMARKS_OPEN"
|
#define HID_HELP_BOOKMARKS_OPEN "SFX2_HID_HELP_BOOKMARKS_OPEN"
|
||||||
|
156
sfx2/uiconfig/ui/helpsearchpage.ui
Normal file
156
sfx2/uiconfig/ui/helpsearchpage.ui
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.16.1 -->
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.0"/>
|
||||||
|
<!-- interface-requires LibreOffice 1.0 -->
|
||||||
|
<object class="GtkBox" id="HelpSearchPage">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
<property name="border_width">6</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkGrid" id="grid1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
<property name="row_spacing">6</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="display">
|
||||||
|
<property name="label" translatable="yes">_Display</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="halign">end</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">5</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="label" translatable="yes">_Search term</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="mnemonic_widget">search</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="sfxlo-SearchResultsBox" id="results:border">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">4</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkGrid" id="grid2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="column_spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="sfxlo-SearchBox" id="search">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="has_entry">True</property>
|
||||||
|
<child internal-child="entry">
|
||||||
|
<object class="GtkEntry" id="combobox-entry">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="find">
|
||||||
|
<property name="label">gtk-find</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="completewords">
|
||||||
|
<property name="label" translatable="yes">_Complete words only</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">False</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCheckButton" id="headings">
|
||||||
|
<property name="label" translatable="yes">Find in _headings only</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">False</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">3</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
Reference in New Issue
Block a user