[Libreoffice-commits] core.git: basic/source connectivity/source dbaccess/source desktop/source forms/source include/dbaccess oox/source reportdesign/source sc/source slideshow/source svtools/source svx/source sw/source vcl/source vcl/unx writerfilter/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Nov 10 08:17:15 UTC 2018
basic/source/sbx/sbxarray.cxx | 4
connectivity/source/commontools/dbmetadata.cxx | 2
connectivity/source/drivers/jdbc/Reader.cxx | 16 +--
dbaccess/source/core/api/resultcolumn.cxx | 2
dbaccess/source/core/dataaccess/documentdefinition.cxx | 7 -
dbaccess/source/ui/dlg/advancedsettings.cxx | 2
dbaccess/source/ui/dlg/optionalboolitem.hxx | 2
desktop/source/app/officeipcthread.cxx | 4
forms/source/component/ListBox.cxx | 4
include/dbaccess/genericcontroller.hxx | 41 +---------
oox/source/drawingml/textparagraphproperties.cxx | 4
oox/source/vml/vmlshape.cxx | 5 -
reportdesign/source/ui/report/ReportController.cxx | 2
sc/source/filter/xml/xmlcelli.cxx | 12 +-
slideshow/source/engine/activities/activitiesfactory.cxx | 6 -
slideshow/source/engine/animationnodes/animationbasenode.cxx | 8 -
slideshow/source/engine/shapes/viewshape.cxx | 2
slideshow/source/engine/slideshowimpl.cxx | 10 +-
slideshow/source/engine/transitions/slidetransitionfactory.cxx | 2
svtools/source/uno/unocontroltablemodel.cxx | 4
svx/source/form/fmmodel.cxx | 6 -
svx/source/svdraw/svdobj.cxx | 4
sw/source/core/txtnode/swfont.cxx | 8 -
sw/source/filter/ww8/docxattributeoutput.cxx | 2
sw/source/filter/ww8/wrtww8.cxx | 2
sw/source/ui/chrdlg/break.cxx | 2
vcl/source/app/settings.cxx | 2
vcl/source/control/quickselectionengine.cxx | 2
vcl/unx/generic/window/screensaverinhibitor.cxx | 14 +--
writerfilter/source/dmapper/DomainMapper.cxx | 2
writerfilter/source/dmapper/DomainMapperTableManager.cxx | 4
writerfilter/source/rtftok/rtfsdrimport.cxx | 24 ++---
32 files changed, 90 insertions(+), 121 deletions(-)
New commits:
commit e3560f4770487c8d38463fb4a9a63325abc385f9
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Nov 9 15:52:14 2018 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sat Nov 10 09:16:53 2018 +0100
Replace deprecated boost::optional::reset(val) with operator =
Change-Id: I7340a561e0df0c781fd834388deb4b9f83800f9b
Reviewed-on: https://gerrit.libreoffice.org/63221
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index 1e6f663824b0..fc86839c1d24 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -222,7 +222,7 @@ void SbxArray::PutAlias( const OUString& rAlias, sal_uInt16 nIdx )
else
{
SbxVarEntry& rRef = reinterpret_cast<SbxVarEntry&>( GetRef( nIdx ) );
- rRef.maAlias.reset(rAlias);
+ rRef.maAlias = rAlias;
}
}
@@ -327,7 +327,7 @@ void SbxArray::Merge( SbxArray* p )
SbxVarEntry aNewEntry;
aNewEntry.mpVar = rEntry1.mpVar;
if (rEntry1.maAlias)
- aNewEntry.maAlias.reset(*rEntry1.maAlias);
+ aNewEntry.maAlias = *rEntry1.maAlias;
mVarEntries.push_back(aNewEntry);
}
}
diff --git a/connectivity/source/commontools/dbmetadata.cxx b/connectivity/source/commontools/dbmetadata.cxx
index afd77484c3ab..4f4aa1e09353 100644
--- a/connectivity/source/commontools/dbmetadata.cxx
+++ b/connectivity/source/commontools/dbmetadata.cxx
@@ -162,7 +162,7 @@ namespace dbtools
lcl_checkConnected( _metaData );
try
{
- _cachedSetting.reset( (_metaData.xConnectionMetaData.get()->*_getter)() );
+ _cachedSetting = (_metaData.xConnectionMetaData.get()->*_getter)();
}
catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION("connectivity.commontools"); }
}
diff --git a/connectivity/source/drivers/jdbc/Reader.cxx b/connectivity/source/drivers/jdbc/Reader.cxx
index ef5deeaac096..6d3b846f88f8 100644
--- a/connectivity/source/drivers/jdbc/Reader.cxx
+++ b/connectivity/source/drivers/jdbc/Reader.cxx
@@ -56,9 +56,9 @@ void SAL_CALL java_io_Reader::skipBytes( sal_Int32 nBytesToSkip )
if(nBytesToSkip <= 0)
return;
- if(m_buf != boost::none)
+ if(m_buf)
{
- m_buf = boost::none;
+ m_buf.reset();
--nBytesToSkip;
}
@@ -69,14 +69,14 @@ void SAL_CALL java_io_Reader::skipBytes( sal_Int32 nBytesToSkip )
{
assert(nBytesToSkip % sizeof(jchar) == 1);
Sequence< sal_Int8 > aData(1);
- assert(m_buf == boost::none);
+ assert(m_buf);
readBytes(aData, 1);
}
}
sal_Int32 SAL_CALL java_io_Reader::available( )
{
- if(m_buf != boost::none)
+ if(m_buf)
return 1;
jboolean out;
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java environment has been deleted!");
@@ -90,7 +90,7 @@ sal_Int32 SAL_CALL java_io_Reader::available( )
out = t.pEnv->CallBooleanMethod( object, mID);
ThrowRuntimeException(t.pEnv,*this);
} //t.pEnv
- return (m_buf != boost::none ? 1 : 0) + (out ? 1 : 0); // no way to tell *how much* is ready
+ return (m_buf ? 1 : 0) + (out ? 1 : 0); // no way to tell *how much* is ready
}
void SAL_CALL java_io_Reader::closeInput( )
@@ -109,7 +109,7 @@ sal_Int32 SAL_CALL java_io_Reader::readBytes( css::uno::Sequence< sal_Int8 >& aD
sal_Int8 *dst(aData.getArray());
sal_Int32 nBytesWritten(0);
- if(m_buf != boost::none)
+ if (m_buf)
{
if(aData.getLength() == 0)
{
@@ -117,7 +117,7 @@ sal_Int32 SAL_CALL java_io_Reader::readBytes( css::uno::Sequence< sal_Int8 >& aD
dst = aData.getArray();
}
*dst = *m_buf;
- m_buf = boost::none;
+ m_buf.reset();
++nBytesWritten;
++dst;
--nBytesToRead;
@@ -166,7 +166,7 @@ sal_Int32 SAL_CALL java_io_Reader::readBytes( css::uno::Sequence< sal_Int8 >& aD
if(outBytes < outChars*jcs)
{
assert(outChars*jcs - outBytes == 1);
- assert(m_buf == boost::none);
+ assert(!m_buf);
m_buf = reinterpret_cast<char*>(outBuf)[outBytes];
}
}
diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx
index d0c3b979a533..863a517baf08 100644
--- a/dbaccess/source/core/api/resultcolumn.cxx
+++ b/dbaccess/source/core/api/resultcolumn.cxx
@@ -170,7 +170,7 @@ namespace
void obtain( Any& _out_rValue, ::boost::optional< T > & _rCache, const sal_Int32 _nPos, const Reference < XResultSetMetaData >& _rxResultMeta, T (SAL_CALL XResultSetMetaData::*Getter)( sal_Int32 ) )
{
if ( !_rCache )
- _rCache.reset( (_rxResultMeta.get()->*Getter)( _nPos ) );
+ _rCache = (_rxResultMeta.get()->*Getter)(_nPos);
_out_rValue <<= *_rCache;
}
}
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index dc110202eeba..e9887caa6697 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -799,7 +799,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
{
sal_Int16 nMacroExecMode( !aDocumentMacroMode ? MacroExecMode::USE_CONFIG : *aDocumentMacroMode );
OSL_VERIFY( pIter->Value >>= nMacroExecMode );
- aDocumentMacroMode.reset( nMacroExecMode );
+ aDocumentMacroMode = nMacroExecMode;
continue;
}
@@ -850,7 +850,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
// sub document, in case the settings require this, *and* the document
// contains scripts in the content.xml. But this is better than the security
// issue we had before ...
- aDocumentMacroMode.reset( MacroExecMode::USE_CONFIG );
+ aDocumentMacroMode = MacroExecMode::USE_CONFIG;
}
}
@@ -858,7 +858,8 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
{
// nobody so far felt responsible for setting it
// => use the DBDoc-wide macro exec mode for the document, too
- aDocumentMacroMode.reset( bExecuteDBDocMacros ? MacroExecMode::ALWAYS_EXECUTE_NO_WARN : MacroExecMode::NEVER_EXECUTE );
+ aDocumentMacroMode = bExecuteDBDocMacros ? MacroExecMode::ALWAYS_EXECUTE_NO_WARN
+ : MacroExecMode::NEVER_EXECUTE;
}
aDocumentArgs.put( "MacroExecutionMode", *aDocumentMacroMode );
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index 4cf4a5e91686..4d70f2827a38 100644
--- a/dbaccess/source/ui/dlg/advancedsettings.cxx
+++ b/dbaccess/source/ui/dlg/advancedsettings.cxx
@@ -200,7 +200,7 @@ namespace dbaui
const SfxPoolItem* pItem = _rSet.GetItem<SfxPoolItem>(booleanSetting.nItemId);
if (const SfxBoolItem *pBoolItem = dynamic_cast<const SfxBoolItem*>( pItem) )
{
- aValue.reset( pBoolItem->GetValue() );
+ aValue = pBoolItem->GetValue();
}
else if (const OptionalBoolItem *pOptionalItem = dynamic_cast<const OptionalBoolItem*>( pItem) )
{
diff --git a/dbaccess/source/ui/dlg/optionalboolitem.hxx b/dbaccess/source/ui/dlg/optionalboolitem.hxx
index e2e29378f23b..f80dcd52fbf0 100644
--- a/dbaccess/source/ui/dlg/optionalboolitem.hxx
+++ b/dbaccess/source/ui/dlg/optionalboolitem.hxx
@@ -41,7 +41,7 @@ namespace dbaui
bool HasValue() const { return !!m_aValue; }
void ClearValue() { m_aValue.reset(); }
bool GetValue() const { return *m_aValue; }
- void SetValue( const bool _bValue ) { m_aValue.reset( _bValue ); }
+ void SetValue(bool _bValue) { m_aValue = _bValue; }
const ::boost::optional< bool >&
GetFullValue() const { return m_aValue; }
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 8fd78364f743..91a0b84fd940 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -118,7 +118,7 @@ public:
if (!next(&url, false)) {
throw CommandLineArgs::Supplier::Exception();
}
- m_cwdUrl.reset(url);
+ m_cwdUrl = url;
break;
}
case '2':
@@ -131,7 +131,7 @@ public:
if (osl::FileBase::getFileURLFromSystemPath(path, url) ==
osl::FileBase::E_None)
{
- m_cwdUrl.reset(url);
+ m_cwdUrl = url;
}
break;
}
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index b41e06ce1c4f..e355a18ff24f 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -749,7 +749,7 @@ namespace frm
{
sal_Int16 nBoundColumn( 0 );
m_aBoundColumn >>= nBoundColumn;
- aBoundColumn.reset( nBoundColumn );
+ aBoundColumn = nBoundColumn;
}
::utl::SharedUNOComponent< XResultSet > xListCursor;
@@ -782,7 +782,7 @@ namespace frm
Reference<XPropertySet> xFieldAsSet(xFieldsByIndex->getByIndex( *aBoundColumn ),UNO_QUERY);
assert(xFieldAsSet.is());
xFieldAsSet->getPropertyValue(PROPERTY_NAME) >>= aBoundFieldName;
- aBoundColumn.reset( 1 );
+ aBoundColumn = 1;
xFieldAsSet.set(xFieldsByIndex->getByIndex(0),UNO_QUERY);
xFieldAsSet->getPropertyValue(PROPERTY_NAME) >>= aFieldName;
diff --git a/include/dbaccess/genericcontroller.hxx b/include/dbaccess/genericcontroller.hxx
index 4f97727acc9b..139d6fdd6838 100644
--- a/include/dbaccess/genericcontroller.hxx
+++ b/include/dbaccess/genericcontroller.hxx
@@ -97,45 +97,14 @@ namespace dbaui
{
class ODataView;
-
- // = optional
-
- /** convenience wrapper around boost::optional, allowing typed assignments
- */
- template < typename T >
- class optional : public ::boost::optional< T >
- {
- typedef ::boost::optional< T > base_type;
-
- public:
- optional ( ) : base_type( ) { }
- explicit optional ( T const& val ) : base_type( val ) { }
- optional ( optional const& rhs ) : base_type( static_cast<base_type const&>(rhs) ) { }
-
- public:
- optional& operator= ( T const& rhs )
- {
- base_type::reset( rhs );
- return *this;
- }
- optional& operator= ( optional< T > const& rhs )
- {
- if ( rhs.is_initialized() )
- base_type::reset( rhs.get() );
- else
- base_type::reset();
- return *this;
- }
- };
-
template< typename T >
- inline bool SAL_CALL operator >>= ( const css::uno::Any & _any, optional< T >& _value )
+ inline bool SAL_CALL operator >>= (const css::uno::Any& _any, boost::optional< T >& _value)
{
_value.reset(); // de-init the optional value
T directValue = T();
if ( _any >>= directValue )
- _value.reset( directValue );
+ _value = directValue;
return !!_value;
}
@@ -153,10 +122,10 @@ namespace dbaui
{
bool bEnabled;
- optional< bool > bChecked;
- optional< bool > bInvisible;
+ boost::optional<bool> bChecked;
+ boost::optional<bool> bInvisible;
css::uno::Any aValue;
- optional< OUString > sTitle;
+ boost::optional<OUString> sTitle;
FeatureState() : bEnabled(false) { }
};
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx
index c4ad9e7493c5..48e3b486e8b8 100644
--- a/oox/source/drawingml/textparagraphproperties.cxx
+++ b/oox/source/drawingml/textparagraphproperties.cxx
@@ -418,7 +418,7 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p
{
aPropSet.setProperty<sal_Int32>( PROP_ParaLeftMargin, 0);
rioBulletMap.setProperty( PROP_LeftMargin, *noParaLeftMargin);
- noParaLeftMargin = boost::none;
+ noParaLeftMargin.reset();
}
if ( noFirstLineIndentation )
{
@@ -426,7 +426,7 @@ void TextParagraphProperties::pushToPropSet( const ::oox::core::XmlFilterBase* p
// (non) bullet line if not set to zero explicitly :(
aPropSet.setProperty<sal_Int32>( PROP_ParaFirstLineIndent, 0);
rioBulletMap.setProperty( PROP_FirstLineOffset, *noFirstLineIndentation);
- noFirstLineIndentation = boost::none;
+ noFirstLineIndentation.reset();
}
if ( nNumberingType != NumberingType::BITMAP && !rioBulletMap.hasProperty( PROP_BulletColor ) && pFilterBase )
rioBulletMap.setProperty( PROP_BulletColor, maTextCharacterProperties.maFillProperties.getBestSolidColor().getColor( pFilterBase->getGraphicHelper()));
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index eea8ffbca981..4e48d2a015f9 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -524,7 +524,8 @@ void ShapeBase::convertShapeProperties( const Reference< XShape >& rxShape ) con
// And no LineColor property; individual borders can have colors and widths
boost::optional<sal_Int32> oLineWidth;
if (maTypeModel.maStrokeModel.moWeight.has())
- oLineWidth.reset(ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maStrokeModel.moWeight.get(), 0, false, false));
+ oLineWidth = ConversionHelper::decodeMeasureToHmm(
+ rGraphicHelper, maTypeModel.maStrokeModel.moWeight.get(), 0, false, false);
if (aPropMap.hasProperty(PROP_LineColor))
{
uno::Reference<beans::XPropertySet> xPropertySet(rxShape, uno::UNO_QUERY);
@@ -658,7 +659,7 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes
boost::optional<sal_Int32> oRotation;
bool bFlipX = false, bFlipY = false;
if (!maTypeModel.maRotation.isEmpty())
- oRotation.reset(ConversionHelper::decodeRotation(maTypeModel.maRotation));
+ oRotation = ConversionHelper::decodeRotation(maTypeModel.maRotation);
if (!maTypeModel.maFlip.isEmpty())
{
if (maTypeModel.maFlip == "x")
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 9e3ced29fdc2..0d4f3afb38a1 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -592,7 +592,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
break;
case SID_INSERT_DIAGRAM:
aReturn.bEnabled = isEditable();
- aReturn.bInvisible = optional< bool >(!m_bChartEnabled);
+ aReturn.bInvisible = !m_bChartEnabled;
aReturn.bChecked = getDesignView()->GetInsertObj() == OBJ_OLE2;
break;
case SID_FM_FIXEDTEXT:
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index a8b61cdfd93f..12cc4df5ae1c 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -168,7 +168,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
case XML_ELEMENT( TABLE, XML_CONTENT_VALIDATION_NAME ):
OSL_ENSURE(!maContentValidationName, "here should be only one Validation Name");
if (!it.isEmpty())
- maContentValidationName.reset(it.toString());
+ maContentValidationName = it.toString();
break;
case XML_ELEMENT( TABLE, XML_NUMBER_ROWS_SPANNED ):
bIsMerged = true;
@@ -240,7 +240,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
if (!it.isEmpty())
{
OSL_ENSURE(!maStringValue, "here should be only one string value");
- maStringValue.reset(it.toString());
+ maStringValue = it.toString();
bIsEmpty = false;
}
}
@@ -266,7 +266,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport,
OSL_ENSURE(!maFormula, "here should be only one formula");
OUString aFormula, aFormulaNmsp;
rXMLImport.ExtractFormulaNamespaceGrammar( aFormula, aFormulaNmsp, eGrammar, it.toString() );
- maFormula.reset( FormulaWithNamespace(aFormula, aFormulaNmsp) );
+ maFormula = FormulaWithNamespace(aFormula, aFormulaNmsp);
}
}
break;
@@ -630,7 +630,7 @@ void ScXMLTableRowCellContext::PushParagraphEnd()
}
else if (mnCurParagraph == 0)
{
- maFirstParagraph.reset(maParagraph.makeStringAndClear());
+ maFirstParagraph = maParagraph.makeStringAndClear();
mbEditEngineHasText = true;
}
@@ -1336,7 +1336,7 @@ void ScXMLTableRowCellContext::AddNonFormulaCell( const ScAddress& rCellPos )
if( nCellType == util::NumberFormat::TEXT )
{
if( !bIsEmpty && !maStringValue && !mbEditEngineHasText && cellExists(rCellPos) && CellsAreRepeated() )
- pOUText.reset( getOutputString(rXMLImport.GetDocument(), rCellPos) );
+ pOUText = getOutputString(rXMLImport.GetDocument(), rCellPos);
if (!mbEditEngineHasText && !pOUText && !maStringValue)
bIsEmpty = true;
@@ -1525,7 +1525,7 @@ void SAL_CALL ScXMLTableRowCellContext::endFastElement(sal_Int32 /*nElement*/)
HasSpecialCaseFormulaText();
if( bFormulaTextResult && (mbPossibleErrorCell || mbCheckWithCompilerForError) )
{
- maStringValue.reset(GetFirstParagraph());
+ maStringValue = GetFirstParagraph();
}
ScAddress aCellPos = rXMLImport.GetTables().GetCurrentCellPos();
diff --git a/slideshow/source/engine/activities/activitiesfactory.cxx b/slideshow/source/engine/activities/activitiesfactory.cxx
index 1955be399fe1..9c7f130c25cd 100644
--- a/slideshow/source/engine/activities/activitiesfactory.cxx
+++ b/slideshow/source/engine/activities/activitiesfactory.cxx
@@ -403,21 +403,21 @@ AnimationActivitySharedPtr createFromToByActivity(
ENSURE_OR_THROW(
extractValue( aTmpValue, rFromAny, rShape, rSlideBounds ),
"createFromToByActivity(): Could not extract from value" );
- aFrom.reset(aTmpValue);
+ aFrom = aTmpValue;
}
if( rToAny.hasValue() )
{
ENSURE_OR_THROW(
extractValue( aTmpValue, rToAny, rShape, rSlideBounds ),
"createFromToByActivity(): Could not extract to value" );
- aTo.reset(aTmpValue);
+ aTo = aTmpValue;
}
if( rByAny.hasValue() )
{
ENSURE_OR_THROW(
extractValue( aTmpValue, rByAny, rShape, rSlideBounds ),
"createFromToByActivity(): Could not extract by value" );
- aBy.reset(aTmpValue);
+ aBy = aTmpValue;
}
return AnimationActivitySharedPtr(
diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx
index 1ff72c62e8a1..0b7dae6bc70b 100644
--- a/slideshow/source/engine/animationnodes/animationbasenode.cxx
+++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx
@@ -390,7 +390,7 @@ AnimationBaseNode::fillCommonParameters() const
boost::optional<double> aRepeats;
double nRepeats = 0;
if( mxAnimateNode->getRepeatCount() >>= nRepeats ) {
- aRepeats.reset( nRepeats );
+ aRepeats = nRepeats;
}
else {
if( mxAnimateNode->getRepeatDuration() >>= nRepeats ) {
@@ -402,9 +402,9 @@ AnimationBaseNode::fillCommonParameters() const
// convert duration back to repeat counts
if( bAutoReverse )
- aRepeats.reset( nRepeats / (2.0 * nDuration) );
+ aRepeats = nRepeats / (2.0 * nDuration);
else
- aRepeats.reset( nRepeats / nDuration );
+ aRepeats = nRepeats / nDuration;
}
else
{
@@ -419,7 +419,7 @@ AnimationBaseNode::fillCommonParameters() const
{
// no indefinite timing, no other values given -
// use simple run, i.e. repeat of 1.0
- aRepeats.reset( 1.0 );
+ aRepeats = 1.0;
}
}
}
diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx
index b10dcda35924..2462ae35aff9 100644
--- a/slideshow/source/engine/shapes/viewshape.cxx
+++ b/slideshow/source/engine/shapes/viewshape.cxx
@@ -557,7 +557,7 @@ namespace slideshow
{
// setup clip poly
if( pAttr->isClipValid() )
- aClip.reset( pAttr->getClip() );
+ aClip = pAttr->getClip();
// emulate global shape alpha by first rendering into
// a temp bitmap, and then to screen (this would have
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index 31548c27af95..9b7eadb65cd6 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1531,7 +1531,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
"setProperty(): User paint overrides invisible mouse" );
// enable user paint
- maUserPaintColor.reset( unoColor2RGBColor( nColor ) );
+ maUserPaintColor = unoColor2RGBColor(nColor);
if( mpCurrentSlide && !mpCurrentSlide->isPaintOverlayActive() )
mpCurrentSlide->enablePaintOverlay();
@@ -1561,7 +1561,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
"setProperty(): User paint overrides invisible mouse" );
// enable user paint
- maEraseAllInk.reset( bEraseAllInk );
+ maEraseAllInk = bEraseAllInk;
maEventMultiplexer.notifyEraseAllInk( *maEraseAllInk );
}
@@ -1578,7 +1578,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
if(bSwitchPenMode){
// Switch to Pen Mode
- maSwitchPenMode.reset( bSwitchPenMode );
+ maSwitchPenMode = bSwitchPenMode;
maEventMultiplexer.notifySwitchPenMode();
}
}
@@ -1594,7 +1594,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
"setProperty(): User paint overrides invisible mouse" );
if(bSwitchEraserMode){
// switch to Eraser mode
- maSwitchEraserMode.reset( bSwitchEraserMode );
+ maSwitchEraserMode = bSwitchEraserMode;
maEventMultiplexer.notifySwitchEraserMode();
}
}
@@ -1611,7 +1611,7 @@ sal_Bool SlideShowImpl::setProperty( beans::PropertyValue const& rProperty )
"setProperty(): User paint overrides invisible mouse" );
// enable user paint
- maEraseInk.reset( nEraseInk );
+ maEraseInk = nEraseInk;
maEventMultiplexer.notifyEraseInkWidth( *maEraseInk );
}
diff --git a/slideshow/source/engine/transitions/slidetransitionfactory.cxx b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
index 2a4566ca647a..75abacdbbfbf 100644
--- a/slideshow/source/engine/transitions/slidetransitionfactory.cxx
+++ b/slideshow/source/engine/transitions/slidetransitionfactory.cxx
@@ -1072,7 +1072,7 @@ NumberAnimationSharedPtr TransitionFactory::createSlideTransition(
if (pLeavingSlide) {
// only generate, if fade
// effect really needs it.
- leavingSlide.reset( pLeavingSlide );
+ leavingSlide = pLeavingSlide;
}
aFadeColor = rTransitionFadeColor;
break;
diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx
index f74ab35a515a..238aa92a9a08 100644
--- a/svtools/source/uno/unocontroltablemodel.cxx
+++ b/svtools/source/uno/unocontroltablemodel.cxx
@@ -548,7 +548,7 @@ namespace svt { namespace table
Color nColor = COL_TRANSPARENT;
if ( i_color >>= nColor )
{
- o_convertedColor.reset( nColor );
+ o_convertedColor = nColor;
}
else
{
@@ -705,7 +705,7 @@ namespace svt { namespace table
{
aColors[i] = Color(aAPIColors[i]);
}
- m_pImpl->m_aRowColors.reset( aColors );
+ m_pImpl->m_aRowColors = aColors;
}
}
diff --git a/svx/source/form/fmmodel.cxx b/svx/source/form/fmmodel.cxx
index 3587b4afbfbb..3791cb7a77d7 100644
--- a/svx/source/form/fmmodel.cxx
+++ b/svx/source/form/fmmodel.cxx
@@ -39,12 +39,10 @@ struct FmFormModelImplData
{
rtl::Reference<FmXUndoEnvironment> mxUndoEnv;
bool bOpenInDesignIsDefaulted;
- ::boost::optional< sal_Bool >
- aControlsUseRefDevice;
+ boost::optional<bool> aControlsUseRefDevice;
FmFormModelImplData()
:bOpenInDesignIsDefaulted( true )
- ,aControlsUseRefDevice()
{
}
};
@@ -161,7 +159,7 @@ bool FmFormModel::ControlsUseRefDevice() const
DocumentType eDocType = eUnknownDocumentType;
if ( m_pObjShell )
eDocType = DocumentClassification::classifyHostDocument( m_pObjShell->GetModel() );
- m_pImpl->aControlsUseRefDevice.reset( ControlLayouter::useDocumentReferenceDevice( eDocType ) );
+ m_pImpl->aControlsUseRefDevice = ControlLayouter::useDocumentReferenceDevice(eDocType);
}
return *m_pImpl->aControlsUseRefDevice;
}
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index ebd1784361e6..19bbc62fb5d4 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -513,7 +513,7 @@ SdrItemPool& SdrObject::GetGlobalDrawObjectItemPool()
void SdrObject::SetRelativeWidth( double nValue )
{
- mpImpl->mnRelativeWidth.reset( nValue );
+ mpImpl->mnRelativeWidth = nValue;
}
void SdrObject::SetRelativeWidthRelation( sal_Int16 eValue )
@@ -523,7 +523,7 @@ void SdrObject::SetRelativeWidthRelation( sal_Int16 eValue )
void SdrObject::SetRelativeHeight( double nValue )
{
- mpImpl->mnRelativeHeight.reset( nValue );
+ mpImpl->mnRelativeHeight = nValue;
}
void SdrObject::SetRelativeHeightRelation( sal_Int16 eValue )
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
index 8683e97e82e0..5e8ea0651c38 100644
--- a/sw/source/core/txtnode/swfont.cxx
+++ b/sw/source/core/txtnode/swfont.cxx
@@ -79,7 +79,7 @@ void SwFont::SetTopBorder( const editeng::SvxBorderLine* pTopBorder )
m_aTopBorder = *pTopBorder;
else
{
- m_aTopBorder = boost::none;
+ m_aTopBorder.reset();
m_nTopBorderDist = 0;
}
m_bFontChg = true;
@@ -92,7 +92,7 @@ void SwFont::SetBottomBorder( const editeng::SvxBorderLine* pBottomBorder )
m_aBottomBorder = *pBottomBorder;
else
{
- m_aBottomBorder = boost::none;
+ m_aBottomBorder.reset();
m_nBottomBorderDist = 0;
}
m_bFontChg = true;
@@ -105,7 +105,7 @@ void SwFont::SetRightBorder( const editeng::SvxBorderLine* pRightBorder )
m_aRightBorder = *pRightBorder;
else
{
- m_aRightBorder = boost::none;
+ m_aRightBorder.reset();
m_nRightBorderDist = 0;
}
m_bFontChg = true;
@@ -118,7 +118,7 @@ void SwFont::SetLeftBorder( const editeng::SvxBorderLine* pLeftBorder )
m_aLeftBorder = *pLeftBorder;
else
{
- m_aLeftBorder = boost::none;
+ m_aLeftBorder.reset();
m_nLeftBorderDist = 0;
}
m_bFontChg = true;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index b691312b5794..6faa43c0a473 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -8279,7 +8279,7 @@ void DocxAttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
void DocxAttributeOutput::FormatFillStyle( const XFillStyleItem& rFillStyle )
{
if (!m_bIgnoreNextFill)
- m_oFillStyle.reset(rFillStyle.GetValue());
+ m_oFillStyle = rFillStyle.GetValue();
else
m_bIgnoreNextFill = false;
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 29fb4b385d5e..cd4fd16f8534 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -1534,7 +1534,7 @@ boost::optional<SvxBrushItem> MSWordExportBase::getBackground()
{
// The 'color' is set for the first page style - take it and use it as the background color of the entire DOCX
if (aBrush.GetColor() != COL_AUTO)
- oRet.reset(aBrush);
+ oRet = aBrush;
}
return oRet;
}
diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx
index c50fecf559fc..6ff2d6d3fa4e 100644
--- a/sw/source/ui/chrdlg/break.cxx
+++ b/sw/source/ui/chrdlg/break.cxx
@@ -52,7 +52,7 @@ short SwBreakDlg::run()
if (nPos != 0 && nPos != -1)
{
m_aTemplate = m_xPageCollBox->get_active_text();
- oPgNum = boost::none;
+ oPgNum.reset();
if (m_xPageNumBox->get_active())
{
oPgNum = static_cast<sal_uInt16>(m_xPageNumEdit->get_value());
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 267a58262229..42f4f57a2a74 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2115,7 +2115,7 @@ static void setupPersonaHeaderFooter( WhichPersona eWhich, OUString& rHeaderFoot
rHeaderFooter = aOldValue;
rHeaderFooterBitmap = BitmapEx();
- rMenuBarTextColor = boost::none;
+ rMenuBarTextColor.reset();
// now read the new values and setup bitmaps
OUString aHeader, aFooter;
diff --git a/vcl/source/control/quickselectionengine.cxx b/vcl/source/control/quickselectionengine.cxx
index 2e04cf68e164..3773a3afd039 100644
--- a/vcl/source/control/quickselectionengine.cxx
+++ b/vcl/source/control/quickselectionengine.cxx
@@ -124,7 +124,7 @@ namespace vcl
if ( m_pData->sCurrentSearchString.getLength() == 1 )
{ // first character in the search -> remember
- m_pData->aSingleSearchChar.reset( c );
+ m_pData->aSingleSearchChar = c;
}
else if ( m_pData->sCurrentSearchString.getLength() > 1 )
{
diff --git a/vcl/unx/generic/window/screensaverinhibitor.cxx b/vcl/unx/generic/window/screensaverinhibitor.cxx
index 675b79269627..4b9253d6869e 100644
--- a/vcl/unx/generic/window/screensaverinhibitor.cxx
+++ b/vcl/unx/generic/window/screensaverinhibitor.cxx
@@ -50,14 +50,14 @@ void ScreenSaverInhibitor::inhibit( bool bInhibit, const OUString& sReason,
if ( bIsX11 )
{
- if ( pDisplay != boost::none )
+ if (pDisplay)
{
inhibitXScreenSaver( bInhibit, pDisplay.get() );
inhibitXAutoLock( bInhibit, pDisplay.get() );
inhibitDPMS( bInhibit, pDisplay.get() );
}
- if ( xid != boost::none )
+ if (xid)
{
inhibitGSM( bInhibit, appname, aReason.getStr(), xid.get() );
inhibitMSM( bInhibit, appname, aReason.getStr(), xid.get() );
@@ -72,8 +72,8 @@ static void dbusInhibit( bool bInhibit,
const std::function<GVariant*( GDBusProxy*, const guint, GError*& )>& fUnInhibit,
boost::optional<guint>& rCookie )
{
- if ( ( !bInhibit && ( rCookie == boost::none ) ) ||
- ( bInhibit && ( rCookie != boost::none ) ) )
+ if ( ( !bInhibit && !rCookie ) ||
+ ( bInhibit && rCookie ) )
{
return;
}
@@ -130,7 +130,7 @@ static void dbusInhibit( bool bInhibit,
else
{
res = fUnInhibit( proxy, rCookie.get(), error );
- rCookie = boost::none;
+ rCookie.reset();
if (res != nullptr)
{
@@ -281,12 +281,12 @@ void ScreenSaverInhibitor::inhibitXScreenSaver( bool bInhibit, Display* pDisplay
XSetScreenSaver( pDisplay, 0, nInterval,
bPreferBlanking, bAllowExposures );
}
- else if ( !bInhibit && ( mnXScreenSaverTimeout != boost::none ) )
+ else if ( !bInhibit && mnXScreenSaverTimeout )
{
XSetScreenSaver( pDisplay, mnXScreenSaverTimeout.get(),
nInterval, bPreferBlanking,
bAllowExposures );
- mnXScreenSaverTimeout = boost::none;
+ mnXScreenSaverTimeout.reset();
}
}
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 7d802249b2f4..16158a46fabf 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1031,7 +1031,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
break;
case NS_ooxml::LN_CT_Background_color:
if (m_pImpl->GetSettingsTable()->GetDisplayBackgroundShape())
- m_pImpl->m_oBackgroundColor.reset(nIntValue);
+ m_pImpl->m_oBackgroundColor = nIntValue;
break;
case NS_ooxml::LN_CT_PageNumber_start:
if (pSectionContext != nullptr)
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
index a8d90962c4cc..b1b08b72c8d2 100644
--- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx
@@ -451,7 +451,7 @@ void DomainMapperTableManager::startLevel( )
boost::optional<sal_Int32> oCurrentWidth;
if (m_bPushCurrentWidth && !m_aCellWidths.empty() && !m_aCellWidths.back()->empty())
{
- oCurrentWidth.reset(m_aCellWidths.back()->back());
+ oCurrentWidth = m_aCellWidths.back()->back();
m_aCellWidths.back()->pop_back();
}
@@ -491,7 +491,7 @@ void DomainMapperTableManager::endLevel( )
// Do the same trick as in startLevel(): pop the value that was pushed too early.
boost::optional<sal_Int32> oCurrentWidth;
if (m_bPushCurrentWidth && !m_aCellWidths.empty() && !m_aCellWidths.back()->empty())
- oCurrentWidth.reset(m_aCellWidths.back()->back());
+ oCurrentWidth = m_aCellWidths.back()->back();
m_aCellWidths.pop_back( );
// And push it back to the right level.
if (oCurrentWidth && !m_aCellWidths.empty() && !m_aCellWidths.back()->empty())
diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx
index b38330ca26c8..670410023dc2 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -482,9 +482,9 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
{
OUString aPoint = aToken.getToken(0, ',', nI);
if (!oX)
- oX.reset(aPoint.toInt32());
+ oX = aPoint.toInt32();
else
- oY.reset(aPoint.toInt32());
+ oY = aPoint.toInt32();
} while (nI >= 0);
drawing::EnhancedCustomShapeParameterPair aPair;
aPair.First.Value <<= *oX;
@@ -693,21 +693,21 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
}
}
else if (rProperty.first == "groupLeft")
- oGroupLeft.reset(convertTwipToMm100(rProperty.second.toInt32()));
+ oGroupLeft = convertTwipToMm100(rProperty.second.toInt32());
else if (rProperty.first == "groupTop")
- oGroupTop.reset(convertTwipToMm100(rProperty.second.toInt32()));
+ oGroupTop = convertTwipToMm100(rProperty.second.toInt32());
else if (rProperty.first == "groupRight")
- oGroupRight.reset(convertTwipToMm100(rProperty.second.toInt32()));
+ oGroupRight = convertTwipToMm100(rProperty.second.toInt32());
else if (rProperty.first == "groupBottom")
- oGroupBottom.reset(convertTwipToMm100(rProperty.second.toInt32()));
+ oGroupBottom = convertTwipToMm100(rProperty.second.toInt32());
else if (rProperty.first == "relLeft")
- oRelLeft.reset(convertTwipToMm100(rProperty.second.toInt32()));
+ oRelLeft = convertTwipToMm100(rProperty.second.toInt32());
else if (rProperty.first == "relTop")
- oRelTop.reset(convertTwipToMm100(rProperty.second.toInt32()));
+ oRelTop = convertTwipToMm100(rProperty.second.toInt32());
else if (rProperty.first == "relRight")
- oRelRight.reset(convertTwipToMm100(rProperty.second.toInt32()));
+ oRelRight = convertTwipToMm100(rProperty.second.toInt32());
else if (rProperty.first == "relBottom")
- oRelBottom.reset(convertTwipToMm100(rProperty.second.toInt32()));
+ oRelBottom = convertTwipToMm100(rProperty.second.toInt32());
else if (rProperty.first == "fBehindDocument")
bOpaque = !rProperty.second.toInt32();
else if (rProperty.first == "pctHoriz" || rProperty.first == "pctVert")
@@ -835,9 +835,9 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap
{
OUString aPoint = aToken.getToken(0, ',', nI);
if (!oX)
- oX.reset(aPoint.toInt32());
+ oX = aPoint.toInt32();
else
- oY.reset(aPoint.toInt32());
+ oY = aPoint.toInt32();
} while (nI >= 0);
RTFSprms aPathAttributes;
aPathAttributes.set(NS_ooxml::LN_CT_Point2D_x, new RTFValue(*oX));
More information about the Libreoffice-commits
mailing list