summaryrefslogtreecommitdiff
path: root/scripting/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-30 20:27:26 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-10-31 09:14:39 +0100
commitd526bd7dd5b94be6fe5a823372da1facca3d43fa (patch)
tree656b49726096326e7832cde5c177f85fd8c8c454 /scripting/source
parent7eeb484e7d1faf87fbb8774a8bda4328d047dde3 (diff)
Fix StringAdd::isCompileTimeConstant
...to find StringLiteral on the RHS of +=. Which revealed that the VisitCompoundStmt/checkForCompoundAssign logic needed to be fixed, too, so that s += side_effect(); s += "literal"; s += side_effect(); only gets combined to s += side_effect() + "literal"; s += side_effect(); and not all the way to s += side_effect() + "literal" + side_effect(); Change-Id: I432e3458b933a7d0ad6141c747b675cc8b0f0ba4 Reviewed-on: https://gerrit.libreoffice.org/81804 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'scripting/source')
-rw-r--r--scripting/source/stringresource/stringresource.cxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index 58a4bf3da3dd..5440e7a1c220 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -878,8 +878,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
{
if( pLocaleItem )
{
- OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem.get(), m_aNameBase );
- aStreamName += ".properties";
+ OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem.get(), m_aNameBase ) + ".properties";
try
{
@@ -899,8 +898,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
if( pLocaleItem != nullptr && (bStoreAll || pLocaleItem->m_bModified) &&
loadLocale( pLocaleItem.get() ) )
{
- OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem.get(), aNameBase );
- aStreamName += ".properties";
+ OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem.get(), aNameBase ) + ".properties";
Reference< io::XStream > xElementStream =
Storage->openStreamElement( aStreamName, ElementModes::READWRITE );
@@ -932,8 +930,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
{
for( auto& pLocaleItem : m_aChangedDefaultLocaleVector )
{
- OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem.get(), m_aNameBase );
- aStreamName += ".default";
+ OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem.get(), m_aNameBase ) + ".default";
try
{
@@ -950,8 +947,7 @@ void StringResourcePersistenceImpl::implStoreAtStorage
// Default locale
if( m_pDefaultLocaleItem != nullptr && (bStoreAll || m_bDefaultModified) )
{
- OUString aStreamName = implGetFileNameForLocaleItem( m_pDefaultLocaleItem, aNameBase );
- aStreamName += ".default";
+ OUString aStreamName = implGetFileNameForLocaleItem( m_pDefaultLocaleItem, aNameBase ) + ".default";
Reference< io::XStream > xElementStream =
Storage->openStreamElement( aStreamName, ElementModes::READWRITE );
@@ -2313,8 +2309,7 @@ bool StringResourceWithStorageImpl::implLoadLocale( LocaleItem* pLocaleItem )
bool bSuccess = false;
try
{
- OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem, m_aNameBase );
- aStreamName += ".properties";
+ OUString aStreamName = implGetFileNameForLocaleItem( pLocaleItem, m_aNameBase ) + ".properties";
Reference< io::XStream > xElementStream =
m_xStorage->openStreamElement( aStreamName, ElementModes::READ );