[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - 5 commits - external/coinmp sc/source sd/source sfx2/source sw/source vcl/unx
Matúš Kukan
matus.kukan at collabora.com
Thu May 22 12:26:57 PDT 2014
external/coinmp/UnpackedTarball_coinmp.mk | 1 +
external/coinmp/werror-format-security.patch.0 | 12 ++++++++++++
sc/source/filter/excel/expop2.cxx | 3 ---
sc/source/filter/xml/xmlwrap.cxx | 2 --
sd/source/ui/docshell/docshel4.cxx | 11 -----------
sfx2/source/doc/objcont.cxx | 4 +---
sfx2/source/doc/objstor.cxx | 2 ++
sfx2/source/doc/objxtor.cxx | 2 +-
sw/source/core/uibase/app/docsh.cxx | 1 -
sw/source/filter/xml/xmlexp.cxx | 4 ----
vcl/unx/generic/dtrans/X11_transferable.cxx | 2 +-
11 files changed, 18 insertions(+), 26 deletions(-)
New commits:
commit bedf2134f78ef0c6d0117d3c29272047d90bcce3
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu May 22 16:17:12 2014 +0200
cp#1000078: Replace "\r\n" with "\n" when pasting from X11 clipboard.
E.g. when pasting from terminal you will get "\r\n".
Writer inserts '\r' character into the document as an
invisible character. If you save that to .odt and reload, you will
get ' ' instead. Or when saving to .doc and reload, you will get '\n'.
Change-Id: Id6780bf6d71a8f0a17c1e6ee7a7dcb4d297446dc
(cherry picked from commit 278baa557d18136a2641c015f7077a5838188766)
diff --git a/vcl/unx/generic/dtrans/X11_transferable.cxx b/vcl/unx/generic/dtrans/X11_transferable.cxx
index 55c5092..dd64fb7 100644
--- a/vcl/unx/generic/dtrans/X11_transferable.cxx
+++ b/vcl/unx/generic/dtrans/X11_transferable.cxx
@@ -71,7 +71,7 @@ Any SAL_CALL X11Transferable::getTransferData( const DataFlavor& rFlavor )
OUStringToOString( rFlavor.MimeType, RTL_TEXTENCODING_ISO_8859_1 ).getStr(),
OUStringToOString( aString, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
#endif
- aRet <<= aString;
+ aRet <<= aString.replaceAll("\r\n", "\n");
}
else
aRet <<= aData;
commit 24f8a56d961fdbdc470213cf1684955d6cf6f1f8
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu May 22 13:50:39 2014 +0200
Update also revision and editing time when setting 'modified' properties.
Change-Id: Id756ef6dd62ca8df2e62265b9cc930f07d13f2e3
(cherry picked from commit 6e87f0bb75734e464bb0160dc00ab2fbe1a8fac3)
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index bea59cd..7bba8d6 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -208,9 +208,7 @@ void SfxObjectShell::UpdateDocInfoForSave()
now.GetHour(), now.GetDay(), now.GetMonth(),
now.GetYear(), false) );
xDocProps->setModifiedBy( aUserName );
- if ( !HasName() || pImp->bIsSaving )
- // QUESTION: not in case of "real" SaveAs as this is meant to create a new document
- UpdateTime_Impl( xDocProps );
+ UpdateTime_Impl( xDocProps );
}
}
}
commit 47797db65faa754675c3da350862fe2c7bb980f3
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu May 22 13:42:55 2014 +0200
Use proper constructor to fill with system time.
Probably 86adb5cacb4fe3e7fb869299447da5876f0da30d did not mean to change
the behaviour here.
Change-Id: If39c150973c502323b3c785a9738cf65cdd74e5d
(cherry picked from commit fee87c6fda46923a564cd2574827a7beeffb1a1f)
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 29fe983..b0b2347 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -209,7 +209,7 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,rDocShell( _rDocShell )
,aMacroMode( *this )
,pProgress( 0)
- ,nTime( DateTime::EMPTY )
+ ,nTime( DateTime::SYSTEM )
,nVisualDocumentNumber( USHRT_MAX)
,nDocumentSignatureState( SIGNATURESTATE_UNKNOWN )
,nScriptingSignatureState( SIGNATURESTATE_UNKNOWN )
commit f18a00184733867ca9b43e0b0cf7bb6f3ceec764
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu May 22 10:11:38 2014 +0200
cp#1000077: Set 'modified' document property more consistently.
Update document info at one place, so that it works for other formats
like .doc, .docx, ... too.
Change-Id: If71799b491d2210f0d3bdbdb05f91f26c986a260
(cherry picked from commit 5c2ab70cc2dfb7cf0c2418433b3aa89d225742a4)
diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx
index 8f9ebf9..f1453e9 100644
--- a/sc/source/filter/excel/expop2.cxx
+++ b/sc/source/filter/excel/expop2.cxx
@@ -88,9 +88,6 @@ FltError ExportBiff5::Write()
if( pDocShell && xRootStrg.Is() )
{
- // #i88642# update doc info (revision etc)
- pDocShell->UpdateDocInfoForSave();
-
using namespace ::com::sun::star;
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
pDocShell->GetModel(), uno::UNO_QUERY_THROW);
diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx
index 640890b..a9e8dd9 100644
--- a/sc/source/filter/xml/xmlwrap.cxx
+++ b/sc/source/filter/xml/xmlwrap.cxx
@@ -788,8 +788,6 @@ bool ScXMLImportWrapper::Export(bool bStylesOnly)
if ( pObjSh && xStorage.is() )
{
- pObjSh->UpdateDocInfoForSave(); // update information
-
uno::Reference<frame::XModel> xModel(pObjSh->GetModel());
uno::Reference<task::XStatusIndicator> xStatusIndicator(GetStatusIndicator());
sal_Int32 nProgressRange(1000000);
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index b61aa45..654d6a8 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -506,12 +506,7 @@ bool DrawDocShell::Save()
bool bRet = SfxObjectShell::Save();
if( bRet )
- {
- // Call UpdateDocInfoForSave() before export
- UpdateDocInfoForSave();
-
bRet = SdXMLFilter( *GetMedium(), *this, true, SDXMLMODE_Normal, SotStorage::GetVersion( GetMedium()->GetStorage() ) ).Export();
- }
return bRet;
}
@@ -545,11 +540,7 @@ bool DrawDocShell::SaveAs( SfxMedium& rMedium )
bool bRet = SfxObjectShell::SaveAs( rMedium );
if( bRet )
- {
- // Call UpdateDocInfoForSave() before export
- UpdateDocInfoForSave();
bRet = SdXMLFilter( rMedium, *this, true, SDXMLMODE_Normal, SotStorage::GetVersion( rMedium.GetStorage() ) ).Export();
- }
if( GetError() == ERRCODE_NONE )
SetError( nVBWarning, OSL_LOG_PREFIX );
@@ -587,13 +578,11 @@ bool DrawDocShell::ConvertTo( SfxMedium& rMedium )
aTypeName.indexOf( "impress8" ) >= 0 )
{
pFilter = new SdXMLFilter( rMedium, *this, true );
- UpdateDocInfoForSave();
}
else if( aTypeName.indexOf( "StarOffice_XML_Impress" ) >= 0 ||
aTypeName.indexOf( "StarOffice_XML_Draw" ) >= 0 )
{
pFilter = new SdXMLFilter( rMedium, *this, true, SDXMLMODE_Normal, SOFFICE_FILEFORMAT_60 );
- UpdateDocInfoForSave();
}
else
{
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 9c5250f..1e37373 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1119,6 +1119,8 @@ bool SfxObjectShell::SaveTo_Impl
{
SAL_INFO( "sfx.doc", "saving \"" << rMedium.GetName() << "\"" );
+ UpdateDocInfoForSave();
+
AddLog( OUString( OSL_LOG_PREFIX "Begin" ) );
ModifyBlocker_Impl aMod(this);
diff --git a/sw/source/core/uibase/app/docsh.cxx b/sw/source/core/uibase/app/docsh.cxx
index 23abaf7..36b8741 100644
--- a/sw/source/core/uibase/app/docsh.cxx
+++ b/sw/source/core/uibase/app/docsh.cxx
@@ -598,7 +598,6 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
}
}
#endif
- UpdateDocInfoForSave();
}
// #i76360# Update document statistics
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 378d80b..3d3e846 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -193,10 +193,6 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
// Update doc stat, so that correct values are exported and
// the progress works correctly.
pDoc->UpdateDocStat();
-
- SfxObjectShell* pObjSh = pDoc->GetDocShell();
- if( pObjSh )
- pObjSh->UpdateDocInfoForSave(); // update information
}
if( bShowProgress )
{
commit 8b952c68c22bdd0e737fa67171c3a46f52607550
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Thu May 22 08:09:14 2014 +0200
fdo#77313: coinmp: error: format not a string literal and no format arguments
Change-Id: I044f12c4b7b28963d6d491d5e5850ddb59a564c4
(cherry picked from commit 197f2016e3164702db168e11f98f42042092e68e)
diff --git a/external/coinmp/UnpackedTarball_coinmp.mk b/external/coinmp/UnpackedTarball_coinmp.mk
index d27d46c..831f65f 100644
--- a/external/coinmp/UnpackedTarball_coinmp.mk
+++ b/external/coinmp/UnpackedTarball_coinmp.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,coinmp,\
$(eval $(call gb_UnpackedTarball_add_patches,coinmp,\
external/coinmp/android.build.patch.1 \
external/coinmp/no-binaries.patch.1 \
+ external/coinmp/werror-format-security.patch.0 \
external/coinmp/windows.build.patch.1 \
))
diff --git a/external/coinmp/werror-format-security.patch.0 b/external/coinmp/werror-format-security.patch.0
new file mode 100644
index 0000000..90c116b
--- /dev/null
+++ b/external/coinmp/werror-format-security.patch.0
@@ -0,0 +1,12 @@
+diff -ur coinmp.org/CoinUtils/src/CoinMessageHandler.cpp coinmp/CoinUtils/src/CoinMessageHandler.cpp
+--- CoinUtils/src/CoinMessageHandler.cpp 2014-05-21 23:14:01.384874167 +0200
++++ CoinUtils/src/CoinMessageHandler.cpp 2014-05-21 23:14:47.708874712 +0200
+@@ -820,7 +820,7 @@
+ sprintf(messageOut_,g_format_,doublevalue);
+ if (next != format_+2) {
+ messageOut_+=strlen(messageOut_);
+- sprintf(messageOut_,format_+2);
++ sprintf(messageOut_,"%s",format_+2);
+ }
+ }
+ messageOut_+=strlen(messageOut_);
More information about the Libreoffice-commits
mailing list