diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/CppunitTest_sw_swdoc_test.mk | 2 | ||||
-rw-r--r-- | sw/CppunitTest_sw_test_filters.mk | 2 | ||||
-rw-r--r-- | sw/source/core/crsr/crossrefbookmark.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/doc/docnum.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/docnode/ndcopy.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/inc/frame.hxx | 3 | ||||
-rw-r--r-- | sw/source/core/layout/layact.cxx | 57 | ||||
-rwxr-xr-x | sw/source/core/layout/paintfrm.cxx | 87 | ||||
-rw-r--r-- | sw/source/core/unocore/unocoll.cxx | 7 | ||||
-rw-r--r-- | sw/source/core/unocore/unotext.cxx | 26 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxexportfilter.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 9 | ||||
-rw-r--r-- | sw/source/ui/uiview/view2.cxx | 11 | ||||
-rw-r--r-- | sw/source/ui/utlui/uitool.cxx | 3 | ||||
-rw-r--r-- | sw/source/ui/vba/vbarows.cxx | 16 |
15 files changed, 161 insertions, 78 deletions
diff --git a/sw/CppunitTest_sw_swdoc_test.mk b/sw/CppunitTest_sw_swdoc_test.mk index b685b8eed627..d2dfb06d95c5 100644 --- a/sw/CppunitTest_sw_swdoc_test.mk +++ b/sw/CppunitTest_sw_swdoc_test.mk @@ -113,10 +113,10 @@ $(eval $(call gb_RdbTarget_add_components,sw_swdoc_test,\ unoxml/source/service/unoxml \ fileaccess/source/fileacc \ comphelper/util/comphelp \ + i18npool/util/i18npool \ )) $(eval $(call gb_RdbTarget_add_old_components,sw_swdoc_test,\ - i18npool \ ucb1 \ ucpfile1 \ )) diff --git a/sw/CppunitTest_sw_test_filters.mk b/sw/CppunitTest_sw_test_filters.mk index dc28412c3a83..18a2e2af3eb9 100644 --- a/sw/CppunitTest_sw_test_filters.mk +++ b/sw/CppunitTest_sw_test_filters.mk @@ -95,10 +95,10 @@ $(eval $(call gb_RdbTarget_add_components,sw_filters_test,\ unoxml/source/service/unoxml \ fileaccess/source/fileacc \ comphelper/util/comphelp \ + i18npool/util/i18npool \ )) $(eval $(call gb_RdbTarget_add_old_components,sw_filters_test,\ - i18npool \ package2 \ ucb1 \ ucpfile1 \ diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx index 3f649ef7ed56..d7a6280bbdea 100644 --- a/sw/source/core/crsr/crossrefbookmark.cxx +++ b/sw/source/core/crsr/crossrefbookmark.cxx @@ -56,10 +56,10 @@ namespace sw { namespace mark void CrossRefBookmark::SetMarkPos(const SwPosition& rNewPos) { OSL_PRECOND(rNewPos.nNode.GetNode().GetTxtNode(), - "<SwCrossRefBookmark::SetMarkPos(..)>" + "<sw::mark::CrossRefBookmark::SetMarkPos(..)>" " - new bookmark position for cross-reference bookmark doesn't mark text node"); OSL_PRECOND(rNewPos.nContent.GetIndex() == 0, - "<SwCrossRefBookmark::SetMarkPos(..)>" + "<sw::mark::CrossRefBookmark::SetMarkPos(..)>" " - new bookmark position for cross-reference bookmark doesn't mark start of text node"); MarkBase::SetMarkPos(rNewPos); } @@ -67,7 +67,7 @@ namespace sw { namespace mark SwPosition& CrossRefBookmark::GetOtherMarkPos() const { OSL_PRECOND(false, - "<SwCrossRefBookmark::GetOtherMarkPos(..)>" + "<sw::mark::CrossRefBookmark::GetOtherMarkPos(..)>" " - this should never be called!"); return *static_cast<SwPosition*>(NULL); } diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index fa3761491dad..51d0eceeeada 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -63,6 +63,7 @@ #include <list.hxx> #include <listfunc.hxx> #include <switerator.hxx> +#include <comphelper/string.hxx> #include <map> @@ -641,7 +642,7 @@ sal_uInt16 lcl_FindOutlineNum( const SwNodes& rNds, String& rName ) nPos = 0; sNum = sName.GetToken( 0, '.', nPos ); // #i4533# without this check all parts delimited by a dot are treated as outline numbers - if(!ByteString(sNum, gsl_getSystemTextEncoding()).IsNumericAscii()) + if(!comphelper::string::isAsciiDecimalString(sNum)) nPos = STRING_NOTFOUND; } rName = sName; // das ist der nachfolgende Text. @@ -727,7 +728,7 @@ sal_Bool SwDoc::GotoOutline( SwPosition& rPos, const String& rName ) const String sTempNum; while(sExpandedText.Len() && (sTempNum = sExpandedText.GetToken(0, '.', nPos)).Len() && STRING_NOTFOUND != nPos && - ByteString(sTempNum, gsl_getSystemTextEncoding()).IsNumericAscii()) + comphelper::string::isAsciiDecimalString(sTempNum)) { sExpandedText.Erase(0, nPos); nPos = 0; diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx index a4ee1447052e..97709cd98e8f 100644 --- a/sw/source/core/docnode/ndcopy.cxx +++ b/sw/source/core/docnode/ndcopy.cxx @@ -206,10 +206,9 @@ namespace ::sw::mark::IFieldmark::parameter_map_t* pNewParams = pNewFieldmark->GetParameters(); const ::sw::mark::IFieldmark::parameter_map_t* pOldParams = pOldFieldmark->GetParameters(); ::sw::mark::IFieldmark::parameter_map_t::const_iterator pIt = pOldParams->begin(); - while ( pIt != pOldParams->end() ) + for (; pIt != pOldParams->end(); ++pIt ) { pNewParams->insert( *pIt ); - pIt++; } } diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 74e33df9aa76..b4e445315c88 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -526,7 +526,8 @@ public: const sal_Bool bLowerMode = sal_False, const sal_Bool bLowerBorder = sal_False ) const; void PaintBorderLine( const SwRect&, const SwRect&, const SwPageFrm*, - const Color *pColor, const editeng::SvxBorderStyle = editeng::SOLID ) const; + const Color *pColor, const editeng::SvxBorderStyle = editeng::SOLID, + sal_Bool bGhosted = sal_False ) const; drawinglayer::processor2d::BaseProcessor2D * CreateProcessor2D( ) const; void ProcessPrimitives( const drawinglayer::primitive2d::Primitive2DSequence& rSequence ) const; diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index e1289c2dc2ea..aa1b56138286 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -656,15 +656,14 @@ void SwLayAction::InternalAction() pRoot->DeleteEmptySct(); XCHECKPAGE; - // OD 2004-05-12 #i28701# - scope for instance of class - // <NotifyLayoutOfPageInProgress> + // #i28701# - scope for instance of class <NotifyLayoutOfPageInProgress> { NotifyLayoutOfPageInProgress aLayoutOfPageInProgress( *pPage ); while ( !IsInterrupt() && !IsNextCycle() && ((IS_FLYS && IS_INVAFLY) || pPage->IsInvalid()) ) { - // OD 2004-05-10 #i28701# + // #i28701# SwObjectFormatter::FormatObjsAtFrm( *pPage, *pPage, this ); if ( !IS_FLYS ) { @@ -673,7 +672,7 @@ void SwLayAction::InternalAction() pPage->ValidateFlyLayout(); pPage->ValidateFlyCntnt(); } - // OD 2004-05-10 #i28701# - change condition + // #i28701# - change condition while ( !IsInterrupt() && !IsNextCycle() && ( pPage->IsInvalid() || (IS_FLYS && IS_INVAFLY) ) ) @@ -681,7 +680,7 @@ void SwLayAction::InternalAction() PROTOCOL( pPage, PROT_FILE_INIT, 0, 0) XCHECKPAGE; - // FME 2007-08-30 #i81146# new loop control + // #i81146# new loop control sal_uInt16 nLoopControlRuns_1 = 0; const sal_uInt16 nLoopControlMax = 20; @@ -701,7 +700,7 @@ void SwLayAction::InternalAction() FormatLayout( pPage ); XCHECKPAGE; } - // OD 2004-05-10 #i28701# - change condition + // #i28701# - change condition if ( !IsNextCycle() && ( pPage->IsInvalidCntnt() || (IS_FLYS && IS_INVAFLY) ) ) @@ -833,7 +832,7 @@ void SwLayAction::InternalAction() if( pPg != pPage ) pPg = pPg ? (SwPageFrm*)pPg->GetPrev() : pPage; - // OD 14.04.2003 #106346# - set flag for interrupt content formatting + // set flag for interrupt content formatting mbFormatCntntOnInterrupt = IsInput() && !IsStopPrt(); long nBottom = rVis.Bottom(); // #i42586# - format current page, if idle action is active @@ -847,16 +846,14 @@ void SwLayAction::InternalAction() XCHECKPAGE; - // FME 2007-08-30 #i81146# new loop control + // #i81146# new loop control sal_uInt16 nLoopControlRuns_2 = 0; const sal_uInt16 nLoopControlMax = 20; - // OD 14.04.2003 #106346# - special case: interrupt content formatting - // #i28701# - conditions, introduced by #106346#, - // are incorrect (marcos IS_FLYS and IS_INVAFLY only works for <pPage>) - // and are too strict. - // #i50432# - adjust interrupt formatting to - // normal page formatting - see above. + // special case: interrupt content formatting + // #i28701# - conditions are incorrect (macros IS_FLYS and IS_INVAFLY only + // works for <pPage>) and are too strict. + // #i50432# - adjust interrupt formatting to normal page formatting - see above. while ( ( mbFormatCntntOnInterrupt && ( pPg->IsInvalid() || ( pPg->GetSortedObjs() && pPg->IsInvalidFly() ) ) ) || @@ -865,14 +862,13 @@ void SwLayAction::InternalAction() XCHECKPAGE; // #i50432# - format also at-page anchored objects SwObjectFormatter::FormatObjsAtFrm( *pPg, *pPg, this ); - // #i50432# if ( !pPg->GetSortedObjs() ) { pPg->ValidateFlyLayout(); pPg->ValidateFlyCntnt(); } - // FME 2007-08-30 #i81146# new loop control + // #i81146# new loop control sal_uInt16 nLoopControlRuns_3 = 0; while ( pPg->IsInvalidLayout() ) @@ -898,7 +894,7 @@ void SwLayAction::InternalAction() { pPg->ValidateFlyInCnt(); pPg->ValidateCntnt(); - // #i26945# - follow-up of fix #117736# + // #i26945# pPg->ValidateFlyLayout(); pPg->ValidateFlyCntnt(); @@ -915,12 +911,11 @@ void SwLayAction::InternalAction() XCHECKPAGE; pPg->InvalidateCntnt(); pPg->InvalidateFlyInCnt(); - // #i26945# - follow-up of fix #117736# + // #i26945# pPg->InvalidateFlyLayout(); pPg->InvalidateFlyCntnt(); } - // #i46807# - we are statisfied, if the - // content is formatted once complete. + // #i46807# - we are statisfied, if the content is formatted once complete. else { break; @@ -929,7 +924,7 @@ void SwLayAction::InternalAction() } pPg = (SwPageFrm*)pPg->GetNext(); } - // OD 14.04.2003 #106346# - reset flag for special interrupt content formatting. + // reset flag for special interrupt content formatting. mbFormatCntntOnInterrupt = sal_False; } pOptTab = 0; @@ -1795,7 +1790,25 @@ sal_Bool SwLayAction::FormatCntnt( const SwPageFrm *pPage ) const ViewShell *pSh = pRoot->GetCurrShell(); const sal_Bool bBrowse = pSh && pSh->GetViewOptions()->getBrowseMode(); - while ( pCntnt && pPage->IsAnLower( pCntnt ) ) + // Check if there is a footer frame and if it's in an invalid state. + // In such a case, redraw the whole page to properly update the + // header/footer decorators + const SwFrm *pLay = pPage->Lower(); + bool bPaintWholePage = false; + + if ( pLay ) + { + while ( pLay->GetNext() ) + pLay = pLay->GetNext(); + + if ( pLay->IsFooterFrm() ) + { + bPaintWholePage = true; + pImp->GetShell()->AddPaintRect( pPage->Frm() ); + } + } + + while ( !bPaintWholePage && pCntnt && pPage->IsAnLower( pCntnt ) ) { //Wenn der Cntnt sich eh nicht veraendert koennen wir ein paar //Abkuerzungen nutzen. diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index e5dfe7d07acb..b699bfdf6839 100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -167,13 +167,14 @@ class SwLineRect : public SwRect { Color aColor; SvxBorderStyle nStyle; + sal_Bool bGhosted; const SwTabFrm *pTab; sal_uInt8 nSubColor; //Hilfslinien einfaerben sal_Bool bPainted; //schon gepaintet? sal_uInt8 nLock; //Um die Linien zum Hell-Layer abzugrenzen. public: SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle, - const SwTabFrm *pT , const sal_uInt8 nSCol ); + const SwTabFrm *pT , const sal_uInt8 nSCol, sal_Bool bGhost ); const Color *GetColor() const { return &aColor;} SvxBorderStyle GetStyle() const { return nStyle; } @@ -186,7 +187,8 @@ public: } sal_Bool IsPainted() const { return bPainted; } sal_Bool IsLocked() const { return nLock != 0; } - sal_uInt8 GetSubColor() const { return nSubColor;} + sal_uInt8 GetSubColor() const { return nSubColor;} + sal_Bool IsGhosted() const { return bGhosted; } sal_Bool MakeUnion( const SwRect &rRect ); }; @@ -199,7 +201,7 @@ class SwLineRects : public SwLRects public: SwLineRects() : nLastCount( 0 ) {} void AddLineRect( const SwRect& rRect, const Color *pColor, const SvxBorderStyle nStyle, - const SwTabFrm *pTab, const sal_uInt8 nSCol ); + const SwTabFrm *pTab, const sal_uInt8 nSCol, sal_Bool bGhosted ); void ConnectEdges( OutputDevice *pOut ); void PaintLines ( OutputDevice *pOut ); void LockLines( sal_Bool bLock ); @@ -414,9 +416,10 @@ SwSavePaintStatics::~SwSavePaintStatics() SV_IMPL_VARARR( SwLRects, SwLineRect ); SwLineRect::SwLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyl, - const SwTabFrm *pT, const sal_uInt8 nSCol ) : + const SwTabFrm *pT, const sal_uInt8 nSCol, sal_Bool bGhost ) : SwRect( rRect ), nStyle( nStyl ), + bGhosted( bGhost ), pTab( pT ), nSubColor( nSCol ), bPainted( sal_False ), @@ -464,7 +467,7 @@ sal_Bool SwLineRect::MakeUnion( const SwRect &rRect ) } void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol, const SvxBorderStyle nStyle, - const SwTabFrm *pTab, const sal_uInt8 nSCol ) + const SwTabFrm *pTab, const sal_uInt8 nSCol, sal_Bool bGhosted ) { //Rueckwaerts durch, weil Linien die zusammengefasst werden koennen i.d.R. //im gleichen Kontext gepaintet werden. @@ -482,7 +485,7 @@ void SwLineRects::AddLineRect( const SwRect &rRect, const Color *pCol, const Svx return; } } - Insert( SwLineRect( rRect, pCol, nStyle, pTab, nSCol ), Count() ); + Insert( SwLineRect( rRect, pCol, nStyle, pTab, nSCol, bGhosted ), Count() ); } void SwLineRects::ConnectEdges( OutputDevice *pOut ) @@ -590,7 +593,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut ) continue; const sal_uInt16 nTmpFree = Free(); Insert( SwLineRect( aIns, rL1.GetColor(), SOLID, - rL1.GetTab(), SUBCOL_TAB ), Count() ); + rL1.GetTab(), SUBCOL_TAB, sal_False ), Count() ); if ( !nTmpFree ) { --i; @@ -631,7 +634,7 @@ void SwLineRects::ConnectEdges( OutputDevice *pOut ) continue; const sal_uInt16 nTmpFree = Free(); Insert( SwLineRect( aIns, rL1.GetColor(), SOLID, - rL1.GetTab(), SUBCOL_TAB ), Count() ); + rL1.GetTab(), SUBCOL_TAB, sal_False ), Count() ); if ( !nTmpFree ) { --i; @@ -659,7 +662,7 @@ inline void SwSubsRects::Ins( const SwRect &rRect, const sal_uInt8 nSCol ) { // Lines that are shorted than the largest line width won't be inserted if ( rRect.Height() > DEF_LINE_WIDTH_4 || rRect.Width() > DEF_LINE_WIDTH_4 ) - Insert( SwLineRect( rRect, 0, SOLID, 0, nSCol ), Count()); + Insert( SwLineRect( rRect, 0, SOLID, 0, nSCol, sal_False ), Count()); } void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects ) @@ -714,7 +717,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects ) SwRect aNewSubsRect( aSubsLineRect ); aNewSubsRect.Bottom( nTmp ); Insert( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0, - aSubsLineRect.GetSubColor() ), Count()); + aSubsLineRect.GetSubColor(), sal_False ), Count()); } nTmp = rLine.Bottom()+nPixelSzH+1; if ( aSubsLineRect.Bottom() > nTmp ) @@ -722,7 +725,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects ) SwRect aNewSubsRect( aSubsLineRect ); aNewSubsRect.Top( nTmp ); Insert( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0, - aSubsLineRect.GetSubColor() ), Count()); + aSubsLineRect.GetSubColor(), sal_False ), Count()); } Remove( i, 1 ); --i; @@ -740,7 +743,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects ) SwRect aNewSubsRect( aSubsLineRect ); aNewSubsRect.Right( nTmp ); Insert( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0, - aSubsLineRect.GetSubColor() ), Count()); + aSubsLineRect.GetSubColor(), sal_False ), Count()); } nTmp = rLine.Right()+nPixelSzW+1; if ( aSubsLineRect.Right() > nTmp ) @@ -748,7 +751,7 @@ void SwSubsRects::RemoveSuperfluousSubsidiaryLines( const SwLineRects &rRects ) SwRect aNewSubsRect( aSubsLineRect ); aNewSubsRect.Left( nTmp ); Insert( SwLineRect( aNewSubsRect, 0, aSubsLineRect.GetStyle(), 0, - aSubsLineRect.GetSubColor() ), Count()); + aSubsLineRect.GetSubColor(), sal_False ), Count()); } Remove( i, 1 ); --i; @@ -826,6 +829,14 @@ void SwLineRects::PaintLines( OutputDevice *pOut ) for ( i = 0; i < Count(); ++i ) { SwLineRect &rLRect = operator[](i); + sal_uLong nDrawMode = pOut->GetDrawMode(); + + if ( rLRect.IsGhosted() ) + { + pOut->SetDrawMode( DRAWMODE_GHOSTEDLINE | DRAWMODE_GHOSTEDFILL | + DRAWMODE_GHOSTEDTEXT | DRAWMODE_GHOSTEDBITMAP | + DRAWMODE_GHOSTEDGRADIENT ); + } if ( rLRect.IsPainted() ) continue; @@ -885,6 +896,8 @@ void SwLineRects::PaintLines( OutputDevice *pOut ) } else bPaint2nd = sal_True; + + pOut->SetDrawMode( nDrawMode ); } if ( bPaint2nd ) for ( i = 0; i < Count(); ++i ) @@ -4097,7 +4110,8 @@ void SwFrm::PaintBorderLine( const SwRect& rRect, const SwRect& rOutRect, const SwPageFrm *pPage, const Color *pColor, - const SvxBorderStyle nStyle ) const + const SvxBorderStyle nStyle, + sal_Bool bGhosted ) const { if ( !rOutRect.IsOver( rRect ) ) return; @@ -4120,10 +4134,10 @@ void SwFrm::PaintBorderLine( const SwRect& rRect, SwRegionRects aRegion( aOut, 4, 1 ); ::lcl_SubtractFlys( this, pPage, aOut, aRegion ); for ( sal_uInt16 i = 0; i < aRegion.Count(); ++i ) - pLines->AddLineRect( aRegion[i], pColor, nStyle, pTab, nSubCol ); + pLines->AddLineRect( aRegion[i], pColor, nStyle, pTab, nSubCol, bGhosted ); } else - pLines->AddLineRect( aOut, pColor, nStyle, pTab, nSubCol ); + pLines->AddLineRect( aOut, pColor, nStyle, pTab, nSubCol, bGhosted ); } /************************************************************************* @@ -4937,8 +4951,22 @@ void SwFtnContFrm::PaintLine( const SwRect& rRect, : SwRect( Point( nX, Frm().Pos().Y() + rInf.GetTopDist() ), Size( nWidth, rInf.GetLineWidth())); if ( aLineRect.HasArea() ) + { + ViewShell* pShell = getRootFrm()->GetCurrShell(); + + sal_Bool bGhosted = sal_False; + if ( !pShell->IsPreView() && + !pShell->GetViewOptions()->IsPDFExport() && + !pShell->GetViewOptions()->IsPrinting() ) + { + bool bInHdrFtr = FindFooterOrHeader( ) != NULL; + bool bEditHdrFtr = pShell->IsHeaderFooterEdit(); + bGhosted = ( bInHdrFtr && !bEditHdrFtr ) || ( !bInHdrFtr && bEditHdrFtr ); + } + PaintBorderLine( rRect, aLineRect , pPage, &rInf.GetLineColor(), - rInf.GetLineStyle() ); + rInf.GetLineStyle(), bGhosted ); + } } /************************************************************************* @@ -4992,13 +5020,26 @@ void SwLayoutFrm::PaintColLines( const SwRect &rRect, const SwFmtCol &rFmtCol, (aRect.*fnRect->fnSubLeft)( nPenHalf + nPixelSzW ); (aRect.*fnRect->fnAddRight)( nPenHalf + nPixelSzW ); SwRectGet fnGetX = IsRightToLeft() ? fnRect->fnGetLeft : fnRect->fnGetRight; + + sal_Bool bGhosted = sal_False; + + ViewShell* pShell = getRootFrm()->GetCurrShell(); + if ( !pShell->IsPreView() && + !pShell->GetViewOptions()->IsPDFExport() && + !pShell->GetViewOptions()->IsPrinting() ) + { + bool bInHdrFtr = FindFooterOrHeader( ) != NULL; + bool bEditHdrFtr = pShell->IsHeaderFooterEdit(); + bGhosted = ( bInHdrFtr && !bEditHdrFtr ) || ( !bInHdrFtr && bEditHdrFtr ); + } + while ( pCol->GetNext() ) { (aLineRect.*fnRect->fnSetPosX) ( (pCol->Frm().*fnGetX)() - nPenHalf ); if ( aRect.IsOver( aLineRect ) ) PaintBorderLine( aRect, aLineRect , pPage, &rFmtCol.GetLineColor(), - rFmtCol.GetLineStyle() ); + rFmtCol.GetLineStyle(), bGhosted ); pCol = pCol->GetNext(); } } @@ -6209,7 +6250,7 @@ void MA_FASTCALL lcl_RefreshLine( const SwLayoutFrm *pLay, SwRect aRect( aP1, aP2 ); // OD 18.11.2002 #99672# - use parameter <_pSubsLines> instead of // global variable <pSubsLines>. - _pSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor ); + _pSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor, sal_False ); } aP1 = aP2; aP1.*pDirPt += 1; @@ -6348,14 +6389,14 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage, if ( aOriginal.Left() == aOut.Left() ) { const SwRect aRect( aOut.Pos(), aLB ); - pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor ); + pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor, sal_False ); } // OD 14.11.2002 #104821# - in vertical layout set page/column break at right if ( aOriginal.Right() == nRight ) { const SwRect aRect( aRT, aRB ); pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0, - (bBreak && bVert) ? SUBCOL_BREAK : nSubColor ); + (bBreak && bVert) ? SUBCOL_BREAK : nSubColor, sal_False ); } } // OD 14.11.2002 #104822# - adjust control for drawing top and bottom lines @@ -6366,12 +6407,12 @@ void SwLayoutFrm::PaintSubsidiaryLines( const SwPageFrm *pPage, // OD 14.11.2002 #104821# - in horizontal layout set page/column break at top const SwRect aRect( aOut.Pos(), aRT ); pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0, - (bBreak && !bVert) ? SUBCOL_BREAK : nSubColor ); + (bBreak && !bVert) ? SUBCOL_BREAK : nSubColor, sal_False ); } if ( aOriginal.Bottom() == nBottom ) { const SwRect aRect( aLB, aRB ); - pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor ); + pUsedSubsLines->AddLineRect( aRect, 0, SOLID, 0, nSubColor, sal_False ); } } } diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index ab4950b6a129..a2e0dbc185c7 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -106,6 +106,13 @@ class SwVbaCodeNameProvider : public ::cppu::WeakImplHelper1< document::XCodeNam public: SwVbaCodeNameProvider( SwDocShell* pDocShell ) : mpDocShell( pDocShell ) {} // XCodeNameQuery + + rtl::OUString SAL_CALL getCodeNameForContainer( const uno::Reference< uno::XInterface >& /*xIf*/ ) throw( uno::RuntimeException ) + { + // not implemented... + return rtl::OUString(); + } + rtl::OUString SAL_CALL getCodeNameForObject( const uno::Reference< uno::XInterface >& xIf ) throw( uno::RuntimeException ) { // Initialise the code name diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 38c276378c78..860ffc71cd0f 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -355,7 +355,7 @@ throw (uno::RuntimeException) { bForceExpandHints = CheckForOwnMemberMeta(*pPam, bAbsorb); } - catch (lang::IllegalArgumentException & iae) + catch (const lang::IllegalArgumentException& iae) { // stupid method not allowed to throw iae throw uno::RuntimeException(iae.Message, 0); @@ -1325,13 +1325,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) SwUnoCursorHelper::SetPropertyValue(aPam, *pParaPropSet, pValues[nProp].Name, pValues[nProp].Value); } - catch (lang::IllegalArgumentException& rIllegal) + catch (const lang::IllegalArgumentException& rIllegal) { sMessage = rIllegal.Message; bIllegalException = true; break; } - catch (uno::RuntimeException& rRuntime) + catch (const uno::RuntimeException& rRuntime) { sMessage = rRuntime.Message; bRuntimeException = true; @@ -1437,13 +1437,13 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) pValues[nProp].Name, pValues[nProp].Value, nsSetAttrMode::SETATTR_NOFORMATATTR); } - catch( lang::IllegalArgumentException& rIllegal ) + catch (const lang::IllegalArgumentException& rIllegal) { sMessage = rIllegal.Message; bIllegalException = true; break; } - catch( uno::RuntimeException& rRuntime ) + catch (const uno::RuntimeException& rRuntime) { sMessage = rRuntime.Message; bRuntimeException = true; @@ -1703,12 +1703,12 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) m_pImpl->m_pDoc->DelFullPara(aStartPam); } } - catch (lang::IllegalArgumentException& rIllegal) + catch (const lang::IllegalArgumentException& rIllegal) { sMessage = rIllegal.Message; bIllegalException = true; } - catch (uno::RuntimeException& rRuntime) + catch (const uno::RuntimeException& rRuntime) { sMessage = rRuntime.Message; bRuntimeException = true; @@ -2096,7 +2096,7 @@ lcl_ApplyCellProperties( { xCellPS->setPropertyValue(rName, rValue); } - catch (uno::Exception const& e) + catch (const uno::Exception&) { // Apply the paragraph and char properties to the cell's content const uno::Reference< text::XText > xCellText(xCell, @@ -2218,7 +2218,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) xPrSet->setPropertyValue( pTableProperties[nProperty].Name, pTableProperties[nProperty].Value ); } - catch ( uno::Exception const& e ) + catch (const uno::Exception& e) { #if DEBUG std::clog << "Exception when setting property: "; @@ -2229,6 +2229,8 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) std::clog << rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_UTF8 ).getStr(); std::clog << std::endl; +#else + (void)e; #endif } } @@ -2270,13 +2272,11 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) // have to be applied lcl_MergeCells(aMergedCells); } - catch( const lang::WrappedTargetException& rWrapped ) + catch (const lang::WrappedTargetException&) { - (void)rWrapped; } - catch ( const lang::IndexOutOfBoundsException& rBounds ) + catch (const lang::IndexOutOfBoundsException&) { - (void)rBounds; } return xRet; diff --git a/sw/source/filter/ww8/docxexportfilter.hxx b/sw/source/filter/ww8/docxexportfilter.hxx index 68c11242ea0b..0efa82c8a3b1 100644 --- a/sw/source/filter/ww8/docxexportfilter.hxx +++ b/sw/source/filter/ww8/docxexportfilter.hxx @@ -47,7 +47,7 @@ public: virtual const ::oox::drawingml::Theme* getCurrentTheme() const { return NULL; } virtual sal_Int32 getSchemeClr( sal_Int32 ) const { return 0; } virtual ::oox::vml::Drawing* getVmlDrawing() { return NULL; } - virtual ::oox::drawingml::chart::ChartConverter& getChartConverter() { static ::oox::drawingml::chart::ChartConverter aConverter; return aConverter; } + virtual ::oox::drawingml::chart::ChartConverter* getChartConverter() { return NULL; } virtual const ::oox::drawingml::table::TableStyleListPtr getTableStyles() { return ::oox::drawingml::table::TableStyleListPtr(); } // Actual export of the DOCX document diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 11fd617e3671..8b6bf6615359 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2291,7 +2291,14 @@ SwTwips SwWW8ImplReader::MoveOutsideFly(SwFrmFmt *pFlyFmt, aSize.SetHeightSizeType(ATT_MIN_SIZE); aSize.SetHeight(MINLAY); pFlyFmt->SetFmtAttr(aSize); - pTblFmt->SetFmtAttr(SwFmtHoriOrient(0,text::HoriOrientation::FULL)); + SwFmtHoriOrient aHori = pTblFmt->GetHoriOrient(); + // passing the table orientaion of + // LEFT_AND_WIDTH to the frame seems to + // work better than FULL, especially if the + // table width exceeds the page width, however + // I am not brave enough to set it in all + // instances + pTblFmt->SetFmtAttr( SwFmtHoriOrient(0, ( aHori.GetHoriOrient() == text::HoriOrientation::LEFT_AND_WIDTH ) ? ::text::HoriOrientation::LEFT_AND_WIDTH : text::HoriOrientation::FULL ) ); nRetWidth = aSize.GetWidth(); } } diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx index b7cec7a5325a..89245c897ecb 100644 --- a/sw/source/ui/uiview/view2.cxx +++ b/sw/source/ui/uiview/view2.cxx @@ -1541,12 +1541,13 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq) { pDlg = pFact->CreateSvxZoomDialog(&GetViewFrame()->GetWindow(), aCoreSet); OSL_ENSURE(pDlg, "Dialogdiet fail!"); + if (pDlg) + { + pDlg->SetLimits( MINZOOM, MAXZOOM ); + if( pDlg->Execute() != RET_CANCEL ) + pSet = pDlg->GetOutputItemSet(); + } } - - pDlg->SetLimits( MINZOOM, MAXZOOM ); - - if( pDlg->Execute() != RET_CANCEL ) - pSet = pDlg->GetOutputItemSet(); } // PAGES01 diff --git a/sw/source/ui/utlui/uitool.cxx b/sw/source/ui/utlui/uitool.cxx index bef821dff6df..9c47e8502903 100644 --- a/sw/source/ui/utlui/uitool.cxx +++ b/sw/source/ui/utlui/uitool.cxx @@ -677,8 +677,7 @@ SwTwips GetTableWidth( SwFrmFmt* pFmt, SwTabCols& rCols, sal_uInt16 *pPercent, { if(pSh) { - const SwFrmFmt *pFlyFmt; - if ( 0 == (pFlyFmt = pSh->GetFlyFrmFmt()) ) + if ( 0 == pSh->GetFlyFrmFmt() ) { nWidth = pSh->GetAnyCurRect(RECT_PAGE_PRT).Width(); } diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx index 7b1f93925106..eb5327718a13 100644 --- a/sw/source/ui/vba/vbarows.cxx +++ b/sw/source/ui/vba/vbarows.cxx @@ -256,13 +256,27 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent ) throw (uno::RuntimeE setIndentWithAdjustNone( indent ); } - void SwVbaRows::setIndentWithAdjustProportional( const uno::Reference< word::XColumns >& xColumns, sal_Int32 indent ) throw (uno::RuntimeException) + void SwVbaRows::setIndentWithAdjustProportional( + const uno::Reference< word::XColumns >& xColumns, + sal_Int32 indent +) throw (uno::RuntimeException) { // calculate the new width and get the proportion between old and new uno::Reference< beans::XPropertySet > xTableProps( mxTextTable, uno::UNO_QUERY_THROW ); sal_Int32 nWidth = 0; xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ) ) >>= nWidth; sal_Int32 nNewWidth = nWidth - indent; + if ((nNewWidth <= 0) || (nWidth <= 0)) + { + throw uno::RuntimeException( + ::rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "Pb with width, in SwVbaRows::setIndentWithAdjustProportional (nNewWidth <= 0) || (nWidth <= 0)" + ) + ), + uno::Reference< uno::XInterface >() + ); + } double propFactor = (double)nNewWidth/(double)nWidth; // get all columns, calculate and set the new width of the columns |