Commits

Kurt Zenker  committed a2a17e7 Merge

CWS-TOOLING: integrate CWS sw33bf06_OOO330

  • Participants
  • Parent commits 3b44cf9, 5d937e8

Comments (0)

Files changed (16)

File sfx2/source/view/viewimp.hxx

     ::svt::AcceleratorExecute*  pAccExec;
 	com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > aPrintOpts;
     ::rtl::Reference< SfxClipboardChangeListener > xClipboardListener;
-    vcl::PrinterController*     pPrinterController;
-    
+    ::boost::shared_ptr< vcl::PrinterController > m_pPrinterController;
+
     SfxViewShell_Impl();
 };
 

File sfx2/source/view/viewprn.cxx

 			mpObjectShell->EnableSetModified( m_bOrigStatus );
 			
 		if ( mpViewShell )
-    		mpViewShell->pImp->pPrinterController = 0;
+        {
+            mpViewShell->pImp->m_pPrinterController.reset();
+        }
 	}
 }
 
 																			   this,
                                                                                rProps
                                                                                ) );
-    pImp->pPrinterController = pController.get();
-                                                                                   
+    pImp->m_pPrinterController = pController;
+
     SfxObjectShell *pObjShell = GetObjectShell();
     pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "JobName" ) ),
                         makeAny( rtl::OUString( pObjShell->GetTitle(0) ) ) );
 
 Printer* SfxViewShell::GetActivePrinter() const
 {
-    return pImp->pPrinterController ? pImp->pPrinterController->getPrinter().get() : 0;
+    return (pImp->m_pPrinterController)
+        ?  pImp->m_pPrinterController->getPrinter().get() : 0;
 }
 
 void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )

File svtools/source/uno/unoimap.cxx

 SvUnoImageMapObject::SvUnoImageMapObject( UINT16 nType, const SvEventDescription* pSupportedMacroItems )
 :	PropertySetHelper( createPropertySetInfo( nType ) ),
 	mnType( nType )
+,   mbIsActive( true )
+,   mnRadius( 0 )
 {
 	mpEvents = new SvMacroTableEventDescriptor( pSupportedMacroItems );
 	mpEvents->acquire();
 SvUnoImageMapObject::SvUnoImageMapObject( const IMapObject& rMapObject, const SvEventDescription* pSupportedMacroItems )
 :	PropertySetHelper( createPropertySetInfo( rMapObject.GetType() ) ),
 	mnType( rMapObject.GetType() )
+,   mbIsActive( true )
+,   mnRadius( 0 )
 {
 	maURL = rMapObject.GetURL();
 	maAltText = rMapObject.GetAltText();

File sw/qa/unoapi/sw.sce

 -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
 -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
 #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

File sw/source/core/crsr/findtxt.cxx

 #include <viewsh.hxx>
 #include <vcl/window.hxx>
 
-#define POSTITMGR ((ViewShell*)pNode->GetDoc()->GetDocShell()->GetWrtShell())->GetPostItMgr()
-
 using namespace ::com::sun::star;
 using namespace util;
 
 
 			}
 
+            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)
 				{
 							--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;
 				}
 				else
 				{
-                    POSTITMGR->SetActiveSidebarWin(0);
+                    pPostItMgr->SetActiveSidebarWin(0);
 				}
 			}
 
 						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;

File sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx

                    !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() &&

File sw/source/core/text/txttab.cxx

 			}
             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:

File sw/source/core/unocore/unoidx.cxx

             *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))
             *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)

File sw/source/core/unocore/unoparagraph.cxx

         , 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)

File sw/source/core/unocore/unorefmk.cxx

             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)
     {
         , 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)
     {

File sw/source/core/unocore/unosect.cxx

         , 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())
     {
     }

File sw/source/filter/rtf/rtftbl.cxx

 			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:

File sw/source/ui/docvw/SidebarTxtControlAcc.cxx

 SidebarTextEditSource::SidebarTextEditSource( SidebarTxtControl& rSidebarTxtControl )
     : SvxEditSource()
     , mrSidebarTxtControl( rSidebarTxtControl )
-    , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), NULL )
+    , mTextForwarder( *(rSidebarTxtControl.GetTextView()->GetOutliner()), FALSE )
     , mViewForwarder( *(rSidebarTxtControl.GetTextView()) )
 {
     if ( mrSidebarTxtControl.GetTextView() )

File writerfilter/source/ooxml/OOXMLFastContextHandler.cxx

 : cppu::WeakImplHelper1<com::sun::star::xml::sax::XFastContextHandler>(),
   mpParent(pContext),
   mId(0),
+  mnDefine(0),
   mnToken(OOXML_FAST_TOKENS_END),
   mpStream(NULL),
   mnTableDepth(0),

File xmloff/source/core/RDFaExportHelper.cxx

 #include <comphelper/stlunosequence.hxx>
 #include <comphelper/stl_types.hxx>
 
+#include <com/sun/star/uri/XUriReference.hpp>
+#include <com/sun/star/uri/XUriReferenceFactory.hpp>
 #include <com/sun/star/rdf/Statement.hpp>
 #include <com/sun/star/rdf/URIs.hpp>
 #include <com/sun/star/rdf/URI.hpp>
     return buf.makeStringAndClear();
 }
 
+// #i112473# SvXMLExport::GetRelativeReference() not right for RDF on SaveAs
+// because the URIs in the repository are not rewritten on SaveAs, the
+// URI of the loaded document has to be used, not the URI of the target doc.
+static ::rtl::OUString
+getRelativeReference(SvXMLExport const& rExport, ::rtl::OUString const& rURI)
+{
+    uno::Reference< rdf::XURI > const xModelURI(
+        rExport.GetModel(), uno::UNO_QUERY_THROW );
+    ::rtl::OUString const baseURI( xModelURI->getStringValue() );
+
+    uno::Reference<uno::XComponentContext> const xContext(
+        rExport.GetComponentContext());
+    uno::Reference<lang::XMultiComponentFactory> const xServiceFactory(
+        xContext->getServiceManager(), uno::UNO_SET_THROW);
+    uno::Reference<uri::XUriReferenceFactory> const xUriFactory(
+        xServiceFactory->createInstanceWithContext(
+            ::rtl::OUString::createFromAscii(
+                "com.sun.star.uri.UriReferenceFactory"), xContext),
+        uno::UNO_QUERY_THROW);
+
+    uno::Reference< uri::XUriReference > const xBaseURI(
+        xUriFactory->parse(baseURI), uno::UNO_SET_THROW );
+    uno::Reference< uri::XUriReference > const xAbsoluteURI(
+        xUriFactory->parse(rURI), uno::UNO_SET_THROW );
+    uno::Reference< uri::XUriReference > const xRelativeURI(
+        xUriFactory->makeRelative(xBaseURI, xAbsoluteURI, true, true, false),
+        uno::UNO_SET_THROW );
+    ::rtl::OUString const relativeURI(xRelativeURI->getUriReference());
+
+    return relativeURI;
+}
+
+
 ////////////////////////////////////////////////////////////////////////////
 
 RDFaExportHelper::RDFaExportHelper(SvXMLExport & i_rExport)
         static const sal_Unicode s_OpenBracket ('[');
         static const sal_Unicode s_CloseBracket(']');
         const ::rtl::OUString about( xSubjectURI.is()
-            ?   m_rExport.GetRelativeReference(xSubjectURI->getStringValue())
+            ?   getRelativeReference(m_rExport, xSubjectURI->getStringValue())
             :   ::rtl::OUStringBuffer().append(s_OpenBracket).append(
                         LookupBlankNode(xSubjectBNode)).append(s_CloseBracket)
                     .makeStringAndClear()

File xmloff/source/text/XMLTextMarkImportContext.cxx

     const OUString& rLocalName )
     : SvXMLImportContext(rImport, nPrefix, rLocalName)
     , m_rHelper(rHlp)
+    , m_bHaveAbout(false)
 {
 }