[Libreoffice-commits] .: 13 commits - idl/source solenv/gbuild sw/inc sw/source testtools/source xmlsecurity/source
Michael Stahl
mst at kemper.freedesktop.org
Fri Nov 18 13:25:51 PST 2011
idl/source/prj/database.cxx | 51 ++++++++++++++++++++---
solenv/gbuild/ComponentTarget.mk | 1
sw/inc/doc.hxx | 1
sw/source/core/crsr/swcrsr.cxx | 22 +++++++++
sw/source/core/doc/doc.cxx | 11 ++++
sw/source/core/doc/docedt.cxx | 8 +++
sw/source/core/inc/sectfrm.hxx | 2
sw/source/core/layout/newfrm.cxx | 9 +++-
sw/source/core/layout/sectfrm.cxx | 22 ++++-----
sw/source/core/undo/unins.cxx | 12 +++--
sw/source/ui/uiview/viewsrch.cxx | 17 ++++++-
sw/source/ui/wrtsh/wrtundo.cxx | 3 -
testtools/source/bridgetest/makefile.mk | 9 ++++
xmlsecurity/source/xmlsec/nss/nssinitializer.cxx | 2
14 files changed, 138 insertions(+), 32 deletions(-)
New commits:
commit 986ac894f4288fcbde35771793f332c5981abc27
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Nov 18 18:55:47 2011 +0100
SwSectionFrm: s/sal_Bool/bool/
diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx
index 7966b8e..bc16e52 100644
--- a/sw/source/core/inc/sectfrm.hxx
+++ b/sw/source/core/inc/sectfrm.hxx
@@ -60,7 +60,7 @@ class SwSectionFrm: public SwLayoutFrm, public SwFlowFrm
void CalcFtnAtEndFlag();
void CalcEndAtEndFlag();
const SwSectionFmt* _GetEndSectFmt() const;
- sal_Bool IsEndnoteAtMyEnd() const;
+ bool IsEndnoteAtMyEnd() const;
protected:
virtual void MakeAll();
virtual sal_Bool ShouldBwdMoved( SwLayoutFrm *pNewUpper, sal_Bool bHead, sal_Bool &rReformat );
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 5091d5f..6f568f4 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -2369,7 +2369,7 @@ void SwSectionFrm::CalcFtnAtEndFlag()
}
}
-sal_Bool SwSectionFrm::IsEndnoteAtMyEnd() const
+bool SwSectionFrm::IsEndnoteAtMyEnd() const
{
return pSection->GetFmt()->GetEndAtTxtEnd( sal_False ).IsAtEnd();
}
@@ -2469,13 +2469,13 @@ void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew
} while ( pTmp );
aCol.Init( nCol, 0, 1000 );
}
- sal_Bool bChgFtn = IsFtnAtEnd();
- sal_Bool bChgEndn = IsEndnAtEnd();
- sal_Bool bChgMyEndn = IsEndnoteAtMyEnd();
+ bool bChgFtn = IsFtnAtEnd();
+ bool const bChgEndn = IsEndnAtEnd();
+ bool const bChgMyEndn = IsEndnoteAtMyEnd();
CalcFtnAtEndFlag();
CalcEndAtEndFlag();
- bChgFtn = ( bChgFtn != (sal_Bool) IsFtnAtEnd() ) ||
- ( bChgEndn != (sal_Bool) IsEndnAtEnd() ) ||
+ bChgFtn = ( bChgFtn != IsFtnAtEnd() ) ||
+ ( bChgEndn != IsEndnAtEnd() ) ||
( bChgMyEndn != IsEndnoteAtMyEnd() );
ChgColumns( aCol, rNewCol, bChgFtn );
rInvFlags |= 0x10;
@@ -2496,9 +2496,9 @@ void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew
case RES_FTN_AT_TXTEND:
if( !IsInFtn() )
{
- sal_Bool bOld = IsFtnAtEnd();
+ bool const bOld = IsFtnAtEnd();
CalcFtnAtEndFlag();
- if( bOld != (sal_Bool) IsFtnAtEnd() )
+ if (bOld != IsFtnAtEnd())
{
const SwFmtCol& rNewCol = GetFmt()->GetCol();
ChgColumns( rNewCol, rNewCol, sal_True );
@@ -2510,10 +2510,10 @@ void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew
case RES_END_AT_TXTEND:
if( !IsInFtn() )
{
- sal_Bool bOld = IsEndnAtEnd();
- sal_Bool bMyOld = IsEndnoteAtMyEnd();
+ bool const bOld = IsEndnAtEnd();
+ bool const bMyOld = IsEndnoteAtMyEnd();
CalcEndAtEndFlag();
- if( bOld != (sal_Bool) IsEndnAtEnd() || bMyOld != IsEndnoteAtMyEnd())
+ if (bOld != IsEndnAtEnd() || bMyOld != IsEndnoteAtMyEnd())
{
const SwFmtCol& rNewCol = GetFmt()->GetCol();
ChgColumns( rNewCol, rNewCol, sal_True );
commit eedfbf5b8b99049753f444ea71e0944a69dbc60c
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Nov 18 17:14:04 2011 +0100
fdo#42865: let's try map file for windows only
diff --git a/testtools/source/bridgetest/makefile.mk b/testtools/source/bridgetest/makefile.mk
index 8d2f21b..1423190 100644
--- a/testtools/source/bridgetest/makefile.mk
+++ b/testtools/source/bridgetest/makefile.mk
@@ -83,7 +83,11 @@ SHL1STDLIBS= \
SHL1LIBS= $(LIB1TARGET)
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
DEF1NAME= $(SHL1TARGET)
+.IF "$(GUI)"=="WNT"
SHL1VERSIONMAP = $(SOLARENV)/src/component.map
+.ELSE # just a quick hack for GCC fdo#42865
+SHL1USE_EXPORTS = name
+.ENDIF
# ---- test object ----
@@ -102,7 +106,12 @@ SHL2STDLIBS= \
SHL2LIBS= $(LIB2TARGET)
SHL2DEF= $(MISC)$/$(SHL2TARGET).def
DEF2NAME= $(SHL2TARGET)
+.IF "$(GUI)"=="WNT"
SHL2VERSIONMAP = $(SOLARENV)/src/component.map
+.ELSE # just a quick hack for GCC fdo#42865
+SHL2USE_EXPORTS = name
+.ENDIF
+
SHL3TARGET = $(ENFORCEDSHLPREFIX)constructors.uno
SHL3OBJS = $(SLO)$/constructors.obj
commit 6c1ac01a4ac425456cb14e4ba34a3a2d9286453b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Nov 18 16:50:03 2011 +0100
fdo#42534: SwRootFrm: clear SwLayouter in dtor
This crash is probably a regression introduced by CWS swlayoutrefactoring.
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 8427b17..52991c1 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -949,6 +949,7 @@ public:
virtual const SwRootFrm *GetCurrentLayout() const;
virtual SwRootFrm *GetCurrentLayout();//swmod 080219
virtual bool HasLayout() const;
+ void ClearSwLayouterEntries();
/** IDocumentTimerAccess
*/
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 326cfde..d4929bb 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1815,13 +1815,22 @@ bool SwDoc::IsModified() const
return mbModified;
}
-void SwDoc::SetModified()
+//Load document from fdo#42534 under valgrind, drag the scrollbar down so full
+//document layout is triggered. Close document before layout has completed, and
+//SwAnchoredObject objects deleted by the deletion of layout remain referenced
+//by the SwLayouter
+void SwDoc::ClearSwLayouterEntries()
{
SwLayouter::ClearMovedFwdFrms( *this );
SwLayouter::ClearObjsTmpConsiderWrapInfluence( *this );
SwLayouter::ClearFrmsNotToWrap( *this );
// #i65250#
SwLayouter::ClearMoveBwdLayoutInfo( *this );
+}
+
+void SwDoc::SetModified()
+{
+ ClearSwLayouterEntries();
// We return the status for the link according to the old and new value of the flags
// Bit 0: -> old state
// Bit 1: -> new state
diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx
index 4504e6e..9c7c5af 100644
--- a/sw/source/core/layout/newfrm.cxx
+++ b/sw/source/core/layout/newfrm.cxx
@@ -616,8 +616,13 @@ SwRootFrm::~SwRootFrm()
if(pBlink)
pBlink->FrmDelete( this );
- if ( static_cast<SwFrmFmt*>(GetRegisteredInNonConst()) )
- static_cast<SwFrmFmt*>(GetRegisteredInNonConst())->GetDoc()->DelFrmFmt( static_cast<SwFrmFmt*>(GetRegisteredInNonConst()) );
+ SwFrmFmt *pRegisteredInNonConst = static_cast<SwFrmFmt*>(GetRegisteredInNonConst());
+ if ( pRegisteredInNonConst )
+ {
+ SwDoc *pDoc = pRegisteredInNonConst->GetDoc();
+ pDoc->DelFrmFmt( pRegisteredInNonConst );
+ pDoc->ClearSwLayouterEntries();
+ }
delete pDestroy;
pDestroy = 0;
commit 9de2110e5bed17fcc6050bfaa669df45f0c1eb44
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Nov 18 14:54:48 2011 +0100
SwCursor::RestoreSavePos: assert on invalid position
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 7340ccc..a633bc0 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -2093,21 +2093,27 @@ sal_Bool SwCursor::MoveSection( SwWhichSection fnWhichSect,
void SwCursor::RestoreSavePos()
{
- // fdo#40831 if you delete the row or column containing pSavePos,
- // Writer will crash. Work around this.
+ // This method is not supposed to be used in cases when nodes may be
+ // deleted; detect such cases, but do not crash (example: fdo#40831).
sal_uLong uNodeCount = GetPoint()->nNode.GetNodes().Count();
+ OSL_ENSURE(!pSavePos || pSavePos->nNode < uNodeCount,
+ "SwCursor::RestoreSavePos: invalid node: "
+ "probably something was deleted; consider using SwUnoCrsr instead");
if( pSavePos && pSavePos->nNode < uNodeCount )
{
GetPoint()->nNode = pSavePos->nNode;
xub_StrLen nIdx = 0;
if ( GetCntntNode() )
+ {
if ( pSavePos->nCntnt <= GetCntntNode()->Len() )
nIdx = pSavePos->nCntnt;
else
+ {
nIdx = GetCntntNode()->Len();
- else
- nIdx = GetPoint()->nContent.GetIndex(); // Probably, nIdx = 0
+ OSL_FAIL("SwCursor::RestoreSavePos: invalid content index");
+ }
+ }
GetPoint()->nContent.Assign( GetCntntNode(), nIdx );
}
}
commit af0333e5865ecd184270af3211880d6d02307c31
Author: Tomofumi Yagi <yagit at mknada.sakura.ne.jp>
Date: Fri Nov 18 14:38:19 2011 +0100
fdo#40831: SwCursor::RestoreSavePos:
Check that position is valid, so the cursor does not point to a
non-existent node.
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index a6fea0d..7340ccc 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -2093,10 +2093,22 @@ sal_Bool SwCursor::MoveSection( SwWhichSection fnWhichSect,
void SwCursor::RestoreSavePos()
{
- if( pSavePos )
+ // fdo#40831 if you delete the row or column containing pSavePos,
+ // Writer will crash. Work around this.
+ sal_uLong uNodeCount = GetPoint()->nNode.GetNodes().Count();
+ if( pSavePos && pSavePos->nNode < uNodeCount )
{
GetPoint()->nNode = pSavePos->nNode;
- GetPoint()->nContent.Assign( GetCntntNode(), pSavePos->nCntnt );
+
+ xub_StrLen nIdx = 0;
+ if ( GetCntntNode() )
+ if ( pSavePos->nCntnt <= GetCntntNode()->Len() )
+ nIdx = pSavePos->nCntnt;
+ else
+ nIdx = GetCntntNode()->Len();
+ else
+ nIdx = GetPoint()->nContent.GetIndex(); // Probably, nIdx = 0
+ GetPoint()->nContent.Assign( GetCntntNode(), nIdx );
}
}
commit 82a716f29cc252740c80556f72f9d9e602877918
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Nov 18 14:12:42 2011 +0100
fdo#40831: SwView::ExecSearch:
Replace may delete nodes, so the current cursor position must be stored
in a way so that it is corrected when nodes are removed.
diff --git a/sw/source/ui/uiview/viewsrch.cxx b/sw/source/ui/uiview/viewsrch.cxx
index 3a568c1..501e965 100644
--- a/sw/source/ui/uiview/viewsrch.cxx
+++ b/sw/source/ui/uiview/viewsrch.cxx
@@ -30,6 +30,9 @@
#include "precompiled_sw.hxx"
#include <string>
+
+#include <boost/scoped_ptr.hpp>
+
#include <hintids.hxx>
#include <com/sun/star/util/SearchOptions.hpp>
#include <svl/cjkoptions.hxx>
@@ -57,6 +60,8 @@
#include <uitool.hxx>
#include <cmdid.h>
#include <docsh.hxx>
+#include <doc.hxx>
+#include <unocrsr.hxx>
#include <view.hrc>
#include <SwRewriter.hxx>
@@ -283,7 +288,14 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
case SVX_SEARCHCMD_REPLACE_ALL:
{
SwSearchOptions aOpts( pWrtShell, pSrchItem->GetBackward() );
- SwCrsrSaveState aSaveCursor( *pWrtShell->GetSwCrsr());
+
+ // Fix for i#8288: "Replace all" should leave the cursor at the place it was
+ // before executing the command, rather than at the site of the final replacement.
+ // To do this take note of the current cursor position before replace all begins:
+ // note: must be stored so that it is corrected by PamCorr*
+ ::boost::scoped_ptr<SwUnoCrsr> const pTmpCursor(
+ pWrtShell->GetDoc()->CreateUnoCrsr(
+ *pWrtShell->GetSwCrsr()->GetPoint()));
if( !pSrchItem->GetSelection() )
{
@@ -304,7 +316,8 @@ void SwView::ExecSearch(SfxRequest& rReq, sal_Bool bNoMessage)
pWrtShell->StartAllAction();
nFound = FUNC_Search( aOpts );
// #i8288# Now that everything has been replaced, restore the original cursor position.
- pWrtShell->GetSwCrsr()->RestoreSavePos(); // (position saved by SwCrsrSaveState above)
+ *(pWrtShell->GetSwCrsr()->GetPoint()) =
+ *pTmpCursor->GetPoint();
pWrtShell->EndAllAction();
}
commit e0d4e6f22a4290a4b11a342fd59523b28963838c
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Nov 18 14:07:11 2011 +0100
i#102333: SwDoc::ReplaceRangeImpl:
The fix for this (230fcf4a456636bb466f72834cd57238621d206d) was not
quite right; there are 2 different join modes, and moving the cursor
backward is required in one of them, but not the other.
This can be seen when doing replace all ^$ with several consecutive
empty lines.
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index 22292b4..d6736f5 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -2481,6 +2481,11 @@ SetRedlineMode( eOld );
rPam.GetMark()->nContent.Assign( aPtNd.GetNode().GetCntntNode(),
nPtCnt );
+ if (bJoinTxt && !bJoinPrev)
+ {
+ rPam.Move(fnMoveBackward);
+ }
+
if( pUndoRpl )
{
pUndoRpl->SetEnd(rPam);
commit 74f53711fa7e54c4d449912be53c50eebb002451
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Nov 18 14:01:46 2011 +0100
SwDoc::ReplaceRange: prevent assertion
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index b4c8e07..22292b4 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -2219,6 +2219,9 @@ bool SwDoc::ReplaceRange( SwPaM& rPam, const String& rStr,
if (!Breaks.size())
{
+ // park aPam somewhere so it does not point to node that is deleted
+ aPam.DeleteMark();
+ *aPam.GetPoint() = SwPosition(GetNodes().GetEndOfContent());
return ReplaceRangeImpl(rPam, rStr, bRegExReplace); // original pam!
}
commit 72318173b6d2f6f62e15909dcc121e85872c0ef1
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Nov 18 13:59:49 2011 +0100
SwUndoReplace::Impl::UndoImpl: prevent assertion:
unregister SwIndex local variable from node to be deleted
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index d845c48..b4d6063 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -606,7 +606,7 @@ SwUndoReplace::Impl::Impl(
m_bSplitNext = m_nSttNd != pEnd->nNode.GetIndex();
SwTxtNode* pNd = pStt->nNode.GetNode().GetTxtNode();
- OSL_ENSURE( pNd, "wo ist der TextNode" );
+ OSL_ENSURE( pNd, "Dude, where's my TextNode?" );
pHistory = new SwHistory;
DelCntntIndex( *rPam.GetMark(), *rPam.GetPoint() );
@@ -655,7 +655,7 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext)
rPam.DeleteMark();
SwTxtNode* pNd = pDoc->GetNodes()[ m_nSttNd - m_nOffset ]->GetTxtNode();
- OSL_ENSURE( pNd, "Wo ist der TextNode geblieben?" );
+ OSL_ENSURE( pNd, "Dude, where's my TextNode?" );
SwAutoCorrExceptWord* pACEWord = pDoc->GetAutoCorrExceptWord();
if( pACEWord )
@@ -668,7 +668,7 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext)
pDoc->SetAutoCorrExceptWord( 0 );
}
- SwIndex aIdx( pNd, sal_uInt16( m_nSttCnt ) );
+ SwIndex aIdx( pNd, m_nSttCnt );
if( m_nSttNd == m_nEndNd )
{
pNd->EraseText( aIdx, sal_uInt16( m_sIns.getLength() ) );
@@ -680,11 +680,13 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext)
rPam.SetMark();
rPam.GetPoint()->nNode = m_nEndNd - m_nOffset;
rPam.GetPoint()->nContent.Assign( rPam.GetCntntNode(), m_nEndCnt );
+ // move it out of the way so it is not registered at deleted node
+ aIdx.Assign(0, 0);
pDoc->DeleteAndJoin( rPam );
rPam.DeleteMark();
pNd = rPam.GetNode()->GetTxtNode();
- OSL_ENSURE( pNd, "Wo ist der TextNode geblieben?" );
+ OSL_ENSURE( pNd, "Dude, where's my TextNode?" );
aIdx.Assign( pNd, m_nSttCnt );
}
@@ -741,7 +743,7 @@ void SwUndoReplace::Impl::RedoImpl(::sw::UndoRedoContext & rContext)
rPam.GetPoint()->nNode = m_nSttNd;
SwTxtNode* pNd = rPam.GetPoint()->nNode.GetNode().GetTxtNode();
- OSL_ENSURE( pNd, "Wo ist der TextNode geblieben?" );
+ OSL_ENSURE( pNd, "Dude, where's my TextNode?" );
rPam.GetPoint()->nContent.Assign( pNd, m_nSttCnt );
rPam.SetMark();
if( m_bSplitNext )
commit 0fbd0bbfecda7b0a4642c2cbe8ea80027265192d
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Nov 18 13:57:02 2011 +0100
SwWrtShell::GetDoStrings: bogus assertion
diff --git a/sw/source/ui/wrtsh/wrtundo.cxx b/sw/source/ui/wrtsh/wrtundo.cxx
index 5ec7103..ff6aea3 100644
--- a/sw/source/ui/wrtsh/wrtundo.cxx
+++ b/sw/source/ui/wrtsh/wrtundo.cxx
@@ -56,7 +56,7 @@ void SwWrtShell::Do( DoType eDoType, sal_uInt16 nCnt )
sal_Bool bSaveDoesUndo = DoesUndo();
StartAllAction();
- switch( eDoType )
+ switch (eDoType)
{
case UNDO:
DoUndo(sal_False); // #i21739#
@@ -156,7 +156,6 @@ sal_uInt16 SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs )
OSL_ENSURE(comments[i].getLength(), "no Undo/Redo Text set");
buf.append(comments[i]);
buf.append(sal_Unicode('\n'));
- OSL_ENSURE( !this, "no Undo/Redo Test set" );
}
rStrs.SetString(buf.makeStringAndClear());
return static_cast<sal_uInt16>(comments.size());
commit 0d09e4025ee8d8590211636ee08984ecc3821709
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Nov 18 13:55:28 2011 +0100
ComponentTarget: do not generate broken component files
diff --git a/solenv/gbuild/ComponentTarget.mk b/solenv/gbuild/ComponentTarget.mk
index f840726..031d118 100644
--- a/solenv/gbuild/ComponentTarget.mk
+++ b/solenv/gbuild/ComponentTarget.mk
@@ -31,6 +31,7 @@ gb_ComponentTarget_get_source = $(1)/$(2).component
define gb_ComponentTarget__command
$(call gb_Output_announce,$(3),$(true),CMP,1)
+$(if $(LIBFILENAME),,$(call gb_Output_error,No LIBFILENAME set at component target: $(1)))
$(call gb_Helper_abbreviate_dirs_native,\
mkdir -p $(dir $(1)) && \
$(gb_XSLTPROC) --nonet --stringparam uri \
commit fa0512fe721678eaa83c21c2f1f53d36c6e91420
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Nov 17 11:39:01 2011 +0100
xmlsecurity: fix typo
diff --git a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
index eaa5e32..f2f8bc0 100644
--- a/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
+++ b/xmlsecurity/source/xmlsec/nss/nssinitializer.cxx
@@ -376,7 +376,7 @@ extern "C" void nsscrypto_finalize()
}
else
{
- xmlsec_trace("Failed unloadeding module \""ROOT_CERTS"\".");
+ xmlsec_trace("Failed unloading module \""ROOT_CERTS"\".");
}
SECMOD_DestroyModule(RootsModule);
}
commit a042c2a6ab29011800de55fa382740be56c2d928
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Nov 16 22:51:48 2011 +0100
svidl: write dependencies with cygwin paths
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 674aeac..c0bf3c2 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -837,6 +837,49 @@ void SvIdlDataBase::AddDepFile(String const& rFileName)
m_DepFiles.insert(rFileName);
}
+#ifdef WNT
+static ::rtl::OString
+lcl_ConvertToCygwin(::rtl::OString const& rString)
+{
+ sal_Int32 i = 0;
+ sal_Int32 const len = rString.getLength();
+ ::rtl::OStringBuffer buf(len + 16);
+ if ((2 <= len) && (':' == rString[1]))
+ {
+ buf.append("/cygdrive/");
+ buf.append(static_cast<sal_Char>(tolower(rString[0])));
+ i = 2;
+ }
+ for (; i < len; ++i)
+ {
+ sal_Char const c(rString[i]);
+ switch (c)
+ {
+ case '\\':
+ buf.append('/');
+ break;
+ case ' ':
+ buf.append("\\ ");
+ break;
+ default:
+ buf.append(c);
+ break;
+ }
+ }
+ return buf.makeStringAndClear();
+}
+#endif
+
+static ::rtl::OString
+lcl_Convert(::rtl::OUString const& rString)
+{
+ return
+#ifdef WNT
+ lcl_ConvertToCygwin
+#endif
+ (::rtl::OUStringToOString(rString, RTL_TEXTENCODING_UTF8));
+}
+
struct WriteDep
{
SvFileStream & m_rStream;
@@ -844,17 +887,15 @@ struct WriteDep
void operator() (::rtl::OUString const& rItem)
{
m_rStream << " \\\n ";
- m_rStream <<
- ::rtl::OUStringToOString(rItem, RTL_TEXTENCODING_UTF8).getStr();
+ m_rStream << lcl_Convert(rItem).getStr();
}
};
bool SvIdlDataBase::WriteDepFile(
SvFileStream & rStream, ::rtl::OUString const& rTarget)
{
- rStream <<
- ::rtl::OUStringToOString(rTarget, RTL_TEXTENCODING_UTF8).getStr();
- rStream << " : ";
+ rStream << lcl_Convert(rTarget).getStr();
+ rStream << " :";
::std::for_each(m_DepFiles.begin(), m_DepFiles.end(), WriteDep(rStream));
return rStream.GetError() == SVSTREAM_OK;
}
More information about the Libreoffice-commits
mailing list