Kaydet (Commit) 15c98e06 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Merge branch 'master' of git://anongit.freedesktop.org/libreoffice/writer

Conflicts:
	sw/source/ui/dbui/mmoutputpage.cxx
...@@ -1998,9 +1998,13 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, ...@@ -1998,9 +1998,13 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange,
pDoc->GetNodes().GetEndOfInserts().StartOfSectionIndex() pDoc->GetNodes().GetEndOfInserts().StartOfSectionIndex()
< aInsPos.GetIndex() ) < aInsPos.GetIndex() )
{ {
nNodeCnt -= ULONG nDistance =
( pAktNode->EndOfSectionIndex() - ( pAktNode->EndOfSectionIndex() -
aRg.aStart.GetIndex() ); aRg.aStart.GetIndex() );
if (nDistance < nNodeCnt)
nNodeCnt -= nDistance;
else
nNodeCnt = 1;
// dann alle Nodes der Tabelle in die akt. Zelle kopieren // dann alle Nodes der Tabelle in die akt. Zelle kopieren
// fuer den TabellenNode einen DummyNode einfuegen? // fuer den TabellenNode einen DummyNode einfuegen?
...@@ -2035,7 +2039,11 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, ...@@ -2035,7 +2039,11 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange,
SwNodeIndex nStt( aInsPos, -1 ); SwNodeIndex nStt( aInsPos, -1 );
SwTableNode* pTblNd = ((SwTableNode*)pAktNode)-> SwTableNode* pTblNd = ((SwTableNode*)pAktNode)->
MakeCopy( pDoc, aInsPos ); MakeCopy( pDoc, aInsPos );
nNodeCnt -= aInsPos.GetIndex() - nStt.GetIndex() -2; ULONG nDistance = aInsPos.GetIndex() - nStt.GetIndex() - 2;
if (nDistance < nNodeCnt)
nNodeCnt -= nDistance;
else
nNodeCnt = 1;
aRg.aStart = pAktNode->EndOfSectionIndex(); aRg.aStart = pAktNode->EndOfSectionIndex();
...@@ -2059,7 +2067,11 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange, ...@@ -2059,7 +2067,11 @@ void SwNodes::_CopyNodes( const SwNodeRange& rRange,
SwSectionNode* pSectNd = ((SwSectionNode*)pAktNode)-> SwSectionNode* pSectNd = ((SwSectionNode*)pAktNode)->
MakeCopy( pDoc, aInsPos ); MakeCopy( pDoc, aInsPos );
nNodeCnt -= aInsPos.GetIndex() - nStt.GetIndex() -2; ULONG nDistance = aInsPos.GetIndex() - nStt.GetIndex() - 2;
if (nDistance < nNodeCnt)
nNodeCnt -= nDistance;
else
nNodeCnt = 1;
aRg.aStart = pAktNode->EndOfSectionIndex(); aRg.aStart = pAktNode->EndOfSectionIndex();
if( bNewFrms && pSectNd && if( bNewFrms && pSectNd &&
......
...@@ -1044,25 +1044,20 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) ...@@ -1044,25 +1044,20 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
String sExtension = lcl_GetExtensionForDocType(nDocType); String sExtension = lcl_GetExtensionForDocType(nDocType);
switch( nDocType ) switch( nDocType )
{ {
case MM_DOCTYPE_OOO : break; case MM_DOCTYPE_OOO:
case MM_DOCTYPE_PDF :
{ {
//the method SwIOSystemGetFilterOfFormat( ) returns the template filter //Make sure we don't pick e.g. the flat xml filter
//because it uses the same user data :-( //for this format
SfxFilterMatcher aMatcher( pFilterContainer->GetName() ); pSfxFlt = SwIoSystem::GetFilterOfFormat(
SfxFilterMatcherIter aIter( &aMatcher ); String::CreateFromAscii( FILTER_XML ),
const SfxFilter* pFilter = aIter.First(); SwDocShell::Factory().GetFilterContainer() );
String sFilterMime( String::CreateFromAscii( "application/pdf" )); }
while ( pFilter ) break;
{ case MM_DOCTYPE_PDF:
if( pFilter->GetMimeType() == sFilterMime && pFilter->CanExport() ) {
{ pSfxFlt = pFilterContainer->GetFilter4FilterName(
pSfxFlt = pFilter; ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("writer_pdf_Export")),
break; SFX_FILTER_EXPORT);
}
pFilter = aIter.Next();
}
} }
break; break;
case MM_DOCTYPE_WORD: case MM_DOCTYPE_WORD:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment