summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-28 12:47:13 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-28 12:55:37 +0200
commit469780c715f2a5dee6c58347941aefe6f3de079f (patch)
tree00cae49774f6277d6367508ed150136b52a752cb /sfx2
parent6cb080ff913fce2d0477566420157733de997f52 (diff)
fdo#54744: Fix broken logic of string comparison
d1cc007108442056f50d3a6d1212b2b4cfdc4c14 "sal_Bool to bool, String to OUString, in SfxMedium." changed !aLogicName.CompareToAscii( "private:stream", 14 ) == COMPARE_EQUAL // (a) where that suspicious ! made it effectively behave as aLogicName.CompareToAscii( "private:stream", 14 ) != COMPARE_EQUAL // (b) to (aLogicName.compareToAscii("private:stream", 14) == 0) // (c) where (c) corresponds to (a), but the intended behavior was apparently (b): Exporting to hybrid PDF now causes the embedded ODF stream (which is saved to a private:stream URL) to be empty, as (c) is erroneously satisfied now, causing the following lines to erroneously clear SID_OUTPUTSTREAM. Change-Id: Ia2c1a69db7b4da07bfe01f52c3f6759301358a84
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/docfile.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 06253f30152a..db5887e4220f 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2464,7 +2464,7 @@ void SfxMedium::Init_Impl()
SFX_ITEMSET_ARG( pImp->m_pSet, pOutStreamItem, SfxUnoAnyItem, SID_OUTPUTSTREAM, false);
if( pOutStreamItem
&& ( !( pOutStreamItem->GetValue() >>= rOutStream )
- || (pImp->m_aLogicName.compareToAscii("private:stream", 14) == 0)) )
+ || (pImp->m_aLogicName.compareToAscii("private:stream", 14) != 0)) )
{
pImp->m_pSet->ClearItem( SID_OUTPUTSTREAM );
OSL_FAIL( "Unexpected Output stream parameter!\n" );