[Libreoffice-commits] .: sw/source

Joseph Powers jpowers at kemper.freedesktop.org
Tue Nov 16 21:23:38 PST 2010


 sw/source/ui/inc/workctrl.hxx    |   10 +++-----
 sw/source/ui/lingu/olmenu.cxx    |   45 ++++++++++++++++++---------------------
 sw/source/ui/ribbar/workctrl.cxx |   20 +++++------------
 sw/source/ui/ribbar/workctrl.hrc |    5 ----
 sw/source/ui/ribbar/workctrl.src |    2 -
 5 files changed, 33 insertions(+), 49 deletions(-)

New commits:
commit 433b11bf51b3d27ff1738ac04292fac1f9bbe1d9
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Tue Nov 16 19:05:22 2010 -0800

    HC Cleanup - writer

diff --git a/sw/source/ui/inc/workctrl.hxx b/sw/source/ui/inc/workctrl.hxx
index d676408..86cab39 100644
--- a/sw/source/ui/inc/workctrl.hxx
+++ b/sw/source/ui/inc/workctrl.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -136,7 +136,6 @@ class SwScrollNaviPopup : public SfxPopupWindow
     FixedLine       aSeparator;
     FixedInfo       aInfoField;
     ImageList		aIList;
-    ImageList       aIListH;
 
     String			sQuickHelp[2 * NID_COUNT];
 
@@ -144,7 +143,7 @@ class SwScrollNaviPopup : public SfxPopupWindow
     USHORT			nBackId;
 
     void            ApplyImageList();
-    
+
     using Window::GetQuickHelpText;
 
 protected:
@@ -156,7 +155,7 @@ public:
         ~SwScrollNaviPopup();
 
     static String			GetQuickHelpText(BOOL bNext);
-    
+
     virtual SfxPopupWindow* Clone() const;
     void                GrabFocus(){aToolBox.GrabFocus();}
 };
@@ -169,7 +168,6 @@ class SwNaviImageButton : public ImageButton
 {
         SwScrollNaviPopup* 	pPopup;
         Image				aImage;
-        Image               aImageH;
         String              sQuickText;
         SfxPopupWindow*     pPopupWindow;
         SfxPopupWindow*     pFloatingWindow;
@@ -178,7 +176,7 @@ class SwNaviImageButton : public ImageButton
     protected:
         DECL_LINK( PopupModeEndHdl, void * );
         DECL_LINK( ClosePopupWindow, SfxPopupWindow * );
-        
+
         virtual void    Click();
         virtual void    DataChanged( const DataChangedEvent& rDCEvt );
         void            SetPopupWindow( SfxPopupWindow* pWindow );
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index ab23e89..72f6e91 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -226,7 +226,7 @@ void SwSpellPopup::fillLangPopupMenu(
         return;
 
     SvtLanguageTable    aLanguageTable;
-    
+
     // set of languages to be displayed in the sub menus
     std::set< OUString > aLangItems;
 
@@ -392,11 +392,11 @@ OUString RetrieveLabelFromCommand( const OUString& aCmdURL )
 SwSpellPopup::SwSpellPopup(
         SwWrtShell* pWrtSh,
         const uno::Reference< linguistic2::XSpellAlternatives >  &xAlt,
-        const String &rParaText ) :
-PopupMenu( SW_RES(MN_SPELL_POPUP) ),
-pSh( pWrtSh ),
-xSpellAlt(xAlt),
-bGrammarResults(false)
+        const String &rParaText
+)   : PopupMenu( SW_RES(MN_SPELL_POPUP) )
+    , pSh( pWrtSh )
+    , xSpellAlt(xAlt)
+    , bGrammarResults(false)
 {
     OSL_ENSURE(xSpellAlt.is(), "no spelling alternatives available");
 
@@ -412,7 +412,6 @@ bGrammarResults(false)
     sal_Int16 nStringCount = static_cast< sal_Int16 >( aSuggestions.getLength() );
 
     SvtLinguConfig aCfg;
-    const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
 
     PopupMenu *pMenu = GetPopupMenu(MN_AUTOCORR);
     pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
@@ -424,7 +423,7 @@ bGrammarResults(false)
         uno::Reference< container::XNamed > xNamed( xSpellAlt, uno::UNO_QUERY );
         if (xNamed.is())
         {
-            aSuggestionImageUrl = aCfg.GetSpellAndGrammarContextSuggestionImage( xNamed->getName(), bHC );
+            aSuggestionImageUrl = aCfg.GetSpellAndGrammarContextSuggestionImage( xNamed->getName() );
             aImage = Image( lcl_GetImageFromPngUrl( aSuggestionImageUrl ) );
         }
 
@@ -442,7 +441,7 @@ bGrammarResults(false)
 
             pMenu->InsertItem( nAutoCorrItemId, aEntry );
             pMenu->SetHelpId( nAutoCorrItemId, HID_LINGU_AUTOCORR);
-            
+
             ++nAutoCorrItemId;
             ++nItemId;
         }
@@ -515,7 +514,7 @@ bGrammarResults(false)
                 if (xSvcInfo.is())
                 {
                     OUString aDictionaryImageUrl( aCfg.GetSpellAndGrammarContextDictionaryImage(
-                            xSvcInfo->getImplementationName(), bHC) );
+                            xSvcInfo->getImplementationName() ) );
                     if (aDictionaryImageUrl.getLength() > 0)
                     {
                         Image aImage( lcl_GetImageFromPngUrl( aDictionaryImageUrl ) );
@@ -571,11 +570,10 @@ bGrammarResults(false)
     uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
     Image rImg = ::GetImage( xFrame,
             OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SpellingAndGrammarDialog")), sal_False );
-
     SetItemImage( MN_SPELLING_DLG, rImg );
 
     //////////////////////////////////////////////////////////////////////////////////
-    
+
     RemoveDisabledEntries( TRUE, TRUE );
 }
 
@@ -704,7 +702,6 @@ aInfo16( SW_RES(IMG_INFO_16) )
     uno::Reference< frame::XFrame > xFrame = pWrtSh->GetView().GetViewFrame()->GetFrame().GetFrameInterface();
     Image rImg = ::GetImage( xFrame,
             OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SpellingAndGrammarDialog")), sal_False );
-
     SetItemImage( MN_SPELLING_DLG, rImg );
 
     //////////////////////////////////////////////////////////////////////////////////
@@ -770,7 +767,7 @@ void SwSpellPopup::Execute( USHORT nId )
             pSh->DelLeft();
 
             pSh->Insert( aTmp );
-            
+
             /* #102505# EndAction/EndUndo moved down since insertion
                of temporary auto correction is now undoable two and
                must reside in the same undo group.*/
@@ -807,24 +804,24 @@ void SwSpellPopup::Execute( USHORT nId )
             pSh->GetView().GetViewFrame()->GetDispatcher()->
                 Execute( FN_SPELL_GRAMMAR_DIALOG, SFX_CALLMODE_ASYNCHRON );
         }
-    }    
+    }
     else if (nId == MN_IGNORE_SELECTION)
     {
         SwPaM *pPaM = pSh->GetCrsr();
         if (pPaM)
             pSh->IgnoreGrammarErrorAt( *pPaM );
-    }    
+    }
     else if (nId == MN_IGNORE_WORD)
     {
         uno::Reference< linguistic2::XDictionary > xDictionary( SvxGetIgnoreAllList(), uno::UNO_QUERY );
         linguistic::AddEntryToDic( xDictionary,
                 xSpellAlt->getWord(), sal_False, aEmptyStr, LANGUAGE_NONE );
-    }    
+    }
     else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END)
     {
             OUString aWord( xSpellAlt->getWord() );
 //            OSL_ENSURE( nDicIdx < aDics.getLength(), "dictionary index out of range" );
-            
+
             PopupMenu *pMenu = GetPopupMenu(MN_ADD_TO_DIC);
             String aDicName ( pMenu->GetItemText(nId) );
 
@@ -849,18 +846,18 @@ void SwSpellPopup::Execute( USHORT nId )
                         nAddRes );
                 }
             }
-    }    
-    else 
+    }
+    else
     {
         // Set language for selection or for paragraph...
-        
+
         SfxItemSet aCoreSet( pSh->GetView().GetPool(),
                     RES_CHRATR_LANGUAGE,        RES_CHRATR_LANGUAGE,
                     RES_CHRATR_CJK_LANGUAGE,    RES_CHRATR_CJK_LANGUAGE,
                     RES_CHRATR_CTL_LANGUAGE,    RES_CHRATR_CTL_LANGUAGE,
                     0 );
         String aNewLangTxt;
-        
+
         if (MN_SET_LANGUAGE_SELECTION_START <= nId && nId <= MN_SET_LANGUAGE_SELECTION_END)
         {
             //Set language for current selection
@@ -915,7 +912,7 @@ void SwSpellPopup::Execute( USHORT nId )
             lcl_CharDialog( *pSh, true, nId, 0, 0 );
             pSh->Pop( FALSE );  // restore cursor
         }
-    }    
+    }
 
     pSh->EnterStdMode();
 }
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index e975f0b..96fd64f 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -30,7 +30,6 @@
 #include "precompiled_sw.hxx"
 
 
-
 #include <string> // HACK: prevent conflict between STLPORT and Workshop headers
 #include <svl/eitem.hxx>
 #include <svx/htmlmode.hxx>
@@ -92,9 +91,7 @@ void SAL_CALL SwTbxInsertCtrl::update() throw (uno::RuntimeException)
     ToolBox& rTbx = GetToolBox();
     rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
     aSlotURL += rtl::OUString::valueOf( sal_Int32( nLastSlotId ));
-    Image aImage = GetImage( m_xFrame,
-                             aSlotURL,
-                             hasBigImages() );
+    Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages() );
 
     rTbx.SetItemImage(GetId(), aImage);
     rTbx.Invalidate();
@@ -121,9 +118,7 @@ void SwTbxInsertCtrl::StateChanged( USHORT /*nSID*/,
             rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" ));
             aSlotURL += rtl::OUString::valueOf( sal_Int32( nId ));
             ToolBox& rBox = GetToolBox();
-            Image aImage = GetImage( m_xFrame,
-                                     aSlotURL,
-                                     hasBigImages() );
+            Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages() );
             rBox.SetItemImage(GetId(), aImage);
             rBox.SetItemImageMirrorMode( GetId(), FALSE );
             rBox.SetItemImageAngle( GetId(), pItem->GetRotation() );
@@ -413,7 +408,6 @@ SwScrollNaviPopup::SwScrollNaviPopup( USHORT nId, const Reference< XFrame >& rFr
     aSeparator(this, SW_RES(FL_SEP)),
     aInfoField(this, SW_RES(FI_INFO)),
     aIList(SW_RES(IL_VALUES)),
-    aIListH(SW_RES(ILH_VALUES)),
     nFwdId(FN_START_OF_NEXT_PAGE),
     nBackId(FN_START_OF_PREV_PAGE)
 {
@@ -488,8 +482,7 @@ void SwScrollNaviPopup::DataChanged( const DataChangedEvent& rDCEvt )
 
 void SwScrollNaviPopup::ApplyImageList()
 {
-    ImageList& rImgLst = aToolBox.GetSettings().GetStyleSettings().GetHighContrastMode() ?
-        aIListH : aIList;
+    ImageList& rImgLst = aIList;
     for(USHORT i = 0; i < NID_COUNT; i++)
     {
         USHORT nNaviId = aNavigationInsertIds[i];
@@ -624,7 +617,6 @@ SwNaviImageButton::SwNaviImageButton(
     ImageButton(pParent, SW_RES(BTN_NAVI)),
         pPopup(0),
         aImage(SW_RES(IMG_BTN)),
-        aImageH(SW_RES(IMG_BTN_H)),
         sQuickText(SW_RES(ST_QUICK)),
         pPopupWindow(0),
         pFloatingWindow(0),
@@ -633,14 +625,14 @@ SwNaviImageButton::SwNaviImageButton(
     FreeResource();
     SetStyle(GetStyle()|WB_NOPOINTERFOCUS);
     SetQuickHelpText(sQuickText);
-    SetModeImage( GetSettings().GetStyleSettings().GetHighContrastMode() ? aImageH : aImage);
+    SetModeImage( aImage );
 }
 
 void SwNaviImageButton::DataChanged( const DataChangedEvent& rDCEvt )
 {
     if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) &&
          (rDCEvt.GetFlags() & SETTINGS_STYLE) )
-            SetModeImage( GetSettings().GetStyleSettings().GetHighContrastMode() ? aImageH : aImage);
+            SetModeImage( aImage );
 
     Window::DataChanged( rDCEvt );
 }
diff --git a/sw/source/ui/ribbar/workctrl.hrc b/sw/source/ui/ribbar/workctrl.hrc
index 108cf44..64dfb6e 100644
--- a/sw/source/ui/ribbar/workctrl.hrc
+++ b/sw/source/ui/ribbar/workctrl.hrc
@@ -1,7 +1,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -37,9 +37,6 @@
 #define ST_QUICK            7
 #define FI_INFO             8
 #define FL_SEP              9
-#define ILH_VALUES         10
-#define IMG_BTN_H            11
-
 
 #define ST_TBL          12
 #define ST_FRM          13
diff --git a/sw/source/ui/ribbar/workctrl.src b/sw/source/ui/ribbar/workctrl.src
index 7e06cf0..74b0fa4 100644
--- a/sw/source/ui/ribbar/workctrl.src
+++ b/sw/source/ui/ribbar/workctrl.src
@@ -1,7 +1,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite


More information about the Libreoffice-commits mailing list