summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2009-11-23 17:39:22 +0100
committerMathias Bauer <mba@openoffice.org>2009-11-23 17:39:22 +0100
commitd925fcf39e08921804a540bbd7766c2d84446ff5 (patch)
treebbdd023f7821bb1a9874fad8b4e9fdeea9bab4b4 /cui
parent7f5d91313ad6b19ba5650e805319134022b4d218 (diff)
parentbae47ec86973ca9c4ee7552182cd02d1eea31b0c (diff)
merge commit for m65
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/cfg.cxx11
-rw-r--r--cui/source/customize/macropg.cxx4
-rw-r--r--cui/source/dialogs/SpellDialog.cxx6
-rw-r--r--cui/source/options/optaccessibility.cxx2
-rw-r--r--cui/source/options/optcolor.cxx2
-rw-r--r--cui/source/options/optimprove2.cxx8
-rw-r--r--cui/source/options/optsave.cxx2
-rw-r--r--cui/source/options/readonlyimage.cxx4
-rw-r--r--cui/source/options/treeopt.cxx4
-rw-r--r--cui/source/tabpages/align.cxx2
-rw-r--r--cui/source/tabpages/border.cxx8
-rw-r--r--cui/source/tabpages/labdlg.cxx2
-rw-r--r--cui/source/tabpages/tphatch.cxx4
-rw-r--r--cui/source/tabpages/tpline.cxx1
14 files changed, 31 insertions, 29 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 8e492e0ebcfa..4697a957662c 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -403,7 +403,7 @@ void InitImageType()
Window* topwin = Application::GetActiveTopWindow();
if ( topwin != NULL &&
- topwin->GetDisplayBackground().GetColor().IsDark() )
+ topwin->GetSettings().GetStyleSettings().GetHighContrastMode() )
{
theImageType |= css::ui::ImageType::COLOR_HIGHCONTRAST;
}
@@ -5114,7 +5114,7 @@ SvxToolbarEntriesListBox::SvxToolbarEntriesListBox(
BuildCheckBoxButtonImages( m_pButtonData );
EnableCheckButton( m_pButtonData );
- m_bHiContrastMode = GetDisplayBackground().GetColor().IsDark();
+ m_bHiContrastMode = GetSettings().GetStyleSettings().GetHighContrastMode();
}
// --------------------------------------------------------
@@ -5189,11 +5189,8 @@ void SvxToolbarEntriesListBox::DataChanged( const DataChangedEvent& rDCEvt )
if (( rDCEvt.GetType() == DATACHANGED_SETTINGS ) &&
( rDCEvt.GetFlags() & SETTINGS_STYLE ))
{
- if ( m_bHiContrastMode != GetDisplayBackground().GetColor().IsDark() )
- {
- // We have to reset all images because we change to/from high contrast mode
- m_bHiContrastMode = GetDisplayBackground().GetColor().IsDark();
- }
+ // We have to reset all images because we change to/from high contrast mode
+ m_bHiContrastMode = GetSettings().GetStyleSettings().GetHighContrastMode();
BuildCheckBoxButtonImages( m_pButtonData );
Invalidate();
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index faeaa60e2027..2bd9194b219b 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -486,9 +486,7 @@ void IconLBoxString::Paint( const Point& aPos, SvLBox& aDevice,
sal_Int32 nIndex = aURL.indexOf( aVndSunStarUNO );
bool bUNO = nIndex == 0;
- Wallpaper aBackground = aDevice.GetBackground();
- Color aColor = aBackground.GetColor();
- BOOL bHC = aColor.IsDark();
+ BOOL bHC = aDevice.GetSettings().GetStyleSettings().GetHighContrastMode();
const Image* pImg;
if( bHC )
pImg = bUNO ? m_pComponentImg_h : m_pMacroImg_h;
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index d6837554f30f..0e69585a4ff4 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -902,7 +902,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
const SpellErrorDescription* pSpellErrorDescription = aSentenceED.GetAlternatives();
if( pSpellErrorDescription && pSpellErrorDescription->sServiceName.getLength() )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
::rtl::OUString sSuggestionImageUrl =
SvtLinguConfig().GetSpellAndGrammarDialogImage( pSpellErrorDescription->sServiceName, bHighContrast );
aVendorImageFI.SetImage( lcl_GetImageFromPngUrl( sSuggestionImageUrl ) );
@@ -912,7 +912,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
}
else
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
aVendorImageFI.SetImage( bHighContrast ? aVendorImageHC : aVendorImage );
}
@@ -923,7 +923,7 @@ void SpellDialog::SetTitle_Impl(LanguageType nLang)
}
else
{
- //bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ //bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
sTitle = m_sTitleSpellingGrammar;
}
}
diff --git a/cui/source/options/optaccessibility.cxx b/cui/source/options/optaccessibility.cxx
index ee03b9653b8d..3ceacf56d082 100644
--- a/cui/source/options/optaccessibility.cxx
+++ b/cui/source/options/optaccessibility.cxx
@@ -148,8 +148,8 @@ BOOL SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet& )
aMiscSettings.SetEnableATToolSupport( m_aAccessibilityTool.IsChecked() );
#endif
aAllSettings.SetMiscSettings(aMiscSettings);
- Application::SetSettings(aAllSettings);
Application::MergeSystemSettings( aAllSettings );
+ Application::SetSettings(aAllSettings);
return FALSE;
}
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 58eeb487879d..6d451c53cab9 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -753,9 +753,9 @@ ColorConfigWindow_Impl::ColorConfigWindow_Impl(Window* pParent, const ResId& rRe
Wallpaper aTransparentWall(TempColor);
sal_Int32 nWinWidth = GetSizePixel().Width();
sal_Int32 nFTHeight = aChapters[0]->GetSizePixel().Height();
- sal_Bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
Color aBackColor;
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+ sal_Bool bHighContrast = rStyleSettings.GetHighContrastMode();
if ( bHighContrast )
aBackColor = rStyleSettings.GetShadowColor();
else
diff --git a/cui/source/options/optimprove2.cxx b/cui/source/options/optimprove2.cxx
index 797c0dce0534..1509b88ce186 100644
--- a/cui/source/options/optimprove2.cxx
+++ b/cui/source/options/optimprove2.cxx
@@ -145,7 +145,13 @@ IMPL_LINK( SvxImprovementOptionsPage, HandleShowData, PushButton*, EMPTYARG )
{
::rtl::OUString sLogFile( m_sLogPath );
sLogFile += C2S("/Current.csv");
- uno::Sequence< beans::PropertyValue > aArgs;
+ uno::Sequence< beans::PropertyValue > aArgs(3);
+ aArgs[0].Name = ::rtl::OUString::createFromAscii("FilterName");
+ aArgs[0].Value = uno::makeAny(::rtl::OUString::createFromAscii("Text - txt - csv (StarCalc)"));
+ aArgs[1].Name = ::rtl::OUString::createFromAscii("FilterOptions");
+ aArgs[1].Value = uno::makeAny(::rtl::OUString::createFromAscii("44,34,12,1,"));
+ aArgs[2].Name = ::rtl::OUString::createFromAscii("ReadOnly");
+ aArgs[2].Value = uno::makeAny(true);
uno::Reference< lang::XComponent > xDoc = ::comphelper::SynchronousDispatch::dispatch(
xDesktop, sLogFile, C2S("_default"), 0, aArgs );
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index f405fb4b0acd..caf332fb4048 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -229,7 +229,7 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) :
pImpl ( new SvxSaveTabPage_Impl )
{
- sal_Bool bHighContrast = GetDisplayBackground().GetColor().IsDark();
+ sal_Bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
aODFWarningFI.SetImage(
Image( CUI_RES( bHighContrast ? IMG_ODF_WARNING_HC : IMG_ODF_WARNING ) ) );
diff --git a/cui/source/options/readonlyimage.cxx b/cui/source/options/readonlyimage.cxx
index ce97d352d44d..ae8f1e4faa58 100644
--- a/cui/source/options/readonlyimage.cxx
+++ b/cui/source/options/readonlyimage.cxx
@@ -42,8 +42,8 @@
ReadOnlyImage::ReadOnlyImage(Window* pParent, const ResId rResId) :
FixedImage(pParent, rResId)
{
- sal_Bool bHighContrast = pParent->GetDisplayBackground().GetColor().IsDark();
- SetImage( Image(CUI_RES(bHighContrast ? RID_SVXBMP_LOCK_HC : RID_SVXBMP_LOCK )));
+ sal_Bool bHighContrast = pParent->GetSettings().GetStyleSettings().GetHighContrastMode();
+ SetImage( Image(SVX_RES(bHighContrast ? RID_SVXBMP_LOCK_HC : RID_SVXBMP_LOCK )));
}
/*-- 26.02.2004 13:31:04---------------------------------------------------
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 8bd00f3a260f..b45a19af4a70 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1067,7 +1067,7 @@ void OfaTreeOptionsDialog::DataChanged( const DataChangedEvent& rDCEvt )
!aTreeLB.GetParent(pEntry))
{
OptionsGroupInfo* pInfo = static_cast<OptionsGroupInfo*>(pEntry->GetUserData());
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
ImageList* pImgLst = bHighContrast ? &aPageImagesHC : &aPageImages;
for ( sal_uInt16 i = 0; i < aHelpTextsArr.Count(); ++i )
{
@@ -1325,7 +1325,7 @@ IMPL_LINK( OfaTreeOptionsDialog, SelectHdl_Impl, Timer*, EMPTYARG )
OptionsGroupInfo* pTGInfo = (OptionsGroupInfo *)pEntry->GetUserData();
if ( pTGInfo->m_sPageURL.getLength() == 0 )
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
ImageList* pImgLst = bHighContrast ? &aPageImagesHC : &aPageImages;
//hier den Hilfetext anzeigen
for ( sal_uInt16 i = 0; i < aHelpTextsArr.Count(); ++i )
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index b85f84476e1b..dde17af21744 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -244,7 +244,7 @@ void AlignmentTabPage::InitVsRefEgde()
// remember selection - is deleted in call to ValueSet::Clear()
USHORT nSel = maVsRefEdge.GetSelectItemId();
- ResId aResId( GetBackground().GetColor().IsDark() ? IL_LOCK_BMPS_HC : IL_LOCK_BMPS, CUI_MGR() );
+ ResId aResId( GetSettings().GetStyleSettings().GetHighContrastMode() ? IL_LOCK_BMPS_HC : IL_LOCK_BMPS, DIALOG_MGR() );
ImageList aImageList( aResId );
Size aItemSize( aImageList.GetImage( IID_BOTTOMLOCK ).GetSizePixel() );
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 83999706ca75..31191b4dffe1 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -1029,8 +1029,8 @@ USHORT SvxBorderTabPage::GetPresetStringId( USHORT nValueSetIdx ) const
void SvxBorderTabPage::FillPresetVS()
{
// find correct image list
- bool bDark = aWndPresets.GetDisplayBackground().GetColor().IsDark();
- ImageList& rImgList = bDark ? aBorderImgLstH : aBorderImgLst;
+ bool bHC = aWndPresets.GetSettings().GetStyleSettings().GetHighContrastMode();
+ ImageList& rImgList = bHC ? aBorderImgLstH : aBorderImgLst;
Size aImgSize( rImgList.GetImage( IID_PRE_CELL_NONE ).GetSizePixel() );
// basic initialization of the ValueSet
@@ -1056,8 +1056,8 @@ void SvxBorderTabPage::FillPresetVS()
void SvxBorderTabPage::FillShadowVS()
{
// find correct image list
- bool bDark = aWndShadows.GetDisplayBackground().GetColor().IsDark();
- ImageList& rImgList = bDark ? aShadowImgLstH : aShadowImgLst;
+ bool bHC = aWndPresets.GetSettings().GetStyleSettings().GetHighContrastMode();
+ ImageList& rImgList = bHC ? aShadowImgLstH : aShadowImgLst;
Size aImgSize( rImgList.GetImage( IID_SHADOWNONE ).GetSizePixel() );
// basic initialization of the ValueSet
diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx
index 7f0bd3d39ed2..a311fadca64b 100644
--- a/cui/source/tabpages/labdlg.cxx
+++ b/cui/source/tabpages/labdlg.cxx
@@ -570,7 +570,7 @@ void SvxCaptionTabPage::DataChanged( const DataChangedEvent& rDCEvt )
void SvxCaptionTabPage::FillValueSet()
{
- bool bHighContrast = GetDisplayBackground().GetColor().IsDark() != 0;
+ bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode();
Image** ppBitmaps = bHighContrast ? mpBmpCapTypesH : mpBmpCapTypes;
aCT_CAPTTYPE.SetItemImage(BMP_CAPTTYPE_1, *(ppBitmaps[0]) );
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 965527be54f0..006099f1fde6 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -155,7 +155,7 @@ SvxHatchTabPage::SvxHatchTabPage
aBtnLoad.SetClickHdl( LINK( this, SvxHatchTabPage, ClickLoadHdl_Impl ) );
aBtnSave.SetClickHdl( LINK( this, SvxHatchTabPage, ClickSaveHdl_Impl ) );
- aCtlPreview.SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ aCtlPreview.SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
}
// -----------------------------------------------------------------------
@@ -889,7 +889,7 @@ void SvxHatchTabPage::PointChanged( Window* pWindow, RECT_POINT eRcPt )
void SvxHatchTabPage::DataChanged( const DataChangedEvent& rDCEvt )
{
if ( ( rDCEvt.GetType() == DATACHANGED_SETTINGS ) && ( rDCEvt.GetFlags() & SETTINGS_STYLE ) )
- aCtlPreview.SetDrawMode( GetDisplayBackground().GetColor().IsDark() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
+ aCtlPreview.SetDrawMode( GetSettings().GetStyleSettings().GetHighContrastMode() ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR );
SvxTabPage::DataChanged( rDCEvt );
}
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index c455f1e47123..09a5daadfe1d 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -288,6 +288,7 @@ void SvxLineTabPage::Construct()
void SvxLineTabPage::FillListboxes()
{
+ // Linienstile
USHORT nOldSelect = aLbLineStyle.GetSelectEntryPos();
aLbLineStyle.FillStyles();
aLbLineStyle.Fill( pDashList );