diff options
-rw-r--r-- | cui/UIConfig_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 156 | ||||
-rw-r--r-- | cui/source/dialogs/gallery.src | 91 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 2 | ||||
-rw-r--r-- | cui/source/inc/cuigaldlg.hxx | 15 | ||||
-rw-r--r-- | cui/source/inc/gallery.hrc | 4 | ||||
-rw-r--r-- | cui/source/inc/helpid.hrc | 1 | ||||
-rw-r--r-- | cui/uiconfig/ui/galleryfilespage.ui | 223 | ||||
-rw-r--r-- | extras/source/glade/libreoffice-catalog.xml.in | 3 | ||||
-rw-r--r-- | include/svx/dialogs.hrc | 1 | ||||
-rw-r--r-- | include/svx/galctrl.hxx | 13 | ||||
-rw-r--r-- | svx/source/dialog/sdstring.src | 5 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 4 | ||||
-rw-r--r-- | svx/source/gallery2/galctrl.cxx | 31 |
14 files changed, 332 insertions, 218 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index bd3097b03284..ec633dc6af31 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -56,6 +56,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/effectspage \ cui/uiconfig/ui/eventsconfigpage \ cui/uiconfig/ui/formatcellsdialog \ + cui/uiconfig/ui/galleryfilespage \ cui/uiconfig/ui/gallerygeneralpage \ cui/uiconfig/ui/gallerysearchprogress \ cui/uiconfig/ui/gallerythemedialog \ diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 32d52e47e3d7..1550acc2fce4 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -89,18 +89,18 @@ SearchThread::~SearchThread() void SearchThread::execute() { - const OUString aFileType( mpBrowser->aCbbFileType.GetText() ); + const OUString aFileType( mpBrowser->m_pCbbFileType->GetText() ); if( !aFileType.isEmpty() ) { - const sal_uInt16 nFileNumber = mpBrowser->aCbbFileType.GetEntryPos( aFileType ); + const sal_uInt16 nFileNumber = mpBrowser->m_pCbbFileType->GetEntryPos( aFileType ); sal_uInt16 nBeginFormat, nEndFormat; ::std::vector< OUString > aFormats; - if( !nFileNumber || ( nFileNumber >= mpBrowser->aCbbFileType.GetEntryCount() ) ) + if( !nFileNumber || ( nFileNumber >= mpBrowser->m_pCbbFileType->GetEntryCount() ) ) { nBeginFormat = 1; - nEndFormat = mpBrowser->aCbbFileType.GetEntryCount() - 1; + nEndFormat = mpBrowser->m_pCbbFileType->GetEntryCount() - 1; } else nBeginFormat = nEndFormat = nFileNumber; @@ -180,7 +180,7 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, mpBrowser->aFoundList.push_back( aFoundURL.GetMainURL( INetURLObject::NO_DECODE ) ); - mpBrowser->aLbxFound.InsertEntry( + mpBrowser->m_pLbxFound->InsertEntry( GetReducedString( aFoundURL, 50 ), (sal_uInt16) mpBrowser->aFoundList.size() - 1 ); } @@ -301,7 +301,7 @@ void TakeThread::execute() { SolarMutexGuard aGuard; pStatusProgress = new GalleryProgress; - nEntries = mpBrowser->bTakeAll ? mpBrowser->aLbxFound.GetEntryCount() : mpBrowser->aLbxFound.GetSelectEntryCount(); + nEntries = mpBrowser->bTakeAll ? mpBrowser->m_pLbxFound->GetEntryCount() : mpBrowser->m_pLbxFound->GetSelectEntryCount(); pThm->LockBroadcaster(); } @@ -310,7 +310,7 @@ void TakeThread::execute() if( mpBrowser->bTakeAll ) aURL = INetURLObject( mpBrowser->aFoundList[ nPos = i ] ); else - aURL = INetURLObject( mpBrowser->aFoundList[ nPos = mpBrowser->aLbxFound.GetSelectEntryPos( i ) ]); + aURL = INetURLObject( mpBrowser->aFoundList[ nPos = mpBrowser->m_pLbxFound->GetSelectEntryPos( i ) ]); mrTakenList.push_back( (sal_uLong)nPos ); @@ -379,8 +379,8 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl) sal_uInt32 i, nCount; GetParent()->EnterWait(); - mpBrowser->aLbxFound.SetUpdateMode( false ); - mpBrowser->aLbxFound.SetNoSelection(); + mpBrowser->m_pLbxFound->SetUpdateMode( false ); + mpBrowser->m_pLbxFound->SetNoSelection(); // mark all taken positions in aRemoveEntries for( i = 0, nCount = maTakenList.size(); i < nCount; ++i ) @@ -402,16 +402,16 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl) // refill list box for( i = 0, nCount = aRemoveEntries.size(); i < nCount; ++i ) if( !aRemoveEntries[ i ] ) - aRemainingVector.push_back( mpBrowser->aLbxFound.GetEntry( (sal_uInt16) i ) ); + aRemainingVector.push_back( mpBrowser->m_pLbxFound->GetEntry( (sal_uInt16) i ) ); - mpBrowser->aLbxFound.Clear(); + mpBrowser->m_pLbxFound->Clear(); for( i = 0, nCount = aRemainingVector.size(); i < nCount; ++i ) - mpBrowser->aLbxFound.InsertEntry( aRemainingVector[ i ] ); + mpBrowser->m_pLbxFound->InsertEntry( aRemainingVector[ i ] ); aRemainingVector.clear(); - mpBrowser->aLbxFound.SetUpdateMode( true ); + mpBrowser->m_pLbxFound->SetUpdateMode( true ); mpBrowser->SelectFoundHdl( NULL ); GetParent()->LeaveWait(); @@ -702,59 +702,53 @@ SfxTabPage* TPGalleryThemeGeneral::Create( Window* pParent, const SfxItemSet& rS return new TPGalleryThemeGeneral( pParent, rSet ); } - // - TPGalleryThemeProperties - - - -TPGalleryThemeProperties::TPGalleryThemeProperties( Window* pWindow, const SfxItemSet& rSet ) : - SfxTabPage ( pWindow, CUI_RES( RID_SVXTABPAGE_GALLERYTHEME_FILES ), rSet ), - aFtFileType ( this, CUI_RES(FT_FILETYPE ) ), - aCbbFileType ( this, CUI_RES(CBB_FILETYPE ) ), - aLbxFound ( this, CUI_RES(LBX_FOUND ) ), - aBtnSearch ( this, CUI_RES(BTN_SEARCH ) ), - aBtnTake ( this, CUI_RES(BTN_TAKE ) ), - aBtnTakeAll ( this, CUI_RES(BTN_TAKEALL ) ), - aCbxPreview ( this, CUI_RES(CBX_PREVIEW ) ), - aWndPreview ( this, CUI_RES( WND_BRSPRV ) ), - nCurFilterPos (0), - nFirstExtFilterPos (0), - bEntriesFound (sal_False), - bInputAllowed (sal_True), - bSearchRecursive (sal_False), - xDialogListener ( new ::svt::DialogClosedListener() ) +TPGalleryThemeProperties::TPGalleryThemeProperties( Window* pWindow, const SfxItemSet& rSet ) + : SfxTabPage(pWindow, "GalleryFilesPage", "cui/ui/galleryfilespage.ui", rSet) + , nCurFilterPos(0) + , nFirstExtFilterPos(0) + , bEntriesFound(false) + , bInputAllowed(true) + , bSearchRecursive(false) + , xDialogListener(new ::svt::DialogClosedListener()) { - FreeResource(); + get(m_pCbbFileType, "filetype"); + get(m_pLbxFound, "files"); + Size aSize(LogicToPixel(Size(172, 156), MAP_APPFONT)); + m_pLbxFound->set_width_request(aSize.Width()); + m_pLbxFound->set_height_request(aSize.Height()); + m_pLbxFound->EnableMultiSelection(true); + get(m_pBtnSearch, "findfiles"); + get(m_pBtnTake, "add"); + get(m_pBtnTakeAll, "addall"); + get(m_pCbxPreview, "preview"); + get(m_pWndPreview, "image"); xDialogListener->SetDialogClosedLink( LINK( this, TPGalleryThemeProperties, DialogClosedHdl ) ); - aLbxFound.SetAccessibleName(OUString(SVX_RES(RID_SVXSTR_GALLERY_FILESFOUND))); - aWndPreview.SetAccessibleName(aCbxPreview.GetText()); - aLbxFound.SetAccessibleRelationLabeledBy(&aLbxFound); } - - void TPGalleryThemeProperties::SetXChgData( ExchangeData* _pData ) { pData = _pData; aPreviewTimer.SetTimeoutHdl( LINK( this, TPGalleryThemeProperties, PreviewTimerHdl ) ); aPreviewTimer.SetTimeout( 500 ); - aBtnSearch.SetClickHdl(LINK(this, TPGalleryThemeProperties, ClickSearchHdl)); - aBtnTake.SetClickHdl(LINK(this, TPGalleryThemeProperties, ClickTakeHdl)); - aBtnTakeAll.SetClickHdl(LINK(this, TPGalleryThemeProperties, ClickTakeAllHdl)); - aCbxPreview.SetClickHdl(LINK(this, TPGalleryThemeProperties, ClickPreviewHdl)); - aCbbFileType.SetSelectHdl(LINK(this, TPGalleryThemeProperties, SelectFileTypeHdl)); - aCbbFileType.EnableDDAutoWidth( false ); - aLbxFound.SetDoubleClickHdl(LINK(this, TPGalleryThemeProperties, DClickFoundHdl)); - aLbxFound.SetSelectHdl(LINK(this, TPGalleryThemeProperties, SelectFoundHdl)); - aLbxFound.InsertEntry(OUString(CUI_RES(RID_SVXSTR_GALLERY_NOFILES))); - aLbxFound.Show(); + m_pBtnSearch->SetClickHdl(LINK(this, TPGalleryThemeProperties, ClickSearchHdl)); + m_pBtnTake->SetClickHdl(LINK(this, TPGalleryThemeProperties, ClickTakeHdl)); + m_pBtnTakeAll->SetClickHdl(LINK(this, TPGalleryThemeProperties, ClickTakeAllHdl)); + m_pCbxPreview->SetClickHdl(LINK(this, TPGalleryThemeProperties, ClickPreviewHdl)); + m_pCbbFileType->SetSelectHdl(LINK(this, TPGalleryThemeProperties, SelectFileTypeHdl)); + m_pCbbFileType->EnableDDAutoWidth( false ); + m_pLbxFound->SetDoubleClickHdl(LINK(this, TPGalleryThemeProperties, DClickFoundHdl)); + m_pLbxFound->SetSelectHdl(LINK(this, TPGalleryThemeProperties, SelectFoundHdl)); + m_pLbxFound->InsertEntry(OUString(CUI_RES(RID_SVXSTR_GALLERY_NOFILES))); + m_pLbxFound->Show(); FillFilterList(); - aBtnTake.Enable(); - aBtnTakeAll.Disable(); - aCbxPreview.Disable(); + m_pBtnTake->Enable(); + m_pBtnTakeAll->Disable(); + m_pCbxPreview->Disable(); } @@ -768,7 +762,7 @@ void TPGalleryThemeProperties::StartSearchFiles( const OUString& _rFolderURL, sh SearchFiles(); } - nCurFilterPos = aCbbFileType.GetEntryPos( aCbbFileType.GetText() ); + nCurFilterPos = m_pCbbFileType->GetEntryPos( m_pCbbFileType->GetText() ); } @@ -861,7 +855,7 @@ void TPGalleryThemeProperties::FillFilterList() { pFilterEntry = new FilterEntry; pFilterEntry->aFilterName = aExt; - size_t pos = aCbbFileType.InsertEntry( aName ); + size_t pos = m_pCbbFileType->InsertEntry( aName ); if ( pos < aFilterEntryList.size() ) { aFilterEntryList.insert( aFilterEntryList.begin() + pos, pFilterEntry ); } else { @@ -883,7 +877,7 @@ void TPGalleryThemeProperties::FillFilterList() pFilterEntry = new FilterEntry; pFilterEntry->aFilterName = aFilters[ l ].second.getToken( 0, ';', nIndex ); - nFirstExtFilterPos = aCbbFileType.InsertEntry( + nFirstExtFilterPos = m_pCbbFileType->InsertEntry( addExtension( aFilters[ l ].first, aFilterWildcard += pFilterEntry->aFilterName @@ -942,20 +936,20 @@ void TPGalleryThemeProperties::FillFilterList() pFilterEntry = new FilterEntry; pFilterEntry->aFilterName = CUI_RESSTR(RID_SVXSTR_GALLERY_ALLFILES); pFilterEntry->aFilterName = addExtension( pFilterEntry->aFilterName, aExtensions ); - size_t pos = aCbbFileType.InsertEntry( pFilterEntry->aFilterName, 0 ); + size_t pos = m_pCbbFileType->InsertEntry( pFilterEntry->aFilterName, 0 ); if ( pos < aFilterEntryList.size() ) { aFilterEntryList.insert( aFilterEntryList.begin() + pos, pFilterEntry ); } else { aFilterEntryList.push_back( pFilterEntry ); } - aCbbFileType.SetText( pFilterEntry->aFilterName ); + m_pCbbFileType->SetText( pFilterEntry->aFilterName ); } IMPL_LINK_NOARG(TPGalleryThemeProperties, SelectFileTypeHdl) { - OUString aText( aCbbFileType.GetText() ); + OUString aText( m_pCbbFileType->GetText() ); if( bInputAllowed && ( aLastFilterName != aText ) ) { @@ -975,9 +969,9 @@ void TPGalleryThemeProperties::SearchFiles() SearchProgress* pProgress = new SearchProgress( this, aURL ); aFoundList.clear(); - aLbxFound.Clear(); + m_pLbxFound->Clear(); - pProgress->SetFileType( aCbbFileType.GetText() ); + pProgress->SetFileType( m_pCbbFileType->GetText() ); pProgress->SetDirectory( INetURLObject() ); pProgress->Update(); @@ -1013,7 +1007,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickSearchHdl) SearchFiles(); } - nCurFilterPos = aCbbFileType.GetEntryPos( aCbbFileType.GetText() ); + nCurFilterPos = m_pCbbFileType->GetEntryPos( m_pCbbFileType->GetText() ); } } catch (const IllegalArgumentException&) @@ -1029,7 +1023,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickSearchHdl) void TPGalleryThemeProperties::TakeFiles() { - if( aLbxFound.GetSelectEntryCount() || ( bTakeAll && bEntriesFound ) ) + if( m_pLbxFound->GetSelectEntryCount() || ( bTakeAll && bEntriesFound ) ) { TakeProgress* pTakeProgress = new TakeProgress( this ); pTakeProgress->Update(); @@ -1049,11 +1043,11 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickPreviewHdl) aPreviewTimer.Stop(); aPreviewString = ""; - if( !aCbxPreview.IsChecked() ) + if( !m_pCbxPreview->IsChecked() ) { xMediaPlayer.clear(); - aWndPreview.SetGraphic( Graphic() ); - aWndPreview.Invalidate(); + m_pWndPreview->SetGraphic( Graphic() ); + m_pWndPreview->Invalidate(); } else DoPreview(); @@ -1066,14 +1060,14 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickPreviewHdl) void TPGalleryThemeProperties::DoPreview() { - OUString aString( aLbxFound.GetSelectEntry() ); + OUString aString( m_pLbxFound->GetSelectEntry() ); if( aString != aPreviewString ) { - INetURLObject _aURL( aFoundList[ aLbxFound.GetEntryPos( aString ) ] ); + INetURLObject _aURL( aFoundList[ m_pLbxFound->GetEntryPos( aString ) ] ); bInputAllowed = sal_False; - if ( !aWndPreview.SetGraphic( _aURL ) ) + if ( !m_pWndPreview->SetGraphic( _aURL ) ) { GetParent()->LeaveWait(); ErrorHandler::HandleError( ERRCODE_IO_NOTEXISTSPATH ); @@ -1099,7 +1093,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickTakeHdl) { aPreviewTimer.Stop(); - if( !aLbxFound.GetSelectEntryCount() || !bEntriesFound ) + if( !m_pLbxFound->GetSelectEntryCount() || !bEntriesFound ) { SvxOpenGraphicDialog aDlg("Gallery"); aDlg.EnableLink(sal_False); @@ -1144,21 +1138,21 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, SelectFoundHdl) if( bEntriesFound ) { - if( aLbxFound.GetSelectEntryCount() == 1 ) + if( m_pLbxFound->GetSelectEntryCount() == 1 ) { - aCbxPreview.Enable(); + m_pCbxPreview->Enable(); bPreviewPossible = sal_True; } else - aCbxPreview.Disable(); + m_pCbxPreview->Disable(); if( !aFoundList.empty() ) - aBtnTakeAll.Enable(); + m_pBtnTakeAll->Enable(); else - aBtnTakeAll.Disable(); + m_pBtnTakeAll->Disable(); } - if( bPreviewPossible && aCbxPreview.IsChecked() ) + if( bPreviewPossible && m_pCbxPreview->IsChecked() ) aPreviewTimer.Start(); } @@ -1173,7 +1167,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, DClickFoundHdl) { aPreviewTimer.Stop(); - return (aLbxFound.GetSelectEntryCount() == 1 && bEntriesFound) ? + return (m_pLbxFound->GetSelectEntryCount() == 1 && bEntriesFound) ? ClickTakeHdl(NULL) : 0; } else @@ -1195,16 +1189,16 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, EndSearchProgressHdl) { if( !aFoundList.empty() ) { - aLbxFound.SelectEntryPos( 0 ); - aBtnTakeAll.Enable(); - aCbxPreview.Enable(); + m_pLbxFound->SelectEntryPos( 0 ); + m_pBtnTakeAll->Enable(); + m_pCbxPreview->Enable(); bEntriesFound = sal_True; } else { - aLbxFound.InsertEntry( OUString( CUI_RES( RID_SVXSTR_GALLERY_NOFILES ) ) ); - aBtnTakeAll.Disable(); - aCbxPreview.Disable(); + m_pLbxFound->InsertEntry( OUString( CUI_RES( RID_SVXSTR_GALLERY_NOFILES ) ) ); + m_pBtnTakeAll->Disable(); + m_pCbxPreview->Disable(); bEntriesFound = sal_False; } return 0L; diff --git a/cui/source/dialogs/gallery.src b/cui/source/dialogs/gallery.src index 21b7ed85b7d9..9bc902be7841 100644 --- a/cui/source/dialogs/gallery.src +++ b/cui/source/dialogs/gallery.src @@ -24,97 +24,6 @@ #define MASKCOLOR MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; - -/******************************************************************************/ - -TabPage RID_SVXTABPAGE_GALLERYTHEME_FILES -{ - HelpId = HID_GALLERY_BROWSER ; - Hide = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ; - FixedText FT_FILETYPE - { - Pos = MAP_APPFONT ( 6 , 8 ) ; - Size = MAP_APPFONT ( 48 , 10 ) ; - Text [ en-US ] = "~File type" ; - }; - ComboBox CBB_FILETYPE - { - HelpID = "cui:ComboBox:RID_SVXTABPAGE_GALLERYTHEME_FILES:CBB_FILETYPE"; - Pos = MAP_APPFONT ( 57 , 6 ) ; - Size = MAP_APPFONT ( 121 , 69 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - AutoSize = TRUE; - AutoHScroll = TRUE ; - }; - MultiListBox LBX_FOUND - { - HelpID = "cui:MultiListBox:RID_SVXTABPAGE_GALLERYTHEME_FILES:LBX_FOUND"; - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 23 ) ; - Size = MAP_APPFONT ( 172 , 156 ) ; - TabStop = TRUE ; - SimpleMode = TRUE ; - }; - PushButton BTN_SEARCH - { - HelpID = "cui:PushButton:RID_SVXTABPAGE_GALLERYTHEME_FILES:BTN_SEARCH"; - Pos = MAP_APPFONT ( 184 , 6 ) ; - Size = MAP_APPFONT ( 70 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Find Files..." ; - }; - PushButton BTN_TAKE - { - HelpID = "cui:PushButton:RID_SVXTABPAGE_GALLERYTHEME_FILES:BTN_TAKE"; - Pos = MAP_APPFONT ( 184 , 24 ) ; - Size = MAP_APPFONT ( 70 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Add" ; - }; - PushButton BTN_TAKEALL - { - HelpID = "cui:PushButton:RID_SVXTABPAGE_GALLERYTHEME_FILES:BTN_TAKEALL"; - Pos = MAP_APPFONT ( 184 , 42 ) ; - Size = MAP_APPFONT ( 70 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "A~dd All" ; - }; - CheckBox CBX_PREVIEW - { - HelpID = "cui:CheckBox:RID_SVXTABPAGE_GALLERYTHEME_FILES:CBX_PREVIEW"; - Pos = MAP_APPFONT ( 184 , 76 ) ; - Size = MAP_APPFONT ( 70 , 12 ) ; - Text [ en-US ] = "Pr~eview" ; - }; - Window WND_BRSPRV - { - Border = TRUE ; - Pos = MAP_APPFONT ( 184 , 91 ) ; - Size = MAP_APPFONT ( 70 , 88 ) ; - }; - PushButton BTN_MADDIN1 - { - HelpID = "cui:PushButton:RID_SVXTABPAGE_GALLERYTHEME_FILES:BTN_MADDIN1"; - Pos = MAP_APPFONT ( 220 , 63 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Maddin1" ; - }; - PushButton BTN_MADDIN2 - { - HelpID = "cui:PushButton:RID_SVXTABPAGE_GALLERYTHEME_FILES:BTN_MADDIN2"; - Pos = MAP_APPFONT ( 220 , 80 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Maddin2" ; - }; -}; - -/******************************************************************************/ - ModalDialog RID_SVXDLG_GALLERY_TAKE_PROGRESS { HelpId = HID_GALLERY_APPLY ; diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index b64c7a4ee022..cf9696bbbcb3 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1664,8 +1664,6 @@ CreateTabPage AbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId { case RID_SVXPAGE_TEXTANIMATION : return SvxTextAnimationPage::Create; - case RID_SVXTABPAGE_GALLERY_GENERAL : - return TPGalleryThemeGeneral::Create; case RID_SVXPAGE_TRANSPARENCE : return SvxTransparenceTabPage::Create; case RID_SVXPAGE_AREA : diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 1026503b198b..1e4f5c688edb 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -239,14 +239,13 @@ class TPGalleryThemeProperties : public SfxTabPage friend class TakeProgress; friend class TakeThread; - FixedText aFtFileType; - ComboBox aCbbFileType; - MultiListBox aLbxFound; - PushButton aBtnSearch; - PushButton aBtnTake; - PushButton aBtnTakeAll; - CheckBox aCbxPreview; - GalleryPreview aWndPreview; + ComboBox* m_pCbbFileType; + ListBox* m_pLbxFound; + PushButton* m_pBtnSearch; + PushButton* m_pBtnTake; + PushButton* m_pBtnTakeAll; + CheckBox* m_pCbxPreview; + GalleryPreview* m_pWndPreview; ExchangeData* pData; StringList aFoundList; diff --git a/cui/source/inc/gallery.hrc b/cui/source/inc/gallery.hrc index 5487b2556680..d0871a510274 100644 --- a/cui/source/inc/gallery.hrc +++ b/cui/source/inc/gallery.hrc @@ -18,10 +18,6 @@ */ #include <cuires.hrc> -// Gallery TabPages -#define RID_SVXTABPAGE_GALLERY_GENERAL (RID_CUI_GALLERY_START + 1) -#define RID_SVXTABPAGE_GALLERYTHEME_FILES (RID_CUI_GALLERY_START + 4) - // Dialogs #define RID_SVXDLG_GALLERY_TAKE_PROGRESS (RID_CUI_GALLERY_START + 7) diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc index 6181d49c21f8..7dbdf025510f 100644 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -177,7 +177,6 @@ #define HID_SEARCH_APPROXSETTINGS "CUI_HID_SEARCH_APPROXSETTINGS" #define HID_SEARCH_BTN_SEARCH "CUI_HID_SEARCH_BTN_SEARCH" #define HID_SEARCH_BTN_CLOSE "CUI_HID_SEARCH_BTN_CLOSE" -#define HID_GALLERY_BROWSER "CUI_HID_GALLERY_BROWSER" #define HID_GALLERY_APPLY "CUI_HID_GALLERY_APPLY" #define HID_DIALOG_HANGULHANJA "CUI_HID_DIALOG_HANGULHANJA" #define HID_HANGULHANJA_EDIT_DLG "CUI_HID_HANGULHANJA_EDIT_DLG" diff --git a/cui/uiconfig/ui/galleryfilespage.ui b/cui/uiconfig/ui/galleryfilespage.ui new file mode 100644 index 000000000000..eb3d6606708f --- /dev/null +++ b/cui/uiconfig/ui/galleryfilespage.ui @@ -0,0 +1,223 @@ +<?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="GtkGrid" id="GalleryFilesPage"> + <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="column_spacing">12</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="row_spacing">12</property> + <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="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">_File type</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">filetype</property> + <property name="ellipsize">start</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="VclComboBoxText" id="filetype"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="has_entry">True</property> + <property name="max_width_chars">30</property> + <child internal-child="entry"> + <object class="GtkEntry" id="comboboxtext-entry"> + <property name="can_focus">False</property> + <property name="width_chars">30</property> + </object> + </child> + </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">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkTreeView" id="files:border"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="treeview-selection1"> + <property name="mode">multiple</property> + </object> + </child> + <child internal-child="accessible"> + <object class="AtkObject" id="files:border-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes">Files Found</property> + </object> + </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> + </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="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">24</property> + <child> + <object class="GtkGrid" id="grid4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">12</property> + <child> + <object class="GtkCheckButton" id="preview"> + <property name="label" translatable="yes">Pr_eview</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">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="svxlo-GalleryPreview" id="image:border"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <child internal-child="accessible"> + <object class="AtkObject" id="image:border-atkobject"> + <property name="AtkObject::accessible-name" translatable="yes">Preview</property> + </object> + </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> + </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="GtkButtonBox" id="buttonbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <property name="layout_style">start</property> + <child> + <object class="GtkButton" id="findfiles"> + <property name="label" translatable="yes">_Find Files...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="add"> + <property name="label">gtk-add</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="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="addall"> + <property name="label" translatable="yes">A_dd All</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </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> + </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> +</interface> diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in index 94390411f213..e6562ba91508 100644 --- a/extras/source/glade/libreoffice-catalog.xml.in +++ b/extras/source/glade/libreoffice-catalog.xml.in @@ -254,6 +254,9 @@ <glade-widget-class title="Show Math Symbol" name="smlo-SmShowSymbol" generic-name="Show Math Symbol" parent="GtkDrawingArea" icon-name="widget-gtk-drawingarea"/> + <glade-widget-class title="Gallery Preview" name="svxlo-GalleryPreview" + generic-name="Gallery Preview" parent="GtkDrawingArea" + icon-name="widget-gtk-drawingarea"/> <glade-widget-class title="Show Math Font" name="smlo-SmShowFont" generic-name="Show Math Font" parent="GtkDrawingArea" icon-name="widget-gtk-drawingarea"/> diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index d7b252d2dc80..3fddc023e567 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -46,7 +46,6 @@ #define RID_SVXSTR_GALLERYPROPS_GALTHEME (RID_SVX_START + 251) #define RID_SVXSTR_GALLERY_THEMEITEMS (RID_SVX_START + 252) -#define RID_SVXSTR_GALLERY_FILESFOUND (RID_SVX_START + 254) #define RID_SVXSTR_GALLERY_PREVIEW (RID_SVX_START + 255) // factory IDs of tabpages implemented in CUI diff --git a/include/svx/galctrl.hxx b/include/svx/galctrl.hxx index 686173137b6b..7d82db02830f 100644 --- a/include/svx/galctrl.hxx +++ b/include/svx/galctrl.hxx @@ -52,11 +52,12 @@ private: SVX_DLLPRIVATE void InitSettings(); // Window - SVX_DLLPRIVATE virtual void Paint(const Rectangle& rRect); - SVX_DLLPRIVATE virtual void MouseButtonDown(const MouseEvent& rMEvt); + SVX_DLLPRIVATE virtual void Paint(const Rectangle& rRect); + SVX_DLLPRIVATE virtual Size GetOptimalSize() const; + SVX_DLLPRIVATE virtual void MouseButtonDown(const MouseEvent& rMEvt); SVX_DLLPRIVATE virtual void Command(const CommandEvent& rCEvt); SVX_DLLPRIVATE virtual void KeyInput( const KeyEvent& rKEvt ); - SVX_DLLPRIVATE virtual void DataChanged( const DataChangedEvent& rDCEvt ); + SVX_DLLPRIVATE virtual void DataChanged( const DataChangedEvent& rDCEvt ); // DropTargetHelper @@ -70,9 +71,9 @@ private: public: - GalleryPreview( GalleryBrowser2* pParent, GalleryTheme* pTheme ); - GalleryPreview( Window* pParent, const ResId& rResId ); - ~GalleryPreview(); + GalleryPreview(Window* pParent, + WinBits nStyle = WB_TABSTOP | WB_BORDER, + GalleryTheme* pTheme = NULL); void SetGraphic( const Graphic& rGraphic ) { aGraphicObj.SetGraphic( rGraphic ); } bool SetGraphic( const INetURLObject& ); diff --git a/svx/source/dialog/sdstring.src b/svx/source/dialog/sdstring.src index 6c3dad303ce1..c9a0f35a6a4f 100644 --- a/svx/source/dialog/sdstring.src +++ b/svx/source/dialog/sdstring.src @@ -2103,11 +2103,6 @@ String RID_SVXSTR_GALLERY_THEMEITEMS Text [ en-US ] = "Theme Items"; }; -String RID_SVXSTR_GALLERY_FILESFOUND -{ - Text [ en-US ] = "Files Found"; -}; - String RID_SVXSTR_GALLERY_PREVIEW { Text [ en-US ] = "Preview"; diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 3a148984d4f5..8f57c3067b27 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -419,7 +419,7 @@ GalleryBrowser2::GalleryBrowser2( Window* pParent, const ResId& rResId, Gallery* mpCurTheme ( NULL ), mpIconView ( new GalleryIconView( this, NULL ) ), mpListView ( new GalleryListView( this, NULL ) ), - mpPreview ( new GalleryPreview( this, NULL ) ), + mpPreview ( new GalleryPreview(this) ), maViewBox ( this ), maSeparator ( this, WB_VERT ), maInfoBar ( this, WB_LEFT | WB_VCENTER ), @@ -752,7 +752,7 @@ void GalleryBrowser2::SelectTheme( const OUString& rThemeName ) mpIconView = new GalleryIconView( this, mpCurTheme ); mpListView = new GalleryListView( this, mpCurTheme ); - mpPreview = new GalleryPreview( this, mpCurTheme ); + mpPreview = new GalleryPreview( this, WB_TABSTOP | WB_BORDER, mpCurTheme ); mpIconView->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_THEMEITEMS)); mpListView->SetAccessibleName(SVX_RESSTR(RID_SVXSTR_GALLERY_THEMEITEMS)); diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 4c7d32ac961f..4629ed27dd9a 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -38,34 +38,31 @@ #define GALLERY_BRWBOX_TITLE 1 #define GALLERY_BRWBOX_PATH 2 - -GalleryPreview::GalleryPreview( GalleryBrowser2* pParent, GalleryTheme* pTheme ) : - Window( pParent, WB_TABSTOP | WB_BORDER ), - DropTargetHelper( this ), - DragSourceHelper( this ), - mpTheme( pTheme ) +GalleryPreview::GalleryPreview(Window* pParent, WinBits nStyle, GalleryTheme* pTheme) + : Window(pParent, nStyle) + , DropTargetHelper(this) + , DragSourceHelper(this) + , mpTheme(pTheme) { - SetHelpId( HID_GALLERY_WINDOW ); InitSettings(); } -GalleryPreview::GalleryPreview( Window* pParent, const ResId & rResId ) : - Window( pParent, rResId ), - DropTargetHelper( this ), - DragSourceHelper( this ), - mpTheme( NULL ) +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeGalleryPreview(Window *pParent, + VclBuilder::stringmap &rMap) { - - SetHelpId( HID_GALLERY_PREVIEW ); - InitSettings(); + WinBits nWinBits = WB_TABSTOP; + OString sBorder = VclBuilder::extractCustomProperty(rMap); + if (!sBorder.isEmpty()) + nWinBits |= WB_BORDER; + return new GalleryPreview(pParent, nWinBits); } -GalleryPreview::~GalleryPreview() +Size GalleryPreview::GetOptimalSize() const { + return LogicToPixel(Size(70, 88), MAP_APPFONT); } - bool GalleryPreview::SetGraphic( const INetURLObject& _aURL ) { bool bRet = true; |