[Libreoffice-commits] core.git: 2 commits - cui/source filter/source
cui/source/options/optgdlg.cxx |2 +- cui/source/options/optinet2.cxx |2 +- filter/source/pdf/impdialog.cxx | 14 -- 3 files changed, 6 insertions(+), 12 deletions(-) New commits: commit 8684de9aae185ff340adc63ec8f1e5207e6e8cec Author: Caolán McNamara AuthorDate: Mon Sep 23 19:43:36 2019 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 10:04:35 2019 +0200 enable/disable page toplevel container instead of the vcl TabPage that contains it Change-Id: I1d1da894afce4cf6d8fc109a77fd809e993de454 Reviewed-on: https://gerrit.libreoffice.org/79424 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index b2e864674705..deb1503f8743 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -1220,7 +1220,7 @@ void ImpPDFTabSecurityPage::enablePermissionControls() } else { -if (mbHaveUserPassword && IsEnabled()) +if (mbHaveUserPassword && m_xContainer->get_sensitive()) { mxUserPwdSet->show(); mxUserPwdUnset->hide(); @@ -1234,7 +1234,7 @@ void ImpPDFTabSecurityPage::enablePermissionControls() } } -bool bLocalEnable = mbHaveOwnerPassword && IsEnabled(); +bool bLocalEnable = mbHaveOwnerPassword && m_xContainer->get_sensitive(); if (bIsPDFASel) { mxOwnerPwdPdfa->show(); @@ -1264,16 +1264,10 @@ void ImpPDFTabSecurityPage::enablePermissionControls() // This tab page is under control of the PDF/A-1a checkbox: // TODO: implement a method to do it. -voidImpPDFTabSecurityPage::ImplPDFASecurityControl( bool bEnableSecurity ) +void ImpPDFTabSecurityPage::ImplPDFASecurityControl( bool bEnableSecurity ) { -if( bEnableSecurity ) -{ -Enable(); +m_xContainer->set_sensitive(bEnableSecurity); // after enable, check the status of control as if the dialog was initialized -} -else -Enable( false ); - enablePermissionControls(); } commit 0bd2ebaa039633659d0aab816d72306cc9660872 Author: Caolán McNamara AuthorDate: Mon Sep 23 20:10:11 2019 +0100 Commit: Caolán McNamara CommitDate: Tue Sep 24 10:04:17 2019 +0200 options dialog has a controller now Change-Id: I34b486ba54c361401327dbe8fcee007da4ca72c1 Reviewed-on: https://gerrit.libreoffice.org/79426 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 657bd23ffb66..ff1e2a7bf245 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -912,7 +912,7 @@ bool OfaViewTabPage::FillItemSet( SfxItemSet* ) if( svtools::executeRestartDialog( comphelper::getProcessComponentContext(), nullptr, svtools::RESTART_REASON_OPENGL)) -GetParentDialog()->EndDialog(RET_OK); +GetDialogController()->response(RET_OK); } return bModified; diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 10c6fd9b8c7e..36cb6917599b 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -705,7 +705,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, CertPathPBHdl, weld::Button&, void) { SolarMutexGuard aGuard; if (svtools::executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, svtools::RESTART_REASON_ADDING_PATH)) -GetParentDialog()->EndDialog(RET_OK); +GetDialogController()->response(RET_OK); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - cui/source filter/source sw/source
cui/source/customize/cfg.cxx |4 ++-- filter/source/pdf/pdfinteract.cxx |2 +- sw/source/core/doc/docftn.cxx |5 ++--- sw/source/ui/dbui/mmoutputtypepage.cxx |2 +- 4 files changed, 6 insertions(+), 7 deletions(-) New commits: commit bec100c0742101f9fd378f21b20f0721262bfd32 Author: Caolán McNamaraDate: Wed Mar 21 09:23:50 2018 + coverity#1430229 Unchecked return value Change-Id: I100125d723a83ec7846cf9651ecebd3df697ce58 Reviewed-on: https://gerrit.libreoffice.org/51695 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 429e8302eb31..7f27e15f695a 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1632,7 +1632,7 @@ SvTreeListEntry* SvxConfigPage::AddFunction( { std::unique_ptr xBox(Application::CreateMessageDialog(GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, CuiResId(RID_SVXSTR_MNUCFG_ALREADY_INCLUDED))); -xBox->run(); +(void)xBox->run(); delete pNewEntryData; return nullptr; } @@ -3316,7 +3316,7 @@ void SvxIconSelectorDialog::ImportGraphics( } SvxIconChangeDialog aDialog(GetFrameWeld(), message); -aDialog.run(); +(void)aDialog.run(); } } diff --git a/filter/source/pdf/pdfinteract.cxx b/filter/source/pdf/pdfinteract.cxx index 19dc5e7546f3..a08221562141 100644 --- a/filter/source/pdf/pdfinteract.cxx +++ b/filter/source/pdf/pdfinteract.cxx @@ -62,7 +62,7 @@ sal_Bool SAL_CALL PDFInteractionHandler::handleInteractionRequest( const Referen VclPtr xParent(VCLUnoHelper::GetWindow(m_xParent)); ImplErrorDialog aDlg(xParent ? xParent->GetFrameWeld() : nullptr, aCodes); -aDlg.run(); +(void)aDlg.run(); bHandled = true; } return bHandled; diff --git a/sw/source/ui/dbui/mmoutputtypepage.cxx b/sw/source/ui/dbui/mmoutputtypepage.cxx index fe6c362a7bbd..6f1176f6cbdf 100644 --- a/sw/source/ui/dbui/mmoutputtypepage.cxx +++ b/sw/source/ui/dbui/mmoutputtypepage.cxx @@ -548,7 +548,7 @@ void SwSendMailDialog::DocumentSent( uno::Reference< mail::XMailMessage> const & if (pError) { SwSendWarningBox_Impl aDlg(GetFrameWeld(), *pError); -aDlg.run(); +(void)aDlg.run(); } } commit 42fe3985ed93d79228f70ecd6d69218fb9c3d41a Author: Caolán McNamara Date: Wed Mar 21 09:29:58 2018 + coverity#1430228 Dereference after null check Change-Id: I15b63e0adba812a84517bae086548441edfab7dc Reviewed-on: https://gerrit.libreoffice.org/51697 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx index 8f1c4e43ea1a..ffbb49c35623 100644 --- a/sw/source/core/doc/docftn.cxx +++ b/sw/source/core/doc/docftn.cxx @@ -185,11 +185,10 @@ void SwEndNoteInfo::SwClientNotify( const SwModify& rModify, const SfxHint& rHin if (auto pLegacyHint = dynamic_cast()) { const sal_uInt16 nWhich = pLegacyHint->m_pOld ? pLegacyHint->m_pOld->Which() : pLegacyHint->m_pNew ? pLegacyHint->m_pNew->Which() : 0 ; -if( RES_ATTRSET_CHG == nWhich || -RES_FMT_CHG == nWhich ) +if (RES_ATTRSET_CHG == nWhich || RES_FMT_CHG == nWhich) { auto pFormat = GetCurrentCharFormat(pCharFormat != nullptr); -if(!aDepends.IsListeningTo(pFormat) || pFormat->IsFormatInDTOR()) +if (!pFormat || !aDepends.IsListeningTo(pFormat) || pFormat->IsFormatInDTOR()) return; SwDoc* pDoc = pFormat->GetDoc(); SwFootnoteIdxs& rFootnoteIdxs = pDoc->GetFootnoteIdxs(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - cui/source filter/source include/svx svx/source
cui/source/tabpages/tppattern.cxx |6 +++--- filter/source/flash/swfwriter.cxx | 22 -- filter/source/flash/swfwriter.hxx |4 ++-- include/svx/xbtmpit.hxx |2 +- svx/source/xoutdev/xattrbmp.cxx | 34 -- svx/source/xoutdev/xtabptrn.cxx |2 +- 6 files changed, 27 insertions(+), 43 deletions(-) New commits: commit ccd316d1cb310734848bd20244f509024b549b8c Author: Noel GrandinDate: Fri Feb 16 14:26:14 2018 +0200 use VirtualDevice in createHistorical8x8FromArray part of making BitmapWriteAccess an internal detail of vcl/ Change-Id: I8b3aa2fdd3c26db0e48b228640cd31b0bd31543c Reviewed-on: https://gerrit.libreoffice.org/49937 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/cui/source/tabpages/tppattern.cxx b/cui/source/tabpages/tppattern.cxx index 141bd052cc66..443f5d95f7f0 100644 --- a/cui/source/tabpages/tppattern.cxx +++ b/cui/source/tabpages/tppattern.cxx @@ -72,9 +72,9 @@ public: // BitmapCtl: Returns the Bitmap BitmapEx GetBitmapEx() { -const Bitmap aRetval(createHistorical8x8FromArray(pBmpArray, aPixelColor, aBackgroundColor)); - -return (pBmpArray != nullptr) ? BitmapEx(aRetval) : BitmapEx(); +if (!pBmpArray) +return BitmapEx(); +return createHistorical8x8FromArray(pBmpArray, aPixelColor, aBackgroundColor); } void SetBmpArray( const sal_uInt16* pPixel ) { pBmpArray = pPixel; } diff --git a/include/svx/xbtmpit.hxx b/include/svx/xbtmpit.hxx index 7f34b0c1be71..b9ced7c42fb0 100644 --- a/include/svx/xbtmpit.hxx +++ b/include/svx/xbtmpit.hxx @@ -30,7 +30,7 @@ class BitmapColor; // helper to construct historical 8x8 bitmaps with two colors -Bitmap SVX_DLLPUBLIC createHistorical8x8FromArray(const sal_uInt16* pArray, Color aColorPix, Color aColorBack); +BitmapEx SVX_DLLPUBLIC createHistorical8x8FromArray(sal_uInt16 const * pArray, Color aColorPix, Color aColorBack); bool SVX_DLLPUBLIC isHistorical8x8(const BitmapEx& rBitmapEx, BitmapColor& o_rBack, BitmapColor& o_rFront); diff --git a/svx/source/xoutdev/xattrbmp.cxx b/svx/source/xoutdev/xattrbmp.cxx index 8e6e5afb18a8..336f84d9c2a8 100644 --- a/svx/source/xoutdev/xattrbmp.cxx +++ b/svx/source/xoutdev/xattrbmp.cxx @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -143,37 +144,26 @@ XFillBitmapItem::XFillBitmapItem(const XFillBitmapItem& rItem) { } -Bitmap createHistorical8x8FromArray(const sal_uInt16* pArray, Color aColorPix, Color aColorBack) +BitmapEx createHistorical8x8FromArray(sal_uInt16 const *pArray, Color aColorPix, Color aColorBack) { -BitmapPalette aPalette(2); +vcl::bitmap::RawBitmap aBitmap(Size(8, 8)); -aPalette[0] = BitmapColor(aColorBack); -aPalette[1] = BitmapColor(aColorPix); - -Bitmap aBitmap(Size(8, 8), 1, ); -Bitmap::ScopedWriteAccess pContent(aBitmap); - -if(pContent) +for(sal_uInt16 a(0); a < 8; a++) { -for(sal_uInt16 a(0); a < 8; a++) +for(sal_uInt16 b(0); b < 8; b++) { -for(sal_uInt16 b(0); b < 8; b++) +if(pArray[(a * 8) + b]) { -if(pArray[(a * 8) + b]) -{ -pContent->SetPixelIndex(a, b, 1); -} -else -{ -pContent->SetPixelIndex(a, b, 0); -} +aBitmap.SetPixel(a, b, aColorBack); +} +else +{ +aBitmap.SetPixel(a, b, aColorPix); } } - -pContent.reset(); } -return aBitmap; +return vcl::bitmap::CreateFromData(std::move(aBitmap)); } bool isHistorical8x8(const BitmapEx& rBitmapEx, BitmapColor& o_rBack, BitmapColor& o_rFront) diff --git a/svx/source/xoutdev/xtabptrn.cxx b/svx/source/xoutdev/xtabptrn.cxx index 9dd126dd3126..40e38cb3e331 100644 --- a/svx/source/xoutdev/xtabptrn.cxx +++ b/svx/source/xoutdev/xtabptrn.cxx @@ -49,7 +49,7 @@ bool XPatternList::Create() { OUStringBuffer aStr(SvxResId(RID_SVXSTR_PATTERN)); sal_uInt16 aArray[64]; -Bitmap aBitmap; +BitmapEx aBitmap; const sal_Int32 nLen(aStr.getLength() - 1); memset(aArray, 0, sizeof(aArray)); commit add367bfec9d12502e64d2994f0f39e2e436442a Author: Noel Grandin Date: Tue Feb 6 15:13:35 2018 +0200 loplugin:useuniqueptr in swf::Writer Change-Id: Ia337bffa45a1949567f70586db480d92bb55b238 Reviewed-on: https://gerrit.libreoffice.org/49936 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx index d32c417d4362..071f567073e5 100644 --- a/filter/source/flash/swfwriter.cxx +++
[Libreoffice-commits] core.git: 2 commits - cui/source filter/source include/svx offapi/com sc/source sd/source svx/source sw/source
cui/source/tabpages/textattr.cxx| 12 filter/source/msfilter/escherex.cxx |5 ++- filter/source/msfilter/msdffimp.cxx |4 +- filter/source/msfilter/svdfppt.cxx |2 - include/svx/sdtfsitm.hxx| 24 +--- include/svx/svddef.hxx |2 - include/svx/svdotext.hxx|2 - offapi/com/sun/star/drawing/TextFitToSizeType.idl | 20 ++--- sc/source/filter/excel/xeescher.cxx |2 - sd/source/core/stlpool.cxx |2 - sd/source/ui/func/futext.cxx|4 +- sd/source/ui/view/drviews2.cxx |4 +- sd/source/ui/view/drviewsj.cxx |2 - svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |4 +- svx/source/svdraw/svdattr.cxx |6 ++-- svx/source/svdraw/svdfmtf.cxx |2 - svx/source/svdraw/svdibrow.cxx |5 ++- svx/source/svdraw/svdotext.cxx | 11 --- svx/source/toolbars/fontworkbar.cxx |8 ++--- sw/source/filter/ww8/ww8graf.cxx|4 +- 20 files changed, 61 insertions(+), 64 deletions(-) New commits: commit e2c85365dfa40c03c6ea04023627366d118bb530 Author: Michael StahlDate: Wed Oct 18 12:28:45 2017 +0200 svx: remove pointless duplicate SdrFitToSizeType Change-Id: I7a59ecfdb8d09ecbc0b760003dbc453ac5646d1c diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index a56710534587..d21dffa3ead7 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -38,6 +38,8 @@ #include #include +using namespace ::com::sun::star; + const sal_uInt16 SvxTextAttrPage::pRanges[] = { SDRATTR_MISC_FIRST @@ -309,9 +311,9 @@ void SvxTextAttrPage::Reset( const SfxItemSet* rAttrs ) // adjust to border if ( rAttrs->GetItemState( SDRATTR_TEXT_FITTOSIZE ) != SfxItemState::DONTCARE ) { -SdrFitToSizeType eFTS = +drawing::TextFitToSizeType const eFTS = static_cast( rAttrs->Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue(); -if( eFTS == SdrFitToSizeType::Autofit || eFTS == SdrFitToSizeType::NONE ) +if (eFTS == drawing::TextFitToSizeType_AUTOFIT || eFTS == drawing::TextFitToSizeType_NONE) m_pTsbFitToSize->SetState( TRISTATE_FALSE ); else m_pTsbFitToSize->SetState( TRISTATE_TRUE ); @@ -407,14 +409,14 @@ bool SvxTextAttrPage::FillItemSet( SfxItemSet* rAttrs) eState = m_pTsbFitToSize->GetState(); if( m_pTsbFitToSize->IsValueChangedFromSaved() ) { -SdrFitToSizeType eFTS; +drawing::TextFitToSizeType eFTS; switch( eState ) { default: ; //prevent warning OSL_FAIL( "svx::SvxTextAttrPage::FillItemSet(), unhandled state!" ); SAL_FALLTHROUGH; -case TRISTATE_FALSE: eFTS = SdrFitToSizeType::Autofit; break; -case TRISTATE_TRUE: eFTS = SdrFitToSizeType::Proportional; break; +case TRISTATE_FALSE: eFTS = drawing::TextFitToSizeType_AUTOFIT; break; +case TRISTATE_TRUE: eFTS = drawing::TextFitToSizeType_PROPORTIONAL; break; } rAttrs->Put( SdrTextFitToSizeTypeItem( eFTS ) ); } diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 187661fa05cc..4efaa4fffcc6 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -3447,8 +3447,9 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT break; case drawing::TextHorizontalAdjust_BLOCK: { -SdrFitToSizeType eFTS( static_cast(pCustoShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() ); -if ( eFTS == SdrFitToSizeType::AllLines) +drawing::TextFitToSizeType const eFTS( +static_cast(pCustoShape->GetMergedItem( SDRATTR_TEXT_FITTOSIZE )).GetValue() ); +if (eFTS == drawing::TextFitToSizeType_ALLLINES) { gTextAlign = mso_alignTextStretch; } diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 48d2f2952121..164f66dcc5f9 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -4396,9 +4396,9 @@ SdrObject*
[Libreoffice-commits] core.git: 2 commits - cui/source filter/source
cui/source/dialogs/about.cxx |3 +-- filter/source/t602/t602filter.cxx |4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) New commits: commit f512cf5b1bf9e80cb430c1f06fbb7d86feb19ca3 Author: Stephan BergmannDate: Wed Mar 22 21:44:16 2017 +0100 Use rtl::isAscii* instead of ctype.h is* with sal_Unicode arg Change-Id: Ifcc531df2b780e446dd4c2cccf74fa902ab4a259 diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index d1c5986572d3..72a21d78c51c 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -49,7 +49,6 @@ #include #include #include -#include #if HAVE_FEATURE_OPENCL #include @@ -297,7 +296,7 @@ bool AboutDialog::IsStringValidGitHash(const OUString& hash) { for (int i = 0; i < hash.getLength(); i++) { -if (!std::isxdigit(hash[i])) +if (!rtl::isAsciiHexDigit(hash[i])) { return false; } commit dccbd373c9517a917c9d2be5d5abd6640948059a Author: Stephan Bergmann Date: Wed Mar 22 21:43:43 2017 +0100 Use rtl::isAscii* instead of ctype.h is* Change-Id: I3fc3db1cc2de49ebe5492fc7dae26b71aece3c6b diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx index 03f8beddaf4f..20398237294d 100644 --- a/filter/source/t602/t602filter.cxx +++ b/filter/source/t602/t602filter.cxx @@ -678,7 +678,7 @@ tnode T602ImportFilter::PointCmd602(unsigned char *ch) *ch = Readchar602(); if (!*ch) return tnode::EEND; if (*ch=='\n') return tnode::EOL; -if (!isalpha(*ch)) return (*ch<32) ? tnode::SETCH : tnode::WRITE; +if (!rtl::isAsciiAlpha(*ch)) return (*ch<32) ? tnode::SETCH : tnode::WRITE; // warning: uChar -> char pcmd[1] = (char) rtl::toAsciiUpperCase(*ch); inschr(*ch); @@ -749,7 +749,7 @@ void T602ImportFilter::Read602() case tnode::POCMD: inschr('.'); ch = Readchar602(); if(ch == 0) node = tnode::EEND; -else if(isalpha(ch)) node = PointCmd602(); +else if(rtl::isAsciiAlpha(ch)) node = PointCmd602(); else if(ch <32) node=tnode::SETCH; else node = tnode::WRITE; break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits