You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2013/11/07 15:30:09 UTC
svn commit: r1539657 [48/50] - in /openoffice/branches/alg/aw080: ./
ext_sources/ extras/l10n/source/ast/ extras/l10n/source/bg/
extras/l10n/source/cs/ extras/l10n/source/da/ extras/l10n/source/de/
extras/l10n/source/el/ extras/l10n/source/en-GB/ extra...
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/dochdl/swdtflvr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/dochdl/swdtflvr.cxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/dochdl/swdtflvr.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/dochdl/swdtflvr.cxx Thu Nov 7 14:29:41 2013
@@ -87,6 +87,7 @@
#include <IDocumentUndoRedo.hxx>
#include <pagedesc.hxx>
#include <IMark.hxx>
+#include <bookmrk.hxx>
#include <docary.hxx>
#include <section.hxx>
#include <ndtxt.hxx>
@@ -3771,12 +3772,6 @@ sal_Bool SwTrnsfrDdeLink::WriteData( SvS
rStrm.Write( pMem, nLen );
delete[] pMem;
- //if( bDelBookmrk )
- //{
- // // er wird das erstemal abgeholt, also ins Undo mitaufnehmen
- // // aber wie??
- //}
-
IDocumentMarkAccess* const pMarkAccess = pDocShell->GetDoc()->getIDocumentMarkAccess();
IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->findMark(sName);
if(ppMark != pMarkAccess->getMarksEnd()
@@ -3818,17 +3813,17 @@ sal_Bool SwTrnsfrDdeLink::WriteData( SvS
void SwTrnsfrDdeLink::Disconnect( sal_Bool bRemoveDataAdvise )
{
- //JP 29.01.96 Bug 24432:
- // kein DataChanged mehr entgegen nehmen, wenn man
- // sich schon im Disconnet befindet!
- // (DTOR vom Bookmark verschickt einen DataChanged!)
- sal_Bool bOldDisconnect = bInDisconnect;
- bInDisconnect = sal_True;
+ //JP 29.01.96 Bug 24432:
+ // kein DataChanged mehr entgegen nehmen, wenn man
+ // sich schon im Disconnet befindet!
+ // (DTOR vom Bookmark verschickt einen DataChanged!)
+ const sal_Bool bOldDisconnect = bInDisconnect;
+ bInDisconnect = sal_True;
- // den nicht verwendeten Bookmark wieder zerstoeren (ohne Undo!)?
- if( bDelBookmrk && refObj.Is() && FindDocShell() )
- {
- SwDoc* pDoc = pDocShell->GetDoc();
+ // den nicht verwendeten Bookmark wieder zerstoeren (ohne Undo!)?
+ if( bDelBookmrk && refObj.Is() && FindDocShell() )
+ {
+ SwDoc* pDoc = pDocShell->GetDoc();
::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
// --> OD, CD, OS 2005-11-25 #i58448#
@@ -3838,30 +3833,37 @@ void SwTrnsfrDdeLink::Disconnect( sal_Bo
sal_Bool bIsModified = pDoc->IsModified();
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
- pMarkAccess->deleteMark(pMarkAccess->findMark(sName));
+ // check, if DdeBookmark is already in its desctruction
+ IDocumentMarkAccess::const_iterator_t ppMark = pMarkAccess->findMark(sName);
+ if ( ppMark != pMarkAccess->getMarksEnd() )
+ {
+ ::sw::mark::DdeBookmark* const pDdeBookmark = dynamic_cast< ::sw::mark::DdeBookmark* >(ppMark->get());
+ if ( pDdeBookmark && !pDdeBookmark->IsInDestruction() )
+ {
+ pMarkAccess->deleteMark(ppMark);
+ }
+ }
- if( !bIsModified )
- pDoc->ResetModified();
- // --> OD, CD, OS 2005-11-25 #i58448#
+ if( !bIsModified )
+ pDoc->ResetModified();
pDoc->SetOle2Link( aSavedOle2Link );
- // <--
- bDelBookmrk = sal_False;
- }
+ bDelBookmrk = sal_False;
+ }
- if( refObj.Is() )
- {
- refObj->SetUpdateTimeout( nOldTimeOut );
- refObj->RemoveConnectAdvise( this );
- if( bRemoveDataAdvise )
- // in einem DataChanged darf das SelectionObject NIE geloescht
- // werden; wird schon von der Basisklasse erledigt
- // (ADVISEMODE_ONLYONCE!!!!)
- // Im normalen Disconnet aber schon!
- refObj->RemoveAllDataAdvise( this );
- refObj.Clear();
- }
- bInDisconnect = bOldDisconnect;
+ if( refObj.Is() )
+ {
+ refObj->SetUpdateTimeout( nOldTimeOut );
+ refObj->RemoveConnectAdvise( this );
+ if( bRemoveDataAdvise )
+ // in einem DataChanged darf das SelectionObject NIE geloescht
+ // werden; wird schon von der Basisklasse erledigt
+ // (ADVISEMODE_ONLYONCE!!!!)
+ // Im normalen Disconnet aber schon!
+ refObj->RemoveAllDataAdvise( this );
+ refObj.Clear();
+ }
+ bInDisconnect = bOldDisconnect;
}
// -----------------------------------------------------------------------
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/docvw/AnchorOverlayObject.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/docvw/AnchorOverlayObject.cxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/docvw/AnchorOverlayObject.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/docvw/AnchorOverlayObject.cxx Thu Nov 7 14:29:41 2013
@@ -54,7 +54,7 @@ private:
basegfx::BColor maColor;
// discrete line width
- double mfLogicLineWidth;
+ double mfDiscreteLineWidth;
// bitfield
bool mbShadow : 1;
@@ -70,7 +70,7 @@ public:
const basegfx::B2DPolygon& rLineTop,
AnchorState aAnchorState,
const basegfx::BColor& rColor,
- double fLogicLineWidth,
+ double fDiscreteLineWidth,
bool bShadow,
bool bLineSolid )
: drawinglayer::primitive2d::DiscreteMetricDependentPrimitive2D(),
@@ -79,7 +79,7 @@ public:
maLineTop(rLineTop),
maAnchorState(aAnchorState),
maColor(rColor),
- mfLogicLineWidth(fLogicLineWidth),
+ mfDiscreteLineWidth(fDiscreteLineWidth),
mbShadow(bShadow),
mbLineSolid(bLineSolid)
{}
@@ -90,7 +90,7 @@ public:
const basegfx::B2DPolygon& getLineTop() const { return maLineTop; }
AnchorState getAnchorState() const { return maAnchorState; }
const basegfx::BColor& getColor() const { return maColor; }
- double getLogicLineWidth() const { return mfLogicLineWidth; }
+ double getDiscreteLineWidth() const { return mfDiscreteLineWidth; }
bool getShadow() const { return mbShadow; }
bool getLineSolid() const { return mbLineSolid; }
@@ -115,14 +115,15 @@ drawinglayer::primitive2d::Primitive2DSe
drawinglayer::primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, aTriangle);
}
+ // prepare view-independent LineWidth and color
+ const drawinglayer::attribute::LineAttribute aLineAttribute(
+ getColor(),
+ getDiscreteLineWidth() * getDiscreteUnit());
+
if ( AS_ALL == maAnchorState ||
AS_START == maAnchorState )
{
// create line start
- const drawinglayer::attribute::LineAttribute aLineAttribute(
- getColor(),
- getLogicLineWidth() / (basegfx::fTools::equalZero(getDiscreteUnit()) ? 1.0 : getDiscreteUnit()));
-
if(getLineSolid())
{
const drawinglayer::primitive2d::Primitive2DReference aSolidLine(
@@ -201,10 +202,6 @@ drawinglayer::primitive2d::Primitive2DSe
{
// LineTop has to be created, too, but uses no shadow, so add after
// the other parts are created
- const drawinglayer::attribute::LineAttribute aLineAttribute(
- getColor(),
- getLogicLineWidth() / (basegfx::fTools::equalZero(getDiscreteUnit()) ? 1.0 : getDiscreteUnit()));
-
const drawinglayer::primitive2d::Primitive2DReference aLineTop(
new drawinglayer::primitive2d::PolygonStrokePrimitive2D(
getLineTop(),
@@ -335,13 +332,14 @@ drawinglayer::primitive2d::Primitive2DSe
{
implEnsureGeometry();
+ static double aDiscreteLineWidth(1.6);
const drawinglayer::primitive2d::Primitive2DReference aReference(
new AnchorPrimitive( maTriangle,
maLine,
maLineTop,
GetAnchorState(),
getBaseColor().getBColor(),
- ANCHORLINE_WIDTH * 15.0,
+ ANCHORLINE_WIDTH * aDiscreteLineWidth,
getShadowedEffect(),
getLineSolid()) );
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/docvw/AnnotationWin.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/docvw/AnnotationWin.cxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/docvw/AnnotationWin.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/docvw/AnnotationWin.cxx Thu Nov 7 14:29:41 2013
@@ -68,7 +68,7 @@ SwAnnotationWin::SwAnnotationWin( SwEdit
SwFmtFld* aField )
: SwSidebarWin( rEditWin, nBits, aMgr, aBits, rSidebarItem )
, mpFmtFld(aField)
- , mpFld( static_cast<SwPostItField*>(aField->GetFld()))
+ , mpFld( static_cast<SwPostItField*>(aField->GetField()))
, mpButtonPopup(0)
{
}
@@ -83,7 +83,7 @@ void SwAnnotationWin::SetPostItText()
// get text from SwPostItField and insert into our textview
Engine()->SetModifyHdl( Link() );
Engine()->EnableUndo( sal_False );
- mpFld = static_cast<SwPostItField*>(mpFmtFld->GetFld());
+ mpFld = static_cast<SwPostItField*>(mpFmtFld->GetField());
if( mpFld->GetTextObject() )
Engine()->SetText( *mpFld->GetTextObject() );
else
@@ -162,7 +162,7 @@ bool SwAnnotationWin::CalcFollow()
aPosition.nContent = *pTxtFld->GetStart();
SwTxtAttr * const pTxtAttr = pTxtFld->GetTxtNode().GetTxtAttrForCharAt(
aPosition.nContent.GetIndex() - 1, RES_TXTATR_FIELD );
- const SwField* pFld = pTxtAttr ? pTxtAttr->GetFld().GetFld() : 0;
+ const SwField* pFld = pTxtAttr ? pTxtAttr->GetFmtFld().GetField() : 0;
return pFld && (pFld->Which()== RES_POSTITFLD);
}
@@ -178,7 +178,7 @@ sal_uInt32 SwAnnotationWin::CountFollowi
aPosition.nContent.GetIndex() + 1,
RES_TXTATR_FIELD );
SwField* pFld = pTxtAttr
- ? const_cast<SwField*>(pTxtAttr->GetFld().GetFld())
+ ? const_cast<SwField*>(pTxtAttr->GetFmtFld().GetField())
: 0;
while ( pFld && ( pFld->Which()== RES_POSTITFLD ) )
{
@@ -187,7 +187,7 @@ sal_uInt32 SwAnnotationWin::CountFollowi
aPosition.nContent.GetIndex() + aCount,
RES_TXTATR_FIELD );
pFld = pTxtAttr
- ? const_cast<SwField*>(pTxtAttr->GetFld().GetFld())
+ ? const_cast<SwField*>(pTxtAttr->GetFmtFld().GetField())
: 0;
}
return aCount - 1;
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/docvw/PostItMgr.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/docvw/PostItMgr.cxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/docvw/PostItMgr.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/docvw/PostItMgr.cxx Thu Nov 7 14:29:41 2013
@@ -425,7 +425,7 @@ void SwPostItMgr::Notify( SfxBroadcaster
{
if ((*i)->pPostIt)
{
- sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( (*i)->GetFmtFld()->GetFld()->GetLanguage() );
+ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( (*i)->GetFmtFld()->GetField()->GetLanguage() );
sal_uInt16 nLangWhichId = 0;
switch (nScriptType)
{
@@ -433,7 +433,7 @@ void SwPostItMgr::Notify( SfxBroadcaster
case SCRIPTTYPE_ASIAN : nLangWhichId = EE_CHAR_LANGUAGE_CJK; break;
case SCRIPTTYPE_COMPLEX : nLangWhichId = EE_CHAR_LANGUAGE_CTL; break;
}
- (*i)->pPostIt->SetLanguage( SvxLanguageItem((*i)->GetFmtFld()->GetFld()->GetLanguage(),
+ (*i)->pPostIt->SetLanguage( SvxLanguageItem((*i)->GetFmtFld()->GetField()->GetLanguage(),
nLangWhichId) );
}
break;
@@ -1395,7 +1395,7 @@ sw::annotation::SwAnnotationWin* SwPostI
{
for(const_iterator i = mvPostItFlds.begin(); i!= mvPostItFlds.end() ; i++)
{
- if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetFld() == pFld))
+ if ( (*i)->GetFmtFld() && ((*i)->GetFmtFld()->GetField() == pFld))
return dynamic_cast<sw::annotation::SwAnnotationWin*>((*i)->pPostIt);
}
return NULL;
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/docvw/edtwin.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/docvw/edtwin.cxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/docvw/edtwin.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/docvw/edtwin.cxx Thu Nov 7 14:29:41 2013
@@ -111,17 +111,14 @@
#include <checkit.hxx>
#include <helpid.h>
#include <cmdid.h>
-#ifndef _DOCVW_HRC
#include <docvw.hrc>
-#endif
#include <uitool.hxx>
-// OD 18.09.2003 #i18732#
#include <fmtfollowtextflow.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <charfmt.hxx>
#include <numrule.hxx>
#include <pagedesc.hxx>
-#include <svtools/ruler.hxx> // #i23726#
+#include <svtools/ruler.hxx>
#include "formatclipboard.hxx"
#include <vos/mutex.hxx>
#include <vcl/svapp.hxx>
@@ -179,9 +176,7 @@ private:
SdrHdl* mpHdl;
basegfx::B2DPoint maHdlPos;
basegfx::B2DPoint maLastPos;
- // --> OD 2010-09-16 #i114522#
bool bTopRightHandle;
- // <--
public:
SwAnchorMarker( SdrHdl& rH )
: mpHdl( &rH ),
@@ -196,8 +191,15 @@ public:
void SetPos( const basegfx::B2DPoint& rNew ) { mpHdl->setPosition( rNew ); }
const basegfx::B2DPoint& GetPos() { return mpHdl->getPosition(); }
const basegfx::B2DPoint& GetHdlPos() { return maHdlPos; }
- void ChgHdl( SdrHdl& rNew ) { mpHdl = &rNew; }
- void SetSelected(bool bSelected) { mpHdl->SetSelected(bSelected); }
+ void ChgHdl( SdrHdl& rNew )
+ {
+ mpHdl = &rNew;
+ bTopRightHandle = (rNew.GetKind() == HDL_ANCHOR_TR);
+ }
+ void SetSelected(bool bSelected)
+ {
+ mpHdl->SetSelected(bSelected);
+ }
// --> OD 2010-09-16 #i114522#
const basegfx::B2DPoint GetPosForHitTest( const OutputDevice& rOut )
@@ -217,7 +219,6 @@ public:
return aHitTestPos;
}
- // <--
};
struct QuickHelpData
@@ -307,7 +308,6 @@ void SwEditWin::UpdatePointer(const Poin
delete pUserMarker;
pUserMarker = 0L;
}
-// rSh.SwCrsrShell::UnSetVisCrsr( rLPt );
eStyle = POINTER_NOTALLOWED;
}
else
@@ -625,11 +625,7 @@ void SwEditWin::JustifyAreaTimer()
nDiff = Max(
Max( aMovePos.Y() - rVisArea.Bottom(), rVisArea.Top() - aMovePos.Y() ),
Max( aMovePos.X() - rVisArea.Right(), rVisArea.Left() - aMovePos.X()));
-#ifdef TEST_FOR_BUG91313
aTimer.SetTimeout( Max( coMinLen, nTimeout - nDiff) );
-#else
- aTimer.SetTimeout( Max( coMinLen, nTimeout - nDiff*2L) );
-#endif
}
void SwEditWin::LeaveArea(const Point &rPos)
@@ -665,9 +661,6 @@ void SwEditWin::StdDrawMode( SdrObjKind
{
setSdrObjectCreationInfo(SdrObjectCreationInfo(eSdrObjectKind));
-/* if (GetDrawFuncPtr())
- GetDrawFuncPtr()->Deactivate();*/
-
if (bObjSelect)
rView.SetDrawFuncPtr(new DrawSelection( &rView.GetWrtShell(), this, &rView ));
else
@@ -1005,13 +998,10 @@ void SwEditWin::ChangeFly( sal_uInt8 nDi
SwRect aBoundRect;
Point aRefPoint;
- // OD 18.09.2003 #i18732# - adjustment for allowing vertical position
- // aligned to page for fly frame anchored to paragraph or to character.
{
SwFmtVertOrient aVert( (SwFmtVertOrient&)aSet.Get(RES_VERT_ORIENT) );
const bool bFollowTextFlow =
static_cast<const SwFmtFollowTextFlow&>(aSet.Get(RES_FOLLOW_TEXT_FLOW)).GetValue();
- // OD 12.11.2003 #i22341# - additional provide content position
const SwPosition* pToCharCntntPos = ((SwFmtAnchor&)aSet.Get(RES_ANCHOR)).GetCntntAnchor();
rSh.CalcBoundRect( aBoundRect, eAnchorId,
text::RelOrientation::FRAME, aVert.GetRelationOrient(),
@@ -1150,11 +1140,8 @@ void SwEditWin::ChangeFly( sal_uInt8 nDi
---------------------------------------------------------------------------*/
void SwEditWin::ChangeDrawing( sal_uInt8 nDir )
{
- // --> OD 2005-01-31 #i40845# - start undo action in order to get only one
- // undo action for this change.
SwWrtShell &rSh = rView.GetWrtShell();
rSh.StartUndo();
- // <--
long nX = 0;
long nY = 0;
@@ -1230,8 +1217,6 @@ void SwEditWin::ChangeDrawing( sal_uInt8
// if the object's position is not protected
if(0 == (nProtect&FLYPROTECT_POS))
{
- // --> FME 2005-04-26 #i47138#
- // Check if object is anchored as character and move direction
sal_Bool bDummy1, bDummy2;
const bool bVertAnchor = rSh.IsFrmVertical( sal_True, bDummy1, bDummy2 );
const bool bHoriMove = !bVertAnchor == !( nDir % 2 );
@@ -1239,7 +1224,6 @@ void SwEditWin::ChangeDrawing( sal_uInt8
!bHoriMove || (rSh.GetAnchorId() != FLY_AS_CHAR);
if ( bMoveAllowed )
{
- // <--
pSdrView->MoveMarkedObj(basegfx::B2DVector(nX, nY));
rSh.SetModified();
}
@@ -1269,9 +1253,7 @@ void SwEditWin::ChangeDrawing( sal_uInt8
rSh.EndAllAction();
}
- // --> OD 2005-01-31 #i40845# - end undo action
rSh.EndUndo();
- // <--
}
/*--------------------------------------------------------------------
@@ -1514,13 +1496,11 @@ void SwEditWin::KeyInput(const KeyEvent
eNextKeyState = KS_Ende;
sal_uInt8 nDir = 0;
- // -> #i23725#
if (nKS_NUMDOWN_Count > 0)
nKS_NUMDOWN_Count--;
if (nKS_NUMINDENTINC_Count > 0)
nKS_NUMINDENTINC_Count--;
- // <- #i23725#
while( KS_Ende != eKeyState )
{
@@ -1627,13 +1607,6 @@ void SwEditWin::KeyInput(const KeyEvent
nDir = MOVE_DOWN_SMALL;
goto KEYINPUT_CHECKTABLE;
-// case KEY_UP | KEY_MOD2 | KEY_SHIFT:
-// eKeyState = KS_ColTopBig;
-// goto KEYINPUT_CHECKTABLE;
-// case KEY_DOWN | KEY_MOD2 | KEY_SHIFT:
-// eKeyState = KS_ColTopSmall;
-// goto KEYINPUT_CHECKTABLE;
-
case KEY_UP | KEY_MOD2 | KEY_MOD1:
eKeyState = KS_CellBottomSmall;
goto KEYINPUT_CHECKTABLE;
@@ -1674,8 +1647,10 @@ KEYINPUT_CHECKTABLE:
case KEY_UP | KEY_SHIFT:
case KEY_DOWN | KEY_SHIFT:
{
- if ( pFlyFmt
- || ( (rSh.GetSelectionType() & (nsSelectionType::SEL_DRW|nsSelectionType::SEL_DRW_FORM))
+ const int nSelectionType = rSh.GetSelectionType();
+ if ( ( pFlyFmt
+ && ( nSelectionType & (nsSelectionType::SEL_FRM|nsSelectionType::SEL_OLE|nsSelectionType::SEL_GRF) ) )
+ || ( ( nSelectionType & (nsSelectionType::SEL_DRW|nsSelectionType::SEL_DRW_FORM) )
&& rSh.GetDrawView()->areSdrObjectsSelected() ) )
{
eKeyState = pFlyFmt ? KS_Fly_Change : KS_Draw_Change;
@@ -1708,7 +1683,6 @@ KEYINPUT_CHECKTABLE:
nTblChgSize = pModOpt->GetTblVInsert();
}
goto KEYINPUT_CHECKTABLE_INSDEL;
-// case KEY_RIGHT:
case KEY_RIGHT | KEY_MOD1:
{
eTblChgMode = nsTblChgWidthHeightType::WH_FLAG_INSDEL | nsTblChgWidthHeightType::WH_CELL_RIGHT;
@@ -1850,13 +1824,10 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KEY_BACKSPACE | KEY_SHIFT:
if( !rSh.HasReadonlySel() )
{
- // #i23725#
sal_Bool bDone = sal_False;
- // --> OD 2006-01-31 - try to add comment for code snip:
// Remove the paragraph indent, if the cursor is at the
// beginning of a paragraph, there is no selection
// and no numbering rule found at the current paragraph
- // --> OD 2006-01-31 #b6341339#, #i58776#
// Also try to remove indent, if current paragraph
// has numbering rule, but isn't counted and only
// key <backspace> is hit.
@@ -1869,9 +1840,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
bDone = rSh.TryRemoveIndent();
}
- // <--
- // -> #i23725#
if (bDone)
eKeyState = KS_Ende;
else
@@ -1893,10 +1862,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
bDone = sal_True;
}
}
- // <- #i23725#
- // --> OD 2006-01-31 #b6341339#, #i58776#
- // --> OD 2006-04-21 #i63540#
- // revise fix for issues b6341339 and i58776:
// If the cursor is in an empty paragraph, which has
// a numbering, but not the oultine numbering, and
// there is no selection, the numbering has to be
@@ -1965,11 +1930,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
!rSh.HasReadonlySel() )
{
- // --> OD 2007-10-02 #b660435#
-// if (rSh.IsFirstOfNumRule()) // #i23725#
if ( rSh.IsFirstOfNumRule() &&
numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() )
- // <--
eKeyState = KS_NumIndentInc;
else
eKeyState = KS_NumDown;
@@ -2020,11 +1982,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
else if( rSh.GetCurNumRule() && rSh.IsSttOfPara() &&
!rSh.HasReadonlySel() )
{
- // --> OD 2007-10-02 #b660435#
-// if (rSh.IsFirstOfNumRule()) // #i23725#
if ( rSh.IsFirstOfNumRule() &&
numfunc::ChangeIndentOnTabAtFirstPosOfFirstListItem() )
- // <--
eKeyState = KS_NumIndentDec;
else
eKeyState = KS_NumUp;
@@ -2275,7 +2234,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KS_InsTab:
if( dynamic_cast< const SwWebView* >(&rView)) //Kein Tabulator fuer Web!
{
- // Bug 56196 - dann sollte der weiter gereicht werden.
Window::KeyInput( aKeyEvent );
eKeyState = KS_Ende;
break;
@@ -2293,23 +2251,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
if(pFieldmark)
{
pFieldmark->SetChecked(!pFieldmark->IsChecked());
- SwDocShell* pDocSh = rView.GetDocShell();
- SwDoc *pDoc=pDocSh->GetDoc();
OSL_ENSURE(pFieldmark->IsExpanded(),
"where is the otherpos?");
if (pFieldmark->IsExpanded())
{
- SwPaM aPaM(pFieldmark->GetMarkPos(), pFieldmark->GetOtherMarkPos());
- if(0)
- {
- rSh.StartAllAction(); //$flr TODO: understand why this not works
- pDoc->SetModified(aPaM);
- rSh.EndAllAction();
- }
- else
- {
- rSh.CalcLayout(); // workaround
- }
+ rSh.CalcLayout();
}
}
eKeyState = KS_Ende;
@@ -2367,7 +2313,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
else
{
InfoBox( this, SW_RES( MSG_READONLY_CONTENT )).Execute();
- // ??? Window::KeyInput( aKeyEvent );
eKeyState = KS_Ende;
}
break;
@@ -2375,17 +2320,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KS_CheckAutoCorrect:
{
if( pACorr && pACfg->IsAutoFmtByInput() &&
- pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd |
- ChgOrdinalNumber |
- ChgToEnEmDash | SetINetAttr |
- Autocorrect ) &&
- !rSh.HasReadonlySel() )
- /* {
pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd |
- ChgFractionSymbol | ChgOrdinalNumber |
+ ChgOrdinalNumber |
ChgToEnEmDash | SetINetAttr |
Autocorrect ) &&
- !rSh.HasReadonlySel() ) */
+ !rSh.HasReadonlySel() )
{
FlushInBuffer();
rSh.AutoCorrect( *pACorr, static_cast< sal_Unicode >('\0') );
@@ -2398,8 +2337,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
{
sal_uInt16 nSlotId = 0;
FlushInBuffer();
-//??? if( bFlushCharBuffer )
-//??? FlushInBuffer( &rSh );
switch( eKeyState )
{
case KS_SpecialInsert:
@@ -2426,11 +2363,8 @@ KEYINPUT_CHECKTABLE_INSDEL:
rSh.NumUpDown( sal_False );
break;
- // -> #i23726#
case KS_NumIndentInc:
- // --> OD 2008-06-16 #i90078#
rSh.ChangeIndentOfAllListLevels(360);
- // <--
nKS_NUMINDENTINC_Count = 2;
break;
@@ -2449,11 +2383,9 @@ KEYINPUT_CHECKTABLE_INSDEL:
break;
case KS_NumIndentDec:
- // --> OD 2008-06-16 #i90078#
rSh.ChangeIndentOfAllListLevels(-360);
// <--
break;
- // <- #i23726#
case KS_OutlineDown:
rSh.OutlineUpDown( 1 );
@@ -2475,8 +2407,6 @@ KEYINPUT_CHECKTABLE_INSDEL:
rSh.SplitNode( sal_True );
break;
-// case KS_NumOrNoNum:
-// break;
case KS_NextObject:
case KS_PrevObject:
if(rSh.GotoObj( KS_NextObject == eKeyState, GOTOOBJ_GOTO_ANY))
@@ -2546,9 +2476,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KS_ColRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break;
case KS_ColLeftSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_LEFT, pModOpt->GetTblHMove() ); break;
case KS_ColRightSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_COL_RIGHT, pModOpt->GetTblHMove() ); break;
-// case KS_ColTopBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_TOP|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break;
case KS_ColBottomBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblVMove() ); break;
-// case KS_ColTopSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_TOP, pModOpt->GetTblVMove() ); break;
case KS_ColBottomSmall: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_ROW_BOTTOM, pModOpt->GetTblVMove() ); break;
case KS_CellLeftBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_LEFT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break;
case KS_CellRightBig: rSh.SetColRowWidthHeight( nsTblChgWidthHeightType::WH_CELL_RIGHT|nsTblChgWidthHeightType::WH_FLAG_BIGGER, pModOpt->GetTblHMove() ); break;
@@ -2741,7 +2669,7 @@ void SwEditWin::MouseButtonDown(const Mo
0 != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPos ) ) &&
!rSh.IsObjSelectable(aB2DDocPos) )
{
- // --> FME 2004-07-30 #i32329# Enhanced table selection
+ // Enhanced table selection
if ( SW_TABSEL_HORI <= nMouseTabCol && SW_TABCOLSEL_VERT >= nMouseTabCol )
{
rSh.EnterStdMode();
@@ -2757,7 +2685,6 @@ void SwEditWin::MouseButtonDown(const Mo
}
return;
}
- // <--
if ( !rSh.IsTableMode() )
{
@@ -2786,7 +2713,6 @@ void SwEditWin::MouseButtonDown(const Mo
}
}
}
- // #i23726#
else if (bTmp &&
rSh.IsNumLabel(aDocPos))
{
@@ -2796,10 +2722,8 @@ void SwEditWin::MouseButtonDown(const Mo
SfxBindings& rBind = rView.GetViewFrame()->GetBindings();
rBind.Update();
- // --> OD 2005-02-21 #i42921#
if ( RulerMarginDrag( rMEvt,
rSh.IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPos ) ) )
- // <--
{
rView.SetNumRuleNodeFromDoc( NULL );
rView.InvalidateRulerPos();
@@ -2808,11 +2732,9 @@ void SwEditWin::MouseButtonDown(const Mo
}
else
{
- // --> FME 2005-11-03 #125036# Make sure the pointer is set to 0,
- // otherwise it may point to nowhere after deleting the corresponding
- // text node.
+ // Make sure the pointer is set to 0, otherwise it may point to
+ // nowhere after deleting the corresponding text node.
rView.SetNumRuleNodeFromDoc( NULL );
- // <--
return;
}
}
@@ -2853,7 +2775,7 @@ void SwEditWin::MouseButtonDown(const Mo
( pHdl->GetKind() == HDL_ANCHOR ||
pHdl->GetKind() == HDL_ANCHOR_TR ) )
{
- // #121463# Set selected during drag
+ // Set selected during drag
pHdl->SetSelected(true);
pAnchorMarker = new SwAnchorMarker( *pHdl );
UpdatePointer( aDocPos, rMEvt.GetModifier() );
@@ -2912,11 +2834,10 @@ void SwEditWin::MouseButtonDown(const Mo
bExecHyperlinks = sal_True;
}
- // --> FME 2004-07-30 #i32329# Enhanced selection
+ // Enhanced selection
sal_uInt8 nNumberOfClicks = static_cast< sal_uInt8 >(rMEvt.GetClicks() % 4);
if ( 0 == nNumberOfClicks && 0 < rMEvt.GetClicks() )
nNumberOfClicks = 4;
- // <--
sal_Bool bExecDrawTextLink = sal_False;
@@ -2949,7 +2870,6 @@ void SwEditWin::MouseButtonDown(const Mo
!GetView().GetViewFrame()->GetDispatcher()->IsLocked() &&
!bExecDrawTextLink)
{
- // #107513#
// Test if there is a draw object at that position and if it should be selected.
sal_Bool bShould = rSh.ShouldObjectBeSelected(aDocPos);
@@ -3187,12 +3107,11 @@ void SwEditWin::MouseButtonDown(const Mo
if ( bMod )
rSh.EnterAddMode();
- // --> FME 2004-07-30 #i32329# Enhanced selection
+ // Enhanced selection
if ( 3 == nNumberOfClicks )
rSh.SelSentence( &aDocPos );
else
rSh.SelPara( &aDocPos );
- // <--
if ( bMod )
rSh.LeaveAddMode();
@@ -3436,13 +3355,11 @@ void SwEditWin::MouseButtonDown(const Mo
if ( !bOverURLGrf && !bOnlyText )
{
const int nSelType = rSh.GetSelectionType();
- // --> OD 2009-12-30 #i89920#
// Check in general, if an object is selectable at given position.
// Thus, also text fly frames in background become selectable via Ctrl-Click.
if ( nSelType & nsSelectionType::SEL_OLE ||
nSelType & nsSelectionType::SEL_GRF ||
rSh.IsObjSelectable(aB2DDocPos) )
- // <--
{
MV_KONTEXT( &rSh );
if( !rSh.IsFrmSelected() )
@@ -3451,11 +3368,6 @@ void SwEditWin::MouseButtonDown(const Mo
bCallBase = sal_False;
}
}
- // nicht mehr hier zuruecksetzen, damit -- falls durch MouseMove
- // bei gedrueckter Ctrl-Taste eine Mehrfachselektion erfolgen soll,
- // im Drag nicht die vorherige Selektion aufgehoben wird.
-// if(bModePushed)
-// rSh.PopMode(sal_False);
break;
}
}
@@ -3521,20 +3433,7 @@ void SwEditWin::MouseMove(const MouseEve
}
const Point aOldPt( rSh.VisArea().Pos() );
-#ifdef TEST_FOR_BUG91313
- // n Pixel as FUZZY border
- SwRect aVis( rSh.VisArea() );
- Size aFuzzySz( 2, 2 );
- aFuzzySz = PixelToLogic( aFuzzySz );
-
- aVis.Top( aVis.Top() + aFuzzySz.Height() );
- aVis.Bottom( aVis.Bottom() - aFuzzySz.Height() );
- aVis.Left( aVis.Left() + aFuzzySz.Width() );
- aVis.Right( aVis.Right() - aFuzzySz.Width() );
- const sal_Bool bInsWin = aVis.IsInside( aDocPt );
-#else
const sal_Bool bInsWin = rSh.VisArea().IsInside( aDocPt );
-#endif
if( pShadCrsr && !bInsWin )
delete pShadCrsr, pShadCrsr = 0;
@@ -3615,7 +3514,7 @@ void SwEditWin::MouseMove(const MouseEve
nPointer = POINTER_HSIZEBAR;
bChkTblSel = true;
break;
- // --> FME 2004-07-30 #i20126# Enhanced table selection
+ // Enhanced table selection
case SW_TABSEL_HORI :
nPointer = POINTER_TAB_SELECT_SE;
break;
@@ -3634,31 +3533,25 @@ void SwEditWin::MouseMove(const MouseEve
case SW_TABCOLSEL_VERT :
nPointer = POINTER_TAB_SELECT_W;
break;
- // <--
}
if ( USHRT_MAX != nPointer &&
- // --> FME 2004-10-20 #i35543#
// Enhanced table selection is explicitely allowed in table mode
( !bChkTblSel || !rSh.IsTableMode() ) )
- // <--
{
SetPointer( nPointer );
}
return;
}
- // #i23726#
else if (rSh.IsNumLabel(aDocPt, RULER_MOUSE_MARGINWIDTH))
{
- // --> OD 2005-02-21 #i42921# - consider vertical mode
SwTxtNode* pNodeAtPos = rSh.GetNumRuleNodeAtPos( aDocPt );
const sal_uInt16 nPointer =
rSh.IsVerticalModeAtNdAndPos( *pNodeAtPos, aDocPt )
? POINTER_VSIZEBAR
: POINTER_HSIZEBAR;
SetPointer( nPointer );
- // <--
return;
}
@@ -3682,7 +3575,6 @@ void SwEditWin::MouseMove(const MouseEve
// is destroyed, it will find a new one at position GetHdlPos().
// --> OD 2010-09-16 #i114522#
const basegfx::B2DPoint aOld(pAnchorMarker->GetPosForHitTest(*(rSh.GetOut())));
- // <--
Point aNew = rSh.FindAnchorPos( aDocPt );
SdrHdl* pHdl;
if( (0!=( pHdl = pSdrView->PickHandle( aOld ) )||
@@ -3756,9 +3648,6 @@ void SwEditWin::MouseMove(const MouseEve
if( 0 != ( pFlyFmt = rSh.GetFlyFrmFmt() ) &&
0 != ( pMacro = pFlyFmt->GetMacro().GetMacroTable().
Get( nEvent )) &&
-// oder nur z.B. alle 20 Twip bescheid sagen?
-// ( 20 > Abs( aRszMvHdlPt.X() - aDocPt.X() ) ||
-// 20 > Abs( aRszMvHdlPt.Y() - aDocPt.Y() ) )
aRszMvHdlPt != aDocPt )
{
aRszMvHdlPt = aDocPt;
@@ -4016,10 +3905,6 @@ void SwEditWin::MouseButtonUp(const Mous
//MouseButtonUp nur bearbeiten, wenn auch das Down an dieses Fenster ging.
if ( !bMBPressed )
{
-// OS 25.02.97 Undo fuer die Giesskann ist bereits im CommandHdl
-//JP 29.09.95: so sollte es sein!!! if(pApplyTempl->bUndo)
-// if( pApplyTempl && MOUSE_RIGHT == rMEvt.GetModifier() + rMEvt.GetButtons() )
-// rSh.Do( SwWrtShell::UNDO );
return;
}
@@ -4294,8 +4179,6 @@ void SwEditWin::MouseButtonUp(const Mous
if ( aCntntAtPos.aFnd.pFldmark != NULL)
{
IFieldmark *fieldBM = const_cast< IFieldmark* > ( aCntntAtPos.aFnd.pFldmark );
- //SwDocShell* pDocSh = rView.GetDocShell();
- //SwDoc *pDoc=pDocSh->GetDoc();
if (fieldBM->GetFieldname( ).equalsAscii( ODF_FORMCHECKBOX ) )
{
ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(fieldBM);
@@ -4509,11 +4392,9 @@ void SwEditWin::MouseButtonUp(const Mous
case SFX_STYLE_FAMILY_PSEUDO:
if( !rSh.HasReadonlySel() )
{
- // --> OD 2008-03-17 #refactorlists#
rSh.SetCurNumRule( *pApplyTempl->aColl.pNumRule,
false,
pApplyTempl->aColl.pNumRule->GetDefaultListId() );
- // <--
bCallBase = sal_False;
pApplyTempl->bUndo = sal_True;
if( pApplyTempl->aColl.pNumRule )
@@ -4638,8 +4519,8 @@ SwEditWin::SwEditWin(Window *pParent, Sw
bLockInput(sal_False),
bObjectSelect( sal_False ),
- nKS_NUMDOWN_Count(0), // #i23725#
- nKS_NUMINDENTINC_Count(0) // #i23725#
+ nKS_NUMDOWN_Count(0),
+ nKS_NUMINDENTINC_Count(0)
{
SetHelpId(HID_EDIT_WIN);
EnableChildTransparentMode();
@@ -4731,7 +4612,6 @@ sal_Bool SwEditWin::EnterDrawMode(const
SwWrtShell &rSh = rView.GetWrtShell();
SdrView *pSdrView = rSh.GetDrawView();
-// if ( GetDrawFuncPtr() && (aActHitType == SDRHIT_NONE || rSh.IsDrawCreate()) )
if ( rView.GetDrawFuncPtr() )
{
if (rSh.IsDrawCreate())
@@ -5270,19 +5150,16 @@ sal_Bool SwEditWin::SelectMenuPosition(S
{
sal_Bool bRet = sal_False;
const Point aDocPos( PixelToLogic( rMousePos ) );
- const basegfx::B2DPoint aB2DDocPos(aDocPos.X(), aDocPos.Y());
- // --> OD 2005-02-17 #i42258#
+ const basegfx::B2DPoint aB2DDocPos(aDocPos.X(), aDocPos.Y());
const bool bIsInsideSelectedObj( rSh.IsInsideSelectedObj( aB2DDocPos ) );
- // <--
//create a synthetic mouse event out of the coordinates
MouseEvent aMEvt(rMousePos);
SdrView *pSdrView = rSh.GetDrawView();
if ( pSdrView )
{
- // --> OD 2005-02-17 #i42258# - no close of insert_draw and reset of
- // draw mode, if context menu position is inside a selected object.
+ // no close of insert_draw and reset of draw mode,
+ // if context menu position is inside a selected object.
if ( !bIsInsideSelectedObj && rView.GetDrawFuncPtr() )
- // <--
{
rView.GetDrawFuncPtr()->Deactivate();
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/fldui/fldpage.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/fldui/fldpage.cxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/fldui/fldpage.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/fldui/fldpage.cxx Thu Nov 7 14:29:41 2013
@@ -250,7 +250,7 @@ sal_Bool SwFldPage::InsertFld(sal_uInt16
for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
{
- if( pFmtFld->GetFld() == m_pCurFld)
+ if( pFmtFld->GetField() == m_pCurFld)
{
pFmtFld->RegisterToFieldType(*pTyp);
pTmpFld->ChgTyp(pTyp);
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/shells/textfld.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/shells/textfld.cxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/shells/textfld.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/shells/textfld.cxx Thu Nov 7 14:29:41 2013
@@ -375,7 +375,7 @@ void SwTextShell::ExecField(SfxRequest &
SwFmtFld* pSwFmtFld = aIter.First();
while( pSwFmtFld )
{
- if ( pSwFmtFld->GetFld() == pPostIt )
+ if ( pSwFmtFld->GetField() == pPostIt )
{
pSwFmtFld->Broadcast( SwFmtFldHint( 0, SWFMTFLD_FOCUS, &GetView() ) );
break;
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/uno/unotxdoc.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/uno/unotxdoc.cxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/uno/unotxdoc.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/uno/unotxdoc.cxx Thu Nov 7 14:29:41 2013
@@ -623,8 +623,16 @@ void SwXTextDocument::dispose(void) thro
-----------------------------------------------------------------------*/
void SwXTextDocument::close( sal_Bool bDeliverOwnership ) throw( util::CloseVetoException, RuntimeException )
{
- if(IsValid() && m_pHiddenViewFrame)
+ if ( IsValid() && m_pHiddenViewFrame )
+ {
+ ASSERT( false, "<SwXTextDocument::close(..)> - rendering data not cleaned up???" );
lcl_DisposeView( m_pHiddenViewFrame, pDocShell);
+ m_pHiddenViewFrame = 0;
+ // prevent crash described in #i108805
+ SfxItemSet *pSet = pDocShell->GetMedium()->GetItemSet();
+ pSet->Put( SfxBoolItem( SID_HIDDEN, sal_False ) );
+ }
+
SfxBaseModel::close(bDeliverOwnership);
}
/*-- 18.12.98 13:12:25---------------------------------------------------
@@ -1515,9 +1523,9 @@ SwXDrawPage* SwXTextDocument::GetDrawPag
-----------------------------------------------------------------------*/
void SwXTextDocument::Invalidate()
{
- bObjectValid = sal_False;
- if(xNumFmtAgg.is())
- {
+ bObjectValid = sal_False;
+ if(xNumFmtAgg.is())
+ {
const uno::Type& rTunnelType = ::getCppuType((Reference <XUnoTunnel>*)0);
Any aNumTunnel = xNumFmtAgg->queryAggregation(rTunnelType);
SvNumberFormatsSupplierObj* pNumFmt = 0;
@@ -1529,10 +1537,10 @@ void SwXTextDocument::Invalidate()
pNumFmt->SetNumberFormatter(0);
}
DBG_ASSERT(pNumFmt, "No number formatter available");
- }
- InitNewDoc();
- pDocShell = 0;
- aRefreshCont.Disposing();
+ }
+ InitNewDoc();
+ pDocShell = 0;
+ aRefreshCont.Disposing();
}
/* -----------------------------13.07.00 15:59--------------------------------
@@ -2664,27 +2672,32 @@ sal_Int32 SAL_CALL SwXTextDocument::getR
if(!IsValid())
throw RuntimeException();
+ CleanUpRenderingData();
+
const bool bIsPDFExport = !lcl_SeqHasProperty( rxOptions, "IsPrinter" );
bool bIsSwSrcView = false;
SfxViewShell *pView = GetRenderView( bIsSwSrcView, rxOptions, bIsPDFExport );
-
- if (!bIsSwSrcView && !m_pRenderData)
- m_pRenderData = new SwRenderData;
- if (!m_pPrintUIOptions)
- m_pPrintUIOptions = lcl_GetPrintUIOptions( pDocShell, pView );
- bool bFormat = m_pPrintUIOptions->processPropertiesAndCheckFormat( rxOptions );
- // const bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport );
-
+
SwDoc *pDoc = GetRenderDoc( pView, rSelection, bIsPDFExport );
DBG_ASSERT( pDoc && pView, "doc or view shell missing!" );
- if (!pDoc || !pView)
+ if ( pDoc == 0 || pView == 0 )
+ {
return 0;
+ }
+
+ if ( !bIsSwSrcView )
+ {
+ m_pRenderData = new SwRenderData;
+ }
+ // new <PrintUIOptions>
+ m_pPrintUIOptions = lcl_GetPrintUIOptions( pDocShell, pView );
+ const bool bFormat = m_pPrintUIOptions->processPropertiesAndCheckFormat( rxOptions );
// save current UI options from the print dialog for the next call to that dialog
lcl_SavePrintUIOptionsToDocumentPrintData( *pDoc, *m_pPrintUIOptions, bIsPDFExport );
sal_Int32 nRet = 0;
- if (bIsSwSrcView)
+ if ( bIsSwSrcView )
{
SwSrcView *pSwSrcView = dynamic_cast< SwSrcView * >(pView);
OutputDevice *pOutDev = lcl_GetOutputDevice( *m_pPrintUIOptions );
@@ -2718,7 +2731,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getR
if (!pViewShell || !pViewShell->GetLayout())
return 0;
- if (bFormat)
+ if ( bFormat )
{
// #i38289
if( pViewShell->GetViewOptions()->getBrowseMode() )
@@ -2734,7 +2747,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getR
// We don't want that! Thus we disable updating of the view.
pViewShell->StartAction();
- if (pSwView)
+ if ( pSwView )
{
if (m_pRenderData && m_pRenderData->NeedNewViewOptionAdjust( *pViewShell ) )
m_pRenderData->ViewOptionAdjustStop();
@@ -2746,11 +2759,12 @@ sal_Int32 SAL_CALL SwXTextDocument::getR
m_pRenderData->MakeSwPrtOptions( m_pRenderData->GetSwPrtOptionsRef(), pRenderDocShell,
m_pPrintUIOptions, m_pRenderData, bIsPDFExport );
- if (pSwView)
+ if ( pSwView )
{
// PDF export should not make use of the SwPrtOptions
const SwPrintData *pPrtOptions = (bIsPDFExport)
- ? NULL : m_pRenderData->GetSwPrtOptions();
+ ? NULL
+ : m_pRenderData->GetSwPrtOptions();
m_pRenderData->ViewOptionAdjust( pPrtOptions );
}
@@ -2765,7 +2779,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getR
pRenderDocShell->EnableSetModified( sal_False );
bStateChanged = true;
}
-
+
// --> FME 2005-05-23 #122919# Force field update before PDF export:
pViewShell->ViewShell::UpdateFlds(sal_True);
// <--
@@ -2777,9 +2791,9 @@ sal_Int32 SAL_CALL SwXTextDocument::getR
//TODO: check what exatly needs to be done and make just one function for that
pViewShell->CalcLayout();
pViewShell->CalcPagesForPrint( pViewShell->GetPageCount() );
-
+
pViewShell->SetPDFExportOption( sal_False );
-
+
// enable view again
pViewShell->EndAction();
}
@@ -2861,10 +2875,7 @@ uno::Sequence< beans::PropertyValue > SA
if (!pDoc || !pView)
return uno::Sequence< beans::PropertyValue >();
- // due to #110067# (document page count changes sometimes during
- // PDF export/printing) we can not check for the upper bound properly.
- // Thus instead of throwing the exception we silently return.
- if (0 > nRenderer)
+ if ( nRenderer < 0 || nRenderer >= SAL_MAX_UINT16 )
throw IllegalArgumentException();
// TODO/mba: we really need a generic way to get the ViewShell!
@@ -2891,15 +2902,10 @@ uno::Sequence< beans::PropertyValue > SA
uno::Sequence< beans::PropertyValue > aRenderer;
if (m_pRenderData)
{
- // --> TL, OD 2010-09-07 #i114210#
- // determine the correct page number from the renderer index
- // --> OD 2010-10-01 #i114875
- // consider brochure print
- const sal_uInt16 nPage = bPrintProspect
- ? nRenderer + 1
- : m_pRenderData->GetPagesToPrint()[ nRenderer ];
- // <--
-
+ const sal_Int32 nPage = bPrintProspect
+ ? nRenderer + 1
+ : m_pRenderData->GetPagesToPrint()[ nRenderer ];
+
// get paper tray to use ...
sal_Int32 nPrinterPaperTray = -1;
if (! bPrintPaperFromSetup)
@@ -2935,19 +2941,6 @@ uno::Sequence< beans::PropertyValue > SA
aTmpSize = pPrinter->LogicToLogic( aTmpSize,
pPrinter->GetMapMode(), MapMode( MAP_100TH_MM ));
aPageSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() );
- #if 0
- // #i115048# it seems users didn't like getting double the formatted page size
- // revert to "old" behavior scaling to the current paper size of the printer
- if (bPrintProspect)
- {
- // we just state what output size we would need
- // which may cause vcl to set that page size on the printer
- // (if available and not overriden by the user)
- aTmpSize = pVwSh->GetPageSize( nPage, bIsSkipEmptyPages );
- aPreferredPageSize = awt::Size ( TWIP_TO_MM100( 2 * aTmpSize.Width() ),
- TWIP_TO_MM100( aTmpSize.Height() ));
- }
- #else
if( bPrintProspect )
{
// just switch to an appropriate portrait/landscape format
@@ -2960,12 +2953,13 @@ uno::Sequence< beans::PropertyValue > SA
aPreferredPageSize.Height = aPageSize.Width;
}
}
- #endif
}
}
else
{
- aTmpSize = pVwSh->GetPageSize( nPage, bIsSkipEmptyPages );
+ ASSERT( nPage > 0 && nPage <= SAL_MAX_UINT16,
+ "<SwXTextDocument::getRenderer(..)> - unexpected value for the page number, it does not fit into sal_uInt16." );
+ aTmpSize = pVwSh->GetPageSize( static_cast< sal_uInt16 >(nPage), bIsSkipEmptyPages );
aPageSize = awt::Size ( TWIP_TO_MM100( aTmpSize.Width() ),
TWIP_TO_MM100( aTmpSize.Height() ));
}
@@ -2992,7 +2986,6 @@ uno::Sequence< beans::PropertyValue > SA
}
}
- // --> OD #i117783#
if ( bApplyPagePrintSettingsFromXPagePrintable )
{
const SwPagePreViewPrtData* pPagePrintSettings =
@@ -3047,7 +3040,6 @@ uno::Sequence< beans::PropertyValue > SA
bApplyPagePrintSettingsFromXPagePrintable = sal_False;
}
- // <--
m_pPrintUIOptions->appendPrintUIOptions( aRenderer );
@@ -3070,8 +3062,7 @@ SfxViewShell * SwXTextDocument::GuessVie
SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, sal_False );
// look for the view shell with the same controller in use,
- // otherwise look for a suitable view, preferably a SwView,
- // if that one is not found use a SwPagePreView if found.
+ // otherwise look for a suitable view
while (pFrame)
{
pView = pFrame->GetViewShell();
@@ -3084,7 +3075,7 @@ SfxViewShell * SwXTextDocument::GuessVie
if (pView && pView->GetController() == xController)
break;
}
- else if (pSwView || pSwSrcView)
+ else if ( pSwView || pSwSrcView || pSwPagePreView )
break;
pFrame = SfxViewFrame::GetNext( *pFrame, pDocShell, sal_False );
}
@@ -3093,9 +3084,6 @@ SfxViewShell * SwXTextDocument::GuessVie
if (pView)
rbIsSwSrcView = pSwSrcView != 0;
return pView;
-// return pSwView ? dynamic_cast< SfxViewShell * >(pSwView) :
-// (pSwSrcView ? dynamic_cast< SfxViewShell * >(pSwSrcView) :
-// dynamic_cast< SfxViewShell * >(pSwPagePreView) );
}
@@ -3118,13 +3106,19 @@ void SAL_CALL SwXTextDocument::render(
const bool bIsPDFExport = !lcl_SeqHasProperty( rxOptions, "IsPrinter" );
bool bIsSwSrcView = false;
SfxViewShell *pView = GetRenderView( bIsSwSrcView, rxOptions, bIsPDFExport );
-
- DBG_ASSERT( m_pRenderData, "data should have been created already in getRendererCount..." );
- DBG_ASSERT( m_pPrintUIOptions, "data should have been created already in getRendererCount..." );
- if (!bIsSwSrcView && !m_pRenderData)
+
+ // error handling - avoid crash
+ if ( !bIsSwSrcView && m_pRenderData == NULL )
+ {
+ DBG_ASSERT( false, "data should have been created already in getRendererCount..." );
m_pRenderData = new SwRenderData;
- if (!m_pPrintUIOptions)
+ }
+ if ( m_pPrintUIOptions == 0 )
+ {
+ DBG_ASSERT( false, "data should have been created already in getRendererCount..." );
m_pPrintUIOptions = lcl_GetPrintUIOptions( pDocShell, pView );
+ }
+
m_pPrintUIOptions->processProperties( rxOptions );
const bool bPrintProspect = m_pPrintUIOptions->getBoolValue( "PrintProspect", false );
const bool bLastPage = m_pPrintUIOptions->getBoolValue( "IsLastPage", sal_False );
@@ -3169,7 +3163,7 @@ void SAL_CALL SwXTextDocument::render(
{
pVwSh = ((SwPagePreView*)pView)->GetViewShell();
}
-
+
// get output device to use
OutputDevice * pOut = lcl_GetOutputDevice( *m_pPrintUIOptions );
@@ -3178,11 +3172,11 @@ void SAL_CALL SwXTextDocument::render(
const rtl::OUString aPageRange = m_pPrintUIOptions->getStringValue( "PageRange", OUString() );
const bool bFirstPage = m_pPrintUIOptions->getBoolValue( "IsFirstPage", sal_False );
bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport );
-
+
DBG_ASSERT(( pSwView && m_pRenderData->IsViewOptionAdjust())
|| (!pSwView && !m_pRenderData->IsViewOptionAdjust()),
"SwView / SwViewOptionAdjust_Impl availability mismatch" );
-
+
// since printing now also use the API for PDF export this option
// should be set for printing as well ...
pVwSh->SetPDFExportOption( sal_True );
@@ -3208,8 +3202,6 @@ void SAL_CALL SwXTextDocument::render(
else // normal printing and PDF export
pVwSh->PrintOrPDFExport( pOut, rSwPrtOptions, nRenderer );
- // --> FME 2004-10-08 #i35176#
- //
// After printing the last page, we take care for the links coming
// from the EditEngine. The links are generated during the painting
// process, but the destinations are still missing.
@@ -3218,41 +3210,17 @@ void SAL_CALL SwXTextDocument::render(
{
SwEnhancedPDFExportHelper aHelper( *pWrtShell, *pOut, aPageRange, bIsSkipEmptyPages, sal_True );
}
- // <--
-
- pVwSh->SetPDFExportOption( sal_False );
-
- // last page to be rendered? (not necessarily the last page of the document)
- // -> do clean-up of data
- if (bLastPage)
- {
- // #i96167# haggai: delete ViewOptionsAdjust here because it makes use
- // of the shell, which might get destroyed in lcl_DisposeView!
- if (m_pRenderData && m_pRenderData->IsViewOptionAdjust())
- m_pRenderData->ViewOptionAdjustStop();
-
- if (m_pRenderData && m_pRenderData->HasPostItData())
- m_pRenderData->DeletePostItData();
- if (m_pHiddenViewFrame)
- {
- lcl_DisposeView( m_pHiddenViewFrame, pDocShell );
- m_pHiddenViewFrame = 0;
-
- // prevent crash described in #i108805
- SwDocShell *pRenderDocShell = pDoc->GetDocShell();
- SfxItemSet *pSet = pRenderDocShell->GetMedium()->GetItemSet();
- pSet->Put( SfxBoolItem( SID_HIDDEN, sal_False ) );
- }
- }
+ pVwSh->SetPDFExportOption( sal_False );
}
}
}
}
- if( bLastPage )
+ // last page to be rendered? (not necessarily the last page of the document)
+ // -> do clean-up of data
+ if ( bLastPage )
{
- delete m_pRenderData; m_pRenderData = NULL;
- delete m_pPrintUIOptions; m_pPrintUIOptions = NULL;
+ CleanUpRenderingData();
}
}
/* -----------------------------03.10.04 -------------------------------------
@@ -3510,21 +3478,35 @@ uno::Sequence< lang::Locale > SAL_CALL S
return aLanguages;
}
-// #121125# react on ViewShell change; a reference to the ViewShell is
-// held in SwViewOptionAdjust_Impl, thus needs to be cleaned up
-void SwXTextDocument::ReactOnViewShellChange()
+// #121125#, #122868#
+// method to assure clean up of the rendering data to restore view options
+// and to loose hold reference to the ViewShell in SwViewOptionAdjust_Impl.
+// also perform clean up for the still existing hidden frame for PDF export from Page Preview
+void SwXTextDocument::CleanUpRenderingData()
{
- if(m_pRenderData)
+ if( m_pRenderData != NULL )
{
- delete m_pRenderData;
+ if ( m_pRenderData->HasPostItData() )
+ {
+ m_pRenderData->DeletePostItData();
+ }
+ delete m_pRenderData;
m_pRenderData = NULL;
}
- if(m_pPrintUIOptions)
+ if( m_pPrintUIOptions != NULL )
{
- delete m_pPrintUIOptions;
+ delete m_pPrintUIOptions;
m_pPrintUIOptions = NULL;
}
+
+ if ( IsValid() && m_pHiddenViewFrame )
+ {
+ lcl_DisposeView( m_pHiddenViewFrame, pDocShell);
+ m_pHiddenViewFrame = 0;
+ SfxItemSet *pSet = pDocShell->GetMedium()->GetItemSet();
+ pSet->Put( SfxBoolItem( SID_HIDDEN, sal_False ) );
+ }
}
/* -----------------25.10.99 11:06-------------------
Modified: openoffice/branches/alg/aw080/main/sw/source/ui/utlui/content.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sw/source/ui/utlui/content.cxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/sw/source/ui/utlui/content.cxx (original)
+++ openoffice/branches/alg/aw080/main/sw/source/ui/utlui/content.cxx Thu Nov 7 14:29:41 2013
@@ -417,7 +417,7 @@ void SwContentType::Init(sal_Bool* pbInv
if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() &&
(*i)->mLayoutStatus!=SwPostItHelper::INVISIBLE )
{
- String sEntry = aFmtFld->GetFld()->GetPar2();
+ String sEntry = aFmtFld->GetField()->GetPar2();
RemoveNewline(sEntry);
SwPostItContent* pCnt = new SwPostItContent(
this,
@@ -428,25 +428,6 @@ void SwContentType::Init(sal_Bool* pbInv
nMemberCount++;
}
}
- /*
- // this code can be used once we want redline comments in the margin
- else // redcomment
- {
- SwRedline* pRedline = static_cast<SwRedline*>((*i)->GetBroadCaster());
- if ( pRedline->GetComment() != String(::rtl::OUString::createFromAscii("")) )
- {
- String sEntry = pRedline->GetComment();
- RemoveNewline(sEntry);
- SwPostItContent* pCnt = new SwPostItContent(
- this,
- sEntry, // hier steht der Text
- pRedline,
- nMemberCount);
- pMember->Insert(pCnt);
- nMemberCount++;
- }
- }
- */
}
}
//
@@ -784,7 +765,7 @@ void SwContentType::FillMemberList(sal_B
if (aFmtFld->GetTxtFld() && aFmtFld->IsFldInDoc() &&
(*i)->mLayoutStatus!=SwPostItHelper::INVISIBLE )
{
- String sEntry = aFmtFld->GetFld()->GetPar2();
+ String sEntry = aFmtFld->GetField()->GetPar2();
RemoveNewline(sEntry);
SwPostItContent* pCnt = new SwPostItContent(
this,
Modified: openoffice/branches/alg/aw080/main/sysui/desktop/icons/main.icns
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/sysui/desktop/icons/main.icns?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
Binary files - no diff available.
Modified: openoffice/branches/alg/aw080/main/tools/source/generic/toolsin.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/tools/source/generic/toolsin.cxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/tools/source/generic/toolsin.cxx (original)
+++ openoffice/branches/alg/aw080/main/tools/source/generic/toolsin.cxx Thu Nov 7 14:29:41 2013
@@ -31,7 +31,7 @@
#include <tools/debug.hxx>
#include <toolsin.hxx>
-#if defined WNT || defined OS2
+#if defined WNT
#include <dll.hxx>
#endif
Modified: openoffice/branches/alg/aw080/main/unoil/climaker/version.txt
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/unoil/climaker/version.txt?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/unoil/climaker/version.txt (original)
+++ openoffice/branches/alg/aw080/main/unoil/climaker/version.txt Thu Nov 7 14:29:41 2013
@@ -19,8 +19,8 @@
#
#**************************************************************
-CLI_OOOTYPES_NEW_VERSION=1.0.8.0
-CLI_OOOTYPES_OLD_VERSION=1.0.0.0-1.0.7.0
-CLI_OOOTYPES_POLICY_VERSION=8.0.0.0
+CLI_OOOTYPES_NEW_VERSION=1.0.9.0
+CLI_OOOTYPES_OLD_VERSION=1.0.0.0-1.0.8.0
+CLI_OOOTYPES_POLICY_VERSION=9.0.0.0
CLI_OOOTYPES_POLICY_ASSEMBLY=policy.1.0.cli_oootypes
Modified: openoffice/branches/alg/aw080/main/vcl/inc/vcl/bitmapex.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/vcl/inc/vcl/bitmapex.hxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/vcl/inc/vcl/bitmapex.hxx (original)
+++ openoffice/branches/alg/aw080/main/vcl/inc/vcl/bitmapex.hxx Thu Nov 7 14:29:41 2013
@@ -393,25 +393,42 @@ public:
@param rTransformation
The back transformation for each pixel in (0 .. fWidth),(0 .. fHeight) to
local pixel coordiantes
+
+ @param bSmooth
+ Defines if pixel interpolation is to be used to create the result
*/
BitmapEx TransformBitmapEx(
double fWidth,
double fHeight,
- const basegfx::B2DHomMatrix& rTransformation) const;
+ const basegfx::B2DHomMatrix& rTransformation,
+ bool bSmooth = true) const;
/** Create transformed Bitmap
@param rTransformation
- The transformation from unit coordinates to target
+ The transformation from unit coordinates to the unit range
+
+ @param rVisibleRange
+ The relative visible range in unit coordinates, relative to (0,0,1,1) which
+ defines the whole target area
@param fMaximumArea
A limitation for the maximum size of pixels to use for the result
+ @param bSmooth
+ Defines if pixel interpolation is to be used to create the result
+
+ The traget size of the result bitmap is defined by transforming the given
+ rTargetRange with the given rTransformation; the area of the result is
+ linearly scaled to not exceed the given fMaximumArea
+
@return The transformed bitmap
*/
BitmapEx getTransformed(
const basegfx::B2DHomMatrix& rTransformation,
- double fMaximumArea = 500000.0) const;
+ const basegfx::B2DRange& rVisibleRange,
+ double fMaximumArea = 500000.0,
+ bool bSmooth = true) const;
/** Create ColorStack-modified version of this BitmapEx
Modified: openoffice/branches/alg/aw080/main/vcl/inc/vcl/bmpacc.hxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/vcl/inc/vcl/bmpacc.hxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/vcl/inc/vcl/bmpacc.hxx (original)
+++ openoffice/branches/alg/aw080/main/vcl/inc/vcl/bmpacc.hxx Thu Nov 7 14:29:41 2013
@@ -171,6 +171,16 @@ public:
inline BitmapColor GetColor( long nY, long nX ) const;
inline sal_uInt8 GetPixelIndex( long nY, long nX ) const;
inline sal_uInt8 GetLuminance( long nY, long nX ) const;
+
+ /** Get the interpolated color at coordinates fY, fX; if outside, return rFallback */
+ BitmapColor GetInterpolatedColorWithFallback( double fY, double fX, const BitmapColor& rFallback ) const;
+
+ /** Get the color at coordinates fY, fX; if outside, return rFallback. Automatically does the correct
+ inside/outside checks, e.g. static_cast< sal_uInt32 >(-0.25) *is* 0, not -1 and has to be outside */
+ BitmapColor GetColorWithFallback( double fY, double fX, const BitmapColor& rFallback ) const;
+
+ /** Get the color at coordinates nY, nX; if outside, return rFallback */
+ BitmapColor GetColorWithFallback( long nY, long nX, const BitmapColor& rFallback ) const;
};
// ---------------------
Modified: openoffice/branches/alg/aw080/main/vcl/os2/source/gdi/salgdi3.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/vcl/os2/source/gdi/salgdi3.cxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/vcl/os2/source/gdi/salgdi3.cxx (original)
+++ openoffice/branches/alg/aw080/main/vcl/os2/source/gdi/salgdi3.cxx Thu Nov 7 14:29:41 2013
@@ -837,7 +837,7 @@ USHORT Os2SalGraphics::SetFont( ImplFont
return 0;
}
-#if OSL_DEBUG_LEVEL>1
+#if OSL_DEBUG_LEVEL>10
debug_printf( "Os2SalGraphics::SetFont\n");
#endif
Modified: openoffice/branches/alg/aw080/main/vcl/os2/source/gdi/salprn.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/vcl/os2/source/gdi/salprn.cxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/vcl/os2/source/gdi/salprn.cxx (original)
+++ openoffice/branches/alg/aw080/main/vcl/os2/source/gdi/salprn.cxx Thu Nov 7 14:29:41 2013
@@ -57,32 +57,8 @@
#include <print.h>
#include <jobset.h>
-/*
-#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
-#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <comphelper/processfactory.hxx>
-*/
-
#include <malloc.h>
-/*
-#define _SV_SALPRN_CXX
-#include <tools/debug.hxx>
-#include <saldata.hxx>
-#include <salinst.h>
-#include <salgdi.h>
-#include <salframe.h>
-#include <vcl/salptype.hxx>
-#include <salprn.h>
-#include <vcl/print.h>
-#include <vcl/jobset.h>
-
-*/
-
#ifndef __H_FT2LIB
#include <os2/wingdi.h>
#include <ft2lib.h>
@@ -583,11 +559,15 @@ static void ImplFreeFormAndTrayList( Os2
static void ImplGetFormAndTrayList( Os2SalInfoPrinter* pOs2SalInfoPrinter, const ImplJobSetup* pSetupData )
{
+ // if not defined, suppose default orientation is portrait
+ Orientation orientation = ORIENTATION_PORTRAIT;
+
ImplFreeFormAndTrayList( pOs2SalInfoPrinter );
LONG alQuery[] =
{
0, 0, // First two members of QUERYSIZE
+ DJP_SJ_ORIENTATION, DJP_CURRENT,
DJP_CJ_FORM, DJP_ALL,
DJP_CJ_TRAYNAME, DJP_ALL,
DJP_NONE, DJP_NONE // EOL marker
@@ -638,7 +618,18 @@ static void ImplGetFormAndTrayList( Os2S
PQUERYTUPLE pTuple = pQuerySize->aTuples;
while ( DJP_NONE != pTuple->ulProperty )
{
- if ( pDJP->ulProperty == DJP_CJ_FORM )
+ if ( pDJP->ulProperty == DJP_SJ_ORIENTATION )
+ {
+ if ( pDJP->ulNumReturned )
+ {
+ PDJPT_ORIENTATION pElm = DJP_ELEMENTP( *pDJP, DJPT_ORIENTATION );
+ if ( (DJP_ORI_PORTRAIT == *pElm) || (DJP_ORI_REV_PORTRAIT == *pElm) )
+ orientation = ORIENTATION_PORTRAIT;
+ else
+ orientation = ORIENTATION_LANDSCAPE;
+ }
+ }
+ else if ( pDJP->ulProperty == DJP_CJ_FORM )
{
if ( pDJP->ulNumReturned )
{
@@ -649,11 +640,20 @@ static void ImplGetFormAndTrayList( Os2S
for( int i = 0; i < pDJP->ulNumReturned; i++, pElm++ )
{
ImplFormInfo* pInfo = new ImplFormInfo;
- pInfo->mnPaperWidth = pElm->hcInfo.cx;
- pInfo->mnPaperHeight = pElm->hcInfo.cy;
+ // AOO expects form size always in portrait mode
+ if (orientation == ORIENTATION_PORTRAIT)
+ {
+ pInfo->mnPaperWidth = pElm->hcInfo.cx;
+ pInfo->mnPaperHeight = pElm->hcInfo.cy;
+ }
+ else
+ {
+ pInfo->mnPaperWidth = pElm->hcInfo.cy;
+ pInfo->mnPaperHeight = pElm->hcInfo.cx;
+ }
#if OSL_DEBUG_LEVEL>0
- printf("ImplGetFormAndTrayList mnPaperWidth %d\n", pInfo->mnPaperWidth);
- printf("ImplGetFormAndTrayList mnPaperHeight %d\n", pInfo->mnPaperHeight);
+ debug_printf("ImplGetFormAndTrayList #%d: %d x %d",
+ i, pInfo->mnPaperWidth, pInfo->mnPaperHeight);
#endif
pInfo->mnId = pElm->djppsFormID;
pOs2SalInfoPrinter->mpFormArray[i] = pInfo;
@@ -865,6 +865,9 @@ static sal_Bool ImplSetOrientation( HDC
DJP_SJ_ORIENTATION, DJP_CURRENT,
DJP_NONE, DJP_NONE // EOL marker
};
+#if OSL_DEBUG_LEVEL>0
+ debug_printf( "ImplSetOrientation mhDC %x, %d", hPrinterDC, eOrientation);
+#endif
APIRET rc;
PQUERYSIZE pQuerySize = (PQUERYSIZE)alQuery;
@@ -1164,6 +1167,7 @@ Os2SalInfoPrinter::Os2SalInfoPrinter()
mpFormArray = NULL;
mnTrayCount = 0;
mpTrayArray = NULL;
+ m_bPapersInit = FALSE;
}
// -----------------------------------------------------------------------
@@ -1181,6 +1185,42 @@ Os2SalInfoPrinter::~Os2SalInfoPrinter()
// -----------------------------------------------------------------------
+void Os2SalInfoPrinter::InitPaperFormats( const ImplJobSetup* pSetupData )
+{
+#if OSL_DEBUG_LEVEL>0
+ debug_printf( "Os2SalInfoPrinter::InitPaperFormats pSetupData %x",
+ pSetupData);
+#endif
+
+ m_aPaperFormats.clear();
+ m_bPapersInit = true;
+
+ // init paperbinlist if empty
+ if ( !mnTrayCount )
+ ImplGetFormAndTrayList( this, pSetupData );
+
+ for( int i = 0; i < mnFormCount; i++)
+ {
+ PaperInfo aInfo( mpFormArray[i]->mnPaperWidth * 100,
+ mpFormArray[i]->mnPaperHeight * 100);
+#if OSL_DEBUG_LEVEL>0
+ debug_printf( "Os2SalInfoPrinter::InitPaperFormats #%d: %d x %d",
+ i, mpFormArray[i]->mnPaperWidth * 100,
+ mpFormArray[i]->mnPaperHeight * 100);
+#endif
+ m_aPaperFormats.push_back( aInfo );
+ }
+}
+
+// -----------------------------------------------------------------------
+
+int Os2SalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* pSetupData )
+{
+ return 900;
+}
+
+// -----------------------------------------------------------------------
+
SalGraphics* Os2SalInfoPrinter::GetGraphics()
{
if ( mbGraphics )
@@ -1292,6 +1332,11 @@ sal_Bool Os2SalInfoPrinter::SetPrinterDa
sal_Bool Os2SalInfoPrinter::SetData( ULONG nFlags, ImplJobSetup* pSetupData )
{
+#if OSL_DEBUG_LEVEL>0
+ debug_printf( "Os2SalInfoPrinter::SetData nFlags %x, pSetupData %x",
+ nFlags, pSetupData);
+#endif
+
// needs DJP support
if ( !mbDJPSupported )
return FALSE;
@@ -1306,6 +1351,9 @@ sal_Bool Os2SalInfoPrinter::SetData( ULO
// set orientation
if ( nFlags & SAL_JOBSET_ORIENTATION )
{
+#if OSL_DEBUG_LEVEL>0
+ debug_printf( "Os2SalInfoPrinter::SetData meOrientation %d", pSetupData->meOrientation);
+#endif
if ( ImplSetOrientation( mhDC, pDrivData, pSetupData->meOrientation ) )
bOK = TRUE;
}
@@ -1687,6 +1735,9 @@ sal_Bool Os2SalPrinter::StartJob( const
// Can we print with DJP
mbPrintDJPSupported = ImplIsDriverPrintDJPEnabled( mhDC );
+#if OSL_DEBUG_LEVEL>0
+ debug_printf( "mbPrintDJPSupported %d", mbPrintDJPSupported);
+#endif
// JobName ermitteln und Job starten
PSZ pszJobName = NULL;
@@ -1697,9 +1748,10 @@ sal_Bool Os2SalPrinter::StartJob( const
nJobNameLen = jobName.Len();
}
rc = DevEscape( mhDC,
- DEVESC_STARTDOC,
+ mbPrintDJPSupported ? DEVESC_STARTDOC_WPROP : DEVESC_STARTDOC,
nJobNameLen, (PBYTE)pszJobName,
- 0, (PBYTE)NULL );
+ &((PDRIVDATA)(pSetupData->mpDriverData))->cb,
+ (PBYTE)(pSetupData->mpDriverData));
if ( rc != DEV_OK )
{
@@ -1770,6 +1822,13 @@ SalGraphics* Os2SalPrinter::StartPage( I
{
APIRET rc;
+#if OSL_DEBUG_LEVEL>0
+ debug_printf( "Os2SalPrinter::StartPage mhDC %x, mbFirstPage %d, bNewJobSetup %d",
+ mhDC, mbFirstPage, bNewJobSetup);
+ debug_printf( "Os2SalPrinter::StartPage pSetupData %x",
+ pSetupData);
+#endif
+
if ( mbFirstPage )
mbFirstPage = FALSE;
else
@@ -1840,6 +1899,10 @@ SalGraphics* Os2SalPrinter::StartPage( I
sal_Bool Os2SalPrinter::EndPage()
{
+#if OSL_DEBUG_LEVEL>0
+ debug_printf( "Os2SalPrinter::EndPage mhDC %x", mhDC);
+#endif
+
if ( mpGraphics )
{
// destroy SalGraphics
@@ -1857,14 +1920,3 @@ ULONG Os2SalPrinter::GetErrorCode()
{
return mnError;
}
-
-void Os2SalInfoPrinter::InitPaperFormats( const ImplJobSetup* pSetupData )
-{
- printf("Os2SalInfoPrinter::InitPaperFormats\n");
-}
-int Os2SalInfoPrinter::GetLandscapeAngle( const ImplJobSetup* pSetupData )
-{
- printf("Os2SalInfoPrinter::GetLandscapeAngle\n");
- return 0;
-}
-
Modified: openoffice/branches/alg/aw080/main/vcl/source/fontsubset/sft.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/alg/aw080/main/vcl/source/fontsubset/sft.cxx?rev=1539657&r1=1539656&r2=1539657&view=diff
==============================================================================
--- openoffice/branches/alg/aw080/main/vcl/source/fontsubset/sft.cxx (original)
+++ openoffice/branches/alg/aw080/main/vcl/source/fontsubset/sft.cxx Thu Nov 7 14:29:41 2013
@@ -799,7 +799,10 @@ static int GetCompoundTTOutline(TrueType
} while (flags & MORE_COMPONENTS);
-
+ // #i123417# some fonts like IFAOGrec have no outline points in some compound glyphs
+ // so this unlikely but possible scenario should be handled gracefully
+ if( myPoints.empty() )
+ return 0;
np = myPoints.size();
@@ -2787,7 +2790,7 @@ GlyphData *GetTTRawGlyphData(TrueTypeFon
/* now calculate npoints and ncontours */
ControlPoint *cp;
n = GetTTGlyphPoints(ttf, glyphID, &cp);
- if (n != -1) {
+ if( n > 0) {
m = 0;
for (i = 0; i < n; i++) {
if (cp[i].flags & 0x8000) m++;