[Libreoffice-commits] core.git: 15 commits - framework/source jurt/com sc/source sd/source sw/source vcl/headless vcl/inc vcl/source writerfilter/source
Caolán McNamara
caolanm at redhat.com
Wed Nov 25 07:46:27 PST 2015
framework/source/uiconfiguration/moduleuicfgsupplier.cxx | 2
framework/source/uiconfiguration/uicategorydescription.cxx | 2
framework/source/uiconfiguration/uiconfigurationmanager.cxx | 2
framework/source/uiconfiguration/windowstateconfiguration.cxx | 2
framework/source/uielement/controlmenucontroller.cxx | 2
framework/source/uielement/menubarmanager.cxx | 2
framework/source/uielement/objectmenucontroller.cxx | 2
framework/source/uielement/popuptoolbarcontroller.cxx | 4
framework/source/uielement/saveasmenucontroller.cxx | 2
framework/source/uifactory/addonstoolbarfactory.cxx | 2
framework/source/uifactory/statusbarfactory.cxx | 2
framework/source/uifactory/toolbarfactory.cxx | 2
framework/source/uifactory/uicontrollerfactory.cxx | 6
framework/source/uifactory/uielementfactorymanager.cxx | 2
framework/source/uifactory/windowcontentfactorymanager.cxx | 2
jurt/com/sun/star/uno/AnyConverter.java | 2
sc/source/filter/dif/difimp.cxx | 1
sd/source/ui/dlg/navigatr.cxx | 11
sd/source/ui/view/ViewShellBase.cxx | 2
sd/source/ui/view/drviewse.cxx | 18
sw/source/uibase/app/docsh2.cxx | 21
vcl/headless/svpgdi.cxx | 477 +++++++---
vcl/inc/headless/svpgdi.hxx | 2
vcl/source/gdi/virdev.cxx | 1
writerfilter/source/dmapper/OLEHandler.cxx | 2
25 files changed, 422 insertions(+), 151 deletions(-)
New commits:
commit 713850c47841036362fdff0bb24669f3fa3a79e5
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 25 15:45:36 2015 +0000
coverity#1340224 Logically dead code
Change-Id: I206701fa068c788f77307a649a607316473e6105
diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx
index 1dd10d6..f9ecc8f 100644
--- a/sc/source/filter/dif/difimp.cxx
+++ b/sc/source/filter/dif/difimp.cxx
@@ -778,6 +778,7 @@ bool DifParser::ScanFloatVal( const sal_Unicode* pStart )
eS = S_END;
}
break;
+ // coverity[dead_error_begin] - following conditions exist to avoid compiler warning
case S_END:
OSL_FAIL( "DifParser::ScanFloatVal - unexpected state" );
break;
commit f339cd61186844d285b79d2e3cfb8da9e613ce49
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 25 15:22:58 2015 +0000
coverity#1340229 try and silence Resource leak
Change-Id: I5babf6365c50b7c5ad58cdb74729b9a8ac1c4ebc
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 6897ac4..811deb4 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -1534,13 +1534,13 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh,
}
// 2. Open the file ourselves
- SfxMedium* pMed = new SfxMedium( aTmpObj.GetMainURL(
- INetURLObject::NO_DECODE ), StreamMode::READ );
+ std::unique_ptr<SfxMedium> xMed(new SfxMedium( aTmpObj.GetMainURL(
+ INetURLObject::NO_DECODE ), StreamMode::READ ));
if( INetProtocol::File == aTmpObj.GetProtocol() )
- pMed->Download(); // Touch the medium (download it)
+ xMed->Download(); // Touch the medium (download it)
const SfxFilter* pSfxFlt = nullptr;
- if( !pMed->GetError() )
+ if (!xMed->GetError())
{
SfxFilterMatcher aMatcher( OUString::createFromAscii(SwDocShell::Factory().GetShortName()) );
@@ -1551,24 +1551,24 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh,
}
if( nVersion )
- pMed->GetItemSet()->Put( SfxInt16Item( SID_VERSION, nVersion ));
+ xMed->GetItemSet()->Put( SfxInt16Item( SID_VERSION, nVersion ));
if( !rPasswd.isEmpty() )
- pMed->GetItemSet()->Put( SfxStringItem( SID_PASSWORD, rPasswd ));
+ xMed->GetItemSet()->Put( SfxStringItem( SID_PASSWORD, rPasswd ));
if( !pSfxFlt )
- aMatcher.DetectFilter( *pMed, &pSfxFlt, false );
+ aMatcher.DetectFilter( *xMed, &pSfxFlt, false );
if( pSfxFlt )
{
// We cannot do anything without a Filter
- pMed->SetFilter( pSfxFlt );
+ xMed->SetFilter( pSfxFlt );
// If the new shell is created, SfxObjectShellLock should be used to let it be closed later for sure
SwDocShell *const pNew(new SwDocShell(SfxObjectCreateMode::INTERNAL));
xLockRef = pNew;
xDocSh = static_cast<SfxObjectShell*>(xLockRef);
- if( xDocSh->DoLoad( pMed ) )
+ if (xDocSh->DoLoad(xMed.release()))
{
SwDoc const& rDoc(*pNew->GetDoc());
const_cast<SwDoc&>(rDoc).GetNodes().ForEach(&lcl_MergePortions);
@@ -1577,9 +1577,6 @@ int SwFindDocShell( SfxObjectShellRef& xDocSh,
}
}
- if( !xDocSh.Is() ) // Medium still needs to be deleted
- delete pMed;
-
return 0;
}
commit 3c100a9c61ac984983d077e294c32b388d70d892
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 25 15:20:06 2015 +0000
coverity#1340228 try and silence Resource leak
Change-Id: I654fc22bbab2301e74cf200577f934e56f77fb58
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 0617324..a72a71f 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -621,15 +621,15 @@ bool SdNavigatorWin::InsertFile(const OUString& rFileName)
{
// The medium may be opened with READ/WRITE. Therefore, we first
// check if it contains a Storage.
- SfxMedium* pMedium = new SfxMedium( aFileName,
- StreamMode::READ | StreamMode::NOCREATE);
+ std::unique_ptr<SfxMedium> xMedium(new SfxMedium(aFileName,
+ StreamMode::READ | StreamMode::NOCREATE));
- if (pMedium->IsStorage())
+ if (xMedium->IsStorage())
{
// Now depending on mode:
// maTlbObjects->SetSelectionMode(MULTIPLE_SELECTION);
- // handover of ownership of pMedium;
- SdDrawDocument* pDropDoc = maTlbObjects->GetBookmarkDoc(pMedium);
+ // handover of ownership of xMedium;
+ SdDrawDocument* pDropDoc = maTlbObjects->GetBookmarkDoc(xMedium.release());
if (pDropDoc)
{
@@ -646,7 +646,6 @@ bool SdNavigatorWin::InsertFile(const OUString& rFileName)
}
else
{
- delete pMedium;
return false;
}
}
commit 8244fc2655e37f178f32d63133edf08def8f62c8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 25 15:09:40 2015 +0000
coverity#1340230 Dereference before null check
ah!, the original code had a type in it. That's
why it was refactored to remove the null check.
Now a proper fix for cids: 1326180<->1326190
Change-Id: Iba7fd47c03eb5c157f878e0e297e8688f20ae348
diff --git a/jurt/com/sun/star/uno/AnyConverter.java b/jurt/com/sun/star/uno/AnyConverter.java
index 61c8c7e..94542e6 100644
--- a/jurt/com/sun/star/uno/AnyConverter.java
+++ b/jurt/com/sun/star/uno/AnyConverter.java
@@ -621,7 +621,7 @@ public class AnyConverter
break;
case TypeClass.ENUM_value:
if (tc == TypeClass.ENUM_value &&
- (null == destTClass || destType.equals( type ) /* optional destType */))
+ (null == destType || destType.equals( type ) /* optional destType */))
{
return object;
}
commit 378f500bf64e96a92132fe5f965a6503db416183
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 25 15:04:13 2015 +0000
coverity#1340222 Logically dead code
This is (worrying) fall-out from
commit 229fc164dc1773484b74eca016863cf68860e81b
Author: Philippe Jung <phil.jung at free.fr>
Date: Fri Jul 10 17:02:44 2015 +0200
Impress: Rework the way the display modes are presented.
Change-Id: I00d19b2d3cec4d505d17ba4031f6763c86395f74
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index a293696..4aa4510 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -999,24 +999,6 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
Broadcast (
ViewShellHint(ViewShellHint::HINT_CHANGE_EDIT_MODE_START));
- // Is there a page with the AutoLayout "Title"?
- bool bFound = false;
- sal_uInt16 i = 0;
- sal_uInt16 nCount = GetDoc()->GetSdPageCount(PK_STANDARD);
-
- while (i < nCount && !bFound)
- {
- SdPage* pPage = GetDoc()->GetSdPage(i, PK_STANDARD);
-
- if (nSId == SID_SLIDE_MASTER_MODE && pPage->GetAutoLayout() != AUTOLAYOUT_TITLE)
- {
- bFound = true;
- SwitchPage((pPage->GetPageNum() - 1) / 2);
- }
-
- i++;
- }
-
// turn on default layer of MasterPage
mpDrawView->SetActiveLayer( SD_RESSTR(STR_LAYER_BCKGRNDOBJ) );
commit f4ac785494ac056535d2ff12ac59b909dafa4bab
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 25 14:57:18 2015 +0000
coverity#1340227 Missing break in switch
Change-Id: I30ea6cea81ae1b4f344e253c7a51cfef4d844128
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 35f0773..c1fa294 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -1289,6 +1289,7 @@ void ViewShellBase::Implementation::GetSlotState (SfxItemSet& rSet)
pFrameView = mrBase.GetMainViewShell()->GetFrameView();
bState = pFrameView->GetViewShEditMode() == EM_MASTERPAGE
&& pFrameView->GetPageKind() == PK_NOTES;
+ break;
case SID_TOGGLE_TABBAR_VISIBILITY:
bState = GetUserWantsTabBar();
commit c5bfac3f26dab2308b5a9797876927d410ac7876
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 25 14:56:51 2015 +0000
coverity#1340226 Missing break in switch
Change-Id: Ibd1c15ce65501d4dc6d0cea8c8e5f4e683d1b7a4
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index a66ad73..35f0773 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -1254,6 +1254,7 @@ void ViewShellBase::Implementation::GetSlotState (SfxItemSet& rSet)
pFrameView = mrBase.GetMainViewShell()->GetFrameView();
bState = pFrameView->GetViewShEditMode() == EM_MASTERPAGE
&& pFrameView->GetPageKind() == PK_STANDARD;
+ break;
case SID_SLIDE_SORTER_MULTI_PANE_GUI:
case SID_SLIDE_SORTER_MODE:
commit 43e2b417970cb7968430a1e9ef2a5fb54af8434c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 25 14:53:55 2015 +0000
coverity#1340225 Missing break in switch
Change-Id: I9f76340ccdb32f4337d0ebe85e9957fe8a3b19f9
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index cab8fa3..085237f 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -165,6 +165,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
{
case DeviceFormat::BITMASK:
mnBitCount = 1;
+ break;
default:
mnBitCount = pOutDev->GetBitCount();
break;
commit d05ae550316e3dc5afe799c7d6cf83f02e37d69b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 25 14:49:24 2015 +0000
crashtesting: failure on File_1404.docx
Change-Id: Id984cc1f5954be38fbe3a1a15bfe811d7cdfe99d
diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx
index 6208750..d282c7b 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/writerfilter/source/dmapper/OLEHandler.cxx
@@ -236,6 +236,8 @@ void OLEHandler::importStream(uno::Reference<uno::XComponentContext> xComponentC
uno::Reference<document::XImporter> xImporter(xInterface, uno::UNO_QUERY);
uno::Reference<document::XEmbeddedObjectSupplier> xSupplier(xOLE, uno::UNO_QUERY);
uno::Reference<lang::XComponent> xEmbeddedObject(xSupplier->getEmbeddedObject(), uno::UNO_QUERY);
+ if (!xEmbeddedObject.is())
+ return;
xImporter->setTargetDocument( xEmbeddedObject );
// Import the input stream.
commit c1774eb6a34d68b8a083ce1e919d634b700583c4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 25 13:40:28 2015 +0000
gtk3: implement drawAlphaBitmap for svp/gtk3 backend
mostly anyway
Change-Id: I21d7f46ba018c3ed81093873da35b883efa44d66
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 98e5b6f..84b4b32 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -64,6 +64,62 @@ rDevice
#endif
}
+namespace
+{
+#if CAIRO_VERSION_MAJOR == 1 && CAIRO_VERSION_MINOR < 10
+ struct cairo_rectangle_int_t
+ {
+ double x;
+ double y;
+ double width;
+ double height;
+ };
+#endif
+
+ cairo_rectangle_int_t getFillDamage(cairo_t* cr)
+ {
+ cairo_rectangle_int_t extents;
+ double x1, y1, x2, y2;
+
+ cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
+ extents.x = x1, extents.y = x2, extents.width = x2-x1, extents.height = y2-y1;
+#if CAIRO_VERSION_MAJOR > 1 || (CAIRO_VERSION_MAJOR == 1 && CAIRO_VERSION_MINOR >= 10)
+ cairo_region_t *region = cairo_region_create_rectangle(&extents);
+
+ cairo_fill_extents(cr, &x1, &y1, &x2, &y2);
+ extents.x = x1, extents.y = x2, extents.width = x2-x1, extents.height = y2-y1;
+ cairo_region_intersect_rectangle(region, &extents);
+
+ cairo_region_get_extents(region, &extents);
+ cairo_region_destroy(region);
+#endif
+
+ return extents;
+ }
+
+ cairo_rectangle_int_t getStrokeDamage(cairo_t* cr)
+ {
+ cairo_rectangle_int_t extents;
+ double x1, y1, x2, y2;
+
+ cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
+ extents.x = x1, extents.y = x2, extents.width = x2-x1, extents.height = y2-y1;
+#if CAIRO_VERSION_MAJOR > 1 || (CAIRO_VERSION_MAJOR == 1 && CAIRO_VERSION_MINOR >= 10)
+ cairo_region_t *region = cairo_region_create_rectangle(&extents);
+
+ cairo_stroke_extents(cr, &x1, &y1, &x2, &y2);
+ extents.x = x1, extents.y = x2, extents.width = x2-x1, extents.height = y2-y1;
+ cairo_region_intersect_rectangle(region, &extents);
+
+ cairo_region_get_extents(region, &extents);
+ cairo_region_destroy(region);
+#endif
+
+ return extents;
+ }
+
+}
+
#ifndef IOS
bool SvpSalGraphics::blendBitmap( const SalTwoRect&, const SalBitmap& /*rBitmap*/ )
@@ -78,11 +134,134 @@ bool SvpSalGraphics::blendAlphaBitmap( const SalTwoRect&, const SalBitmap&, cons
return false;
}
-bool SvpSalGraphics::drawAlphaBitmap( const SalTwoRect&, const SalBitmap& /*rSourceBitmap*/, const SalBitmap& /*rAlphaBitmap*/ )
+bool SvpSalGraphics::drawAlphaBitmap( const SalTwoRect& rTR, const SalBitmap& rSourceBitmap, const SalBitmap& rAlphaBitmap )
{
- // TODO(P3) implement alpha blending
- SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaBitmap case");
- return false;
+ bool bRet = false;
+ (void)rTR; (void)rSourceBitmap; (void)rAlphaBitmap;
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 10, 0)
+ if (rAlphaBitmap.GetBitCount() != 8 && rAlphaBitmap.GetBitCount() != 1)
+ {
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaBitmap alpha depth case: " << rAlphaBitmap.GetBitCount());
+ return false;
+ }
+
+ if (rTR.mnSrcWidth != rTR.mnDestWidth || rTR.mnSrcHeight != rTR.mnDestHeight)
+ {
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaBitmap scale case");
+ return false;
+ }
+
+ cairo_surface_t* source = nullptr;
+
+ const SvpSalBitmap& rSrc = static_cast<const SvpSalBitmap&>(rSourceBitmap);
+ const basebmp::BitmapDeviceSharedPtr& rSrcBmp = rSrc.getBitmap();
+
+ SvpSalBitmap aTmpBmp;
+ if (rSourceBitmap.GetBitCount() != 32)
+ {
+ //big stupid copy here
+ static bool bWarnedOnce;
+ SAL_WARN_IF(!bWarnedOnce, "vcl.gdi", "non default depth bitmap, slow convert, upscale the input");
+ bWarnedOnce = true;
+ Size aSize = rSourceBitmap.GetSize();
+ aTmpBmp.Create(aSize, 0, BitmapPalette());
+ assert(aTmpBmp.GetBitCount() == 32);
+ basegfx::B2IBox aRect(0, 0, aSize.Width(), aSize.Height());
+ const basebmp::BitmapDeviceSharedPtr& rTmpSrc = aTmpBmp.getBitmap();
+ rTmpSrc->drawBitmap(rSrcBmp, aRect, aRect, basebmp::DrawMode::Paint );
+ source = createCairoSurface(rTmpSrc);
+ }
+ else
+ source = createCairoSurface(rSrcBmp);
+
+ if (!source)
+ {
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaBitmap case");
+ return false;
+ }
+
+ const SvpSalBitmap& rMask = static_cast<const SvpSalBitmap&>(rAlphaBitmap);
+ const basebmp::BitmapDeviceSharedPtr& rMaskBmp = rMask.getBitmap();
+
+ cairo_surface_t *mask = nullptr;
+
+ unsigned char* pAlphaBits = nullptr;
+
+ basegfx::B2IVector size = rMaskBmp->getSize();
+ sal_Int32 nStride = rMaskBmp->getScanlineStride();
+ basebmp::RawMemorySharedArray data = rMaskBmp->getBuffer();
+
+ if (rAlphaBitmap.GetBitCount() == 8)
+ {
+ // the alpha values need to be inverted for Cairo
+ // so big stupid copy and invert here
+ const int nImageSize = size.getY() * nStride;
+ const unsigned char* pSrcBits = data.get();
+ pAlphaBits = new unsigned char[nImageSize];
+ memcpy(pAlphaBits, pSrcBits, nImageSize);
+
+ // TODO: make upper layers use standard alpha
+ long* pLDst = reinterpret_cast<long*>(pAlphaBits);
+ for( int i = nImageSize/sizeof(long); --i >= 0; ++pLDst )
+ *pLDst = ~*pLDst;
+
+ char* pCDst = reinterpret_cast<char*>(pLDst);
+ for( int i = nImageSize & (sizeof(long)-1); --i >= 0; ++pCDst )
+ *pCDst = ~*pCDst;
+
+ mask = cairo_image_surface_create_for_data(pAlphaBits,
+ CAIRO_FORMAT_A8,
+ size.getX(), size.getY(),
+ nStride);
+ }
+ else
+ {
+ mask = cairo_image_surface_create_for_data(data.get(),
+ CAIRO_FORMAT_A1,
+ size.getX(), size.getY(),
+ nStride);
+ }
+
+ if (!mask)
+ {
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaBitmap case");
+ cairo_surface_destroy(source);
+ delete[] pAlphaBits;
+ return false;
+ }
+
+ cairo_t* cr = getCairoContext();
+ assert(cr && m_aDevice->isTopDown());
+
+ clipRegion(cr);
+
+ cairo_rectangle_int_t extents;
+ basebmp::IBitmapDeviceDamageTrackerSharedPtr xDamageTracker(m_aDevice->getDamageTracker());
+
+ cairo_rectangle(cr, rTR.mnDestX, rTR.mnDestY, rTR.mnDestWidth, rTR.mnDestHeight);
+
+ cairo_set_source_surface(cr, source, rTR.mnDestX - rTR.mnSrcX, rTR.mnDestY - rTR.mnSrcY);
+
+ if (xDamageTracker)
+ extents = getFillDamage(cr);
+
+ cairo_clip(cr);
+ cairo_mask_surface(cr, mask, rTR.mnDestX - rTR.mnSrcX, rTR.mnDestY - rTR.mnSrcY);
+
+ cairo_surface_flush(cairo_get_target(cr));
+ cairo_surface_destroy(mask);
+ cairo_surface_destroy(source);
+ delete[] pAlphaBits;
+ cairo_destroy(cr); // unref
+
+ if (xDamageTracker)
+ {
+ xDamageTracker->damaged(basegfx::B2IBox(extents.x, extents.y, extents.x + extents.width,
+ extents.y + extents.height));
+ }
+ bRet = true;
+#endif
+ return bRet;
}
bool SvpSalGraphics::drawTransformedBitmap(
@@ -142,61 +321,6 @@ void SvpSalGraphics::clipRegion(cairo_t* cr)
cairo_clip(cr);
}
}
-namespace
-{
-#if CAIRO_VERSION_MAJOR == 1 && CAIRO_VERSION_MINOR < 10
- struct cairo_rectangle_int_t
- {
- double x;
- double y;
- double width;
- double height;
- };
-#endif
-
- cairo_rectangle_int_t getFillDamage(cairo_t* cr)
- {
- cairo_rectangle_int_t extents;
- double x1, y1, x2, y2;
-
- cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
- extents.x = x1, extents.y = x2, extents.width = x2-x1, extents.height = y2-y1;
-#if CAIRO_VERSION_MAJOR > 1 || (CAIRO_VERSION_MAJOR == 1 && CAIRO_VERSION_MINOR >= 10)
- cairo_region_t *region = cairo_region_create_rectangle(&extents);
-
- cairo_fill_extents(cr, &x1, &y1, &x2, &y2);
- extents.x = x1, extents.y = x2, extents.width = x2-x1, extents.height = y2-y1;
- cairo_region_intersect_rectangle(region, &extents);
-
- cairo_region_get_extents(region, &extents);
- cairo_region_destroy(region);
-#endif
-
- return extents;
- }
-
- cairo_rectangle_int_t getStrokeDamage(cairo_t* cr)
- {
- cairo_rectangle_int_t extents;
- double x1, y1, x2, y2;
-
- cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
- extents.x = x1, extents.y = x2, extents.width = x2-x1, extents.height = y2-y1;
-#if CAIRO_VERSION_MAJOR > 1 || (CAIRO_VERSION_MAJOR == 1 && CAIRO_VERSION_MINOR >= 10)
- cairo_region_t *region = cairo_region_create_rectangle(&extents);
-
- cairo_stroke_extents(cr, &x1, &y1, &x2, &y2);
- extents.x = x1, extents.y = x2, extents.width = x2-x1, extents.height = y2-y1;
- cairo_region_intersect_rectangle(region, &extents);
-
- cairo_region_get_extents(region, &extents);
- cairo_region_destroy(region);
-#endif
-
- return extents;
- }
-
-}
bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency)
{
@@ -1086,7 +1210,7 @@ bool SvpSalGraphics::drawEPS( long, long, long, long, void*, sal_uLong )
return false;
}
-cairo_t* SvpSalGraphics::createCairoContext(const basebmp::BitmapDeviceSharedPtr &rBuffer)
+cairo_surface_t* SvpSalGraphics::createCairoSurface(const basebmp::BitmapDeviceSharedPtr &rBuffer)
{
if (!isCairoCompatible(rBuffer))
return nullptr;
@@ -1105,6 +1229,14 @@ cairo_t* SvpSalGraphics::createCairoContext(const basebmp::BitmapDeviceSharedPtr
nFormat,
size.getX(), size.getY(),
nStride);
+ return target;
+}
+
+cairo_t* SvpSalGraphics::createCairoContext(const basebmp::BitmapDeviceSharedPtr &rBuffer)
+{
+ cairo_surface_t *target = createCairoSurface(rBuffer);
+ if (!target)
+ return nullptr;
cairo_t* cr = cairo_create(target);
cairo_surface_destroy(target);
return cr;
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index 944ac83..1adbc72 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -47,6 +47,7 @@
class GlyphCache;
class ServerFont;
typedef struct _cairo cairo_t;
+typedef struct _cairo_surface cairo_surface_t;
class VCL_DLLPUBLIC SvpSalGraphics : public SalGraphics
{
@@ -214,6 +215,7 @@ public:
#endif // ENABLE_CAIRO_CANVAS
cairo_t* getCairoContext() const;
+ static cairo_surface_t* createCairoSurface(const basebmp::BitmapDeviceSharedPtr& rBuffer);
static cairo_t* createCairoContext(const basebmp::BitmapDeviceSharedPtr& rBuffer);
void clipRegion(cairo_t* cr);
};
commit 872c1b7654510daa4a6974150490623745d931bf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Nov 25 10:32:33 2015 +0000
gtk3: it's the *Original* device we care about, not the temp clip hack devices
Change-Id: I2ac61cd2a99da25122165af692154fdbc2ac6d2e
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index ca50bfd..98e5b6f 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1154,7 +1154,7 @@ bool SvpSalGraphics::supportsOperation(OutDevSupportType eType) const
{
if (m_aDrawMode == basebmp::DrawMode::XOR)
return false;
- if (!isCairoCompatible(m_aDevice))
+ if (!isCairoCompatible(m_aOrigDevice))
return false;
switch (eType)
{
commit 3d22df17b33d6c66c3b7441bd220712ada53e667
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Nov 24 23:12:49 2015 +0000
gtk3: implement drawPolyLine for svp/gtk3 backend
by stealing the quartz impl
Change-Id: I548042328144e23c68b83e461a63cdb0d7d8ff2c
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 25553fd..ca50bfd 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -664,43 +664,6 @@ void SvpSalGraphics::drawPolyPolygon( sal_uInt32 nPoly,
dbgOut( m_aDevice );
}
-bool SvpSalGraphics::drawPolyLine(
- const ::basegfx::B2DPolygon&,
- double /*fTransparency*/,
- const ::basegfx::B2DVector& /*rLineWidths*/,
- basegfx::B2DLineJoin /*eJoin*/,
- css::drawing::LineCap /*eLineCap*/)
-{
- // TODO: implement and advertise OutDevSupport_B2DDraw support
- SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolyLine case");
- return false;
-}
-
-bool SvpSalGraphics::drawPolyLineBezier( sal_uInt32,
- const SalPoint*,
- const sal_uInt8* )
-{
- SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolyLineBezier case");
- return false;
-}
-
-bool SvpSalGraphics::drawPolygonBezier( sal_uInt32,
- const SalPoint*,
- const sal_uInt8* )
-{
- SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolygonBezier case");
- return false;
-}
-
-bool SvpSalGraphics::drawPolyPolygonBezier( sal_uInt32,
- const sal_uInt32*,
- const SalPoint* const*,
- const sal_uInt8* const* )
-{
- SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolyPolygonBezier case");
- return false;
-}
-
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 10, 0)
static void AddPolygonToPath(cairo_t* cr, const basegfx::B2DPolygon& rPolygon, bool bClosePath)
{
@@ -764,6 +727,140 @@ static void AddPolygonToPath(cairo_t* cr, const basegfx::B2DPolygon& rPolygon, b
}
#endif
+bool SvpSalGraphics::drawPolyLine(
+ const ::basegfx::B2DPolygon& rPolyLine,
+ double fTransparency,
+ const ::basegfx::B2DVector& rLineWidths,
+ basegfx::B2DLineJoin eLineJoin,
+ css::drawing::LineCap eLineCap)
+{
+ // short circuit if there is nothing to do
+ const int nPointCount = rPolyLine.count();
+ if (nPointCount <= 0)
+ {
+ return true;
+ }
+
+ // reject requests that cannot be handled yet
+ if (rLineWidths.getX() != rLineWidths.getY())
+ {
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolyLine case");
+ return false;
+ }
+
+ // #i101491# Cairo does not support B2DLineJoin::NONE; return false to use
+ // the fallback (own geometry preparation)
+ // #i104886# linejoin-mode and thus the above only applies to "fat" lines
+ if (basegfx::B2DLineJoin::NONE == eLineJoin && rLineWidths.getX() > 1.3)
+ {
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolyLine case");
+ return false;
+ }
+
+ cairo_t* cr = getCairoContext();
+ assert(cr && m_aDevice->isTopDown());
+
+ clipRegion(cr);
+
+ // setup line attributes
+ cairo_line_join_t eCairoLineJoin = CAIRO_LINE_JOIN_MITER;
+ switch (eLineJoin)
+ {
+ case basegfx::B2DLineJoin::NONE:
+ eCairoLineJoin = /*TODO?*/CAIRO_LINE_JOIN_MITER;
+ break;
+ case basegfx::B2DLineJoin::Middle:
+ eCairoLineJoin = /*TODO?*/CAIRO_LINE_JOIN_MITER;
+ break;
+ case basegfx::B2DLineJoin::Bevel:
+ eCairoLineJoin = CAIRO_LINE_JOIN_BEVEL;
+ break;
+ case basegfx::B2DLineJoin::Miter:
+ eCairoLineJoin = CAIRO_LINE_JOIN_MITER;
+ break;
+ case basegfx::B2DLineJoin::Round:
+ eCairoLineJoin = CAIRO_LINE_JOIN_ROUND;
+ break;
+ }
+
+ // setup cap attribute
+ cairo_line_cap_t eCairoLineCap(CAIRO_LINE_CAP_BUTT);
+
+ switch (eLineCap)
+ {
+ default: // css::drawing::LineCap_BUTT:
+ {
+ eCairoLineCap = CAIRO_LINE_CAP_BUTT;
+ break;
+ }
+ case css::drawing::LineCap_ROUND:
+ {
+ eCairoLineCap = CAIRO_LINE_CAP_ROUND;
+ break;
+ }
+ case css::drawing::LineCap_SQUARE:
+ {
+ eCairoLineCap = CAIRO_LINE_CAP_SQUARE;
+ break;
+ }
+ }
+
+ AddPolygonToPath(cr, rPolyLine, rPolyLine.isClosed());
+
+ cairo_rectangle_int_t extents;
+ basebmp::IBitmapDeviceDamageTrackerSharedPtr xDamageTracker(m_aDevice->getDamageTracker());
+
+ cairo_set_source_rgba(cr, m_aLineColor.getRed()/255.0,
+ m_aLineColor.getGreen()/255.0,
+ m_aLineColor.getBlue()/255.0,
+ 1.0-fTransparency);
+
+ cairo_set_line_join(cr, eCairoLineJoin);
+ cairo_set_line_cap(cr, eCairoLineCap);
+ cairo_set_line_width(cr, rLineWidths.getX());
+
+ if (xDamageTracker)
+ extents = getStrokeDamage(cr);
+
+ cairo_stroke(cr);
+
+ cairo_surface_flush(cairo_get_target(cr));
+ cairo_destroy(cr); // unref
+
+ if (xDamageTracker)
+ {
+ xDamageTracker->damaged(basegfx::B2IBox(extents.x, extents.y, extents.x + extents.width,
+ extents.y + extents.height));
+ }
+
+ return true;
+}
+
+bool SvpSalGraphics::drawPolyLineBezier( sal_uInt32,
+ const SalPoint*,
+ const sal_uInt8* )
+{
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolyLineBezier case");
+ return false;
+}
+
+bool SvpSalGraphics::drawPolygonBezier( sal_uInt32,
+ const SalPoint*,
+ const sal_uInt8* )
+{
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolygonBezier case");
+ return false;
+}
+
+bool SvpSalGraphics::drawPolyPolygonBezier( sal_uInt32,
+ const sal_uInt32*,
+ const SalPoint* const*,
+ const sal_uInt8* const* )
+{
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolyPolygonBezier case");
+ return false;
+}
+
bool SvpSalGraphics::drawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPoly, double fTransparency)
{
bool bRet = false;
commit ac49efde18b7668b7ef454306ad6912f2d66152e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Nov 24 16:24:10 2015 +0000
gtk3: track what needs to be implemented
Change-Id: Iff2a651384cc96f541dba2f9e134c7463619c62c
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index a0f3b05..25553fd 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -68,17 +68,20 @@ rDevice
bool SvpSalGraphics::blendBitmap( const SalTwoRect&, const SalBitmap& /*rBitmap*/ )
{
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::blendBitmap case");
return false;
}
bool SvpSalGraphics::blendAlphaBitmap( const SalTwoRect&, const SalBitmap&, const SalBitmap&, const SalBitmap& )
{
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::blendAlphaBitmap case");
return false;
}
bool SvpSalGraphics::drawAlphaBitmap( const SalTwoRect&, const SalBitmap& /*rSourceBitmap*/, const SalBitmap& /*rAlphaBitmap*/ )
{
// TODO(P3) implement alpha blending
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaBitmap case");
return false;
}
@@ -91,6 +94,7 @@ bool SvpSalGraphics::drawTransformedBitmap(
{
// here direct support for transformed bitmaps can be implemented
(void)rNull; (void)rX; (void)rY; (void)rSourceBitmap; (void)pAlphaBitmap;
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawTransformedBitmap case");
return false;
}
@@ -668,6 +672,7 @@ bool SvpSalGraphics::drawPolyLine(
css::drawing::LineCap /*eLineCap*/)
{
// TODO: implement and advertise OutDevSupport_B2DDraw support
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolyLine case");
return false;
}
@@ -675,6 +680,7 @@ bool SvpSalGraphics::drawPolyLineBezier( sal_uInt32,
const SalPoint*,
const sal_uInt8* )
{
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolyLineBezier case");
return false;
}
@@ -682,6 +688,7 @@ bool SvpSalGraphics::drawPolygonBezier( sal_uInt32,
const SalPoint*,
const sal_uInt8* )
{
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolygonBezier case");
return false;
}
@@ -690,6 +697,7 @@ bool SvpSalGraphics::drawPolyPolygonBezier( sal_uInt32,
const SalPoint* const*,
const sal_uInt8* const* )
{
+ SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolyPolygonBezier case");
return false;
}
commit a6d5c7dcd96b3f8bd15d5a31fc55afc1da8c101b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Nov 24 15:56:55 2015 +0000
gtk3: stroke as well as fill
Change-Id: I1c46f38927c48070e5739b99de96d61943837a14
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index f5d45d7..a0f3b05 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -170,6 +170,28 @@ namespace
return extents;
}
+
+ cairo_rectangle_int_t getStrokeDamage(cairo_t* cr)
+ {
+ cairo_rectangle_int_t extents;
+ double x1, y1, x2, y2;
+
+ cairo_clip_extents(cr, &x1, &y1, &x2, &y2);
+ extents.x = x1, extents.y = x2, extents.width = x2-x1, extents.height = y2-y1;
+#if CAIRO_VERSION_MAJOR > 1 || (CAIRO_VERSION_MAJOR == 1 && CAIRO_VERSION_MINOR >= 10)
+ cairo_region_t *region = cairo_region_create_rectangle(&extents);
+
+ cairo_stroke_extents(cr, &x1, &y1, &x2, &y2);
+ extents.x = x1, extents.y = x2, extents.width = x2-x1, extents.height = y2-y1;
+ cairo_region_intersect_rectangle(region, &extents);
+
+ cairo_region_get_extents(region, &extents);
+ cairo_region_destroy(region);
+#endif
+
+ return extents;
+ }
+
}
bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency)
@@ -177,11 +199,6 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight,
bool bRet = false;
(void)nX; (void)nY; (void)nWidth; (void)nHeight; (void)nTransparency;
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 10, 0)
- if (m_bUseLineColor || !m_bUseFillColor)
- {
- SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawAlphaRect case");
- return false;
- }
cairo_t* cr = getCairoContext();
assert(cr && m_aDevice->isTopDown());
@@ -189,18 +206,37 @@ bool SvpSalGraphics::drawAlphaRect(long nX, long nY, long nWidth, long nHeight,
clipRegion(cr);
const double fTransparency = (100 - nTransparency) * (1.0/100);
- cairo_set_source_rgba(cr, m_aFillColor.getRed()/255.0,
- m_aFillColor.getGreen()/255.0,
- m_aFillColor.getBlue()/255.0,
- fTransparency);
- cairo_rectangle(cr, nX, nY, nWidth, nHeight);
cairo_rectangle_int_t extents;
basebmp::IBitmapDeviceDamageTrackerSharedPtr xDamageTracker(m_aDevice->getDamageTracker());
- if (xDamageTracker)
- extents = getFillDamage(cr);
- cairo_fill(cr);
+ cairo_rectangle(cr, nX, nY, nWidth, nHeight);
+
+ if (m_bUseFillColor)
+ {
+ cairo_set_source_rgba(cr, m_aFillColor.getRed()/255.0,
+ m_aFillColor.getGreen()/255.0,
+ m_aFillColor.getBlue()/255.0,
+ fTransparency);
+
+ if (xDamageTracker && !m_bUseLineColor)
+ extents = getFillDamage(cr);
+
+ cairo_fill_preserve(cr);
+ }
+
+ if (m_bUseLineColor)
+ {
+ cairo_set_source_rgba(cr, m_aLineColor.getRed()/255.0,
+ m_aLineColor.getGreen()/255.0,
+ m_aLineColor.getBlue()/255.0,
+ fTransparency);
+
+ if (xDamageTracker)
+ extents = getStrokeDamage(cr);
+
+ cairo_stroke_preserve(cr);
+ }
cairo_surface_flush(cairo_get_target(cr));
cairo_destroy(cr); // unref
@@ -725,31 +761,43 @@ bool SvpSalGraphics::drawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPoly, d
bool bRet = false;
(void)rPolyPoly; (void)fTransparency;
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 10, 0)
- if (m_bUseLineColor || !m_bUseFillColor)
- {
- SAL_WARN("vcl.gdi", "unsupported SvpSalGraphics::drawPolyPolygon case");
- return false;
- }
cairo_t* cr = getCairoContext();
assert(cr && m_aDevice->isTopDown());
clipRegion(cr);
- cairo_set_source_rgba(cr, m_aFillColor.getRed()/255.0,
- m_aFillColor.getGreen()/255.0,
- m_aFillColor.getBlue()/255.0,
- 1.0-fTransparency);
-
for (const basegfx::B2DPolygon* pPoly = rPolyPoly.begin(); pPoly != rPolyPoly.end(); ++pPoly)
AddPolygonToPath(cr, *pPoly, true);
cairo_rectangle_int_t extents;
basebmp::IBitmapDeviceDamageTrackerSharedPtr xDamageTracker(m_aDevice->getDamageTracker());
- if (xDamageTracker)
- extents = getFillDamage(cr);
- cairo_fill(cr);
+ if (m_bUseFillColor)
+ {
+ cairo_set_source_rgba(cr, m_aFillColor.getRed()/255.0,
+ m_aFillColor.getGreen()/255.0,
+ m_aFillColor.getBlue()/255.0,
+ 1.0-fTransparency);
+
+ if (xDamageTracker && !m_bUseLineColor)
+ extents = getFillDamage(cr);
+
+ cairo_fill_preserve(cr);
+ }
+
+ if (m_bUseLineColor)
+ {
+ cairo_set_source_rgba(cr, m_aLineColor.getRed()/255.0,
+ m_aLineColor.getGreen()/255.0,
+ m_aLineColor.getBlue()/255.0,
+ 1.0-fTransparency);
+
+ if (xDamageTracker)
+ extents = getStrokeDamage(cr);
+
+ cairo_stroke_preserve(cr);
+ }
cairo_surface_flush(cairo_get_target(cr));
cairo_destroy(cr); // unref
commit f43c9aa5eb2f97c052dba101db5a3d31b4baf802
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Nov 24 15:33:00 2015 +0000
cppcheck: noExplicitConstructor
Change-Id: Id1615ac223cd6257a419e8abe39b5121d4c16ca4
diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
index 213daa5..59b5cc1 100644
--- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
+++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
@@ -62,7 +62,7 @@ class ModuleUIConfigurationManagerSupplier : private cppu::BaseMutex,
public ModuleUIConfigurationManagerSupplier_BASE
{
public:
- ModuleUIConfigurationManagerSupplier( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ explicit ModuleUIConfigurationManagerSupplier( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
virtual ~ModuleUIConfigurationManagerSupplier();
virtual OUString SAL_CALL getImplementationName()
diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx
index 4b90243..2dbe4d2 100644
--- a/framework/source/uiconfiguration/uicategorydescription.cxx
+++ b/framework/source/uiconfiguration/uicategorydescription.cxx
@@ -379,7 +379,7 @@ void SAL_CALL ConfigurationAccess_UICategory::disposing( const EventObject& aEve
class UICategoryDescription : public UICommandDescription
{
public:
- UICategoryDescription( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ explicit UICategoryDescription( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
virtual ~UICategoryDescription();
virtual OUString SAL_CALL getImplementationName()
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index c197f0e..f90ef07 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -83,7 +83,7 @@ public:
return aSeq;
}
- UIConfigurationManager( const css::uno::Reference< css::uno::XComponentContext > & rxContext );
+ explicit UIConfigurationManager( const css::uno::Reference< css::uno::XComponentContext > & rxContext );
virtual ~UIConfigurationManager();
// XComponent
diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx
index 8dd19b1..46a0919 100644
--- a/framework/source/uiconfiguration/windowstateconfiguration.cxx
+++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx
@@ -1282,7 +1282,7 @@ class WindowStateConfiguration : private cppu::BaseMutex,
public WindowStateConfiguration_BASE
{
public:
- WindowStateConfiguration( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ explicit WindowStateConfiguration( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
virtual ~WindowStateConfiguration();
virtual OUString SAL_CALL getImplementationName()
diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx
index 0d16b4a..250be1f 100644
--- a/framework/source/uielement/controlmenucontroller.cxx
+++ b/framework/source/uielement/controlmenucontroller.cxx
@@ -178,7 +178,7 @@ class ControlMenuController : public svt::PopupMenuControllerBase
using svt::PopupMenuControllerBase::disposing;
public:
- ControlMenuController( const uno::Reference< uno::XComponentContext >& xContext );
+ explicit ControlMenuController( const uno::Reference< uno::XComponentContext >& xContext );
virtual ~ControlMenuController();
// XServiceInfo
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 5f2b85a..6f691c7 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -713,7 +713,7 @@ class QuietInteractionContext:
private boost::noncopyable
{
public:
- QuietInteractionContext(
+ explicit QuietInteractionContext(
css::uno::Reference< css::uno::XCurrentContext >
const & context):
context_(context) {}
diff --git a/framework/source/uielement/objectmenucontroller.cxx b/framework/source/uielement/objectmenucontroller.cxx
index c2c8960..ba64647 100644
--- a/framework/source/uielement/objectmenucontroller.cxx
+++ b/framework/source/uielement/objectmenucontroller.cxx
@@ -56,7 +56,7 @@ class ObjectMenuController : public svt::PopupMenuControllerBase
using svt::PopupMenuControllerBase::disposing;
public:
- ObjectMenuController( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ explicit ObjectMenuController( const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual ~ObjectMenuController();
// XServiceInfo
diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx
index 4055cbc..cd5931c 100644
--- a/framework/source/uielement/popuptoolbarcontroller.cxx
+++ b/framework/source/uielement/popuptoolbarcontroller.cxx
@@ -305,7 +305,7 @@ ToolBoxItemBits GenericPopupToolbarController::getDropDownStyle() const
class SaveToolbarController : public PopupMenuToolbarController
{
public:
- SaveToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ explicit SaveToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
// XStatusListener
virtual void SAL_CALL statusChanged( const css::frame::FeatureStateEvent& rEvent ) throw ( css::uno::RuntimeException, std::exception ) override;
@@ -355,7 +355,7 @@ css::uno::Sequence< OUString > SaveToolbarController::getSupportedServiceNames()
class NewToolbarController : public PopupMenuToolbarController
{
public:
- NewToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ explicit NewToolbarController( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
// XServiceInfo
OUString SAL_CALL getImplementationName()
diff --git a/framework/source/uielement/saveasmenucontroller.cxx b/framework/source/uielement/saveasmenucontroller.cxx
index 3df48db..012a630 100644
--- a/framework/source/uielement/saveasmenucontroller.cxx
+++ b/framework/source/uielement/saveasmenucontroller.cxx
@@ -45,7 +45,7 @@ class SaveAsMenuController : public svt::PopupMenuControllerBase
using svt::PopupMenuControllerBase::disposing;
public:
- SaveAsMenuController( const uno::Reference< uno::XComponentContext >& xContext );
+ explicit SaveAsMenuController( const uno::Reference< uno::XComponentContext >& xContext );
virtual ~SaveAsMenuController();
// XServiceInfo
diff --git a/framework/source/uifactory/addonstoolbarfactory.cxx b/framework/source/uifactory/addonstoolbarfactory.cxx
index 11be460..c1356d5 100644
--- a/framework/source/uifactory/addonstoolbarfactory.cxx
+++ b/framework/source/uifactory/addonstoolbarfactory.cxx
@@ -54,7 +54,7 @@ class AddonsToolBarFactory : public ::cppu::WeakImplHelper< css::lang::XService
css::ui::XUIElementFactory >
{
public:
- AddonsToolBarFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ explicit AddonsToolBarFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual ~AddonsToolBarFactory();
virtual OUString SAL_CALL getImplementationName()
diff --git a/framework/source/uifactory/statusbarfactory.cxx b/framework/source/uifactory/statusbarfactory.cxx
index 0741348..e6b89a0 100644
--- a/framework/source/uifactory/statusbarfactory.cxx
+++ b/framework/source/uifactory/statusbarfactory.cxx
@@ -40,7 +40,7 @@ namespace {
class StatusBarFactory : public MenuBarFactory
{
public:
- StatusBarFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ explicit StatusBarFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override
diff --git a/framework/source/uifactory/toolbarfactory.cxx b/framework/source/uifactory/toolbarfactory.cxx
index ceccc55..a849966 100644
--- a/framework/source/uifactory/toolbarfactory.cxx
+++ b/framework/source/uifactory/toolbarfactory.cxx
@@ -38,7 +38,7 @@ namespace {
class ToolBarFactory : public MenuBarFactory
{
public:
- ToolBarFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ explicit ToolBarFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override
diff --git a/framework/source/uifactory/uicontrollerfactory.cxx b/framework/source/uifactory/uicontrollerfactory.cxx
index 1d25f44..e62c171 100644
--- a/framework/source/uifactory/uicontrollerfactory.cxx
+++ b/framework/source/uifactory/uicontrollerfactory.cxx
@@ -246,7 +246,7 @@ throw (RuntimeException, std::exception)
class PopupMenuControllerFactory : public UIControllerFactory
{
public:
- PopupMenuControllerFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ explicit PopupMenuControllerFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override
@@ -297,7 +297,7 @@ struct PopupMenuControllerFactorySingleton:
class ToolbarControllerFactory : public UIControllerFactory
{
public:
- ToolbarControllerFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ explicit ToolbarControllerFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override
@@ -348,7 +348,7 @@ struct ToolbarControllerFactorySingleton:
class StatusbarControllerFactory : public UIControllerFactory
{
public:
- StatusbarControllerFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext );
+ explicit StatusbarControllerFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override
diff --git a/framework/source/uifactory/uielementfactorymanager.cxx b/framework/source/uifactory/uielementfactorymanager.cxx
index 70fa223..5e4dc6d 100644
--- a/framework/source/uifactory/uielementfactorymanager.cxx
+++ b/framework/source/uifactory/uielementfactorymanager.cxx
@@ -356,7 +356,7 @@ class UIElementFactoryManager : private cppu::BaseMutex,
{
virtual void SAL_CALL disposing() override;
public:
- UIElementFactoryManager( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+ explicit UIElementFactoryManager( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
virtual ~UIElementFactoryManager();
virtual OUString SAL_CALL getImplementationName()
diff --git a/framework/source/uifactory/windowcontentfactorymanager.cxx b/framework/source/uifactory/windowcontentfactorymanager.cxx
index ebbc036..d9a1c7a 100644
--- a/framework/source/uifactory/windowcontentfactorymanager.cxx
+++ b/framework/source/uifactory/windowcontentfactorymanager.cxx
@@ -48,7 +48,7 @@ class WindowContentFactoryManager : private cppu::BaseMutex,
public WindowContentFactoryManager_BASE
{
public:
- WindowContentFactoryManager( const css::uno::Reference< css::uno::XComponentContext>& rxContext );
+ explicit WindowContentFactoryManager( const css::uno::Reference< css::uno::XComponentContext>& rxContext );
virtual ~WindowContentFactoryManager();
virtual OUString SAL_CALL getImplementationName()
More information about the Libreoffice-commits
mailing list