summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <cmc@openoffice.org>2010-08-03 10:25:58 +0100
committerCaolán McNamara <cmc@openoffice.org>2010-08-03 10:25:58 +0100
commit57184a3da8bf28b755bfa5e38cb83ac1c742e69c (patch)
tree80ed8ba717c415f5ab709e627a387a31c7534baa /sw/source/ui
parent644b523ac9ef526aceaa7ba62c14b3d56d7e4ea1 (diff)
parentdc3e4032cdb647f68e1490239fa0a8341f946369 (diff)
cmcfixes77: merge with DEV300 m86
Diffstat (limited to 'sw/source/ui')
-rw-r--r--[-rwxr-xr-x]sw/source/ui/app/docsh.cxx2
-rw-r--r--sw/source/ui/docvw/SidebarTxtControlAcc.cxx2
-rw-r--r--sw/source/ui/docvw/edtwin.cxx2
-rw-r--r--sw/source/ui/lingu/olmenu.cxx26
-rwxr-xr-x[-rw-r--r--]sw/source/ui/ribbar/inputwin.cxx2
5 files changed, 22 insertions, 12 deletions
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 3c14ed6c46f0..c7ee43255f3b 100755..100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -1399,7 +1399,7 @@ bool SwDocShell::SetProtectionPassword( const String &rNewPassword )
IDocumentRedlineAccess* pIDRA = pWrtShell->getIDocumentRedlineAccess();
Sequence< sal_Int8 > aPasswd = pIDRA->GetRedlinePassword();
if (pArgs && SFX_ITEM_SET == pArgs->GetItemState( FN_REDLINE_PROTECT, FALSE, &pItem )
- && ((SfxBoolItem*)pItem)->GetValue() == aPasswd.getLength() > 0)
+ && ((SfxBoolItem*)pItem)->GetValue() == (aPasswd.getLength() > 0))
return false;
bool bRes = false;
diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
index 8b0f0293367c..bd613fc7c031 100644
--- a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
@@ -80,7 +80,7 @@ class SidebarTextEditSource : public SvxEditSource,
SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl )
: SvxEditSource()
, mrSidebarTxtControl( rSidebarTxtControl )
- , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), NULL )
+ , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), FALSE )
, mViewForwarder( *(rSidebarTxtControl.GetTextView()) )
{
if ( mrSidebarTxtControl.GetTextView() )
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index e2e59e17831e..7b5741316cbb 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -2261,7 +2261,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
BOOL bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh );
- BOOL bRunNext = pACorr->HasRunNext();
+ BOOL bRunNext = pACorr && pACorr->HasRunNext();
if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) &&
pACfg->IsAutoFmtByInput() &&
(( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) &&
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index 934cfc19e22b..281e3ce3fabb 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -398,7 +398,9 @@ bGrammarResults(false)
{
DBG_ASSERT(xSpellAlt.is(), "no spelling alternatives available");
- CreateAutoMnemonics();
+// CreateAutoMnemonics();
+ SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
+
nCheckedLanguage = LANGUAGE_NONE;
if (xSpellAlt.is())
{
@@ -471,7 +473,8 @@ bGrammarResults(false)
}
pMenu = GetPopupMenu(MN_ADD_TO_DIC);
- pMenu->CreateAutoMnemonics();
+// pMenu->CreateAutoMnemonics();
+ pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); //! necessary to retrieve the correct dictionary name in 'Execute' below
bEnable = FALSE; // enable MN_ADD_TO_DIC?
uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
if (xDicList.is())
@@ -572,7 +575,6 @@ bGrammarResults(false)
//////////////////////////////////////////////////////////////////////////////////
RemoveDisabledEntries( TRUE, TRUE );
- SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
}
/*--------------------------------------------------------------------------
@@ -599,7 +601,8 @@ aInfo16( SW_RES(IMG_INFO_16) )
InsertItem( MN_SHORT_COMMENT, aMessageText, MIB_NOSELECT, nPos++ );
SetItemImage( MN_SHORT_COMMENT, aInfo16 );
- CreateAutoMnemonics();
+// CreateAutoMnemonics();
+ SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
InsertSeparator( nPos++ );
sal_Int32 nStringCount = aSuggestions.getLength();
@@ -705,7 +708,6 @@ aInfo16( SW_RES(IMG_INFO_16) )
//////////////////////////////////////////////////////////////////////////////////
RemoveDisabledEntries( TRUE, TRUE );
- SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
}
/*--------------------------------------------------------------------------
@@ -821,12 +823,18 @@ void SwSpellPopup::Execute( USHORT nId )
else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END)
{
OUString aWord( xSpellAlt->getWord() );
- USHORT nDicIdx = nId - MN_DICTIONARIES_START;
- DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" );
+// DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" );
+
+ PopupMenu *pMenu = GetPopupMenu(MN_ADD_TO_DIC);
+ String aDicName ( pMenu->GetItemText(nId) );
+
+ uno::Reference< linguistic2::XDictionary > xDic;
+ uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
+ if (xDicList.is())
+ xDic = xDicList->getDictionaryByName( aDicName );
- if (nDicIdx < aDics.getLength())
+ if (xDic.is())
{
- uno::Reference< linguistic2::XDictionary > xDic = aDics.getConstArray()[nDicIdx];
INT16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, FALSE, aEmptyStr, LANGUAGE_NONE );
// save modified user-dictionary if it is persistent
uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY );
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx
index c14f91632a4c..9ee5a6e2ffa3 100644..100755
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
@@ -80,6 +80,8 @@ SwInputWindow::SwInputWindow( Window* pParent, SfxBindings* pBind )
FreeResource();
+ aEdit.SetSizePixel( aEdit.CalcMinimumSize() );
+
SfxImageManager* pManager = SfxImageManager::GetImageManager( SW_MOD() );
pManager->RegisterToolBox(this);