diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-10 15:52:05 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-10 15:52:05 +0200 |
commit | 8132d7f9d71d9f6418855d2d6241dae804beeb8b (patch) | |
tree | 7394f094265efdfaaa4ce02ce287da39c1a43f1a /xmloff/source/text/txtexppr.cxx | |
parent | 285744fef87f4ca0278834b97d7f618bdba5f4c0 (diff) |
o3tl::tryGet on a temporary is dangerous
...so rename to o3tl::tryAccess to make it more obvious that the returned
proxy points into the internals of the given Any, and forbid calling
o3tl::tryAccess on a temporary
Change-Id: Ia412c6b2b06693811b9b7f0076a08bbf97142df9
Diffstat (limited to 'xmloff/source/text/txtexppr.cxx')
-rw-r--r-- | xmloff/source/text/txtexppr.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx index d77a548e95ed..4ebf531a4711 100644 --- a/xmloff/source/text/txtexppr.cxx +++ b/xmloff/source/text/txtexppr.cxx @@ -149,7 +149,7 @@ void XMLTextExportPropertySetMapper::handleSpecialItem( { case CTF_DROPCAPWHOLEWORD: DBG_ASSERT( !bDropWholeWord, "drop whole word is set already!" ); - pThis->bDropWholeWord = *o3tl::doGet<bool>(rProperty.maValue); + pThis->bDropWholeWord = *o3tl::doAccess<bool>(rProperty.maValue); break; case CTF_DROPCAPCHARSTYLE: DBG_ASSERT( sDropCharStyle.isEmpty(), "drop char style is set already!" ); @@ -1005,7 +1005,7 @@ void XMLTextExportPropertySetMapper::ContextFilter( } if( pWrapContourModeState && (!pWrapContourState || - !*o3tl::doGet<bool>(pWrapContourState ->maValue) ) ) + !*o3tl::doAccess<bool>(pWrapContourState ->maValue) ) ) pWrapContourModeState->mnIndex = -1; } @@ -1023,7 +1023,7 @@ void XMLTextExportPropertySetMapper::ContextFilter( if( pHoriOrientState && pHoriOrientMirroredState ) { if( pHoriOrientMirrorState && - *o3tl::doGet<bool>(pHoriOrientMirrorState->maValue) ) + *o3tl::doAccess<bool>(pHoriOrientMirrorState->maValue) ) pHoriOrientState->mnIndex = -1; else pHoriOrientMirroredState->mnIndex = -1; @@ -1099,7 +1099,7 @@ void XMLTextExportPropertySetMapper::ContextFilter( if( pShapeHoriOrientState && pShapeHoriOrientMirroredState ) { if( pShapeHoriOrientMirrorState && - *o3tl::doGet<bool>(pShapeHoriOrientMirrorState->maValue) ) + *o3tl::doAccess<bool>(pShapeHoriOrientMirrorState->maValue) ) pShapeHoriOrientState->mnIndex = -1; else pShapeHoriOrientMirroredState->mnIndex = -1; |