Files
libreoffice/sw/source/core/doc/notxtfrm.cxx

1107 lines
35 KiB
C++
Raw Normal View History

2000-09-18 23:08:29 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 23:08:29 +00:00
*
* Copyright 2008 by Sun Microsystems, Inc.
2000-09-18 23:08:29 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 23:08:29 +00:00
*
* $RCSfile: notxtfrm.cxx,v $
* $Revision: 1.43.54.2 $
2000-09-18 23:08:29 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 23:08:29 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 23:08:29 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 23:08:29 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 23:08:29 +00:00
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
2000-09-18 23:08:29 +00:00
#include <hintids.hxx>
#include <tools/urlobj.hxx>
#include <vcl/print.hxx>
#include <vcl/virdev.hxx>
#include <svtools/imapobj.hxx>
#include <svtools/imap.hxx>
#include <svtools/urihelper.hxx>
#include <svtools/soerr.hxx>
2000-09-18 23:08:29 +00:00
#include <sfx2/progress.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/printer.hxx>
#include <svx/udlnitem.hxx>
#include <svx/colritem.hxx>
#include <svx/xoutbmp.hxx>
2001-07-05 09:34:53 +00:00
#include <vcl/window.hxx>
2000-09-18 23:08:29 +00:00
#include <fmturl.hxx>
#include <fmtsrnd.hxx>
#include <frmfmt.hxx>
#include <swrect.hxx>
#include <fesh.hxx>
#include <doc.hxx>
#include <flyfrm.hxx>
#include <frmtool.hxx>
#include <viewopt.hxx>
#include <viewimp.hxx>
#include <pam.hxx>
#include <hints.hxx>
#include <rootfrm.hxx>
#include <dflyobj.hxx>
#include <pagefrm.hxx>
#include <notxtfrm.hxx>
#include <grfatr.hxx>
#include <charatr.hxx>
#include <fmtornt.hxx>
#include <ndnotxt.hxx>
#include <ndgrf.hxx>
#include <ndole.hxx>
#include <swregion.hxx>
#include <poolfmt.hxx>
#include <mdiexp.hxx>
#include <swwait.hxx>
#ifndef _COMCORE_HRC
#include <comcore.hrc>
#endif
#include <accessibilityoptions.hxx>
#include <com/sun/star/embed/EmbedMisc.hpp>
#include <com/sun/star/embed/EmbedStates.hpp>
#include <svtools/embedhlp.hxx>
#include <svtools/chartprettypainter.hxx>
// --> OD 2009-03-05 #i99665#
#include <dview.hxx>
// <--
using namespace com::sun::star;
2000-09-18 23:08:29 +00:00
#define DEFTEXTSIZE 12
extern void ClrContourCache( const SdrObject *pObj ); // TxtFly.Cxx
inline BOOL GetRealURL( const SwGrfNode& rNd, String& rTxt )
{
BOOL bRet = rNd.GetFileFilterNms( &rTxt, 0 );
if( bRet )
rTxt = URIHelper::removePassword( rTxt, INetURLObject::WAS_ENCODED,
2000-10-20 12:46:39 +00:00
INetURLObject::DECODE_UNAMBIGUOUS);
2000-09-18 23:08:29 +00:00
return bRet;
}
void lcl_PaintReplacement( const SwRect &rRect, const String &rText,
const ViewShell &rSh, const SwNoTxtFrm *pFrm,
BOOL bDefect )
2000-09-18 23:08:29 +00:00
{
static Font *pFont = 0;
if ( !pFont )
{
pFont = new Font();
pFont->SetWeight( WEIGHT_BOLD );
pFont->SetStyleName( aEmptyStr );
pFont->SetName( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "Arial Unicode" )));
2000-09-18 23:08:29 +00:00
pFont->SetFamily( FAMILY_SWISS );
pFont->SetTransparent( TRUE );
}
Color aCol( COL_RED );
FontUnderline eUnderline = UNDERLINE_NONE;
const SwFmtURL &rURL = pFrm->FindFlyFrm()->GetFmt()->GetURL();
if( rURL.GetURL().Len() || rURL.GetMap() )
{
BOOL bVisited = FALSE;
2000-09-18 23:08:29 +00:00
if ( rURL.GetMap() )
{
ImageMap *pMap = (ImageMap*)rURL.GetMap();
for( USHORT i = 0; i < pMap->GetIMapObjectCount(); i++ )
{
IMapObject *pObj = pMap->GetIMapObject( i );
if( rSh.GetDoc()->IsVisitedURL( pObj->GetURL() ) )
{
bVisited = TRUE;
break;
}
}
}
else if ( rURL.GetURL().Len() )
bVisited = rSh.GetDoc()->IsVisitedURL( rURL.GetURL() );
SwFmt *pFmt = rSh.GetDoc()->GetFmtFromPool( static_cast<sal_uInt16>
(bVisited ? RES_POOLCHR_INET_VISIT : RES_POOLCHR_INET_NORMAL ) );
2000-09-18 23:08:29 +00:00
aCol = pFmt->GetColor().GetValue();
eUnderline = pFmt->GetUnderline().GetLineStyle();
2000-09-18 23:08:29 +00:00
}
pFont->SetUnderline( eUnderline );
pFont->SetColor( aCol );
const BitmapEx& rBmp = ViewShell::GetReplacementBitmap( bDefect != FALSE );
Graphic::DrawEx( rSh.GetOut(), rText, *pFont, rBmp, rRect.Pos(), rRect.SSize() );
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwGrfFrm::SwGrfFrm(ViewShell * const,SwGrfNode *)
|*
|* Beschreibung
|* Ersterstellung JP 05.03.91
|* Letzte Aenderung MA 03. Mar. 93
|*
*************************************************************************/
SwNoTxtFrm::SwNoTxtFrm(SwNoTxtNode * const pNode)
: SwCntntFrm(pNode)
{
InitCtor();
}
// Initialisierung: z.Zt. Eintragen des Frames im Cache
void SwNoTxtFrm::InitCtor()
{
nType = FRMC_NOTXT;
2000-09-18 23:08:29 +00:00
// Das Gewicht der Grafik ist 0, wenn sie noch nicht
// gelesen ist, < 0, wenn ein Lesefehler auftrat und
// Ersatzdarstellung angewendet werden musste und >0,
// wenn sie zur Verfuegung steht.
nWeight = 0;
}
/*************************************************************************
|*
|* SwNoTxtNode::MakeFrm()
|*
|* Beschreibung
|* Ersterstellung JP 05.03.91
|* Letzte Aenderung MA 03. Mar. 93
|*
*************************************************************************/
SwCntntFrm *SwNoTxtNode::MakeFrm()
{
return new SwNoTxtFrm(this);
}
/*************************************************************************
|*
|* SwNoTxtFrm::~SwNoTxtFrm()
|*
|* Beschreibung
|* Ersterstellung JP 05.03.91
|* Letzte Aenderung MA 30. Apr. 96
|*
*************************************************************************/
SwNoTxtFrm::~SwNoTxtFrm()
{
StopAnimation();
}
/*************************************************************************
|*
|* void SwNoTxtFrm::Modify( SwHint * pOld, SwHint * pNew )
|*
|* Beschreibung
|* Ersterstellung JP 05.03.91
|* Letzte Aenderung JP 05.03.91
|*
*************************************************************************/
void SetOutDev( ViewShell *pSh, OutputDevice *pOut )
{
pSh->pOut = pOut;
}
void lcl_ClearArea( const SwFrm &rFrm,
OutputDevice &rOut, const SwRect& rPtArea,
const SwRect &rGrfArea )
2000-09-18 23:08:29 +00:00
{
SwRegionRects aRegion( rPtArea, 4, 4 );
aRegion -= rGrfArea;
if ( aRegion.Count() )
{
const SvxBrushItem *pItem; const Color *pCol; SwRect aOrigRect;
if ( rFrm.GetBackgroundBrush( pItem, pCol, aOrigRect, FALSE ) )
for( USHORT i = 0; i < aRegion.Count(); ++i )
::DrawGraphic( pItem, &rOut, aOrigRect, aRegion[i] );
else
{
// OD 2004-04-23 #116347#
rOut.Push( PUSH_FILLCOLOR|PUSH_LINECOLOR );
2000-09-18 23:08:29 +00:00
rOut.SetFillColor( rFrm.GetShell()->Imp()->GetRetoucheColor());
rOut.SetLineColor();
2000-09-18 23:08:29 +00:00
for( USHORT i = 0; i < aRegion.Count(); ++i )
rOut.DrawRect( aRegion[i].SVRect() );
rOut.Pop();
}
}
}
/*************************************************************************
|*
|* void SwNoTxtFrm::Paint()
|*
|* Beschreibung
|* Ersterstellung JP 05.03.91
|* Letzte Aenderung MA 10. Jan. 97
|*
*************************************************************************/
void SwNoTxtFrm::Paint( const SwRect &rRect ) const
{
if ( Frm().IsEmpty() )
return;
const ViewShell* pSh = GetShell();
if( !pSh->GetViewOptions()->IsGraphic() )
{
StopAnimation();
// OD 10.01.2003 #i6467# - no paint of placeholder for page preview
if ( pSh->GetWin() && !pSh->IsPreView() )
2000-09-18 23:08:29 +00:00
{
const SwNoTxtNode* pNd = GetNode()->GetNoTxtNode();
CWS-TOOLING: integrate CWS sw32a11y01 2009-08-27 10:11:46 +0200 hde r275457 : new testcase i103265 2009-08-27 08:24:31 +0200 hde r275454 : new testcase i103265 2009-08-27 08:23:05 +0200 hde r275453 : new document for testcase i103265 2009-08-26 13:43:33 +0200 hde r275421 : added new autotest 2009-08-26 13:36:28 +0200 hde r275420 : added new autotest 2009-08-18 15:41:18 +0200 od r275113 : #i104300# method <SwEditWin::RequestHelp(..)> - improve help tip for hyperlinks to cross-reference bookmarks. 2009-08-10 15:18:41 +0200 od r274816 : #i73249# method <SwFrameShell::Execute(..)> - no update of fly frame manager on dialog "Title and Description" 2009-08-10 14:24:15 +0200 od r274813 : #i92125# correction of end of file - missing newline end 2009-08-10 14:10:14 +0200 od r274811 : #i92125# correction of end of file - newline missing 2009-08-10 14:00:30 +0200 od r274808 : #i92125# - correct end of file - new line missing 2009-08-10 09:12:30 +0200 od r274794 : CWS-TOOLING: rebase CWS sw32a11y01 to trunk@274622 (milestone: DEV300:m54) 2009-08-07 15:52:59 +0200 od r274775 : #i73249# minor adjustment due to compiler warning 2009-08-07 15:40:38 +0200 od r274774 : #i92125# method <MarkManager::deleteMarks(..)> - do not delete cross-reference bookmark, if deletion occurs inside a certain node 2009-08-06 12:53:05 +0200 od r274717 : #i92125# method <MarkManager::deleteMarks(..) - no move of position for cross-reference bookmark, if move occurs inside certain node. 2009-08-06 12:50:27 +0200 od r274716 : #i92125# method <SwUndoSaveCntnt::DelCntntIndex(..)> - keep cross-reference bookmarks, if deletion occurs inside a certain node. 2009-08-06 09:53:29 +0200 od r274705 : #i103265# method <SwTOXPara::GetURL()> - For outline and template entries create link to bookmark. The bookmark of type CROSSREF_HEADING_BOOKMARK is created, if needed 2009-07-22 13:57:04 +0200 od r274236 : #i73249# adjustment for export of svg:title and svg:description 2009-07-22 13:51:58 +0200 od r274234 : #i73249# adjust and enhance import/export of svg:title and svg:description for Writer's text frames, graphics and embedded objects 2009-07-21 10:26:27 +0200 od r274168 : #i73249# implement support for attributes Title and Description for text frames, graphics and embedded objects in Writer - core, UNO-API, undo/redo and UI 2009-07-21 10:05:15 +0200 od r274164 : #i73249# new optional properties Title and Description as basis frame properties in text documents 2009-07-13 12:19:54 +0200 od r273928 : #i73249# Implementation of Undo/Redo of drawing object's name, title and description
2009-08-27 11:59:20 +00:00
String aTxt( pNd->GetTitle() );
2000-09-18 23:08:29 +00:00
if ( !aTxt.Len() && pNd->IsGrfNode() )
GetRealURL( *(SwGrfNode*)pNd, aTxt );
if( !aTxt.Len() )
aTxt = FindFlyFrm()->GetFmt()->GetName();
lcl_PaintReplacement( Frm(), aTxt, *pSh, this, FALSE );
}
return;
}
if( pSh->GetAccessibilityOptions()->IsStopAnimatedGraphics() ||
// --> FME 2004-06-21 #i9684# Stop animation during printing/pdf export
!pSh->GetWin() )
// <--
2002-05-07 13:12:52 +00:00
StopAnimation();
2000-09-18 23:08:29 +00:00
if ( pSh->Imp()->IsPaintInScroll() && pSh->GetWin() && rRect != Frm() &&
HasAnimation() )
{
pSh->GetWin()->Invalidate( Frm().SVRect() );
return;
}
SfxProgress::EnterLock(); //Keine Progress-Reschedules im Paint (SwapIn)
OutputDevice *pOut = pSh->GetOut();
pOut->Push();
BOOL bClip = TRUE;
PolyPolygon aPoly;
SwNoTxtNode& rNoTNd = *(SwNoTxtNode*)GetNode();
SwGrfNode* pGrfNd = rNoTNd.GetGrfNode();
if( pGrfNd )
pGrfNd->SetFrameInPaint( TRUE );
// OD 16.04.2003 #i13147# - add 2nd parameter with value <sal_True> to
// method call <FindFlyFrm().GetContour(..)> to indicate that it is called
// for paint in order to avoid load of the intrinsic graphic.
if ( ( !pOut->GetConnectMetaFile() ||
!pSh->GetWin() ) &&
FindFlyFrm()->GetContour( aPoly, sal_True )
)
2000-09-18 23:08:29 +00:00
{
pOut->SetClipRegion( aPoly );
bClip = FALSE;
}
SwRect aOrigPaint( rRect );
if ( HasAnimation() && pSh->GetWin() )
{
aOrigPaint = Frm(); aOrigPaint += Prt().Pos();
}
SwRect aGrfArea( Frm() );
SwRect aPaintArea( aGrfArea );
aPaintArea._Intersection( aOrigPaint );
SwRect aNormal( Frm().Pos() + Prt().Pos(), Prt().SSize() );
2000-09-18 23:08:29 +00:00
aNormal.Justify(); //Normalisiertes Rechteck fuer die Vergleiche
if( aPaintArea.IsOver( aNormal ) )
{
// berechne die 4 zu loeschenden Rechtecke
if( pSh->GetWin() )
::lcl_ClearArea( *this, *pSh->GetOut(), aPaintArea, aNormal );
2000-09-18 23:08:29 +00:00
// in der Schnittmenge vom PaintBereich und der Bitmap liegt
// der absolut sichtbare Bereich vom Frame
aPaintArea._Intersection( aNormal );
if ( bClip )
pOut->IntersectClipRegion( aPaintArea.SVRect() );
/// OD 25.09.2002 #99739# - delete unused 3rd parameter
PaintPicture( pOut, aGrfArea );
2000-09-18 23:08:29 +00:00
}
else
// wenn nicht sichtbar, loesche einfach den angegebenen Bereich
lcl_ClearArea( *this, *pSh->GetOut(), aPaintArea, SwRect() );
if( pGrfNd )
pGrfNd->SetFrameInPaint( FALSE );
2000-09-18 23:08:29 +00:00
pOut->Pop();
SfxProgress::LeaveLock();
}
/*************************************************************************
|*
|* void lcl_CalcRect( Point & aPt, Size & aDim,
|* USHORT nMirror )
|*
|* Beschreibung Errechne die Position und die Groesse der Grafik im
|* Frame, entsprechen der aktuellen Grafik-Attribute
|*
|* Parameter Point& die Position im Frame ( auch Return-Wert )
|* Size& die Groesse der Grafik ( auch Return-Wert )
|* MirrorGrf akt. Spiegelungs-Attribut
|* Ersterstellung JP 04.03.91
|* Letzte Aenderung JP 31.08.94
|*
*************************************************************************/
void lcl_CalcRect( Point& rPt, Size& rDim, USHORT nMirror )
{
if( nMirror == RES_MIRROR_GRAPH_VERT || nMirror == RES_MIRROR_GRAPH_BOTH )
{
rPt.X() += rDim.Width() -1;
rDim.Width() = -rDim.Width();
}
if( nMirror == RES_MIRROR_GRAPH_HOR || nMirror == RES_MIRROR_GRAPH_BOTH )
{
rPt.Y() += rDim.Height() -1;
rDim.Height() = -rDim.Height();
}
}
2000-09-18 23:08:29 +00:00
/*************************************************************************
|*
|* void SwNoTxtFrm::GetGrfArea()
|*
|* Beschreibung Errechne die Position und die Groesse der Bitmap
|* innerhalb des uebergebenem Rechtecks.
|*
|* Ersterstellung JP 03.09.91
|* Letzte Aenderung MA 11. Oct. 94
|*
*************************************************************************/
void SwNoTxtFrm::GetGrfArea( SwRect &rRect, SwRect* pOrigRect,
BOOL ) const
2000-09-18 23:08:29 +00:00
{
// JP 23.01.2001: currently only used for scaling, cropping and mirroring
// the contour of graphics!
// all other is handled by the GraphicObject
2000-09-18 23:08:29 +00:00
//In rRect wird das sichbare Rechteck der Grafik gesteckt.
//In pOrigRect werden Pos+Size der Gesamtgrafik gesteck.
const SwAttrSet& rAttrSet = GetNode()->GetSwAttrSet();
const SwCropGrf& rCrop = rAttrSet.GetCropGrf();
USHORT nMirror = rAttrSet.GetMirrorGrf().GetValue();
if( rAttrSet.GetMirrorGrf().IsGrfToggle() )
{
if( !(FindPageFrm()->GetVirtPageNum() % 2) )
{
switch ( nMirror )
{
case RES_MIRROR_GRAPH_DONT: nMirror = RES_MIRROR_GRAPH_VERT; break;
case RES_MIRROR_GRAPH_VERT: nMirror = RES_MIRROR_GRAPH_DONT; break;
case RES_MIRROR_GRAPH_HOR: nMirror = RES_MIRROR_GRAPH_BOTH; break;
default: nMirror = RES_MIRROR_GRAPH_HOR; break;
}
}
}
2000-09-18 23:08:29 +00:00
//Grafik wird vom Node eingelesen falls notwendig. Kann aber schiefgehen.
long nLeftCrop, nRightCrop, nTopCrop, nBottomCrop;
Size aOrigSz( ((SwNoTxtNode*)GetNode())->GetTwipSize() );
if ( !aOrigSz.Width() )
{
aOrigSz.Width() = Prt().Width();
nLeftCrop = -rCrop.GetLeft();
nRightCrop = -rCrop.GetRight();
}
else
{
nLeftCrop = Max( aOrigSz.Width() -
(rCrop.GetRight() + rCrop.GetLeft()), long(1) );
const double nScale = double(Prt().Width()) / double(nLeftCrop);
nLeftCrop = long(nScale * -rCrop.GetLeft() );
nRightCrop = long(nScale * -rCrop.GetRight() );
}
// crop values have to be mirrored too
if( nMirror == RES_MIRROR_GRAPH_VERT || nMirror == RES_MIRROR_GRAPH_BOTH )
{
long nTmpCrop = nLeftCrop;
nLeftCrop = nRightCrop;
nRightCrop= nTmpCrop;
}
2000-09-18 23:08:29 +00:00
if( !aOrigSz.Height() )
{
aOrigSz.Height() = Prt().Height();
nTopCrop = -rCrop.GetTop();
nBottomCrop= -rCrop.GetBottom();
}
else
{
nTopCrop = Max( aOrigSz.Height() - (rCrop.GetTop() + rCrop.GetBottom()), long(1) );
const double nScale = double(Prt().Height()) / double(nTopCrop);
nTopCrop = long(nScale * -rCrop.GetTop() );
nBottomCrop= long(nScale * -rCrop.GetBottom() );
}
// crop values have to be mirrored too
if( nMirror == RES_MIRROR_GRAPH_HOR || nMirror == RES_MIRROR_GRAPH_BOTH )
{
long nTmpCrop = nTopCrop;
nTopCrop = nBottomCrop;
nBottomCrop= nTmpCrop;
}
2000-09-18 23:08:29 +00:00
Size aVisSz( Prt().SSize() );
Size aGrfSz( aVisSz );
Point aVisPt( Frm().Pos() + Prt().Pos() );
Point aGrfPt( aVisPt );
//Erst das 'sichtbare' Rect einstellen.
if ( nLeftCrop > 0 )
{
aVisPt.X() += nLeftCrop;
aVisSz.Width() -= nLeftCrop;
}
if ( nTopCrop > 0 )
{
aVisPt.Y() += nTopCrop;
aVisSz.Height() -= nTopCrop;
}
if ( nRightCrop > 0 )
aVisSz.Width() -= nRightCrop;
if ( nBottomCrop > 0 )
aVisSz.Height() -= nBottomCrop;
rRect.Pos ( aVisPt );
rRect.SSize( aVisSz );
//Ggf. Die Gesamtgrafik berechnen
if ( pOrigRect )
{
Size aTmpSz( aGrfSz );
aGrfPt.X() += nLeftCrop;
aTmpSz.Width() -= nLeftCrop + nRightCrop;
aGrfPt.Y() += nTopCrop;
aTmpSz.Height()-= nTopCrop + nBottomCrop;
if( RES_MIRROR_GRAPH_DONT != nMirror )
lcl_CalcRect( aGrfPt, aTmpSz, nMirror );
2000-09-18 23:08:29 +00:00
pOrigRect->Pos ( aGrfPt );
pOrigRect->SSize( aTmpSz );
}
}
/*************************************************************************
|*
|* Size SwNoTxtFrm::GetSize()
|*
|* Beschreibung Gebe die Groesse des umgebenen FLys und
|* damit die der Grafik zurueck.
|* Ersterstellung JP 04.03.91
|* Letzte Aenderung JP 31.08.94
|*
*************************************************************************/
const Size& SwNoTxtFrm::GetSize() const
{
// gebe die Groesse des Frames zurueck
const SwFrm *pFly = FindFlyFrm();
if( !pFly )
pFly = this;
return pFly->Prt().SSize();
}
/*************************************************************************
|*
|* SwNoTxtFrm::MakeAll()
|*
|* Ersterstellung MA 29. Nov. 96
|* Letzte Aenderung MA 29. Nov. 96
|*
*************************************************************************/
void SwNoTxtFrm::MakeAll()
{
SwCntntNotify aNotify( this );
SwBorderAttrAccess aAccess( SwFrm::GetCache(), this );
const SwBorderAttrs &rAttrs = *aAccess.Get();
while ( !bValidPos || !bValidSize || !bValidPrtArea )
{
MakePos();
if ( !bValidSize )
Frm().Width( GetUpper()->Prt().Width() );
MakePrtArea( rAttrs );
if ( !bValidSize )
{ bValidSize = TRUE;
Format();
}
}
}
/*************************************************************************
|*
|* SwNoTxtFrm::Format()
|*
|* Beschreibung Errechne die Groesse der Bitmap, wenn noetig
|* Ersterstellung JP 11.03.91
|* Letzte Aenderung MA 13. Mar. 96
|*
*************************************************************************/
void SwNoTxtFrm::Format( const SwBorderAttrs * )
{
const Size aNewSize( GetSize() );
// hat sich die Hoehe geaendert?
SwTwips nChgHght = IsVertical() ?
(SwTwips)(aNewSize.Width() - Prt().Width()) :
(SwTwips)(aNewSize.Height() - Prt().Height());
2001-10-19 09:25:19 +00:00
if( nChgHght > 0)
Grow( nChgHght );
else if( nChgHght < 0)
Shrink( Min(Prt().Height(), -nChgHght) );
2000-09-18 23:08:29 +00:00
}
/*************************************************************************
|*
|* SwNoTxtFrm::GetCharRect()
|*
|* Beschreibung
|* Ersterstellung SS 29-Apr-1991
|* Letzte Aenderung MA 10. Oct. 94
|*
|*************************************************************************/
BOOL SwNoTxtFrm::GetCharRect( SwRect &rRect, const SwPosition& rPos,
SwCrsrMoveState *pCMS ) const
{
if ( &rPos.nNode.GetNode() != (SwNode*)GetNode() )
return FALSE;
Calc();
SwRect aFrameRect( Frm() );
rRect = aFrameRect;
rRect.Pos( Frm().Pos() + Prt().Pos() );
rRect.SSize( Prt().SSize() );
2000-09-18 23:08:29 +00:00
rRect.Justify();
// liegt die Bitmap ueberhaupt im sichtbaren Berich ?
if( !aFrameRect.IsOver( rRect ) )
{
// wenn nicht dann steht der Cursor auf dem Frame
rRect = aFrameRect;
rRect.Width( 1 );
}
else
rRect._Intersection( aFrameRect );
if ( pCMS )
{
if ( pCMS->bRealHeight )
{
pCMS->aRealHeight.Y() = rRect.Height();
pCMS->aRealHeight.X() = 0;
}
}
return TRUE;
}
BOOL SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& ,
SwCrsrMoveState* ) const
2000-09-18 23:08:29 +00:00
{
SwCntntNode* pCNd = (SwCntntNode*)GetNode();
pPos->nNode = *pCNd;
pPos->nContent.Assign( pCNd, 0 );
return TRUE;
}
#define CLEARCACHE( pNd ) {\
(pNd)->GetGrfObj().ReleaseFromCache();\
SwFlyFrm* pFly = FindFlyFrm();\
if( pFly && pFly->GetFmt()->GetSurround().IsContour() )\
{\
ClrContourCache( pFly->GetVirtDrawObj() );\
pFly->NotifyBackground( FindPageFrm(), Prt(), PREP_FLY_ATTR_CHG );\
}\
}
void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
{
USHORT nWhich = pNew ? pNew->Which() : pOld ? pOld->Which() : 0;
// --> OD 2007-03-06 #i73788#
// no <SwCntntFrm::Modify(..)> for RES_LINKED_GRAPHIC_STREAM_ARRIVED
2000-09-18 23:08:29 +00:00
if ( RES_GRAPHIC_PIECE_ARRIVED != nWhich &&
RES_GRAPHIC_ARRIVED != nWhich &&
RES_GRF_REREAD_AND_INCACHE != nWhich &&
RES_LINKED_GRAPHIC_STREAM_ARRIVED != nWhich )
// <--
{
2000-09-18 23:08:29 +00:00
SwCntntFrm::Modify( pOld, pNew );
}
2000-09-18 23:08:29 +00:00
BOOL bComplete = TRUE;
2000-09-18 23:08:29 +00:00
switch( nWhich )
{
case RES_OBJECTDYING:
break;
case RES_GRF_REREAD_AND_INCACHE:
if( ND_GRFNODE == GetNode()->GetNodeType() )
{
bComplete = FALSE;
2000-09-18 23:08:29 +00:00
SwGrfNode* pNd = (SwGrfNode*) GetNode();
ViewShell *pVSh = 0;
pNd->GetDoc()->GetEditShell( &pVSh );
if( pVSh )
{
GraphicAttr aAttr;
if( pNd->GetGrfObj().IsCached( pVSh->GetOut(), Point(),
Prt().SSize(), &pNd->GetGraphicAttr( aAttr, this ) ))
{
ViewShell *pSh = pVSh;
do {
SET_CURR_SHELL( pSh );
if( pSh->GetWin() )
{
if( pSh->IsPreView() )
::RepaintPagePreview( pSh, Frm().SVRect() );
else
pSh->GetWin()->Invalidate( Frm().SVRect() );
}
} while( pVSh != (pSh = (ViewShell*)pSh->GetNext() ));
}
else
pNd->SwapIn();
}
}
break;
case RES_UPDATE_ATTR:
case RES_FMT_CHG:
CLEARCACHE( (SwGrfNode*) GetNode() )
break;
case RES_ATTRSET_CHG:
{
USHORT n;
for( n = RES_GRFATR_BEGIN; n < RES_GRFATR_END; ++n )
2000-09-18 23:08:29 +00:00
if( SFX_ITEM_SET == ((SwAttrSetChg*)pOld)->GetChgSet()->
GetItemState( n, FALSE ))
{
CLEARCACHE( (SwGrfNode*) GetNode() )
break;
}
if( RES_GRFATR_END == n ) // not found
return ;
}
break;
case RES_GRAPHIC_PIECE_ARRIVED:
case RES_GRAPHIC_ARRIVED:
// --> OD 2007-03-06 #i73788#
// handle RES_LINKED_GRAPHIC_STREAM_ARRIVED as RES_GRAPHIC_ARRIVED
case RES_LINKED_GRAPHIC_STREAM_ARRIVED:
// <--
2000-09-18 23:08:29 +00:00
if ( GetNode()->GetNodeType() == ND_GRFNODE )
{
bComplete = FALSE;
2000-09-18 23:08:29 +00:00
SwGrfNode* pNd = (SwGrfNode*) GetNode();
CLEARCACHE( pNd )
SwRect aRect( Frm() );
ViewShell *pVSh = 0;
pNd->GetDoc()->GetEditShell( &pVSh );
if( !pVSh )
break;
ViewShell *pSh = pVSh;
do {
SET_CURR_SHELL( pSh );
if( pSh->IsPreView() )
{
if( pSh->GetWin() )
::RepaintPagePreview( pSh, aRect );
}
else if ( pSh->VisArea().IsOver( aRect ) &&
OUTDEV_WINDOW == pSh->GetOut()->GetOutDevType() )
2000-09-18 23:08:29 +00:00
{
// OD 27.11.2002 #105519# - invalidate instead of painting
pSh->GetWin()->Invalidate( aRect.SVRect() );
2000-09-18 23:08:29 +00:00
}
pSh = (ViewShell *)pSh->GetNext();
} while( pSh != pVSh );
}
break;
default:
CWS-TOOLING: integrate CWS odfmetadata2 2009-06-22 11:48:36 +0200 mst r273206 : - connectivity/source/drivers/mozab/mozillasrc/MNSInclude.hxx: + add "include ustrbuf.hxx" to work around warning caused by solaris <sys/kstat.h> declaring a global "long l ;" 2009-06-19 14:25:25 +0200 mst r273159 : - scp2/source/ooo/file_library_ooo.scp: + fix MinGW build 2009-06-08 12:52:33 +0200 mst r272727 : - redland/raptor-1.4.18.patch.mingw, redland/raptor/makefile.mk: + disable parsers that do not build on MinGW (thanks for patch by tono) 2009-05-15 17:31:07 +0200 mst r271957 : fix typos 2009-05-15 17:28:57 +0200 mst r271956 : #i101965# - offapi/com/sun/star/text/TextPortion: + add missing properties: SoftPageBreak, DocumentIndexMark, ReferenceMark, Footnote, TextField + fix read-only status of properties: Bookmark, IsStart, IsCollapsed - offapi/type_reference/{typelibrary_history.txt,types.rdb}: + update reference types.rdb 2009-05-07 14:41:38 +0200 mst r271669 : - sw/inc/{fmtftn.hxx,unocoll.hxx,doc.hxx,editsh.hxx,ftninfo.hxx}, sw/source/core/layout/{flowfrm.cxx,ftnfrm.cxx}, sw/source/core/doc/docftn.cxx, sw/source/core/edit/edattr.cxx, sw/source/core/txtnode/atrftn.cxx, sw/source/core/unocore/unocoll.cxx, sw/source/ui/fldui/fldref.cxx: + fix warning ... the hard way + also fix signature of SwDoc::SetCurFtn 2009-05-05 19:52:55 +0200 mst r271556 : - sw/inc/undobj.hxx: + make some members const 2009-05-05 19:34:40 +0200 mst r271555 : - sw/inc/rolbck.hxx, sw/source/core/undo/rolbck.cxx: + make some members const 2009-05-05 19:13:14 +0200 mst r271553 : - sw/inc/{undobj.hxx,rolbck.hxx}, sw/source/core/undo/{unbkmk.cxx,rolbck.cxx}: + fix rebase merge error + rename SwHstryBookmark to SwHistoryBookmark + clean up SwUndoBookmark 2009-05-05 19:05:53 +0200 mst r271552 : - sw/source/core/unocore/unoportenum.cxx: + fix annoying assertion 2009-05-05 15:34:48 +0200 mst r271522 : CWS-TOOLING: rebase CWS odfmetadata2 to trunk@271427 (milestone: DEV300:m47) 2009-05-04 12:37:01 +0200 mst r271444 : trivial 2009-04-22 13:30:37 +0200 mst r271102 : - sfx2/inc/sfx2/dinfdlg.hxx: + trivial change 2009-04-21 16:46:58 +0200 mst r271043 : - sw/inc/hintids.hxx: + introduce some predicates for the various hints, and use them 2009-04-21 16:19:03 +0200 mst r271041 : - sw/inc/undobj.hxx, sw/source/core/doc/{docfly.cxx,docfmt.cxx,docftn.cxx,doctxm.cxx}, sw/source/core/undo/{unattr.cxx,unins.cxx}: + clean up unattr.cxx: remove/fix casts, prefix members, use auto_ptr, etc. 2009-04-21 15:34:23 +0200 mst r271039 : - sw/inc/{rolbck.hxx,undobj.hxx}, sw/source/core/doc/docfmt.cxx, sw/source/core/txtnode/{thints.cxx,txtedt.cxx}, sw/source/core/undo/{rolbck.cxx,undel.cxx,undobj.cxx,unins.cxx,unmove.cxx, unovwr.cxx,unsect.cxx,unspnd.cxx,untbl.cxx,untblk.cxx,unattr.cxx}: + clean up SwHistory, SwRegHistory and SwHistoryHint etc.: remove/fix casts, prefix members, remove wrong const annotations, use auto_ptr, remove unused members, etc. 2009-04-20 19:17:36 +0200 mst r271013 : - sw/inc/ndhints.hxx, sw/source/core/text/{itrtxt.cxx,txtftn.cxx,itratr.cxx,porfly.cxx, txtfrm.cxx,txtdrop.cxx,frmform.cxx}, sw/source/core/txtnode/{ndtxt.cxx,ndhints.cxx,thints.cxx,txtedt.cxx}, sw/source/core/edit/acorrect.cxx, sw/source/core/doc/{docedt.cxx,docfmt.cxx}, sw/source/filter/html/swhtml.cxx: + clean up SwHintsArray and its subclasses: remove/fix casts, prefix members 2009-04-20 18:42:07 +0200 mst r271007 : - sw/source/core/text/txtio.cxx, sw/source/core/edit/edattr.cxx, sw/source/core/undo/rolbck.cxx: + remove JP_NEWCORE dead code 2009-04-20 18:38:09 +0200 mst r271006 : - sw/source/core/unocore/unochart.cxx: + silence unxlngi warning (debug=t) 2009-04-20 16:36:13 +0200 mst r270991 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx, sfx2/source/doc/objserv.cxx, sw/source/ui/fldui/flddinf.hxx: + trivial cleanups 2009-04-20 15:28:52 +0200 mst r270990 : - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx, sfx2/source/doc/objserv.cxx: + fix bug: replaying a macro with a DocumentInfoItem removes all user-defined properties 2009-03-10 15:08:20 +0100 mst r269273 : - sfx2/source/doc/Metadatable.cxx: + add missing SolarMutex guards 2009-03-10 14:46:29 +0100 mst r269272 : - unoxml/source/rdf/librdf_repository.cxx: + never free rdf_world because that would call libxm2 xmlCleanupParser (and, to add insult to injury, other libxml2 functions later...) 2009-03-06 19:02:44 +0100 mst r269041 : argh! undo... 2009-03-06 19:00:58 +0100 mst r269040 : fix #i99931# - sw/source/ui/uno/unomod.cxx: + SwXViewSettings::_getSingleValue returns uninitialized memory for the ZoomType property if the value is PAGE_WIDTH_EXACT 2009-03-06 18:59:28 +0100 mst r269039 : - sw/inc/ndtxt.hxx, sw/source/core/txtnode/ndtxt.cxx, sw/source/core/unocore/unoportenum.cxx: + fix some more wntmsci12 warnings... 2009-03-06 18:56:46 +0100 mst r269038 : - sd/source/ui/slidesorter/model/SlsPageEnumerationProvider.cxx: + work around spurious warning on unxsoli4 debug=t 2009-03-05 14:02:01 +0100 mst r268902 : - sw/inc/txatbase.hxx: + back to c-style casts, they also compile on wntmsci12... 2009-03-05 10:23:25 +0100 mst r268882 : - comphelper/inc/comphelper/processfactory.hxx, comphelper/source/processfactory/processfactory.cxx: + revert change of return type of comphelper_getProcessComponentContext to Reference: does not build on wntmsci12 2009-03-04 19:08:09 +0100 mst r268861 : - sw/source/core/txtnode/{atrtox.cxx,ndtxt.cxx}: + fix initialization 2009-03-04 14:37:30 +0100 mst r268831 : - solenv/inc/target.mk: + fix CLASSPATH so complex tests run (fix by sb) 2009-03-04 14:36:30 +0100 mst r268830 : - sw/inc/unoobj.hxx, sw/source/core/unocore/{unoparagraph.cxx,unoobj.cxx,unoobj2.cxx}: + SwXParaFrameEnumeration constructor now takes SwPaM, not SwUnoCrsr + move SwParaSelection into unoparagraph.cxx, as it is only used there + bugfix: replace SwUnoCrsrs on stack with SwCursors 2009-03-04 14:34:46 +0100 mst r268829 : - sw/inc/pam.hxx, sw/source/core/crsr/pam.cxx, sw/source/core/edit/eddel.cxx, sw/source/core/doc/docredln.cxx, sw/source/core/undo/{untbl.cxx,undel.cxx}, sw/source/filter/rtf/swparrtf.cxx: + clean up SwPaM: prefix members + new constructor SwPosition(SwCntntNode&, xub_StrLen) + fix several broken SwPosition and SwPaM constructors + SwPam::DeleteMark now actually resets the unused position to default 2009-03-02 12:07:09 +0100 mst r268646 : - sw/inc/fmtcol.hxx: + fix annoying warning (gcc 4) 2009-03-02 12:06:27 +0100 mst r268645 : - odk/util/check.pl, odk/examples/DevelopersGuide/Text/TextDocuments.java: + rename module from FieldMaster to fieldmaster 2009-02-27 19:49:56 +0100 mst r268614 : - sfx2/inc/sfx2/Metadatable.hxx, sfx2/prj/d.lst, sfx2/source/doc/{Metadatable.cxx,makefile.mk}, sw/inc/{SwMetadatable.hxx,unoobj.hxx,undobj.hxx,ndtxt.hxx}, sw/source/core/doc/{SwMetadatable.cxx,makefile.mk,docnew.cxx}, sw/source/core/undo/{untbl.cxx,unins.cxx}, sw/source/core/unocore/unoparagraph.cxx, sw/source/ui/app/docsh.cxx: + move Metadatable implementation from sw to sfx2 2009-02-27 17:58:55 +0100 mst r268608 : - sw/inc/{SwMetadatable.hxx,undobj.hxx}, sw/source/core/doc/SwMetadatable.cxx, sw/source/core/undo/{untbl.cxx,unins.cxx,undel.cxx}: + CreateUndo now returns an opaque MetadatableUndo object 2009-02-27 13:15:44 +0100 mst r268587 : - sw/inc/ndtxt.hxx, sw/source/core/doc/docfmt.cxx, sw/source/core/text/{itratr.cxx,porlay.cxx}, sw/source/core/txtnode/{txtedt.cxx,ndtxt.cxx,thints.cxx}: + clean up SwTxtNode: fix casts, prefix members + factor out inline function SwTxtNode::TryDeleteSwpHints() 2009-02-27 13:14:30 +0100 mst r268586 : - svx/inc/svx/emphitem.hxx: + fix borken header guard 2009-02-27 13:13:56 +0100 mst r268585 : - sfx2/source/bastyp/progress.cxx: + fix use of compiler specific macro 2009-02-27 11:00:32 +0100 mst r268564 : - sw/inc/{txatbase.hxx,txtatr.hxx,txtinet.hxx,txtfld.hxx,txtftn.hxx, txtflcnt.hxx,txttxmrk.hxx,txtrfmrk.hxx}, sw/source/core/txtnode/{atrtox.cxx,atrref.cxx,atrflyin.cxx,atrftn.cxx, txtatr2.cxx,txatbase.cxx,atrfld.cxx,txtedt.cxx}, sw/source/core/text/atrstck.cxx, sw/source/core/access/acchyperlink.cxx, sw/source/core/doc/visiturl.cxx, sw/source/ui/wrtsh/wrtsh2.cxx: + clean up SwTxtAttr and its subclasses: remove/fix casts, prefix members + SwTxtINetFmt: remove unused member bColor - sw/source/core/text/txtfld.cxx: + move SwTxtFld methods to atrfld.cxx 2009-02-27 10:58:44 +0100 mst r268563 : - sfx2/inc/sfx2/sfxbasemodel.hxx: + don't privately inherit BaseMutex, ScModelObj wants to access it 2009-02-27 10:58:02 +0100 mst r268562 : - xmloff/source/core/{RDFaExportHelper.cxx,RDFaImportHelper.cxx}: + arrrgh!!! someone thought it would be a good idea to have 2 different versions of boost in external! and they're NOT compatible!!! insert an ugly fragile hack that maybe works with both... 2009-02-26 17:42:26 +0100 mst r268544 : - comphelper/inc/comphelper/storagehelper.hxx. sfx2/source/doc/DocumentMetadataAccess.cxx: + someone made IsValidZipEntryFileName a static method and didn't tell me 2009-02-26 15:52:56 +0100 mst r268529 : redland: split up patches 2009-02-26 13:17:56 +0100 mst r268509 : migration of cws odfmetadata2 from CVS (resync to m42): module sw #i95863# - sw/inc/segdefs{,_}.hxx: + remove obsolete files - sw/source/ui/inc/itemdef.hxx: + remove itemdef.hxx - sw/source/ui/app/[apphdl.cxx,docsh.cxx}, sw/source/ui/misc/glshell.cxx, sw/source/ui/shells/*.cxx, sw/source/ui/uiview/*.cxx, sw/source/ui/web/*.cxx: + use sfx2/msg.hxx instead of itemdef.hxx - sw/source/core/edit/eddel.cxx: + @ JP: SwEditShell::Replace: you're right, deleting the text to be replaced first, and then inserting a space, and then replacing that space is unnecessary. whew, i'm so happy that we finally answered that question after 11 years. - sw/inc/edimp.hxx: + remove FOREACHCURSOR_START, FOREACHCURSOR_END - sw/inc/{swcrsr.hxx,unocrsr.hxx,viscrs.hxx}, sw/source/core/crsr/{crsrsh.cxx,swcrsr.cxx,trvlreg.cxx,trvltbl.cxx, unocrsr.cxx,viscrs.cxx}, sw/source/core/doc/{docbm.cxx,doccorr.cxx}, sw/source/core/docnode/{ndtbl.cxx,ndtbl1.cxx}, sw/source/core/edit/editsh.cxx, sw/source/core/frmedt/{fefly1.cxx,fetab.cxx,tblsel.cxx}, sw/source/core/layout/trvlfrm.cxx, sw/source/core/unocore/{unochart.cxx,unoobj2.cxx,unoparagraph.cxx, unoportenum.cxx,unotbl.cxx}, sw/source/core/view/vprint.cxx: + remove the hideous virtual operator SwFooCursor* + make SwCursor::IsReadOnlyAvailable() virtual + make SwUnoCrsr::Clone() virtual + refactor SwCursor methods IsSelOver(), LeftRight(), UpDown(), GotoTable(): replace dynamic_cast<...>(this) with new virtual methods 2009-02-26 13:14:58 +0100 mst r268508 : migration of cws odfmetadata2 from CVS (resync to m42): module sw - sw/source/filter/xml/swxml.cxx: + XMLReader::Read: load RDF metadata of the ODF document - sw/source/filter/xml/wrtxml.cxx: + SwXMLWriter::_Write: write RDF metadata of the ODF document if ODF >= 1.2 #i90620#: import xml:id in text tables (does not actually work yet) - sw/source/filter/xml/xmltbli{.hxx,.cxx}: + SwXMLTableCellAttrTokens,aTableCellAttrTokenMap: add XML_TOK_TABLE_XMLID + SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl: attribute xml:id + SwXMLTableCellContext_Impl::CreateChildContext: attribute xml:id + SwXMLTableColContext_Impl::SwXMLTableColContext_Impl: attribute xml:id + SwXMLTableContext::SwXMLTableContext: attribute xml:id fix #i98530# - sw/inc/unoport.hxx, sw/source/core/unocore/unoport.cxx: + SwXTextPortion: make constructor params const& - sw/source/core/unocore/unoportenum.cxx: + refactor to remove some code duplication + fix bug: paragraph w/out hints: bookmark before frame gets lost #i97274# handle invalid tables - sw/source/core/layout/tabfrm.cxx, sw/source/filter/xml/xmltbli.cxx: + SwXMLTableContext::MakeTable(): check that the table actually contains cells, and abort (removing the inserted table nodes) if not 2009-02-26 13:11:48 +0100 mst r268507 : migration of cws odfmetadata2 from CVS (resync to m42): module sw refactor SwXTextRange and SwXParagraph - sw/inc/unoobj.hxx, sw/source/core/unocore/unoobj2.cxx: + remove 3 constructors of SwXTextRange + new method SwXTextRange::CreateParentXText + refactor SwXTextRange::CreateTextRangeFromPosition and SwXTextRange::getText - sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx: + SwXParagraph no longer uses a cursor; it registers directly at SwTxtNode + replace SwXParagraph::GetCrsr with SwXParagraph::GetTxtNode - sw/source/core/unocore/unotext.cxx, sw/source/ui/uno/unotxvw.cxx: + adapt to new SwXParagraph #i90620# - sw/inc/SwMetadatable.hxx, sw/source/core/doc/SwMetadatable.cxx: + new files: base classes sw::Metadatable and sw::MetadatableMixin; also, 2 implementations of IXmlIdRegistry: sw::XmlIdRegistryDocument and sw::XmlIdRegistryClipboard + setMetadataReference: handle empty stream name as auto-detect - sw/source/core/doc/makefile.mk: + add SwMetadatable add a XmlIdRegistry to SwDoc - sw/inc/doc.hxx: + SwDoc: add member m_pXmlIdRegistry, method GetXmlIdRegistry() - sw/source/core/doc/docnew.cxx: + initialize XmlIdRegistry in SwDoc::GetXmlIdRegistry, not in constructor, because the constructor is not told whether the SwDoc is a clipboard - sw/inc/docsh.hxx, sw/source/ui/app/docsh.cxx: + SwDocShell: override GetXmlIdRegistry() #i91563#: make the SwTxtNode metadatable - sw/inc/ndtxt.hxx + SwTxtNode inherits sw::Metadatable - sw/inc/unoobj.hxx, sw/source/core/unocore/unoparagraph.cxx: + SwXParagraph inherits sw::MetadatableMixin #i91563#: handle SwTxtNode's metadata for delete - sw/source/core/txtnode/ndtxt.cxx: + SwTxtNode::SplitCntntNode: handle XmlId + SwTxtNode::JoinNext: merge XmlIds - sw/source/core/doc/docedt.cxx: + lcl_GetJoinFlags: document postcondition + SwDoc::Delete: remove XmlId only if SwTxtNode _becomes_ empty #i91563#: handle SwTxtNode's metadata for delete with undo - sw/inc/undobj.hxx + SwUndoDelete: new members m_pMetadataUndoStart, m_pMetadataUndoEnd - sw/source/core/undo/undel.cxx: + SwUndoDelete::SaveCntnt: save XmlIds for start and end SwTxtNode + SwUndoDelete::SaveCntnt: remove XmlId only if SwTxtNode _becomes_ empty + SwUndoDelete::Undo: restore saved XmlIds for start and end SwTxtNode - sw/source/core/docnode/ndcopy.cxx: + SwTxtNode::MakeCopy: register copy at XmlIdRegistry #i91563#: handle SwTxtNode's metadata for find/replace with undo - sw/source/core/undo/unins.cxx: + _UnReplaceData: rename members: add prefix m_ + _UnReplaceData: new members m_pMetadataUndoStart, m_pMetadataUndoEnd + _UnReplaceData::_UnReplaceData: save XmlIds for start and end SwTxtNode + _UnReplaceData::Undo: restore saved XmlIds for start and end SwTxtNode #i91563#: handle SwTxtNode's metadata for table-to-text with undo - sw/source/core/undo/untbl.cxx: + SwTblToTxtSave: rename members: add prefix m_ + SwTblToTxtSave: new members m_pMetadataUndoStart, m_pMetadataUndoEnd + SwTblToTxtSave::SwTblToTxtSave: save XmlIds for start and end SwTxtNode + SwTblToTxtSave::SwTblToTxtSave, SwNodes::UndoTableToText: always store the index of the first SwTxtNode in the cell, instead of the index of the first SwTxtNode in case of the first cell in a row, and the cell start node in other cases + SwNodes::UndoTableToText: restore saved XmlIds for start and end SwTxtNode - sw/source/core/docnode/ndtbl.cxx: + lcl_DelBox: simplify for refactored start index handling in SwTblToTxtSave 2009-02-26 13:02:28 +0100 mst r268505 : migration of cws odfmetadata2 from CVS (resync to m42): module sd - sd/source/ui/table/tableobjectbar.cxx,sd/source/ui/view/*.cxx: + remove invocations of SFX_DECL_TYPE - sd/source/ui/slideshow/SlideShowRestarter.cxx, sd/source/ui/toolpanel/LayoutMenu.cxx, sd/source/ui/unoidl/DrawController.cxx, sd/source/ui/view/{ViewShellBase.cxx,ViewTabBar.cxx,frmview.cxx}: + fix abuses of comphelper_getProcessComponentContext (missing release) 2009-02-26 13:01:24 +0100 mst r268504 : migration of cws odfmetadata2 from CVS (resync to m42): module starmath - starmath/source/document.cxx: + don't touch SfxObjectShell's privates 2009-02-26 13:00:37 +0100 mst r268503 : migration of cws odfmetadata2 from CVS (resync to m42): module sfx2 #i90620# - sfx2/inc/sfx2/XmlIdRegistry.hxx: + new file: interfaces sfx2::IXmlIdRegistry and sfx2::IXmlIdRegistrySupplier and a couple of utility functions - sfx2/inc/sfx2/DocumentMetadataAccess.hxx, sfx2/source/doc/DocumentMetadataAccess.cxx: + new class sfx2::DocumentMetadataAccess, implements XDocumentMetadataAccess + the URI of the DocumentMetadataAccess is now the URI from which the document was loaded; for a new document, use a vnd.sun.star.tdoc URI + add new function sfx2::createBaseURI() + prevent using reserved file names + try not to recurse into embedded subdocuments - sfx2/source/doc/makefile.mk: + add DocumentMetadataAccess - sfx2/util/makefile.mk: + link libsfx2 against libxml2 (needed for xmlValidateNCName) - sfx2/source/doc/makefile.mk: + add LIBXML_CFLAGS to CFLAGS - sfx2/prj/build.lst: + add dependence on libxml2 - sfx2/prj/d.lst: + add XmlIdRegistry.hxx, DocumentMetadataAccess.hxx - sfx2/inc/sfx2/objsh.hxx, sfx2/source/doc/objxtor.cxx: + make SfxObjectShell's members private + new method SfxObjectShell::GetAutoStyleFilterIndex + SfxObjectShell inherits sfx2::IXmlIdRegistrySupplier - sfx2/source/dialog/templdlg.cxx, sfx2/source/doc/sfxbasemodel.cxx: + don't touch SfxObjectShell's privates - sfx2/inc/sfx2/sfxbasemodel.hxx, sfx2/source/doc/sfxbasemodel.cxx: + SfxBaseModel inherits BaseMutex instead of IMPL_SfxBaseModel_MutexContainer + SfxBaseModel implements additional interface XDocumentMetadataAccess + IMPL_SfxBaseModel_DataContainer has new member: a sfx2::DocumentMetadataAccess + implementation of XDocumentMetadataAccess forwards to the sfx2::DocumentMetadataAccess member - sfx2/qa/complex/DocumentMetadataAccessTest.java, sfx2/qa/complex/{tests.sce,makefile.mk}, sfx2/qa/complex/testdocuments/TESTRDFA.odt: + add complex test: DocumentMetadataAccessTest + add RDFa test document #i95863# - sfx2/inc/sfx2/dinfdlg.hxx, sfx2/source/dialog/dinfdlg.cxx: + refactor SfxDocumentItem so it no longer requires a XDocumentInfo + move struct CustomProperty to implementation file + remove class SfxDocumentUserPage + QueryValue,PutValue: remove MID_DOCINFO_FIELD* - sfx2/source/doc/objserv.cxx: + adapt to SfxDocumentItem change - sfx2/inc/sfx2/sfx.hrc, sfx2/sdi/sfxslots.sdi, sfx2/inc/sfx2/msg.hxx: + remove MID_DOCINFO_FIELD* + put all invocations of SFX_DECL_TYPE in msg.hxx, and undef SFX_DECL_TYPE - sfx2/source/doc/objxtor.cxx: + fix abuses of comphelper_getProcessComponentContext (missing release) - sfx2/source/doc/docfile.cxx: + SfxMedium::SfxMedium: don't dereference NULL, throw exception instead - sfx2/source/doc/objstor.cxx: + SfxObjectShell::DoLoad: fix bug: DocumentBaseURI is not initialized 2009-02-26 12:58:07 +0100 mst r268502 : migration of cws odfmetadata2 from CVS (resync to m42): module xmloff #i90620#: implement RDFa import (interface change) - xmloff/inc/xmloff/xmlimp.hxx. xmloff/source/core/xmlimp.cxx: + make SvXMLImport::GetAbsoluteReference() const + add SvXMLImport::GetComponentContext() + SvXMLImport::_InitCtor(): add RDFa namespace + add SvXMLImport::AddRDFa() + SvXMLImport::endDocument() inserts RDFa into document repository - xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/xmltoken.cxx: + new tokens for RDFa: XML_ABOUT, XML_DATATYPE - xmloff/inc/RDFaImportHelper.hxx, xmloff/source/core/RDFaImportHelper.cxx: + new class RDFaImportHelper + adapt the code to the bleak reality of broken C++ implementations + handle empty xhtml:about attributes properly, which are actually valid relative URIs + work around broken SvXMLImport::GetAbsoluteReference - xmloff/source/core/makefile.mk: + add RDFaImportHelper.cxx #i90620#: implement RDFa export - xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx: + add SvXMLExport::EnsureNamespace(), and a stack of namespace maps + add SvXMLExport::GetComponentContext() + add SvXMLExport::AddAttributesRDFa() - xmloff/inc/RDFaExportHelper.hxx, xmloff/source/core/RDFaExportHelper.cxx: + new class RDFaExportHelper + don't use std::map::data_type, which is actually called std::map::mapped_type by libstdc++ - xmloff/source/core/makefile.mk: + add RDFaExportHelper.cxx #i91563# - xmloff/inc/xmloff/txtimp.hxx, xmloff/source/text/txtimp.cxx: + XMLTextPAttrTokens: add RDFa tokens - xmloff/source/text/txtparai{.hxx,.cxx}: + import RDFa for text:p - xmloff/source/text/txtparae.cxx: + export RDFa for text:p interface change: use XHTML namespace instead of RDFA - xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/{xmltoken.cxx,xmlimp.cxx,xmlexp.cxx,RDFaExportHelper.cxx}, xmloff/source/text/txtimp.cxx: + use XHTML namespace instead of RDFA #i91565#, #i91566#: (preliminary) import for text:meta, text:meta-field - xmloff/source/text/txtparai.cxx: + new class XMLMetaImportContextBase with subclasses to import text:meta and text:meta-field - xmloff/source/text/XMLTextMarkImportContext.cxx: + change XMLTextMarkImportContext::CreateAndInsertMark to handle marks with no name (text:meta) #i91565#, #i91566#: (preliminary) export for text:meta, text:meta-field - xmloff/inc/txtflde.hxx, xmloff/source/text/txtflde.cxx: + add FIELD_ID_META to FieldIdEnum + new method XMLTextFieldExport::ExportMetaField() + change XMLTextFieldExport::ExportField{,AutoStyle,Helper} to take additional parameter for progress bar - xmloff/inc/xmloff/txtparae.hxx, xmloff/source/text/txtparae.cxx: + make XMLTextParagraphExport::exportTextRangeEnumeration() public + new method XMLTextParagraphExport::exportMeta() #i90620# - xmloff/inc/xmloff/xmlimp.hxx, xmloff/source/core/xmlimp.cxx, xmloff/inc/xmloff/xmlexp.hxx, xmloff/source/core/xmlexp.cxx: + rename SvXML{Im,Ex}port::GetStreamPath() to GetStreamName() + fix xml:id {im,ex}port for embedded documents and non-packages + adapt to API change: XMetadatable #i90620# GRDDL - xmloff/inc/xmlnmspe.hxx, xmloff/inc/xmloff/xmltoken.hxx, xmloff/source/core/{xmltoken.cxx,xmlexp.cxx}: + add GRDDL namespace + add token XML_TRANSFORMATION + add grddl:transformation attribute to root elements for meta.xml, content.xml and styles.xml 2009-02-26 12:54:40 +0100 mst r268501 : migration of cws odfmetadata2 from CVS (resync to m42): module unoxml #i90620# - unoxml/source/rdf/librdf_repository.cxx: + librdf_Repository::importGraph: allocate buffer sized length of stream + switch from one librdf_world per repository to a single static world because redland has global variables with a brain-damaged life-cycle... + exportGraph: use new raptor 1.4.18 feature to disable writing an xml:base attribute in RDF/XML files - unoxml/source/rdf/librdf_repository.cxx: unoxml/qa/complex/RDFRepositoryTest.java: + adapt to predicate is URI change + adapt to RDFa API change + adapt to API change: RDFa has multiple predicates... + adapt to API change: XMetadatable derives from XURI + allow xhtml:datatype without xhtml:content + adapt to API change: attribute MetadataReference is StringPair - unoxml/source/rdf/CURI.cxx: + add some more URI constants 2009-02-26 12:53:32 +0100 mst r268500 : migration of cws odfmetadata2 from CVS (resync to m42): module package - package/inc/ImplValidCharacters.hxx: + remove (moved to comphelper) 2009-02-26 12:52:49 +0100 mst r268499 : migration of cws odfmetadata2 from CVS (resync to m42): module comphelper - comphelper/inc/comphelper/processfactory.hxx, comphelper/source/processfactory/processfactory.cxx: + add getProcessComponentContext() + change return type of comphelper_getProcessComponentContext to Reference - comphelper/inc/comphelper/stl_types.hxx: + add OUStringBufferAppender + add algorithm intersperse - comphelper/source/misc/string.cxx: + rewrite convertCommaSeparated with intersperse and OUStringBufferAppender - comphelper/inc/comphelper/stlunosequence.hxx: + fix bug: begin() on empty sequence != end() 2009-02-26 12:50:47 +0100 mst r268498 : migration of cws odfmetadata2 from CVS (resync to m42): module offapi #i96209# - offapi/com/sun/star/text/fieldmaster/*.idl: + rename module from FieldMaster to fieldmaster - offapi/type_reference/{typelibrary_history.txt,types.rdb}: + update reference types.rdb #i90620# - offapi/com/sun/star/rdf/{XMetadatable.idl,XDocumentMetadataAccess.idl}: + API change: XMetadatable derives from XURI + API change: replace XmlId (string) with MetadataReference (StringPair) - offapi/com/sun/star/rdf/{Statement.idl,XDocumentRepository.idl, XNamedGraph.idl,XRepository.idl}: + the predicate of a statement is a URI, not a Resource - offapi/com/sun/star/rdf/XDocumentMetadataAccess.idl: + rename: s/Package/Document/ + remove uuid + remove everything related to mapping + graph names are now generated from base URI and file names + load methods: improve error handling with XInteractionHandler - offapi/com/sun/star/rdf/XDocumentRepository.idl: + change: RDFa permits using multiple predicates in one attribute + setStatementRDFa: subject is now XResource, object is now XMetadatable - offapi/com/sun/star/rdf/URIs.idl: + add some more URI constants - offapi/com/sun/star/rdf: + fix @since tags and replace <method> with <member> 2009-02-26 12:47:24 +0100 mst r268497 : migration of cws odfmetadata2 from CVS (resync to m42): module redland fix #i93768# - redland/raptor-1.4.17.patch, redland/raptor/makefile.mk: + disable GRDDL parser to prevent call to libxslt xsltSetDefaultSecurityPrefs, which breaks xmlhelp - redland/raptor/makefile.mk, redland/raptor-1.4.17.patch, redland/raptor-1.4.18.patch: + upgrade raptor to 1.4.18 + deactivate serializer for RSS/Atom (does not build) - redland/rasqal/makefile.mk, redland/rasqal-0.9.15.patch, redland/rasqal-0.9.16.patch, + upgrade rasqal to 0.9.16 - redland/redland/makefile.mk, redland/redland-1.0.7.patch, redland/redland-1.0.8.patch: + upgrade redland to 1.0.8 - redland/redlandversion.mk: + the librasqal SONAME has changed
2009-07-02 09:05:03 +00:00
if ( !pNew || !isGRFATR(nWhich) )
2000-09-18 23:08:29 +00:00
return;
}
if( bComplete )
2000-09-18 23:08:29 +00:00
{
InvalidatePrt();
SetCompletePaint();
}
}
CWS-TOOLING: integrate CWS chart39 2009-06-30 16:55:46 +0200 iha r273522 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-30 16:45:59 +0200 iha r273521 : #i102701# apply patch for P1 issue on dev300m50 to be able to save again 2009-06-30 16:32:32 +0200 iha r273520 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-29 10:04:34 +0200 iha r273454 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-26 19:31:16 +0200 iha r273437 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-25 10:36:28 +0200 iha r273367 : #i101968# text values in data range cause incorrect x values 2009-06-24 17:34:18 +0200 iha r273357 : #i102428# x values are wrong in xy-scatter-chart with own data table if empty cells are contained in x values 2009-06-24 10:16:25 +0200 iha r273317 : #i99915# wrong matrix translation causes broken chart display for small values 2009-06-19 17:20:06 +0200 iha r273174 : #i78025# charts own borders are not completely visible 2009-06-19 17:18:41 +0200 iha r273172 : #i102950# don't paint additional borders for charts 2009-06-11 16:27:54 +0200 iha r272884 : CWS-TOOLING: rebase CWS chart39 to trunk@272827 (milestone: DEV300:m50) 2009-06-09 17:50:10 +0200 iha r272790 : #i97222# when converting a chart via API to 3D categories get lost and for line,area&xy the stacking mode is wrong 2009-06-09 16:00:27 +0200 iha r272775 : #i98319# data point properties get lost while copying charts from calc to impress 2009-06-09 10:26:51 +0200 iha r272755 : #i98392# correct orienation of gradient fillings on 3D walls 2009-05-29 10:35:16 +0200 iha r272436 : #i100529# Plot missing values - leave gap fails for smoothed lines 2009-05-04 18:20:31 +0200 iha r271478 : #i99841# Title with Vertically stacked attribute is wrong after editing 2009-05-04 18:03:01 +0200 iha r271477 : #i101050# avoid a corner in closed lines, which are smoothed by spline 2009-05-04 16:45:18 +0200 iha r271472 : #i101050# avoid crash in case the normals sequence has less points than the polygon
2009-07-28 10:25:31 +00:00
void lcl_correctlyAlignRect( SwRect& rAlignedGrfArea, const SwRect& rInArea, OutputDevice* pOut )
{
if(!pOut)
return;
Rectangle aPxRect = pOut->LogicToPixel( rInArea.SVRect() );
Rectangle aNewPxRect( aPxRect );
while( aNewPxRect.Left() < aPxRect.Left() )
{
rAlignedGrfArea.Left( rAlignedGrfArea.Left()+1 );
aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() );
}
while( aNewPxRect.Top() < aPxRect.Top() )
{
rAlignedGrfArea.Top( rAlignedGrfArea.Top()+1 );
aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() );
}
while( aNewPxRect.Bottom() > aPxRect.Bottom() )
{
rAlignedGrfArea.Bottom( rAlignedGrfArea.Bottom()-1 );
aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() );
}
while( aNewPxRect.Right() > aPxRect.Right() )
{
rAlignedGrfArea.Right( rAlignedGrfArea.Right()-1 );
aNewPxRect = pOut->LogicToPixel( rAlignedGrfArea.SVRect() );
}
}
2000-09-18 23:08:29 +00:00
// Ausgabe der Grafik. Hier wird entweder eine QuickDraw-Bmp oder
// eine Grafik vorausgesetzt. Ist nichts davon vorhanden, wird
// eine Ersatzdarstellung ausgegeben.
/// OD 25.09.2002 #99739# - delete unused 3rd parameter.
/// OD 25.09.2002 #99739# - use aligned rectangle for drawing graphic.
/// OD 25.09.2002 #99739# - pixel-align coordinations for drawing graphic.
void SwNoTxtFrm::PaintPicture( OutputDevice* pOut, const SwRect &rGrfArea ) const
2000-09-18 23:08:29 +00:00
{
ViewShell* pShell = GetShell();
SwNoTxtNode& rNoTNd = *(SwNoTxtNode*)GetNode();
SwGrfNode* pGrfNd = rNoTNd.GetGrfNode();
SwOLENode* pOLENd = rNoTNd.GetOLENode();
const BOOL bPrn = pOut == rNoTNd.getIDocumentDeviceAccess()->getPrinter( false ) ||
pOut->GetConnectMetaFile();
CWS-TOOLING: integrate CWS chart39 2009-06-30 16:55:46 +0200 iha r273522 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-30 16:45:59 +0200 iha r273521 : #i102701# apply patch for P1 issue on dev300m50 to be able to save again 2009-06-30 16:32:32 +0200 iha r273520 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-29 10:04:34 +0200 iha r273454 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-26 19:31:16 +0200 iha r273437 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-25 10:36:28 +0200 iha r273367 : #i101968# text values in data range cause incorrect x values 2009-06-24 17:34:18 +0200 iha r273357 : #i102428# x values are wrong in xy-scatter-chart with own data table if empty cells are contained in x values 2009-06-24 10:16:25 +0200 iha r273317 : #i99915# wrong matrix translation causes broken chart display for small values 2009-06-19 17:20:06 +0200 iha r273174 : #i78025# charts own borders are not completely visible 2009-06-19 17:18:41 +0200 iha r273172 : #i102950# don't paint additional borders for charts 2009-06-11 16:27:54 +0200 iha r272884 : CWS-TOOLING: rebase CWS chart39 to trunk@272827 (milestone: DEV300:m50) 2009-06-09 17:50:10 +0200 iha r272790 : #i97222# when converting a chart via API to 3D categories get lost and for line,area&xy the stacking mode is wrong 2009-06-09 16:00:27 +0200 iha r272775 : #i98319# data point properties get lost while copying charts from calc to impress 2009-06-09 10:26:51 +0200 iha r272755 : #i98392# correct orienation of gradient fillings on 3D walls 2009-05-29 10:35:16 +0200 iha r272436 : #i100529# Plot missing values - leave gap fails for smoothed lines 2009-05-04 18:20:31 +0200 iha r271478 : #i99841# Title with Vertically stacked attribute is wrong after editing 2009-05-04 18:03:01 +0200 iha r271477 : #i101050# avoid a corner in closed lines, which are smoothed by spline 2009-05-04 16:45:18 +0200 iha r271472 : #i101050# avoid crash in case the normals sequence has less points than the polygon
2009-07-28 10:25:31 +00:00
const bool bIsChart = pOLENd && ChartPrettyPainter::IsChart( pOLENd->GetOLEObj().GetObject() );
/// OD 25.09.2002 #99739# - calculate aligned rectangle from parameter <rGrfArea>.
/// Use aligned rectangle <aAlignedGrfArea> instead of <rGrfArea> in
/// the following code.
SwRect aAlignedGrfArea = rGrfArea;
::SwAlignRect( aAlignedGrfArea, pShell );
CWS-TOOLING: integrate CWS chart39 2009-06-30 16:55:46 +0200 iha r273522 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-30 16:45:59 +0200 iha r273521 : #i102701# apply patch for P1 issue on dev300m50 to be able to save again 2009-06-30 16:32:32 +0200 iha r273520 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-29 10:04:34 +0200 iha r273454 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-26 19:31:16 +0200 iha r273437 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-25 10:36:28 +0200 iha r273367 : #i101968# text values in data range cause incorrect x values 2009-06-24 17:34:18 +0200 iha r273357 : #i102428# x values are wrong in xy-scatter-chart with own data table if empty cells are contained in x values 2009-06-24 10:16:25 +0200 iha r273317 : #i99915# wrong matrix translation causes broken chart display for small values 2009-06-19 17:20:06 +0200 iha r273174 : #i78025# charts own borders are not completely visible 2009-06-19 17:18:41 +0200 iha r273172 : #i102950# don't paint additional borders for charts 2009-06-11 16:27:54 +0200 iha r272884 : CWS-TOOLING: rebase CWS chart39 to trunk@272827 (milestone: DEV300:m50) 2009-06-09 17:50:10 +0200 iha r272790 : #i97222# when converting a chart via API to 3D categories get lost and for line,area&xy the stacking mode is wrong 2009-06-09 16:00:27 +0200 iha r272775 : #i98319# data point properties get lost while copying charts from calc to impress 2009-06-09 10:26:51 +0200 iha r272755 : #i98392# correct orienation of gradient fillings on 3D walls 2009-05-29 10:35:16 +0200 iha r272436 : #i100529# Plot missing values - leave gap fails for smoothed lines 2009-05-04 18:20:31 +0200 iha r271478 : #i99841# Title with Vertically stacked attribute is wrong after editing 2009-05-04 18:03:01 +0200 iha r271477 : #i101050# avoid a corner in closed lines, which are smoothed by spline 2009-05-04 16:45:18 +0200 iha r271472 : #i101050# avoid crash in case the normals sequence has less points than the polygon
2009-07-28 10:25:31 +00:00
if( !bIsChart )
{
/// OD 25.09.2002 #99739#
/// Because for drawing a graphic left-top-corner and size coordinations are
/// used, these coordinations have to be determined on pixel level.
::SwAlignGrfRect( &aAlignedGrfArea, *pOut );
}
else //if( bIsChart )
{
//#i78025# charts own borders are not completely visible
//the above pixel correction is not correct - at least not for charts
//so a different pixel correction is choosen here
//this might be a good idea for all other OLE objects also,
//but as I cannot oversee the consequences I fix it only for charts for now
lcl_correctlyAlignRect( aAlignedGrfArea, rGrfArea, pOut );
}
2000-09-18 23:08:29 +00:00
if( pGrfNd )
{
BOOL bForceSwap = FALSE, bContinue = TRUE;
2000-09-18 23:08:29 +00:00
GraphicObject& rGrfObj = pGrfNd->GetGrfObj();
GraphicAttr aGrfAttr;
pGrfNd->GetGraphicAttr( aGrfAttr, this );
if( !bPrn )
{
// --> OD 2007-01-02 #i73788#
if ( pGrfNd->IsLinkedInputStreamReady() )
{
pGrfNd->UpdateLinkWithInputStream();
}
// <--
// --> OD 2008-01-30 #i85717#
// --> OD 2008-07-21 #i90395# - check, if asynchronous retrieval
// if input stream for the graphic is possible
// else if( GRAPHIC_DEFAULT == rGrfObj.GetType() &&
else if ( ( rGrfObj.GetType() == GRAPHIC_DEFAULT ||
rGrfObj.GetType() == GRAPHIC_NONE ) &&
pGrfNd->IsLinkedFile() &&
pGrfNd->IsAsyncRetrieveInputStreamPossible() )
// <--
2000-09-18 23:08:29 +00:00
{
Size aTmpSz;
::sfx2::SvLinkSource* pGrfObj = pGrfNd->GetLink()->GetObj();
2000-09-18 23:08:29 +00:00
if( !pGrfObj ||
!pGrfObj->IsDataComplete() ||
2000-09-18 23:08:29 +00:00
!(aTmpSz = pGrfNd->GetTwipSize()).Width() ||
!aTmpSz.Height() || !pGrfNd->GetAutoFmtLvl() )
{
// --> OD 2006-12-22 #i73788#
pGrfNd->TriggerAsyncRetrieveInputStream();
// <--
2000-09-18 23:08:29 +00:00
}
CWS-TOOLING: integrate CWS sw32a11y01 2009-08-27 10:11:46 +0200 hde r275457 : new testcase i103265 2009-08-27 08:24:31 +0200 hde r275454 : new testcase i103265 2009-08-27 08:23:05 +0200 hde r275453 : new document for testcase i103265 2009-08-26 13:43:33 +0200 hde r275421 : added new autotest 2009-08-26 13:36:28 +0200 hde r275420 : added new autotest 2009-08-18 15:41:18 +0200 od r275113 : #i104300# method <SwEditWin::RequestHelp(..)> - improve help tip for hyperlinks to cross-reference bookmarks. 2009-08-10 15:18:41 +0200 od r274816 : #i73249# method <SwFrameShell::Execute(..)> - no update of fly frame manager on dialog "Title and Description" 2009-08-10 14:24:15 +0200 od r274813 : #i92125# correction of end of file - missing newline end 2009-08-10 14:10:14 +0200 od r274811 : #i92125# correction of end of file - newline missing 2009-08-10 14:00:30 +0200 od r274808 : #i92125# - correct end of file - new line missing 2009-08-10 09:12:30 +0200 od r274794 : CWS-TOOLING: rebase CWS sw32a11y01 to trunk@274622 (milestone: DEV300:m54) 2009-08-07 15:52:59 +0200 od r274775 : #i73249# minor adjustment due to compiler warning 2009-08-07 15:40:38 +0200 od r274774 : #i92125# method <MarkManager::deleteMarks(..)> - do not delete cross-reference bookmark, if deletion occurs inside a certain node 2009-08-06 12:53:05 +0200 od r274717 : #i92125# method <MarkManager::deleteMarks(..) - no move of position for cross-reference bookmark, if move occurs inside certain node. 2009-08-06 12:50:27 +0200 od r274716 : #i92125# method <SwUndoSaveCntnt::DelCntntIndex(..)> - keep cross-reference bookmarks, if deletion occurs inside a certain node. 2009-08-06 09:53:29 +0200 od r274705 : #i103265# method <SwTOXPara::GetURL()> - For outline and template entries create link to bookmark. The bookmark of type CROSSREF_HEADING_BOOKMARK is created, if needed 2009-07-22 13:57:04 +0200 od r274236 : #i73249# adjustment for export of svg:title and svg:description 2009-07-22 13:51:58 +0200 od r274234 : #i73249# adjust and enhance import/export of svg:title and svg:description for Writer's text frames, graphics and embedded objects 2009-07-21 10:26:27 +0200 od r274168 : #i73249# implement support for attributes Title and Description for text frames, graphics and embedded objects in Writer - core, UNO-API, undo/redo and UI 2009-07-21 10:05:15 +0200 od r274164 : #i73249# new optional properties Title and Description as basis frame properties in text documents 2009-07-13 12:19:54 +0200 od r273928 : #i73249# Implementation of Undo/Redo of drawing object's name, title and description
2009-08-27 11:59:20 +00:00
String aTxt( pGrfNd->GetTitle() );
2000-09-18 23:08:29 +00:00
if ( !aTxt.Len() )
GetRealURL( *pGrfNd, aTxt );
::lcl_PaintReplacement( aAlignedGrfArea, aTxt, *pShell, this, FALSE );
2000-09-18 23:08:29 +00:00
bContinue = FALSE;
}
else if( rGrfObj.IsCached( pOut, aAlignedGrfArea.Pos(),
aAlignedGrfArea.SSize(), &aGrfAttr ))
2000-09-18 23:08:29 +00:00
{
rGrfObj.Draw( pOut, aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(),
2000-09-18 23:08:29 +00:00
&aGrfAttr );
bContinue = FALSE;
}
}
if( bContinue )
{
const BOOL bSwapped = rGrfObj.IsSwappedOut();
const BOOL bSwappedIn = 0 != pGrfNd->SwapIn( bPrn );
2000-09-18 23:08:29 +00:00
if( bSwappedIn && rGrfObj.GetGraphic().IsSupportedGraphic())
{
const BOOL bAnimate = rGrfObj.IsAnimated() &&
!pShell->IsPreView() &&
!pShell->GetAccessibilityOptions()->IsStopAnimatedGraphics() &&
// --> FME 2004-06-21 #i9684# Stop animation during printing/pdf export
pShell->GetWin();
// <--
2000-09-18 23:08:29 +00:00
if( bAnimate &&
FindFlyFrm() != ::GetFlyFromMarked( 0, pShell ))
{
OutputDevice* pVout;
if( pOut == pShell->GetOut() && SwRootFrm::FlushVout() )
pVout = pOut, pOut = pShell->GetOut();
else if( pShell->GetWin() &&
OUTDEV_VIRDEV == pOut->GetOutDevType() )
pVout = pOut, pOut = pShell->GetWin();
else
pVout = 0;
ASSERT( OUTDEV_VIRDEV != pOut->GetOutDevType() ||
pShell->GetViewOptions()->IsPDFExport(),
2000-09-18 23:08:29 +00:00
"pOut sollte kein virtuelles Device sein" );
rGrfObj.StartAnimation( pOut, aAlignedGrfArea.Pos(),
aAlignedGrfArea.SSize(), long(this),
2000-09-18 23:08:29 +00:00
0, GRFMGR_DRAW_STANDARD, pVout );
}
else
rGrfObj.Draw( pOut, aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(),
2000-09-18 23:08:29 +00:00
&aGrfAttr );
}
else
{
USHORT nResId = 0;
if( bSwappedIn )
{
if( GRAPHIC_NONE == rGrfObj.GetType() )
nResId = STR_COMCORE_READERROR;
else if ( !rGrfObj.GetGraphic().IsSupportedGraphic() )
nResId = STR_COMCORE_CANT_SHOW;
}
((SwNoTxtFrm*)this)->nWeight = -1;
String aText;
if ( !nResId &&
CWS-TOOLING: integrate CWS sw32a11y01 2009-08-27 10:11:46 +0200 hde r275457 : new testcase i103265 2009-08-27 08:24:31 +0200 hde r275454 : new testcase i103265 2009-08-27 08:23:05 +0200 hde r275453 : new document for testcase i103265 2009-08-26 13:43:33 +0200 hde r275421 : added new autotest 2009-08-26 13:36:28 +0200 hde r275420 : added new autotest 2009-08-18 15:41:18 +0200 od r275113 : #i104300# method <SwEditWin::RequestHelp(..)> - improve help tip for hyperlinks to cross-reference bookmarks. 2009-08-10 15:18:41 +0200 od r274816 : #i73249# method <SwFrameShell::Execute(..)> - no update of fly frame manager on dialog "Title and Description" 2009-08-10 14:24:15 +0200 od r274813 : #i92125# correction of end of file - missing newline end 2009-08-10 14:10:14 +0200 od r274811 : #i92125# correction of end of file - newline missing 2009-08-10 14:00:30 +0200 od r274808 : #i92125# - correct end of file - new line missing 2009-08-10 09:12:30 +0200 od r274794 : CWS-TOOLING: rebase CWS sw32a11y01 to trunk@274622 (milestone: DEV300:m54) 2009-08-07 15:52:59 +0200 od r274775 : #i73249# minor adjustment due to compiler warning 2009-08-07 15:40:38 +0200 od r274774 : #i92125# method <MarkManager::deleteMarks(..)> - do not delete cross-reference bookmark, if deletion occurs inside a certain node 2009-08-06 12:53:05 +0200 od r274717 : #i92125# method <MarkManager::deleteMarks(..) - no move of position for cross-reference bookmark, if move occurs inside certain node. 2009-08-06 12:50:27 +0200 od r274716 : #i92125# method <SwUndoSaveCntnt::DelCntntIndex(..)> - keep cross-reference bookmarks, if deletion occurs inside a certain node. 2009-08-06 09:53:29 +0200 od r274705 : #i103265# method <SwTOXPara::GetURL()> - For outline and template entries create link to bookmark. The bookmark of type CROSSREF_HEADING_BOOKMARK is created, if needed 2009-07-22 13:57:04 +0200 od r274236 : #i73249# adjustment for export of svg:title and svg:description 2009-07-22 13:51:58 +0200 od r274234 : #i73249# adjust and enhance import/export of svg:title and svg:description for Writer's text frames, graphics and embedded objects 2009-07-21 10:26:27 +0200 od r274168 : #i73249# implement support for attributes Title and Description for text frames, graphics and embedded objects in Writer - core, UNO-API, undo/redo and UI 2009-07-21 10:05:15 +0200 od r274164 : #i73249# new optional properties Title and Description as basis frame properties in text documents 2009-07-13 12:19:54 +0200 od r273928 : #i73249# Implementation of Undo/Redo of drawing object's name, title and description
2009-08-27 11:59:20 +00:00
!(aText = pGrfNd->GetTitle()).Len() &&
2000-09-18 23:08:29 +00:00
(!GetRealURL( *pGrfNd, aText ) || !aText.Len()))
{
nResId = STR_COMCORE_READERROR;
}
if ( nResId )
aText = SW_RESSTR( nResId );
::lcl_PaintReplacement( aAlignedGrfArea, aText, *pShell, this, TRUE );
2000-09-18 23:08:29 +00:00
}
//Beim Drucken duerfen wir nicht die Grafiken sammeln...
if( bSwapped && bPrn )
bForceSwap = TRUE;
}
if( bForceSwap )
pGrfNd->SwapOut();
}
CWS-TOOLING: integrate CWS chart39 2009-06-30 16:55:46 +0200 iha r273522 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-30 16:45:59 +0200 iha r273521 : #i102701# apply patch for P1 issue on dev300m50 to be able to save again 2009-06-30 16:32:32 +0200 iha r273520 : #i103209# im-/export attribute xlink:href at chart:chart element + some cleanup in naming 2009-06-29 10:04:34 +0200 iha r273454 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-26 19:31:16 +0200 iha r273437 : #i103147# ODF, workaround broken files with a missing table:cell-range-address at the plot-area 2009-06-25 10:36:28 +0200 iha r273367 : #i101968# text values in data range cause incorrect x values 2009-06-24 17:34:18 +0200 iha r273357 : #i102428# x values are wrong in xy-scatter-chart with own data table if empty cells are contained in x values 2009-06-24 10:16:25 +0200 iha r273317 : #i99915# wrong matrix translation causes broken chart display for small values 2009-06-19 17:20:06 +0200 iha r273174 : #i78025# charts own borders are not completely visible 2009-06-19 17:18:41 +0200 iha r273172 : #i102950# don't paint additional borders for charts 2009-06-11 16:27:54 +0200 iha r272884 : CWS-TOOLING: rebase CWS chart39 to trunk@272827 (milestone: DEV300:m50) 2009-06-09 17:50:10 +0200 iha r272790 : #i97222# when converting a chart via API to 3D categories get lost and for line,area&xy the stacking mode is wrong 2009-06-09 16:00:27 +0200 iha r272775 : #i98319# data point properties get lost while copying charts from calc to impress 2009-06-09 10:26:51 +0200 iha r272755 : #i98392# correct orienation of gradient fillings on 3D walls 2009-05-29 10:35:16 +0200 iha r272436 : #i100529# Plot missing values - leave gap fails for smoothed lines 2009-05-04 18:20:31 +0200 iha r271478 : #i99841# Title with Vertically stacked attribute is wrong after editing 2009-05-04 18:03:01 +0200 iha r271477 : #i101050# avoid a corner in closed lines, which are smoothed by spline 2009-05-04 16:45:18 +0200 iha r271472 : #i101050# avoid crash in case the normals sequence has less points than the polygon
2009-07-28 10:25:31 +00:00
else if( bIsChart
//charts must be painted resolution dependent!! #i82893#, #i75867#
&& ChartPrettyPainter::ShouldPrettyPaintChartOnThisDevice( pOut )
&& svt::EmbeddedObjectRef::TryRunningState( pOLENd->GetOLEObj().GetOleRef() )
&& ChartPrettyPainter::DoPrettyPaintChart( uno::Reference< frame::XModel >(
pOLENd->GetOLEObj().GetOleRef()->getComponent(), uno::UNO_QUERY), pOut, aAlignedGrfArea.SVRect() ) )
{
(void)(0);//all was done in if statement
}
2000-09-18 23:08:29 +00:00
else if( pOLENd )
{
// --> OD 2009-03-05 #i99665#
// Adjust AntiAliasing mode at output device for chart OLE
const USHORT nFormerAntialiasingAtOutput( pOut->GetAntialiasing() );
if ( pOLENd->IsChart() &&
pShell->Imp()->GetDrawView()->IsAntiAliasing() )
{
const USHORT nAntialiasingForChartOLE =
nFormerAntialiasingAtOutput | ANTIALIASING_PIXELSNAPHAIRLINE;
pOut->SetAntialiasing( nAntialiasingForChartOLE );
}
// <--
Point aPosition(aAlignedGrfArea.Pos());
Size aSize(aAlignedGrfArea.SSize());
2000-09-18 23:08:29 +00:00
// Im BrowseModus gibt es nicht unbedingt einen Drucker und
// damit kein JobSetup, also legen wir eines an ...
const JobSetup* pJobSetup = pOLENd->getIDocumentDeviceAccess()->getJobsetup();
BOOL bDummyJobSetup = 0 == pJobSetup;
2000-09-18 23:08:29 +00:00
if( bDummyJobSetup )
pJobSetup = new JobSetup();
// #i42323#
// The reason for #114233# is gone, so i remove it again
//TODO/LATER: is it a problem that the JopSetup isn't used?
//xRef->DoDraw( pOut, aAlignedGrfArea.Pos(), aAlignedGrfArea.SSize(), *pJobSetup );
Graphic* pGraphic = NULL;
if ( pOut && ( pOut->GetDrawMode() & DRAWMODE_SETTINGSFILL ) )
pGraphic = pOLENd->GetHCGraphic();
// when it is not possible to get HC-representation, the original image should be used
if ( !pGraphic )
pGraphic = pOLENd->GetGraphic();
if ( pGraphic && pGraphic->GetType() != GRAPHIC_NONE )
{
pGraphic->Draw( pOut, aPosition, aSize );
// shade the representation if the object is activated outplace
uno::Reference < embed::XEmbeddedObject > xObj = pOLENd->GetOLEObj().GetOleRef();
if ( xObj.is() && xObj->getCurrentState() == embed::EmbedStates::ACTIVE )
{
::svt::EmbeddedObjectRef::DrawShading( Rectangle( aPosition, aSize ), pOut );
}
}
else
::svt::EmbeddedObjectRef::DrawPaintReplacement( Rectangle( aPosition, aSize ), pOLENd->GetOLEObj().GetCurrentPersistName(), pOut );
2000-09-18 23:08:29 +00:00
if( bDummyJobSetup )
delete pJobSetup; // ... und raeumen wieder auf.
sal_Int64 nMiscStatus = pOLENd->GetOLEObj().GetOleRef()->getStatus( pOLENd->GetAspect() );
if ( !bPrn && pShell->ISA( SwCrsrShell ) &&
nMiscStatus & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
2000-09-18 23:08:29 +00:00
{
const SwFlyFrm *pFly = FindFlyFrm();
ASSERT( pFly, "OLE not in FlyFrm" );
((SwFEShell*)pShell)->ConnectObj( pOLENd->GetOLEObj().GetObject(), pFly->Prt(), pFly->Frm());
2000-09-18 23:08:29 +00:00
}
// --> OD 2009-03-05 #i99665#
if ( pOLENd->IsChart() &&
pShell->Imp()->GetDrawView()->IsAntiAliasing() )
{
pOut->SetAntialiasing( nFormerAntialiasingAtOutput );
}
// <--
2000-09-18 23:08:29 +00:00
}
}
BOOL SwNoTxtFrm::IsTransparent() const
{
const ViewShell* pSh = GetShell();
if ( !pSh || !pSh->GetViewOptions()->IsGraphic() )
return TRUE;
const SwGrfNode *pNd;
if( 0 != (pNd = GetNode()->GetGrfNode()) )
return pNd->IsTransparent();
//#29381# OLE sind immer Transparent.
return TRUE;
}
void SwNoTxtFrm::StopAnimation( OutputDevice* pOut ) const
{
//animierte Grafiken anhalten
SwGrfNode* pGrfNd = (SwGrfNode*)GetNode()->GetGrfNode();
if( pGrfNd && pGrfNd->IsAnimated() )
pGrfNd->GetGrfObj().StopAnimation( pOut, long(this) );
}
BOOL SwNoTxtFrm::HasAnimation() const
{
const SwGrfNode* pGrfNd = GetNode()->GetGrfNode();
return pGrfNd && pGrfNd->IsAnimated();
}