summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/pch/precompiled_sw.hxx1
-rw-r--r--sw/qa/unoapi/sw.sce28
-rw-r--r--sw/source/core/crsr/findtxt.cxx14
-rw-r--r--sw/source/core/doc/acmplwrd.cxx1
-rw-r--r--sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx8
-rw-r--r--sw/source/core/text/txttab.cxx4
-rw-r--r--sw/source/core/unocore/unoidx.cxx7
-rw-r--r--sw/source/core/unocore/unoparagraph.cxx3
-rw-r--r--sw/source/core/unocore/unorefmk.cxx6
-rw-r--r--sw/source/core/unocore/unosect.cxx3
-rw-r--r--sw/source/filter/html/htmlform.cxx4
-rw-r--r--sw/source/filter/rtf/rtftbl.cxx7
-rw-r--r--sw/source/ui/docvw/SidebarTxtControlAcc.cxx2
-rw-r--r--sw/source/ui/lingu/olmenu.cxx24
14 files changed, 70 insertions, 42 deletions
diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx
index 5f27eabcc4..c208fc8404 100644
--- a/sw/inc/pch/precompiled_sw.hxx
+++ b/sw/inc/pch/precompiled_sw.hxx
@@ -921,7 +921,6 @@
#include "vcl/help.hxx"
#include "vcl/image.hxx"
#include "vcl/imagebtn.hxx"
-#include "vcl/imgcons.hxx"
#include "vcl/inputctx.hxx"
#include "vcl/jobset.hxx"
#include "vcl/keycod.hxx"
diff --git a/sw/qa/unoapi/sw.sce b/sw/qa/unoapi/sw.sce
index e57a6643cd..0f1092af8a 100644
--- a/sw/qa/unoapi/sw.sce
+++ b/sw/qa/unoapi/sw.sce
@@ -4,9 +4,9 @@
-o sw.ParagraphStyle
#i111197 -o sw.SwAccessibleDocumentPageView
#i86751 -o sw.SwAccessibleDocumentView
-#i111185 -o sw.SwAccessibleEndnoteView
+-o sw.SwAccessibleEndnoteView
-o sw.SwAccessibleFooterView
-#i111185 -o sw.SwAccessibleFootnoteView
+-o sw.SwAccessibleFootnoteView
-o sw.SwAccessibleHeaderView
#i89022 -o sw.SwAccessiblePageView
-o sw.SwAccessibleParagraphView
@@ -18,25 +18,25 @@
-o sw.SwXAutoTextContainer
-o sw.SwXAutoTextEntry
-o sw.SwXAutoTextGroup
-#i111185 -o sw.SwXBodyText
+-o sw.SwXBodyText
-o sw.SwXBookmark
-o sw.SwXBookmarks
-o sw.SwXCell
-o sw.SwXCellRange
-o sw.SwXChapterNumbering
-#i111185 -o sw.SwXDocumentIndex
-#i111185 -o sw.SwXDocumentIndexMark
+-o sw.SwXDocumentIndex
+-o sw.SwXDocumentIndexMark
-o sw.SwXDocumentIndexes
-o sw.SwXDrawPage
-#i111185 -o sw.SwXEndnoteProperties
+-o sw.SwXEndnoteProperties
-o sw.SwXFieldEnumeration
-o sw.SwXFieldMaster
-#i111185 -o sw.SwXFootnote
-#i111185 -o sw.SwXFootnoteProperties
-#i111185 -o sw.SwXFootnoteText
-#i111185 -o sw.SwXFootnotes
+-o sw.SwXFootnote
+-o sw.SwXFootnoteProperties
+-o sw.SwXFootnoteText
+-o sw.SwXFootnotes
-o sw.SwXFrames
-#i111185 -o sw.SwXHeadFootText
+-o sw.SwXHeadFootText
-o sw.SwXLineNumberingProperties
#i85640 -o sw.SwXMailMerge
-o sw.SwXModule
@@ -51,20 +51,20 @@
#i111190 -o sw.SwXShape
-o sw.SwXStyleFamilies
-o sw.SwXStyleFamily
-#i111185 -o sw.SwXTableCellText
+-o sw.SwXTableCellText
-o sw.SwXTableColumns
-o sw.SwXTableRows
-o sw.SwXTextColumns
-o sw.SwXTextCursor
#i89021 -o sw.SwXTextDefaults
-#i111185 -o sw.SwXTextDocument
+-o sw.SwXTextDocument
-o sw.SwXTextEmbeddedObject
-o sw.SwXTextEmbeddedObjects
-o sw.SwXTextField
-o sw.SwXTextFieldMasters
-o sw.SwXTextFieldTypes
-o sw.SwXTextFrame
-#i111185 -o sw.SwXTextFrameText
+-o sw.SwXTextFrameText
-o sw.SwXTextGraphicObject
-o sw.SwXTextGraphicObjects
#i103696 -o sw.SwXTextPortion
diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx
index 0097c225ae..814fd21bbf 100644
--- a/sw/source/core/crsr/findtxt.cxx
+++ b/sw/source/core/crsr/findtxt.cxx
@@ -53,8 +53,6 @@
#include <viewsh.hxx>
#include <vcl/window.hxx>
-#define POSTITMGR ((ViewShell*)pNode->GetDoc()->GetDocShell()->GetWrtShell())->GetPostItMgr()
-
using namespace ::com::sun::star;
using namespace util;
@@ -333,9 +331,13 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
}
+ SwDocShell *const pDocShell = pNode->GetDoc()->GetDocShell();
+ ViewShell *const pWrtShell = (pDocShell) ? (ViewShell*)(pDocShell->GetWrtShell()) : 0;
+ SwPostItMgr *const pPostItMgr = (pWrtShell) ? pWrtShell->GetPostItMgr() : 0;
+
xub_StrLen aStart = 0;
// do we need to finish a note?
- if (POSTITMGR->HasActiveSidebarWin())
+ if (pPostItMgr && pPostItMgr->HasActiveSidebarWin())
{
if (bSearchInNotes)
{
@@ -347,7 +349,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
--aNumberPostits;
}
//search inside and finsih and put focus back into the doc
- if (POSTITMGR->FinishSearchReplace(rSearchOpt,bSrchForward))
+ if (pPostItMgr->FinishSearchReplace(rSearchOpt,bSrchForward))
{
bFound = true ;
break;
@@ -355,7 +357,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
}
else
{
- POSTITMGR->SetActiveSidebarWin(0);
+ pPostItMgr->SetActiveSidebarWin(0);
}
}
@@ -391,7 +393,7 @@ BYTE SwPaM::Find( const SearchOptions& rSearchOpt, BOOL bSearchInNotes , utl::Te
if ( (bSrchForward && (GetPostIt(aLoop + aIgnore,pHts) < pHts->Count()) ) || ( !bSrchForward && (aLoop!=0) ))
{
const SwTxtAttr* pTxtAttr = bSrchForward ? (*pHts)[GetPostIt(aLoop+aIgnore,pHts)] : (*pHts)[GetPostIt(aLoop+aIgnore-1,pHts)];
- if ( POSTITMGR->SearchReplace(((SwTxtFld*)pTxtAttr)->GetFld(),rSearchOpt,bSrchForward) )
+ if ( pPostItMgr && pPostItMgr->SearchReplace(((SwTxtFld*)pTxtAttr)->GetFld(),rSearchOpt,bSrchForward) )
{
bFound = true ;
break;
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx
index 4941bb2ca8..5309a8152a 100644
--- a/sw/source/core/doc/acmplwrd.cxx
+++ b/sw/source/core/doc/acmplwrd.cxx
@@ -29,6 +29,7 @@
#include "precompiled_sw.hxx"
+#include <tools/urlobj.hxx>
#include <hintids.hxx>
#include <hints.hxx>
#include <unotools/transliterationwrapper.hxx>
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
index 01bf45871b..c2c1c2ad1d 100644
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
@@ -213,9 +213,11 @@ void SwToCntntAnchoredObjectPosition::CalcPosition()
!GetAnchoredObj().GetLastCharRect().Width() ) ||
!GetAnchoredObj().GetLastTopOfLine() )
{
- // --> OD 2004-07-15 #117380# - suppress check for paragraph
- // portion information by passing <false> as first parameter
- GetAnchoredObj().CheckCharRectAndTopOfLine( false );
+ // --> OD 2010-07-02 #i111886#
+ // Check existence of paragraph portion information in order
+ // to avoid formatting which could cause deletion of follow frames.
+ GetAnchoredObj().CheckCharRectAndTopOfLine();
+ // <--
// OD 2005-01-12 - Due to table break algorithm the character
// rectangle can have no height. Thus, check also the width
if ( ( !GetAnchoredObj().GetLastCharRect().Height() &&
diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx
index 9a1c66aac6..7f9bf2fcf4 100644
--- a/sw/source/core/text/txttab.cxx
+++ b/sw/source/core/text/txttab.cxx
@@ -194,6 +194,10 @@ SwTabPortion *SwTxtFormatter::NewTabPortion( SwTxtFormatInfo &rInf, bool bAuto )
}
SwTwips nCount = nSearchPos;
+ //Minimum tab stop width is 1
+ if (nDefTabDist <= 0)
+ nDefTabDist = 1;
+
nCount /= nDefTabDist;
nNextPos = nCount < 0 || (!nCount && nSearchPos <= 0)? nCount * nDefTabDist :( nCount + 1 ) * nDefTabDist ;
// --> FME 2004-09-21 #117919 Minimum tab stop width is 1 or 51 twips:
diff --git a/sw/source/core/unocore/unoidx.cxx b/sw/source/core/unocore/unoidx.cxx
index 1c24d55c89..2a9ea3c792 100644
--- a/sw/source/core/unocore/unoidx.cxx
+++ b/sw/source/core/unocore/unoidx.cxx
@@ -367,7 +367,8 @@ public:
*aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Index(eType)))
, m_eTOXType(eType)
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
- , m_bIsDescriptor(0 == pBaseSection)
+ // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
+ , m_bIsDescriptor((0 == pBaseSection) ? true : false)
, m_pDoc(&rDoc)
, m_pProps((m_bIsDescriptor)
? new SwDocIndexDescriptorProperties_Impl(rDoc.GetTOXType(eType, 0))
@@ -1625,7 +1626,9 @@ public:
*aSwMapProvider.GetPropertySet(lcl_TypeToPropertyMap_Mark(eType)))
, m_eTOXType(eType)
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
- , m_bIsDescriptor(0 == pMark)
+// #i112513#: unxsols4 (Sun C++ 5.9 SunOS_sparc) generates wrong code for this
+// , m_bIsDescriptor(0 == pMark)
+ , m_bIsDescriptor((0 == pMark) ? true : false)
, m_TypeDepend(this, pType)
, m_pTOXMark(pMark)
, m_pDoc(pDoc)
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index cda9c822ad..194f66a795 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -139,7 +139,8 @@ public:
, m_rThis(rThis)
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_PARAGRAPH))
- , m_bIsDescriptor(0 == pTxtNode)
+ // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
+ , m_bIsDescriptor((0 == pTxtNode) ? true : false)
, m_nSelectionStartPos(nSelStart)
, m_nSelectionEndPos(nSelEnd)
, m_xParentText(xParent)
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 244bc8dc5e..d088b6ca26 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -68,7 +68,8 @@ public:
SwDoc *const pDoc, SwFmtRefMark const*const pRefMark)
: SwClient((pDoc) ? pDoc->GetUnoCallBack() : 0)
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
- , m_bIsDescriptor(0 == pRefMark)
+ // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
+ , m_bIsDescriptor((0 == pRefMark) ? true : false)
, m_pDoc(pDoc)
, m_pMarkFmt(pRefMark)
{
@@ -762,7 +763,8 @@ public:
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
, m_pTextPortions( pPortions )
, m_bIsDisposed( false )
- , m_bIsDescriptor(0 == pMeta)
+ // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
+ , m_bIsDescriptor((0 == pMeta) ? true : false)
, m_xParentText(xParentText)
, m_Text(rDoc, rThis)
{
diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx
index 92fad90e82..6514ca6579 100644
--- a/sw/source/core/unocore/unosect.cxx
+++ b/sw/source/core/unocore/unosect.cxx
@@ -136,7 +136,8 @@ public:
, m_rPropSet(*aSwMapProvider.GetPropertySet(PROPERTY_MAP_SECTION))
, m_ListenerContainer(static_cast< ::cppu::OWeakObject* >(&rThis))
, m_bIndexHeader(bIndexHeader)
- , m_bIsDescriptor(0 == pFmt)
+ // #i111177# unxsols4 (Sun C++ 5.9 SunOS_sparc) may generate wrong code
+ , m_bIsDescriptor((0 == pFmt) ? true : false)
, m_pProps((pFmt) ? 0 : new SwTextSectionProperties_Impl())
{
}
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index b24a2bc3bf..06d9e29ca8 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -32,7 +32,6 @@
#include <hintids.hxx>
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
-#include <vcl/imgcons.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <svtools/htmlkywd.hxx>
@@ -68,6 +67,7 @@
#include <com/sun/star/awt/XTextLayoutConstrains.hpp>
#include <com/sun/star/awt/XLayoutConstrains.hpp>
#include <com/sun/star/awt/XImageConsumer.hpp>
+#include <com/sun/star/awt/ImageStatus.hpp>
#include <com/sun/star/form/XImageProducerSupplier.hpp>
#include <com/sun/star/form/XForm.hpp>
#include <doc.hxx>
@@ -599,7 +599,7 @@ void SwHTMLImageWatcher::complete( sal_Int32 Status,
const uno::Reference< awt::XImageProducer >& )
throw( uno::RuntimeException )
{
- if( IMAGEERROR == Status || IMAGEABORTED == Status )
+ if( awt::ImageStatus::IMAGESTATUS_ERROR == Status || awt::ImageStatus::IMAGESTATUS_ABORTED == Status )
{
// uns selbst abmelden und loeschen
clear();
diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx
index c3a89f70be..67dcd3f797 100644
--- a/sw/source/filter/rtf/rtftbl.cxx
+++ b/sw/source/filter/rtf/rtftbl.cxx
@@ -288,7 +288,12 @@ void SwRTFParser::ReadTable( int nToken )
break;
case RTF_CLMRG:
- aMergeBoxes[ nBoxCnt ] = TRUE;
+ // would crash later on reading \cellx (#i112657#):
+ // the first cell cannot be merged with earlier ones.
+ if (nBoxCnt != 0)
+ {
+ aMergeBoxes[ nBoxCnt ] = TRUE;
+ }
break;
case RTF_CELLX:
diff --git a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
index 8b0f029336..bd613fc7c0 100644
--- a/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControlAcc.cxx
@@ -80,7 +80,7 @@ class SidebarTextEditSource : public SvxEditSource,
SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl )
: SvxEditSource()
, mrSidebarTxtControl( rSidebarTxtControl )
- , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), NULL )
+ , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), FALSE )
, mViewForwarder( *(rSidebarTxtControl.GetTextView()) )
{
if ( mrSidebarTxtControl.GetTextView() )
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index 9a1d361012..87d5c000d3 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -398,7 +398,9 @@ bGrammarResults(false)
{
DBG_ASSERT(xSpellAlt.is(), "no spelling alternatives available");
- CreateAutoMnemonics();
+// CreateAutoMnemonics();
+ SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
+
nCheckedLanguage = LANGUAGE_NONE;
if (xSpellAlt.is())
{
@@ -471,7 +473,8 @@ bGrammarResults(false)
}
pMenu = GetPopupMenu(MN_ADD_TO_DIC);
- pMenu->CreateAutoMnemonics();
+// pMenu->CreateAutoMnemonics();
+ pMenu->SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS); //! necessary to retrieve the correct dictionary name in 'Execute' below
bEnable = FALSE; // enable MN_ADD_TO_DIC?
uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
if (xDicList.is())
@@ -572,7 +575,6 @@ bGrammarResults(false)
//////////////////////////////////////////////////////////////////////////////////
RemoveDisabledEntries( TRUE, TRUE );
- SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
}
/*--------------------------------------------------------------------------
@@ -599,7 +601,8 @@ aInfo16( SW_RES(IMG_INFO_16) )
InsertItem( MN_SHORT_COMMENT, aMessageText, MIB_NOSELECT, nPos++ );
SetItemImage( MN_SHORT_COMMENT, aInfo16 );
- CreateAutoMnemonics();
+// CreateAutoMnemonics();
+ SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
InsertSeparator( nPos++ );
sal_Int32 nStringCount = aSuggestions.getLength();
@@ -705,7 +708,6 @@ aInfo16( SW_RES(IMG_INFO_16) )
//////////////////////////////////////////////////////////////////////////////////
RemoveDisabledEntries( TRUE, TRUE );
- SetMenuFlags(MENU_FLAG_NOAUTOMNEMONICS);
}
/*--------------------------------------------------------------------------
@@ -821,12 +823,18 @@ void SwSpellPopup::Execute( USHORT nId )
else if (MN_DICTIONARIES_START <= nId && nId <= MN_DICTIONARIES_END)
{
OUString aWord( xSpellAlt->getWord() );
- USHORT nDicIdx = nId - MN_DICTIONARIES_START;
DBG_ASSERT( nDicIdx < aDics.getLength(), "dictionary index out of range" );
- if (nDicIdx < aDics.getLength())
+ PopupMenu *pMenu = GetPopupMenu(MN_ADD_TO_DIC);
+ String aDicName ( pMenu->GetItemText(nId) );
+
+ uno::Reference< linguistic2::XDictionary > xDic;
+ uno::Reference< linguistic2::XDictionaryList > xDicList( SvxGetDictionaryList() );
+ if (xDicList.is())
+ xDic = xDicList->getDictionaryByName( aDicName );
+
+ if (xDic.is())
{
- uno::Reference< linguistic2::XDictionary > xDic = aDics.getConstArray()[nDicIdx];
INT16 nAddRes = linguistic::AddEntryToDic( xDic, aWord, FALSE, aEmptyStr, LANGUAGE_NONE );
// save modified user-dictionary if it is persistent
uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY );