diff options
author | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2010-12-06 13:01:23 +0100 |
---|---|---|
committer | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2010-12-06 13:01:23 +0100 |
commit | 6179faeb9d9341ad8cc82a3b1e24ea4c3657bf3d (patch) | |
tree | 943236aab5686b54a49eea971a8442a9cddc1d1a | |
parent | 1e613b65a48a459546439eeaf859cf1532edea04 (diff) | |
parent | 118d72cbfd4e732b4b472260fe7cbc67fc9e68ee (diff) |
rebased to OOO330m17
-rw-r--r-- | starmath/inc/starmath.hrc | 2 | ||||
-rwxr-xr-x | starmath/source/smres.src | 4 | ||||
-rwxr-xr-x | starmath/source/view.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/attr/cellatr.cxx | 11 | ||||
-rw-r--r-- | sw/source/core/doc/doc.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/doc/number.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/draw/dcontact.cxx | 33 | ||||
-rw-r--r-- | sw/source/core/frmedt/feshview.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/layout/fly.cxx | 27 | ||||
-rw-r--r-- | sw/source/core/unocore/unotbl.cxx | 9 | ||||
-rw-r--r-- | sw/source/filter/rtf/rtfnum.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 9 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par3.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 29 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlexpit.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/docvw/edtwin.cxx | 47 | ||||
-rw-r--r-- | sw/source/ui/lingu/olmenu.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uiview/pview.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uiview/srcview.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uiview/view0.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/uno/unotxdoc.cxx | 21 | ||||
-rw-r--r-- | sw/source/ui/web/wview.cxx | 2 |
23 files changed, 221 insertions, 50 deletions
diff --git a/starmath/inc/starmath.hrc b/starmath/inc/starmath.hrc index d73ea27a0d45..8d156792e1d3 100644 --- a/starmath/inc/starmath.hrc +++ b/starmath/inc/starmath.hrc @@ -107,7 +107,7 @@ #define RID_READSYMBOLERROR (RID_APP_START + 203) #define RID_NOMATHTYPEFACEWARNING (RID_APP_START + 204) #define RID_OBJECTNAME (RID_APP_START + 501) -#define RID_VIEWNAME (RID_APP_START + 502) + // free #define RID_UNDOEDITNAME (RID_APP_START + 503) #define RID_UNDOFORMATNAME (RID_APP_START + 504) #define RID_APPICO (RID_APP_START + 601) diff --git a/starmath/source/smres.src b/starmath/source/smres.src index 7d3525bd2a29..c35d77c9afcf 100755 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -1379,10 +1379,6 @@ String RID_OBJECTNAME { Text = "SMath3" ; }; -String RID_VIEWNAME -{ - Text = "StarMath" ; -}; String RID_UNDOEDITNAME { Text = "Edit" ; diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 0087595703ca..3920c65e941c 100755 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -749,7 +749,7 @@ SFX_IMPL_INTERFACE(SmViewShell, SfxViewShell, SmResId(0)) } -SFX_IMPL_VIEWFACTORY(SmViewShell, SmResId(RID_VIEWNAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SmViewShell, "Default") { SFX_VIEW_REGISTRATION(SmDocShell); } diff --git a/sw/source/core/attr/cellatr.cxx b/sw/source/core/attr/cellatr.cxx index 8032d3506a27..f492696ef8ac 100644 --- a/sw/source/core/attr/cellatr.cxx +++ b/sw/source/core/attr/cellatr.cxx @@ -28,9 +28,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sw.hxx" +#include <float.h> +#include <rtl/math.hxx> -#include <float.h> #include <hintids.hxx> // fuer RES_.. #include <cellatr.hxx> #include <calc.hxx> @@ -249,8 +250,12 @@ SwTblBoxValue::SwTblBoxValue( const double nVal ) int SwTblBoxValue::operator==( const SfxPoolItem& rAttr ) const { - ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" ); - return nValue == ((SwTblBoxValue&)rAttr).nValue; + ASSERT(SfxPoolItem::operator==(rAttr), "SwTblBoxValue: item not equal"); + SwTblBoxValue const& rOther( static_cast<SwTblBoxValue const&>(rAttr) ); + // items with NaN should be equal to enable pooling + return ::rtl::math::isNan(nValue) + ? ::rtl::math::isNan(rOther.nValue) + : (nValue == rOther.nValue); } diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index fd45279d4d13..2378cd1d68a1 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -631,6 +631,8 @@ void SwDoc::setJobsetup(/*[in]*/ const JobSetup &rJobSetup ) SwPrintData* SwDoc::getPrintData() const { + if(!pPrtData) + ((SwDoc*)this)->pPrtData = new SwPrintData; return pPrtData; } @@ -1714,16 +1716,22 @@ sal_uInt16 SwDoc::GetPageCount() const const Size SwDoc::GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const { Size aSize; - if( GetRootFrm() && nPageNum ) + if ( GetRootFrm() && nPageNum ) { const SwPageFrm* pPage = static_cast<const SwPageFrm*> (GetRootFrm()->Lower()); - while( --nPageNum && pPage->GetNext() ) + while ( --nPageNum && pPage->GetNext() ) + { pPage = static_cast<const SwPageFrm*>( pPage->GetNext() ); + } - if( !bSkipEmptyPages && pPage->IsEmptyPage() && pPage->GetNext() ) + // switch to next page for an empty page, if empty pages are not skipped + // in order to get a sensible page size for an empty page - e.g. for printing. + if ( !bSkipEmptyPages && pPage->IsEmptyPage() && pPage->GetNext() ) + { pPage = static_cast<const SwPageFrm*>( pPage->GetNext() ); + } aSize = pPage->Frm().SSize(); } diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 7af292626f06..847c6b229fd1 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -101,8 +101,15 @@ const SwNumFmt& SwNumRule::Get( USHORT i ) const const SwNumFmt* SwNumRule::GetNumFmt( USHORT i ) const { + const SwNumFmt * pResult = NULL; + ASSERT_ID( i < MAXLEVEL && eRuleType < RULE_END, ERR_NUMLEVEL); - return aFmts[ i ]; + if ( i < MAXLEVEL && eRuleType < RULE_END) + { + pResult = aFmts[ i ]; + } + + return pResult; } // --> OD 2008-07-08 #i91400# diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index b213eb1d075d..f0683ae700a5 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -334,7 +334,13 @@ BOOL SwNodes::InsBoxen( SwTableNode* pTblNd, new SwEndNode( aEndIdx, *pSttNd ); pPrvBox = new SwTableBox( pBoxFmt, *pSttNd, pLine ); - pLine->GetTabBoxes().C40_INSERT( SwTableBox, pPrvBox, nInsPos + n ); + + SwTableBoxes & rTabBoxes = pLine->GetTabBoxes(); + USHORT nRealInsPos = nInsPos + n; + if (nRealInsPos > rTabBoxes.Count()) + nRealInsPos = rTabBoxes.Count(); + + rTabBoxes.C40_INSERT( SwTableBox, pPrvBox, nRealInsPos ); //if( NO_NUMBERING == pTxtColl->GetOutlineLevel()//#outline level,zhaojianwei if( ! pTxtColl->IsAssignedToListLevelOfOutlineStyle()//<-end,zhaojianwei diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 2e19d482fc70..766c3ca86377 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1396,6 +1396,37 @@ void SwDrawContact::_Changed( const SdrObject& rObj, DisconnectFromLayout( false ); break; } + case SDRUSERCALL_CHILD_INSERTED : + case SDRUSERCALL_CHILD_REMOVED : + { + // --> AW, OD 2010-09-13 #i113730# + // force layer of controls for group objects containing control objects + if(dynamic_cast< SdrObjGroup* >(maAnchoredDrawObj.DrawObj())) + { + if(::CheckControlLayer(maAnchoredDrawObj.DrawObj())) + { + const IDocumentDrawModelAccess* pIDDMA = static_cast<SwFrmFmt*>(pRegisteredIn)->getIDocumentDrawModelAccess(); + const SdrLayerID aCurrentLayer(maAnchoredDrawObj.DrawObj()->GetLayer()); + const SdrLayerID aControlLayerID(pIDDMA->GetControlsId()); + const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId()); + + if(aCurrentLayer != aControlLayerID && aCurrentLayer != aInvisibleControlLayerID) + { + if ( aCurrentLayer == pIDDMA->GetInvisibleHellId() || + aCurrentLayer == pIDDMA->GetInvisibleHeavenId() ) + { + maAnchoredDrawObj.DrawObj()->SetLayer(aInvisibleControlLayerID); + } + else + { + maAnchoredDrawObj.DrawObj()->SetLayer(aControlLayerID); + } + } + } + } + // fallthrough intended here + // <-- + } case SDRUSERCALL_MOVEONLY: case SDRUSERCALL_RESIZE: case SDRUSERCALL_CHILD_MOVEONLY : @@ -1403,8 +1434,6 @@ void SwDrawContact::_Changed( const SdrObject& rObj, case SDRUSERCALL_CHILD_CHGATTR : case SDRUSERCALL_CHILD_DELETE : case SDRUSERCALL_CHILD_COPY : - case SDRUSERCALL_CHILD_INSERTED : - case SDRUSERCALL_CHILD_REMOVED : { // --> OD 2004-08-04 #i31698# - improvement: // get instance <SwAnchoredDrawObject> only once diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 4133433702a3..ae3def212495 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -603,7 +603,7 @@ bool SwFEShell::IsSelContainsControl() const // if we have one marked object, get the SdrObject and check // whether it contains a control const SdrObject* pSdrObject = pMarkList->GetMark( 0 )->GetMarkedSdrObj(); - bRet = CheckControlLayer( pSdrObject ); + bRet = ::CheckControlLayer( pSdrObject ); } return bRet; } @@ -998,8 +998,14 @@ void SwFEShell::ChangeOpaque( SdrLayerID nLayerId ) SdrObject* pObj = rMrkList.GetMark( i )->GetMarkedSdrObj(); // OD 21.08.2003 #i18447# - no change of layer for controls // or group objects containing controls. - const bool bControlObj = ::CheckControlLayer( pObj ); - //if ( pObj->GetLayer() != nLayerId && pObj->GetLayer() != nControls ) + // --> OD 2010-09-14 #i113730# + // consider that a member of a drawing group has been selected. + const SwContact* pContact = ::GetUserCall( pObj ); + ASSERT( pContact && pContact->GetMaster(), "<SwFEShell::ChangeOpaque(..)> - missing contact or missing master object at contact!" ); + const bool bControlObj = ( pContact && pContact->GetMaster() ) + ? ::CheckControlLayer( pContact->GetMaster() ) + : ::CheckControlLayer( pObj ); + // <-- if ( !bControlObj && pObj->GetLayer() != nLayerId ) { pObj->SetLayer( nLayerId ); diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index cd590d73ddcc..d69df532682f 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -51,6 +51,9 @@ #include <layhelp.hxx> #include <ndtxt.hxx> +// --> OD 2010-09-14 #i113730# +#include <svx/svdogrp.hxx> +// <-- // OD 16.04.2003 #i13147# - for <SwFlyFrm::GetContour(..)> #include <ndgrf.hxx> // OD 29.10.2003 #113049# @@ -2250,6 +2253,30 @@ void SwFrm::AppendDrawObj( SwAnchoredObject& _rNewObj ) _rNewObj.ChgAnchorFrm( this ); } + // --> OD 2010-09-14 #i113730# + // Assure the control objects and group objects containing controls are on the control layer + if ( ::CheckControlLayer( _rNewObj.DrawObj() ) ) + { + const IDocumentDrawModelAccess* pIDDMA = GetUpper()->GetFmt()->getIDocumentDrawModelAccess(); + const SdrLayerID aCurrentLayer(_rNewObj.DrawObj()->GetLayer()); + const SdrLayerID aControlLayerID(pIDDMA->GetControlsId()); + const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId()); + + if(aCurrentLayer != aControlLayerID && aCurrentLayer != aInvisibleControlLayerID) + { + if ( aCurrentLayer == pIDDMA->GetInvisibleHellId() || + aCurrentLayer == pIDDMA->GetInvisibleHeavenId() ) + { + _rNewObj.DrawObj()->SetLayer(aInvisibleControlLayerID); + } + else + { + _rNewObj.DrawObj()->SetLayer(aControlLayerID); + } + } + } + // <-- + // no direct positioning needed, but invalidate the drawing object position _rNewObj.InvalidateObjPos(); diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index b7098710802b..fdc382ad99d9 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1009,12 +1009,9 @@ void SwXCell::setFormula(const OUString& rFormula) throw( uno::RuntimeException double SwXCell::getValue(void) throw( uno::RuntimeException ) { vos::OGuard aGuard(Application::GetSolarMutex()); - double fRet = lcl_getValue( *this ); - //lcl_getValue was changed thus it can return nan values, - //so I make this additional nan check here to not change the behaviour - //but maybe it would even be more correct to just return nan here? ... todo? - if( ::rtl::math::isNan( fRet ) ) - fRet = 0.0; + + double const fRet = lcl_getValue( *this ); + // #i112652# a table cell may contain NaN as a value, do not filter that return fRet; } /*-- 11.12.98 10:56:26--------------------------------------------------- diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx index 84719b2f1255..507f35375ed6 100644 --- a/sw/source/filter/rtf/rtfnum.cxx +++ b/sw/source/filter/rtf/rtfnum.cxx @@ -806,8 +806,8 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken ) // suche die Rule - steht unter Nummer 3 nListNo = 3; bContinus = FALSE; - nLevel = MAXLEVEL <= nTokenValue ? MAXLEVEL - 1 - : BYTE( nTokenValue - 1 ); + nLevel = MAXLEVEL <= (unsigned long) nTokenValue ? MAXLEVEL - 1 + : (!nTokenValue ? 0 : BYTE( nTokenValue - 1 )); } else { @@ -815,9 +815,9 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken ) { case RTF_PNLVL: nListNo = 3; bContinus = FALSE; - nLevel = MAXLEVEL <= nTokenValue + nLevel = MAXLEVEL <= (unsigned long) nTokenValue ? MAXLEVEL - 1 - : BYTE( nTokenValue-1 ); + : (!nTokenValue ? 0 : BYTE( nTokenValue-1 )); break; case RTF_PNLVLBODY: diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 24f36b047a4e..cd11631a0181 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4919,7 +4919,14 @@ ULONG WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const St } SwWW8ImplReader* pRdr = new SwWW8ImplReader(nVersion, pStg, pIn, rDoc, rBaseURL, bNew); - nRet = pRdr->LoadDoc( rPam ); + try + { + nRet = pRdr->LoadDoc( rPam ); + } + catch( const std::exception& ) + { + nRet = ERR_WW8_NO_WW8_FILE_ERR; + } delete pRdr; if( refStrm.Is() ) diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 75454dddbc58..a9a60a01147a 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1400,7 +1400,9 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_) pLFOInfo->pNumRule->Set(aLFOLVL.nLevel, aNumFmt); } bLVLOk = true; - pLFOInfo->maOverrides[aLFOLVL.nLevel] = aLFOLVL; + + if (nMaxLevel > aLFOLVL.nLevel) + pLFOInfo->maOverrides[aLFOLVL.nLevel] = aLFOLVL; } if( !bLVLOk ) break; diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index d318522100cf..171e45260818 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -892,11 +892,18 @@ void WW8SprmIter::SetSprms(const BYTE* pSprms_, long nLen_) const BYTE* WW8SprmIter::operator ++( int ) { - if (nRemLen > 0) + if (nRemLen > 0 ) { - pSprms += nAktSize; - nRemLen -= nAktSize; - UpdateMyMembers(); + if( nRemLen >= nAktSize ) + { + pSprms += nAktSize; + nRemLen -= nAktSize; + UpdateMyMembers(); + } + else + { + throw( ::std::exception() ); + } } return pSprms; } @@ -3247,6 +3254,8 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p) Otherwise our cool fastsave algorithm can be brought to bear on the problem. */ + if( !pPieceIter ) + return; ULONG nOldPos = pPieceIter->GetIdx(); bool bOk = pPieceIter->SeekPos(nOrigCp); pPieceIter->SetIdx( nOldPos ); @@ -7179,8 +7188,16 @@ void WW8DopTypography::ReadFromMem(BYTE *&pData) for (i=0; i < nMaxLeading; ++i) rgxchLPunct[i] = Get_Short(pData); - rgxchFPunct[cchFollowingPunct]=0; - rgxchLPunct[cchLeadingPunct]=0; + if (cchFollowingPunct >= 0 && cchFollowingPunct < nMaxFollowing) + rgxchFPunct[cchFollowingPunct]=0; + else + rgxchFPunct[nMaxFollowing - 1]=0; + + if (cchLeadingPunct >= 0 && cchLeadingPunct < nMaxLeading) + rgxchLPunct[cchLeadingPunct]=0; + else + rgxchLPunct[nMaxLeading - 1]=0; + } void WW8DopTypography::WriteToMem(BYTE *&pData) const diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index 5a8f201f7cb0..07a4c911fc7e 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -926,9 +926,15 @@ sal_Bool SvXMLExportItemMapper::QueryXMLValue( if( MID_PAGEDESC_PAGENUMOFFSET==nMemberId ) { - - rUnitConverter.convertNumber( - aOut, (sal_Int32)pPageDesc->GetNumOffset() ); + sal_Int32 const number(pPageDesc->GetNumOffset()); + if (0 >= number) + { + aOut.append(GetXMLToken(XML_AUTO)); + } + else // #i114163# positiveInteger only! + { + rUnitConverter.convertNumber(aOut, number); + } bOk = sal_True; } } diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 7b5741316cbb..5049220b1b5a 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -193,15 +193,51 @@ class SwAnchorMarker SdrHdl* pHdl; Point aHdlPos; Point aLastPos; + // --> OD 2010-09-16 #i114522# + bool bTopRightHandle; + // <-- public: - SwAnchorMarker( SdrHdl* pH ) : - pHdl( pH ), aHdlPos( pH->GetPos() ), aLastPos( pH->GetPos() ) {} + SwAnchorMarker( SdrHdl* pH ) + : pHdl( pH ) + , aHdlPos( pH->GetPos() ) + , aLastPos( pH->GetPos() ) + // --> OD 2010-09-16 #i114522# + , bTopRightHandle( pH->GetKind() == HDL_ANCHOR_TR ) + // <-- + {} const Point& GetLastPos() const { return aLastPos; } void SetLastPos( const Point& rNew ) { aLastPos = rNew; } void SetPos( const Point& rNew ) { pHdl->SetPos( rNew ); } const Point& GetPos() { return pHdl->GetPos(); } const Point& GetHdlPos() { return aHdlPos; } - void ChgHdl( SdrHdl* pNew ) { pHdl = pNew; } + void ChgHdl( SdrHdl* pNew ) + { + pHdl = pNew; + // --> OD 2010-09-16 #i114522# + if ( pHdl ) + { + bTopRightHandle = (pHdl->GetKind() == HDL_ANCHOR_TR); + } + // <-- + } + // --> OD 2010-09-16 #i114522# + const Point GetPosForHitTest( const OutputDevice& rOut ) + { + Point aHitTestPos( GetPos() ); + aHitTestPos = rOut.LogicToPixel( aHitTestPos ); + if ( bTopRightHandle ) + { + aHitTestPos += Point( -1, 1 ); + } + else + { + aHitTestPos += Point( 1, 1 ); + } + aHitTestPos = rOut.PixelToLogic( aHitTestPos ); + + return aHitTestPos; + } + // <-- }; struct QuickHelpData @@ -3609,7 +3645,10 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) // So the pAnchorMarker has to find the right SdrHdl, if it's // the old one, it will find it with position aOld, if this one // is destroyed, it will find a new one at position GetHdlPos(). - Point aOld = pAnchorMarker->GetPos(); + // --> OD 2010-09-16 #i114522# +// const Point aOld = pAnchorMarker->GetPos(); + const Point aOld = pAnchorMarker->GetPosForHitTest( *(rSh.GetOut()) ); + // <-- Point aNew = rSh.FindAnchorPos( aDocPt ); SdrHdl* pHdl; if( (0!=( pHdl = pSdrView->PickHandle( aOld ) )|| diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index 0c7d7909ad7a..281e3ce3fabb 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -823,7 +823,7 @@ void SwSpellPopup::Execute( USHORT nId ) else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END) { OUString aWord( xSpellAlt->getWord() ); - DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" ); +// DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" ); PopupMenu *pMenu = GetPopupMenu(MN_ADD_TO_DIC); String aDicName ( pMenu->GetItemText(nId) ); diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index d499add5ad53..27fe1a65641f 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -108,7 +108,7 @@ using namespace ::com::sun::star; -SFX_IMPL_VIEWFACTORY(SwPagePreView, SW_RES(STR_NONAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SwPagePreView, "PrintPreview") { SFX_VIEW_REGISTRATION(SwDocShell); SFX_VIEW_REGISTRATION(SwWebDocShell); diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 801ecba22c73..667beb8ab4ca 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -125,7 +125,7 @@ using ::com::sun::star::util::SearchOptions; -SFX_IMPL_VIEWFACTORY(SwSrcView, SW_RES(STR_NONAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SwSrcView, "SourceView") { SFX_VIEW_REGISTRATION(SwWebDocShell); } diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index 9d905a4c3443..93a29f699f5a 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -105,7 +105,7 @@ using ::rtl::OUString; #include <unomid.h> -SFX_IMPL_VIEWFACTORY(SwView, SW_RES(STR_NONAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SwView, "Default") { if ( SvtModuleOptions().IsWriter() ) { diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 0579d180a04c..38a9f1fc5337 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -82,6 +82,7 @@ #include <svx/xmleohlp.hxx> #include <globals.hrc> #include <unomid.h> +#include <unotools/printwarningoptions.hxx> #include <com/sun/star/util/SearchOptions.hpp> #include <com/sun/star/lang/ServiceNotRegisteredException.hpp> @@ -2732,10 +2733,21 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount( // since printing now also use the API for PDF export this option // should be set for printing as well ... pWrtShell->SetPDFExportOption( sal_True ); + bool bOrigStatus = pRenderDocShell->IsEnableSetModified(); + // check configuration: shall update of printing information in DocInfo set the document to "modified"? + bool bStateChanged = false; + if ( bOrigStatus && !SvtPrintWarningOptions().IsModifyDocumentOnPrintingAllowed() ) + { + pRenderDocShell->EnableSetModified( sal_False ); + bStateChanged = true; + } + // --> FME 2005-05-23 #122919# Force field update before PDF export: pWrtShell->ViewShell::UpdateFlds(TRUE); // <-- + if( bStateChanged ) + pRenderDocShell->EnableSetModified( sal_True ); // there is some redundancy between those two function calls, but right now // there is no time to sort this out. @@ -2844,7 +2856,14 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer( uno::Sequence< beans::PropertyValue > aRenderer; if (m_pRenderData) { - const USHORT nPage = nRenderer + 1; + // --> TL, OD 2010-09-07 #i114210# + // determine the correct page number from the renderer index + // --> OD 2010-10-01 #i114875 + // consider brochure print + const USHORT nPage = bPrintProspect + ? nRenderer + 1 + : m_pRenderData->GetPagesToPrint()[ nRenderer ]; + // <-- // get paper tray to use ... sal_Int32 nPrinterPaperTray = -1; diff --git a/sw/source/ui/web/wview.cxx b/sw/source/ui/web/wview.cxx index 9a55aaf94a28..1822ab2de4e8 100644 --- a/sw/source/ui/web/wview.cxx +++ b/sw/source/ui/web/wview.cxx @@ -93,7 +93,7 @@ #include <swslots.hxx> -SFX_IMPL_VIEWFACTORY(SwWebView, SW_RES(STR_NONAME)) +SFX_IMPL_NAMED_VIEWFACTORY(SwWebView, "Default") { SFX_VIEW_REGISTRATION(SwWebDocShell); } |