summaryrefslogtreecommitdiff
path: root/sw/source/ui/uno
diff options
context:
space:
mode:
authorPhilipp Lohmann <Philipp.Lohmann@Sun.COM>2009-10-09 15:11:54 +0200
committerPhilipp Lohmann <Philipp.Lohmann@Sun.COM>2009-10-09 15:11:54 +0200
commiteb5cdebdf7e3ff4c8d9c4f26682892c861b0a2d2 (patch)
treed3f14fb42f9c896b4de8698913ef90595bf97fae /sw/source/ui/uno
parent73c391c15da3961be45133e152e8417f4407cd37 (diff)
parentb4fca3befd4ada3c6288c6f5c3826fefd3e3b7cf (diff)
merge with m61
Diffstat (limited to 'sw/source/ui/uno')
-rw-r--r--sw/source/ui/uno/swdetect.cxx2
-rw-r--r--sw/source/ui/uno/unoatxt.cxx6
-rw-r--r--sw/source/ui/uno/unomailmerge.cxx6
-rw-r--r--sw/source/ui/uno/unomod.cxx42
-rw-r--r--sw/source/ui/uno/unotxdoc.cxx20
5 files changed, 66 insertions, 10 deletions
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index f20309a4ab..c48834b40d 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -217,7 +217,7 @@ SwFilterDetect::~SwFilterDetect()
BOOL bIsStorage = aMedium.IsStorage();
if ( bIsStorage )
{
- uno::Reference< embed::XStorage > xStorage = aMedium.GetStorage();
+ uno::Reference< embed::XStorage > xStorage = aMedium.GetStorage( sal_False );
if ( aMedium.GetLastStorageCreationState() != ERRCODE_NONE )
{
// error during storage creation means _here_ that the medium
diff --git a/sw/source/ui/uno/unoatxt.cxx b/sw/source/ui/uno/unoatxt.cxx
index a2133bea18..4801259cd7 100644
--- a/sw/source/ui/uno/unoatxt.cxx
+++ b/sw/source/ui/uno/unoatxt.cxx
@@ -416,7 +416,8 @@ sal_Bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTextR
if(pxCursor)
{
SwPaM* pUnoCrsr = pxCursor->GetPaM();
- bRet |= (true == pxCursor->GetDoc()->Copy( *pUnoCrsr, aPos, false ));
+ bRet = pxCursor->GetDoc()->CopyRange( *pUnoCrsr, aPos, false )
+ || bRet;
}
else
{
@@ -424,7 +425,8 @@ sal_Bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTextR
if(pBkmk && pBkmk->IsExpanded())
{
SwPaM aTmp(pBkmk->GetOtherMarkPos(), pBkmk->GetMarkPos());
- bRet |= (true == pxRange->GetDoc()->Copy(aTmp, aPos, false));
+ bRet = pxRange->GetDoc()->CopyRange(aTmp, aPos, false)
+ || bRet;
}
}
}
diff --git a/sw/source/ui/uno/unomailmerge.cxx b/sw/source/ui/uno/unomailmerge.cxx
index 92ad479309..d5b883053a 100644
--- a/sw/source/ui/uno/unomailmerge.cxx
+++ b/sw/source/ui/uno/unomailmerge.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -831,9 +831,9 @@ uno::Any SAL_CALL SwXMailMerge::execute(
DBG_ASSERT( !pOldSrc || pOldSrc == this, "Ooops... different event source already set." );
pMgr->SetMailMergeEvtSrc( this ); // launch events for listeners
- SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, xCurDocSh));
+ SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE), xCurDocSh));
BOOL bSucc = pMgr->MergeNew( aMergeDesc );
- SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, xCurDocSh));
+ SFX_APP()->NotifyEvent(SfxEventHint(SW_EVENT_MAIL_MERGE_END, SwDocShell::GetEventName(STR_SW_EVENT_MAIL_MERGE_END), xCurDocSh));
pMgr->SetMailMergeEvtSrc( pOldSrc );
diff --git a/sw/source/ui/uno/unomod.cxx b/sw/source/ui/uno/unomod.cxx
index 4818a7973a..2f7716bac1 100644
--- a/sw/source/ui/uno/unomod.cxx
+++ b/sw/source/ui/uno/unomod.cxx
@@ -125,7 +125,10 @@ enum SwPrintSettingsPropertyHandles
HANDLE_PRINTSET_PAPER_FROM_SETUP,
HANDLE_PRINTSET_TABLES,
HANDLE_PRINTSET_SINGLE_JOBS,
- HANDLE_PRINTSET_EMPTY_PAGES
+ HANDLE_PRINTSET_EMPTY_PAGES,
+ HANDLE_PRINTSET_PROSPECT_RTL,
+ HANDLE_PRINTSET_PLACEHOLDER,
+ HANDLE_PRINTSET_HIDDEN_TEXT
};
static ChainablePropertySetInfo * lcl_createViewSettingsInfo()
@@ -186,14 +189,17 @@ static ChainablePropertySetInfo * lcl_createPrintSettingsInfo()
{ RTL_CONSTASCII_STRINGPARAM ( "PrintControls" ), HANDLE_PRINTSET_CONTROLS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "PrintDrawings" ), HANDLE_PRINTSET_DRAWINGS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "PrintGraphics" ), HANDLE_PRINTSET_GRAPHICS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
+ { RTL_CONSTASCII_STRINGPARAM ( "PrintHiddenText"), HANDLE_PRINTSET_HIDDEN_TEXT , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "PrintLeftPages" ), HANDLE_PRINTSET_LEFT_PAGES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "PrintPageBackground" ), HANDLE_PRINTSET_PAGE_BACKGROUND , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "PrintProspect" ), HANDLE_PRINTSET_PROSPECT , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
+ { RTL_CONSTASCII_STRINGPARAM ( "PrintProspectRTL" ), HANDLE_PRINTSET_PROSPECT_RTL , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "PrintReversed" ), HANDLE_PRINTSET_REVERSED , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "PrintRightPages" ), HANDLE_PRINTSET_RIGHT_PAGES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "PrintFaxName" ), HANDLE_PRINTSET_FAX_NAME , CPPUTYPE_OUSTRING, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "PrintPaperFromSetup" ), HANDLE_PRINTSET_PAPER_FROM_SETUP , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "PrintTables" ), HANDLE_PRINTSET_TABLES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
+ { RTL_CONSTASCII_STRINGPARAM ( "PrintTextPlaceholder"), HANDLE_PRINTSET_PLACEHOLDER , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "PrintSingleJobs" ), HANDLE_PRINTSET_SINGLE_JOBS , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ RTL_CONSTASCII_STRINGPARAM ( "PrintEmptyPages" ), HANDLE_PRINTSET_EMPTY_PAGES , CPPUTYPE_BOOLEAN, PROPERTY_NONE, 0},
{ 0, 0, 0, CPPUTYPE_UNKNOWN, 0, 0 }
@@ -456,6 +462,24 @@ void SwXPrintSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo,
throw lang::IllegalArgumentException();
}
break;
+ case HANDLE_PRINTSET_PROSPECT_RTL:
+ {
+ bVal = *(sal_Bool*)rValue.getValue();
+ mpPrtOpt->SetPrintProspect_RTL(bVal);
+ }
+ break;
+ case HANDLE_PRINTSET_PLACEHOLDER:
+ {
+ bVal = *(sal_Bool*)rValue.getValue();
+ mpPrtOpt->SetPrintTextPlaceholder(bVal);
+ }
+ break;
+ case HANDLE_PRINTSET_HIDDEN_TEXT:
+ {
+ bVal = *(sal_Bool*)rValue.getValue();
+ mpPrtOpt->SetPrintHiddenText(bVal);
+ }
+ break;
default:
throw UnknownPropertyException();
}
@@ -550,6 +574,21 @@ void SwXPrintSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo,
rValue <<= mpPrtOpt->GetFaxName();
}
break;
+ case HANDLE_PRINTSET_PROSPECT_RTL:
+ {
+ rValue <<= mpPrtOpt->IsPrintProspect_RTL();
+ }
+ break;
+ case HANDLE_PRINTSET_PLACEHOLDER:
+ {
+ rValue <<= mpPrtOpt->IsPrintTextPlaceholder();
+ }
+ break;
+ case HANDLE_PRINTSET_HIDDEN_TEXT:
+ {
+ rValue <<= mpPrtOpt->IsPrintHiddenText();
+ }
+ break;
default:
throw UnknownPropertyException();
}
@@ -1024,3 +1063,4 @@ Sequence< OUString > SwXViewSettings::getSupportedServiceNames(void) throw( Runt
pArray[0] = C2U("com.sun.star.text.ViewSettings");
return aRet;
}
+
diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx
index df5d1cfaee..a03fc19f68 100644
--- a/sw/source/ui/uno/unotxdoc.cxx
+++ b/sw/source/ui/uno/unotxdoc.cxx
@@ -87,7 +87,13 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/document/RedlineDisplayType.hpp>
+#include <com/sun/star/document/XDocumentEventBroadcaster.hpp>
+#include <com/sun/star/frame/XController.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
+#include <com/sun/star/script/XInvocation.hpp>
+#include <com/sun/star/reflection/XIdlClassProvider.hpp>
#include <svx/linkmgr.hxx>
#include <svx/unofill.hxx>
#include <svx/unolingu.hxx>
@@ -245,15 +251,23 @@ sal_Int64 SAL_CALL SwXTextDocument::getSomething( const Sequence< sal_Int8 >& rI
Any SAL_CALL SwXTextDocument::queryInterface( const uno::Type& rType ) throw(RuntimeException)
{
Any aRet = SwXTextDocumentBaseClass::queryInterface(rType);
- if(aRet.getValueType() == getVoidCppuType())
+ if ( !aRet.hasValue() )
aRet = SfxBaseModel::queryInterface(rType);
- if(aRet.getValueType() == getVoidCppuType() &&
+ if ( !aRet.hasValue() &&
rType == ::getCppuType((Reference<lang::XMultiServiceFactory>*)0))
{
Reference<lang::XMultiServiceFactory> xTmp = this;
aRet <<= xTmp;
}
- if(aRet.getValueType() == getVoidCppuType())
+
+ if ( !aRet.hasValue()
+ && rType != ::getCppuType((Reference< com::sun::star::document::XDocumentEventBroadcaster>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::frame::XController>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::frame::XFrame>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::script::XInvocation>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::reflection::XIdlClassProvider>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::beans::XFastPropertySet>*)0)
+ && rType != ::getCppuType((Reference< com::sun::star::awt::XWindow>*)0))
{
GetNumberFormatter();
if(xNumFmtAgg.is())