diff options
Diffstat (limited to 'svx/source/gallery2')
-rw-r--r-- | svx/source/gallery2/galbrws1.cxx | 11 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 7 | ||||
-rw-r--r-- | svx/source/gallery2/galctrl.cxx | 26 | ||||
-rw-r--r-- | svx/source/gallery2/galexpl.cxx | 1 | ||||
-rw-r--r-- | svx/source/gallery2/gallery.src | 456 | ||||
-rw-r--r-- | svx/source/gallery2/gallery1.cxx | 5 | ||||
-rw-r--r-- | svx/source/gallery2/galtheme.cxx | 28 |
7 files changed, 69 insertions, 465 deletions
diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 1e49bd65dfcb..915f8f84b1b4 100644 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -40,10 +40,9 @@ #include "gallery1.hxx" #include "galtheme.hxx" #include "galmisc.hxx" -#include "galdlg.hxx" #include "galbrws1.hxx" #include <com/sun/star/util/DateTime.hpp> - +#include "gallery.hrc" #include <algorithm> #include <svx/svxdlg.hxx> //CHINA001 @@ -316,7 +315,7 @@ void GalleryBrowser1::ImplGalleryThemeProperties( const String & rThemeName, boo SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Got no AbstractDialogFactory!"); - VclAbstractDialog2* pThemeProps = pFact->CreateGalleryThemePropertiesDialog( NULL, mpExchangeData, mpThemePropsDlgItemSet, RID_SVXTABDLG_GALLERYTHEME ); + VclAbstractDialog2* pThemeProps = pFact->CreateGalleryThemePropertiesDialog( NULL, mpExchangeData, mpThemePropsDlgItemSet ); DBG_ASSERT(pThemeProps, "Got no GalleryThemePropertiesDialog!"); if ( bCreateNew ) @@ -415,7 +414,7 @@ void GalleryBrowser1::ImplExecute( USHORT nId ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - VclAbstractRefreshableDialog* aActualizeProgress = pFact->CreateActualizeProgressDialog( this, pTheme, RID_SVXDLG_GALLERY_ACTUALIZE_PROGRESS ); + VclAbstractRefreshableDialog* aActualizeProgress = pFact->CreateActualizeProgressDialog( this, pTheme ); DBG_ASSERT(aActualizeProgress, "Dialogdiet fail!");//CHINA001 aActualizeProgress->Update(); //CHINA001 aActualizeProgress.Update(); @@ -440,7 +439,7 @@ void GalleryBrowser1::ImplExecute( USHORT nId ) //CHINA001 TitleDialog aDlg( this, aOldName ); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); DBG_ASSERT(pFact, "Dialogdiet fail!");//CHINA001 - AbstractTitleDialog* aDlg = pFact->CreateTitleDialog( this, aOldName, RID_SVXDLG_GALLERY_TITLE ); + AbstractTitleDialog* aDlg = pFact->CreateTitleDialog( this, aOldName ); DBG_ASSERT(aDlg, "Dialogdiet fail!");//CHINA001 if( aDlg->Execute() == RET_OK ) //CHINA001 if( aDlg.Execute() == RET_OK ) @@ -477,7 +476,7 @@ void GalleryBrowser1::ImplExecute( USHORT nId ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - AbstractGalleryIdDialog* aDlg = pFact->CreateGalleryIdDialog( this, pTheme, RID_SVXDLG_GALLERY_THEMEID ); + AbstractGalleryIdDialog* aDlg = pFact->CreateGalleryIdDialog( this, pTheme ); DBG_ASSERT(aDlg, "Dialogdiet fail!");//CHINA001 if( aDlg->Execute() == RET_OK ) //CHINA001 if( aDlg.Execute() == RET_OK ) diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 93315a8dddef..a9ae8efa0050 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -47,11 +47,14 @@ #include "impgrf.hxx" #include <svx/brshitem.hxx> #include "helpid.hrc" +#include "gallery.hxx" +#include "galobj.hxx" #include "gallery1.hxx" #include "galtheme.hxx" +#include "galctrl.hxx" #include "galmisc.hxx" -#include "galdlg.hxx" #include "galbrws2.hxx" +#include "gallery.hrc" #include <vcl/svapp.hxx> #include <svx/fmmodel.hxx> #include <svx/svxdlg.hxx> //CHINA001 @@ -1014,7 +1017,7 @@ void GalleryBrowser2::ImplExecute( USHORT nId ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); if(pFact) { - AbstractTitleDialog* aDlg = pFact->CreateTitleDialog( this, aOldTitle, RID_SVXDLG_GALLERY_TITLE ); + AbstractTitleDialog* aDlg = pFact->CreateTitleDialog( this, aOldTitle ); DBG_ASSERT(aDlg, "Dialogdiet fail!");//CHINA001 if( aDlg->Execute() == RET_OK )//CHINA001 if( aDlg.Execute() == RET_OK ) { diff --git a/svx/source/gallery2/galctrl.cxx b/svx/source/gallery2/galctrl.cxx index 4b0ada475ec0..b72346fa3d65 100644 --- a/svx/source/gallery2/galctrl.cxx +++ b/svx/source/gallery2/galctrl.cxx @@ -42,6 +42,10 @@ #include "galctrl.hxx" #include "AccessibleStringWrap.hxx" #include <svx/svxfont.hxx> +#include "galobj.hxx" +#include <avmedia/mediawindow.hxx> +#include "gallery.hrc" +#include <svx/impgrf.hxx> // ----------- // - Defines - @@ -82,6 +86,28 @@ GalleryPreview::~GalleryPreview() { } + +bool GalleryPreview::SetGraphic( const INetURLObject& _aURL ) +{ + bool bRet = true; + Graphic aGraphic; + if( ::avmedia::MediaWindow::isMediaURL( _aURL.GetMainURL( INetURLObject::DECODE_UNAMBIGUOUS ) ) ) + { + aGraphic = BitmapEx( GAL_RESID( RID_SVXBMP_GALLERY_MEDIA ) ); + } + else + { + GraphicFilter* pFilter = GetGrfFilter(); + GalleryProgress aProgress( pFilter ); + if( pFilter->ImportGraphic( aGraphic, _aURL, GRFILTER_FORMAT_DONTKNOW ) ) + bRet = false; + } + + SetGraphic( aGraphic ); + Invalidate(); + return bRet; +} + // ------------------------------------------------------------------------ void GalleryPreview::InitSettings() diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx index 5068dafe3d31..121040ab9b63 100644 --- a/svx/source/gallery2/galexpl.cxx +++ b/svx/source/gallery2/galexpl.cxx @@ -37,6 +37,7 @@ #include "galtheme.hxx" #include "galbrws.hxx" #include "gallery.hxx" +#include "galobj.hxx" // ----------- // - Statics - diff --git a/svx/source/gallery2/gallery.src b/svx/source/gallery2/gallery.src index ebe95d7b096c..4da768dc7a49 100644 --- a/svx/source/gallery2/gallery.src +++ b/svx/source/gallery2/gallery.src @@ -74,412 +74,8 @@ DockingWindow RID_SVXDLG_GALLERYBROWSER }; }; - -/******************************************************************************/ - -TabDialog RID_SVXTABDLG_GALLERY -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Text [ en-US ] = "Properties of " ; - Moveable = TRUE ; - TabControl 1 - { - OutputSize = TRUE ; - PageList = - { - PageItem - { - Identifier = RID_SVXTABPAGE_GALLERY_GENERAL ; - Text [ en-US ] = "General" ; - }; - }; - }; -}; - -/******************************************************************************/ - -TabDialog RID_SVXTABDLG_GALLERYTHEME -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Text [ en-US ] = "Properties of " ; - Moveable = TRUE ; - TabControl 1 - { - OutputSize = TRUE ; - PageList = - { - PageItem - { - Identifier = RID_SVXTABPAGE_GALLERY_GENERAL ; - Text [ en-US ] = "General" ; - }; - PageItem - { - Identifier = RID_SVXTABPAGE_GALLERYTHEME_FILES ; - Text [ en-US ] = "Files" ; - }; - }; - }; -}; - -/******************************************************************************/ - -TabPage RID_SVXTABPAGE_GALLERY_GENERAL -{ - HelpId = HID_GALLERY_PROPERTIES_GENERAL; - SVLook = TRUE ; - Hide = TRUE ; - Size = MAP_APPFONT ( 260 , 185 ) ; - FixedImage FI_MS_IMAGE - { - Pos = MAP_APPFONT ( 6 , 6 ) ; - Size = MAP_APPFONT ( 20 , 20 ) ; - }; - Edit EDT_MS_NAME - { - Border = TRUE ; - Pos = MAP_APPFONT ( 60 , 10 ) ; - Size = MAP_APPFONT ( 194 , 12 ) ; - }; - FixedLine FL_MS_GENERAL_FIRST - { - Pos = MAP_APPFONT ( 6 , 36 ) ; - Size = MAP_APPFONT ( 248 , 1 ) ; - }; - FixedText FT_MS_TYPE - { - Pos = MAP_APPFONT ( 6 , 43 ) ; - Size = MAP_APPFONT ( 51 , 10 ) ; - LeftLabel = TRUE ; - Text [ en-US ] = "Type:" ; - }; - FixedText FT_MS_SHOW_TYPE - { - Pos = MAP_APPFONT ( 60 , 43 ) ; - Size = MAP_APPFONT ( 194 , 10 ) ; - }; - FixedText FT_MS_PATH - { - Pos = MAP_APPFONT ( 6 , 57 ) ; - Size = MAP_APPFONT ( 51 , 10 ) ; - LeftLabel = TRUE ; - Text [ en-US ] = "Location:" ; - }; - FixedText FT_MS_SHOW_PATH - { - Pos = MAP_APPFONT ( 60 , 57 ) ; - Size = MAP_APPFONT ( 194 , 10 ) ; - }; - FixedText FT_MS_CONTENT - { - Pos = MAP_APPFONT ( 6 , 71 ) ; - Size = MAP_APPFONT ( 51 , 10 ) ; - LeftLabel = TRUE ; - Text [ en-US ] = "Contents:" ; - }; - FixedText FT_MS_SHOW_CONTENT - { - Pos = MAP_APPFONT ( 60 , 71 ) ; - Size = MAP_APPFONT ( 194 , 10 ) ; - }; - FixedLine FL_MS_GENERAL_SECOND - { - Pos = MAP_APPFONT ( 6 , 91 ) ; - Size = MAP_APPFONT ( 248 , 1 ) ; - }; - FixedText FT_MS_CHANGEDATE - { - Pos = MAP_APPFONT ( 6 , 98 ) ; - Size = MAP_APPFONT ( 51 , 10 ) ; - LeftLabel = TRUE ; - Text [ en-US ] = "Modified:" ; - }; - FixedText FT_MS_SHOW_CHANGEDATE - { - Pos = MAP_APPFONT ( 60 , 98 ) ; - Size = MAP_APPFONT ( 194 , 10 ) ; - }; -}; - -/******************************************************************************/ - -TabPage RID_SVXTABPAGE_GALLERYTHEME_FILES -{ - HelpId = HID_GALLERY_BROWSER ; - Hide = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 260 , 185 ) ; - FixedText FT_FILETYPE - { - Pos = MAP_APPFONT ( 6 , 8 ) ; - Size = MAP_APPFONT ( 48 , 10 ) ; - Text [ en-US ] = "~File type" ; - }; - ComboBox CBB_FILETYPE - { - Pos = MAP_APPFONT ( 57 , 6 ) ; - Size = MAP_APPFONT ( 121 , 69 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - AutoSize = TRUE; - AutoHScroll = TRUE ; - }; - MultiListBox LBX_FOUND - { - Border = TRUE ; - Pos = MAP_APPFONT ( 6 , 23 ) ; - Size = MAP_APPFONT ( 172 , 156 ) ; - TabStop = TRUE ; - SimpleMode = TRUE ; - }; - PushButton BTN_SEARCH - { - Pos = MAP_APPFONT ( 184 , 6 ) ; - Size = MAP_APPFONT ( 70 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Find Files..." ; - }; - PushButton BTN_TAKE - { - Pos = MAP_APPFONT ( 184 , 24 ) ; - Size = MAP_APPFONT ( 70 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "~Add" ; - }; - PushButton BTN_TAKEALL - { - Pos = MAP_APPFONT ( 184 , 42 ) ; - Size = MAP_APPFONT ( 70 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "A~dd All" ; - }; - CheckBox CBX_PREVIEW - { - Pos = MAP_APPFONT ( 184 , 76 ) ; - Size = MAP_APPFONT ( 70 , 12 ) ; - Text [ en-US ] = "Pr~eview" ; - }; - Window WND_BRSPRV - { - HelpId = HID_GALLERY_PREVIEW; - Border = TRUE ; - Pos = MAP_APPFONT ( 184 , 91 ) ; - Size = MAP_APPFONT ( 70 , 88 ) ; - }; - PushButton BTN_MADDIN1 - { - Pos = MAP_APPFONT ( 220 , 63 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Maddin1" ; - }; - PushButton BTN_MADDIN2 - { - Pos = MAP_APPFONT ( 220 , 80 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - Text [ en-US ] = "Maddin2" ; - }; -}; - -/******************************************************************************/ - -ModalDialog RID_SVXDLG_GALLERY_TITLE -{ - HelpId = HID_GALLERY_TITLE; - OutputSize = TRUE ; - Border = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 168 , 63 ) ; - Text [ en-US ] = "Enter Title" ; - Moveable = TRUE ; - - OkButton BTN_OK - { - DefButton = TRUE ; - Pos = MAP_APPFONT ( 112 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 112 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT ( 112 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - - FixedLine FL_TITLE - { - Pos = MAP_APPFONT ( 6 , 6 ) ; - Size = MAP_APPFONT ( 100 , 8 ) ; - Text [ en-US ] = "Title" ; - }; - Edit EDT_TITLE - { - HelpId = HID_GALLERY_TITLE_EDIT; - Border = TRUE ; - Pos = MAP_APPFONT ( 12 , 18 ) ; - Size = MAP_APPFONT ( 88, 12 ) ; - }; -}; - -/******************************************************************************/ - -ModalDialog RID_SVXDLG_GALLERY_SEARCH_PROGRESS -{ - HelpId = HID_GALLERY_SEARCH ; - OutputSize = TRUE ; - Border = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 124 , 86 ) ; - Text [ en-US ] = "Find" ; - Moveable = TRUE ; - FixedLine FL_SEARCH_DIR - { - Pos = MAP_APPFONT ( 6 , 33 ) ; - Size = MAP_APPFONT ( 112 , 8 ) ; - Text [ en-US ] = "Directory" ; - }; - FixedText FT_SEARCH_DIR - { - Pos = MAP_APPFONT ( 12 , 44 ) ; - Size = MAP_APPFONT ( 100 , 10 ) ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 37 , 66 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - FixedLine FL_SEARCH_TYPE - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 112 , 8 ) ; - Text [ en-US ] = "File type" ; - }; - FixedText FT_SEARCH_TYPE - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 100 , 10 ) ; - }; -}; - -/******************************************************************************/ - -ModalDialog RID_SVXDLG_GALLERY_TAKE_PROGRESS -{ - HelpId = HID_GALLERY_APPLY ; - OutputSize = TRUE ; - Border = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 124 , 56 ) ; - Text [ en-US ] = "Apply" ; - Moveable = TRUE ; - FixedLine FL_TAKE_PROGRESS - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 112 , 8 ) ; - Text [ en-US ] = "File" ; - }; - FixedText FT_TAKE_FILE - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 100 , 10 ) ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 37 , 36 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; -}; - -/******************************************************************************/ - -ModalDialog RID_SVXDLG_GALLERY_ACTUALIZE_PROGRESS -{ - HelpId = HID_GALLERY_ACTUALIZE ; - OutputSize = TRUE ; - Border = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 124 , 56 ) ; - Text [ en-US ] = "Update" ; - Moveable = TRUE ; - FixedLine FL_ACTUALIZE_PROGRESS - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 112 , 8 ) ; - Text [ en-US ] = "File" ; - }; - FixedText FT_ACTUALIZE_FILE - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 100 , 10 ) ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 37 , 36 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; -}; - -ModalDialog RID_SVXDLG_GALLERY_THEMEID -{ - OutputSize = TRUE ; - Border = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 180 , 63 ) ; - Text [ en-US ] = "Theme ID" ; - Moveable = TRUE ; - OkButton BTN_OK - { - Pos = MAP_APPFONT ( 124 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - DefButton = TRUE ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 124 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - FixedLine FL_ID - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 112 , 8 ) ; - Text [ en-US ] = "ID"; - }; - ListBox LB_RESNAME - { - Border = TRUE ; - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 100 , 60 ) ; - TabStop = TRUE ; - DropDown = TRUE ; - HScroll = TRUE ; - VScroll = TRUE ; - }; -}; - /******************************************************************************/ -CheckBox RID_SVXDLG_GALLERY_CBX -{ - Pos = MAP_APPFONT ( 0 , 0 ) ; - Size = MAP_APPFONT ( 120 , 12 ) ; - TabStop = TRUE ; - Text [ en-US ] = "S~ubdirectories" ; -}; String RID_SVXSTR_GALLERY_ACTUALIZE_PROGRESS { Text [ en-US ] = "Update"; @@ -488,10 +84,6 @@ String RID_SVXSTR_GALLERY_FOPENERROR { Text [ en-US ] = "This file cannot be opened" ; }; -String RID_SVXSTR_GALLERY_NOFILES -{ - Text [ en-US ] = "<No Files>" ; -}; String RID_SVXSTR_GALLERY_NOTHEME { Text [ en-US ] = "Invalid Theme Name!" ; @@ -544,10 +136,6 @@ String RID_SVXSTR_GALLERY_DELETEDD { Text [ en-US ] = "Do you want to delete the linked file?" ; }; -String RID_SVXSTR_GALLERY_SEARCH -{ - Text [ en-US ] = "Do you want to update the file list?" ; -}; String RID_SVXSTR_GALLERY_SGIERROR { Text [ en-US ] = "This file cannot be opened.\nDo you want to enter a different search path? " ; @@ -564,18 +152,6 @@ String RID_SVXSTR_GALLERY_THEMEERR { Text [ en-US ] = "This theme name already exists.\nPlease choose a different one." ; }; -String RID_SVXSTR_GALLERYPROPS_THEME -{ - Text [ en-US ] = "Theme;Themes" ; -}; -String RID_SVXSTR_GALLERYPROPS_OBJECT -{ - Text [ en-US ] = "Object;Objects" ; -}; -String RID_SVXSTR_GALLERYPROPS_GALTHEME -{ - Text [ en-US ] = "Gallery Theme" ; -}; String RID_SVXSTR_GALLERY_IMPORTTHEME { Text [ en-US ] = "I~mport..." ; @@ -584,22 +160,10 @@ String RID_SVXSTR_GALLERY_CREATETHEME { Text [ en-US ] = "New Theme..." ; }; -String RID_SVXSTR_GALLERY_READONLY -{ - Text [ en-US ] = " (read-only)" ; -}; -String RID_SVXSTR_GALLERY_ALLFILES -{ - Text [ en-US ] = "<All Files>" ; -}; String RID_SVXSTR_GALLERY_DIALOGID { Text [ en-US ] = "Assign ID" ; }; -String RID_SVXSTR_GALLERY_ID_EXISTS -{ - Text [ en-US ] = "This ID already exists..." ; -}; String RID_SVXSTR_GALLERY_TITLE { Text [ en-US ] = "Title" ; @@ -629,41 +193,21 @@ Bitmap RID_SVXBMP_THEME_NORMAL File = "galnors.bmp" ; }; -Bitmap RID_SVXBMP_THEME_NORMAL_BIG -{ - File = "galnorl.bmp" ; -}; - Bitmap RID_SVXBMP_THEME_IMPORTED { File = "galimps.bmp" ; }; -Bitmap RID_SVXBMP_THEME_IMPORTED_BIG -{ - File = "galimpl.bmp" ; -}; - Bitmap RID_SVXBMP_THEME_READONLY { File = "galrdos.bmp" ; }; -Bitmap RID_SVXBMP_THEME_READONLY_BIG -{ - File = "galrdol.bmp" ; -}; - Bitmap RID_SVXBMP_THEME_DEFAULT { File = "galdefs.bmp" ; }; -Bitmap RID_SVXBMP_THEME_DEFAULT_BIG -{ - File = "galdefl.bmp" ; -}; - Bitmap RID_SVXBMP_GALLERY_MEDIA { File = "galmedia.bmp"; diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx index 0305fa74e21d..ebc6ff78a213 100644 --- a/svx/source/gallery2/gallery1.cxx +++ b/svx/source/gallery2/gallery1.cxx @@ -39,6 +39,7 @@ #include <unotools/pathoptions.hxx> #include <sfx2/docfile.hxx> #include "gallery.hxx" +#include "gallery.hrc" #include "galmisc.hxx" #include "galtheme.hxx" #include "gallery1.hxx" @@ -919,3 +920,7 @@ void Gallery::ReleaseTheme( GalleryTheme* pTheme, SfxListener& rListener ) ImplDeleteCachedTheme( pTheme ); } } + +BOOL GalleryThemeEntry::IsDefault() const +{ return( ( nId > 0 ) && ( nId != ( RID_GALLERYSTR_THEME_MYTHEME - RID_GALLERYSTR_THEME_START ) ) ); } + diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index e92be98a06b6..d508cb412075 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -59,7 +59,10 @@ #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/ucb/XContentAccess.hpp> #include <com/sun/star/io/XInputStream.hpp> - +#include "galobj.hxx" +#include <svx/gallery1.hxx> +#include "galtheme.hrc" +#include <vcl/lstbox.hxx> #include "gallerydrawmodel.hxx" // -------------- @@ -1574,3 +1577,26 @@ SvStream& operator>>( SvStream& rIn, GalleryTheme& rTheme ) { return rTheme.ReadData( rIn ); } + +void GalleryTheme::ImplSetModified( BOOL bModified ) +{ pThm->SetModified( bModified ); } + +const String& GalleryTheme::GetRealName() const { return pThm->GetThemeName(); } +const INetURLObject& GalleryTheme::GetThmURL() const { return pThm->GetThmURL(); } +const INetURLObject& GalleryTheme::GetSdgURL() const { return pThm->GetSdgURL(); } +const INetURLObject& GalleryTheme::GetSdvURL() const { return pThm->GetSdvURL(); } +UINT32 GalleryTheme::GetId() const { return pThm->GetId(); } +void GalleryTheme::SetId( UINT32 nNewId, BOOL bResetThemeName ) { pThm->SetId( nNewId, bResetThemeName ); } +BOOL GalleryTheme::IsThemeNameFromResource() const { return pThm->IsNameFromResource(); } +BOOL GalleryTheme::IsImported() const { return pThm->IsImported(); } +BOOL GalleryTheme::IsReadOnly() const { return pThm->IsReadOnly(); } +BOOL GalleryTheme::IsDefault() const { return pThm->IsDefault(); } +BOOL GalleryTheme::IsModified() const { return pThm->IsModified(); } +const String& GalleryTheme::GetName() const { return IsImported() ? aImportName : pThm->GetThemeName(); } + +void GalleryTheme::InsertAllThemes( ListBox& rListBox ) +{ + for( USHORT i = RID_GALLERYSTR_THEME_FIRST; i <= RID_GALLERYSTR_THEME_LAST; i++ ) + rListBox.InsertEntry( String( GAL_RESID( i ) ) ); +} + |