[Libreoffice-commits] core.git: basic/source canvas/source chart2/source compilerplugins/clang connectivity/source cppcanvas/source dbaccess/source drawinglayer/source filter/source formula/source include/oox include/svx oox/source sc/qa sc/source sd/source sfx2/source shell/source slideshow/source svgio/source svtools/source svx/source sw/source toolkit/source unoxml/source vcl/opengl vcl/qa vcl/source writerfilter/source xmloff/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 26 20:33:57 UTC 2020
basic/source/classes/sbunoobj.cxx | 6
canvas/source/vcl/canvasbitmaphelper.cxx | 2
canvas/source/vcl/canvashelper.cxx | 10
canvas/source/vcl/canvashelper_texturefill.cxx | 2
canvas/source/vcl/impltools.hxx | 2
chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx | 4
chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx | 2
chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx | 2
chart2/source/controller/dialogs/DataBrowser.cxx | 10
chart2/source/controller/dialogs/DialogModel.cxx | 2
chart2/source/controller/main/ChartController.cxx | 4
chart2/source/view/main/ChartView.cxx | 6
compilerplugins/clang/plugin.cxx | 6
compilerplugins/clang/plugin.hxx | 1
compilerplugins/clang/sharedvisitor/dummyplugin.hxx | 7
compilerplugins/clang/simplifypointertobool.cxx | 334 +++++++++-
compilerplugins/clang/test/simplifypointertobool.cxx | 15
connectivity/source/commontools/TTableHelper.cxx | 6
connectivity/source/drivers/hsqldb/HStorageAccess.cxx | 18
connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx | 6
connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx | 4
connectivity/source/parse/sqliterator.cxx | 4
cppcanvas/source/mtfrenderer/implrenderer.cxx | 2
dbaccess/source/core/dataaccess/ModelImpl.cxx | 4
dbaccess/source/sdbtools/connection/objectnames.cxx | 2
dbaccess/source/ui/control/ColumnControlWindow.cxx | 2
dbaccess/source/ui/control/FieldDescControl.cxx | 8
dbaccess/source/ui/control/RelationControl.cxx | 2
dbaccess/source/ui/misc/HtmlReader.cxx | 4
dbaccess/source/ui/misc/UITools.cxx | 6
dbaccess/source/ui/misc/WCPage.cxx | 2
dbaccess/source/ui/misc/WCopyTable.cxx | 10
dbaccess/source/ui/misc/WNameMatch.cxx | 2
dbaccess/source/ui/tabledesign/FieldDescriptions.cxx | 8
dbaccess/source/ui/tabledesign/TEditControl.cxx | 4
dbaccess/source/ui/tabledesign/TableController.cxx | 4
dbaccess/source/ui/tabledesign/TableRow.cxx | 2
dbaccess/source/ui/uno/ColumnPeer.cxx | 2
drawinglayer/source/primitive2d/graphicprimitive2d.cxx | 2
drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx | 2
drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx | 2
drawinglayer/source/primitive3d/modifiedcolorprimitive3d.cxx | 2
drawinglayer/source/processor2d/vclprocessor2d.cxx | 2
drawinglayer/source/processor3d/defaultprocessor3d.cxx | 2
drawinglayer/source/processor3d/zbufferprocessor3d.cxx | 10
filter/source/msfilter/mstoolbar.cxx | 6
formula/source/core/api/FormulaCompiler.cxx | 2
formula/source/ui/dlg/formula.cxx | 2
include/oox/dump/dumperbase.hxx | 6
include/svx/sdr/attribute/sdrallfillattributeshelper.hxx | 2
oox/source/core/filterbase.cxx | 4
oox/source/drawingml/chart/chartdrawingfragment.cxx | 6
oox/source/drawingml/chart/objectformatter.cxx | 6
oox/source/drawingml/chart/seriesconverter.cxx | 2
oox/source/drawingml/shape.cxx | 12
oox/source/drawingml/shapecontext.cxx | 2
oox/source/drawingml/shapegroupcontext.cxx | 2
oox/source/drawingml/table/tablecell.cxx | 6
oox/source/drawingml/textbody.cxx | 4
oox/source/drawingml/textparagraph.cxx | 4
oox/source/drawingml/textparagraphpropertiescontext.cxx | 2
oox/source/drawingml/themeelementscontext.cxx | 6
oox/source/dump/dumperbase.cxx | 22
oox/source/dump/oledumper.cxx | 2
oox/source/helper/storagebase.cxx | 10
oox/source/ole/axcontrol.cxx | 6
oox/source/ole/olestorage.cxx | 4
oox/source/ole/vbacontrol.cxx | 28
oox/source/ole/vbaproject.cxx | 2
oox/source/ppt/pptgraphicshapecontext.cxx | 8
oox/source/ppt/pptshape.cxx | 62 -
oox/source/ppt/pptshapecontext.cxx | 4
oox/source/ppt/presentationfragmenthandler.cxx | 6
oox/source/ppt/slidefragmenthandler.cxx | 2
oox/source/shape/ShapeFilterBase.cxx | 2
sc/qa/unit/ucalc_formula.cxx | 2
sc/source/core/data/postit.cxx | 10
sc/source/core/tool/compiler.cxx | 2
sc/source/core/tool/interpr1.cxx | 2
sc/source/filter/excel/excimp8.cxx | 2
sc/source/filter/excel/xecontent.cxx | 22
sc/source/filter/excel/xeformula.cxx | 6
sc/source/filter/excel/xelink.cxx | 2
sc/source/filter/excel/xihelper.cxx | 8
sc/source/filter/excel/xistyle.cxx | 2
sc/source/filter/excel/xlroot.cxx | 6
sc/source/filter/excel/xltoolbar.cxx | 2
sc/source/filter/oox/autofilterbuffer.cxx | 4
sc/source/filter/oox/commentsbuffer.cxx | 2
sc/source/filter/oox/commentsfragment.cxx | 4
sc/source/filter/oox/condformatbuffer.cxx | 6
sc/source/filter/oox/condformatcontext.cxx | 10
sc/source/filter/oox/drawingfragment.cxx | 2
sc/source/filter/oox/excelfilter.cxx | 2
sc/source/filter/oox/externallinkfragment.cxx | 16
sc/source/filter/oox/formulaparser.cxx | 4
sc/source/filter/oox/pivotcachefragment.cxx | 2
sc/source/filter/oox/querytablebuffer.cxx | 4
sc/source/filter/oox/richstring.cxx | 8
sc/source/filter/oox/richstringcontext.cxx | 6
sc/source/filter/oox/sheetdatabuffer.cxx | 2
sc/source/filter/oox/sheetdatacontext.cxx | 2
sc/source/filter/oox/stylesbuffer.cxx | 28
sc/source/filter/oox/stylesfragment.cxx | 16
sc/source/filter/oox/workbookfragment.cxx | 4
sc/source/filter/oox/workbookhelper.cxx | 2
sc/source/filter/oox/worksheethelper.cxx | 4
sc/source/filter/xml/xmlexprt.cxx | 2
sc/source/ui/docshell/externalrefmgr.cxx | 18
sc/source/ui/miscdlgs/retypepassdlg.cxx | 4
sc/source/ui/undo/undocell.cxx | 2
sc/source/ui/unoobj/tokenuno.cxx | 4
sd/source/core/CustomAnimationEffect.cxx | 24
sd/source/core/CustomAnimationPreset.cxx | 14
sd/source/core/EffectMigration.cxx | 18
sd/source/core/sdpage_animations.cxx | 2
sd/source/core/undoanim.cxx | 10
sd/source/filter/ppt/ppt97animations.cxx | 4
sd/source/filter/ppt/pptin.cxx | 4
sd/source/ui/animations/CustomAnimationDialog.cxx | 2
sd/source/ui/animations/CustomAnimationList.cxx | 20
sd/source/ui/animations/CustomAnimationPane.cxx | 44 -
sd/source/ui/annotations/annotationmanager.cxx | 6
sd/source/ui/docshell/docshell.cxx | 2
sd/source/ui/func/fuconbez.cxx | 2
sd/source/ui/func/fuformatpaintbrush.cxx | 4
sd/source/ui/slideshow/slideshow.cxx | 10
sd/source/ui/slideshow/slideshowimpl.cxx | 40 -
sd/source/ui/slideshow/slideshowviewimpl.cxx | 4
sd/source/ui/table/TableDesignPane.cxx | 18
sd/source/ui/view/OutlinerIterator.cxx | 6
sd/source/ui/view/viewoverlaymanager.cxx | 2
sfx2/source/doc/docinf.cxx | 6
sfx2/source/doc/oleprops.cxx | 4
sfx2/source/doc/sfxbasemodel.cxx | 4
shell/source/sessioninstall/SyncDbusSessionHelper.cxx | 2
slideshow/source/engine/animationnodes/generateevent.cxx | 8
slideshow/source/engine/slideshowimpl.cxx | 2
slideshow/source/engine/transitions/slidetransitionfactory.cxx | 2
svgio/source/svgreader/svgimagenode.cxx | 2
svtools/source/dialogs/PlaceEditDialog.cxx | 6
svx/source/customshapes/EnhancedCustomShape2d.cxx | 2
svx/source/dialog/imapwnd.cxx | 2
svx/source/dialog/pagectrl.cxx | 2
svx/source/sdr/attribute/sdrallfillattributeshelper.cxx | 14
svx/source/svdraw/svdograf.cxx | 2
svx/source/table/tablertfimporter.cxx | 2
sw/source/core/attr/format.cxx | 8
sw/source/core/doc/number.cxx | 4
sw/source/core/doc/swstylemanager.cxx | 6
sw/source/core/docnode/ndnotxt.cxx | 2
sw/source/core/docnode/node.cxx | 2
sw/source/core/layout/atrfrm.cxx | 6
sw/source/core/layout/fly.cxx | 2
sw/source/core/layout/flylay.cxx | 2
sw/source/core/layout/frmtool.cxx | 2
sw/source/core/layout/paintfrm.cxx | 14
sw/source/core/text/txtfld.cxx | 2
sw/source/core/txtnode/fntcache.cxx | 2
sw/source/core/txtnode/ndtxt.cxx | 8
sw/source/core/txtnode/thints.cxx | 2
sw/source/core/txtnode/txtedt.cxx | 8
sw/source/core/undo/docundo.cxx | 2
sw/source/core/unocore/unoobj.cxx | 2
sw/source/core/unocore/unostyle.cxx | 6
sw/source/filter/html/htmlatr.cxx | 2
sw/source/filter/html/htmltab.cxx | 2
sw/source/filter/html/swhtml.cxx | 4
sw/source/filter/ww8/docxattributeoutput.cxx | 4
sw/source/filter/ww8/ww8par.cxx | 2
sw/source/filter/ww8/ww8toolbar.cxx | 10
sw/source/ui/vba/vbadocumentproperties.cxx | 6
sw/source/uibase/app/apphdl.cxx | 2
sw/source/uibase/docvw/edtwin.cxx | 4
sw/source/uibase/frmdlg/colex.cxx | 2
toolkit/source/awt/vclxprinter.cxx | 6
unoxml/source/rdf/librdf_repository.cxx | 6
vcl/opengl/salbmp.cxx | 2
vcl/qa/cppunit/graphicfilter/filters-test.cxx | 2
vcl/source/gdi/impgraph.cxx | 34 -
vcl/source/gdi/pdfextoutdevdata.cxx | 4
vcl/source/gdi/pdfwriter_impl.cxx | 6
vcl/source/gdi/region.cxx | 2
vcl/source/graphic/UnoGraphicProvider.cxx | 2
writerfilter/source/filter/WriterFilter.cxx | 2
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 2
xmloff/source/core/RDFaImportHelper.cxx | 4
xmloff/source/table/XMLTableExport.cxx | 6
xmloff/source/table/XMLTableImport.cxx | 2
189 files changed, 912 insertions(+), 577 deletions(-)
New commits:
commit fe6cce01c88d045a1fcf09acf049c34c22299b02
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue May 26 20:42:08 2020 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue May 26 22:33:02 2020 +0200
Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptr
...where the get member function is defined on a std::__shared_ptr base class,
so loplugin:simplifypointertobool used to miss those until now. (While e.g.
using libc++ on macOS found those cases.)
366d08f2f6d4de922f6099c62bb81b49d89e0a68 "new loplugin:simplifypointertobool"
was mistaken in breaking isSmartPointerType(const clang::Type* t) out of
isSmartPointerType(const Expr* e); c874294ad9fb178df47c66875bfbdec466e39763 "Fix
detection of std::unique_ptr/shared_ptr in loplugin:redundantpointerops" had
introduced that indivisible two-step algorithm on purpose.
The amount of additional hits (on Linux) apparently asked for turning
loplugin:simplifypointertobool into a rewriting plugin. Which in turn showed
that the naive adivce to just "drop the get()" is not sufficient in places that
are not contextually converted to bool, as those places need to be wrapped in a
bool(...) functional cast now. If the expression was already wrapped in
parentheses, those could be reused as part of the functional cast, but
implementing that showed that such cases are not yet found at all by the
existing loplugin:simplifypointertobool. Lets leave that TODO for another
commit.
Besides the changes to compilerplugins/ itself, this change has been generated
fully automatically with the rewriting plugin on Linux.
Change-Id: I83107d6f634fc9ac232986f49044d7017df83e2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94888
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Tested-by: Jenkins
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index dc3e97619c73..3f5da99a6d5f 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -2044,7 +2044,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
try
{
- if ( maStructInfo.get() )
+ if ( maStructInfo )
{
StructRefInfo aMember = maStructInfo->getStructMember( pProp->GetName() );
if ( aMember.isEmpty() )
@@ -2121,7 +2121,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
StarBASIC::Error( ERRCODE_BASIC_PROP_READONLY );
return;
}
- if ( maStructInfo.get() )
+ if ( maStructInfo )
{
StructRefInfo aMember = maStructInfo->getStructMember( pProp->GetName() );
if ( aMember.isEmpty() )
@@ -2840,7 +2840,7 @@ Any SbUnoObject::getUnoAny()
{
Any aRetAny;
if( bNeedIntrospection ) doIntrospection();
- if ( maStructInfo.get() )
+ if ( maStructInfo )
aRetAny = maTmpUnoObj;
else if( mxMaterialHolder.is() )
aRetAny = mxMaterialHolder->getMaterial();
diff --git a/canvas/source/vcl/canvasbitmaphelper.cxx b/canvas/source/vcl/canvasbitmaphelper.cxx
index 43fed2754430..336c12b83047 100644
--- a/canvas/source/vcl/canvasbitmaphelper.cxx
+++ b/canvas/source/vcl/canvasbitmaphelper.cxx
@@ -155,7 +155,7 @@ namespace vclcanvas
rendering::IntegerBitmapLayout CanvasBitmapHelper::getMemoryLayout() const
{
- if( !mpOutDevProvider.get() )
+ if( !mpOutDevProvider )
return rendering::IntegerBitmapLayout(); // we're disposed
rendering::IntegerBitmapLayout aBitmapLayout( ::canvas::tools::getStdMemoryLayout(getSize()) );
diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx
index 17930a1a758d..07dc45574e64 100644
--- a/canvas/source/vcl/canvashelper.cxx
+++ b/canvas/source/vcl/canvashelper.cxx
@@ -867,7 +867,7 @@ namespace vclcanvas
geometry::IntegerSize2D CanvasHelper::getSize()
{
- if( !mpOutDevProvider.get() )
+ if( !mpOutDevProvider )
return geometry::IntegerSize2D(); // we're disposed
return vcl::unotools::integerSize2DFromSize( mpOutDevProvider->getOutDev().GetOutputSizePixel() );
@@ -876,7 +876,7 @@ namespace vclcanvas
uno::Reference< rendering::XBitmap > CanvasHelper::getScaledBitmap( const geometry::RealSize2D& newSize,
bool beFast )
{
- if( !mpOutDevProvider.get() || !mpDevice )
+ if( !mpOutDevProvider || !mpDevice )
return uno::Reference< rendering::XBitmap >(); // we're disposed
OutputDevice& rOutDev( mpOutDevProvider->getOutDev() );
@@ -901,7 +901,7 @@ namespace vclcanvas
uno::Sequence< sal_Int8 > CanvasHelper::getData( rendering::IntegerBitmapLayout& rLayout,
const geometry::IntegerRectangle2D& rect )
{
- if( !mpOutDevProvider.get() )
+ if( !mpOutDevProvider )
return uno::Sequence< sal_Int8 >(); // we're disposed
rLayout = getMemoryLayout();
@@ -951,7 +951,7 @@ namespace vclcanvas
uno::Sequence< sal_Int8 > CanvasHelper::getPixel( rendering::IntegerBitmapLayout& rLayout,
const geometry::IntegerPoint2D& pos )
{
- if( !mpOutDevProvider.get() )
+ if( !mpOutDevProvider )
return uno::Sequence< sal_Int8 >(); // we're disposed
rLayout = getMemoryLayout();
@@ -980,7 +980,7 @@ namespace vclcanvas
rendering::IntegerBitmapLayout CanvasHelper::getMemoryLayout()
{
- if( !mpOutDevProvider.get() )
+ if( !mpOutDevProvider )
return rendering::IntegerBitmapLayout(); // we're disposed
rendering::IntegerBitmapLayout aBitmapLayout( ::canvas::tools::getStdMemoryLayout(getSize()) );
diff --git a/canvas/source/vcl/canvashelper_texturefill.cxx b/canvas/source/vcl/canvashelper_texturefill.cxx
index 646cef28aac6..9cb8dd8abd99 100644
--- a/canvas/source/vcl/canvashelper_texturefill.cxx
+++ b/canvas/source/vcl/canvashelper_texturefill.cxx
@@ -608,7 +608,7 @@ namespace vclcanvas
// TODO(E1): Return value
// TODO(F1): FillRule
gradientFill( mpOutDevProvider->getOutDev(),
- mp2ndOutDevProvider.get() ? &mp2ndOutDevProvider->getOutDev() : nullptr,
+ mp2ndOutDevProvider ? &mp2ndOutDevProvider->getOutDev() : nullptr,
rValues,
aColors,
aPolyPoly,
diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx
index eb4918c68459..f20b052d5534 100644
--- a/canvas/source/vcl/impltools.hxx
+++ b/canvas/source/vcl/impltools.hxx
@@ -127,7 +127,7 @@ namespace vclcanvas
}
explicit OutDevStateKeeper( const OutDevProviderSharedPtr& rOutDev ) :
- mpOutDev( rOutDev.get() ? &(rOutDev->getOutDev()) : nullptr ),
+ mpOutDev( rOutDev ? &(rOutDev->getOutDev()) : nullptr ),
mbMappingWasEnabled( mpOutDev && mpOutDev->IsMapModeEnabled() ),
mnAntiAliasing( mpOutDev ? mpOutDev->GetAntialiasing() : AntialiasingFlags::NONE )
{
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx
index 84c477678a28..26c260ffc0b3 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSeriesOrDiagramProperty.hxx
@@ -64,7 +64,7 @@ public:
bool bHasDetectableInnerValue = false;
rHasAmbiguousValue = false;
if( m_ePropertyType == DIAGRAM &&
- m_spChart2ModelContact.get() )
+ m_spChart2ModelContact )
{
std::vector< css::uno::Reference< css::chart2::XDataSeries > > aSeriesVector(
::chart::DiagramHelper::getDataSeriesFromDiagram( m_spChart2ModelContact->getChart2Diagram() ) );
@@ -91,7 +91,7 @@ public:
void setInnerValue( PROPERTYTYPE aNewValue ) const
{
if( m_ePropertyType == DIAGRAM &&
- m_spChart2ModelContact.get() )
+ m_spChart2ModelContact )
{
std::vector< css::uno::Reference< css::chart2::XDataSeries > > aSeriesVector(
::chart::DiagramHelper::getDataSeriesFromDiagram( m_spChart2ModelContact->getChart2Diagram() ) );
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index abcbc1f016ec..6e12bea50e0a 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -124,7 +124,7 @@ uno::Reference< chart2::data::XDataProvider > lcl_getDataProviderFromContact(
const std::shared_ptr< Chart2ModelContact >& spChart2ModelContact )
{
uno::Reference< chart2::data::XDataProvider > xResult;
- if( spChart2ModelContact.get())
+ if( spChart2ModelContact)
{
uno::Reference< chart2::XChartDocument > xChartDoc(
spChart2ModelContact->getChart2Document());
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index 95759509c563..4dfabee4836f 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -283,7 +283,7 @@ beans::PropertyState WrappedSymbolTypeProperty::getPropertyState( const Referenc
//so we need to return PropertyState_DIRECT_VALUE for more cases
if( m_ePropertyType == DATA_SERIES && //single series or point
- m_spChart2ModelContact.get())
+ m_spChart2ModelContact)
{
Reference< chart2::XDiagram > xDiagram( m_spChart2ModelContact->getChart2Diagram() );
Reference< chart2::XDataSeries > xSeries( xInnerPropertyState, uno::UNO_QUERY );
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 785a1d16528c..0aaccdea65cf 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -711,7 +711,7 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const
Color nLabelColor;
if( ! std::isnan( fData ) &&
- m_spNumberFormatterWrapper.get() )
+ m_spNumberFormatterWrapper )
{
bool bColorChanged = false;
aResult = m_spNumberFormatterWrapper->getFormattedString(
@@ -728,7 +728,7 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const
aResult = aText;
else if( aAny>>=fDouble )
{
- if( ! std::isnan( fDouble ) && m_spNumberFormatterWrapper.get() )
+ if( ! std::isnan( fDouble ) && m_spNumberFormatterWrapper )
{
// If a numberformat was available here we could directly
// obtain the corresponding edit format in
@@ -831,7 +831,7 @@ bool DataBrowser::IsDataValid() const
OUString aText( m_aNumberEditField->GetText());
if( !aText.isEmpty() &&
- m_spNumberFormatterWrapper.get() &&
+ m_spNumberFormatterWrapper &&
m_spNumberFormatterWrapper->getSvNumberFormatter() &&
! m_spNumberFormatterWrapper->getSvNumberFormatter()->IsNumberFormat(
aText, nDummy, fDummy ))
@@ -1165,7 +1165,7 @@ sal_uInt32 DataBrowser::GetNumberFormatKey( sal_uInt16 nCol ) const
bool DataBrowser::isDateTimeString( const OUString& aInputString, double& fOutDateTimeValue )
{
sal_uInt32 nNumberFormat=0;
- SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : nullptr;
+ SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper ? m_spNumberFormatterWrapper->getSvNumberFormatter() : nullptr;
if( !aInputString.isEmpty() && pSvNumberFormatter && pSvNumberFormatter->IsNumberFormat( aInputString, nNumberFormat, fOutDateTimeValue ) )
{
SvNumFormatType nType = pSvNumberFormatter->GetType( nNumberFormat);
@@ -1186,7 +1186,7 @@ bool DataBrowser::SaveModified()
OSL_ENSURE( nRow >= 0 || nCol >= 0, "This cell should not be modified!" );
- SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : nullptr;
+ SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper ? m_spNumberFormatterWrapper->getSvNumberFormatter() : nullptr;
switch( m_apDataBrowserModel->getCellType( nCol ))
{
case DataBrowserModel::NUMBER:
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index 5c8678bc9f5b..b4bdbae6501e 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -393,7 +393,7 @@ void DialogModel::setTemplate(
std::shared_ptr< RangeSelectionHelper > const &
DialogModel::getRangeSelectionHelper() const
{
- if( ! m_spRangeSelectionHelper.get())
+ if( ! m_spRangeSelectionHelper)
m_spRangeSelectionHelper =
std::make_shared<RangeSelectionHelper>( m_xChartDocument );
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index ad6e94ee1f0c..f81b261182fa 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1460,12 +1460,12 @@ void ChartController::NotifyUndoActionHdl( std::unique_ptr<SdrUndoAction> pUndoA
DrawModelWrapper* ChartController::GetDrawModelWrapper()
{
- if( !m_pDrawModelWrapper.get() )
+ if( !m_pDrawModelWrapper )
{
ExplicitValueProvider* pProvider = comphelper::getUnoTunnelImplementation<ExplicitValueProvider>( m_xChartView );
if( pProvider )
m_pDrawModelWrapper = pProvider->getDrawModelWrapper();
- if ( m_pDrawModelWrapper.get() )
+ if ( m_pDrawModelWrapper )
{
m_pDrawModelWrapper->getSdrModel().SetNotifyUndoActionHdl(
std::bind(&ChartController::NotifyUndoActionHdl, this, std::placeholders::_1) );
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index d3b0e8832e36..f168e7e0b2df 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1064,7 +1064,7 @@ ChartView::ChartView(
void ChartView::init()
{
- if( !m_pDrawModelWrapper.get() )
+ if( !m_pDrawModelWrapper )
{
SolarMutexGuard aSolarGuard;
m_pDrawModelWrapper = std::make_shared< DrawModelWrapper >();
@@ -1088,7 +1088,7 @@ ChartView::~ChartView()
if ( xComp.is() )
xComp->dispose();
- if( m_pDrawModelWrapper.get() )
+ if( m_pDrawModelWrapper )
{
SolarMutexGuard aSolarGuard;
EndListening( m_pDrawModelWrapper->getSdrModel() );
@@ -1395,7 +1395,7 @@ void lcl_setDefaultWritingMode( const std::shared_ptr< DrawModelWrapper >& pDraw
}
if( nWritingMode != -1 && nWritingMode != text::WritingMode2::PAGE )
{
- if( pDrawModelWrapper.get() )
+ if( pDrawModelWrapper )
pDrawModelWrapper->GetItemPool().SetPoolDefaultItem(SvxFrameDirectionItem(static_cast<SvxFrameDirection>(nWritingMode), EE_PARA_WRITINGDIR) );
}
}
diff --git a/compilerplugins/clang/plugin.cxx b/compilerplugins/clang/plugin.cxx
index 0ffab3ba36bd..5248927e5d84 100644
--- a/compilerplugins/clang/plugin.cxx
+++ b/compilerplugins/clang/plugin.cxx
@@ -837,17 +837,13 @@ bool isSmartPointerType(const Expr* e)
if (tc1.ClassOrStruct("unique_ptr").StdNamespace()
|| tc1.ClassOrStruct("shared_ptr").StdNamespace())
return true;
- return isSmartPointerType(e->getType().getTypePtr());
-}
-bool isSmartPointerType(const clang::Type* t)
-{
// Then check the object type coerced to the type of the get member function, in
// case the type-as-written is derived from one of these types (tools::SvRef is
// final, but the rest are not; but note that this will fail when the type-as-
// written is derived from std::unique_ptr or std::shared_ptr for which the get
// member function is declared at a base class):
- auto const tc2 = loplugin::TypeCheck(t);
+ auto const tc2 = loplugin::TypeCheck(e->getType());
if (tc2.ClassOrStruct("unique_ptr").StdNamespace()
|| tc2.ClassOrStruct("shared_ptr").StdNamespace()
|| tc2.Class("Reference").Namespace("uno").Namespace("star")
diff --git a/compilerplugins/clang/plugin.hxx b/compilerplugins/clang/plugin.hxx
index 2d43371feede..66d22adf97d6 100644
--- a/compilerplugins/clang/plugin.hxx
+++ b/compilerplugins/clang/plugin.hxx
@@ -319,7 +319,6 @@ int derivedFromCount(const CXXRecordDecl* subtypeRecord, const CXXRecordDecl* ba
// if it contained the 'extern' specifier:
bool hasExternalLinkage(VarDecl const * decl);
-bool isSmartPointerType(const clang::Type*);
bool isSmartPointerType(const Expr*);
} // namespace
diff --git a/compilerplugins/clang/sharedvisitor/dummyplugin.hxx b/compilerplugins/clang/sharedvisitor/dummyplugin.hxx
index ce5b352384b1..b24157965df2 100644
--- a/compilerplugins/clang/sharedvisitor/dummyplugin.hxx
+++ b/compilerplugins/clang/sharedvisitor/dummyplugin.hxx
@@ -37,8 +37,15 @@ public:
bool TraverseDecl( Decl* ) { return complain(); }
bool TraverseLinkageSpecDecl( LinkageSpecDecl* ) { return complain(); }
bool TraverseStmt( Stmt* ) { return complain(); }
+ bool TraverseIfStmt( IfStmt* ) { return complain(); }
+ bool TraverseWhileStmt( WhileStmt* ) { return complain(); }
+ bool TraverseDoStmt( DoStmt* ) { return complain(); }
+ bool TraverseForStmt( ForStmt* ) { return complain(); }
+ bool TraverseParenExpr( ParenExpr* ) { return complain(); }
bool TraverseUnaryLNot( UnaryOperator* ) { return complain(); }
bool TraverseBinLAnd( BinaryOperator* ) { return complain(); }
+ bool TraverseBinLOr( BinaryOperator* ) { return complain(); }
+ bool TraverseConditionalOperator( ConditionalOperator* ) { return complain(); }
bool TraverseCXXCatchStmt( CXXCatchStmt* ) { return complain(); }
bool TraverseCXXDestructorDecl( CXXDestructorDecl* ) { return complain(); }
bool TraverseFunctionDecl( FunctionDecl* ) { return complain(); }
diff --git a/compilerplugins/clang/simplifypointertobool.cxx b/compilerplugins/clang/simplifypointertobool.cxx
index da6581915a1e..4fc4901c3efe 100644
--- a/compilerplugins/clang/simplifypointertobool.cxx
+++ b/compilerplugins/clang/simplifypointertobool.cxx
@@ -7,7 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <algorithm>
#include <cassert>
+#include <deque>
+#include <stack>
#include <string>
#include <iostream>
#include <fstream>
@@ -16,6 +19,7 @@
#include <clang/AST/CXXInheritance.h>
#include "plugin.hxx"
#include "check.hxx"
+#include "compat.hxx"
/**
Simplify boolean expressions involving smart pointers e.g.
@@ -27,11 +31,11 @@
namespace
{
-class SimplifyPointerToBool : public loplugin::FilteringPlugin<SimplifyPointerToBool>
+class SimplifyPointerToBool : public loplugin::FilteringRewritePlugin<SimplifyPointerToBool>
{
public:
explicit SimplifyPointerToBool(loplugin::InstantiationData const& data)
- : FilteringPlugin(data)
+ : FilteringRewritePlugin(data)
{
}
@@ -42,6 +46,280 @@ public:
}
bool VisitImplicitCastExpr(ImplicitCastExpr const*);
+
+ bool PreTraverseUnaryLNot(UnaryOperator* expr)
+ {
+ contextuallyConvertedExprs_.push_back(expr->getSubExpr()->IgnoreParenImpCasts());
+ return true;
+ }
+
+ bool PostTraverseUnaryLNot(UnaryOperator*, bool)
+ {
+ assert(!contextuallyConvertedExprs_.empty());
+ contextuallyConvertedExprs_.pop_back();
+ return true;
+ }
+
+ bool TraverseUnaryLNot(UnaryOperator* expr)
+ {
+ auto res = PreTraverseUnaryLNot(expr);
+ assert(res);
+ res = FilteringRewritePlugin::TraverseUnaryLNot(expr);
+ PostTraverseUnaryLNot(expr, res);
+ return res;
+ }
+
+ bool PreTraverseBinLAnd(BinaryOperator* expr)
+ {
+ contextuallyConvertedExprs_.push_back(expr->getLHS()->IgnoreParenImpCasts());
+ contextuallyConvertedExprs_.push_back(expr->getRHS()->IgnoreParenImpCasts());
+ return true;
+ }
+
+ bool PostTraverseBinLAnd(BinaryOperator*, bool)
+ {
+ assert(contextuallyConvertedExprs_.size() >= 2);
+ contextuallyConvertedExprs_.pop_back();
+ contextuallyConvertedExprs_.pop_back();
+ return true;
+ }
+
+ bool TraverseBinLAnd(BinaryOperator* expr)
+ {
+ auto res = PreTraverseBinLAnd(expr);
+ assert(res);
+ res = FilteringRewritePlugin::TraverseBinLAnd(expr);
+ PostTraverseBinLAnd(expr, res);
+ return res;
+ }
+
+ bool PreTraverseBinLOr(BinaryOperator* expr)
+ {
+ contextuallyConvertedExprs_.push_back(expr->getLHS()->IgnoreParenImpCasts());
+ contextuallyConvertedExprs_.push_back(expr->getRHS()->IgnoreParenImpCasts());
+ return true;
+ }
+
+ bool PostTraverseBinLOr(BinaryOperator*, bool)
+ {
+ assert(contextuallyConvertedExprs_.size() >= 2);
+ contextuallyConvertedExprs_.pop_back();
+ contextuallyConvertedExprs_.pop_back();
+ return true;
+ }
+
+ bool TraverseBinLOr(BinaryOperator* expr)
+ {
+ auto res = PreTraverseBinLOr(expr);
+ assert(res);
+ res = FilteringRewritePlugin::TraverseBinLOr(expr);
+ PostTraverseBinLOr(expr, res);
+ return res;
+ }
+
+ bool PreTraverseConditionalOperator(ConditionalOperator* expr)
+ {
+ contextuallyConvertedExprs_.push_back(expr->getCond()->IgnoreParenImpCasts());
+ return true;
+ }
+
+ bool PostTraverseConditionalOperator(ConditionalOperator*, bool)
+ {
+ assert(!contextuallyConvertedExprs_.empty());
+ contextuallyConvertedExprs_.pop_back();
+ return true;
+ }
+
+ bool TraverseConditionalOperator(ConditionalOperator* expr)
+ {
+ auto res = PreTraverseConditionalOperator(expr);
+ assert(res);
+ res = FilteringRewritePlugin::TraverseConditionalOperator(expr);
+ PostTraverseConditionalOperator(expr, res);
+ return res;
+ }
+
+ bool PreTraverseIfStmt(IfStmt* stmt)
+ {
+ contextuallyConvertedExprs_.push_back(stmt->getCond()->IgnoreParenImpCasts());
+ return true;
+ }
+
+ bool PostTraverseIfStmt(IfStmt*, bool)
+ {
+ assert(!contextuallyConvertedExprs_.empty());
+ contextuallyConvertedExprs_.pop_back();
+ return true;
+ }
+
+ bool TraverseIfStmt(IfStmt* stmt)
+ {
+ auto res = PreTraverseIfStmt(stmt);
+ assert(res);
+ res = FilteringRewritePlugin::TraverseIfStmt(stmt);
+ PostTraverseIfStmt(stmt, res);
+ return res;
+ }
+
+ bool PreTraverseWhileStmt(WhileStmt* stmt)
+ {
+ contextuallyConvertedExprs_.push_back(stmt->getCond()->IgnoreParenImpCasts());
+ return true;
+ }
+
+ bool PostTraverseWhileStmt(WhileStmt*, bool)
+ {
+ assert(!contextuallyConvertedExprs_.empty());
+ contextuallyConvertedExprs_.pop_back();
+ return true;
+ }
+
+ bool TraverseWhileStmt(WhileStmt* stmt)
+ {
+ auto res = PreTraverseWhileStmt(stmt);
+ assert(res);
+ res = FilteringRewritePlugin::TraverseWhileStmt(stmt);
+ PostTraverseWhileStmt(stmt, res);
+ return res;
+ }
+
+ bool PreTraverseDoStmt(DoStmt* stmt)
+ {
+ contextuallyConvertedExprs_.push_back(stmt->getCond()->IgnoreParenImpCasts());
+ return true;
+ }
+
+ bool PostTraverseDoStmt(DoStmt*, bool)
+ {
+ assert(!contextuallyConvertedExprs_.empty());
+ contextuallyConvertedExprs_.pop_back();
+ return true;
+ }
+
+ bool TraverseDoStmt(DoStmt* stmt)
+ {
+ auto res = PreTraverseDoStmt(stmt);
+ assert(res);
+ res = FilteringRewritePlugin::TraverseDoStmt(stmt);
+ PostTraverseDoStmt(stmt, res);
+ return res;
+ }
+
+ bool PreTraverseForStmt(ForStmt* stmt)
+ {
+ auto const e = stmt->getCond();
+ if (e != nullptr)
+ {
+ contextuallyConvertedExprs_.push_back(e->IgnoreParenImpCasts());
+ }
+ return true;
+ }
+
+ bool PostTraverseForStmt(ForStmt* stmt, bool)
+ {
+ if (stmt->getCond() != nullptr)
+ {
+ assert(!contextuallyConvertedExprs_.empty());
+ contextuallyConvertedExprs_.pop_back();
+ }
+ return true;
+ }
+
+ bool TraverseForStmt(ForStmt* stmt)
+ {
+ auto res = PreTraverseForStmt(stmt);
+ assert(res);
+ res = FilteringRewritePlugin::TraverseForStmt(stmt);
+ PostTraverseForStmt(stmt, res);
+ return res;
+ }
+
+ bool PreTraverseParenExpr(ParenExpr* expr)
+ {
+ parenExprs_.push(expr);
+ return true;
+ }
+
+ bool PostTraverseParenExpr(ParenExpr*, bool)
+ {
+ assert(!parenExprs_.empty());
+ parenExprs_.pop();
+ return true;
+ }
+
+ bool TraverseParenExpr(ParenExpr* expr)
+ {
+ auto res = PreTraverseParenExpr(expr);
+ assert(res);
+ res = FilteringRewritePlugin::TraverseParenExpr(expr);
+ PostTraverseParenExpr(expr, res);
+ return res;
+ }
+
+private:
+ bool isContextuallyConverted(Expr const* expr) const
+ {
+ return std::find(contextuallyConvertedExprs_.begin(), contextuallyConvertedExprs_.end(),
+ expr)
+ != contextuallyConvertedExprs_.end();
+ }
+
+ // Get the source range starting at the "."or "->" (plus any preceding non-comment white space):
+ SourceRange getCallSourceRange(CXXMemberCallExpr const* expr) const
+ {
+ if (expr->getImplicitObjectArgument() == nullptr)
+ {
+ //TODO: Arguably, such a call of a `get` member function from within some member
+ // function (so that syntactically no caller is mentioned) should already be handled
+ // differently when reporting it (just "drop the get()" does not make sense), instead of
+ // being fitered here:
+ return {};
+ }
+ // CXXMemberCallExpr::getExprLoc happens to return the location following the "." or "->":
+ auto start = compiler.getSourceManager().getSpellingLoc(expr->getExprLoc());
+ if (!start.isValid())
+ {
+ return {};
+ }
+ for (;;)
+ {
+ start = Lexer::GetBeginningOfToken(start.getLocWithOffset(-1),
+ compiler.getSourceManager(), compiler.getLangOpts());
+ auto const s = StringRef(compiler.getSourceManager().getCharacterData(start),
+ Lexer::MeasureTokenLength(start, compiler.getSourceManager(),
+ compiler.getLangOpts()));
+ if (s.empty() || s.startswith("\\\n"))
+ {
+ continue;
+ }
+ if (s != "." && s != "->")
+ {
+ return {};
+ }
+ break;
+ }
+ for (;;)
+ {
+ auto start1 = Lexer::GetBeginningOfToken(
+ start.getLocWithOffset(-1), compiler.getSourceManager(), compiler.getLangOpts());
+ auto const s = StringRef(compiler.getSourceManager().getCharacterData(start1),
+ Lexer::MeasureTokenLength(start1, compiler.getSourceManager(),
+ compiler.getLangOpts()));
+ if (!(s.empty() || s.startswith("\\\n")))
+ {
+ break;
+ }
+ start = start1;
+ }
+ return SourceRange(start,
+ compiler.getSourceManager().getSpellingLoc(compat::getEndLoc(expr)));
+ }
+
+ //TODO: There are some more places where an expression is contextually converted to bool, but
+ // those are probably not relevant for our needs here.
+ std::deque<Expr const*> contextuallyConvertedExprs_;
+
+ std::stack<ParenExpr const*> parenExprs_;
};
bool SimplifyPointerToBool::VisitImplicitCastExpr(ImplicitCastExpr const* castExpr)
@@ -58,7 +336,7 @@ bool SimplifyPointerToBool::VisitImplicitCastExpr(ImplicitCastExpr const* castEx
return true;
// castExpr->dump();
// methodDecl->getParent()->getTypeForDecl()->dump();
- if (!loplugin::isSmartPointerType(methodDecl->getParent()->getTypeForDecl()))
+ if (!loplugin::isSmartPointerType(memberCallExpr->getImplicitObjectArgument()))
return true;
// if (isa<CXXOperatorCallExpr>(callExpr))
// return true;
@@ -104,15 +382,57 @@ bool SimplifyPointerToBool::VisitImplicitCastExpr(ImplicitCastExpr const* castEx
// if (isa<ConditionalOperator>(arg->IgnoreParenImpCasts()))
// continue;
// }
- report(DiagnosticsEngine::Warning, "simplify, drop the get()", castExpr->getExprLoc())
- << castExpr->getSourceRange();
+ if (isContextuallyConverted(memberCallExpr))
+ {
+ if (rewriter)
+ {
+ auto const range = getCallSourceRange(memberCallExpr);
+ if (range.isValid() && removeText(range))
+ {
+ return true;
+ }
+ }
+ report(DiagnosticsEngine::Warning, "simplify, drop the get()", memberCallExpr->getExprLoc())
+ << memberCallExpr->getSourceRange();
+ }
+ else if (!parenExprs_.empty() && parenExprs_.top()->IgnoreImpCasts() == memberCallExpr)
+ {
+ //TODO: attempt rewrite
+ report(DiagnosticsEngine::Warning,
+ "simplify, drop the get() and turn the surrounding parentheses into a functional "
+ "cast to bool",
+ memberCallExpr->getExprLoc())
+ << memberCallExpr->getSourceRange();
+ report(DiagnosticsEngine::Note, "surrounding parentheses here",
+ parenExprs_.top()->getExprLoc())
+ << parenExprs_.top()->getSourceRange();
+ }
+ else
+ {
+ if (rewriter)
+ {
+ auto const loc
+ = compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(memberCallExpr));
+ auto const range = getCallSourceRange(memberCallExpr);
+ if (loc.isValid() && range.isValid() && insertText(loc, "bool(")
+ && replaceText(range, ")"))
+ {
+ //TODO: atomically only change both or neither
+ return true;
+ }
+ }
+ report(DiagnosticsEngine::Warning,
+ "simplify, drop the get() and wrap the expression in a functional cast to bool",
+ memberCallExpr->getExprLoc())
+ << memberCallExpr->getSourceRange();
+ }
// report(DiagnosticsEngine::Note, "method here", param->getLocation())
// << param->getSourceRange();
return true;
}
-loplugin::Plugin::Registration<SimplifyPointerToBool>
- simplifypointertobool("simplifypointertobool");
+loplugin::Plugin::Registration<SimplifyPointerToBool> simplifypointertobool("simplifypointertobool",
+ true);
} // namespace
diff --git a/compilerplugins/clang/test/simplifypointertobool.cxx b/compilerplugins/clang/test/simplifypointertobool.cxx
index 901262c3d474..18e1da607bb8 100644
--- a/compilerplugins/clang/test/simplifypointertobool.cxx
+++ b/compilerplugins/clang/test/simplifypointertobool.cxx
@@ -11,11 +11,24 @@
void foo();
-void test1(std::unique_ptr<int> p2)
+bool test1(std::unique_ptr<int> p2)
{
// expected-error at +1 {{simplify, drop the get() [loplugin:simplifypointertobool]}}
if (p2.get())
foo();
+ // expected-error at +1 {{simplify, drop the get() and wrap the expression in a functional cast to bool [loplugin:simplifypointertobool]}}
+ bool b1 = p2.get();
+ //TODO:
+ bool b2 = ( // deliberately spread across multiple lines
+ p2.get());
+ return b1 && b2;
+}
+
+void test2(std::shared_ptr<int> p)
+{
+ // expected-error at +1 {{simplify, drop the get() [loplugin:simplifypointertobool]}}
+ if (p.get())
+ foo();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index e22740144316..e86af9673052 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -371,7 +371,7 @@ void OTableHelper::refreshForeignKeys(::std::vector< OUString>& _rNames)
{
if ( sOldFKName != sFkName )
{
- if ( pKeyProps.get() )
+ if ( pKeyProps )
m_pImpl->m_aKeys.emplace(sOldFKName,pKeyProps);
const OUString sReferencedName = ::dbtools::composeTableName(getMetaData(),sCatalog,aSchema,aName,false,::dbtools::EComposeRule::InDataManipulation);
@@ -387,13 +387,13 @@ void OTableHelper::refreshForeignKeys(::std::vector< OUString>& _rNames)
} // if ( m_pTables->hasByName(sReferencedName) )
sOldFKName = sFkName;
} // if ( sOldFKName != sFkName )
- else if ( pKeyProps.get() )
+ else if ( pKeyProps )
{
pKeyProps->m_aKeyColumnNames.push_back(sForeignKeyColumn);
}
}
} // while( xResult->next() )
- if ( pKeyProps.get() )
+ if ( pKeyProps )
m_pImpl->m_aKeys.emplace(sOldFKName,pKeyProps);
::comphelper::disposeComponent(xResult);
}
diff --git a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
index 5ea16e7e1c60..60e3fd0ee868 100644
--- a/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageAccess.cxx
@@ -68,7 +68,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ
}
#endif
std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key);
- Reference< XOutputStream> xFlush = pHelper.get() ? pHelper->getOutputStream() : Reference< XOutputStream>();
+ Reference< XOutputStream> xFlush = pHelper ? pHelper->getOutputStream() : Reference< XOutputStream>();
if ( xFlush.is() )
try
{
@@ -108,7 +108,7 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nati
std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key);
OSL_ENSURE(pHelper.get(),"No stream helper!");
- jlong nReturn = pHelper.get() ? pHelper->getSeek()->getPosition() : jlong(0);
+ jlong nReturn = pHelper ? pHelper->getSeek()->getPosition() : jlong(0);
#ifdef HSQLDB_DBG
aOpLog.logReturn( nReturn );
#endif
@@ -132,7 +132,7 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nati
std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key);
OSL_ENSURE(pHelper.get(),"No stream helper!");
- jlong nReturn = pHelper.get() ? pHelper->getSeek()->getLength() :jlong(0);
+ jlong nReturn = pHelper ? pHelper->getSeek()->getLength() :jlong(0);
#ifdef HSQLDB_DBG
aOpLog.logReturn( nReturn );
#endif
@@ -143,7 +143,7 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nati
jint read_from_storage_stream( JNIEnv * env, jstring name, jstring key )
{
std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key);
- Reference< XInputStream> xIn = pHelper.get() ? pHelper->getInputStream() : Reference< XInputStream>();
+ Reference< XInputStream> xIn = pHelper ? pHelper->getInputStream() : Reference< XInputStream>();
OSL_ENSURE(xIn.is(),"Input stream is NULL!");
if ( xIn.is() )
{
@@ -201,7 +201,7 @@ jint read_from_storage_stream_into_buffer( JNIEnv * env, jstring name, jstring k
}
#endif
std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key);
- Reference< XInputStream> xIn = pHelper.get() ? pHelper->getInputStream() : Reference< XInputStream>();
+ Reference< XInputStream> xIn = pHelper ? pHelper->getInputStream() : Reference< XInputStream>();
OSL_ENSURE(xIn.is(),"Input stream is NULL!");
if ( xIn.is() )
{
@@ -274,7 +274,7 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ
#endif
std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key);
- Reference< XInputStream> xIn = pHelper.get() ? pHelper->getInputStream() : Reference< XInputStream>();
+ Reference< XInputStream> xIn = pHelper ? pHelper->getInputStream() : Reference< XInputStream>();
OSL_ENSURE(xIn.is(),"Input stream is NULL!");
if ( xIn.is() )
{
@@ -340,7 +340,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ
#endif
std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key);
- Reference< XSeekable> xSeek = pHelper.get() ? pHelper->getSeek() : Reference< XSeekable>();
+ Reference< XSeekable> xSeek = pHelper ? pHelper->getSeek() : Reference< XSeekable>();
OSL_ENSURE(xSeek.is(),"No Seekable stream!");
if ( !xSeek.is() )
@@ -396,7 +396,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ
void write_to_storage_stream_from_buffer( JNIEnv* env, jstring name, jstring key, jbyteArray buffer, jint off, jint len )
{
std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key);
- Reference< XOutputStream> xOut = pHelper.get() ? pHelper->getOutputStream() : Reference< XOutputStream>();
+ Reference< XOutputStream> xOut = pHelper ? pHelper->getOutputStream() : Reference< XOutputStream>();
OSL_ENSURE(xOut.is(),"Stream is NULL");
try
@@ -456,7 +456,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Nativ
void write_to_storage_stream( JNIEnv* env, jstring name, jstring key, jint v )
{
std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key);
- Reference< XOutputStream> xOut = pHelper.get() ? pHelper->getOutputStream() : Reference< XOutputStream>();
+ Reference< XOutputStream> xOut = pHelper ? pHelper->getOutputStream() : Reference< XOutputStream>();
OSL_ENSURE(xOut.is(),"Stream is NULL");
try
{
diff --git a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
index 28221925dcc2..bdafac4ee3ab 100644
--- a/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageNativeInputStream.cxx
@@ -141,7 +141,7 @@ extern "C" SAL_JNI_EXPORT jlong JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stor
std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key);
OSL_ENSURE(pHelper.get(),"No stream helper!");
- if ( pHelper.get() )
+ if ( pHelper )
{
Reference<XInputStream> xIn = pHelper->getInputStream();
if ( xIn.is() )
@@ -203,7 +203,7 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora
std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key);
OSL_ENSURE(pHelper.get(),"No stream helper!");
- Reference<XInputStream> xIn = pHelper.get() ? pHelper->getInputStream() : Reference<XInputStream>();
+ Reference<XInputStream> xIn = pHelper ? pHelper->getInputStream() : Reference<XInputStream>();
if ( xIn.is() )
{
try
@@ -246,7 +246,7 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora
#endif
std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key);
- Reference< XInputStream> xIn = pHelper.get() ? pHelper->getInputStream() : Reference< XInputStream>();
+ Reference< XInputStream> xIn = pHelper ? pHelper->getInputStream() : Reference< XInputStream>();
OSL_ENSURE(xIn.is(),"Input stream is NULL!");
jint nBytesRead = 0;
if ( xIn.is() )
diff --git a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
index 7a4f2b7aa50c..f766696e0d9b 100644
--- a/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
+++ b/connectivity/source/drivers/hsqldb/StorageNativeOutputStream.cxx
@@ -109,7 +109,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora
#endif
std::shared_ptr<StreamHelper> pHelper = StorageContainer::getRegisteredStream(env,name,key);
- Reference< XOutputStream> xFlush = pHelper.get() ? pHelper->getOutputStream() : Reference< XOutputStream>();
+ Reference< XOutputStream> xFlush = pHelper ? pHelper->getOutputStream() : Reference< XOutputStream>();
if ( xFlush.is() )
try
{
@@ -176,7 +176,7 @@ extern "C" SAL_JNI_EXPORT void JNICALL Java_com_sun_star_sdbcx_comp_hsqldb_Stora
OperationLogFile( env, name, "output" ).logOperation( "sync" );
#endif
std::shared_ptr< StreamHelper > pStream = StorageContainer::getRegisteredStream( env, name, key );
- Reference< XOutputStream > xFlush = pStream.get() ? pStream->getOutputStream() : Reference< XOutputStream>();
+ Reference< XOutputStream > xFlush = pStream ? pStream->getOutputStream() : Reference< XOutputStream>();
OSL_ENSURE( xFlush.is(), "StorageNativeOutputStream::sync: could not retrieve an output stream!" );
if ( xFlush.is() )
{
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 9cb334c27e86..d8c48c64321a 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -101,7 +101,7 @@ namespace connectivity
public:
bool isQueryAllowed( const OUString& _rQueryName )
{
- if ( !m_pForbiddenQueryNames.get() )
+ if ( !m_pForbiddenQueryNames )
return true;
if ( m_pForbiddenQueryNames->find( _rQueryName ) == m_pForbiddenQueryNames->end() )
return true;
@@ -123,7 +123,7 @@ namespace connectivity
:m_rpAllForbiddenNames( _rIteratorImpl.m_pForbiddenQueryNames )
,m_sForbiddenQueryName( _rForbiddenQueryName )
{
- if ( !m_rpAllForbiddenNames.get() )
+ if ( !m_rpAllForbiddenNames )
m_rpAllForbiddenNames = std::make_shared<QueryNameSet>();
m_rpAllForbiddenNames->insert( m_sForbiddenQueryName );
}
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 77554ef40fb7..4109e21635d1 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -2514,7 +2514,7 @@ namespace cppcanvas::internal
rCanvas,
rState ) );
- if( pPolyAction.get() )
+ if( pPolyAction )
{
maActions.emplace_back(
pPolyAction,
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 8f6dbaa31bb0..9aa56fe53787 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -655,7 +655,7 @@ void ODatabaseModelImpl::dispose()
for (auto const& elem : m_aContainer)
{
- if ( elem.get() )
+ if ( elem )
elem->m_pDataSource = nullptr;
}
m_aContainer.clear();
@@ -1113,7 +1113,7 @@ TContentPtr& ODatabaseModelImpl::getObjectContainer( ObjectType _eType )
OSL_PRECOND( _eType >= E_FORM && _eType <= E_TABLE, "ODatabaseModelImpl::getObjectContainer: illegal index!" );
TContentPtr& rContentPtr = m_aContainer[ _eType ];
- if ( !rContentPtr.get() )
+ if ( !rContentPtr )
{
rContentPtr = std::make_shared<ODefinitionContainer_Impl>();
rContentPtr->m_pDataSource = this;
diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx
index a8e103a2ee14..5ec2c22e8ea4 100644
--- a/dbaccess/source/sdbtools/connection/objectnames.cxx
+++ b/dbaccess/source/sdbtools/connection/objectnames.cxx
@@ -204,7 +204,7 @@ namespace sdbtools
:m_pPrimary( _pPrimary )
,m_pSecondary( _pSecondary )
{
- OSL_ENSURE( m_pPrimary.get() && m_pSecondary.get(), "CombinedNameCheck::CombinedNameCheck: this will crash!" );
+ OSL_ENSURE( m_pPrimary && m_pSecondary, "CombinedNameCheck::CombinedNameCheck: this will crash!" );
}
// INameValidation
diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx
index bac5b49cbd7c..28a77291ce13 100644
--- a/dbaccess/source/ui/control/ColumnControlWindow.cxx
+++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx
@@ -152,7 +152,7 @@ OUString OColumnControlWindow::getAutoIncrementValue() const
TOTypeInfoSP const & OColumnControlWindow::getDefaultTyp() const
{
- if ( !m_pTypeInfo.get() )
+ if ( !m_pTypeInfo )
{
m_pTypeInfo = std::make_shared<OTypeInfo>();
m_pTypeInfo->aUIName = m_sTypeNames.getToken(TYPE_OTHER, ';');
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 4650ba113303..c7bb190ab34e 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -916,7 +916,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
{
DeactivateAggregate(tpRequired);
}
- else if (!m_xAutoIncrement && pFieldType.get())
+ else if (!m_xAutoIncrement && pFieldType)
{
if (pFieldType->bNullable)
ActivateAggregate(tpRequired);
@@ -961,7 +961,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
OUString sDef = BoolStringUI(sValue);
// Make sure that <<none>> is only present if the field can be NULL
- if ( ( pFieldType.get() && !pFieldType->bNullable ) || !pFieldDescr->IsNullable() )
+ if ( ( pFieldType && !pFieldType->bNullable ) || !pFieldDescr->IsNullable() )
{
pFieldDescr->SetIsNullable(ColumnValue::NO_NULLS); // The type says so
@@ -1015,11 +1015,11 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
if (m_xType)
{
- sal_Int32 nPos = pFieldType.get() ? m_xType->find_text(pFieldDescr->getTypeInfo()->aUIName) : -1;
+ sal_Int32 nPos = pFieldType ? m_xType->find_text(pFieldDescr->getTypeInfo()->aUIName) : -1;
if (nPos == -1)
{
const OTypeInfoMap* pMap = getTypeInfo();
- OTypeInfoMap::const_iterator aIter = pMap->find(pFieldType.get() ? pFieldDescr->getTypeInfo()->nType : pFieldDescr->GetType());
+ OTypeInfoMap::const_iterator aIter = pMap->find(pFieldType ? pFieldDescr->getTypeInfo()->nType : pFieldDescr->GetType());
if(aIter == pMap->end() && !pMap->empty())
{
aIter = pMap->begin();
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index 041e7a50378c..d9de91ba494b 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -145,7 +145,7 @@ namespace dbaui
void ORelationControl::lateInit()
{
- if ( !m_pConnData.get() )
+ if ( !m_pConnData )
return;
m_xSourceDef = m_pConnData->getReferencingTable()->getTable();
m_xDestDef = m_pConnData->getReferencedTable()->getTable();
diff --git a/dbaccess/source/ui/misc/HtmlReader.cxx b/dbaccess/source/ui/misc/HtmlReader.cxx
index c6e7f7ac37fb..6e3d329e3ef2 100644
--- a/dbaccess/source/ui/misc/HtmlReader.cxx
+++ b/dbaccess/source/ui/misc/HtmlReader.cxx
@@ -139,7 +139,7 @@ void OHTMLReader::NextToken( HtmlTokenId nToken )
}
break;
case HtmlTokenId::TABLEROW_ON:
- if ( !m_pUpdateHelper.get() )
+ if ( !m_pUpdateHelper )
m_bError = true;
break;
case HtmlTokenId::TEXTTOKEN:
@@ -176,7 +176,7 @@ void OHTMLReader::NextToken( HtmlTokenId nToken )
}
break;
case HtmlTokenId::TABLEROW_OFF:
- if ( !m_pUpdateHelper.get() )
+ if ( !m_pUpdateHelper )
{
m_bError = true;
break;
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 062bdda820bd..865a580b3947 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1066,12 +1066,12 @@ TOTypeInfoSP queryPrimaryKeyType(const OTypeInfoMap& _rTypeInfo)
pTypeInfo = elem.second; // alternative
break;
}
- else if ( !pTypeInfo.get() && elem.second->nType == DataType::DOUBLE )
+ else if ( !pTypeInfo && elem.second->nType == DataType::DOUBLE )
pTypeInfo = elem.second; // alternative
- else if ( !pTypeInfo.get() && elem.second->nType == DataType::REAL )
+ else if ( !pTypeInfo && elem.second->nType == DataType::REAL )
pTypeInfo = elem.second; // alternative
}
- if ( !pTypeInfo.get() ) // just a fallback
+ if ( !pTypeInfo ) // just a fallback
pTypeInfo = queryTypeInfoByType(DataType::VARCHAR,_rTypeInfo);
OSL_ENSURE(pTypeInfo.get(),"checkColumns: can't find a type which is usable as a key!");
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index 05cf7e802dd6..35c8a7fe0f18 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -263,7 +263,7 @@ bool OCopyTable::checkAppendData()
return false;
}
- if ( pTypeInfo.get() )
+ if ( pTypeInfo )
m_pParent->m_vColumnTypes[i] = pTypeInfo->nType;
else
m_pParent->m_vColumnTypes[i] = DataType::VARCHAR;
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 30ebf6f6a642..58dbc4d65327 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -729,7 +729,7 @@ bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos)
{
// add extra column for the primary key
TOTypeInfoSP pTypeInfo = queryPrimaryKeyType(m_aDestTypeInfo);
- if ( pTypeInfo.get() )
+ if ( pTypeInfo )
{
if ( m_bAddPKFirstTime )
{
@@ -1021,7 +1021,7 @@ void OCopyTableWizard::loadData( const ICopyTableSourceObject& _rSourceObject,
// search for type
bool bForce;
TOTypeInfoSP pTypeInfo = ::dbaui::getTypeInfoFromType(m_aTypeInfo,nType,sTypeName,sCreateParam,nPrecision,nScale,bAutoIncrement,bForce);
- if ( !pTypeInfo.get() )
+ if ( !pTypeInfo )
pTypeInfo = m_pTypeInfo;
pActFieldDescr->FillFromTypeInfo(pTypeInfo,true,false);
@@ -1416,7 +1416,7 @@ TOTypeInfoSP OCopyTableWizard::convertType(const TOTypeInfoSP& _pType, bool& _bN
bool bForce;
TOTypeInfoSP pType = ::dbaui::getTypeInfoFromType(m_aDestTypeInfo,_pType->nType,_pType->aTypeName,_pType->aCreateParams,_pType->nPrecision,_pType->nMaximumScale,_pType->bAutoIncrement,bForce);
- if ( !pType.get() || bForce )
+ if ( !pType || bForce )
{ // no type found so we have to find the correct one ourself
sal_Int32 nDefaultType = DataType::VARCHAR;
switch(_pType->nType)
@@ -1492,12 +1492,12 @@ TOTypeInfoSP OCopyTableWizard::convertType(const TOTypeInfoSP& _pType, bool& _bN
nDefaultType = DataType::VARCHAR;
}
pType = ::dbaui::getTypeInfoFromType(m_aDestTypeInfo,nDefaultType,_pType->aTypeName,_pType->aCreateParams,_pType->nPrecision,_pType->nMaximumScale,_pType->bAutoIncrement,bForce);
- if ( !pType.get() )
+ if ( !pType )
{
_bNotConvert = false;
OUString const sCreate("x");
pType = ::dbaui::getTypeInfoFromType(m_aDestTypeInfo,DataType::VARCHAR,_pType->aTypeName,sCreate,50,0,false,bForce);
- if ( !pType.get() )
+ if ( !pType )
pType = m_pTypeInfo;
}
else if ( bForce )
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 0dad92bbdf17..83ad642d887a 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -165,7 +165,7 @@ bool OWizNameMatching::LeavePage()
}
sal_Int32 nType = css::sdbc::DataType::VARCHAR;
- if ( pTypeInfo.get() )
+ if ( pTypeInfo )
nType = pTypeInfo->nType;
m_pParent->m_vColumnTypes[nPos] = nType;
}
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
index 76f05951541b..6882f12166a7 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
@@ -323,7 +323,7 @@ void OFieldDescription::SetAutoIncrementValue(const OUString& _sAutoIncValue)
void OFieldDescription::SetType(const TOTypeInfoSP& _pType)
{
m_pType = _pType;
- if ( !m_pType.get() )
+ if ( !m_pType )
return;
try
@@ -348,7 +348,7 @@ void OFieldDescription::SetTypeValue(sal_Int32 _nType)
else
{
m_nType = _nType;
- OSL_ENSURE(!m_pType.get(),"Invalid call here!");
+ OSL_ENSURE(!m_pType,"Invalid call here!");
}
}
catch( const Exception& )
@@ -504,7 +504,7 @@ sal_Int32 OFieldDescription::GetType() const
if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_TYPE) )
return ::comphelper::getINT32(m_xDest->getPropertyValue(PROPERTY_TYPE));
else
- return m_pType.get() ? m_pType->nType : m_nType;
+ return m_pType ? m_pType->nType : m_nType;
}
OUString OFieldDescription::GetTypeName() const
@@ -512,7 +512,7 @@ OUString OFieldDescription::GetTypeName() const
if ( m_xDest.is() && m_xDestInfo->hasPropertyByName(PROPERTY_TYPENAME) )
return ::comphelper::getString(m_xDest->getPropertyValue(PROPERTY_TYPENAME));
else
- return m_pType.get() ? m_pType->aTypeName : m_sTypeName;
+ return m_pType ? m_pType->aTypeName : m_sTypeName;
}
sal_Int32 OFieldDescription::GetPrecision() const
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index a17cf27bdf76..6f5128faa6e5 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -891,7 +891,7 @@ void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const TOTypeIn
default:
OSL_FAIL("OTableEditorCtrl::SetCellData: invalid column!");
}
- SetControlText(nRow,nColId,_pTypeInfo.get() ? _pTypeInfo->aUIName : OUString());
+ SetControlText(nRow,nColId,_pTypeInfo ? _pTypeInfo->aUIName : OUString());
}
void OTableEditorCtrl::SetCellData( long nRow, sal_uInt16 nColId, const css::uno::Any& _rNewData )
@@ -1562,7 +1562,7 @@ void OTableEditorCtrl::SwitchType( const TOTypeInfoSP& _pType )
// Show the new description
std::shared_ptr<OTableRow> pRow = (*m_pRowList)[nRow];
pRow->SetFieldType( _pType, true );
- if ( _pType.get() )
+ if ( _pType )
{
weld::ComboBox& rTypeList = pTypeCell->get_widget();
const sal_Int32 nCurrentlySelected = rTypeList.get_active();
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index d8174d69a09a..f88110b48362 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -812,7 +812,7 @@ void OTableController::loadData()
bool bForce;
OUString const sCreate("x");
TOTypeInfoSP pTypeInfo = ::dbaui::getTypeInfoFromType(m_aTypeInfo,nType,sTypeName,sCreate,nPrecision,nScale,bIsAutoIncrement,bForce);
- if ( !pTypeInfo.get() )
+ if ( !pTypeInfo )
pTypeInfo = m_pTypeInfo;
pTabEdRow->SetFieldType( pTypeInfo, bForce );
@@ -921,7 +921,7 @@ bool OTableController::checkColumns(bool _bNew)
{
auto pNewRow = std::make_shared<OTableRow>();
TOTypeInfoSP pTypeInfo = ::dbaui::queryPrimaryKeyType(m_aTypeInfo);
- if ( !pTypeInfo.get() )
+ if ( !pTypeInfo )
break;
pNewRow->SetFieldType( pTypeInfo );
diff --git a/dbaccess/source/ui/tabledesign/TableRow.cxx b/dbaccess/source/ui/tabledesign/TableRow.cxx
index 989dd8d819bb..c84ebc834410 100644
--- a/dbaccess/source/ui/tabledesign/TableRow.cxx
+++ b/dbaccess/source/ui/tabledesign/TableRow.cxx
@@ -78,7 +78,7 @@ bool OTableRow::IsPrimaryKey() const
void OTableRow::SetFieldType( const TOTypeInfoSP& _pType, bool _bForce )
{
- if ( _pType.get() )
+ if ( _pType )
{
if( !m_pActFieldDescr )
{
diff --git a/dbaccess/source/ui/uno/ColumnPeer.cxx b/dbaccess/source/ui/uno/ColumnPeer.cxx
index 66904e79a13f..36bad3a1057d 100644
--- a/dbaccess/source/ui/uno/ColumnPeer.cxx
+++ b/dbaccess/source/ui/uno/ColumnPeer.cxx
@@ -90,7 +90,7 @@ void OColumnPeer::setColumn(const Reference< XPropertySet>& _xColumn)
OUString const sCreateParam("x");
bool bForce;
TOTypeInfoSP pTypeInfo = ::dbaui::getTypeInfoFromType(*pFieldControl->getTypeInfo(),nType,sTypeName,sCreateParam,nPrecision,nScale,bAutoIncrement,bForce);
- if ( !pTypeInfo.get() )
+ if ( !pTypeInfo )
pTypeInfo = pFieldControl->getDefaultTyp();
m_pActFieldDescr->FillFromTypeInfo(pTypeInfo,true,false);
diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index ee07fd29f841..f86b1585b13f 100644
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@ -75,7 +75,7 @@ void GraphicPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer,
const GraphicObject& rGraphicObject = getGraphicObject();
Graphic aTransformedGraphic(rGraphicObject.GetGraphic());
const bool isBitmap(GraphicType::Bitmap == aTransformedGraphic.GetType()
- && !aTransformedGraphic.getVectorGraphicData().get());
+ && !aTransformedGraphic.getVectorGraphicData());
const bool isAdjusted(getGraphicAttr().IsAdjusted());
const bool isDrawMode(GraphicDrawMode::Standard != getGraphicAttr().GetDrawMode());
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
index 69caa9956e96..e06a41c500a8 100644
--- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
@@ -481,7 +481,7 @@ namespace drawinglayer::primitive2d
rGraphic,
rTransform);
}
- else if(rGraphic.getVectorGraphicData().get())
+ else if(rGraphic.getVectorGraphicData())
{
// embedded Vector Graphic Data fill, create embed transform
const basegfx::B2DRange& rSvgRange(rGraphic.getVectorGraphicData()->getRange());
diff --git a/drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx b/drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx
index 3693ad87aba9..4c0e8e6ccd18 100644
--- a/drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/modifiedcolorprimitive2d.cxx
@@ -45,7 +45,7 @@ namespace drawinglayer::primitive2d
return true;
}
- if(!getColorModifier().get() || !rCompare.getColorModifier().get())
+ if(!getColorModifier() || !rCompare.getColorModifier())
{
return false;
}
diff --git a/drawinglayer/source/primitive3d/modifiedcolorprimitive3d.cxx b/drawinglayer/source/primitive3d/modifiedcolorprimitive3d.cxx
index 954da54b0c8a..255f0235c911 100644
--- a/drawinglayer/source/primitive3d/modifiedcolorprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/modifiedcolorprimitive3d.cxx
@@ -45,7 +45,7 @@ namespace drawinglayer::primitive3d
return true;
}
- if(!getColorModifier().get() || !rCompare.getColorModifier().get())
+ if(!getColorModifier() || !rCompare.getColorModifier())
{
return false;
}
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 5af4dcac755f..9e3cf43208bc 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -420,7 +420,7 @@ void VclProcessor2D::RenderFillGraphicPrimitive2D(
// when graphic is animated, force decomposition to use the correct graphic, else
// fill style will not be animated
if (GraphicType::Bitmap == rFillGraphicAttribute.getGraphic().GetType()
- && !rFillGraphicAttribute.getGraphic().getVectorGraphicData().get()
+ && !rFillGraphicAttribute.getGraphic().getVectorGraphicData()
&& !rFillGraphicAttribute.getGraphic().IsAnimated())
{
// decompose matrix to check for shear, rotate and mirroring
diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
index b754c980637f..51dfefb6ac5d 100644
--- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
@@ -352,7 +352,7 @@ namespace drawinglayer::processor3d
if(bPaintIt)
{
// get rid of texture coordinates if there is no texture
- if(aFill.areTextureCoordinatesUsed() && !getGeoTexSvx().get() && !getTransparenceGeoTexSvx().get())
+ if(aFill.areTextureCoordinatesUsed() && !getGeoTexSvx() && !getTransparenceGeoTexSvx())
{
aFill.clearTextureCoordinates();
}
diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
index 49a6a78c7003..dc8a2f8aa962 100644
--- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx
@@ -109,14 +109,14 @@ private:
basegfx::B2DPoint aTexCoor(0.0, 0.0);
getTextureCoor(aTexCoor);
- if(mrProcessor.getGeoTexSvx().get())
+ if(mrProcessor.getGeoTexSvx())
{
// calc color in spot. This may also set to invisible already when
// e.g. bitmap textures have transparent parts
mrProcessor.getGeoTexSvx()->modifyBColor(aTexCoor, rColor, fOpacity);
}
- if(basegfx::fTools::more(fOpacity, 0.0) && mrProcessor.getTransparenceGeoTexSvx().get())
+ if(basegfx::fTools::more(fOpacity, 0.0) && mrProcessor.getTransparenceGeoTexSvx())
{
// calc opacity. Object has a 2nd texture, a transparence texture
mrProcessor.getTransparenceGeoTexSvx()->modifyOpacity(aTexCoor, fOpacity);
@@ -125,7 +125,7 @@ private:
if(basegfx::fTools::more(fOpacity, 0.0))
{
- if(mrProcessor.getGeoTexSvx().get())
+ if(mrProcessor.getGeoTexSvx())
{
if(mbUseNrm)
{
@@ -193,9 +193,9 @@ private:
mbModifyColor = mrProcessor.getBColorModifierStack().count();
mbHasTexCoor = SCANLINE_EMPTY_INDEX != rA.getTextureIndex() && SCANLINE_EMPTY_INDEX != rB.getTextureIndex();
mbHasInvTexCoor = SCANLINE_EMPTY_INDEX != rA.getInverseTextureIndex() && SCANLINE_EMPTY_INDEX != rB.getInverseTextureIndex();
- const bool bTextureActive(mrProcessor.getGeoTexSvx().get() || mrProcessor.getTransparenceGeoTexSvx().get());
+ const bool bTextureActive(mrProcessor.getGeoTexSvx() || mrProcessor.getTransparenceGeoTexSvx());
mbUseTex = bTextureActive && (mbHasTexCoor || mbHasInvTexCoor || mrProcessor.getSimpleTextureActive());
- const bool bUseColorTex(mbUseTex && mrProcessor.getGeoTexSvx().get());
+ const bool bUseColorTex(mbUseTex && mrProcessor.getGeoTexSvx());
const bool bNeedNrmOrCol(!bUseColorTex || mrProcessor.getModulate());
mbUseNrm = bNeedNrmOrCol && SCANLINE_EMPTY_INDEX != rA.getNormalIndex() && SCANLINE_EMPTY_INDEX != rB.getNormalIndex();
mbUseCol = !mbUseNrm && bNeedNrmOrCol && SCANLINE_EMPTY_INDEX != rA.getColorIndex() && SCANLINE_EMPTY_INDEX != rB.getColorIndex();
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index 427cb440f1bd..6bed0d99351f 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -250,7 +250,7 @@ bool TBCData::Read(SvStream &rS)
default:
break;
}
- if ( controlSpecificInfo.get() )
+ if ( controlSpecificInfo )
return controlSpecificInfo->Read( rS );
//#FIXME I need to be able to handle different controlSpecificInfo types.
return true;
@@ -549,7 +549,7 @@ TBCMenuSpecific::Print( FILE* fp )
OUString TBCMenuSpecific::Name()
{
OUString aName;
- if ( name.get() )
+ if ( name )
aName = name->getString();
return aName;
}
@@ -641,7 +641,7 @@ TBCComboDropdownSpecific::TBCComboDropdownSpecific(const TBCHeader& header )
bool TBCComboDropdownSpecific::Read( SvStream &rS)
{
nOffSet = rS.Tell();
- if ( data.get() )
+ if ( data )
return data->Read( rS );
return true;
}
diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx
index f6f7e4876eb0..da5f7428e196 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -932,7 +932,7 @@ void FormulaCompiler::InitSymbolsOOXML() const
void FormulaCompiler::loadSymbols(const std::pair<const char*, int>* pSymbols, FormulaGrammar::Grammar eGrammar,
NonConstOpCodeMapPtr& rxMap, SeparatorType eSepType) const
{
- if ( rxMap.get() )
+ if ( rxMap )
return;
// not Core
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index f43f95f7e0fb..330217c80292 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -518,7 +518,7 @@ void FormulaDlg_Impl::UpdateValues( bool bForceRecalcStruct )
// OpCode symbol mapping that could be used to create strings from
// tokens, it's all dreaded API mapping. However, in that case there's
// no array/matrix support anyway, but ensure checking.
- if (pCompiler->GetCurrentOpCodeMap().get())
+ if (pCompiler->GetCurrentOpCodeMap())
{
const sal_Int32 nPos = m_aFuncSel.Min();
assert( 0 <= nPos && nPos < m_pHelper->getCurrentFormula().getLength());
diff --git a/include/oox/dump/dumperbase.hxx b/include/oox/dump/dumperbase.hxx
index 44bca5476b2e..6b9144646069 100644
--- a/include/oox/dump/dumperbase.hxx
+++ b/include/oox/dump/dumperbase.hxx
@@ -447,7 +447,7 @@ public:
Base & operator =(Base &&) = default;
bool isValid() const { return implIsValid(); }
- static bool isValid( const std::shared_ptr< Base >& rxBase ) { return rxBase.get() && rxBase->isValid(); }
+ static bool isValid( const std::shared_ptr< Base >& rxBase ) { return rxBase && rxBase->isValid(); }
protected:
Base() {}
@@ -824,7 +824,7 @@ template< typename ListType >
void SharedConfigData::readNameList( TextInputStream& rStrm, const OUString& rListName )
{
NameListRef xList = createNameList< ListType >( rListName );
- if( xList.get() )
+ if( xList )
xList->readConfigBlock( rStrm );
}
@@ -912,7 +912,7 @@ template< typename Type >
OUString Config::getName( const NameListWrapper& rListWrp, Type nKey ) const
{
NameListRef xList = rListWrp.getNameList( *this );
- return xList.get() ? xList->getName( *this, nKey ) : OOX_DUMP_ERR_NOMAP;
+ return xList ? xList->getName( *this, nKey ) : OOX_DUMP_ERR_NOMAP;
}
template< typename Type >
diff --git a/include/svx/sdr/attribute/sdrallfillattributeshelper.hxx b/include/svx/sdr/attribute/sdrallfillattributeshelper.hxx
index 020401f0541f..01d9a37c19de 100644
--- a/include/svx/sdr/attribute/sdrallfillattributeshelper.hxx
+++ b/include/svx/sdr/attribute/sdrallfillattributeshelper.hxx
@@ -53,7 +53,7 @@ namespace drawinglayer
~SdrAllFillAttributesHelper();
bool isUsed() const;
- bool hasSdrFillAttribute() const { return maFillAttribute.get(); }
+ bool hasSdrFillAttribute() const { return bool(maFillAttribute); }
bool isTransparent() const;
const drawinglayer::attribute::SdrFillAttribute& getFillAttribute() const;
diff --git a/oox/source/core/filterbase.cxx b/oox/source/core/filterbase.cxx
index 94f7c08c9b20..2eea42a8decf 100644
--- a/oox/source/core/filterbase.cxx
+++ b/oox/source/core/filterbase.cxx
@@ -472,14 +472,14 @@ sal_Bool SAL_CALL FilterBase::filter( const Sequence< PropertyValue >& rMediaDes
if( mxImpl->mxInStream.is() )
{
mxImpl->mxStorage = implCreateStorage( mxImpl->mxInStream );
- bRet = mxImpl->mxStorage.get() && importDocument();
+ bRet = mxImpl->mxStorage && importDocument();
}
break;
case FILTERDIRECTION_EXPORT:
if( mxImpl->mxOutStream.is() )
{
mxImpl->mxStorage = implCreateStorage( mxImpl->mxOutStream );
- bRet = mxImpl->mxStorage.get() && exportDocument() && implFinalizeExport( getMediaDescriptor() );
+ bRet = mxImpl->mxStorage && exportDocument() && implFinalizeExport( getMediaDescriptor() );
}
break;
}
diff --git a/oox/source/drawingml/chart/chartdrawingfragment.cxx b/oox/source/drawingml/chart/chartdrawingfragment.cxx
index fb775338d90c..85eeb2986bcc 100644
--- a/oox/source/drawingml/chart/chartdrawingfragment.cxx
+++ b/oox/source/drawingml/chart/chartdrawingfragment.cxx
@@ -175,7 +175,7 @@ ContextHandlerRef ChartDrawingFragment::onCreateContext( sal_Int32 nElement, con
return this;
case CDR_TOKEN( ext ):
- if( mxAnchor.get() ) mxAnchor->importExt( rAttribs );
+ if( mxAnchor ) mxAnchor->importExt( rAttribs );
return nullptr;
}
break;
@@ -195,7 +195,7 @@ ContextHandlerRef ChartDrawingFragment::onCreateContext( sal_Int32 nElement, con
void ChartDrawingFragment::onCharacters( const OUString& rChars )
{
- if( isCurrentElement( CDR_TOKEN( x ), CDR_TOKEN( y ) ) && mxAnchor.get() )
+ if( isCurrentElement( CDR_TOKEN( x ), CDR_TOKEN( y ) ) && mxAnchor )
mxAnchor->setPos( getCurrentElement(), getParentElement(), rChars );
}
@@ -204,7 +204,7 @@ void ChartDrawingFragment::onEndElement()
if( !isCurrentElement( CDR_TOKEN( absSizeAnchor ), CDR_TOKEN( relSizeAnchor ) ) )
return;
- if( mxDrawPage.is() && mxShape.get() && mxAnchor.get() )
+ if( mxDrawPage.is() && mxShape && mxAnchor )
{
EmuRectangle aShapeRectEmu = mxAnchor->calcAnchorRectEmu( maChartRectEmu );
if( (aShapeRectEmu.X >= 0) && (aShapeRectEmu.Y >= 0) && (aShapeRectEmu.Width >= 0) && (aShapeRectEmu.Height >= 0) )
diff --git a/oox/source/drawingml/chart/objectformatter.cxx b/oox/source/drawingml/chart/objectformatter.cxx
index bc3af886c8af..7bfee70b15de 100644
--- a/oox/source/drawingml/chart/objectformatter.cxx
+++ b/oox/source/drawingml/chart/objectformatter.cxx
@@ -842,7 +842,7 @@ LineFormatter::LineFormatter( ObjectFormatterData& rData, const AutoFormatEntry*
void LineFormatter::convertFormatting( ShapePropertyMap& rPropMap, const ModelRef< Shape >& rxShapeProp, sal_Int32 nSeriesIdx )
{
LineProperties aLineProps;
- if( mxAutoLine.get() )
+ if( mxAutoLine )
aLineProps.assignUsed( *mxAutoLine );
if( rxShapeProp.is() )
aLineProps.assignUsed( rxShapeProp->getLineProperties() );
@@ -871,7 +871,7 @@ FillFormatter::FillFormatter( ObjectFormatterData& rData, const AutoFormatEntry*
void FillFormatter::convertFormatting( ShapePropertyMap& rPropMap, const ModelRef< Shape >& rxShapeProp, const PictureOptionsModel* pPicOptions, sal_Int32 nSeriesIdx )
{
FillProperties aFillProps;
- if( mxAutoFill.get() )
+ if( mxAutoFill )
aFillProps.assignUsed( *mxAutoFill );
if( rxShapeProp.is() )
aFillProps.assignUsed( rxShapeProp->getFillProperties() );
@@ -919,7 +919,7 @@ TextFormatter::TextFormatter( ObjectFormatterData& rData, const AutoTextEntry* p
void TextFormatter::convertFormatting( PropertySet& rPropSet, const TextCharacterProperties* pTextProps )
{
TextCharacterProperties aTextProps;
- if( mxAutoText.get() )
+ if( mxAutoText )
aTextProps.assignUsed( *mxAutoText );
if( pTextProps )
aTextProps.assignUsed( *pTextProps );
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx
index 6591e7277040..5d08b28d8094 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -301,7 +301,7 @@ void DataLabelConverter::convertFromModel( const Reference< XDataSeries >& rxDat
xCustomLabel->setFieldType( lcl_ConvertFieldNameToFieldEnum( pField->getType() ) );
xCustomLabel->setGuid( pField->getUuid() );
}
- else if( pRun.get() )
+ else if( pRun )
{
xCustomLabel->setString( pRun->getText() );
xCustomLabel->setFieldType( DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT );
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index b7e855058e6a..d0f243ffabc1 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -192,7 +192,7 @@ Shape::~Shape()
table::TablePropertiesPtr const & Shape::getTableProperties()
{
- if ( !mpTablePropertiesPtr.get() )
+ if ( !mpTablePropertiesPtr )
mpTablePropertiesPtr = std::make_shared<table::TableProperties>();
return mpTablePropertiesPtr;
}
@@ -321,7 +321,7 @@ void Shape::applyShapeReference( const Shape& rReferencedShape, bool bUseText )
{
SAL_INFO("oox.drawingml", "Shape::applyShapeReference: apply '" << rReferencedShape.msId << "' to '" << msId << "'");
- if ( rReferencedShape.mpTextBody.get() && bUseText )
+ if ( rReferencedShape.mpTextBody && bUseText )
mpTextBody = std::make_shared<TextBody>( *rReferencedShape.mpTextBody );
else
mpTextBody.reset();
@@ -650,7 +650,7 @@ Reference< XShape > const & Shape::createAndInsert(
SAL_INFO("oox.drawingml", "Shape::createAndInsert: id='" << msId << "' service='" << rServiceName << "'");
formulaimport::XmlStreamBuilder * pMathXml(nullptr);
- if (mpTextBody.get())
+ if (mpTextBody)
{
for (auto const& it : mpTextBody->getParagraphs())
{
@@ -669,7 +669,7 @@ Reference< XShape > const & Shape::createAndInsert(
}
// tdf#90403 PowerPoint ignores a:ext cx and cy values of p:xfrm, and uses real table width and height
- if ( mpTablePropertiesPtr.get() && rServiceName == "com.sun.star.drawing.TableShape" )
+ if ( mpTablePropertiesPtr && rServiceName == "com.sun.star.drawing.TableShape" )
{
maSize.Width = 0;
for (auto const& elem : mpTablePropertiesPtr->getTableGrid())
@@ -1022,7 +1022,7 @@ Reference< XShape > const & Shape::createAndInsert(
ShapePropertyMap aShapeProps( rFilterBase.getModelObjectHelper() );
// add properties from textbody to shape properties
- if( mpTextBody.get() )
+ if( mpTextBody )
{
mpTextBody->getTextProperties().pushRotationAdjustments();
aShapeProps.assignUsed( mpTextBody->getTextProperties().maPropertyMap );
@@ -1036,7 +1036,7 @@ Reference< XShape > const & Shape::createAndInsert(
aShapeProps.assignUsed( maDefaultShapeProperties );
if ( bIsEmbMedia || aServiceName == "com.sun.star.drawing.GraphicObjectShape" || aServiceName == "com.sun.star.drawing.OLE2Shape" || bIsCustomShape )
mpGraphicPropertiesPtr->pushToPropMap( aShapeProps, rGraphicHelper );
- if ( mpTablePropertiesPtr.get() && aServiceName == "com.sun.star.drawing.TableShape" )
+ if ( mpTablePropertiesPtr && aServiceName == "com.sun.star.drawing.TableShape" )
mpTablePropertiesPtr->pushToPropSet( rFilterBase, xSet, mpMasterTextListStyle );
FillProperties aFillProperties = getActualFillProperties(pTheme, &rShapeOrParentShapeFillProps);
diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx
index b4c284a03edd..8d76755855c9 100644
--- a/oox/source/drawingml/shapecontext.cxx
+++ b/oox/source/drawingml/shapecontext.cxx
@@ -49,7 +49,7 @@ ShapeContext::ShapeContext( ContextHandler2Helper const & rParent, ShapePtr cons
, mpMasterShapePtr( pMasterShapePtr )
, mpShapePtr( pShapePtr )
{
- if( mpMasterShapePtr.get() && mpShapePtr.get() )
+ if( mpMasterShapePtr && mpShapePtr )
mpMasterShapePtr->addChild( mpShapePtr );
}
diff --git a/oox/source/drawingml/shapegroupcontext.cxx b/oox/source/drawingml/shapegroupcontext.cxx
index 84fc719f0e50..61aadb45d862 100644
--- a/oox/source/drawingml/shapegroupcontext.cxx
+++ b/oox/source/drawingml/shapegroupcontext.cxx
@@ -45,7 +45,7 @@ ShapeGroupContext::ShapeGroupContext( FragmentHandler2 const & rParent, ShapePtr
{
if( pMasterShapePtr )
mpGroupShapePtr->setWps(pMasterShapePtr->getWps());
- if( pMasterShapePtr.get() && mpGroupShapePtr.get() )
+ if( pMasterShapePtr && mpGroupShapePtr )
pMasterShapePtr->addChild( mpGroupShapePtr );
}
diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
index c2deb715048e..e5ab3372d42e 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -130,7 +130,7 @@ static void applyBorder( const ::oox::core::XmlFilterBase& rFilterBase, TableSty
std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr >& rPartLineBorders( rTableStylePart.getLineBorders() );
::oox::drawingml::ShapeStyleRef& rLineStyleRef = rTableStylePart.getStyleRefs()[ nLineType ];
std::map < sal_Int32, ::oox::drawingml::LinePropertiesPtr >::const_iterator aIter( rPartLineBorders.find( nLineType ) );
- if ( ( aIter != rPartLineBorders.end() ) && aIter->second.get() )
+ if ( ( aIter != rPartLineBorders.end() ) && aIter->second )
rLineProperties.assignUsed( *aIter->second );
else if (rLineStyleRef.mnThemedIdx != 0)
{
@@ -155,7 +155,7 @@ static void applyTableStylePart( const ::oox::core::XmlFilterBase& rFilterBase,
TableStylePart& rTableStylePart )
{
::oox::drawingml::FillPropertiesPtr& rPartFillPropertiesPtr( rTableStylePart.getFillProperties() );
- if ( rPartFillPropertiesPtr.get() )
+ if ( rPartFillPropertiesPtr )
rFillProperties.assignUsed( *rPartFillPropertiesPtr );
else
{
@@ -427,7 +427,7 @@ void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, cons
::Color nPhClr = API_RGB_TRANSPARENT;
std::shared_ptr< ::oox::drawingml::FillProperties >& rBackgroundFillPropertiesPtr( rTable.getBackgroundFillProperties() );
::oox::drawingml::ShapeStyleRef& rBackgroundFillStyle( rTable.getBackgroundFillStyleRef() );
- if (rBackgroundFillPropertiesPtr.get())
+ if (rBackgroundFillPropertiesPtr)
aBgColor = rBackgroundFillPropertiesPtr->getBestSolidColor();
else if (rBackgroundFillStyle.mnThemedIdx != 0)
{
diff --git a/oox/source/drawingml/textbody.cxx b/oox/source/drawingml/textbody.cxx
index e013a5069b80..1abe31db984e 100644
--- a/oox/source/drawingml/textbody.cxx
+++ b/oox/source/drawingml/textbody.cxx
@@ -35,7 +35,7 @@ TextBody::TextBody()
TextBody::TextBody( const TextBodyPtr& pBody )
{
- if( pBody.get() ) {
+ if( pBody ) {
maTextProperties = pBody->maTextProperties;
maTextListStyle = pBody->maTextListStyle;
}
@@ -120,7 +120,7 @@ void TextBody::ApplyStyleEmpty(
// Apply paragraph properties
TextParagraphPropertiesPtr pTextParagraphStyle = maParagraphs[0]->getParagraphStyle(aCombinedTextStyle);
- if (pTextParagraphStyle.get())
+ if (pTextParagraphStyle)
{
Reference< XPropertySet > xProps(xText, UNO_QUERY);
PropertyMap aioBulletList;
diff --git a/oox/source/drawingml/textparagraph.cxx b/oox/source/drawingml/textparagraph.cxx
index 46bb5b5a38bc..098bf102900a 100644
--- a/oox/source/drawingml/textparagraph.cxx
+++ b/oox/source/drawingml/textparagraph.cxx
@@ -52,7 +52,7 @@ TextCharacterProperties TextParagraph::getCharacterStyle (
TextParagraphPropertiesPtr pTextParagraphStyle = getParagraphStyle(rTextListStyle);
TextCharacterProperties aTextCharacterStyle;
- if (pTextParagraphStyle.get())
+ if (pTextParagraphStyle)
aTextCharacterStyle.assignUsed(pTextParagraphStyle->getTextCharacterProperties());
aTextCharacterStyle.assignUsed(rTextStyleProperties);
aTextCharacterStyle.assignUsed(maProperties.getTextCharacterProperties());
@@ -127,7 +127,7 @@ void TextParagraph::insertAt(
Reference< XPropertySet > xProps( xAt, UNO_QUERY);
TextParagraphPropertiesPtr pTextParagraphStyle = getParagraphStyle(rTextListStyle);
- if ( pTextParagraphStyle.get() )
+ if ( pTextParagraphStyle )
{
TextParagraphProperties aParaProp;
aParaProp.apply( *pTextParagraphStyle );
diff --git a/oox/source/drawingml/textparagraphpropertiescontext.cxx b/oox/source/drawingml/textparagraphpropertiescontext.cxx
index 8f7f206cdf31..17fd33cd7081 100644
--- a/oox/source/drawingml/textparagraphpropertiescontext.cxx
+++ b/oox/source/drawingml/textparagraphpropertiescontext.cxx
@@ -151,7 +151,7 @@ TextParagraphPropertiesContext::~TextParagraphPropertiesContext()
rPropertyMap.setProperty( PROP_ParaTabStops, aSeq);
}
- if (mxBlipProps.get() && mxBlipProps->mxFillGraphic.is())
+ if (mxBlipProps && mxBlipProps->mxFillGraphic.is())
mrBulletList.setGraphic(mxBlipProps->mxFillGraphic);
if( mrBulletList.is() )
diff --git a/oox/source/drawingml/themeelementscontext.cxx b/oox/source/drawingml/themeelementscontext.cxx
index ed25b451f12d..e5f84e5a02a0 100644
--- a/oox/source/drawingml/themeelementscontext.cxx
+++ b/oox/source/drawingml/themeelementscontext.cxx
@@ -176,15 +176,15 @@ ContextHandlerRef FontSchemeContext::onCreateContext( sal_Int32 nElement, const
return this;
case A_TOKEN( latin ):
- if( mxCharProps.get() )
+ if( mxCharProps )
mxCharProps->maLatinFont.setAttributes( rAttribs );
break;
case A_TOKEN( ea ):
- if( mxCharProps.get() )
+ if( mxCharProps )
mxCharProps->maAsianFont.setAttributes( rAttribs );
break;
case A_TOKEN( cs ):
- if( mxCharProps.get() )
+ if( mxCharProps )
mxCharProps->maComplexFont.setAttributes( rAttribs );
break;
}
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 3f00248a26cc..775790a20eed 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -869,7 +869,7 @@ void NameListBase::setName( sal_Int64 nKey, const String& rName )
void NameListBase::includeList( const NameListRef& rxList )
{
- if( rxList.get() )
+ if( rxList )
{
for (auto const& elem : *rxList)
maMap[ elem.first ] = elem.second;
@@ -1249,7 +1249,7 @@ void UnitConverter::implIncludeList( const NameListBase& /*rList*/ )
NameListRef NameListWrapper::getNameList( const Config& rCfg ) const
{
- if (!mxList.get())
+ if (!mxList)
mxList = rCfg.getNameList( maName );
return mxList;
}
@@ -1303,7 +1303,7 @@ NameListRef SharedConfigData::getNameList( const OUString& rListName ) const
bool SharedConfigData::implIsValid() const
{
- return mbLoaded && mxContext.is() && mxRootStrg.get() && !maSysFileName.isEmpty();
+ return mbLoaded && mxContext.is() && mxRootStrg && !maSysFileName.isEmpty();
}
void SharedConfigData::implProcessConfigItemStr(
@@ -1355,7 +1355,7 @@ void SharedConfigData::createShortList( const OUString& rData )
if( StringHelper::convertStringToInt( nStartKey, aDataVec[ 1 ] ) )
{
std::shared_ptr< MultiList > xList = createNameList< MultiList >( aDataVec[ 0 ] );
- if( xList.get() )
+ if( xList )
{
aDataVec.erase( aDataVec.begin(), aDataVec.begin() + 2 );
xList->setNamesFromVec( nStartKey, aDataVec );
@@ -1378,7 +1378,7 @@ void SharedConfigData::createUnitConverter( const OUString& rData )
if( StringHelper::convertStringToDouble( fFactor, aFactor ) && (fFactor != 0.0) )
{
std::shared_ptr< UnitConverter > xList = createNameList< UnitConverter >( aDataVec[ 0 ] );
- if( xList.get() )
+ if( xList )
{
xList->setFactor( bRecip ? (1.0 / fFactor) : fFactor );
if( aDataVec.size() >= 3 )
@@ -1409,7 +1409,7 @@ void Config::construct( const char* pcEnvVar, const FilterBase& rFilter )
void Config::construct( const char* pcEnvVar, const Reference< XComponentContext >& rxContext, const StorageRef& rxRootStrg, const OUString& rSysFileName )
{
- if( pcEnvVar && rxRootStrg.get() && !rSysFileName.isEmpty() )
+ if( pcEnvVar && rxRootStrg && !rSysFileName.isEmpty() )
if( const char* pcFileName = ::getenv( pcEnvVar ) )
mxCfgData = std::make_shared<SharedConfigData>( OUString::createFromAscii( pcFileName ), rxContext, rxRootStrg, rSysFileName );
}
@@ -1688,7 +1688,7 @@ void Output::writeItemName( const String& rItemName )
StorageIterator::StorageIterator( const StorageRef& rxStrg ) :
mxStrg( rxStrg )
{
- if( mxStrg.get() )
+ if( mxStrg )
mxStrg->getElementNames( maNames );
maIt = maNames.begin();
}
@@ -1722,12 +1722,12 @@ bool StorageIterator::isStorage() const
if( !isValid() )
return false;
StorageRef xStrg = mxStrg->openSubStorage( *maIt, false );
- return xStrg.get() && xStrg->isStorage();
+ return xStrg && xStrg->isStorage();
}
bool StorageIterator::implIsValid() const
{
- return mxStrg.get() && mxStrg->isStorage() && (maIt != maNames.end());
+ return mxStrg && mxStrg->isStorage() && (maIt != maNames.end());
}
ObjectBase::~ObjectBase()
@@ -1778,7 +1778,7 @@ void StorageObjectBase::construct( const ObjectBase& rParent )
bool StorageObjectBase::implIsValid() const
{
- return mxStrg.get() && !maSysPath.isEmpty() && ObjectBase::implIsValid();
+ return mxStrg && !maSysPath.isEmpty() && ObjectBase::implIsValid();
}
void StorageObjectBase::implDump()
@@ -2308,7 +2308,7 @@ void TextStreamObjectBase::construct( const OutputObjectBase& rParent,
bool TextStreamObjectBase::implIsValid() const
{
- return InputObjectBase::implIsValid() && mxTextStrm.get();
+ return InputObjectBase::implIsValid() && mxTextStrm;
}
void TextStreamObjectBase::implDump()
diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx
index f8ce1ec59fa8..80485c453b7c 100644
--- a/oox/source/dump/oledumper.cxx
+++ b/oox/source/dump/oledumper.cxx
@@ -323,7 +323,7 @@ void OlePropertyStreamObject::dumpDictionaryProperty( sal_uInt32 nStartPos )
TableGuard aTabGuard( mxOut, 10, 20 );
sal_Int32 nId = dumpDec< sal_Int32 >( "id" );
OUString aName = dumpString8( "name" );
- if( mxPropIds.get() )
+ if( mxPropIds )
mxPropIds->setName( nId, aName );
}
}
diff --git a/oox/source/helper/storagebase.cxx b/oox/source/helper/storagebase.cxx
index d0928373350f..2f0ddd6b7926 100644
--- a/oox/source/helper/storagebase.cxx
+++ b/oox/source/helper/storagebase.cxx
@@ -126,7 +126,7 @@ StorageRef StorageBase::openSubStorage( const OUString& rStorageName, bool bCrea
lclSplitFirstElement( aElement, aRemainder, rStorageName );
if( !aElement.isEmpty() )
xSubStorage = getSubStorage( aElement, bCreateMissing );
- if( xSubStorage.get() && !aRemainder.isEmpty() )
+ if( xSubStorage && !aRemainder.isEmpty() )
xSubStorage = xSubStorage->openSubStorage( aRemainder, bCreateMissing );
}
return xSubStorage;
@@ -142,7 +142,7 @@ Reference< XInputStream > StorageBase::openInputStream( const OUString& rStreamN
if( !aRemainder.isEmpty() )
{
StorageRef xSubStorage = getSubStorage( aElement, false );
- if( xSubStorage.get() )
+ if( xSubStorage )
xInStream = xSubStorage->openInputStream( aRemainder );
}
else
@@ -170,7 +170,7 @@ Reference< XOutputStream > StorageBase::openOutputStream( const OUString& rStrea
if( !aRemainder.isEmpty() )
{
StorageRef xSubStorage = getSubStorage( aElement, true );
- if( xSubStorage.get() )
+ if( xSubStorage )
xOutStream = xSubStorage->openOutputStream( aRemainder );
}
else
@@ -194,10 +194,10 @@ void StorageBase::copyToStorage( StorageBase& rDestStrg, const OUString& rElemen
return;
StorageRef xSubStrg = openSubStorage( rElementName, false );
- if( xSubStrg.get() )
+ if( xSubStrg )
{
StorageRef xDestSubStrg = rDestStrg.openSubStorage( rElementName, true );
- if( xDestSubStrg.get() )
+ if( xDestSubStrg )
xSubStrg->copyStorageToStorage( *xDestSubStrg );
}
else
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 78cc0b76770d..706514baf1c2 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -2688,12 +2688,12 @@ ControlModelBase* EmbeddedControl::createModelFromGuid( const OUString& rClassId
OUString EmbeddedControl::getServiceName() const
{
- return mxModel.get() ? mxModel->getServiceName() : OUString();
+ return mxModel ? mxModel->getServiceName() : OUString();
}
bool EmbeddedControl::convertProperties( const Reference< XControlModel >& rxCtrlModel, const ControlConverter& rConv ) const
{
- if( mxModel.get() && rxCtrlModel.is() && !maName.isEmpty() )
+ if( mxModel && rxCtrlModel.is() && !maName.isEmpty() )
{
PropertyMap aPropMap;
aPropMap.setProperty( PROP_Name, maName );
@@ -2715,7 +2715,7 @@ bool EmbeddedControl::convertProperties( const Reference< XControlModel >& rxCtr
void EmbeddedControl::convertFromProperties( const Reference< XControlModel >& rxCtrlModel, const ControlConverter& rConv )
{
- if( mxModel.get() && rxCtrlModel.is() && !maName.isEmpty() )
+ if( mxModel && rxCtrlModel.is() && !maName.isEmpty() )
{
PropertySet aPropSet( rxCtrlModel );
aPropSet.getProperty( maName, PROP_Name );
diff --git a/oox/source/ole/olestorage.cxx b/oox/source/ole/olestorage.cxx
index f5113ebc62c4..82aa1cd79fe8 100644
--- a/oox/source/ole/olestorage.cxx
+++ b/oox/source/ole/olestorage.cxx
@@ -311,13 +311,13 @@ StorageRef OleStorage::implOpenSubStorage( const OUString& rElementName, bool bC
new OLE storage based on a temporary file. All operations are
performed on this clean storage. On committing, the storage will be
completely re-inserted into the parent storage. */
- if( !isReadOnly() && (bCreateMissing || xSubStorage.get()) ) try
+ if( !isReadOnly() && (bCreateMissing || xSubStorage) ) try
{
// create new storage based on a temp file
Reference< XStream > xTempFile( TempFile::create(mxContext), UNO_QUERY_THROW );
StorageRef xTempStorage( new OleStorage( *this, xTempFile, rElementName ) );
// copy existing substorage into temp storage
- if( xSubStorage.get() )
+ if( xSubStorage )
xSubStorage->copyStorageToStorage( *xTempStorage );
// return the temp storage to caller
xSubStorage = xTempStorage;
diff --git a/oox/source/ole/vbacontrol.cxx b/oox/source/ole/vbacontrol.cxx
index c48e701e1dae..d0a5952ba486 100644
--- a/oox/source/ole/vbacontrol.cxx
+++ b/oox/source/ole/vbacontrol.cxx
@@ -279,7 +279,7 @@ ControlModelRef VbaSiteModel::createControlModel( const AxClassTable& rClassTabl
}
}
- if( xCtrlModel.get() )
+ if( xCtrlModel )
{
// user form controls are AWT models
xCtrlModel->setAwtModelMode();
@@ -324,14 +324,14 @@ VbaFormControl::~VbaFormControl()
void VbaFormControl::importModelOrStorage( BinaryInputStream& rInStrm, StorageBase& rStrg, const AxClassTable& rClassTable )
{
- if( !mxSiteModel.get() )
+ if( !mxSiteModel )
return;
if( mxSiteModel->isContainer() )
{
StorageRef xSubStrg = rStrg.openSubStorage( mxSiteModel->getSubStorageName(), false );
OSL_ENSURE( xSubStrg.get(), "VbaFormControl::importModelOrStorage - cannot find storage for embedded control" );
- if( xSubStrg.get() )
+ if( xSubStrg )
importStorage( *xSubStrg, rClassTable );
}
else if( !rInStrm.isEof() )
@@ -344,13 +344,13 @@ void VbaFormControl::importModelOrStorage( BinaryInputStream& rInStrm, StorageBa
OUString VbaFormControl::getControlName() const
{
- return mxSiteModel.get() ? mxSiteModel->getName() : OUString();
+ return mxSiteModel ? mxSiteModel->getName() : OUString();
}
void VbaFormControl::createAndConvert( sal_Int32 nCtrlIndex,
const Reference< XNameContainer >& rxParentNC, const ControlConverter& rConv ) const
{
- if( !(rxParentNC.is() && mxSiteModel.get() && mxCtrlModel.get()) )
+ if( !(rxParentNC.is() && mxSiteModel && mxCtrlModel) )
return;
try
@@ -379,7 +379,7 @@ void VbaFormControl::createAndConvert( sal_Int32 nCtrlIndex,
void VbaFormControl::importControlModel( BinaryInputStream& rInStrm, const AxClassTable& rClassTable )
{
createControlModel( rClassTable );
- if( mxCtrlModel.get() )
+ if( mxCtrlModel )
mxCtrlModel->importBinaryModel( rInStrm );
}
@@ -442,7 +442,7 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla
if (elem->getControlType() == API_CONTROL_PAGE)
{
VbaSiteModelRef xPageSiteRef = control->mxSiteModel;
- if ( xPageSiteRef.get() )
+ if ( xPageSiteRef )
idToPage[ xPageSiteRef->getId() ] = control;
}
else
@@ -484,7 +484,7 @@ void VbaFormControl::importStorage( StorageBase& rStrg, const AxClassTable& rCla
bool VbaFormControl::convertProperties( const Reference< XControlModel >& rxCtrlModel,
const ControlConverter& rConv, sal_Int32 nCtrlIndex ) const
{
- if( rxCtrlModel.is() && mxSiteModel.get() && mxCtrlModel.get() )
+ if( rxCtrlModel.is() && mxSiteModel && mxCtrlModel )
{
const OUString& rCtrlName = mxSiteModel->getName();
OSL_ENSURE( !rCtrlName.isEmpty(), "VbaFormControl::convertProperties - control without name" );
@@ -524,7 +524,7 @@ bool VbaFormControl::convertProperties( const Reference< XControlModel >& rxCtrl
void VbaFormControl::createControlModel( const AxClassTable& rClassTable )
{
// derived classes may have created their own control model
- if( !mxCtrlModel && mxSiteModel.get() )
+ if( !mxCtrlModel && mxSiteModel )
mxCtrlModel = mxSiteModel->createControlModel( rClassTable );
}
@@ -603,7 +603,7 @@ void VbaFormControl::finalizeEmbeddedControls()
VbaControlNameInserter aInserter( aControlNames );
maControls.forEach( aInserter );
for (auto const& control : maControls)
- if( control->mxCtrlModel.get() && (control->mxCtrlModel->getControlType() == API_CONTROL_GROUPBOX) )
+ if( control->mxCtrlModel && (control->mxCtrlModel->getControlType() == API_CONTROL_GROUPBOX) )
control->maControls.forEach( aInserter );
/* Reprocess the sorted list and collect all option button controls that
@@ -689,13 +689,13 @@ void VbaFormControl::finalizeEmbeddedControls()
void VbaFormControl::moveRelative( const AxPairData& rDistance )
{
- if( mxSiteModel.get() )
+ if( mxSiteModel )
mxSiteModel->moveRelative( rDistance );
}
void VbaFormControl::moveEmbeddedToAbsoluteParent()
{
- if( !(mxSiteModel.get() && !maControls.empty()) )
+ if( !(mxSiteModel && !maControls.empty()) )
return;
// distance to move is equal to position of this control in its parent
@@ -718,8 +718,8 @@ void VbaFormControl::moveEmbeddedToAbsoluteParent()
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list