[Libreoffice-commits] .: 2 commits - padmin/source svtools/inc svtools/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Nov 16 09:11:44 PST 2010


 padmin/source/adddlg.cxx                    |    5 --
 svtools/inc/imagemgr.hxx                    |   15 ++------
 svtools/source/brwbox/editbrowsebox.cxx     |   14 +------
 svtools/source/brwbox/editbrowseboximpl.hxx |    1 
 svtools/source/contnr/fileview.cxx          |   17 ++-------
 svtools/source/misc/imagemgr.cxx            |   52 +++++-----------------------
 6 files changed, 23 insertions(+), 81 deletions(-)

New commits:
commit 5c66a71f4e8d40cddac41b16ad8b2c15f39f1caa
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Nov 16 16:01:17 2010 +0000

    fix this to build again

diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx
index 28dca6b..efbd2e8 100644
--- a/padmin/source/adddlg.cxx
+++ b/padmin/source/adddlg.cxx
@@ -805,10 +805,7 @@ AddPrinterDialog::~AddPrinterDialog()
 
 void AddPrinterDialog::updateSettings()
 {
-    if( ! GetSettings().GetStyleSettings().GetHighContrastMode() )
-        m_aTitleImage.SetImage( Image( BitmapEx( PaResId( RID_BMP_PRINTER ) ) ) );
-    else
-        m_aTitleImage.SetImage( Image( BitmapEx( PaResId( RID_BMP_PRINTER_HC ) ) ) );
+    m_aTitleImage.SetImage( Image( BitmapEx( PaResId( RID_BMP_PRINTER ) ) ) );
 }
 
 void AddPrinterDialog::DataChanged( const DataChangedEvent& rEv )
commit cbc77bfb78192a7b298ceee3d33a73aead42b026
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Nov 16 12:23:48 2010 +0000

    fix this to build again

diff --git a/svtools/inc/imagemgr.hxx b/svtools/inc/imagemgr.hxx
index 0f584d2..0d53d6f 100644
--- a/svtools/inc/imagemgr.hxx
+++ b/svtools/inc/imagemgr.hxx
@@ -75,17 +75,10 @@ private:
     SVT_DLLPRIVATE static String	GetDescription_Impl( const INetURLObject& rObject, sal_Bool bDetectFolder );
 
 public:
-    // depricated, because no high contrast mode
-    SVT_DLLPUBLIC static Image	GetImage( const INetURLObject& rURL, sal_Bool bBig = sal_False );
-    static Image	GetFileImage( const INetURLObject& rURL, sal_Bool bBig = sal_False );
-    static Image	GetImageNoDefault( const INetURLObject& rURL, sal_Bool bBig = sal_False );
-    SVT_DLLPUBLIC static Image	GetFolderImage( const svtools::VolumeInfo& rInfo, sal_Bool bBig = sal_False );
-
-    // now with high contrast mode
-    SVT_DLLPUBLIC static Image	GetImage( const INetURLObject& rURL, sal_Bool bBig, sal_Bool bHighContrast );
-    SVT_DLLPUBLIC static Image	GetFileImage( const INetURLObject& rURL, sal_Bool bBig, sal_Bool bHighContrast );
-    SVT_DLLPUBLIC static Image	GetImageNoDefault( const INetURLObject& rURL, sal_Bool bBig, sal_Bool bHighContrast );
-    SVT_DLLPUBLIC static Image	GetFolderImage( const svtools::VolumeInfo& rInfo, sal_Bool bBig, sal_Bool bHighContrast );
+    SVT_DLLPUBLIC static Image	GetImage( const INetURLObject& rURL, sal_Bool bBig );
+    SVT_DLLPUBLIC static Image	GetFileImage( const INetURLObject& rURL, sal_Bool bBig );
+    SVT_DLLPUBLIC static Image	GetImageNoDefault( const INetURLObject& rURL, sal_Bool bBig );
+    SVT_DLLPUBLIC static Image	GetFolderImage( const svtools::VolumeInfo& rInfo, sal_Bool bBig );
 
     SVT_DLLPUBLIC static String	GetDescription( const INetURLObject& rObject );
     SVT_DLLPUBLIC static String	GetFileDescription( const INetURLObject& rObject );
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 4e73a28..a4fe8e0 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -57,13 +57,6 @@ namespace svt
     namespace
     {
         //..............................................................
-        sal_Bool isHiContrast(Window* _pWindow)
-        {
-            OSL_ENSURE(_pWindow,"Window must be not null!");
-            return _pWindow && _pWindow->GetSettings().GetStyleSettings().GetHighContrastMode(); 
-        }
-
-        //..............................................................
         sal_uInt16 getRealGetFocusFlags( Window* _pWindow )
         {
             sal_uInt16 nFlags = 0;
@@ -137,7 +130,6 @@ namespace svt
     void EditBrowseBox::impl_construct()
     {
         m_aImpl = ::std::auto_ptr<EditBrowseBoxImpl>(new EditBrowseBoxImpl());
-        m_aImpl->m_bHiContrast = isHiContrast(&GetDataWindow());
 
         SetCompoundControl(sal_True);
         SetGridLineColor( Color( COL_LIGHTGRAY ) );
@@ -302,11 +294,9 @@ namespace svt
     //------------------------------------------------------------------------------
     Image EditBrowseBox::GetImage(RowStatus eStatus) const
     {
-        sal_Bool bHiContrast = isHiContrast(&GetDataWindow());
-        if ( !m_aStatusImages.GetImageCount() || (bHiContrast != m_aImpl->m_bHiContrast) )
+        if ( !m_aStatusImages.GetImageCount() )
         {
-            m_aImpl->m_bHiContrast = bHiContrast;
-            const_cast<EditBrowseBox*>(this)->m_aStatusImages = ImageList(SvtResId( RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX ));
+            const_cast<EditBrowseBox*>(this)->m_aStatusImages = ImageList(SvtResId(RID_SVTOOLS_IMAGELIST_EDITBROWSEBOX));
         }
 
         Image aImage;
diff --git a/svtools/source/brwbox/editbrowseboximpl.hxx b/svtools/source/brwbox/editbrowseboximpl.hxx
index c649594..46edd68 100644
--- a/svtools/source/brwbox/editbrowseboximpl.hxx
+++ b/svtools/source/brwbox/editbrowseboximpl.hxx
@@ -37,7 +37,6 @@ namespace svt
     {
     public:
         ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible >    m_xActiveCell;
-        sal_Bool                                                                            m_bHiContrast;
 
         void clearActiveCell();
     };
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index 346b026..682a552 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -144,13 +144,6 @@ namespace
 
 // -----------------------------------------------------------------------
 
-static sal_Bool isHighContrast( const Window* _pView )
-{
-    return _pView->GetSettings().GetStyleSettings().GetHighContrastMode();
-}
-
-// -----------------------------------------------------------------------
-
 void FilterMatch::createWildCardFilterList(const String& _rFilterList,::std::vector< WildCard >& _rFilters)
 {
     if( _rFilterList.Len() )
@@ -1323,7 +1316,7 @@ void SvtFileView::OpenFolder( const Sequence< OUString >& aContents )
         // detect image
         sal_Bool bDoInsert = sal_True;
         INetURLObject aObj( aImageURL.Len() > 0 ? aImageURL : aURL );
-        Image aImage = SvFileInformationManager::GetImage( aObj, FALSE, isHighContrast( this ) );
+        Image aImage = SvFileInformationManager::GetImage( aObj, FALSE );
 
         if ( bDoInsert )
         {
@@ -2341,10 +2334,10 @@ void SvtFileView_Impl::CreateDisplayText_Impl()
             ::svtools::VolumeInfo aVolInfo( (*aIt)->mbIsVolume, (*aIt)->mbIsRemote,
                                             (*aIt)->mbIsRemoveable, (*aIt)->mbIsFloppy,
                                             (*aIt)->mbIsCompactDisc );
-            (*aIt)->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, FALSE, isHighContrast( mpView ) );
+            (*aIt)->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, FALSE );
         }
         else
-            (*aIt)->maImage = SvFileInformationManager::GetFileImage( INetURLObject( (*aIt)->maTargetURL ), FALSE, isHighContrast( mpView ));
+            (*aIt)->maImage = SvFileInformationManager::GetFileImage( INetURLObject( (*aIt)->maTargetURL ), FALSE );
     }
 }
 
@@ -2429,7 +2422,7 @@ void SvtFileView_Impl::CreateVector_Impl( const Sequence < OUString > &rList )
 
         // detect the image
         INetURLObject aObj( pEntry->maImageURL.getLength() ? pEntry->maImageURL : pEntry->maTargetURL );
-        pEntry->maImage = SvFileInformationManager::GetImage( aObj, FALSE, isHighContrast( mpView ) );
+        pEntry->maImage = SvFileInformationManager::GetImage( aObj, FALSE );
 
         maContent.push_back( pEntry );
     }
@@ -2639,7 +2632,7 @@ String SvtFileView_Impl::FolderInserted( const OUString& rURL, const OUString& r
 
     ::svtools::VolumeInfo aVolInfo;
     pData->maType = SvFileInformationManager::GetFolderDescription( aVolInfo );
-    pData->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, FALSE, isHighContrast( mpView ) );
+    pData->maImage = SvFileInformationManager::GetFolderImage( aVolInfo, FALSE );
 
     OUString aValue;
     OUString aTab     = OUString::createFromAscii( "\t" );
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx
index 2888ff9..938204b 100644
--- a/svtools/source/misc/imagemgr.cxx
+++ b/svtools/source/misc/imagemgr.cxx
@@ -566,17 +566,12 @@ static ImageList* CreateImageList_Impl( USHORT nResId )
     return pList;
 }
 
-/**
- * @param bHighContrast: is an unused noop now. FIXME remove me carefully
- */
-static Image GetOfficeImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL /*bHighContrast*/ )
+static Image GetOfficeImageFromList_Impl( USHORT nImageId, BOOL bBig )
 {
     ImageList* pList = NULL;
 
     static ImageList* _pSmallOfficeImgList = NULL;
     static ImageList* _pBigOfficeImgList = NULL;
-    static ImageList* _pSmallHCOfficeImgList = NULL;
-    static ImageList* _pBigHCOfficeImgList = NULL;
     static ULONG nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle();
 
     // If the style has been changed, throw away our cache of the older images
@@ -584,8 +579,6 @@ static Image GetOfficeImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL /*bHi
     {
         delete _pSmallOfficeImgList, _pSmallOfficeImgList = NULL;
         delete _pBigOfficeImgList, _pBigOfficeImgList = NULL;
-        delete _pSmallHCOfficeImgList, _pSmallHCOfficeImgList = NULL;
-        delete _pBigHCOfficeImgList, _pBigHCOfficeImgList = NULL;
         nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle();
     }
 
@@ -607,12 +600,9 @@ static Image GetOfficeImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL /*bHi
     return aImage;
 }
 
-/**
- * @param bHighContrast: is an unused noop now. FIXME remove me carefully
- */
-static Image GetImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL /*bHighContrast*/ )
+static Image GetImageFromList_Impl( USHORT nImageId, BOOL bBig )
 {
-    if ( !bBig && IMG_FOLDER == nImageId)
+    if ( !bBig && IMG_FOLDER == nImageId )
         // return our new small folder image (256 colors)
         return Image( SvtResId( IMG_SVT_FOLDER ) );
 
@@ -646,7 +636,7 @@ static Image GetImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL /*bHighCont
     if ( pList->HasImageAtPos( nImageId ) )
         return pList->GetImage( nImageId );
     else
-        return GetOfficeImageFromList_Impl( nImageId, bBig, false );
+        return GetOfficeImageFromList_Impl( nImageId, bBig );
 }
 
 //****************************************************************************
@@ -739,39 +729,19 @@ String SvFileInformationManager::GetDescription_Impl( const INetURLObject& rObje
 
 Image SvFileInformationManager::GetImage( const INetURLObject& rObject, sal_Bool bBig )
 {
-    return GetImage( rObject, bBig, FALSE );
-}
-
-Image SvFileInformationManager::GetFileImage( const INetURLObject& rObject, sal_Bool bBig )
-{
-    return GetFileImage( rObject, bBig, FALSE );
-}
-
-Image SvFileInformationManager::GetImageNoDefault( const INetURLObject& rObject, sal_Bool bBig )
-{
-    return GetImageNoDefault( rObject, bBig, FALSE );
-}
-
-Image SvFileInformationManager::GetFolderImage( const svtools::VolumeInfo& rInfo, sal_Bool bBig )
-{
-    return GetFolderImage( rInfo, bBig, FALSE );
-}
-
-Image SvFileInformationManager::GetImage( const INetURLObject& rObject, sal_Bool bBig, sal_Bool bHighContrast )
-{
     USHORT nImage = GetImageId_Impl( rObject, sal_True );
     DBG_ASSERT( nImage, "invalid ImageId" );
-    return GetImageFromList_Impl( nImage, bBig, bHighContrast );
+    return GetImageFromList_Impl( nImage, bBig );
 }
 
-Image SvFileInformationManager::GetFileImage( const INetURLObject& rObject, sal_Bool bBig, sal_Bool bHighContrast )
+Image SvFileInformationManager::GetFileImage( const INetURLObject& rObject, sal_Bool bBig )
 {
     USHORT nImage = GetImageId_Impl( rObject, sal_False );
     DBG_ASSERT( nImage, "invalid ImageId" );
-    return GetImageFromList_Impl( nImage, bBig, bHighContrast );
+    return GetImageFromList_Impl( nImage, bBig );
 }
 
-Image SvFileInformationManager::GetImageNoDefault( const INetURLObject& rObject, sal_Bool bBig, sal_Bool bHighContrast )
+Image SvFileInformationManager::GetImageNoDefault( const INetURLObject& rObject, sal_Bool bBig )
 {
     USHORT nImage = GetImageId_Impl( rObject, sal_True );
     DBG_ASSERT( nImage, "invalid ImageId" );
@@ -779,10 +749,10 @@ Image SvFileInformationManager::GetImageNoDefault( const INetURLObject& rObject,
     if ( nImage == IMG_FILE )
         return Image();
 
-    return GetImageFromList_Impl( nImage, bBig, bHighContrast );
+    return GetImageFromList_Impl( nImage, bBig );
 }
 
-Image SvFileInformationManager::GetFolderImage( const svtools::VolumeInfo& rInfo, sal_Bool bBig, sal_Bool bHighContrast )
+Image SvFileInformationManager::GetFolderImage( const svtools::VolumeInfo& rInfo, sal_Bool bBig )
 {
     USHORT nImage = IMG_FOLDER;
     DBG_ASSERT( nImage, "invalid ImageId" );
@@ -796,7 +766,7 @@ Image SvFileInformationManager::GetFolderImage( const svtools::VolumeInfo& rInfo
     else if ( rInfo.m_bIsVolume )
         nImage = IMG_FIXEDDEV;
 
-    return GetImageFromList_Impl( nImage, bBig, bHighContrast );
+    return GetImageFromList_Impl( nImage, bBig );
 }
 
 String SvFileInformationManager::GetDescription( const INetURLObject& rObject )


More information about the Libreoffice-commits mailing list