diff options
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r-- | sfx2/source/dialog/dockwin.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/dialog/passwd.cxx | 28 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 4 |
3 files changed, 31 insertions, 4 deletions
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index fb31ab3dc252..0b278a55872b 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -236,7 +236,8 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd , } Window* pContentWindow = VCLUnoHelper::GetWindow(xWindow); - pContentWindow->SetStyle( pContentWindow->GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL ); + if ( pContentWindow ) + pContentWindow->SetStyle( pContentWindow->GetStyle() | WB_DIALOGCONTROL | WB_CHILDDLGCTRL ); pTitleDockWindow->SetWrappedWindow(pContentWindow); } diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index cbe47d39b704..981657d476fa 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -43,10 +43,35 @@ #include "dialog.hrc" #include "passwd.hrc" +#include "vcl/sound.hxx" + // ----------------------------------------------------------------------- IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, EMPTYARG ) { + if( mbAsciiOnly ) + { + rtl::OUString aTest( maPasswordED.GetText() ); + const sal_Unicode* pTest = aTest.getStr(); + sal_Int32 nLen = aTest.getLength(); + rtl::OUStringBuffer aFilter( nLen ); + bool bReset = false; + for( sal_Int32 i = 0; i < nLen; i++ ) + { + if( *pTest > 0x007f ) + bReset = true; + else + aFilter.append( *pTest ); + pTest++; + } + if( bReset ) + { + Sound::Beep( SOUND_ERROR ); + maPasswordED.SetSelection( Selection( 0, nLen ) ); + maPasswordED.ReplaceSelected( aFilter.makeStringAndClear() ); + } + + } maOKBtn.Enable( maPasswordED.GetText().Len() >= mnMinLen ); return 0; } @@ -88,7 +113,8 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText maConfirmStr ( SfxResId( STR_PASSWD_CONFIRM ) ), mnMinLen ( 5 ), - mnExtras ( 0 ) + mnExtras ( 0 ), + mbAsciiOnly ( false ) { FreeResource(); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index c5fcba6dc686..584dd488da56 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -2407,7 +2407,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages() return; // let the families collection update the images - sal_Bool bIsHighContrast = m_pFloat->GetDisplayBackground().GetColor().IsDark(); + sal_Bool bIsHighContrast = m_pFloat->GetSettings().GetStyleSettings().GetHighContrastMode(); pStyleFamilies->updateImages( *m_pStyleFamiliesId, bIsHighContrast ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL ); // and set the new images on our toolbox @@ -2424,7 +2424,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages() void SfxTemplateDialog_Impl::updateNonFamilyImages() { m_aActionTbR.SetImageList( ImageList( SfxResId( - m_pFloat->GetDisplayBackground().GetColor().IsDark() ? IMG_LST_STYLE_DESIGNER_HC + m_pFloat->GetSettings().GetStyleSettings().GetHighContrastMode() ? IMG_LST_STYLE_DESIGNER_HC : DLG_STYLE_DESIGNER ) ) ); } |