[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/ww8par.cxx | 172 1 file changed, 88 insertions(+), 84 deletions(-) New commits: commit b14f6849f297406e9308576d2a5ad22d295cc125 Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Wed Feb 13 02:49:57 2013 +0100 fdo#43105: apply old sw-nested-positionned-tables-ww8-import-fix.diff - replaced the really ugly goto hack though (cherry picked from commit ee1db992b98378b5e2f5e9aa8af0e36c375e582f) Change-Id: I14dfbe414dc16b634fbaca0a365e2e9ec37ab08e Reviewed-on: https://gerrit.libreoffice.org/2133 Reviewed-by: Björn Michaelsen bjoern.michael...@canonical.com Tested-by: Björn Michaelsen bjoern.michael...@canonical.com Signed-off-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 1d245c2..5cf410f 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2251,113 +2251,117 @@ bool SwWW8ImplReader::ProcessSpecial(bool rbReSync, WW8_CP nStartCp) if (!nCellLevel) nCellLevel = 0 != pPlcxMan-HasParaSprm(0x244B); } - -WW8_TablePos *pTabPos=0; -WW8_TablePos aTabPos; -if (nCellLevel !bVer67) +do { -WW8PLCFxSave1 aSave; -pPlcxMan-GetPap()-Save( aSave ); -rbReSync = true; -WW8PLCFx_Cp_FKP* pPap = pPlcxMan-GetPapPLCF(); -WW8_CP nMyStartCp=nStartCp; +WW8_TablePos *pTabPos=0; +WW8_TablePos aTabPos; +if(nCellLevel !bVer67) +{ +WW8PLCFxSave1 aSave; +pPlcxMan-GetPap()-Save( aSave ); +rbReSync = true; +WW8PLCFx_Cp_FKP* pPap = pPlcxMan-GetPapPLCF(); +WW8_CP nMyStartCp=nStartCp; -if (const sal_uInt8 *pLevel = pPlcxMan-HasParaSprm(0x6649)) -nCellLevel = *pLevel; +if (const sal_uInt8 *pLevel = pPlcxMan-HasParaSprm(0x6649)) +nCellLevel = *pLevel; -bool bHasRowEnd = SearchRowEnd(pPap, nMyStartCp, nCellLevel-1); +bool bHasRowEnd = SearchRowEnd(pPap, nMyStartCp, (nInTablenCellLevel?nInTable:nCellLevel-1)); -//Bad Table, remain unchanged in level, e.g. #i19667# -if (!bHasRowEnd) -nCellLevel = static_cast sal_uInt8 (nInTable); +//Bad Table, remain unchanged in level, e.g. #i19667# +if (!bHasRowEnd) +nCellLevel = static_cast sal_uInt8 (nInTable); -if (bHasRowEnd ParseTabPos(aTabPos,pPap)) -pTabPos = aTabPos; +if (bHasRowEnd ParseTabPos(aTabPos,pPap)) +pTabPos = aTabPos; -pPlcxMan-GetPap()-Restore( aSave ); -} +pPlcxMan-GetPap()-Restore( aSave ); +} -// then look if we are in an Apo +// then look if we are in an Apo -ApoTestResults aApo = TestApo(nCellLevel, bTableRowEnd, pTabPos); +ApoTestResults aApo = TestApo(nCellLevel, bTableRowEnd, pTabPos); -//look to see if we are in a Table, but Table in foot/end note not allowed -bool bStartTab = (nInTable nCellLevel) !bFtnEdn; +//look to see if we are in a Table, but Table in foot/end note not allowed +bool bStartTab = (nInTable nCellLevel) !bFtnEdn; -bool bStopTab = bWasTabRowEnd (nInTable nCellLevel) !bFtnEdn; +bool bStopTab = bWasTabRowEnd (nInTable nCellLevel) !bFtnEdn; -bWasTabRowEnd = false; // must be deactivated right here to prevent next -// WW8TabDesc::TableCellEnd() from making nonsense +bWasTabRowEnd = false; // must be deactivated right here to prevent next +// WW8TabDesc::TableCellEnd() from making nonsense -if (nInTable !bTableRowEnd !bStopTab (nInTable == nCellLevel aApo.HasStartStop())) -bStopTab = bStartTab = true;// Required to stop and start table +if (nInTable !bTableRowEnd !bStopTab (nInTable == nCellLevel aApo.HasStartStop())) +bStopTab = bStartTab = true;// Required to stop and start table -// Dann auf Anl (Nummerierung) testen -// und dann alle Ereignisse in der richtigen Reihenfolge bearbeiten +// Dann auf Anl (Nummerierung) testen +// und dann alle Ereignisse in der richtigen Reihenfolge bearbeiten -if( bAnl !bTableRowEnd ) -{ -const sal_uInt8* pSprm13 = pPlcxMan-HasParaSprm( 13 ); -if( pSprm13 ) -{ // Noch Anl ? -sal_uInt8 nT = static_cast sal_uInt8 (GetNumType( *pSprm13 )); -if( ( nT != WW8_Pause nT != nWwNumType ) // Anl-Wechsel -|| aApo.HasStartStop() // erzwungenes Anl-Ende -|| bStopTab || bStartTab ) -{ -StopAnlToRestart(nT); // Anl-Restart ( = Wechsel ) ueber sprms +if( bAnl !bTableRowEnd ) +{ +const sal_uInt8* pSprm13 =
[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - sw/source
sw/source/ui/envelp/mailmrge.cxx | 16 1 file changed, 8 insertions(+), 8 deletions(-) New commits: commit 08a9b322ae0069d563730cfd7d61f2dfa0af3a26 Author: Lionel Elie Mamane lio...@mamane.lu Date: Thu May 16 09:46:05 2013 +0200 fdo#47951 work around underlying cause The true cause is that the flat text file database driver mishandles the case of two ResultSets being open on the same table: the moving commands of one impact the other. Since in this case: - one ResultSet is open by the dispatch of .component:DB/DataSourceBrowser, that is the grid UI shown to the user, and that ResultSet is kept open to serve requests by the user to scroll; - the second ResultSet is opened by the call to pNewDBMgr-GetColumnNames and that ResultSet is closed by the time GetColumnNames returns We just swap the order of these calls to work around the underlying driver bug. Change-Id: I628d9b870df2bbc402637818f987637d3bd62897 Reviewed-on: https://gerrit.libreoffice.org/3963 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 14cc5b2..2c04b06 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -224,6 +224,14 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell rShell, aAttachED.Show(sal_False); aAttachPB.Show(sal_False); +SwNewDBMgr* pNewDBMgr = rSh.GetNewDBMgr(); +if(_xConnection.is()) +pNewDBMgr-GetColumnNames(aAddressFldLB, _xConnection, rTableName); +else +pNewDBMgr-GetColumnNames(aAddressFldLB, rDBName, rTableName); +for(sal_uInt16 nEntry = 0; nEntry aAddressFldLB.GetEntryCount(); nEntry++) +aColumnLB.InsertEntry(aAddressFldLB.GetEntry(nEntry)); + Point aMailPos = aMailingRB.GetPosPixel(); Point aFilePos = aFileRB.GetPosPixel(); aFilePos.X() -= (aFilePos.X() - aMailPos.X()) /2; @@ -375,14 +383,6 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell rShell, aFromNF.SetMax(SAL_MAX_INT32); aToNF.SetMax(SAL_MAX_INT32); -SwNewDBMgr* pNewDBMgr = rSh.GetNewDBMgr(); -if(_xConnection.is()) -pNewDBMgr-GetColumnNames(aAddressFldLB, _xConnection, rTableName); -else -pNewDBMgr-GetColumnNames(aAddressFldLB, rDBName, rTableName); -for(sal_uInt16 nEntry = 0; nEntry aAddressFldLB.GetEntryCount(); nEntry++) -aColumnLB.InsertEntry(aAddressFldLB.GetEntry(nEntry)); - aAddressFldLB.SelectEntry(C2S(EMAIL)); String sPath(pModOpt-GetMailingPath()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - sw/source
sw/source/core/fields/reffld.cxx | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) New commits: commit 1b1fe71be534fb05a11f741375e47f552e7a8914 Author: Caolán McNamara caol...@redhat.com Date: Thu Apr 11 20:57:49 2013 +0100 Resolves: fdo#48039 use same algorithm for assigning get/set replacement ids i.e. use the same algorithm for assigning replacement ids for both get and set exp fields. Otherwise, consider for ex. 1. fields exists with ids of 1 and 2 in master document 2. a field exists with id of 1 in subdocument and must be reassigned a new id to not collide with the pre existing master ids In get orig algorithm assigned first unused slot of master to subdocument field i.e. 0 unused in master, so subdocument:1 converted to master:0 In set orig algorithm sorted all used master slots and assigned largest used id plus 1 (therefore unused) to subdocument field i.e. largest id used in master is 2, so subdocument:1 converted to master:3 so get can't find set and error's out with: Error: Reference source not found Change-Id: Ie8758dc22cf8dff079532284e57eeaf4a9bd (cherry picked from commit 74d942fb2396a268adfcc915e75b8b32fae851dc) Reviewed-on: https://gerrit.libreoffice.org/3347 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 79b076b..71b1902 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -1007,14 +1007,9 @@ void _RefIdsMap::Init( SwDoc rDoc, SwDoc rDestDoc, sal_Bool bField ) GetFieldIdsFromDoc( rDestDoc, aIds ); GetFieldIdsFromDoc( rDoc, aDstIds ); -// Define the mappings now -sal_uInt16 nMaxDstId = -1; -if ( !aIds.empty() ) -nMaxDstId = *aIds.rbegin(); - -// Map all the src fields to their value + nMaxDstId +// Map all the new src fields to the next available unused id for ( std::setsal_uInt16::iterator pIt = aDstIds.begin(); pIt != aDstIds.end(); ++pIt ) -AddId( ++nMaxDstId, *pIt ); +AddId( GetFirstUnusedId(aIds), *pIt ); // Change the Sequence number of all the SetExp fields in the destination document SwFieldType* pType = rDoc.GetFldType( RES_SETEXPFLD, aName, false ); @@ -1037,9 +1032,9 @@ void _RefIdsMap::Init( SwDoc rDoc, SwDoc rDestDoc, sal_Bool bField ) bInit = sal_True; } -/// Get the lowest unused ID in the passed set. +/// Get the lowest number unused in the passed set. /// @param[in] rIds The set of used ID numbers. -/// @returns The lowest unused ID. +/// @returns The lowest number unused by the passed set sal_uInt16 _RefIdsMap::GetFirstUnusedId( std::setsal_uInt16 rIds ) { sal_uInt16 num(0); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/basflt/iodetect.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit 319cbc8eafa0a60445544879d641d0e4dcae5376 Author: Caolán McNamara caol...@redhat.com Date: Thu Nov 29 09:48:24 2012 + fdo#58071: .dot files sometimes rejected by writer because CWW8 appears twice, once for normal .doc and once for .dot. So a .dot files is tested twice if it's supported by the WW8 filter. Depending on the (effectively arbitrary) order they appear in the list .dots may fail the is a normal non template .doc test after the is a template .dot test and get rejected as a CWW8 candidate. (cherry picked from commit 94001499e0d7453c7012241334a9911dfccef76b) Signed-off-by: Michael Stahl mst...@redhat.com Conflicts: sw/source/filter/basflt/iodetect.cxx Change-Id: I88aec29fdd5f9ec4dd4ad2813ff3c6b8fa5c5461 diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index 41adf67..e83635f 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -271,6 +271,13 @@ sal_Bool SwIoSystem::IsFileFilter( SfxMedium rMedium, const String rFmtName, if( bRet ppFilter ) *ppFilter = pFltr; + +//The same underlying filter can appear multiple times in the +//filter list, e.g. CWW8 filter twice, once for .doc and once for +//.dot. We just care here if its either, not enforce that it's +//both which would be a bit of an odd requirement +if (bRet) +break; } pFltr = aIter.Next(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - sw/source
sw/source/core/doc/docfld.cxx | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) New commits: commit 75e7e130448182c15697c8dd0b8d50324db4f79f Author: Miklos Vajna vmik...@suse.cz Date: Wed Mar 20 13:19:32 2013 +0100 fdo#55814 SwDoc::UpdateExpFlds: hiding the last section may be safe In case we know there is a non-section paragraph at the end of the document. Intentionally not adding a unit test as David Ostrovsky is working on one already. (cherry picked from commit 62344016de056965a58ea2016d912a68eac0d6b0) Conflicts: sw/source/core/doc/docfld.cxx Change-Id: Ia6026846981b5af014246a8a604c5f762d34c891 Reviewed-on: https://gerrit.libreoffice.org/2901 Reviewed-by: David Ostrovsky david.ostrov...@gmx.de Tested-by: David Ostrovsky david.ostrov...@gmx.de Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index a2a58fc..69e13dc 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -1325,10 +1325,16 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds ) // This section will be hidden, but it wasn't before if (nShownSections == 1) { -// This would be the last section, so set its condition to false, and avoid hiding it. -rtl::OUString aCond(RTL_CONSTASCII_USTRINGPARAM(0)); -pSect-SetCondition(aCond); -bHide = false; +// Is the last node part of a section? +SwPaM aPam(GetNodes()); +aPam.Move(fnMoveForward, fnGoDoc); +if (aPam.Start()-nNode.GetNode().StartOfSectionNode()-IsSectionNode()) +{ +// This would be the last section, so set its condition to false, and avoid hiding it. +rtl::OUString aCond(RTL_CONSTASCII_USTRINGPARAM(0)); +pSect-SetCondition(aCond); +bHide = false; +} } nShownSections--; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - sw/source
sw/source/core/txtnode/txtedt.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit f0bc2c68ac003f09afe0ae89f12cb4ea5026f73f Author: László Németh nem...@numbertext.org Date: Fri Mar 15 04:31:25 2013 +0100 fdo#62360: fix word breaking in Writer for spell checking Change-Id: I0f23e9f7f076f3a82d1d5df92d9d4d3919fc816d Signed-off-by: Andras Timar ati...@suse.com diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 2cbe32a..f303138 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -755,7 +755,10 @@ sal_Bool SwScanner::NextWord() OSL_ENSURE( aBound.endPos = aBound.startPos, broken aBound result ); // we don't want to include preceeding text -if (aBound.startPos nBegin) +// to count words in text with mixed script punctuation correctly, +// but we want to include preceeding symbols (eg. percent sign, section sign, +// degree sign defined by dict_word_hu to spell check their affixed forms). +if (nWordType == i18n::WordType::WORD_COUNT aBound.startPos nBegin) aBound.startPos = nBegin; //no word boundaries could be found ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - sw/source
sw/source/core/access/accmap.cxx |9 + sw/source/core/text/txtfrm.cxx | 18 ++ 2 files changed, 23 insertions(+), 4 deletions(-) New commits: commit 8aff15241b34fca1ae4a4e0698510f9014026297 Author: Caolán McNamara caol...@redhat.com Date: Mon Feb 25 16:55:07 2013 + Resolves: fdo#56031 RSID attr changes drop content change events So if we have an INVALID_ATTR event in the queue and receive INVALID_CONTENT, drop the attr and replace it with invalid-content And anyway filter out the RSID change event from hitting the a11y queue, humans don't care that this changed, it's just noise Change-Id: I4842f217153fc90aa1dce75c3445053004c74536 (cherry picked from commit 8d08ccd5b84c121867d7b3102f9d10b26005c682) Reviewed-on: https://gerrit.libreoffice.org/2401 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org (cherry picked from commit 791a060bd1031c844a9a1b283689dee6a8a7ef77) Reviewed-on: https://gerrit.libreoffice.org/2441 Reviewed-by: Michael Meeks michael.me...@suse.com Tested-by: Michael Meeks michael.me...@suse.com diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 5e3a825..28107d7 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -896,10 +896,19 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl rEvent ) // POS_CHANGED event. // Therefor, the event's type has to be adapted and the event // has to be put at the end. +// +// fdo#56031 An INVALID_CONTENT event overwrites a INVALID_ATTR +// event and overwrites its flags OSL_ENSURE( aEvent.GetType() != SwAccessibleEvent_Impl::CHILD_POS_CHANGED, invalid event combination ); if( aEvent.GetType() == SwAccessibleEvent_Impl::CARET_OR_STATES ) aEvent.SetType( SwAccessibleEvent_Impl::INVALID_CONTENT ); +else if ( aEvent.GetType() == SwAccessibleEvent_Impl::INVALID_ATTR ) +{ +aEvent.SetType( SwAccessibleEvent_Impl::INVALID_CONTENT ); +aEvent.SetStates( rEvent.GetAllStates() ); +} + break; case SwAccessibleEvent_Impl::POS_CHANGED: // A pos changed event overwrites CARET_STATES (keeping its diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 1005969..1ccd660 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -921,6 +921,13 @@ void lcl_ModifyOfst( SwTxtFrm* pFrm, xub_StrLen nPos, xub_StrLen nLen ) } } +//Related: fdo#56031 filter out attribute changes that don't matter for +//humans/a11y to stop flooding the destination mortal with useless noise +static bool isA11yRelevantAttribute(MSHORT nWhich) +{ +return nWhich != RES_CHRATR_RSID; +} + /* * SwTxtFrm::Modify() */ @@ -1303,11 +1310,14 @@ void SwTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) SwCntntFrm::Modify( pOld, pNew ); } -// #i88069# -ViewShell* pViewSh = getRootFrm() ? getRootFrm()-GetCurrShell() : 0; -if ( pViewSh ) +if (isA11yRelevantAttribute(nWhich)) { -pViewSh-InvalidateAccessibleParaAttrs( *this ); +// #i88069# +ViewShell* pViewSh = getRootFrm() ? getRootFrm()-GetCurrShell() : 0; +if ( pViewSh ) +{ +pViewSh-InvalidateAccessibleParaAttrs( *this ); +} } } break; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - sw/source
sw/source/filter/ww8/rtfattributeoutput.cxx | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) New commits: commit 6b13c3f7c4281150748601e9548bfac40a4b0d9a Author: Miklos Vajna vmik...@suse.cz Date: Thu Nov 29 17:12:54 2012 +0100 sw: fix RTF export of text frames anchored to empty paragraphs Regression from d4069372484f18b242a42a1996767f57b031fff6 Reported-by: Michael Stahl mst...@redhat.com (cherry picked from commit 049933c035157129cc0409bb100dfc5353847a63) Conflicts: sw/qa/extras/rtfexport/rtfexport.cxx Change-Id: I28e095819e0c2f1a4b110741ace366329937f863 Reviewed-on: https://gerrit.libreoffice.org/2391 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 6944bbb..0537275 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -389,7 +389,7 @@ void RtfAttributeOutput::EndParagraphProperties() void RtfAttributeOutput::StartRun( const SwRedlineData* pRedlineData, bool bSingleEmptyRun ) { -SAL_INFO(sw.rtf, OSL_THIS_FUNC); +SAL_INFO(sw.rtf, OSL_THIS_FUNC , bSingleEmptyRun: bSingleEmptyRun); m_bInRun = true; m_bSingleEmptyRun = bSingleEmptyRun; @@ -427,7 +427,7 @@ void RtfAttributeOutput::EndRunProperties( const SwRedlineData* /*pRedlineData*/ void RtfAttributeOutput::RunText( const String rText, rtl_TextEncoding /*eCharSet*/ ) { -SAL_INFO(sw.rtf, OSL_THIS_FUNC); +SAL_INFO(sw.rtf, OSL_THIS_FUNC , rText: rText); RawText( rText, 0, m_rExport.eCurrentEncoding ); } @@ -1519,6 +1519,11 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame rFrame, const Poi * would be there, causing a problem later. */ OString aSave = m_aRun.makeStringAndClear(); +// Also back m_bInRun and m_bSingleEmptyRun up. +bool bInRunOrig = m_bInRun; +m_bInRun = false; +bool bSingleEmptyRunOrig = m_bSingleEmptyRun; +m_bSingleEmptyRun = false; m_rExport.bRTFFlySyntax = true; const SwFrmFmt rFrmFmt = rFrame.GetFrmFmt( ); @@ -1534,6 +1539,8 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame rFrame, const Poi m_rExport.bRTFFlySyntax = false; m_aRun-append(aSave); m_aRunText.clear(); +m_bInRun = bInRunOrig; +m_bSingleEmptyRun = bSingleEmptyRunOrig; } m_rExport.mpParentFrame = NULL; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - sw/source
sw/source/core/txtnode/ndtxt.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit f287987414948081d07dfa9fc4798a010ba750be Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Sun Feb 17 11:19:29 2013 +0100 apparently there's no ssize_t on windows (cherry picked from commit 3f7ead7ffee808f99bf9cf76bbd247af04707242) Signed-off-by: Michael Stahl mst...@redhat.com Conflicts: sw/source/core/txtnode/ndtxt.cxx Change-Id: Ic9aef7fe5295b7dae6f5b7ee7f28378d393cbfe4 diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 42c4d51..8debbb2 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1722,8 +1722,8 @@ void SwTxtNode::InsertText( const XubString rStr, const SwIndex rIdx, xub_StrLen aPos = rIdx.GetIndex(); xub_StrLen nLen = m_Text.Len() - aPos; -ssize_t const nOverflow(static_castssize_t(m_Text.Len()) -+ static_castssize_t(rStr.Len()) - TXTNODE_MAX); +long const nOverflow(static_castlong(m_Text.Len()) ++ static_castlong(rStr.Len()) - TXTNODE_MAX); m_Text.Insert((nOverflow 0) ? rStr.Copy(0, rStr.Len() - nOverflow) : rStr, aPos); assert(m_Text.Len() = TXTNODE_MAX); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - sw/source
sw/source/core/txtnode/ndtxt.cxx | 45 ++- 1 file changed, 31 insertions(+), 14 deletions(-) New commits: commit 1c6f5a16d83a87d7f2233e5c7e60ab5f39546225 Author: Michael Stahl mst...@redhat.com Date: Tue Feb 12 19:43:16 2013 +0100 fdo#60668: filter out fieldmark chars from Index entries: SwTxtNode::GetExpandTxt must filter out all dummy characters used to represent fields, footnotes, field marks, etc. (cherry picked from commit e31807c83009655c342c929a118f0d28a8f63ddc) Conflicts: sw/source/core/txtnode/ndtxt.cxx Change-Id: Ie5ae2a82da9a6618bb451efabfd38769c495cc93 Reviewed-on: https://gerrit.libreoffice.org/2134 Reviewed-by: Miklos Vajna vmik...@suse.cz Tested-by: Miklos Vajna vmik...@suse.cz diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index e9e30a7..46ef849 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -2965,9 +2965,8 @@ sal_Bool SwTxtNode::GetExpandTxt( SwTxtNode rDestNd, const SwIndex* pDestIdx, sTmpText.SearchAndReplaceAll('\t', ' '); // mask hidden characters -const xub_Unicode cChar = CH_TXTATR_BREAKWORD; -sal_uInt16 nHiddenChrs = -SwScriptInfo::MaskHiddenRanges( *this, sTmpText, 0, sTmpText.Len(), cChar ); +const sal_Unicode cChar = CH_TXTATR_BREAKWORD; +SwScriptInfo::MaskHiddenRanges(*this, sTmpText, 0, sTmpText.Len(), cChar); sTmpText = sTmpText.Copy( nIdx, nLen ); rDestNd.InsertText( sTmpText, aDestIdx ); @@ -3070,22 +3069,40 @@ sal_Bool SwTxtNode::GetExpandTxt( SwTxtNode rDestNd, const SwIndex* pDestIdx, rDestNd.InsertText( GetNumString(), aDestIdx ); } -if ( nHiddenChrs 0 ) +aDestIdx = 0; +sal_Int32 nStartDelete(-1); +while (aDestIdx rDestNd.GetTxt().Len()) { -aDestIdx = 0; -while ( aDestIdx rDestNd.GetTxt().Len() ) +sal_Unicode const cur(rDestNd.GetTxt().GetChar(aDestIdx.GetIndex())); +if ( (cChar == cur) // filter substituted hidden text +|| (CH_TXT_ATR_FIELDSTART == cur) // filter all fieldmarks +|| (CH_TXT_ATR_FIELDEND== cur) +|| (CH_TXT_ATR_FORMELEMENT == cur)) { -if ( cChar == rDestNd.GetTxt().GetChar( aDestIdx.GetIndex() ) ) +if (-1 == nStartDelete) { -xub_StrLen nIndex = aDestIdx.GetIndex(); -while ( nIndex rDestNd.GetTxt().Len() -cChar == rDestNd.GetTxt().GetChar( ++nIndex ) ) -; -rDestNd.EraseText( aDestIdx, nIndex - aDestIdx.GetIndex() ); +nStartDelete = aDestIdx.GetIndex(); // start deletion range } -else -++aDestIdx; +++aDestIdx; +if (aDestIdx rDestNd.GetTxt().Len()) +{ +continue; +} // else: end of paragraph = delete, see below } +else +{ +if (-1 == nStartDelete) +{ +++aDestIdx; +continue; +} // else: delete, see below +} +assert(-1 != nStartDelete); // without delete range, would have contined +rDestNd.EraseText( +SwIndex(rDestNd, static_castxub_StrLen(nStartDelete)), +aDestIdx.GetIndex() - nStartDelete); +assert(aDestIdx.GetIndex() == nStartDelete); +nStartDelete = -1; // reset } return sal_True; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits