[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - cui/source
cui/source/dialogs/SpellDialog.cxx | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) New commits: commit 5752f97d6dee7ffe7ac6a311802ab9fa3212dcb5 Author: Jan Holesovsky ke...@collabora.com Date: Thu Dec 18 21:42:13 2014 +0100 spell dialog: Make [Close] work in protected documents with editable fields. We have to call ToggleChildWindow directly; calling SfxDispatcher's Execute() does not work here when we are in a document with protected section - in that case, the cursor can move from the editable field to the protected area, and the slots get disabled because of SW_DISABLE_ON_PROTECTED_CURSOR (see FN_SPELL_GRAMMAR_DIALOG in .sdi). Change-Id: I1c310c028aaaf774431d0b1e6bba10e901a8166d Reviewed-on: https://gerrit.libreoffice.org/13836 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 68124b5..398dd26 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -738,9 +738,13 @@ IMPL_LINK_NOARG(SpellDialog, IgnoreHdl) bool SpellDialog::Close() { -GetBindings().GetDispatcher()- -Execute(rParent.GetType(), -SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD); +// We have to call ToggleChildWindow directly; calling SfxDispatcher's +// Execute() does not work here when we are in a document with protected +// section - in that case, the cursor can move from the editable field to +// the protected area, and the slots get disabled because of +// SW_DISABLE_ON_PROTECTED_CURSOR (see FN_SPELL_GRAMMAR_DIALOG in .sdi). +SfxViewFrame::Current()-ToggleChildWindow(rParent.GetType()); + return true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - cui/source
cui/source/tabpages/autocdlg.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4d782fe3ba2f40804cad202d88ea64fde1396032 Author: Julien Nabet serval2...@yahoo.fr Date: Mon Dec 22 23:57:50 2014 +0100 Resolves fdo#87581: Pb to delete words with 2 initials in Autocorr Except Cherry-picked from a5811c70bb443190a76a52585580659f96a58a04 Change-Id: I49b97c5c1546f0410542cb67540c5507c95bec98 Reviewed-on: https://gerrit.libreoffice.org/13619 Reviewed-by: Michael Stahl mst...@redhat.com Tested-by: Michael Stahl mst...@redhat.com diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 1ac62ea..b8de639 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -1489,7 +1489,7 @@ bool OfaAutocorrExceptPage::FillItemSet( SfxItemSet ) for( i = nCount; i; ) { OUString aString = (*pWrdList)[ --i ]; -if( USHRT_MAX == m_pDoubleCapsLB-GetEntryPos(aString) ) +if( LISTBOX_ENTRY_NOTFOUND == m_pDoubleCapsLB-GetEntryPos(aString) ) { pWrdList-erase(i); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - cui/source
cui/source/dialogs/colorpicker.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 86f38a7af647a154ecfe12b90500e6c060793cf2 Author: Caolán McNamara caol...@redhat.com Date: Wed Nov 26 15:24:20 2014 + Resolves: fdo#85590 'Pick a color' circle location is incorrect when opened Change-Id: I18a00d0ab7acc30f4751c0e19cceffefdce90474 (cherry picked from commit 7716d86f46dea72bd0e99f7074f718d558e88f49) (cherry picked from commit 037e65cbdd76dc06593a43adbd72427c8765736c) Reviewed-on: https://gerrit.libreoffice.org/13135 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Tested-by: Miklos Vajna vmik...@collabora.co.uk diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx index a44c4c0..644cd73 100644 --- a/cui/source/dialogs/colorpicker.cxx +++ b/cui/source/dialogs/colorpicker.cxx @@ -623,6 +623,7 @@ void ColorFieldControl::Paint( const Rectangle rRect ) void ColorFieldControl::Resize() { UpdateBitmap(); +UpdatePosition(); Control::Resize(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - cui/source
cui/source/customize/cfg.cxx | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) New commits: commit e7f67732cfb9904b7667cf3e32097ea2c6ea0597 Author: Maxim Monastirsky momonas...@gmail.com Date: Tue Nov 18 01:24:31 2014 +0200 fdo#80280 Don't add items with no bitmaps (cherry picked from commit cf26921658c0905a4d2dda13f91e3db99c76ade6) Conflicts: cui/source/customize/cfg.cxx Change-Id: I625aff5d2dcae0b1491fa77b04605d4579ec8530 Reviewed-on: https://gerrit.libreoffice.org/13068 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 18181ee..6c64a2dd 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -4907,17 +4907,20 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, if ( graphics.getLength() 0 ) { Image img = Image( graphics[ 0 ] ); -aTbSymbol.InsertItem( nId, img, pConstIter-first ); +if ( !img.GetBitmapEx().IsEmpty() ) +{ +aTbSymbol.InsertItem( nId, img, pConstIter-first ); -uno::Reference graphic::XGraphic xGraphic = graphics[ 0 ]; +uno::Reference graphic::XGraphic xGraphic = graphics[ 0 ]; -if ( xGraphic.is() ) -xGraphic-acquire(); +if ( xGraphic.is() ) +xGraphic-acquire(); -aTbSymbol.SetItemData( -nId, static_cast void * ( xGraphic.get() ) ); +aTbSymbol.SetItemData( +nId, static_cast void * ( xGraphic.get() ) ); -++nId; +++nId; +} } ++pConstIter; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - cui/source
cui/source/customize/cfg.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit ecd8a6e8fad10c059ecee92dd769915ab90e40ee Author: Noel Grandin n...@peralex.com Date: Mon Nov 10 12:16:41 2014 +0200 fdo#76658 fix bad conversion of old-style UNO service.. in my commit 0394cb37a2d378511f265004b285fd93df37e5ca fdo#46808, Convert ui::ImageManager to new style Change-Id: I77d3189723403221e7388969b1eb892a244b90af Signed-off-by: Stephan Bergmann sberg...@redhat.com (cherry picked from commit 00ddedcb477ed09b5649e816b629234d5689b861) Reviewed-on: https://gerrit.libreoffice.org/13069 Reviewed-by: Maxim Monastirsky momonas...@gmail.com Tested-by: Maxim Monastirsky momonas...@gmail.com diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 5a591ef..18181ee 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -4833,6 +4833,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, aProp[ 1 ] = aPropValue; m_xImportedImageManager = css::ui::ImageManager::create( xComponentContext ); +m_xImportedImageManager-initialize(aProp); ImageInfo mImageInfo; uno::Sequence OUString names; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - cui/source svl/source
cui/source/tabpages/numfmt.cxx | 18 ++--- svl/source/numbers/zformat.cxx | 56 +++-- 2 files changed, 47 insertions(+), 27 deletions(-) New commits: commit f3e7a49e2c7ea235b724c157f8d05a23c675913a Author: Eike Rathke er...@redhat.com Date: Mon Aug 18 14:09:20 2014 +0200 prevent out-of-bounds string access ... while entering a * star symbol format code and there's no fill character following the * yet, for example xxx* (cherry picked from commit 839cc63e7d1b78c56e04bafb46037e898ce2c455) more out-of-bounds string accesses (cherry picked from commit 349c93e0f5c9f231b2ff6854fcb795ca5881ca2d) Change-Id: I006f125ceefccba6a95ea033fd434d98e5d4f1c2 Reviewed-on: https://gerrit.libreoffice.org/10994 Reviewed-by: David Tardon dtar...@redhat.com Tested-by: David Tardon dtar...@redhat.com diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 52d2356..d4af55c 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -112,9 +112,21 @@ void SvxNumberPreview::NotifyChange( const OUString rPrevStr, mnPos = aPrevStr.indexOf( 0x1B ); if ( mnPos != -1 ) { -mnChar = aPrevStr[ mnPos + 1 ]; -// delete placeholder and char to repeat -aPrevStr = aPrevStr.replaceAt( mnPos, 2, ); +// Right during user input the star symbol is the very +// last character before the user enters another one. +if (mnPos aPrevStr.getLength() - 1) +{ +mnChar = aPrevStr[ mnPos + 1 ]; +// delete placeholder and char to repeat +aPrevStr = aPrevStr.replaceAt( mnPos, 2, ); +} +else +{ +// delete placeholder +aPrevStr = aPrevStr.replaceAt( mnPos, 1, ); +// do not attempt to draw a 0 fill character +mnPos = -1; +} } svtools::ColorConfig aColorConfig; Color aWindowTextColor( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ); diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index ef94a23..a48c029 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -2241,6 +2241,30 @@ short SvNumberformat::ImpCheckCondition(double fNumber, } } +static bool lcl_appendStarFillChar( OUStringBuffer rBuf, const OUString rStr ) +{ +// Right during user input the star symbol is the very +// last character before the user enters another one. +if (rStr.getLength() 1) +{ +rBuf.append((sal_Unicode) 0x1B); +rBuf.append(rStr[1]); +return true; +} +return false; +} + +static bool lcl_insertStarFillChar( OUStringBuffer rBuf, sal_Int32 nPos, const OUString rStr ) +{ +if (rStr.getLength() 1) +{ +rBuf.insert( nPos, rStr[1]); +rBuf.insert( nPos, (sal_Unicode) 0x1B); +return true; +} +return false; +} + bool SvNumberformat::GetOutputString(const OUString sString, OUString OutString, Color** ppColor) @@ -2273,9 +2297,7 @@ bool SvNumberformat::GetOutputString(const OUString sString, case NF_SYMBOLTYPE_STAR: if( bStarFlag ) { -sOutBuff.append((sal_Unicode) 0x1B); -sOutBuff.append(rInfo.sStrArray[i][1]); -bRes = true; +bRes = lcl_appendStarFillChar( sOutBuff, rInfo.sStrArray[i]); } break; case NF_SYMBOLTYPE_BLANK: @@ -2588,9 +2610,7 @@ bool SvNumberformat::GetOutputString(double fNumber, case NF_SYMBOLTYPE_STAR: if( bStarFlag ) { -sBuff.append((sal_Unicode) 0x1B); -sBuff.append(rInfo.sStrArray[i][1]); -bRes = true; +bRes = lcl_appendStarFillChar( sBuff, rInfo.sStrArray[i]); } break; case NF_SYMBOLTYPE_BLANK: @@ -3214,9 +3234,7 @@ bool SvNumberformat::ImpGetTimeOutput(double fNumber, case NF_SYMBOLTYPE_STAR: if( bStarFlag ) { -sBuff.append((sal_Unicode)0x1B); -sBuff.append(rInfo.sStrArray[i][1]); -bRes = true; +bRes = lcl_appendStarFillChar( sBuff, rInfo.sStrArray[i]); } break; case NF_SYMBOLTYPE_BLANK: @@ -3712,9 +3730,7 @@ bool SvNumberformat::ImpGetDateOutput(double fNumber, case NF_SYMBOLTYPE_STAR: if( bStarFlag ) { -sBuff.append((sal_Unicode) 0x1B); -sBuff.append(rInfo.sStrArray[i][1]); -bRes = true; +bRes = lcl_appendStarFillChar( sBuff, rInfo.sStrArray[i]);
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - cui/source
cui/source/tabpages/numfmt.cxx | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) New commits: commit 2d52a907e26c306fa6738766409df2d7760fe3c4 Author: Eike Rathke er...@redhat.com Date: Fri Aug 15 22:41:58 2014 +0200 fdo#48110 disable the Automatically currency unless already used This disables the Automatically currency listbox entry in the number formats dialog and makes it unselectable, unless such currency format was already used at the current position of a loaded document. Getting completely rid of the listbox entry if not used is more cumbersome as the positions are tied to the list entries in SvxNumberFormatShell::aCurCurrencyList, but at least the disabled entry prevents accidental or ill intended selection of that awkward format. Change-Id: I16f3e88feede34e3f83afb108f253fb53d82d34d (cherry picked from commit 2e3d7c742a1c1253c4bb2af1c3d1b1506d2e7af4) Reviewed-on: https://gerrit.libreoffice.org/10939 Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 76a7743..52d2356 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -531,7 +531,15 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet rSet ) pNumFmtShell-GetInitSettings( nCatLbSelPos, eLangType, nFmtLbSelPos, aFmtEntryList, aPrevString, pDummy ); - m_pLbCurrency-SelectEntryPos((sal_Int32)pNumFmtShell-GetCurrencySymbol()); +if (nCatLbSelPos==CAT_CURRENCY) +{ +sal_Int32 nPos = pNumFmtShell-GetCurrencySymbol(); +if (nPos == 0) +// Enable Automatically if currently used so it is selectable. +m_pLbCurrency-SetEntryFlags( nPos, 0); + +m_pLbCurrency-SelectEntryPos(nPos); +} nFixedCategory=nCatLbSelPos; if(bOneAreaFlag) @@ -1680,6 +1688,11 @@ void SvxNumberFormatTabPage::FillCurrencyBox() for(std::vectorOUString::iterator i = aList.begin() + 1;i != aList.end(); ++i) m_pLbCurrency-InsertEntry(*i); +// Initially disable the Automatically entry. First ensure that nothing +// is selected, else if the to be disabled (first) entry was selected it +// would be sticky when disabled and could not be deselected! +m_pLbCurrency-SetNoSelection(); +m_pLbCurrency-SetEntryFlags( 0, LISTBOX_ENTRY_FLAG_DISABLE_SELECTION | LISTBOX_ENTRY_FLAG_DRAW_DISABLED); m_pLbCurrency-SelectEntryPos(nSelPos); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - cui/source
cui/source/options/optaboutconfig.cxx | 26 -- cui/source/options/optaboutconfig.hxx | 12 2 files changed, 16 insertions(+), 22 deletions(-) New commits: commit 458e7220b08886b4072b1093e9ebdbfef3fe9ee7 Author: Caolán McNamara caol...@redhat.com Date: Wed Jul 9 13:46:00 2014 +0100 Resolves: fdo#73806 reduce the size-request of the expert config dialog the optimal size was set to be 1024x800, reduce this down to effectively the same size as the options dialog itself. This dialog just isn't ever going to be right given the huge length of the strings and the number of strings. We need something more like a file picker dialog view here Change-Id: I019e951601c3df769a609b8b439b535b6d5e254f (cherry picked from commit 877aa0e1e879b057027029c1ceed07f90b00b0d3) Reviewed-on: https://gerrit.libreoffice.org/10182 Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx index ff39661..8bc67e8 100644 --- a/cui/source/options/optaboutconfig.cxx +++ b/cui/source/options/optaboutconfig.cxx @@ -124,21 +124,16 @@ Size CuiCustomMultilineEdit::GetOptimalSize() const return LogicToPixel(Size(150, GetTextHeight()), MAP_APPFONT); } -Size CuiAboutConfigTabPage::GetOptimalSize() const -{ -return LogicToPixel(Size(1024,800),MAP_APPFONT); -} - CuiAboutConfigTabPage::CuiAboutConfigTabPage( Window* pParent/*, const SfxItemSet rItemSet*/ ) : ModalDialog( pParent, AboutConfig, cui/ui/aboutconfigdialog.ui), m_pPrefCtrl( getSvSimpleTableContainer(preferences) ), m_pResetBtn( getPushButton(reset) ), m_pEditBtn( getPushButton(edit) ), m_vectorOfModified(), -m_pPrefBox( new OptHeaderTabListBox( *m_pPrefCtrl, - WB_SCROLL | WB_HSCROLL | WB_VSCROLL ) ) +m_pPrefBox( new SvSimpleTable(*m_pPrefCtrl, + WB_SCROLL | WB_HSCROLL | WB_VSCROLL ) ) { -Size aControlSize(200,200); +Size aControlSize(LogicToPixel(Size(385, 230), MAP_APPFONT)); m_pPrefCtrl-set_width_request(aControlSize.Width()); m_pPrefCtrl-set_height_request(aControlSize.Height()); @@ -152,11 +147,14 @@ CuiAboutConfigTabPage::CuiAboutConfigTabPage( Window* pParent/*, const SfxItemSe rBar.InsertItem( ITEMID_TYPE, getFixedText(type)-GetText(), 0, HIB_LEFT | HIB_VCENTER ); rBar.InsertItem( ITEMID_VALUE, getFixedText(value)-GetText(), 0, HIB_LEFT | HIB_VCENTER ); -long aTabs[] = {4,900,50,50,50};//TODO: Not works correctly hardcoded for now. +long aTabs[] = {4,0,0,0,0}; + +float fWidth = approximate_char_width(); -aTabs[2] += aTabs[1] + rBar.GetTextWidth(rBar.GetItemText(1)); -aTabs[3] += aTabs[2] + 160; //rBar.GetTextWidth(rBar.GetItemText(2)); -aTabs[4] += aTabs[3] + 40; //rBar.GetTextWidth(rBar.GetItemText(3)); +aTabs[1] = 0; +aTabs[2] = aTabs[1] + fWidth * 65; +aTabs[3] = aTabs[2] + fWidth * 20; +aTabs[4] = aTabs[3] + fWidth * 8; m_pPrefBox-SetTabs(aTabs, MAP_PIXEL); } @@ -174,7 +172,7 @@ void CuiAboutConfigTabPage::InsertEntry(const OUString rProp, const OUString r m_pPrefBox-Insert( pEntry ); } -void CuiAboutConfigTabPage::Reset(/* const SfxItemSet*/ ) +void CuiAboutConfigTabPage::Reset() { m_pPrefBox-Clear(); @@ -187,7 +185,7 @@ void CuiAboutConfigTabPage::Reset(/* const SfxItemSet*/ ) m_pPrefBox-SetUpdateMode(true); } -bool CuiAboutConfigTabPage::FillItemSet(/* SfxItemSet*/ ) +bool CuiAboutConfigTabPage::FillItemSet() { bool bModified = false; diff --git a/cui/source/options/optaboutconfig.hxx b/cui/source/options/optaboutconfig.hxx index 6761e3c..72ce9d9 100644 --- a/cui/source/options/optaboutconfig.hxx +++ b/cui/source/options/optaboutconfig.hxx @@ -37,7 +37,6 @@ public: virtual void KeyInput( const KeyEvent rKeyEvent ) SAL_OVERRIDE; virtual Size GetOptimalSize() const SAL_OVERRIDE; -//void setBehaviour( bool bNumeric, int nLengthLimit); }; class CuiAboutConfigTabPage : public ModalDialog @@ -48,7 +47,7 @@ private: PushButton* m_pEditBtn; std::vector boost::shared_ptr Prop_Impl m_vectorOfModified; -boost::scoped_ptr svx::OptHeaderTabListBox m_pPrefBox; +boost::scoped_ptr SvSimpleTable m_pPrefBox; void AddToModifiedVector( const boost::shared_ptr Prop_Impl rProp ); std::vector OUString commaStringToSequence( const OUString rCommaSepString ); @@ -57,15 +56,12 @@ private: DECL_LINK( ResetBtnHdl_Impl, void * ); public: - //static ModalDialog* Create( Window* pParent, const SfxItemSet rItemset ); - CuiAboutConfigTabPage( Window* pParent/*, const SfxItemSet rItemSet*/ ); + CuiAboutConfigTabPage(Window* pParent); void InsertEntry(const OUString rProp, const OUString rStatus, const OUString rType, const OUString
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - cui/source cui/uiconfig include/svtools include/svx svtools/source svx/source
cui/source/inc/chardlg.hxx |2 cui/source/tabpages/chardlg.cxx | 24 ++ cui/uiconfig/ui/charnamepage.ui |4 - include/svtools/langtab.hxx |1 include/svx/langbox.hxx | 16 ++- svtools/source/misc/langtab.cxx | 14 ++ svx/source/dialog/langbox.cxx | 90 7 files changed, 147 insertions(+), 4 deletions(-) New commits: commit aca222ee87826eb99554dba8fcf22e0cf7c718e0 Author: Eike Rathke er...@redhat.com Date: Thu May 22 12:28:02 2014 +0200 switch the Western language list box to SvxLanguageComboBox This allows the user to assign an arbitrary (but valid) BCP 47 language tag to a portion of text, so that customized spell-checkers or other language-dependent tools can be used without the need to wait for LibreOffice to add yet another language to the list in the next release. +bool SvtLanguageTable::HasLanguageType() (cherry picked from commit 2a8eff589a53c8dd65e18d7a9d11cdb98a937e68) + SvxLanguageComboBox EditModifyHdl(), SaveEditedAsEntry() (cherry picked from commit 29c024afbe6a46459e37c5ceec510de1cd0ca7c8) handle SvxLanguageComboBox edit (cherry picked from commit 1aad7628dcd7fd14d48814d00c3d04e4ec0c59d5) finally switch the Western language list box to SvxLanguageComboBox (cherry picked from commit dbe8b3b6d4f2d2cc2e8c702b78034e9013f71e8f) advance start of edit selection on a matching entry ... to allow continuous typing. (cherry picked from commit fe2b8ef18b11b226fddd1cf3fc7f9133426a1b1a) Change-Id: Id57eb51b69e50be78f85d19a7b3623c1acdf6509 Reviewed-on: https://gerrit.libreoffice.org/9447 Reviewed-by: Miklos Vajna vmik...@collabora.co.uk Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Reviewed-by: Kohei Yoshida libreoff...@kohei.us Tested-by: Kohei Yoshida libreoff...@kohei.us diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index d90c2cb..69b46c8 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -86,7 +86,7 @@ private: FixedText* m_pWestFontSizeFT; FontSizeBox*m_pWestFontSizeLB; FixedText* m_pWestFontLanguageFT; -SvxLanguageBox* m_pWestFontLanguageLB; +SvxLanguageComboBox* m_pWestFontLanguageLB; FixedText* m_pWestFontTypeFT; VclContainer* m_pEastFrame; diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 1f0e58560..f36ae8e 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1086,6 +1086,30 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet rSet, LanguageGroup eLangGrp } nWhich = GetWhich( nSlot ); pOld = GetOldItem( rSet, nSlot ); + +// For language list boxes acting as ComboBox, check for, add and select an +// edited entry. +SvxLanguageComboBox* pLangComboBox = dynamic_castSvxLanguageComboBox*(pLangBox); +if (pLangComboBox) +{ +switch (pLangComboBox-GetEditedAndValid()) +{ +case SvxLanguageComboBox::EDITED_NO: +; // nothing to do +break; +case SvxLanguageComboBox::EDITED_VALID: +{ +const sal_Int32 nPos = pLangComboBox-SaveEditedAsEntry(); +if (nPos != COMBOBOX_ENTRY_NOTFOUND) +pLangComboBox-SelectEntryPos( nPos); +} +break; +case SvxLanguageComboBox::EDITED_INVALID: +pLangComboBox-SelectEntryPos( pLangComboBox-GetSavedValueLBB()); +break; +} +} + sal_Int32 nLangPos = pLangBox-GetSelectEntryPosLBB(); LanguageType eLangType = (LanguageType)(sal_uLong)pLangBox-GetEntryDataLBB( nLangPos ); diff --git a/cui/uiconfig/ui/charnamepage.ui b/cui/uiconfig/ui/charnamepage.ui index 25c67f1..6205dfd 100644 --- a/cui/uiconfig/ui/charnamepage.ui +++ b/cui/uiconfig/ui/charnamepage.ui @@ -54,7 +54,7 @@ /packing /child child - object class=svxcorelo-SvxLanguageBox id=westlanglb-nocjk + object class=svxcorelo-SvxLanguageComboBox id=westlanglb-nocjk property name=visibleTrue/property property name=can_focusFalse/property property name=halignstart/property @@ -342,7 +342,7 @@ /packing /child child - object class=svxcorelo-SvxLanguageBox id=westlanglb-cjk + object class=svxcorelo-SvxLanguageComboBox id=westlanglb-cjk property name=visibleTrue/property property name=can_focusFalse/property property name=hexpandTrue/property diff --git a/include/svtools/langtab.hxx b/include/svtools/langtab.hxx index 0034873..56d0618
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - cui/source
cui/source/options/optgdlg.cxx |6 +- cui/source/options/optgdlg.hxx |2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) New commits: commit d11969189092d35c13cd421c57f71ca655ea3d19 Author: Eike Rathke er...@redhat.com Date: Fri May 23 18:06:52 2014 +0200 do not store invalid date acceptance patterns in configuration Change-Id: I78cd8b304db2243fd105d4b13421b6ea0347e042 (cherry picked from commit e0480c81a956751e48f8ef36a41c3062c1bed345) diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 81cf5d5..7b6f947 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1298,7 +1298,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet rSet ) // Configured date acceptance patterns, for example Y-M-D;M-D or empty for // locale default. -if (m_pDatePatternsED-IsValueChangedFromSaved()) +if (m_bDatePatternsValid m_pDatePatternsED-IsValueChangedFromSaved()) pLangConfig-aSysLocaleOptions.SetDatePatternsConfigString( m_pDatePatternsED-GetText()); SfxObjectShell* pCurrentDocShell = SfxObjectShell::Current(); @@ -1463,6 +1463,8 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet rSet ) const LocaleDataWrapper rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); aDatePatternsString = lcl_getDatePatternsConfigString( rLocaleWrapper); } +// Let's assume patterns are valid at this point. +m_bDatePatternsValid = true; m_pDatePatternsED-SetText( aDatePatternsString); bReadonly = pLangConfig-aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::E_DATEPATTERNS); m_pDatePatternsED-Enable(!bReadonly); @@ -1659,6 +1661,7 @@ IMPL_LINK( OfaLanguagesTabPage, LocaleSettingHdl, SvxLanguageBox*, pBox ) // update the date acceptance patterns OUString aDatePatternsString = lcl_getDatePatternsConfigString( aLocaleWrapper); +m_bDatePatternsValid = true; m_pDatePatternsED-SetText( aDatePatternsString); return 0; @@ -1770,6 +1773,7 @@ IMPL_LINK( OfaLanguagesTabPage, DatePatternsHdl, Edit*, pEd ) pEd-SetControlForeground( ::Color( RGB_COLORDATA( 0xf0, 0, 0))); #endif } +m_bDatePatternsValid = bValid; return 0; } diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index e015f4c..61b2228 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -157,6 +157,8 @@ class OfaLanguagesTabPage : public SfxTabPage OUStringm_sUserLocaleValue; OUStringm_sSystemDefaultString; +boolm_bDatePatternsValid; + DECL_LINK( SupportHdl, CheckBox* ) ; DECL_LINK( LocaleSettingHdl, SvxLanguageBox* ) ; DECL_LINK( DatePatternsHdl, Edit* ) ; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits