basctl/UIConfig_basicide.mk | 1 basctl/inc/helpid.hrc | 1 basctl/source/dlged/dlgresid.src | 15 + basctl/source/dlged/managelang.cxx | 109 ++------ basctl/source/dlged/managelang.hrc | 96 ------- basctl/source/dlged/managelang.src | 88 ------ basctl/source/inc/dlgresid.hrc | 6 basctl/source/inc/managelang.hxx | 15 - basctl/uiconfig/basicide/ui/managelanguages.ui | 198 +++++++++++++++ filter/source/graphicfilter/idxf/dxfentrd.cxx | 5 i18npool/inc/inputsequencechecker.hxx | 6 i18npool/source/inputchecker/inputsequencechecker.cxx | 4 i18npool/source/inputchecker/inputsequencechecker_hi.cxx | 2 i18npool/source/inputchecker/inputsequencechecker_th.cxx | 2 include/svx/galmisc.hxx | 10 reportdesign/source/ui/dlg/GroupsSorting.cxx | 13 sax/source/expatwrap/xml2utf.cxx | 2 sc/source/ui/miscdlgs/highred.cxx | 5 svx/source/gallery2/galtheme.cxx | 4 sw/source/core/docnode/ndcopy.cxx | 8 sw/source/core/fields/docufld.cxx | 2 sw/source/core/swg/swblocks.cxx | 4 sw/source/core/table/swtable.cxx | 20 - sw/source/core/text/porfld.cxx | 2 sw/source/core/text/porfly.cxx | 3 sw/source/core/text/pormulti.cxx | 4 sw/source/core/text/portxt.cxx | 4 tools/source/fsys/urlobj.cxx | 2 vcl/source/window/builder.cxx | 1 29 files changed, 314 insertions(+), 318 deletions(-)
New commits: commit 55c413b9cb2692b784c6c43a519be08146438237 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 11:55:18 2014 +0000 edit->changes->show has empty filter settings Change-Id: I98999c0f402cf84d89b3a1167480dc27fdbc2be9 diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx index a1d7c71..02538d5 100644 --- a/sc/source/ui/miscdlgs/highred.cxx +++ b/sc/source/ui/miscdlgs/highred.cxx @@ -63,6 +63,10 @@ ScHighlightChgDlg::ScHighlightChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Wind { FreeResource(); + aFilterCtr.HideRange(false); + Size aCtrSize(LogicToPixel(Size(261 , 86), MAP_APPFONT)); + aFilterCtr.SetSizePixel(aCtrSize); + Point aFlFilterPt( aFlFilter.GetPosPixel() ); aFlFilterPt.Y() += aFlFilter.GetSizePixel().Height(); aFilterCtr.SetPosPixel( aFlFilterPt ); @@ -72,7 +76,6 @@ ScHighlightChgDlg::ScHighlightChgDlg( SfxBindings* pB, SfxChildWindow* pCW, Wind aOkButton.SetClickHdl(LINK( this, ScHighlightChgDlg, OKBtnHdl)); aHighlightBox.SetClickHdl(LINK( this, ScHighlightChgDlg, HighlightHandle )); aFilterCtr.SetRefHdl(LINK( this, ScHighlightChgDlg, RefHandle )); - aFilterCtr.HideRange(false); aFilterCtr.Show(); SetDispatcherLock( true ); commit 281bdaaa0b2860ef2f2b08b1acb3f930f81cf020 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 10:31:42 2014 +0000 convert manage languages dialog to .ui Change-Id: I1a50f8715040e64758cf18bee8ca6ac1d04652c8 diff --git a/basctl/UIConfig_basicide.mk b/basctl/UIConfig_basicide.mk index ca9e9b5..567bb0c 100644 --- a/basctl/UIConfig_basicide.mk +++ b/basctl/UIConfig_basicide.mk @@ -37,6 +37,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/BasicIDE,\ basctl/uiconfig/basicide/ui/importlibdialog \ basctl/uiconfig/basicide/ui/libpage \ basctl/uiconfig/basicide/ui/managebreakpoints \ + basctl/uiconfig/basicide/ui/managelanguages \ basctl/uiconfig/basicide/ui/modulepage \ basctl/uiconfig/basicide/ui/newlibdialog \ basctl/uiconfig/basicide/ui/organizedialog \ diff --git a/basctl/inc/helpid.hrc b/basctl/inc/helpid.hrc index 433a167..e04f99c 100644 --- a/basctl/inc/helpid.hrc +++ b/basctl/inc/helpid.hrc @@ -45,7 +45,6 @@ #define HID_BASICIDE_WATCHWINDOW_LIST "BASCTL_HID_BASICIDE_WATCHWINDOW_LIST" #define HID_BASICIDE_STACKWINDOW_LIST "BASCTL_HID_BASICIDE_STACKWINDOW_LIST" -#define HID_BASICIDE_MANAGE_LANGUAGE "BASCTL_HID_BASICIDE_MANAGE_LANGUAGE" #define HID_BASICIDE_ADDNEW_LANGUAGE "BASCTL_HID_BASICIDE_ADDNEW_LANGUAGE" #endif diff --git a/basctl/source/dlged/dlgresid.src b/basctl/source/dlged/dlgresid.src index 9e394e6..d1c3db2 100644 --- a/basctl/source/dlged/dlgresid.src +++ b/basctl/source/dlged/dlgresid.src @@ -132,4 +132,19 @@ String RID_STR_BRWTITLE_MULTISELECT // ----------------------------------------------------------------------- +String RID_STR_DEF_LANG +{ + Text [ en-US ] = "[Default Language]" ; +}; + +String RID_STR_DELETE +{ + Text [ en-US ] = "~Delete" ; +}; + +String RID_STR_CREATE_LANG +{ + Text [ en-US ] = "<Press 'Add' to create language resources>" ; +}; + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index 21632c4..3150bc9 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -26,7 +26,6 @@ #include "dlgresid.hrc" #include "helpid.hrc" -#include "managelang.hrc" #include <com/sun/star/i18n/Boundary.hpp> #include <com/sun/star/i18n/WordType.hpp> @@ -80,23 +79,19 @@ namespace { } } -ManageLanguageDialog::ManageLanguageDialog( Window* pParent, boost::shared_ptr<LocalizationMgr> xLMgr ) : - ModalDialog( pParent, IDEResId( RID_DLG_MANAGE_LANGUAGE ) ), - m_aLanguageFT ( this, IDEResId( FT_LANGUAGE ) ), - m_aLanguageLB ( this, IDEResId( LB_LANGUAGE ) ), - m_aAddPB ( this, IDEResId( PB_ADD_LANG ) ), - m_aDeletePB ( this, IDEResId( PB_DEL_LANG ) ), - m_aMakeDefPB ( this, IDEResId( PB_MAKE_DEFAULT ) ), - m_aInfoFT ( this, IDEResId( FT_INFO ) ), - m_aBtnLine ( this, IDEResId( FL_BUTTONS ) ), - m_aHelpBtn ( this, IDEResId( PB_HELP ) ), - m_aCloseBtn ( this, IDEResId( PB_CLOSE ) ), - m_xLocalizationMgr ( xLMgr ), - m_sDefLangStr (IDE_RESSTR(STR_DEF_LANG)), - m_sDeleteStr (IDE_RESSTR(STR_DELETE)), - m_sCreateLangStr (IDE_RESSTR(STR_CREATE_LANG)) +ManageLanguageDialog::ManageLanguageDialog(Window* pParent, boost::shared_ptr<LocalizationMgr> xLMgr) + : ModalDialog(pParent, "ManageLanguagesDialog", "modules/BasicIDE/ui/managelanguages.ui") + , m_xLocalizationMgr(xLMgr) + , m_sDefLangStr(IDE_RESSTR(RID_STR_DEF_LANG)) + , m_sDeleteStr(IDE_RESSTR(RID_STR_DELETE)) + , m_sCreateLangStr(IDE_RESSTR(RID_STR_CREATE_LANG)) { - FreeResource(); + get(m_pLanguageLB, "treeview"); + m_pLanguageLB->set_height_request(m_pLanguageLB->GetTextHeight() * 10); + m_pLanguageLB->set_width_request(m_pLanguageLB->approximate_char_width() * 50); + get(m_pAddPB, "add"); + get(m_pDeletePB, "delete"); + get(m_pMakeDefPB, "default"); Init(); FillLanguageBox(); @@ -118,42 +113,12 @@ void ManageLanguageDialog::Init() sText = sText.replaceAll("$1", sLibName); SetText( sText ); // set handler - m_aAddPB.SetClickHdl( LINK( this, ManageLanguageDialog, AddHdl ) ); - m_aDeletePB.SetClickHdl( LINK( this, ManageLanguageDialog, DeleteHdl ) ); - m_aMakeDefPB.SetClickHdl( LINK( this, ManageLanguageDialog, MakeDefHdl ) ); - m_aLanguageLB.SetSelectHdl( LINK( this, ManageLanguageDialog, SelectHdl ) ); - - m_aLanguageLB.EnableMultiSelection( true ); - CalcInfoSize(); -} + m_pAddPB->SetClickHdl( LINK( this, ManageLanguageDialog, AddHdl ) ); + m_pDeletePB->SetClickHdl( LINK( this, ManageLanguageDialog, DeleteHdl ) ); + m_pMakeDefPB->SetClickHdl( LINK( this, ManageLanguageDialog, MakeDefHdl ) ); + m_pLanguageLB->SetSelectHdl( LINK( this, ManageLanguageDialog, SelectHdl ) ); -void ManageLanguageDialog::CalcInfoSize() -{ - OUString sInfoStr = m_aInfoFT.GetText(); - long nInfoWidth = m_aInfoFT.GetSizePixel().Width(); - long nLongWord = getLongestWordWidth( sInfoStr, m_aInfoFT ); - long nTxtWidth = m_aInfoFT.GetCtrlTextWidth( sInfoStr ) + nLongWord; - long nLines = ( nTxtWidth / nInfoWidth ) + 1; - if ( nLines > INFO_LINES_COUNT ) - { - Size aFTSize = m_aLanguageFT.GetSizePixel(); - Size aSize = m_aInfoFT.GetSizePixel(); - long nNewHeight = aFTSize.Height() * nLines; - long nDelta = nNewHeight - aSize.Height(); - aSize.Height() = nNewHeight; - m_aInfoFT.SetSizePixel( aSize ); - - aSize = m_aLanguageLB.GetSizePixel(); - aSize.Height() -= nDelta; - m_aLanguageLB.SetSizePixel( aSize ); - - Point aNewPos = m_aInfoFT.GetPosPixel(); - aNewPos.Y() -= nDelta; - m_aInfoFT.SetPosPixel( aNewPos ); - aNewPos = m_aMakeDefPB.GetPosPixel(); - aNewPos.Y() -= nDelta; - m_aMakeDefPB.SetPosPixel( aNewPos ); - } + m_pLanguageLB->EnableMultiSelection( true ); } void ManageLanguageDialog::FillLanguageBox() @@ -176,23 +141,23 @@ void ManageLanguageDialog::FillLanguageBox() { sLanguage += " " + m_sDefLangStr; } - sal_uInt16 nPos = m_aLanguageLB.InsertEntry( sLanguage ); - m_aLanguageLB.SetEntryData( nPos, new LanguageEntry( sLanguage, pLocale[i], bIsDefault ) ); + sal_uInt16 nPos = m_pLanguageLB->InsertEntry( sLanguage ); + m_pLanguageLB->SetEntryData( nPos, new LanguageEntry( sLanguage, pLocale[i], bIsDefault ) ); } } else - m_aLanguageLB.InsertEntry( m_sCreateLangStr ); + m_pLanguageLB->InsertEntry( m_sCreateLangStr ); } void ManageLanguageDialog::ClearLanguageBox() { - sal_uInt16 i, nCount = m_aLanguageLB.GetEntryCount(); + sal_uInt16 i, nCount = m_pLanguageLB->GetEntryCount(); for ( i = 0; i < nCount; ++i ) { - LanguageEntry* pEntry = (LanguageEntry*)( m_aLanguageLB.GetEntryData(i) ); + LanguageEntry* pEntry = (LanguageEntry*)( m_pLanguageLB->GetEntryData(i) ); delete pEntry; } - m_aLanguageLB.Clear(); + m_pLanguageLB->Clear(); } IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl) @@ -219,14 +184,14 @@ IMPL_LINK_NOARG(ManageLanguageDialog, DeleteHdl) aQBox.SetButtonText( RET_OK, m_sDeleteStr ); if ( aQBox.Execute() == RET_OK ) { - sal_uInt16 i, nCount = m_aLanguageLB.GetSelectEntryCount(); - sal_uInt16 nPos = m_aLanguageLB.GetSelectEntryPos(); + sal_uInt16 i, nCount = m_pLanguageLB->GetSelectEntryCount(); + sal_uInt16 nPos = m_pLanguageLB->GetSelectEntryPos(); // remove locales Sequence< Locale > aLocaleSeq( nCount ); for ( i = 0; i < nCount; ++i ) { - sal_uInt16 nSelPos = m_aLanguageLB.GetSelectEntryPos(i); - LanguageEntry* pEntry = (LanguageEntry*)( m_aLanguageLB.GetEntryData( nSelPos ) ); + sal_uInt16 nSelPos = m_pLanguageLB->GetSelectEntryPos(i); + LanguageEntry* pEntry = (LanguageEntry*)( m_pLanguageLB->GetEntryData( nSelPos ) ); if ( pEntry ) aLocaleSeq[i] = pEntry->m_aLocale; } @@ -235,10 +200,10 @@ IMPL_LINK_NOARG(ManageLanguageDialog, DeleteHdl) ClearLanguageBox(); FillLanguageBox(); // reset selection - nCount = m_aLanguageLB.GetEntryCount(); + nCount = m_pLanguageLB->GetEntryCount(); if ( nCount <= nPos ) nPos = nCount - 1; - m_aLanguageLB.SelectEntryPos( nPos ); + m_pLanguageLB->SelectEntryPos( nPos ); SelectHdl( NULL ); } return 1; @@ -246,8 +211,8 @@ IMPL_LINK_NOARG(ManageLanguageDialog, DeleteHdl) IMPL_LINK_NOARG(ManageLanguageDialog, MakeDefHdl) { - sal_uInt16 nPos = m_aLanguageLB.GetSelectEntryPos(); - LanguageEntry* pSelectEntry = (LanguageEntry*)( m_aLanguageLB.GetEntryData( nPos ) ); + sal_uInt16 nPos = m_pLanguageLB->GetSelectEntryPos(); + LanguageEntry* pSelectEntry = (LanguageEntry*)( m_pLanguageLB->GetEntryData( nPos ) ); if ( pSelectEntry && !pSelectEntry->m_bIsDefault ) { // set new default entry @@ -256,7 +221,7 @@ IMPL_LINK_NOARG(ManageLanguageDialog, MakeDefHdl) ClearLanguageBox(); FillLanguageBox(); // reset selection - m_aLanguageLB.SelectEntryPos( nPos ); + m_pLanguageLB->SelectEntryPos( nPos ); SelectHdl( NULL ); } @@ -265,14 +230,14 @@ IMPL_LINK_NOARG(ManageLanguageDialog, MakeDefHdl) IMPL_LINK_NOARG(ManageLanguageDialog, SelectHdl) { - sal_uInt16 nCount = m_aLanguageLB.GetEntryCount(); + sal_uInt16 nCount = m_pLanguageLB->GetEntryCount(); bool bEmpty = ( !nCount || - m_aLanguageLB.GetEntryPos( m_sCreateLangStr ) != LISTBOX_ENTRY_NOTFOUND ); - bool bSelect = ( m_aLanguageLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ); + m_pLanguageLB->GetEntryPos( m_sCreateLangStr ) != LISTBOX_ENTRY_NOTFOUND ); + bool bSelect = ( m_pLanguageLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND ); bool bEnable = ( !bEmpty && bSelect != false ); - m_aDeletePB.Enable( bEnable != false ); - m_aMakeDefPB.Enable( bEnable != false && nCount > 1 && m_aLanguageLB.GetSelectEntryCount() == 1 ); + m_pDeletePB->Enable( bEnable != false ); + m_pMakeDefPB->Enable( bEnable != false && nCount > 1 && m_pLanguageLB->GetSelectEntryCount() == 1 ); return 1; } diff --git a/basctl/source/dlged/managelang.hrc b/basctl/source/dlged/managelang.hrc deleted file mode 100644 index 929aee8..0000000 --- a/basctl/source/dlged/managelang.hrc +++ /dev/null @@ -1,96 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#ifndef BASCTL_MANAGELANG_HRC -#define BASCTL_MANAGELANG_HRC - -// Include ----------------------------------------------------------------------- - -#include <svtools/controldims.hrc> - -// Dialog Control Id's ----------------------------------------------------------- - -#define FT_LANGUAGE 1 -#define LB_LANGUAGE 2 -#define PB_ADD_LANG 3 -#define PB_DEL_LANG 4 -#define PB_MAKE_DEFAULT 5 -#define FT_INFO 6 -#define FL_BUTTONS 7 -#define PB_HELP 8 -#define PB_CLOSE 9 -#define STR_DEF_LANG 10 -#define STR_DELETE 11 -#define STR_CREATE_LANG 12 - -#define FT_DEF_LANGUAGE 1 -#define LB_DEF_LANGUAGE 2 -#define LB_ADD_LANGUAGE 3 -#define FT_DEF_INFO 4 -#define FL_DEF_BUTTONS 5 -#define PB_DEF_OK 6 -#define PB_DEF_CANCEL 7 -#define PB_DEF_HELP 8 - -// Metrics ----------------------------------------------------------------------- - -#define MANAGE_DLG_WIDTH 240 -#define MANAGE_DLG_HEIGHT 180 -#define INFO_LINES_COUNT 3 - -#define MANAGE_COL1 RSC_SP_DLG_INNERBORDER_LEFT -#define MANAGE_COL2 (MANAGE_DLG_WIDTH - RSC_SP_DLG_INNERBORDER_RIGHT - 2*RSC_CD_PUSHBUTTON_WIDTH - RSC_SP_CTRL_X) -#define MANAGE_COL3 (MANAGE_COL2 + RSC_CD_PUSHBUTTON_WIDTH + RSC_SP_CTRL_X) - -#define MANAGE_ROW1 RSC_SP_DLG_INNERBORDER_TOP -#define MANAGE_ROW2 (MANAGE_ROW1 + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y) -#define MANAGE_ROW3 (MANAGE_ROW2 + RSC_CD_PUSHBUTTON_HEIGHT + RSC_SP_CTRL_GROUP_Y) - -#define MANAGE_ROW7 (MANAGE_DLG_HEIGHT - RSC_SP_DLG_INNERBORDER_BOTTOM - RSC_CD_PUSHBUTTON_HEIGHT) -#define MANAGE_ROW6 (MANAGE_ROW7 - RSC_SP_FLGR_SPACE_Y - RSC_CD_FIXEDLINE_HEIGHT) -#define MANAGE_ROW5 (MANAGE_ROW6 - RSC_SP_FLGR_SPACE_Y - INFO_LINES_COUNT*RSC_CD_FIXEDTEXT_HEIGHT) -#define MANAGE_ROW4 (MANAGE_ROW5 - RSC_SP_CTRL_GROUP_Y - RSC_CD_PUSHBUTTON_HEIGHT) -#define MANAGE_ROW4A (MANAGE_ROW4 + RSC_CD_PUSHBUTTON_HEIGHT) - -#define MANAGE_LB_WIDTH (MANAGE_COL3 - RSC_SP_CTRL_X - RSC_SP_DLG_INNERBORDER_LEFT) -#define MANAGE_LB_HEIGHT (MANAGE_ROW4A - MANAGE_ROW2) - -#define SETDEF_DLG_WIDTH 180 -#define SETDEF_DLG_HEIGHT 165 - -#define SETDEF_COL1 RSC_SP_DLG_INNERBORDER_LEFT -#define SETDEF_COL2 (SETDEF_DLG_WIDTH - RSC_SP_DLG_INNERBORDER_RIGHT - 3*RSC_CD_PUSHBUTTON_WIDTH - RSC_SP_CTRL_GROUP_X - RSC_SP_CTRL_X) -#define SETDEF_COL3 (SETDEF_COL2 + RSC_CD_PUSHBUTTON_WIDTH + RSC_SP_CTRL_GROUP_X) -#define SETDEF_COL4 (SETDEF_COL3 + RSC_CD_PUSHBUTTON_WIDTH + RSC_SP_CTRL_X) -#define SETDEF_COL4A (SETDEF_COL4 + RSC_CD_PUSHBUTTON_WIDTH) - -#define SETDEF_ROW1 RSC_SP_DLG_INNERBORDER_TOP -#define SETDEF_ROW2 (SETDEF_ROW1 + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y) - -#define SETDEF_ROW5 (SETDEF_DLG_HEIGHT - RSC_SP_DLG_INNERBORDER_BOTTOM - RSC_CD_PUSHBUTTON_HEIGHT) -#define SETDEF_ROW4 (SETDEF_ROW5 - RSC_SP_FLGR_SPACE_Y - RSC_CD_FIXEDLINE_HEIGHT) -#define SETDEF_ROW3 (SETDEF_ROW4 - RSC_SP_FLGR_SPACE_Y - INFO_LINES_COUNT*RSC_CD_FIXEDTEXT_HEIGHT) -#define SETDEF_ROW3A (SETDEF_ROW3 - RSC_SP_CTRL_GROUP_Y) - -#define SETDEF_LB_WIDTH (SETDEF_COL4A - SETDEF_COL1) -#define SETDEF_LB_HEIGHT (SETDEF_ROW3A - SETDEF_ROW2) - -#endif // BASCTL_MANAGELANG_HRC - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/source/dlged/managelang.src b/basctl/source/dlged/managelang.src index d38a43d..7a6a6ce 100644 --- a/basctl/source/dlged/managelang.src +++ b/basctl/source/dlged/managelang.src @@ -18,94 +18,6 @@ */ #include "dlgresid.hrc" -#include "managelang.hrc" -#include "helpid.hrc" - -ModalDialog RID_DLG_MANAGE_LANGUAGE -{ - HelpId = HID_BASICIDE_MANAGE_LANGUAGE ; - OutputSize = TRUE ; - Size = MAP_APPFONT ( MANAGE_DLG_WIDTH , MANAGE_DLG_HEIGHT ) ; - Moveable = TRUE ; - Closeable = TRUE ; - Text [ en-US ] = "Manage User Interface Languages [$1]" ; - FixedText FT_LANGUAGE - { - Pos = MAP_APPFONT ( MANAGE_COL1 , MANAGE_ROW1 ) ; - Size = MAP_APPFONT ( MANAGE_LB_WIDTH , RSC_CD_FIXEDTEXT_HEIGHT ) ; - Text [ en-US ] = "Present Languages" ; - }; - ListBox LB_LANGUAGE - { - HelpID = "basctl:ListBox:RID_DLG_MANAGE_LANGUAGE:LB_LANGUAGE"; - Pos = MAP_APPFONT ( MANAGE_COL1 , MANAGE_ROW2 ) ; - Size = MAP_APPFONT ( MANAGE_LB_WIDTH , MANAGE_LB_HEIGHT ) ; - Border = TRUE; - AutoHScroll = TRUE ; - }; - PushButton PB_ADD_LANG - { - HelpID = "basctl:PushButton:RID_DLG_MANAGE_LANGUAGE:PB_ADD_LANG"; - Pos = MAP_APPFONT ( MANAGE_COL3 , MANAGE_ROW2 ) ; - Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; - TabStop = TRUE ; - Text [ en-US ] = "Add..." ; - }; - PushButton PB_DEL_LANG - { - HelpID = "basctl:PushButton:RID_DLG_MANAGE_LANGUAGE:PB_DEL_LANG"; - Pos = MAP_APPFONT ( MANAGE_COL3 , MANAGE_ROW3 ) ; - Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; - TabStop = TRUE ; - Text [ en-US ] = "Delete" ; - }; - PushButton PB_MAKE_DEFAULT - { - HelpID = "basctl:PushButton:RID_DLG_MANAGE_LANGUAGE:PB_MAKE_DEFAULT"; - Pos = MAP_APPFONT ( MANAGE_COL3 , MANAGE_ROW4 ) ; - Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; - TabStop = TRUE ; - Text [ en-US ] = "Default" ; - }; - FixedText FT_INFO - { - Pos = MAP_APPFONT ( MANAGE_COL1 , MANAGE_ROW5 ) ; - Size = MAP_APPFONT ( MANAGE_DLG_WIDTH - 2*RSC_SP_FLGR_INNERBORDER_LEFT, INFO_LINES_COUNT*RSC_CD_FIXEDTEXT_HEIGHT ) ; - WordBreak = TRUE ; - Text [ en-US ] = "The default language is used if no localization for a user interface locale is present. Furthermore all strings from the default language are copied to resources of newly added languages." ; - }; - FixedLine FL_BUTTONS - { - Pos = MAP_APPFONT ( 0 , MANAGE_ROW6 ) ; - Size = MAP_APPFONT ( MANAGE_DLG_WIDTH, RSC_CD_FIXEDLINE_HEIGHT ) ; - }; - HelpButton PB_HELP - { - Pos = MAP_APPFONT ( MANAGE_COL2 , MANAGE_ROW7 ) ; - Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; - TabStop = TRUE ; - }; - OKButton PB_CLOSE - { - Pos = MAP_APPFONT ( MANAGE_COL3 , MANAGE_ROW7 ) ; - Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ; - TabStop = TRUE ; - DefButton = TRUE ; - Text [ en-US ] = "~Close" ; - }; - String STR_DEF_LANG - { - Text [ en-US ] = "[Default Language]" ; - }; - String STR_DELETE - { - Text [ en-US ] = "~Delete" ; - }; - String STR_CREATE_LANG - { - Text [ en-US ] = "<Press 'Add' to create language resources>" ; - }; -}; QueryBox RID_QRYBOX_LANGUAGE { diff --git a/basctl/source/inc/dlgresid.hrc b/basctl/source/inc/dlgresid.hrc index 04163e4..77e4480 100644 --- a/basctl/source/inc/dlgresid.hrc +++ b/basctl/source/inc/dlgresid.hrc @@ -49,6 +49,9 @@ #define RID_STR_TRANSLATION_DEFAULT ( RID_DLG_START + 22 ) #define RID_STR_CLASS_TREECONTROL ( RID_DLG_START + 23 ) #define RID_STR_CLASS_SPINCONTROL ( RID_DLG_START + 24 ) +#define RID_STR_DEF_LANG ( RID_DLG_START + 25 ) +#define RID_STR_DELETE ( RID_DLG_START + 26 ) +#define RID_STR_CREATE_LANG ( RID_DLG_START + 27 ) // Property Browser Headline Id's ----------------------------------------------------------- @@ -58,8 +61,7 @@ // Manage Language Dialogs -#define RID_DLG_MANAGE_LANGUAGE ( RID_DLG_START + 70 ) -#define RID_QRYBOX_LANGUAGE ( RID_DLG_START + 71 ) +#define RID_QRYBOX_LANGUAGE ( RID_DLG_START + 70 ) // ----------------------------------------------------------------------- diff --git a/basctl/source/inc/managelang.hxx b/basctl/source/inc/managelang.hxx index 86f5a7c..6fa0c62 100644 --- a/basctl/source/inc/managelang.hxx +++ b/basctl/source/inc/managelang.hxx @@ -52,16 +52,10 @@ extern bool localesAreEqual( const ::com::sun::star::lang::Locale& rLocaleLeft, class ManageLanguageDialog : public ModalDialog { private: - FixedText m_aLanguageFT; - ListBox m_aLanguageLB; - PushButton m_aAddPB; - PushButton m_aDeletePB; - PushButton m_aMakeDefPB; - FixedText m_aInfoFT; - - FixedLine m_aBtnLine; - HelpButton m_aHelpBtn; - OKButton m_aCloseBtn; + ListBox* m_pLanguageLB; + PushButton* m_pAddPB; + PushButton* m_pDeletePB; + PushButton* m_pMakeDefPB; boost::shared_ptr<LocalizationMgr> m_xLocalizationMgr; @@ -70,7 +64,6 @@ private: OUString m_sCreateLangStr; void Init(); - void CalcInfoSize(); void FillLanguageBox(); void ClearLanguageBox(); diff --git a/basctl/uiconfig/basicide/ui/managelanguages.ui b/basctl/uiconfig/basicide/ui/managelanguages.ui new file mode 100644 index 0000000..ce180f4 --- /dev/null +++ b/basctl/uiconfig/basicide/ui/managelanguages.ui @@ -0,0 +1,198 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <object class="GtkDialog" id="ManageLanguagesDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Manage User Interface Languages [$1]</property> + <property name="type_hint">normal</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="close"> + <property name="label">gtk-close</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Present Languages</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">treeview:border</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">The default language is used if no localization for a user interface locale is present. Furthermore all strings from the default language are copied to resources of newly added languages.</property> + <property name="wrap">True</property> + <property name="max_width_chars">68</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="column_spacing">12</property> + <child> + <object class="GtkButtonBox" id="buttonbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <property name="layout_style">start</property> + <child> + <object class="GtkButton" id="add"> + <property name="label" translatable="yes">Add...</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="delete"> + <property name="label">gtk-delete</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="default"> + <property name="label" translatable="yes">Default</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + <property name="secondary">True</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkTreeView" id="treeview:border"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="treeview-selection1"/> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">close</action-widget> + <action-widget response="0">help</action-widget> + </action-widgets> + </object> +</interface> commit 91d714c5ddbc80e770628d0631100783574ed3ee Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 10:29:07 2014 +0000 silence unknown packing spew Change-Id: Ic9fa7761ef03594a9609044a963c838f7dda555b diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 8e86ba7..9c2fad8 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -2717,6 +2717,7 @@ void VclBuilder::applyPackingProperty(Window *pCurrent, pToolBoxParent->SetItemExpand(m_pParserState->m_nLastToolbarId, bTrue); else pCurrent->set_expand(bTrue); + continue; } if (pToolBoxParent) commit f8c1bc4ac38d497f7a7a65e79b99252e45c2e39f Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 10:22:36 2014 +0000 coverity#707925 Uninitialized pointer field Change-Id: I0e1034a2ef064f9a3a05a0b8837efdff767ea715 diff --git a/i18npool/inc/inputsequencechecker.hxx b/i18npool/inc/inputsequencechecker.hxx index e2ed6b2..47e6276 100644 --- a/i18npool/inc/inputsequencechecker.hxx +++ b/i18npool/inc/inputsequencechecker.hxx @@ -40,7 +40,7 @@ class InputSequenceCheckerImpl : public cppu::WeakImplHelper2 { public: InputSequenceCheckerImpl( const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rxContext ); - InputSequenceCheckerImpl(); + InputSequenceCheckerImpl(const char *pServiceName); ~InputSequenceCheckerImpl(); virtual sal_Bool SAL_CALL checkInputSequence(const OUString& Text, sal_Int32 nStartPos, @@ -56,11 +56,9 @@ public: virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( com::sun::star::uno::RuntimeException ); -protected: - sal_Int16 checkMode; +private : const sal_Char *serviceName; -private : struct lookupTableItem { lookupTableItem(const sal_Char* rLanguage, const com::sun::star::uno::Reference < com::sun::star::i18n::XExtendedInputSequenceChecker >& rxISC) : aLanguage(rLanguage), xISC(rxISC) {} diff --git a/i18npool/source/inputchecker/inputsequencechecker.cxx b/i18npool/source/inputchecker/inputsequencechecker.cxx index d5f264f..4dea3d6 100644 --- a/i18npool/source/inputchecker/inputsequencechecker.cxx +++ b/i18npool/source/inputchecker/inputsequencechecker.cxx @@ -36,7 +36,9 @@ InputSequenceCheckerImpl::InputSequenceCheckerImpl( const Reference < XComponent cachedItem = NULL; } -InputSequenceCheckerImpl::InputSequenceCheckerImpl() +InputSequenceCheckerImpl::InputSequenceCheckerImpl(const char *pServiceName) + : serviceName(pServiceName) + , cachedItem(NULL) { } diff --git a/i18npool/source/inputchecker/inputsequencechecker_hi.cxx b/i18npool/source/inputchecker/inputsequencechecker_hi.cxx index 9c7cd94..6b68e53 100644 --- a/i18npool/source/inputchecker/inputsequencechecker_hi.cxx +++ b/i18npool/source/inputchecker/inputsequencechecker_hi.cxx @@ -27,8 +27,8 @@ namespace star { namespace i18n { InputSequenceChecker_hi::InputSequenceChecker_hi() + : InputSequenceCheckerImpl("com.sun.star.i18n.InputSequenceChecker_hi") { - serviceName = "com.sun.star.i18n.InputSequenceChecker_hi"; } InputSequenceChecker_hi::~InputSequenceChecker_hi() diff --git a/i18npool/source/inputchecker/inputsequencechecker_th.cxx b/i18npool/source/inputchecker/inputsequencechecker_th.cxx index 4881455..fb90630 100644 --- a/i18npool/source/inputchecker/inputsequencechecker_th.cxx +++ b/i18npool/source/inputchecker/inputsequencechecker_th.cxx @@ -25,8 +25,8 @@ namespace com { namespace sun { namespace star { namespace i18n { InputSequenceChecker_th::InputSequenceChecker_th() + : InputSequenceCheckerImpl("com.sun.star.i18n.InputSequenceChecker_th") { - serviceName = "com.sun.star.i18n.InputSequenceChecker_th"; } InputSequenceChecker_th::~InputSequenceChecker_th() commit 110c193988a13541c165b126784ec2369ddf4f8c Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 10:09:25 2014 +0000 Related: #i97873# (coverity#705407) Improper use of negative value a pity the other one wasn't fixed when the first one was fixed back in 2002 with 0645e6a1a1917fef833358f328b5d56396380698 Change-Id: Ia7ac0f57a6805dc8ff09668198d0530b1cfc31db diff --git a/sax/source/expatwrap/xml2utf.cxx b/sax/source/expatwrap/xml2utf.cxx index 8658183..6e0f2e9 100644 --- a/sax/source/expatwrap/xml2utf.cxx +++ b/sax/source/expatwrap/xml2utf.cxx @@ -239,7 +239,7 @@ sal_Bool XMLFile2UTFConverter::scanForEncoding( Sequence< sal_Int8 > &seq ) } int nFound = str.indexOf( " encoding" ); - if( nFound < str.getLength() ) { + if( nFound >= 0 ) { int nStop; int nStart = str.indexOf( "\"" , nFound ); if( nStart < 0 || str.indexOf( "'" , nFound ) < nStart ) commit 29eac263c50353d7ed0a4b9027e67c1e198b9072 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 10:04:45 2014 +0000 coverity#705324 Missing break in switch Change-Id: I72c9a16c5236824424b33df353606e3e14aa4607 diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx index 8db39a1..50feca8 100644 --- a/tools/source/fsys/urlobj.cxx +++ b/tools/source/fsys/urlobj.cxx @@ -5015,11 +5015,11 @@ void INetURLObject::appendUCS4(OUStringBuffer& rTheText, sal_uInt32 nUCS4, { default: OSL_FAIL("INetURLObject::appendUCS4(): Unsupported charset"); + //fallthrough case RTL_TEXTENCODING_ASCII_US: case RTL_TEXTENCODING_ISO_8859_1: appendEscape(rTheText, cEscapePrefix, nUCS4); break; - case RTL_TEXTENCODING_UTF8: appendUCS4Escape(rTheText, cEscapePrefix, nUCS4); break; commit 14744ab70865561b8f46acf4a3c2a7f775535904 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 10:03:16 2014 +0000 coverity#705161 Missing break in switch Change-Id: If936313919b41183d3fe657f5e21f885a89838b6 diff --git a/filter/source/graphicfilter/idxf/dxfentrd.cxx b/filter/source/graphicfilter/idxf/dxfentrd.cxx index 910ba3d..c5c1306 100644 --- a/filter/source/graphicfilter/idxf/dxfentrd.cxx +++ b/filter/source/graphicfilter/idxf/dxfentrd.cxx @@ -697,8 +697,9 @@ void DXFHatchEntity::EvaluateGroup( DXFGroupReader & rDGR ) case 47 : fPixelSize = rDGR.GetF(); break; case 98 : nNumberOfSeedPoints = rDGR.GetI(); break; - //!! passthrough !! - case 92 : nCurrentBoundaryPathIndex++; + case 92: + nCurrentBoundaryPathIndex++; + //fallthrough default: { sal_Bool bExecutingGroupCode = sal_False; commit 4ba25fbab6d4ee0990d71a0d91c843b04670837d Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 10:00:41 2014 +0000 coverity#705112 Using invalid iterator Change-Id: I6d05e418436b9d0b12be977b7842e1230ba3c7b1 diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index fa705dd..60cdac3 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -772,11 +772,14 @@ void OFieldExpressionControl::DeleteRows() m_pParent->m_pController->executeChecked(SID_GROUP_REMOVE,aArgs); ::std::vector<sal_Int32>::iterator aFind = ::std::find(m_aGroupPositions.begin(),m_aGroupPositions.end(),nGroupPos); - *aFind = NO_GROUP; - ::std::vector<sal_Int32>::iterator aEnd = m_aGroupPositions.end(); - for(++aFind;aFind != aEnd;++aFind) - if ( *aFind != NO_GROUP ) - --*aFind; + if (aFind != m_aGroupPositions.end()) + { + *aFind = NO_GROUP; + ::std::vector<sal_Int32>::iterator aEnd = m_aGroupPositions.end(); + for(++aFind;aFind != aEnd;++aFind) + if ( *aFind != NO_GROUP ) + --*aFind; + } } nIndex = NextSelectedRow(); } commit 7c19ff431b5b9f7b5fd3a72d85d0da4acef3e0da Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 09:57:43 2014 +0000 coverity#704934 Dereference after null check Change-Id: I5242f89448431efb4a3f7ad5c84ab685b2e40f68 diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index d61ecf1..c66d143 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -142,7 +142,7 @@ void SwPageNumberFieldType::ChangeExpansion( SwDoc* pDoc, nNumberingType = *pNumFmt; bVirtuell = false; - if( bVirt ) + if (bVirt && pDoc) { // check the flag since the layout NEVER sets it back const SfxItemPool &rPool = pDoc->GetAttrPool(); commit 685f84dfc227b98f71e64f3e11a123117ed4e184 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 09:55:20 2014 +0000 coverity#704933 Unchecked dynamic_cast Change-Id: Ia094aca7dbc031eb7b3a205deb953ded2b735e5c diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 9529b21..036d353 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -957,8 +957,8 @@ void SwFieldFormPortion::Paint( const SwTxtPaintInfo& rInf ) const { if ( pBM->GetFieldname( ) == ODF_FORMCHECKBOX ) { // a checkbox... - ICheckboxFieldmark* pCheckboxFm = dynamic_cast< ICheckboxFieldmark* >(pBM); - bool checked = pCheckboxFm->IsChecked(); + const ICheckboxFieldmark* pCheckboxFm = dynamic_cast< ICheckboxFieldmark* >(pBM); + bool checked = pCheckboxFm && pCheckboxFm->IsChecked(); rInf.DrawCheckBox(*this, checked); } else if ( pBM->GetFieldname( ) == ODF_FORMDROPDOWN ) commit 9827d35990b85f679fcc24518393ac64f7f0e9a3 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 09:54:21 2014 +0000 coverity#704932 Dereference after null check Change-Id: Ibc0dfcf5195d54158bf93bf2b2fb15dd26ea07af diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 8556be5..ddb1cd7 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -1780,7 +1780,9 @@ bool SwTxtFormatter::BuildMultiPortion( SwTxtFormatInfo &rInf, pUpperFrm = pFrm->GetUpper(); while ( pUpperFrm && !pUpperFrm->IsCellFrm() ) pUpperFrm = pUpperFrm->GetUpper(); - OSL_ENSURE( pUpperFrm, "pFrm is in table but does not have an upper cell frame" ); + assert(pUpperFrm); //pFrm is in table but does not have an upper cell frame + if (!pUpperFrm) + return false; const SwTableLine* pLine = ((SwRowFrm*)pUpperFrm->GetUpper())->GetTabLine(); const SwFmtFrmSize& rFrmFmtSize = pLine->GetFrmFmt()->GetFrmSize(); if ( ATT_VAR_SIZE == rFrmFmtSize.GetHeightSizeType() ) commit a7302614748f103c4ba8987224c1e89e993d6edb Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 09:52:47 2014 +0000 coverity#704930 Dereference after null check Change-Id: I268945b00e0470f5aade3022fd676a2a69d2590d diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx index bba0074..72643ad 100644 --- a/sw/source/core/text/porfly.cxx +++ b/sw/source/core/text/porfly.cxx @@ -336,6 +336,9 @@ void SwFlyCntPortion::SetBase( const SwTxtFrm& rFrm, const Point &rBase, pSdrObj = GetFlyFrm()->GetVirtDrawObj(); } + if (!pSdrObj) + return; + // position object objectpositioning::SwAsCharAnchoredObjectPosition aObjPositioning( *pSdrObj, commit 03bdb83f5ce6974cb7a22120eddc0b6bb5d7225d Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 09:51:16 2014 +0000 coverity#704929 Unchecked dynamic_cast Change-Id: Ic302482419f99ffd221e126006891fa9e97996a7 diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 074ad88..e75bbdd 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -276,7 +276,7 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf ) // portion format method. if ( IsFtnPortion() ) { - dynamic_cast<SwFtnPortion*>(this)->SetPreferredScriptType( nTmp ); + static_cast<SwFtnPortion*>(this)->SetPreferredScriptType( nTmp ); } else if ( nTmp != nActual ) { commit 56333571cac472d7c1ea154fe8522bc7d565fd31 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 09:49:50 2014 +0000 coverity#704928 Dereference after null check Change-Id: I6d2852c3027175aac0ec77b3d8b1a7cea9be2bd1 diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index ad37a5f..987a287 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -1655,7 +1655,7 @@ SwTwips SwTableLine::GetTableLineHeight( bool& bLayoutAvailable ) const // The first one defines the chain, if a chain is defined, only members of the chain // will be added. - if( !pChain || pChain->IsAnFollow( pTab ) || pTab->IsAnFollow( pChain ) ) + if (pTab && (!pChain || pChain->IsAnFollow( pTab ) || pTab->IsAnFollow(pChain))) { pChain = pTab; // defines my chain (even it is already) if( pTab->IsVertical() ) commit 191fecdb2610c862f17d6ee367548c8f532557b0 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 09:45:20 2014 +0000 coverity#704925 Dereference after null check Change-Id: Ideb2720058b94bdecbfcbb76421b475b6c6e3304 diff --git a/sw/source/core/swg/swblocks.cxx b/sw/source/core/swg/swblocks.cxx index 8fa212c..c784e72 100644 --- a/sw/source/core/swg/swblocks.cxx +++ b/sw/source/core/swg/swblocks.cxx @@ -553,8 +553,10 @@ SwDoc* SwTextBlocks::GetDoc() void SwTextBlocks::ClearDoc() { if( pImp ) + { pImp->ClearDoc(); - pImp->nCur = (sal_uInt16) -1; + pImp->nCur = (sal_uInt16) -1; + } } commit f4e4fe93ed86b7f7b10e7801da7156c746338ea4 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 09:44:36 2014 +0000 coverity#704926 Dereference after null check Change-Id: Idf13ac6fd71d5142b8ad2643d9ec461d40775fda diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 9c75d2c..ad37a5f 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -399,9 +399,11 @@ void SwTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) if( RES_ATTRSET_CHG == nWhich ) { - if( SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( - RES_FRM_SIZE, sal_False, (const SfxPoolItem**)&pNewSize )) + if (pOld && SFX_ITEM_SET == ((SwAttrSetChg*)pNew)->GetChgSet()->GetItemState( + RES_FRM_SIZE, sal_False, (const SfxPoolItem**)&pNewSize)) + { pOldSize = &((SwAttrSetChg*)pOld)->GetChgSet()->GetFrmSize(); + } } else if( RES_FRM_SIZE == nWhich ) { commit f179b16337582a0a8a91f4ee9a0265346c03d285 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 09:42:45 2014 +0000 coverity#704927 Dereference after null check Change-Id: I774014bfb57d7511a86d398dd1dfcd1d96cbf7e2 diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 5e1fa91..9c75d2c 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -411,16 +411,8 @@ void SwTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) else CheckRegistration( pOld, pNew ); - if( pOldSize || pNewSize ) - { - if ( !IsModifyLocked() ) - { - OSL_ENSURE( pOldSize && pOldSize->Which() == RES_FRM_SIZE && - pNewSize && pNewSize->Which() == RES_FRM_SIZE, - "No Old or New for FmtFrmSize-Modify of the SwTable." ); - AdjustWidths( pOldSize->GetWidth(), pNewSize->GetWidth() ); - } - } + if (pOldSize && pNewSize && !IsModifyLocked()) + AdjustWidths( pOldSize->GetWidth(), pNewSize->GetWidth() ); } void SwTable::AdjustWidths( const long nOld, const long nNew ) commit 6a4ed76e2ddb5908208a67bc20f0b950e7c68cef Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 09:36:06 2014 +0000 coverity#1158076 Unchecked dynamic_cast Change-Id: Iefe9db0746f0e35e2deb65da5b03c175e55a7783 diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index a7167b2..19e9203 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -1612,14 +1612,14 @@ void SwDoc::CopyFlyInFlyImpl( const SwFrmFmt *pFmtK = (*kIt).GetFmt(); if ( rChain.GetPrev() == pFmtK ) { - ::lcl_ChainFmts( dynamic_cast< SwFlyFrmFmt* >(aVecSwFrmFmt[k]), - dynamic_cast< SwFlyFrmFmt* >(aVecSwFrmFmt[n]) ); + ::lcl_ChainFmts( static_cast< SwFlyFrmFmt* >(aVecSwFrmFmt[k]), + static_cast< SwFlyFrmFmt* >(aVecSwFrmFmt[n]) ); --nCnt; } else if ( rChain.GetNext() == pFmtK ) { - ::lcl_ChainFmts( dynamic_cast< SwFlyFrmFmt* >(aVecSwFrmFmt[n]), - dynamic_cast< SwFlyFrmFmt* >(aVecSwFrmFmt[k]) ); + ::lcl_ChainFmts( static_cast< SwFlyFrmFmt* >(aVecSwFrmFmt[n]), + static_cast< SwFlyFrmFmt* >(aVecSwFrmFmt[k]) ); --nCnt; } } commit 6a53525c5de42d54932119be65dc3952f791172f Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 09:28:23 2014 +0000 mnData2 is never used Change-Id: I4830f6186c4fb7e13c7d81aa849a1bc4bf055425 diff --git a/include/svx/galmisc.hxx b/include/svx/galmisc.hxx index 7045a51..5716f77 100644 --- a/include/svx/galmisc.hxx +++ b/include/svx/galmisc.hxx @@ -202,21 +202,19 @@ private: OUString maThemeName; OUString maStringData; sal_uIntPtr mnData1; - sal_uIntPtr mnData2; public: - GalleryHint( sal_uIntPtr nType, const OUString& rThemeName, sal_uIntPtr nData1 = 0UL, sal_uIntPtr nData2 = 0UL ) : - mnType( nType ), maThemeName( rThemeName ), mnData1( nData1 ), mnData2( nData2 ) {} + GalleryHint( sal_uIntPtr nType, const OUString& rThemeName, sal_uIntPtr nData1 = 0UL ) : + mnType( nType ), maThemeName( rThemeName ), mnData1( nData1 ) {} - GalleryHint( sal_uIntPtr nType, const OUString& rThemeName, const OUString& rStringData, sal_uIntPtr nData1 = 0UL, sal_uIntPtr nData2 = 0UL ) : - mnType( nType ), maThemeName( rThemeName ), maStringData( rStringData ), mnData1( nData1 ), mnData2( nData2 ) {} + GalleryHint( sal_uIntPtr nType, const OUString& rThemeName, const OUString& rStringData, sal_uIntPtr nData1 = 0UL ) : + mnType( nType ), maThemeName( rThemeName ), maStringData( rStringData ), mnData1( nData1 ) {} sal_uIntPtr GetType() const { return mnType; } const OUString& GetThemeName() const { return maThemeName; } const OUString& GetStringData() const { return maStringData; } sal_uIntPtr GetData1() const { return mnData1; } - sal_uIntPtr GetData2() const { return mnData2; } }; #endif commit 6ddc1b038b817272df37f08243e617bd16e62c29 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Feb 11 09:26:17 2014 +0000 coverity#708919 Use after free Change-Id: I992369c97d068452d87a9c618875c7abb6c90a41 diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 3fc5735..c1b4384 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -472,8 +472,8 @@ bool GalleryTheme::RemoveObject( size_t nPos ) aSvDrawStorageRef->Remove( pEntry->aURL.GetMainURL( INetURLObject::NO_DECODE ) ); Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); - delete pEntry; Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pEntry ) ) ); + delete pEntry; ImplSetModified( sal_True ); ImplBroadcast( nPos ); @@ -1410,8 +1410,8 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) { pObj = aObjectList[ i ]; Broadcast( GalleryHint( GALLERY_HINT_CLOSE_OBJECT, GetName(), reinterpret_cast< sal_uIntPtr >( pObj ) ) ); - delete pObj; Broadcast( GalleryHint( GALLERY_HINT_OBJECT_REMOVED, GetName(), reinterpret_cast< sal_uIntPtr >( pObj ) ) ); + delete pObj; } aObjectList.clear();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits