diff options
Diffstat (limited to 'sd')
66 files changed, 636 insertions, 652 deletions
diff --git a/sd/CppunitTest_sd_filters_test.mk b/sd/CppunitTest_sd_filters_test.mk index f5fc02664e14..132980a0be8f 100644 --- a/sd/CppunitTest_sd_filters_test.mk +++ b/sd/CppunitTest_sd_filters_test.mk @@ -96,6 +96,7 @@ $(eval $(call gb_CppunitTest_use_components,sd_filters_test,\ filter/source/config/cache/filterconfig1 \ framework/util/fwk \ i18npool/util/i18npool \ + linguistic/source/lng \ oox/util/oox \ package/source/xstor/xstor \ package/util/package2 \ @@ -113,6 +114,7 @@ $(eval $(call gb_CppunitTest_use_components,sd_filters_test,\ unotools/util/utl \ unoxml/source/rdf/unordf \ unoxml/source/service/unoxml \ + xmloff/util/xo \ )) $(eval $(call gb_CppunitTest_use_configuration,sd_filters_test)) diff --git a/sd/CppunitTest_sd_regression_test.mk b/sd/CppunitTest_sd_regression_test.mk index abee99bf17de..078eff10812d 100644 --- a/sd/CppunitTest_sd_regression_test.mk +++ b/sd/CppunitTest_sd_regression_test.mk @@ -94,6 +94,7 @@ $(eval $(call gb_CppunitTest_use_components,sd_regression_test,\ forms/util/frm \ framework/util/fwk \ i18npool/util/i18npool \ + linguistic/source/lng \ oox/util/oox \ package/source/xstor/xstor \ package/util/package2 \ diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk index 03453fff113c..48d5da81ea82 100644 --- a/sd/CppunitTest_sd_uimpress.mk +++ b/sd/CppunitTest_sd_uimpress.mk @@ -95,6 +95,7 @@ $(eval $(call gb_CppunitTest_use_components,sd_uimpress,\ configmgr/source/configmgr \ framework/util/fwk \ i18npool/util/i18npool \ + linguistic/source/lng \ ucb/source/core/ucb1 \ )) diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index ba2fe9ef4ff8..ae4b8a59baea 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -513,7 +513,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\ ifeq ($(ENABLE_SDREMOTE),YES) $(eval $(call gb_Library_add_exception_objects,sd,\ - sd/source/ui/remotecontrol/BluetoothServer \ sd/source/ui/remotecontrol/BufferedStreamSocket \ sd/source/ui/remotecontrol/Communicator \ sd/source/ui/remotecontrol/DiscoveryService \ @@ -528,6 +527,16 @@ $(eval $(call gb_Library_add_defs,sd,\ -DENABLE_SDREMOTE \ )) +ifeq ($(ENABLE_BLUETOOTH),YES) +$(eval $(call gb_Library_add_exception_objects,sd,\ + sd/source/ui/remotecontrol/BluetoothServer \ +)) + +$(eval $(call gb_Library_add_defs,sd,\ + -DENABLE_BLUETOOTH \ +)) +endif + endif ifeq ($(strip $(GUI)),WNT) diff --git a/sd/Library_sdui.mk b/sd/Library_sdui.mk index 98c1fe96c573..9d4ec750fd0b 100644 --- a/sd/Library_sdui.mk +++ b/sd/Library_sdui.mk @@ -41,6 +41,13 @@ ifeq ($(ENABLE_SDREMOTE),YES) $(eval $(call gb_Library_add_defs,sdui,\ -DENABLE_SDREMOTE \ )) + +ifeq ($(ENABLE_BLUETOOTH),YES) +$(eval $(call gb_Library_add_defs,sdui,\ + -DENABLE_BLUETOOTH \ +)) +endif + endif $(eval $(call gb_Library_use_sdk_api,sdui)) diff --git a/sd/qa/unit/data/odg/fail/.gitignore b/sd/qa/unit/data/odg/fail/.gitignore new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/sd/qa/unit/data/odg/fail/.gitignore diff --git a/sd/qa/unit/data/odg/indeterminate/.gitignore b/sd/qa/unit/data/odg/indeterminate/.gitignore new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/sd/qa/unit/data/odg/indeterminate/.gitignore diff --git a/sd/qa/unit/data/odg/pass/.gitignore b/sd/qa/unit/data/odg/pass/.gitignore new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/sd/qa/unit/data/odg/pass/.gitignore diff --git a/sd/qa/unit/data/odg/pass/CVE-2012-4233-2.odg b/sd/qa/unit/data/odg/pass/CVE-2012-4233-2.odg Binary files differnew file mode 100644 index 000000000000..321bd9cdbdf3 --- /dev/null +++ b/sd/qa/unit/data/odg/pass/CVE-2012-4233-2.odg diff --git a/sd/qa/unit/data/ppt/pass/CVE-2012-4233-3.ppt b/sd/qa/unit/data/ppt/pass/CVE-2012-4233-3.ppt Binary files differnew file mode 100644 index 000000000000..625c116fd167 --- /dev/null +++ b/sd/qa/unit/data/ppt/pass/CVE-2012-4233-3.ppt diff --git a/sd/qa/unit/filters-test.cxx b/sd/qa/unit/filters-test.cxx index 76fd560f9486..a834686b48e7 100644 --- a/sd/qa/unit/filters-test.cxx +++ b/sd/qa/unit/filters-test.cxx @@ -62,7 +62,10 @@ public: SdFiltersTest(); ::sd::DrawDocShellRef loadURL( const rtl::OUString &rURL ); - virtual bool load( const rtl::OUString &rFilter, const rtl::OUString &rURL, const rtl::OUString &rUserData); + virtual bool load( const rtl::OUString &rFilter, + const rtl::OUString &rURL, const rtl::OUString &rUserData, + unsigned int nFilterFlags, unsigned int nClipboardID, + unsigned int nFilterVersion); virtual void setUp(); virtual void tearDown(); @@ -179,12 +182,14 @@ void SdFiltersTest::testN778859() } bool SdFiltersTest::load(const rtl::OUString &rFilter, const rtl::OUString &rURL, - const rtl::OUString &rUserData) + const rtl::OUString &rUserData, unsigned int nFilterFlags, unsigned int nClipboardID, + unsigned int nFilterVersion) { SfxFilter aFilter( rFilter, - rtl::OUString(), 0, 0, rtl::OUString(), 0, rtl::OUString(), + rtl::OUString(), nFilterFlags, nClipboardID, rtl::OUString(), 0, rtl::OUString(), rUserData, rtl::OUString() ); + aFilter.SetVersion(nFilterVersion); ::sd::DrawDocShellRef xDocShRef = new ::sd::DrawDocShell(); SfxMedium* pSrcMed = new SfxMedium(rURL, STREAM_STD_READ); @@ -200,6 +205,10 @@ void SdFiltersTest::testCVEs() testDir(rtl::OUString("MS PowerPoint 97"), getURLFromSrc("/sd/qa/unit/data/ppt/"), rtl::OUString("sdfilt")); + + testDir(rtl::OUString("draw8"), + getURLFromSrc("/sd/qa/unit/data/odg/"), + rtl::OUString("sdfilt")); #endif } diff --git a/sd/qa/unit/regression-test.cxx b/sd/qa/unit/regression-test.cxx index 266f538b035d..e378ff073319 100644 --- a/sd/qa/unit/regression-test.cxx +++ b/sd/qa/unit/regression-test.cxx @@ -76,7 +76,10 @@ public: SdFiltersTest(); ::sd::DrawDocShellRef loadURL( const rtl::OUString &rURL ); - virtual bool load( const rtl::OUString &rFilter, const rtl::OUString &rURL, const rtl::OUString &rUserData); + virtual bool load( const rtl::OUString &rFilter, + const rtl::OUString &rURL, const rtl::OUString &rUserData, + unsigned int nFilterFlags, unsigned int nClipboardID, + unsigned int nFilterVersion); virtual void setUp(); virtual void tearDown(); @@ -246,12 +249,14 @@ void SdFiltersTest::testStuff(::sd::DrawDocShellRef xDocShRef, const rtl::OStrin } bool SdFiltersTest::load(const rtl::OUString &rFilter, const rtl::OUString &rURL, - const rtl::OUString &rUserData) + const rtl::OUString &rUserData, unsigned int nFilterFlags, unsigned int nClipboardID, + unsigned int nFilterVersion) { SfxFilter aFilter( rFilter, - rtl::OUString(), 0, 0, rtl::OUString(), 0, rtl::OUString(), + rtl::OUString(), nFilterFlags, nClipboardID, rtl::OUString(), 0, rtl::OUString(), rUserData, rtl::OUString() ); + aFilter.SetVersion(nFilterVersion); ::sd::DrawDocShellRef xDocShRef = new ::sd::DrawDocShell(); SfxMedium* pSrcMed = new SfxMedium(rURL, STREAM_STD_READ); diff --git a/sd/qa/unit/uimpress.cxx b/sd/qa/unit/uimpress.cxx index b34e241d615f..91adf35f2ba8 100644 --- a/sd/qa/unit/uimpress.cxx +++ b/sd/qa/unit/uimpress.cxx @@ -80,7 +80,7 @@ Test::Test() //of retaining references to the root ServiceFactory as its passed around comphelper::setProcessServiceFactory(xSM); - InitVCL(xSM); + InitVCL(); SdDLL::Init(); } diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 65fbb4ad17f3..78fe9adb607b 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -54,7 +54,7 @@ #include <comphelper/processfactory.hxx> #include <comphelper/sequence.hxx> #include <com/sun/star/lang/Locale.hpp> -#include <com/sun/star/i18n/XBreakIterator.hpp> +#include <com/sun/star/i18n/BreakIterator.hpp> #include <com/sun/star/i18n/CharacterIteratorMode.hpp> #include <com/sun/star/i18n/WordType.hpp> #include <com/sun/star/presentation/TextAnimationType.hpp> @@ -317,65 +317,61 @@ sal_Int32 CustomAnimationEffect::getNumberOfSubitems( const Any& aTarget, sal_In if( xShape.is() ) { // TODO/LATER: Optimize this, don't create a break iterator each time - Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); - Reference < i18n::XBreakIterator > xBI( xMSF->createInstance( "com.sun.star.i18n.BreakIterator" ), UNO_QUERY ); - DBG_ASSERT( xBI.is(), "sd::CustomAnimationEffect::getNumberOfSubitems(), could not create a 'com.sun.star.i18n.BreakIterator'!" ); + Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + Reference < i18n::XBreakIterator > xBI = i18n::BreakIterator::create(xContext); - if( xBI.is() ) + Reference< XEnumerationAccess > xEA( xShape, UNO_QUERY_THROW ); + Reference< XEnumeration > xEnumeration( xEA->createEnumeration(), UNO_QUERY_THROW ); + Locale aLocale; + const OUString aStrLocaleName( "CharLocale" ); + Reference< XTextRange > xParagraph; + + sal_Int32 nPara = 0; + while( xEnumeration->hasMoreElements() ) { - Reference< XEnumerationAccess > xEA( xShape, UNO_QUERY_THROW ); - Reference< XEnumeration > xEnumeration( xEA->createEnumeration(), UNO_QUERY_THROW ); - Locale aLocale; - const OUString aStrLocaleName( "CharLocale" ); - Reference< XTextRange > xParagraph; + xEnumeration->nextElement() >>= xParagraph; - sal_Int32 nPara = 0; - while( xEnumeration->hasMoreElements() ) + // skip this if its not the only paragraph we want to count + if( (nOnlyPara != -1) && (nOnlyPara != nPara ) ) + continue; + + if( nIterateType == TextAnimationType::BY_PARAGRAPH ) { - xEnumeration->nextElement() >>= xParagraph; + nSubItems++; + } + else + { + const OUString aText( xParagraph->getString() ); + Reference< XPropertySet > xSet( xParagraph, UNO_QUERY_THROW ); + xSet->getPropertyValue( aStrLocaleName ) >>= aLocale; - // skip this if its not the only paragraph we want to count - if( (nOnlyPara != -1) && (nOnlyPara != nPara ) ) - continue; + sal_Int32 nPos; + const sal_Int32 nEndPos = aText.getLength(); - if( nIterateType == TextAnimationType::BY_PARAGRAPH ) + if( nIterateType == TextAnimationType::BY_WORD ) { - nSubItems++; + for( nPos = 0; nPos < nEndPos; nPos++ ) + { + nPos = xBI->getWordBoundary(aText, nPos, aLocale, i18n::WordType::ANY_WORD, sal_True).endPos; + nSubItems++; + } + break; } else { - const OUString aText( xParagraph->getString() ); - Reference< XPropertySet > xSet( xParagraph, UNO_QUERY_THROW ); - xSet->getPropertyValue( aStrLocaleName ) >>= aLocale; - - sal_Int32 nPos; - const sal_Int32 nEndPos = aText.getLength(); - - if( nIterateType == TextAnimationType::BY_WORD ) + sal_Int32 nDone; + for( nPos = 0; nPos < nEndPos; nPos++ ) { - for( nPos = 0; nPos < nEndPos; nPos++ ) - { - nPos = xBI->getWordBoundary(aText, nPos, aLocale, i18n::WordType::ANY_WORD, sal_True).endPos; - nSubItems++; - } - break; - } - else - { - sal_Int32 nDone; - for( nPos = 0; nPos < nEndPos; nPos++ ) - { - nPos = xBI->nextCharacters(aText, nPos, aLocale, i18n::CharacterIteratorMode::SKIPCELL, 0, nDone); - nSubItems++; - } + nPos = xBI->nextCharacters(aText, nPos, aLocale, i18n::CharacterIteratorMode::SKIPCELL, 0, nDone); + nSubItems++; } } + } - if( nPara == nOnlyPara ) - break; + if( nPara == nOnlyPara ) + break; - nPara++; - } + nPara++; } } } diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx index 87e19f8ee4a5..cee595c3314f 100644 --- a/sd/source/core/CustomAnimationPreset.cxx +++ b/sd/source/core/CustomAnimationPreset.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/util/XMacroExpander.hpp> #include <com/sun/star/animations/XAnimationNodeSupplier.hpp> #include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/xml/sax/InputSource.hpp> #include <com/sun/star/xml/sax/Parser.hpp> #include <com/sun/star/xml/sax/SAXParseException.hpp> @@ -53,16 +54,11 @@ #include <algorithm> using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; using namespace ::com::sun::star::animations; using namespace ::com::sun::star::presentation; using ::rtl::OUString; -using ::com::sun::star::uno::UNO_QUERY; -using ::com::sun::star::uno::UNO_QUERY_THROW; -using ::com::sun::star::uno::Any; -using ::com::sun::star::uno::Sequence; -using ::com::sun::star::uno::Reference; -using ::com::sun::star::uno::Exception; using ::com::sun::star::io::XInputStream; using ::com::sun::star::lang::XMultiServiceFactory; using ::com::sun::star::container::XNameAccess; @@ -320,9 +316,8 @@ void CustomAnimationPresets::importEffects() xContext->getValueByName("/singletons/com.sun.star.util.theMacroExpander"), UNO_QUERY ); - Reference< XMultiServiceFactory > xConfigProvider( - xServiceFactory->createInstance("com.sun.star.configuration.ConfigurationProvider" ), - UNO_QUERY_THROW ); + Reference< XMultiServiceFactory > xConfigProvider = + configuration::theDefaultProvider::get( xContext ); // read path to transition effects files from config Any propValue = uno::makeAny( @@ -404,12 +399,10 @@ void CustomAnimationPresets::importResources() try { // Get service factory - Reference< XMultiServiceFactory > xServiceFactory( comphelper::getProcessServiceFactory() ); - DBG_ASSERT( xServiceFactory.is(), "sd::CustomAnimationPresets::import(), got no service manager" ); - if( !xServiceFactory.is() ) - return; + Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() ); - Reference< XMultiServiceFactory > xConfigProvider( xServiceFactory->createInstance("com.sun.star.configuration.ConfigurationProvider" ), UNO_QUERY ); + Reference< XMultiServiceFactory > xConfigProvider = + configuration::theDefaultProvider::get( xContext ); const OUString aPropertyPath("/org.openoffice.Office.UI.Effects/UserInterface/Properties" ); implImportLabels( xConfigProvider, aPropertyPath, maPropertyNameMap ); diff --git a/sd/source/core/TransitionPreset.cxx b/sd/source/core/TransitionPreset.cxx index 3c77ead958fe..49c0a5851cd3 100644 --- a/sd/source/core/TransitionPreset.cxx +++ b/sd/source/core/TransitionPreset.cxx @@ -30,6 +30,7 @@ #include <com/sun/star/animations/XTransitionFilter.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/util/XMacroExpander.hpp> #include <com/sun/star/animations/AnimationNodeType.hpp> @@ -68,7 +69,7 @@ using ::com::sun::star::beans::NamedValue; namespace sd { -extern Reference< XAnimationNode > implImportEffects( const Reference< XMultiServiceFactory >& xConfigProvider, const OUString& rPath ); +extern Reference< XAnimationNode > implImportEffects( const Reference< XMultiServiceFactory >& xServiceFactory, const OUString& rPath ); extern void implImportLabels( const Reference< XMultiServiceFactory >& xConfigProvider, const OUString& rNodePath, UStringMap& rStringMap ); TransitionPreset::TransitionPreset( const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& xNode ) @@ -161,8 +162,8 @@ bool TransitionPreset::importTransitionPresetList( TransitionPresetList& rList ) UNO_QUERY ); // import ui strings - Reference< XMultiServiceFactory > xConfigProvider( - xServiceFactory->createInstance("com.sun.star.configuration.ConfigurationProvider" ), UNO_QUERY_THROW ); + Reference< XMultiServiceFactory > xConfigProvider = + configuration::theDefaultProvider::get( xContext ); UStringMap aTransitionNameMape; const OUString aTransitionPath("/org.openoffice.Office.UI.Effects/UserInterface/Transitions" ); diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index f1bc0dd32e1f..bd8d8d4812c9 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -34,7 +34,7 @@ #include <com/sun/star/beans/XPropertyState.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/container/XIndexReplace.hpp> -#include <com/sun/star/i18n/XBreakIterator.hpp> +#include <com/sun/star/i18n/BreakIterator.hpp> #include <com/sun/star/i18n/ScriptDirection.hpp> #include <com/sun/star/i18n/ScriptType.hpp> #include <com/sun/star/text/FontRelief.hpp> @@ -1298,13 +1298,9 @@ FontCollection::~FontCollection() FontCollection::FontCollection() : pVDev ( NULL ) { - com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > - xMSF = ::comphelper::getProcessServiceFactory(); - com::sun::star::uno::Reference< com::sun::star::uno::XInterface > - xInterface = xMSF->createInstance( "com.sun.star.i18n.BreakIterator" ); - if ( xInterface.is() ) - xPPTBreakIter = com::sun::star::uno::Reference< com::sun::star::i18n::XBreakIterator > - ( xInterface, com::sun::star::uno::UNO_QUERY ); + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > + xContext = ::comphelper::getProcessComponentContext(); + xPPTBreakIter = com::sun::star::i18n::BreakIterator::create( xContext ); } short FontCollection::GetScriptDirection( const rtl::OUString& rString ) const diff --git a/sd/source/filter/html/HtmlOptionsDialog.cxx b/sd/source/filter/html/HtmlOptionsDialog.cxx index bc39ae88983a..cf2f9e4e48ea 100644 --- a/sd/source/filter/html/HtmlOptionsDialog.cxx +++ b/sd/source/filter/html/HtmlOptionsDialog.cxx @@ -261,9 +261,7 @@ void SdHtmlOptionsDialog::setSourceDocument( const Reference< XComponent >& xDoc throw ( IllegalArgumentException, RuntimeException ) { // try to set the corresponding metric unit - String aConfigPath; - Reference< XServiceInfo > xServiceInfo - ( xDoc, UNO_QUERY ); + Reference< XServiceInfo > xServiceInfo(xDoc, UNO_QUERY); if ( xServiceInfo.is() ) { if ( xServiceInfo->supportsService( "com.sun.star.presentation.PresentationDocument" ) ) diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index babb586e702d..f63fb5e9d89f 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -877,7 +877,6 @@ void HtmlExport::ExportWebCast() CreateFileNames(); - String aEmpty; if(maCGIPath.Len() == 0) maCGIPath.Assign( sal_Unicode('.') ); @@ -890,7 +889,6 @@ void HtmlExport::ExportWebCast() } else { - String aEmpty2; if(maURLPath.Len() == 0) maURLPath.Assign( sal_Unicode('.') ); @@ -1858,9 +1856,6 @@ bool HtmlExport::CreateHtmlForPresPages() // ===================================================================== bool HtmlExport::CreateContentPage() { - // Parameter - String aEmpty; - if( mbDocColors ) SetDocColors(); @@ -2287,9 +2282,8 @@ bool HtmlExport::CreateFrames() if(mbNotes) { - String aEmpty; String aSlash( RTL_CONSTASCII_USTRINGPARAM( "//" ) ); - aFunction.SearchAndReplaceAll( aSlash, aEmpty); + aFunction.SearchAndReplaceAll(aSlash, OUString()); } // substitute HTML file extension diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx index f9cf8e3a804f..1dc354368513 100644 --- a/sd/source/filter/xml/sdxmlwrp.cxx +++ b/sd/source/filter/xml/sdxmlwrp.cxx @@ -59,6 +59,7 @@ #include <com/sun/star/xml/sax/InputSource.hpp> #include <com/sun/star/xml/sax/XDTDHandler.hpp> #include <com/sun/star/xml/sax/Parser.hpp> +#include <com/sun/star/xml/sax/Writer.hpp> #include <com/sun/star/io/XActiveDataSource.hpp> #include <com/sun/star/io/XActiveDataControl.hpp> #include <comphelper/componentcontext.hxx> @@ -233,11 +234,11 @@ sal_Int32 ReadThroughComponent( RTL_LOGFILE_CONTEXT_TRACE( aLog, "parser created" ); // get filter + OUString aFilterName(OUString::createFromAscii(pFilterName)); Reference< xml::sax::XDocumentHandler > xFilter( - rFactory->createInstanceWithArguments( - OUString::createFromAscii(pFilterName), rFilterArguments), + rFactory->createInstanceWithArguments(aFilterName, rFilterArguments), UNO_QUERY ); - DBG_ASSERT( xFilter.is(), "Can't instantiate filter component." ); + SAL_WARN_IF(!xFilter.is(), "sd", "Can't instantiate filter component: " << aFilterName); if( !xFilter.is() ) return SD_XML_READERROR; RTL_LOGFILE_CONTEXT_TRACE1( aLog, "%s created", pFilterName ); @@ -878,6 +879,7 @@ sal_Bool SdXMLFilter::Export() } uno::Reference< lang::XMultiServiceFactory> xServiceFactory( ::comphelper::getProcessServiceFactory() ); + uno::Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); if( !xServiceFactory.is() ) { @@ -885,14 +887,7 @@ sal_Bool SdXMLFilter::Export() return sal_False; } - uno::Reference< uno::XInterface > xWriter( xServiceFactory->createInstance( "com.sun.star.xml.sax.Writer" ) ); - - if( !xWriter.is() ) - { - OSL_FAIL( "com.sun.star.xml.sax.Writer service missing" ); - return sal_False; - } - uno::Reference<xml::sax::XDocumentHandler> xHandler( xWriter, uno::UNO_QUERY ); + uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create( xContext ); /** property map for export info set */ PropertyMapEntry aExportInfoMap[] = @@ -1076,7 +1071,7 @@ sal_Bool SdXMLFilter::Export() if( xObjectResolver.is() ) *pArgs++ <<= xObjectResolver; if( mxStatusIndicator.is() ) *pArgs++ <<= mxStatusIndicator; - *pArgs <<= xHandler; + *pArgs <<= xWriter; uno::Reference< document::XFilter > xFilter( xServiceFactory->createInstanceWithArguments( OUString::createFromAscii( pServices->mpService ), aArgs ), uno::UNO_QUERY ); if( xFilter.is() ) diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index a9378697ab37..d63ac3b67fde 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -210,10 +210,10 @@ static OUString getDescription( const Any& rTarget, bool bWithText = true ) class CustomAnimationListEntryItem : public SvLBoxString { public: - CustomAnimationListEntryItem( SvLBoxEntry*,sal_uInt16 nFlags, OUString aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent ); + CustomAnimationListEntryItem( SvTreeListEntry*,sal_uInt16 nFlags, OUString aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent ); virtual ~CustomAnimationListEntryItem(); - void InitViewData( SvTreeListBox*,SvLBoxEntry*,SvViewDataItem* ); - void Paint( const Point&, SvTreeListBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* ); + void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* ); + void Paint( const Point&, SvTreeListBox& rDev, sal_uInt16 nFlags,SvTreeListEntry* ); SvLBoxItem* Create() const; void Clone( SvLBoxItem* pSource ); @@ -225,7 +225,7 @@ private: // -------------------------------------------------------------------- -CustomAnimationListEntryItem::CustomAnimationListEntryItem( SvLBoxEntry* pEntry, sal_uInt16 nFlags, OUString aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent ) +CustomAnimationListEntryItem::CustomAnimationListEntryItem( SvTreeListEntry* pEntry, sal_uInt16 nFlags, OUString aDescription, CustomAnimationEffectPtr pEffect, CustomAnimationList* pParent ) : SvLBoxString( pEntry, nFlags, aDescription ) , mpParent( pParent ) , maDescription( aDescription ) @@ -241,7 +241,7 @@ CustomAnimationListEntryItem::~CustomAnimationListEntryItem() // -------------------------------------------------------------------- -void CustomAnimationListEntryItem::InitViewData( SvTreeListBox* pView, SvLBoxEntry* pEntry, SvViewDataItem* pViewData ) +void CustomAnimationListEntryItem::InitViewData( SvTreeListBox* pView, SvTreeListEntry* pEntry, SvViewDataItem* pViewData ) { if( !pViewData ) pViewData = pView->GetViewDataItem( pEntry, this ); @@ -254,7 +254,7 @@ void CustomAnimationListEntryItem::InitViewData( SvTreeListBox* pView, SvLBoxEnt // -------------------------------------------------------------------- -void CustomAnimationListEntryItem::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16, SvLBoxEntry* pEntry ) +void CustomAnimationListEntryItem::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16, SvTreeListEntry* pEntry ) { SvViewDataItem* pViewData = mpParent->GetViewDataItem( pEntry, this ); @@ -323,7 +323,7 @@ void CustomAnimationListEntryItem::Clone( SvLBoxItem* ) // ==================================================================== -class CustomAnimationListEntry : public SvLBoxEntry +class CustomAnimationListEntry : public SvTreeListEntry { public: CustomAnimationListEntry(); @@ -360,11 +360,11 @@ CustomAnimationListEntry::~CustomAnimationListEntry() class CustomAnimationTriggerEntryItem : public SvLBoxString { public: - CustomAnimationTriggerEntryItem( SvLBoxEntry*,sal_uInt16 nFlags, OUString aDescription ); + CustomAnimationTriggerEntryItem( SvTreeListEntry*,sal_uInt16 nFlags, OUString aDescription ); virtual ~CustomAnimationTriggerEntryItem(); virtual sal_uInt16 IsA(); - void InitViewData( SvTreeListBox*,SvLBoxEntry*,SvViewDataItem* ); - void Paint( const Point&, SvTreeListBox& rDev, sal_uInt16 nFlags,SvLBoxEntry* ); + void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* ); + void Paint( const Point&, SvTreeListBox& rDev, sal_uInt16 nFlags,SvTreeListEntry* ); SvLBoxItem* Create() const; void Clone( SvLBoxItem* pSource ); @@ -374,7 +374,7 @@ private: // -------------------------------------------------------------------- -CustomAnimationTriggerEntryItem::CustomAnimationTriggerEntryItem( SvLBoxEntry* pEntry, sal_uInt16 nFlags, OUString aDescription ) +CustomAnimationTriggerEntryItem::CustomAnimationTriggerEntryItem( SvTreeListEntry* pEntry, sal_uInt16 nFlags, OUString aDescription ) : SvLBoxString( pEntry, nFlags, aDescription ), maDescription( aDescription ) { } @@ -394,7 +394,7 @@ sal_uInt16 CustomAnimationTriggerEntryItem::IsA() // -------------------------------------------------------------------- -void CustomAnimationTriggerEntryItem::InitViewData( SvTreeListBox* pView, SvLBoxEntry* pEntry, SvViewDataItem* pViewData ) +void CustomAnimationTriggerEntryItem::InitViewData( SvTreeListBox* pView, SvTreeListEntry* pEntry, SvViewDataItem* pViewData ) { if( !pViewData ) pViewData = pView->GetViewDataItem( pEntry, this ); @@ -407,7 +407,7 @@ void CustomAnimationTriggerEntryItem::InitViewData( SvTreeListBox* pView, SvLBox // -------------------------------------------------------------------- -void CustomAnimationTriggerEntryItem::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16, SvLBoxEntry* ) +void CustomAnimationTriggerEntryItem::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16, SvTreeListEntry* ) { Size aSize( rDev.GetOutputSizePixel().Width(), static_cast< SvTreeListBox* >(&rDev)->GetEntryHeight() ); @@ -668,7 +668,7 @@ void CustomAnimationList::update() Reference< XShape > xShape( pIS->getTriggerShape() ); if( xShape.is() ) { - SvLBoxEntry* pLBoxEntry = new CustomAnimationListEntry; + SvTreeListEntry* pLBoxEntry = new CustomAnimationListEntry; pLBoxEntry->AddItem( new SvLBoxContextBmp( pLBoxEntry, 0, Image(), Image(), 0)); OUString aDescription = String( SdResId( STR_CUSTOMANIMATION_TRIGGER ) ); aDescription += ": "; @@ -766,7 +766,7 @@ void CustomAnimationList::append( CustomAnimationEffectPtr pEffect ) { aDescription = getDescription( aTarget, pEffect->getTargetSubItem() != ShapeAnimationSubType::ONLY_BACKGROUND ); - SvLBoxEntry* pParentEntry = 0; + SvTreeListEntry* pParentEntry = 0; Reference< XShape > xTargetShape( pEffect->getTargetShape() ); sal_Int32 nGroupId = pEffect->getGroupId(); @@ -777,7 +777,7 @@ void CustomAnimationList::append( CustomAnimationEffectPtr pEffect ) pParentEntry = mpLastParentEntry; // create an entry for the effect - SvLBoxEntry* pEntry = new CustomAnimationListEntry( pEffect ); + SvTreeListEntry* pEntry = new CustomAnimationListEntry( pEffect ); pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0)); pEntry->AddItem( new CustomAnimationListEntryItem( pEntry, 0, aDescription, pEffect, this ) ); diff --git a/sd/source/ui/animations/CustomAnimationList.hxx b/sd/source/ui/animations/CustomAnimationList.hxx index 693d6e3422dc..65f7bfa282fe 100644 --- a/sd/source/ui/animations/CustomAnimationList.hxx +++ b/sd/source/ui/animations/CustomAnimationList.hxx @@ -112,7 +112,7 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > mxLastTargetShape; sal_Int32 mnLastGroupId; - SvLBoxEntry* mpLastParentEntry; + SvTreeListEntry* mpLastParentEntry; }; diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index 6e23f76e5803..b73058cb6e33 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -537,12 +537,12 @@ sal_Bool SdTransferable::GetData( const DataFlavor& rFlavor ) else if( nFormat == FORMAT_GDIMETAFILE ) { if( mpSdViewIntern ) - bOK = SetGDIMetaFile( mpSdViewIntern->GetAllMarkedMetaFile( sal_True ), rFlavor ); + bOK = SetGDIMetaFile( mpSdViewIntern->GetMarkedObjMetaFile( true ), rFlavor ); } else if( nFormat == FORMAT_BITMAP ) { if( mpSdViewIntern ) - bOK = SetBitmap( mpSdViewIntern->GetAllMarkedBitmap( sal_True ), rFlavor ); + bOK = SetBitmap( mpSdViewIntern->GetMarkedObjBitmapEx( true ).GetBitmap(), rFlavor ); } else if( ( nFormat == FORMAT_STRING ) && mpBookmark ) { diff --git a/sd/source/ui/dlg/RemoteDialog.cxx b/sd/source/ui/dlg/RemoteDialog.cxx index c04e77b3bf54..1d52dc5448ef 100644 --- a/sd/source/ui/dlg/RemoteDialog.cxx +++ b/sd/source/ui/dlg/RemoteDialog.cxx @@ -28,9 +28,13 @@ RemoteDialog::RemoteDialog( Window *pWindow ) : #ifdef ENABLE_SDREMOTE FreeResource(); +#ifdef ENABLE_BLUETOOTH mPreviouslyDiscoverable = RemoteServer::isBluetoothDiscoverable(); if ( !mPreviouslyDiscoverable ) RemoteServer::setBluetoothDiscoverable( true ); +#else + RemoteServer::setBluetoothDiscoverable( false ); +#endif vector<ClientInfo*> aClients( RemoteServer::getClients() ); @@ -57,7 +61,7 @@ IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton) { // setBusy( true ); // Fixme: Try and connect -#ifdef ENABLE_SDREMOTE +#if defined(ENABLE_SDREMOTE) && defined(ENABLE_BLUETOOTH) long aSelected = mClientBox.GetActiveEntryIndex(); if ( aSelected < 0 ) return 1; @@ -75,7 +79,7 @@ IMPL_LINK_NOARG(RemoteDialog, HandleConnectButton) IMPL_LINK_NOARG( RemoteDialog, CloseHdl ) { -#ifdef ENABLE_SDREMOTE +#if defined(ENABLE_SDREMOTE) && defined(ENABLE_BLUETOOTH) if ( !mPreviouslyDiscoverable ) { RemoteServer::setBluetoothDiscoverable( false ); diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index e1436d43b2c6..b1974fd4f572 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -360,7 +360,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( Window* pWindow, for( SdCustomShow::PageVec::iterator it = rpCustomShow->PagesVector().begin(); it != rpCustomShow->PagesVector().end(); ++it ) { - SvLBoxEntry* pEntry = aLbCustomPages.InsertEntry( (*it)->GetName() ); + SvTreeListEntry* pEntry = aLbCustomPages.InsertEntry( (*it)->GetName() ); pEntry->SetUserData( (SdPage*) (*it) ); } } @@ -414,7 +414,7 @@ IMPL_LINK( SdDefineCustomShowDlg, ClickButtonHdl, void *, p ) if( nCount > 0 ) { sal_uLong nPosCP = LIST_APPEND; - SvLBoxEntry* pEntry = aLbCustomPages.FirstSelected(); + SvTreeListEntry* pEntry = aLbCustomPages.FirstSelected(); if( pEntry ) nPosCP = aLbCustomPages.GetModel()->GetAbsPos( pEntry ) + 1L; @@ -438,7 +438,7 @@ IMPL_LINK( SdDefineCustomShowDlg, ClickButtonHdl, void *, p ) else if( p == &aBtnRemove ) { //sal_uInt16 nPos = aLbCustomPages.GetSelectEntryPos(); - SvLBoxEntry* pEntry = aLbCustomPages.FirstSelected(); + SvTreeListEntry* pEntry = aLbCustomPages.FirstSelected(); if( pEntry ) { sal_uLong nPos = aLbCustomPages.GetModel()->GetAbsPos( pEntry ); @@ -470,7 +470,7 @@ void SdDefineCustomShowDlg::CheckCustomShow() { sal_Bool bDifferent = sal_False; SdPage* pPage = NULL; - SvLBoxEntry* pEntry = NULL; + SvTreeListEntry* pEntry = NULL; // Anzahl vergleichen if( rpCustomShow->PagesVector().size() != aLbCustomPages.GetEntryCount() ) diff --git a/sd/source/ui/dlg/dlgassim.cxx b/sd/source/ui/dlg/dlgassim.cxx index c5dcc2c70a30..43171daca5ef 100644 --- a/sd/source/ui/dlg/dlgassim.cxx +++ b/sd/source/ui/dlg/dlgassim.cxx @@ -62,8 +62,8 @@ SdPageListControl::SdPageListControl( IMPL_LINK_NOARG(SdPageListControl, CheckButtonClickHdl) { - SvLBoxTreeList* pTreeModel = GetModel(); - SvLBoxEntry* pEntry = pTreeModel->First(); + SvTreeList* pTreeModel = GetModel(); + SvTreeListEntry* pEntry = pTreeModel->First(); while( pEntry ) { @@ -88,9 +88,9 @@ void SdPageListControl::Clear() SvTreeListBox::Clear(); } -SvLBoxEntry* SdPageListControl::InsertPage( const String& rPageName ) +SvTreeListEntry* SdPageListControl::InsertPage( const String& rPageName ) { - SvLBoxEntry* pEntry = new SvLBoxEntry; + SvTreeListEntry* pEntry = new SvTreeListEntry; pEntry->AddItem( new SvLBoxButton( pEntry, SvLBoxButtonKind_enabledCheckbox, 0, m_pCheckButton)); @@ -102,9 +102,9 @@ SvLBoxEntry* SdPageListControl::InsertPage( const String& rPageName ) return pEntry; } -void SdPageListControl::InsertTitle( SvLBoxEntry* pParent, const String& rTitle ) +void SdPageListControl::InsertTitle( SvTreeListEntry* pParent, const String& rTitle ) { - SvLBoxEntry* pEntry = new SvLBoxEntry; + SvTreeListEntry* pEntry = new SvTreeListEntry; pEntry->AddItem( new SvLBoxString( pEntry, 0, String() ) ); pEntry->AddItem( new SvLBoxContextBmp( pEntry, 0, Image(), Image(), 0)); // Sonst Puff! pEntry->AddItem( new SvLBoxString( pEntry, 0, rTitle ) ); @@ -122,7 +122,7 @@ void SdPageListControl::Fill( SdDrawDocument* pDoc ) SdPage* pPage = (SdPage*) pDoc->GetPage( nPage ); if( pPage->GetPageKind() == PK_STANDARD ) { - SvLBoxEntry* pEntry = InsertPage( pPage->GetName() ); + SvTreeListEntry* pEntry = InsertPage( pPage->GetName() ); SetCheckButtonState(pEntry, SvButtonState( SV_BUTTON_CHECKED ) ); SdrTextObj* pTO = (SdrTextObj*)pPage->GetPresObj(PRESOBJ_TEXT); @@ -174,13 +174,13 @@ void SdPageListControl::Fill( SdDrawDocument* pDoc ) sal_uInt16 SdPageListControl::GetSelectedPage() { - SvLBoxEntry* pSelEntry = GetCurEntry(); + SvTreeListEntry* pSelEntry = GetCurEntry(); sal_uInt16 nPage = 0; if ( pSelEntry ) { - SvLBoxTreeList* pTreeModel = GetModel(); - SvLBoxEntry* pEntry = pTreeModel->First(); + SvTreeList* pTreeModel = GetModel(); + SvTreeListEntry* pEntry = pTreeModel->First(); while( pEntry && pEntry != pSelEntry ) { @@ -197,7 +197,7 @@ sal_uInt16 SdPageListControl::GetSelectedPage() sal_Bool SdPageListControl::IsPageChecked( sal_uInt16 nPage ) { - SvLBoxEntry* pEntry = GetModel()->GetEntry(nPage); + SvTreeListEntry* pEntry = GetModel()->GetEntry(nPage); return pEntry?(sal_Bool)(GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED): sal_False; } diff --git a/sd/source/ui/dlg/dlgassim.hxx b/sd/source/ui/dlg/dlgassim.hxx index f6f9b792bf35..cccd80e0b21e 100644 --- a/sd/source/ui/dlg/dlgassim.hxx +++ b/sd/source/ui/dlg/dlgassim.hxx @@ -38,8 +38,8 @@ class SdPageListControl : public SvTreeListBox private: SvLBoxButtonData* m_pCheckButton; - SvLBoxEntry* InsertPage( const String& rPageName ); - void InsertTitle( SvLBoxEntry* pEntry, const String& rTitle ); + SvTreeListEntry* InsertPage( const String& rPageName ); + void InsertTitle( SvTreeListEntry* pEntry, const String& rTitle ); public: SdPageListControl( Window* pParent, const ResId& rResId ); diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx index 8637efa62936..04b60ea104d3 100644 --- a/sd/source/ui/dlg/sdtreelb.cxx +++ b/sd/source/ui/dlg/sdtreelb.cxx @@ -309,7 +309,7 @@ sal_Bool SdPageObjsTLB::SelectEntry( const String& rName ) if( rName.Len() ) { - SvLBoxEntry* pEntry = NULL; + SvTreeListEntry* pEntry = NULL; String aTmp; for( pEntry = First(); pEntry && !bFound; pEntry = Next( pEntry ) ) @@ -338,7 +338,7 @@ sal_Bool SdPageObjsTLB::HasSelectedChildren( const String& rName ) if( rName.Len() ) { - SvLBoxEntry* pEntry = NULL; + SvTreeListEntry* pEntry = NULL; String aTmp; for( pEntry = First(); pEntry && !bFound; pEntry = Next( pEntry ) ) @@ -452,7 +452,7 @@ void SdPageObjsTLB::AddShapeList ( SdrObject* pShape, const ::rtl::OUString& rsName, const bool bIsExcluded, - SvLBoxEntry* pParentEntry, + SvTreeListEntry* pParentEntry, const IconProvider& rIconProvider) { Image aIcon (rIconProvider.maImgPage); @@ -465,7 +465,7 @@ void SdPageObjsTLB::AddShapeList ( if (pShape != NULL) pUserData = pShape; - SvLBoxEntry* pEntry = InsertEntry( + SvTreeListEntry* pEntry = InsertEntry( rsName, aIcon, aIcon, @@ -598,7 +598,7 @@ sal_Bool SdPageObjsTLB::IsEqualToDoc( const SdDrawDocument* pInDoc ) SdrObject* pObj = NULL; SdPage* pPage = NULL; - SvLBoxEntry* pEntry = First(); + SvTreeListEntry* pEntry = First(); String aName; // Alle Pages incl. Objekte vergleichen @@ -665,7 +665,7 @@ String SdPageObjsTLB::GetSelectEntry() std::vector<rtl::OUString> SdPageObjsTLB::GetSelectEntryList( const sal_uInt16 nDepth ) const { std::vector<rtl::OUString> aEntries; - SvLBoxEntry* pEntry = FirstSelected(); + SvTreeListEntry* pEntry = FirstSelected(); while( pEntry ) { @@ -686,7 +686,7 @@ std::vector<rtl::OUString> SdPageObjsTLB::GetSelectEntryList( const sal_uInt16 n |* \************************************************************************/ -void SdPageObjsTLB::RequestingChildren( SvLBoxEntry* pFileEntry ) +void SdPageObjsTLB::RequestingChildren( SvTreeListEntry* pFileEntry ) { if( !pFileEntry->HasChildren() ) { @@ -694,7 +694,7 @@ void SdPageObjsTLB::RequestingChildren( SvLBoxEntry* pFileEntry ) { SdrObject* pObj = NULL; SdPage* pPage = NULL; - SvLBoxEntry* pPageEntry = NULL; + SvTreeListEntry* pPageEntry = NULL; Image aImgPage = Image( BitmapEx( SdResId( BMP_PAGE ) ) ); Image aImgPageObjs = Image( BitmapEx( SdResId( BMP_PAGEOBJS ) ) ); @@ -852,7 +852,7 @@ void SdPageObjsTLB::CloseBookmarkDoc() void SdPageObjsTLB::SelectHdl() { - SvLBoxEntry* pEntry = FirstSelected(); + SvTreeListEntry* pEntry = FirstSelected(); mbLinkableSelected = sal_True; @@ -878,7 +878,7 @@ void SdPageObjsTLB::KeyInput( const KeyEvent& rKEvt ) if( rKEvt.GetKeyCode().GetCode() == KEY_RETURN ) { // Auskommentierter Code aus svtools/source/contnr/svimpbox.cxx - SvLBoxEntry* pCursor = GetCurEntry(); + SvTreeListEntry* pCursor = GetCurEntry(); if( pCursor->HasChildren() || pCursor->HasChildrenOnDemand() ) { if( IsExpanded( pCursor ) ) @@ -905,7 +905,7 @@ void SdPageObjsTLB::StartDrag( sal_Int8 nAction, const Point& rPosPixel) (void)rPosPixel; SdNavigatorWin* pNavWin = NULL; - SvLBoxEntry* pEntry = GetEntry(rPosPixel); + SvTreeListEntry* pEntry = GetEntry(rPosPixel); if( mpFrame->HasChildWindow( SID_NAVIGATOR ) ) pNavWin = (SdNavigatorWin*) ( mpFrame->GetChildWindow( SID_NAVIGATOR )->GetContextWindow( SD_MOD() ) ); @@ -926,12 +926,12 @@ void SdPageObjsTLB::StartDrag( sal_Int8 nAction, const Point& rPosPixel) // Enable only the entries as drop targets that are children of the // page under the mouse. - SvLBoxEntry* pParent = GetRootLevelParent(pEntry); + SvTreeListEntry* pParent = GetRootLevelParent(pEntry); if (pParent != NULL) { SelectAll(sal_False, sal_False); Select(pParent, sal_True); - // for (SvLBoxEntry*pChild=FirstChild(pParent); pChild!=NULL; pChild=NextSibling(pChild)) + // for (SvTreeListEntry*pChild=FirstChild(pParent); pChild!=NULL; pChild=NextSibling(pChild)) // Select(pChild, sal_True); EnableSelectionAsDropTarget(sal_True, sal_True);//sal_False); } @@ -1076,7 +1076,7 @@ sal_Int8 SdPageObjsTLB::AcceptDrop (const AcceptDropEvent& rEvent) } else { - SvLBoxEntry* pEntry = GetDropTarget(rEvent.maPosPixel); + SvTreeListEntry* pEntry = GetDropTarget(rEvent.maPosPixel); if (rEvent.mbLeaving || !CheckDragAndDropMode( this, rEvent.mnAction )) { ImplShowTargetEmphasis( pTargetEntry, sal_False ); @@ -1201,12 +1201,12 @@ bool SdPageObjsTLB::PageBelongsToCurrentShow (const SdPage* pPage) const sal_Bool SdPageObjsTLB::NotifyMoving( - SvLBoxEntry* pTarget, - SvLBoxEntry* pEntry, - SvLBoxEntry*& rpNewParent, + SvTreeListEntry* pTarget, + SvTreeListEntry* pEntry, + SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos) { - SvLBoxEntry* pDestination = pTarget; + SvTreeListEntry* pDestination = pTarget; while (GetParent(pDestination) != NULL && GetParent(GetParent(pDestination)) != NULL) pDestination = GetParent(pDestination); @@ -1256,9 +1256,9 @@ sal_Bool SdPageObjsTLB::NotifyMoving( -SvLBoxEntry* SdPageObjsTLB::GetDropTarget (const Point& rLocation) +SvTreeListEntry* SdPageObjsTLB::GetDropTarget (const Point& rLocation) { - SvLBoxEntry* pEntry = SvTreeListBox::GetDropTarget(rLocation); + SvTreeListEntry* pEntry = SvTreeListBox::GetDropTarget(rLocation); if (pEntry == NULL) return NULL; @@ -1276,11 +1276,11 @@ SvLBoxEntry* SdPageObjsTLB::GetDropTarget (const Point& rLocation) pEntry = GetParent(pEntry); // Advance to next sibling. - SvLBoxEntry* pNext; + SvTreeListEntry* pNext; sal_uInt16 nDepth (0); while (pEntry != NULL) { - pNext = dynamic_cast<SvLBoxEntry*>(NextVisible(pEntry, &nDepth)); + pNext = dynamic_cast<SvTreeListEntry*>(NextVisible(pEntry, &nDepth)); if (pNext != NULL && nDepth > 0 && nDepth!=0xffff) pEntry = pNext; else @@ -1296,7 +1296,7 @@ SvLBoxEntry* SdPageObjsTLB::GetDropTarget (const Point& rLocation) -bool SdPageObjsTLB::IsDropAllowed (SvLBoxEntry* pEntry) +bool SdPageObjsTLB::IsDropAllowed (SvTreeListEntry* pEntry) { if (pEntry == NULL) return false; diff --git a/sd/source/ui/framework/module/ResourceManager.cxx b/sd/source/ui/framework/module/ResourceManager.cxx index 0cf323ca5ede..c0b07c71bfeb 100644 --- a/sd/source/ui/framework/module/ResourceManager.cxx +++ b/sd/source/ui/framework/module/ResourceManager.cxx @@ -65,8 +65,7 @@ ResourceManager::ResourceManager ( mxResourceId(rxResourceId), mxMainViewAnchorId(FrameworkHelper::Instance(rxController)->CreateResourceId( FrameworkHelper::msCenterPaneURL)), - msCurrentMainViewURL(), - mbIsEnabled(true) + msCurrentMainViewURL() { Reference<XControllerManager> xControllerManager (rxController, UNO_QUERY); if (xControllerManager.is()) @@ -125,27 +124,6 @@ void SAL_CALL ResourceManager::disposing (void) } } - - - -void ResourceManager::Enable (void) -{ - mbIsEnabled = true; - UpdateForMainViewShell(); -} - - - - -void ResourceManager::Disable (void) -{ - mbIsEnabled = false; - UpdateForMainViewShell(); -} - - - - void SAL_CALL ResourceManager::notifyConfigurationChange ( const ConfigurationChangeEvent& rEvent) throw (RuntimeException) @@ -211,8 +189,7 @@ void ResourceManager::UpdateForMainViewShell (void) { ConfigurationController::Lock aLock (mxConfigurationController); - if (mbIsEnabled - && mpActiveMainViewContainer->find(msCurrentMainViewURL) + if (mpActiveMainViewContainer->find(msCurrentMainViewURL) != mpActiveMainViewContainer->end()) { // Activate resource. @@ -253,25 +230,22 @@ void ResourceManager::HandleResourceRequest( bool bActivation, const Reference<XConfiguration>& rxConfiguration) { - if (mbIsEnabled) + Sequence<Reference<XResourceId> > aCenterViews = rxConfiguration->getResources( + FrameworkHelper::CreateResourceId(FrameworkHelper::msCenterPaneURL), + FrameworkHelper::msViewURLPrefix, + AnchorBindingMode_DIRECT); + if (aCenterViews.getLength() == 1) { - Sequence<Reference<XResourceId> > aCenterViews = rxConfiguration->getResources( - FrameworkHelper::CreateResourceId(FrameworkHelper::msCenterPaneURL), - FrameworkHelper::msViewURLPrefix, - AnchorBindingMode_DIRECT); - if (aCenterViews.getLength() == 1) + if (bActivation) { - if (bActivation) - { - mpActiveMainViewContainer->insert(aCenterViews[0]->getResourceURL()); - } - else - { - MainViewContainer::iterator iElement ( - mpActiveMainViewContainer->find(aCenterViews[0]->getResourceURL())); - if (iElement != mpActiveMainViewContainer->end()) - mpActiveMainViewContainer->erase(iElement); - } + mpActiveMainViewContainer->insert(aCenterViews[0]->getResourceURL()); + } + else + { + MainViewContainer::iterator iElement ( + mpActiveMainViewContainer->find(aCenterViews[0]->getResourceURL())); + if (iElement != mpActiveMainViewContainer->end()) + mpActiveMainViewContainer->erase(iElement); } } } diff --git a/sd/source/ui/framework/module/ResourceManager.hxx b/sd/source/ui/framework/module/ResourceManager.hxx index cd696619df88..60da4dd1609d 100644 --- a/sd/source/ui/framework/module/ResourceManager.hxx +++ b/sd/source/ui/framework/module/ResourceManager.hxx @@ -67,20 +67,6 @@ public: virtual void SAL_CALL disposing (void); - /** Allow the ResourceManager to make resource activation or - deactivation requests. - */ - void Enable (void); - - /** Disable the resource management. When called, the ResourceManager - requests the resource to be deactivated. Until enabled again it - does not make any further requests for resource activation or - deactivation. - - Call this for example to hide resources in read-only mode. - */ - void Disable (void); - // XConfigurationChangeListener virtual void SAL_CALL notifyConfigurationChange ( @@ -108,7 +94,6 @@ private: css::uno::Reference<css::drawing::framework::XResourceId> mxMainViewAnchorId; ::rtl::OUString msCurrentMainViewURL; - bool mbIsEnabled; void HandleMainViewSwitch ( const ::rtl::OUString& rsViewURL, diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index 49c67bc0b02b..2a009430d4fc 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -87,7 +87,7 @@ TYPEINIT1( FuSelection, FuDraw ); /************************************************************************* |* -|* Konstruktor +|* Constructor |* \************************************************************************/ @@ -120,13 +120,13 @@ void FuSelection::DoExecute( SfxRequest& rReq ) { FuDraw::DoExecute( rReq ); - // Objektbar auswaehlen + // Select object bar SelectionHasChanged(); } /************************************************************************* |* -|* Destruktor +|* Destructor |* \************************************************************************/ @@ -149,7 +149,7 @@ FuSelection::~FuSelection() sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { - // Hack fuer #?????# + // Hack for #?????# bHideAndAnimate = sal_False; pHdl = NULL; @@ -185,7 +185,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) && (mpView->IsFrameDragSingles() || !mpView->HasMarkablePoints())) { /****************************************************************** - * KEIN BEZIER_EDITOR + * NO BEZIER_EDITOR ******************************************************************/ mpWindow->CaptureMouse(); pHdl = mpView->PickHandle(aMDPos); @@ -200,8 +200,8 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) if (!pHdl && mpView->Is3DRotationCreationActive()) { /****************************************************************** - * Wenn 3D-Rotationskoerper erstellt werden sollen, jetzt - * die Erstellung beenden + * If 3D-rotation bodies are about to be created, + * end creation now. ******************************************************************/ bSuppressChangesOfSelection = sal_True; if(mpWindow) @@ -230,7 +230,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { if (!pHdl && mpView->Is3DRotationCreationActive()) { - // Wechsel Rotationskoerper -> Selektion + // Switch between 3D-rotation body -> selection mpView->ResetCreationActive(); } else if (bWaterCan) @@ -241,7 +241,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) } else { - // Handle oder markiertes Objekt getroffen + // Handle oder marked object hit bFirstMouseMove = sal_True; aDragTimer.Start(); } @@ -267,7 +267,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) nSdrObjKind == OBJ_OUTLINETEXT || !aVEvt.pObj->IsEmptyPresObj())) { - // Seamless Editing: Verzweigen zur Texteingabe + // Seamless Editing: branch to text input if (!rMEvt.IsShift()) mpView->UnmarkAll(); @@ -275,7 +275,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) mpViewShell->GetViewFrame()->GetDispatcher()-> Execute(SID_TEXTEDIT, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L); - return bReturn; // VORSICHT, durch den synchronen Slot ist das objekt jetzt geloescht + return bReturn; // CAUTION, due to the synchronous slot the object is deleted now } } else if ( !rMEvt.IsMod2() && rMEvt.GetClicks() == 1 && @@ -290,13 +290,13 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) if (rMEvt.IsMod1()) { - // Im neuen Frame oeffnen + // Open in new frame pFrame->GetDispatcher()->Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aStrItem, &aBrowseItem, &aReferer, 0L); } else { - // Im aktuellen Frame oeffnen + // Open in current frame SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame); pFrame->GetDispatcher()->Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L); @@ -318,14 +318,14 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) { if(rMEvt.GetClicks() == 1) { - // In die Gruppe hineinschauen + // Look into the group if (mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP)) bReturn = AnimateObj(pObj, aMDPos); } else if( !bReadOnly && rMEvt.GetClicks() == 2) { - // Neu: Doppelklick auf selektiertes Gruppenobjekt - // Gruppe betreten + // New: double click on selected Group object + // enter group if ( ! bSelectionOnly && pObj && pObj->GetPage() == pPV->GetPage()) @@ -372,7 +372,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) if (pIPClient && pIPClient->IsObjectInPlaceActive()) { - // OLE-Objekt wird im nachfolgenden UnmarkAll() deaktiviert + // OLE-Objekt gets deactivated in subsequent UnmarkAll() bDeactivateOLE = sal_True; } @@ -393,7 +393,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) if (rMEvt.IsShift() && mpView->GetMarkedObjectList().GetMarkCount() > 1) { - // Bei Einfachselektion kein Toggle + // No Toggle on single selection bToggle = sal_True; } @@ -408,7 +408,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) (!rMEvt.IsShift() || mpView->IsMarkedHit(aMDPos, nHitLog))) { /********************************************************** - * Objekt verschieben + * Move object **********************************************************/ aDragTimer.Start(); @@ -419,7 +419,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) else { /********************************************************** - * Objekt selektieren + * Select object **********************************************************/ if ( ! rMEvt.IsRight()) mpView->BegMarkObj(aMDPos); @@ -449,7 +449,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) if (eHit == SDRHIT_HANDLE && aVEvt.pHdl->GetKind() == HDL_BWGT) { /****************************************************************** - * Handle draggen + * Drag Handle ******************************************************************/ if ( ! rMEvt.IsRight()) mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, aVEvt.pHdl, nDrgLog); @@ -457,14 +457,14 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) else if (eHit == SDRHIT_MARKEDOBJECT && nEditMode == SID_BEZIER_INSERT) { /****************************************************************** - * Klebepunkt einfuegen + * Insert glue point ******************************************************************/ mpView->BegInsObjPoint(aMDPos, rMEvt.IsMod1()); } else if (eHit == SDRHIT_MARKEDOBJECT && rMEvt.IsMod1()) { /****************************************************************** - * Klebepunkt selektieren + * Select glue point ******************************************************************/ if (!rMEvt.IsShift()) mpView->UnmarkAllPoints(); @@ -475,7 +475,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) else if (eHit == SDRHIT_MARKEDOBJECT && !rMEvt.IsShift() && !rMEvt.IsMod2()) { /****************************************************************** - * Objekt verschieben + * Move object ******************************************************************/ if ( ! rMEvt.IsRight()) mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, NULL, nDrgLog); @@ -483,7 +483,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) else if (eHit == SDRHIT_HANDLE) { /****************************************************************** - * Klebepunkt selektieren + * Select glue point ******************************************************************/ if (!mpView->IsPointMarked(*aVEvt.pHdl) || rMEvt.IsShift()) { @@ -514,7 +514,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) } else { - // point IS marked and NO shift is pressed. Start + // Point IS marked and NO shift is pressed. Start // dragging of selected point(s) pHdl = mpView->PickHandle(aMDPos); if(pHdl) @@ -525,7 +525,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) else { /****************************************************************** - * Objekt selektieren oder draggen + * Select or drag object ******************************************************************/ if (!rMEvt.IsShift() && !rMEvt.IsMod2() && eHit == SDRHIT_UNMARKEDOBJECT) { @@ -549,14 +549,14 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) if (bMarked && (!rMEvt.IsShift() || eHit == SDRHIT_MARKEDOBJECT)) { - // Objekt verschieben + // Move object if ( ! rMEvt.IsRight()) mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, aVEvt.pHdl, nDrgLog); } else if (mpView->AreObjectsMarked()) { /************************************************************** - * Klebepunkt selektieren + * Select glue point **************************************************************/ if (!rMEvt.IsShift()) mpView->UnmarkAllPoints(); @@ -567,7 +567,7 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) else { /************************************************************** - * Objekt selektieren + * Select object **************************************************************/ if ( ! rMEvt.IsRight()) mpView->BegMarkObj(aMDPos); @@ -642,10 +642,12 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) // (and deselect others) as a preparation for showing the context // menu. const bool bSelectionOnly = rMEvt.IsRight(); + SdrObject* pObj; + SdrPageView* pPV; if (bHideAndAnimate) { - // Animation laeuft noch -> sofort returnieren + // Animation is still running -> return immediately bHideAndAnimate = sal_False; pHdl = NULL; mpWindow->ReleaseMouse(); @@ -668,12 +670,12 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) if (mpView->IsFrameDragSingles() || !mpView->HasMarkablePoints()) { /********************************************************************** - * KEIN BEZIER_EDITOR + * NO BEZIER_EDITOR **********************************************************************/ if ( mpView->IsDragObj() ) { /****************************************************************** - * Objekt wurde verschoben + * Object was moved ******************************************************************/ FrameView* pFrameView = mpViewShell->GetFrameView(); sal_Bool bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy()); @@ -693,8 +695,19 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) Abs(aPnt.X() - aMDPos.X()) < nDrgLog && Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog) { + /************************************************************* + * If a user wants to click on an object in front of a masked + * one, he releases the mouse button immediately + **************************************************************/ + if (mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_BEFOREMARK)) + { + //not Needed in the ordinary pick routine for some reason... + mpView->UnmarkAllObj(); + mpView->MarkObj(pObj,pPV,false,false); + return (bReturn); + } /************************************************************** - * Toggle zw. Selektion und Rotation + * Toggle between selection and rotation **************************************************************/ SdrObject* pSingleObj = NULL; sal_uLong nMarkCount = mpView->GetMarkedObjectList().GetMarkCount(); @@ -737,8 +750,8 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) pHdl->GetKind() != HDL_REF2 && mpView->Is3DRotationCreationActive()) { /********************************************************* - * Wenn 3D-Rotationskoerper erstellt werden sollen, jetzt - * die Erstellung beenden + * If 3D-rotation bodies are about to be created, + * end creation now **********************************************************/ long nAngle1 = GetAngle(aPnt - mpView->GetRef1()); nAngle1 -= 27000; @@ -765,7 +778,7 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) && Abs(aPnt.X() - aMDPos.X()) < nDrgLog && Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog) { - // Gruppe betreten + // Enter group mpView->MarkObj(aPnt, nHitLog, rMEvt.IsShift(), rMEvt.IsMod1()); } @@ -778,7 +791,7 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) { if( rMEvt.IsRight() ) { - // Bei rechter Maustaste wird im Giesskannenmodus ein Undo ausgefuehrt + // In watering-can mode, on press onto right mouse button, a undo is executed mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_UNDO, SFX_CALLMODE_ASYNCHRON ); } else if (pWaterCanCandidate != NULL) @@ -849,7 +862,7 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) mpWindow->ReleaseMouse(); FuDraw::MouseButtonUp(rMEvt); mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SYNCHRON); - return bReturn; // VORSICHT, durch den synchronen Slot ist das objekt jetzt geloescht + return bReturn; // CAUTION, due to the synchronous slot, the object is deleted now. } FuDraw::MouseButtonUp(rMEvt); @@ -894,7 +907,7 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) if (eHit == SDRHIT_NONE) { - // Klick auf der Stelle: deselektieren + // Click on the same place - unselect mpView->UnmarkAllObj(); } } @@ -904,7 +917,7 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) Abs(aPnt.X() - aMDPos.X()) < nDrgLog && Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog) { - // Gruppe betreten + // Enter group mpView->MarkObj(aPnt, nHitLog, sal_False, rMEvt.IsMod1()); } @@ -921,10 +934,10 @@ sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) /************************************************************************* |* -|* Tastaturereignisse bearbeiten +|* Process keyboard input |* -|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls -|* sal_False. +|* If a KeyEvent is being processed, the Return-Wert is sal_True, +|* sal_False otherwise. |* \************************************************************************/ @@ -960,7 +973,7 @@ sal_Bool FuSelection::KeyInput(const KeyEvent& rKEvt) /************************************************************************* |* -|* Function aktivieren +|* Activate function |* \************************************************************************/ @@ -974,7 +987,7 @@ void FuSelection::Activate() { case SID_OBJECT_ROTATE: { - // (gemapter) Slot wird explizit auf Rotate gesetzt + // (mapped) Slot is explicitly set to rotate if( mpViewShell->ISA(DrawViewShell) ) { sal_uInt16* pSlotArray = @@ -1107,7 +1120,7 @@ void FuSelection::Activate() /************************************************************************* |* -|* Function deaktivieren +|* Deactivate function |* \************************************************************************/ @@ -1119,7 +1132,7 @@ void FuSelection::Deactivate() /************************************************************************* |* -|* Selektion hat sich geaendert +|* Selection was changed |* \************************************************************************/ @@ -1131,7 +1144,7 @@ void FuSelection::SelectionHasChanged() if ((mpView->Is3DRotationCreationActive() && !bSuppressChangesOfSelection)) { - // Wechsel Rotationskoerper -> Selektion + // Switch rotation body -> selection mpView->ResetCreationActive(); nSlotId = SID_OBJECT_SELECT; Activate(); @@ -1144,7 +1157,7 @@ void FuSelection::SelectionHasChanged() /************************************************************************* |* -|* Aktuellen Bezier-Editmodus setzen +|* Set current bezier edit mode |* \************************************************************************/ @@ -1170,7 +1183,7 @@ void FuSelection::SetEditMode(sal_uInt16 nMode) /************************************************************************* |* -|* Animation oder Interaktion ausfuehren +|* Execute animation or interaction |* \************************************************************************/ @@ -1216,7 +1229,7 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) if ( pIMapObj && pIMapObj->GetURL().Len() ) { - // Sprung zu Dokument + // Jump to Document mpWindow->ReleaseMouse(); SfxStringItem aStrItem(SID_FILE_NAME, pIMapObj->GetURL()); SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName()); @@ -1236,7 +1249,7 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) mpDoc->GetAnimationInfo(pObj)) { /********************************************************** - * Animations-Objekt in der Mitte getroffen -> Interaktion + * Animation-object hit in the middle -> interaction **********************************************************/ SdAnimationInfo* pInfo = mpDoc->GetAnimationInfo(pObj); DrawViewShell* pDrViewSh = static_cast<DrawViewShell*>(mpViewShell); @@ -1246,7 +1259,7 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) { case presentation::ClickAction_BOOKMARK: { - // Sprung zu Bookmark (Seite oder Objekt) + // Jump to Bookmark (Page or Object) SfxStringItem aItem(SID_NAVIGATOR_OBJECT, pInfo->GetBookmark()); mpViewShell->GetViewFrame()->GetDispatcher()-> Execute(SID_NAVIGATOR_OBJECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, &aItem, 0L); @@ -1257,7 +1270,7 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) case presentation::ClickAction_DOCUMENT: { String sBookmark( pInfo->GetBookmark() ); - // Sprung zu Dokument + // Jump to document if (sBookmark.Len()) { SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName()); @@ -1276,7 +1289,7 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) case presentation::ClickAction_PREVPAGE: { - // Sprung zur vorherigen Seite + // Jump to the previous page SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_PREVIOUS); mpViewShell->GetViewFrame()->GetDispatcher()-> Execute(SID_NAVIGATOR_PAGE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -1287,7 +1300,7 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) case presentation::ClickAction_NEXTPAGE: { - // Sprung zur naechsten Seite + // Jump to the next page SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_NEXT); mpViewShell->GetViewFrame()->GetDispatcher()-> Execute(SID_NAVIGATOR_PAGE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -1298,7 +1311,7 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) case presentation::ClickAction_FIRSTPAGE: { - // Sprung zu erster Seite + // Jump to the first page SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_FIRST); mpViewShell->GetViewFrame()->GetDispatcher()-> Execute(SID_NAVIGATOR_PAGE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -1309,7 +1322,7 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) case presentation::ClickAction_LASTPAGE: { - // Sprung zu letzter Seite + // Jump to the last page SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_LAST); mpViewShell->GetViewFrame()->GetDispatcher()-> Execute(SID_NAVIGATOR_PAGE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, @@ -1334,7 +1347,7 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) case presentation::ClickAction_VERB: { - // Verb zuweisen + // Assign verb mpView->UnmarkAll(); mpView->MarkObj(pObj, mpView->GetSdrPageView(), sal_False, sal_False); pDrViewSh->DoVerb((sal_Int16)pInfo->mnVerb); @@ -1369,7 +1382,7 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) case presentation::ClickAction_MACRO: { - // Execute makro + // Execute macro String aMacro = pInfo->GetBookmark(); if ( SfxApplication::IsXScriptURL( aMacro ) ) @@ -1436,7 +1449,7 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) mpDoc->GetAnimationInfo(pObj)) { /********************************************************** - * Effekt-Objekt in der Mitte getroffen -> Effekt abspielen + * Effect-Object hit in the middle -> Play effect **********************************************************/ SdAnimationInfo* pInfo = mpDoc->GetAnimationInfo(pObj); @@ -1458,7 +1471,7 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos) -/** is called when the currenct function should be aborted. <p> +/** is called when the current function should be aborted. <p> This is used when a function gets a KEY_ESCAPE but can also be called directly. diff --git a/sd/source/ui/inc/ViewShellBase.hxx b/sd/source/ui/inc/ViewShellBase.hxx index 089368ab1542..7d1e7d53754f 100644 --- a/sd/source/ui/inc/ViewShellBase.hxx +++ b/sd/source/ui/inc/ViewShellBase.hxx @@ -123,6 +123,10 @@ public: */ virtual void GetState (SfxItemSet& rSet); + /* override these from SfxViewShell */ + virtual String GetSelectionText(sal_Bool); + virtual sal_Bool HasSelection(sal_Bool) const; + SvBorder GetBorder (bool bOuterResize); virtual void InnerResizePixel (const Point& rOrigin, const Size& rSize); virtual void OuterResizePixel (const Point& rOrigin, const Size& rSize); diff --git a/sd/source/ui/inc/fusel.hxx b/sd/source/ui/inc/fusel.hxx index 887bf73be8a7..536ab86c05d4 100644 --- a/sd/source/ui/inc/fusel.hxx +++ b/sd/source/ui/inc/fusel.hxx @@ -45,8 +45,8 @@ public: virtual sal_Bool MouseButtonUp(const MouseEvent& rMEvt); virtual sal_Bool MouseButtonDown(const MouseEvent& rMEvt); - virtual void Activate(); // Function aktivieren - virtual void Deactivate(); // Function deaktivieren + virtual void Activate(); // Activate function + virtual void Deactivate(); // Deactivate function virtual void SelectionHasChanged(); @@ -55,7 +55,7 @@ public: sal_Bool AnimateObj(SdrObject* pObj, const Point& rPos); - /** is called when the currenct function should be aborted. <p> + /** is called when the current function should be aborted. <p> This is used when a function gets a KEY_ESCAPE but can also be called directly. diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx index 21d89c9a6705..50ad60e4353d 100644 --- a/sd/source/ui/inc/sdtreelb.hxx +++ b/sd/source/ui/inc/sdtreelb.hxx @@ -47,7 +47,7 @@ class SdNavigatorWin; class SdrObject; class SdrObjList; class SdPage; -class SvLBoxEntry; +class SvTreeListEntry; namespace sd { class DrawDocShell; @@ -150,7 +150,7 @@ protected: virtual sal_Int8 AcceptDrop( const AcceptDropEvent& rEvt ); virtual sal_Int8 ExecuteDrop( const ExecuteDropEvent& rEvt ); - virtual void RequestingChildren( SvLBoxEntry* pParent ); + virtual void RequestingChildren( SvTreeListEntry* pParent ); void DoDrag(); void OnDragFinished( sal_uInt8 nDropAction ); @@ -179,13 +179,13 @@ protected: associated list box entries. */ virtual sal_Bool NotifyMoving( - SvLBoxEntry* pTarget, - SvLBoxEntry* pEntry, - SvLBoxEntry*& rpNewParent, + SvTreeListEntry* pTarget, + SvTreeListEntry* pEntry, + SvTreeListEntry*& rpNewParent, sal_uLong& rNewChildPos); using Window::GetDropTarget; - virtual SvLBoxEntry* GetDropTarget (const Point& rLocation); + virtual SvTreeListEntry* GetDropTarget (const Point& rLocation); public: @@ -238,7 +238,7 @@ private: /** Return <TRUE/> when the current transferable may be dropped at the given list box entry. */ - bool IsDropAllowed (SvLBoxEntry* pEntry); + bool IsDropAllowed (SvTreeListEntry* pEntry); /** This inner class is defined in sdtreelb.cxx and is basically a container for the icons used in the list box for the entries. @@ -265,7 +265,7 @@ private: SdrObject* pShape, const ::rtl::OUString& rsName, const bool bIsExcluded, - SvLBoxEntry* pParentEntry, + SvTreeListEntry* pParentEntry, const IconProvider& rIconProvider); /** Add the given object to a transferable object so that the object can diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx index deb881431f82..69a53f4e6837 100644 --- a/sd/source/ui/remotecontrol/Server.cxx +++ b/sd/source/ui/remotecontrol/Server.cxx @@ -175,7 +175,9 @@ void RemoteServer::setup() spServer = new RemoteServer(); spServer->launch(); +#ifdef ENABLE_BLUETOOTH sd::BluetoothServer::setup( &(spServer->mCommunicators) ); +#endif } @@ -307,11 +309,19 @@ void SdDLL::RegisterRemotes() bool RemoteServer::isBluetoothDiscoverable() { +#ifdef ENABLE_BLUETOOTH return BluetoothServer::isDiscoverable(); +#else + return false; +#endif } void RemoteServer::setBluetoothDiscoverable( bool aDiscoverable ) { +#ifdef ENABLE_BLUETOOTH BluetoothServer::setDiscoverable( aDiscoverable ); +#else + (void) aDiscoverable; +#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 2cc9d30f8bf2..e0d3c9aa17ca 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -26,7 +26,8 @@ * ************************************************************************/ -#include "com/sun/star/frame/XComponentLoader.hpp" +#include <com/sun/star/frame/AutoRecovery.hpp> +#include <com/sun/star/frame/XComponentLoader.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/document/XEventsSupplier.hpp> #include <com/sun/star/drawing/XMasterPageTarget.hpp> @@ -2852,7 +2853,6 @@ void SlideshowImpl::setAutoSaveState( bool bOn) { try { - uno::Reference<lang::XMultiServiceFactory> xFac( ::comphelper::getProcessServiceFactory() ); uno::Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); uno::Reference< util::XURLTransformer > xParser(util::URLTransformer::create(xContext)); @@ -2864,9 +2864,7 @@ void SlideshowImpl::setAutoSaveState( bool bOn) aArgs[0].Name = "AutoSaveState"; aArgs[0].Value <<= bOn ? sal_True : sal_False; - uno::Reference< frame::XDispatch > xAutoSave( - xFac->createInstance( "com.sun.star.frame.AutoRecovery" ), - uno::UNO_QUERY_THROW); + uno::Reference< frame::XDispatch > xAutoSave = frame::AutoRecovery::create(xContext); xAutoSave->dispatch(aURL, aArgs); } catch( Exception& ) diff --git a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx index 95c0bab2d814..a3e4b1b6f826 100644 --- a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx +++ b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx @@ -35,6 +35,7 @@ #include <comphelper/processfactory.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/container/XHierarchicalNameAccess.hpp> +#include <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/beans/PropertyValue.hpp> using namespace ::com::sun::star; @@ -82,19 +83,14 @@ Timer CacheConfiguration::maReleaseTimer; CacheConfiguration::CacheConfiguration (void) { // Get the cache size from configuration. - const ::rtl::OUString sConfigurationProviderServiceName("com.sun.star.configuration.ConfigurationProvider"); const ::rtl::OUString sPathToImpressConfigurationRoot("/org.openoffice.Office.Impress/"); const ::rtl::OUString sPathToNode("MultiPaneGUI/SlideSorter/PreviewCache"); try { // Obtain access to the configuration. - Reference<lang::XMultiServiceFactory> xProvider ( - ::comphelper::getProcessServiceFactory()->createInstance( - sConfigurationProviderServiceName), - UNO_QUERY); - if ( ! xProvider.is()) - return; + Reference<lang::XMultiServiceFactory> xProvider = + configuration::theDefaultProvider::get( ::comphelper::getProcessComponentContext() ); // Obtain access to Impress configuration. Sequence<Any> aCreationArguments(3); diff --git a/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx b/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx index c703d64e81fc..eaefe0207b23 100644 --- a/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsAnimationFunction.cxx @@ -36,27 +36,6 @@ namespace sd { namespace slidesorter { namespace controller { - -double AnimationFunction::Linear (const double nTime) -{ - OSL_ASSERT(nTime>=0.0 && nTime<=1.0); - return nTime; -} - - - - -double AnimationFunction::Blend ( - const double nStartValue, - const double nEndValue, - const double nTime) -{ - return nStartValue*(1-nTime) + nEndValue*nTime; -} - - - - //===== AnimationBezierFunction =============================================== AnimationBezierFunction::AnimationBezierFunction ( diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx index a451c12c0176..516ba9811b15 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx @@ -246,10 +246,17 @@ public: MultiSelectionModeHandler ( SlideSorter& rSlideSorter, SelectionFunction& rSelectionFunction, +#ifndef MACOSX const Point& rMouseModelPosition); +#else + const Point& rMouseModelPosition, + const sal_uInt32 nEventCode); +#endif virtual ~MultiSelectionModeHandler (void); +#ifndef MACOSX void Initialize(const sal_uInt32 nEventCode); +#endif virtual SelectionFunction::Mode GetMode (void) const; virtual void Abort (void); @@ -296,10 +303,19 @@ class DragAndDropModeHandler : public SelectionFunction::ModeHandler public: DragAndDropModeHandler ( SlideSorter& rSlideSorter, +#ifndef MACOSX SelectionFunction& rSelectionFunction); +#else + SelectionFunction& rSelectionFunction, + const Point& rMousePosition, + ::Window* pWindow); +#endif virtual ~DragAndDropModeHandler (void); +#ifndef MACOSX void Initialize(const Point& rMousePosition, ::Window* pWindow); +#endif + virtual SelectionFunction::Mode GetMode (void) const; virtual void Abort (void); @@ -775,6 +791,7 @@ void SelectionFunction::SwitchToDragAndDropMode (const Point aMousePosition) { if (mpModeHandler->GetMode() != DragAndDropMode) { +#ifndef MACOSX ::boost::shared_ptr<DragAndDropModeHandler> handler( new DragAndDropModeHandler(mrSlideSorter, *this)); SwitchMode(handler); @@ -782,6 +799,10 @@ void SelectionFunction::SwitchToDragAndDropMode (const Point aMousePosition) // could already trigger DND events, which would recursively trigger this code again, // and without mpModeHandler set it would again try to set a new handler. handler->Initialize(aMousePosition, mpWindow); +#else + SwitchMode(::boost::shared_ptr<ModeHandler>( + new DragAndDropModeHandler(mrSlideSorter, *this, aMousePosition, mpWindow))); +#endif } } @@ -793,6 +814,7 @@ void SelectionFunction::SwitchToMultiSelectionMode ( const sal_uInt32 nEventCode) { if (mpModeHandler->GetMode() != MultiSelectionMode) +#ifndef MACOSX { ::boost::shared_ptr<MultiSelectionModeHandler> handler( new MultiSelectionModeHandler(mrSlideSorter, *this, aMousePosition)); @@ -801,6 +823,10 @@ void SelectionFunction::SwitchToMultiSelectionMode ( // is non-trivial, so it could possibly recurse just like the DND handler above. handler->Initialize(nEventCode); } +#else + SwitchMode(::boost::shared_ptr<ModeHandler>( + new MultiSelectionModeHandler(mrSlideSorter, *this, aMousePosition, nEventCode))); +#endif } @@ -1414,7 +1440,12 @@ void NormalModeHandler::ResetButtonDownLocation (void) MultiSelectionModeHandler::MultiSelectionModeHandler ( SlideSorter& rSlideSorter, SelectionFunction& rSelectionFunction, +#ifndef MACOSX const Point& rMouseModelPosition) +#else + const Point& rMouseModelPosition, + const sal_uInt32 nEventCode) +#endif : ModeHandler(rSlideSorter, rSelectionFunction, false), meSelectionMode(SM_Normal), maSecondCorner(rMouseModelPosition), @@ -1423,11 +1454,13 @@ MultiSelectionModeHandler::MultiSelectionModeHandler ( mnAnchorIndex(-1), mnSecondIndex(-1) { +#ifndef MACOSX } void MultiSelectionModeHandler::Initialize(const sal_uInt32 nEventCode) { +#endif const Pointer aSelectionPointer (POINTER_TEXT); mrSlideSorter.GetContentWindow()->SetPointer(aSelectionPointer); SetSelectionModeFromModifier(nEventCode); @@ -1683,13 +1716,22 @@ void MultiSelectionModeHandler::UpdateSelection (void) DragAndDropModeHandler::DragAndDropModeHandler ( SlideSorter& rSlideSorter, +#ifndef MACOSX SelectionFunction& rSelectionFunction) +#else + SelectionFunction& rSelectionFunction, + const Point& rMousePosition, + ::Window* pWindow) +#endif : ModeHandler(rSlideSorter, rSelectionFunction, false) { +#ifndef MACOSX } + void DragAndDropModeHandler::Initialize(const Point& rMousePosition, ::Window* pWindow) { +#endif SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag; if (pDragTransferable==NULL && mrSlideSorter.GetViewShell() != NULL) { diff --git a/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx b/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx index 8f119739e898..b94ac65895ba 100644 --- a/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx +++ b/sd/source/ui/slidesorter/inc/controller/SlsAnimationFunction.hxx @@ -44,26 +44,6 @@ class SlideSorterView; namespace sd { namespace slidesorter { namespace controller { -/** A collection of functions that are usefull when creating animations. - They are collected here until a better place is found. -*/ -class AnimationFunction - : private ::boost::noncopyable -{ -public: - /** Acceleration function that maps [0,1] to [0,1] linearly, ie it - returns the given time value unaltered. - */ - static double Linear (const double nTime); - - /** Blend two points together according to the given weight. - */ - static double Blend (const double nStartValue, const double nEndValue, const double nWeight); -}; - - - - class AnimationBezierFunction { public: diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx index 62d2c5060175..f8756858974e 100644 --- a/sd/source/ui/toolpanel/LayoutMenu.cxx +++ b/sd/source/ui/toolpanel/LayoutMenu.cxx @@ -174,7 +174,7 @@ static snewfoil_value_info standard[] = }; LayoutMenu::LayoutMenu( TreeNode* pParent, ToolPanelViewShell& i_rPanelViewShell ) - : ValueSet (pParent->GetWindow()), + : ValueSet(pParent->GetWindow(), WB_ITEMBORDER), TreeNode(pParent), DragSourceHelper(this), DropTargetHelper(this), diff --git a/sd/source/ui/tools/ConfigurationAccess.cxx b/sd/source/ui/tools/ConfigurationAccess.cxx index f56e7dafe190..50bff602a3d5 100644 --- a/sd/source/ui/tools/ConfigurationAccess.cxx +++ b/sd/source/ui/tools/ConfigurationAccess.cxx @@ -31,6 +31,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/container/XHierarchicalNameAccess.hpp> +#include <com/sun/star/configuration/theDefaultProvider.hpp> #include <com/sun/star/util/XChangesBatch.hpp> #include <comphelper/processfactory.hxx> #include <tools/diagnose_ex.h> @@ -47,17 +48,9 @@ ConfigurationAccess::ConfigurationAccess ( const WriteMode eMode) : mxRoot() { - Reference<lang::XMultiComponentFactory> xFactory (rxContext->getServiceManager()); - if (xFactory.is()) - { - Reference<lang::XMultiServiceFactory> xProvider ( - xFactory->createInstanceWithContext( - "com.sun.star.configuration.ConfigurationProvider", - rxContext), - UNO_QUERY); - if (xProvider.is()) - Initialize(xProvider, rsRootName, eMode); - } + Reference<lang::XMultiServiceFactory> xProvider = + configuration::theDefaultProvider::get( rxContext ); + Initialize(xProvider, rsRootName, eMode); } @@ -68,12 +61,9 @@ ConfigurationAccess::ConfigurationAccess ( const WriteMode eMode) : mxRoot() { - Reference<lang::XMultiServiceFactory> xProvider ( - ::comphelper::getProcessServiceFactory()->createInstance( - "com.sun.star.configuration.ConfigurationProvider"), - UNO_QUERY); - if (xProvider.is()) - Initialize(xProvider, rsRootName, eMode); + Reference<lang::XMultiServiceFactory> xProvider = + configuration::theDefaultProvider::get( ::comphelper::getProcessComponentContext() ); + Initialize(xProvider, rsRootName, eMode); } diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 5dda9c76355e..5742ad9aad60 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -632,6 +632,7 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, SetMasterDepend( ::cppu::any2bool(aValue) ); break; +#ifdef FIXME_REMOVE_WHEN_RE_BASE_COMPLETE case WID_LEGACYFRAGMENT: { uno::Reference< io::XInputStream > xInputStream; @@ -644,6 +645,7 @@ void SAL_CALL SdXShape::setPropertyValue( const ::rtl::OUString& aPropertyName, } } break; +#endif case WID_ANIMPATH: { uno::Reference< drawing::XShape > xShape( aValue, uno::UNO_QUERY ); diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 764884112fae..ae9c4e4e371d 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -239,25 +239,11 @@ SfxViewShell* ViewShellBase::CreateInstance ( pBase->LateInit(""); return pBase; } -void ViewShellBase::RegisterFactory( sal_uInt16 nPrio ) -{ - pFactory = new SfxViewFactory( &CreateInstance,nPrio,"Default" ); - InitFactory(); -} -void ViewShellBase::InitFactory() -{ - SFX_VIEW_REGISTRATION(DrawDocShell); -} - - SFX_IMPL_INTERFACE(ViewShellBase, SfxViewShell, SdResId(0)) { } - - - ViewShellBase::ViewShellBase ( SfxViewFrame* _pFrame, SfxViewShell*) @@ -489,7 +475,25 @@ void ViewShellBase::InitializeFramework (void) } +String ViewShellBase::GetSelectionText(sal_Bool bCompleteWords) +{ + ::boost::shared_ptr<ViewShell> const pMainShell(GetMainViewShell()); + DrawViewShell *const pDrawViewShell( + dynamic_cast<DrawViewShell*>(pMainShell.get())); + return (pDrawViewShell) + ? pDrawViewShell->GetSelectionText(bCompleteWords) + : SfxViewShell::GetSelectionText(bCompleteWords); +} +sal_Bool ViewShellBase::HasSelection(sal_Bool bText) const +{ + ::boost::shared_ptr<ViewShell> const pMainShell(GetMainViewShell()); + DrawViewShell *const pDrawViewShell( + dynamic_cast<DrawViewShell*>(pMainShell.get())); + return (pDrawViewShell) + ? pDrawViewShell->HasSelection(bText) + : SfxViewShell::HasSelection(bText); +} void ViewShellBase::InnerResizePixel (const Point& rOrigin, const Size &rSize) { @@ -1299,11 +1303,9 @@ void ViewShellBase::Implementation::ResizePixel ( rOrigin.X()+aBaseBorder.Left(), rOrigin.Y()+aBaseBorder.Top()); - // -1 (below) is there to let one line of _pFrame->GetWindow() visible, - // so that it plays better with the overall look Size aViewWindowSize ( rSize.Width() - aBaseBorder.Left() - aBaseBorder.Right(), - rSize.Height() - aBaseBorder.Top() - aBaseBorder.Bottom() - 1); + rSize.Height() - aBaseBorder.Top() - aBaseBorder.Bottom()); mpViewWindow->SetPosSizePixel(aViewWindowPosition, aViewWindowSize); maClientArea = Rectangle(Point(0,0), aViewWindowSize); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 53e3a760036c..1ac1f0dbace8 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -1,31 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. +/* + * This file is part of the LibreOffice project. * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). + * This file incorporates work covered by the following license notice: * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include "DrawViewShell.hxx" #include "ViewShellImplementation.hxx" @@ -679,7 +669,9 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) else { if( mpDrawView->IsVectorizeAllowed() ) + { SetCurrentFunction( FuVectorize::Create( this, GetActiveWindow(), mpDrawView, GetDoc(), rReq ) ); + } else { WaitObject aWait( (Window*)GetActiveWindow() ); @@ -752,7 +744,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { // switch on undo for the next operations mpDrawView->BegUndo( String( SdResId( STR_UNDO_CONVERT_TO_METAFILE ))); - GDIMetaFile aMetaFile(mpDrawView->GetAllMarkedMetaFile ()); + GDIMetaFile aMetaFile(mpDrawView->GetMarkedObjMetaFile()); aGraphic = Graphic(aMetaFile); } break; @@ -760,8 +752,30 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { // switch on undo for the next operations mpDrawView->BegUndo( String( SdResId( STR_UNDO_CONVERT_TO_BITMAP ))); - Bitmap aBitmap (mpDrawView->GetAllMarkedBitmap ()); - aGraphic = Graphic(aBitmap); + bool bDone(false); + + // I have to get the image here directly since GetMarkedObjBitmapEx works + // based on Bitmaps, but not on BitmapEx, thus throwing away the alpha + // channel. Argh! GetMarkedObjBitmapEx itself is too widely used to safely + // change that, e.g. in the exchange formats. For now I can only add this + // exception to get good results for Svgs. This is how the code gets more + // and more crowded, at last I made a remark for myself to change this + // as one of the next tasks. + if(1 == mpDrawView->GetMarkedObjectCount()) + { + const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(mpDrawView->GetMarkedObjectByIndex(0)); + + if(pSdrGrafObj && pSdrGrafObj->isEmbeddedSvg()) + { + aGraphic = Graphic(pSdrGrafObj->GetGraphic().getSvgData()->getReplacement()); + bDone = true; + } + } + + if(!bDone) + { + aGraphic = Graphic(mpDrawView->GetMarkedObjBitmapEx()); + } } break; } diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index 4977c79d991c..9871c3d5d537 100644 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -1,31 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite +/* + * This file is part of the LibreOffice project. * - * This file is part of OpenOffice.org. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include "DrawViewShell.hxx" #include <vcl/metaact.hxx> @@ -426,7 +416,7 @@ void DrawViewShell::GetBmpMaskState( SfxItemSet& rSet ) // valid graphic object? if( pObj && pObj->ISA( SdrGrafObj ) && - !( ((SdrGrafObj*) pObj)->IsEPS() || ((SdrGrafObj*) pObj)->IsRenderGraphic() ) && + !((SdrGrafObj*) pObj)->IsEPS() && !mpDrawView->IsTextEdit() ) { bEnable = sal_True; diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index 36c0aae71ec1..530b1c5acfe9 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1,30 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. +/* + * This file is part of the LibreOffice project. * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. + * This file incorporates work covered by the following license notice: * - ************************************************************************/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/Locale.hpp> @@ -1402,16 +1393,23 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) bFoundNoGraphicObj = sal_True; break; case OBJ_OLE2 : - bFoundObjNoLine = sal_True; - bFoundObjNoArea = sal_True; - bFoundNoGraphicObj = sal_True; + // #i118485# #i118525# Allow Line, Area and Graphic (Metafile, Bitmap) + bSingleGraphicSelected = nMarkCount == 1; + bFoundBitmap = true; + bFoundMetafile = true; break; case OBJ_GRAF : + { bSingleGraphicSelected = nMarkCount == 1; - switch ( ((SdrGrafObj*)pObj)->GetGraphicType() ) + const SdrGrafObj* pSdrGrafObj = static_cast< const SdrGrafObj* >(pObj); + switch(pSdrGrafObj->GetGraphicType()) { case GRAPHIC_BITMAP : bFoundBitmap = sal_True; + if(pSdrGrafObj->isEmbeddedSvg()) + { + bFoundMetafile = true; + } break; case GRAPHIC_GDIMETAFILE : bFoundMetafile = sal_True; @@ -1420,6 +1418,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) break; } break; + } case OBJ_TABLE: bFoundTable = true; break; diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx index 76f70008823b..cfecc20f072b 100644 --- a/sd/source/ui/view/drviewsc.cxx +++ b/sd/source/ui/view/drviewsc.cxx @@ -1,31 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. +/* + * This file is part of the LibreOffice project. * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). + * This file incorporates work covered by the following license notice: * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include "DrawViewShell.hxx" #include "ViewShellImplementation.hxx" @@ -345,7 +335,6 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq) } else if ( mpDrawView->IsImportMtfPossible() ) { - WaitObject aWait( (Window*)GetActiveWindow() ); const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList(); sal_uLong nAnz=rMarkList.GetMarkCount(); @@ -358,10 +347,23 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq) SdrObject* pObj=pM->GetMarkedSdrObj(); SdrGrafObj* pGraf=PTR_CAST(SdrGrafObj,pObj); SdrOle2Obj* pOle2=PTR_CAST(SdrOle2Obj,pObj); - if (pGraf!=NULL && pGraf->HasGDIMetaFile()) - nCount += pGraf->GetGraphic().GetGDIMetaFile().GetActionSize(); - if(pOle2!=NULL && pOle2->GetGraphic()) - nCount += pOle2->GetGraphic()->GetGDIMetaFile().GetActionSize(); + + if(pGraf) + { + if(pGraf->HasGDIMetaFile()) + { + nCount += pGraf->GetGraphic().GetGDIMetaFile().GetActionSize(); + } + else if(pGraf->isEmbeddedSvg()) + { + nCount += pGraf->getMetafileFromEmbeddedSvg().GetActionSize(); + } + } + + if(pOle2 && pOle2->GetGraphic()) + { + nCount += pOle2->GetGraphic()->GetGDIMetaFile().GetActionSize(); + } } // anhand der erm. Summe entscheiden ob mit diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx index 0706bcdd4e58..4adee9e9a632 100644 --- a/sd/source/ui/view/drviewsj.cxx +++ b/sd/source/ui/view/drviewsj.cxx @@ -1,31 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite +/* + * This file is part of the LibreOffice project. * - * This file is part of OpenOffice.org. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include "DrawViewShell.hxx" #include <com/sun/star/embed/EmbedMisc.hpp> @@ -123,22 +113,22 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_TEXTATTR_DLG ) ) { const SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); + const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj); + const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(pObj); sal_uInt32 nInv = pObj->GetObjInventor(); sal_uInt16 nId = pObj->GetObjIdentifier(); SdrObjTransformInfoRec aInfoRec; pObj->TakeObjInfo( aInfoRec ); - // don't show original size entry if not possible - if ( pObj->ISA( SdrOle2Obj ) ) + if(pSdrOle2Obj) { - SdrOle2Obj* pOleObj = PTR_CAST(SdrOle2Obj, pObj); - if (pOleObj->GetObjRef().is() && - ((pOleObj->GetObjRef()->getStatus( pOleObj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) ) ) + if (pSdrOle2Obj->GetObjRef().is() && + ((pSdrOle2Obj->GetObjRef()->getStatus( pSdrOle2Obj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_RECOMPOSEONRESIZE) ) ) rSet.DisableItem(SID_ORIGINAL_SIZE); } - if ( !( pObj->ISA( SdrGrafObj ) ) ) + if(!pSdrGrafObj) { rSet.DisableItem(SID_SAVE_GRAPHIC); rSet.DisableItem(SID_COMPRESS_GRAPHIC); @@ -158,9 +148,10 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) { rSet.DisableItem(SID_UNGROUP); } - if (!pObj->ISA(SdrGrafObj) || - ((SdrGrafObj*) pObj)->GetGraphicType() != GRAPHIC_BITMAP || - ((SdrGrafObj*) pObj)->IsLinkedGraphic()) + if(!pSdrGrafObj || + pSdrGrafObj->GetGraphicType() != GRAPHIC_BITMAP || + pSdrGrafObj->IsLinkedGraphic() || + pSdrGrafObj->isEmbeddedSvg()) { rSet.DisableItem(SID_CONVERT_TO_1BIT_THRESHOLD); rSet.DisableItem(SID_CONVERT_TO_1BIT_MATRIX); diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index d7dcc2556430..e43d1756a7be 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -1,30 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. +/* + * This file is part of the LibreOffice project. * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. + * This file incorporates work covered by the following license notice: * - ************************************************************************/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include <com/sun/star/embed/NoVisualAreaSizeException.hpp> #include <com/sun/star/linguistic2/XSpellChecker1.hpp> @@ -1045,10 +1036,15 @@ sal_Bool View::IsVectorizeAllowed() const if( rMarkList.GetMarkCount() == 1 ) { - const SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); + const SdrGrafObj* pObj = dynamic_cast< const SdrGrafObj* >(rMarkList.GetMark( 0 )->GetMarkedSdrObj()); - if( pObj->ISA( SdrGrafObj ) && ( (SdrGrafObj*) pObj )->GetGraphicType() == GRAPHIC_BITMAP ) - bRet = sal_True; + if(pObj) + { + if(GRAPHIC_BITMAP == pObj->GetGraphicType() && !pObj->isEmbeddedSvg()) + { + bRet = sal_True; + } + } } return bRet; diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index aa119e048fdd..20a1474ff618 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -1,30 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* +/* + * This file is part of the LibreOffice project. * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * Copyright 2000, 2010 Oracle and/or its affiliates. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include "View.hxx" diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 80c408d8ae6a..c19789e6e3cc 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -1,31 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite +/* + * This file is part of the LibreOffice project. * - * This file is part of OpenOffice.org. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. + * This file incorporates work covered by the following license notice: * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include "View.hxx" #include <com/sun/star/embed/XEmbedObjectClipboardCreator.hpp> @@ -196,7 +186,6 @@ bool View::InsertMetaFile( TransferableDataHelper& rDataHelper, const Point& rPo case META_GRADIENTEX_ACTION: case META_BMPSCALEPART_ACTION: case META_BMPEXSCALEPART_ACTION: - case META_RENDERGRAPHIC_ACTION: bVector = true; break; case META_BMP_ACTION: diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx index 43e0d5018aa7..60761280e10a 100644 --- a/sd/source/ui/view/sdview4.cxx +++ b/sd/source/ui/view/sdview4.cxx @@ -1,31 +1,21 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. +/* + * This file is part of the LibreOffice project. * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). + * This file incorporates work covered by the following license notice: * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ #include "View.hxx" #include <unotools/localfilehelper.hxx> @@ -408,7 +398,12 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl) if( !rGraphicFilter.ImportGraphic( aGraphic, aURL ) ) { sal_Int8 nTempAction = ( aIter == maDropFileVector.begin() ) ? mnAction : 0; - InsertGraphic( aGraphic, nTempAction, maDropPos, NULL, NULL ); + const bool bLink = ( ( nTempAction & DND_ACTION_LINK ) != 0 ); + SdrGrafObj* pGrafObj = InsertGraphic( aGraphic, nTempAction, maDropPos, NULL, NULL ); + if(pGrafObj && bLink) + { + pGrafObj->SetGraphicLink( aCurrentDropFile, String() ); + } // return action from first inserted graphic if( aIter == maDropFileVector.begin() ) diff --git a/sd/uiconfig/sdraw/menubar/menubar.xml b/sd/uiconfig/sdraw/menubar/menubar.xml index ec84a4487bf9..cd9b0938db54 100644 --- a/sd/uiconfig/sdraw/menubar/menubar.xml +++ b/sd/uiconfig/sdraw/menubar/menubar.xml @@ -13,6 +13,9 @@ <menu:menuitem menu:id=".uno:SaveAs"/> <menu:menuitem menu:id=".uno:SaveAsTemplate"/> <menu:menuitem menu:id=".uno:SaveAll"/> + <menu:menuitem menu:id=".uno:CheckOut"/> + <menu:menuitem menu:id=".uno:CancelCheckOut"/> + <menu:menuitem menu:id=".uno:CheckIn"/> <menu:menuseparator/> <menu:menuitem menu:id=".uno:Reload"/> <menu:menuitem menu:id=".uno:VersionDialog"/> diff --git a/sd/uiconfig/sdraw/toolbar/drawingobjectbar.xml b/sd/uiconfig/sdraw/toolbar/drawingobjectbar.xml index 4c322a9028b6..fb3a2f94e753 100644 --- a/sd/uiconfig/sdraw/toolbar/drawingobjectbar.xml +++ b/sd/uiconfig/sdraw/toolbar/drawingobjectbar.xml @@ -18,4 +18,10 @@ <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:FillShadow" toolbar:helpid="10299"/> <toolbar:toolbaritem xlink:href=".uno:ImageMapDialog" toolbar:visible="false" toolbar:helpid="10371"/> -</toolbar:toolbar>
\ No newline at end of file + <toolbar:toolbarseparator/> + <toolbar:toolbaritem xlink:href=".uno:AdvancedMode" toolbar:helpid="helpid:27095" toolbar:style="radio dropdown" /> + <toolbar:toolbaritem xlink:href=".uno:Mirror" toolbar:helpid="helpid:27085" toolbar:visible="false" /> + <toolbar:toolbaritem xlink:href=".uno:TransformDialog" toolbar:helpid="helpid:10087" toolbar:visible="false" /> + <toolbar:toolbaritem xlink:href=".uno:ObjectAlign" toolbar:helpid="helpid:10130" toolbar:style="dropdown" /> + <toolbar:toolbaritem xlink:href=".uno:ObjectPosition" toolbar:helpid="helpid:27022" toolbar:style="dropdown" /> +</toolbar:toolbar> diff --git a/sd/uiconfig/sdraw/toolbar/graphicobjectbar.xml b/sd/uiconfig/sdraw/toolbar/graphicobjectbar.xml index 43956d085f3c..ac6b05b509ce 100644 --- a/sd/uiconfig/sdraw/toolbar/graphicobjectbar.xml +++ b/sd/uiconfig/sdraw/toolbar/graphicobjectbar.xml @@ -14,4 +14,10 @@ <toolbar:toolbaritem xlink:href=".uno:FillShadow" toolbar:helpid="helpid:10299" /> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:Crop" toolbar:helpid="helpid:10883" /> + <toolbar:toolbarseparator/> + <toolbar:toolbaritem xlink:href=".uno:AdvancedMode" toolbar:helpid="helpid:27095" toolbar:style="radio dropdown" /> + <toolbar:toolbaritem xlink:href=".uno:Mirror" toolbar:helpid="helpid:27085" toolbar:visible="false" /> + <toolbar:toolbaritem xlink:href=".uno:TransformDialog" toolbar:helpid="helpid:10087" toolbar:visible="false" /> + <toolbar:toolbaritem xlink:href=".uno:ObjectAlign" toolbar:helpid="helpid:10130" toolbar:style="dropdown" /> + <toolbar:toolbaritem xlink:href=".uno:ObjectPosition" toolbar:helpid="helpid:27022" toolbar:style="dropdown" /> </toolbar:toolbar> diff --git a/sd/uiconfig/sdraw/toolbar/textobjectbar.xml b/sd/uiconfig/sdraw/toolbar/textobjectbar.xml index d364ca42e771..e18ac8cf7a0d 100644 --- a/sd/uiconfig/sdraw/toolbar/textobjectbar.xml +++ b/sd/uiconfig/sdraw/toolbar/textobjectbar.xml @@ -37,4 +37,4 @@ <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:Color" toolbar:helpid="10017"/> <toolbar:toolbaritem xlink:href=".uno:InsertSymbol" toolbar:visible="false" toolbar:helpid="27019"/> -</toolbar:toolbar>
\ No newline at end of file +</toolbar:toolbar> diff --git a/sd/uiconfig/sdraw/toolbar/toolbar.xml b/sd/uiconfig/sdraw/toolbar/toolbar.xml index 9bd802585f6f..f460058ff449 100644 --- a/sd/uiconfig/sdraw/toolbar/toolbar.xml +++ b/sd/uiconfig/sdraw/toolbar/toolbar.xml @@ -32,14 +32,8 @@ <toolbar:toolbaritem xlink:href=".uno:InsertGraphic" toolbar:helpid="helpid:10241" /> <toolbar:toolbaritem xlink:href=".uno:Gallery" toolbar:helpid="helpid:5960" /> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:AdvancedMode" toolbar:helpid="helpid:27095" toolbar:style="radio dropdown" /> - <toolbar:toolbaritem xlink:href=".uno:Mirror" toolbar:helpid="helpid:27085" toolbar:visible="false" /> - <toolbar:toolbaritem xlink:href=".uno:TransformDialog" toolbar:helpid="helpid:10087" toolbar:visible="false" /> - <toolbar:toolbaritem xlink:href=".uno:ObjectAlign" toolbar:helpid="helpid:10130" toolbar:style="dropdown" /> - <toolbar:toolbaritem xlink:href=".uno:ObjectPosition" toolbar:helpid="helpid:27022" toolbar:style="dropdown" /> - <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:InsertToolbox" toolbar:helpid="helpid:27318" toolbar:style="radio dropdown" toolbar:visible="false" /> <toolbar:toolbaritem xlink:href=".uno:Config" toolbar:helpid="helpid:10593" toolbar:style="dropdown" toolbar:visible="false" /> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExtrusionToggle" toolbar:helpid="10960"/> -</toolbar:toolbar>
\ No newline at end of file +</toolbar:toolbar> diff --git a/sd/uiconfig/sdraw/ui/printeroptions.ui b/sd/uiconfig/sdraw/ui/printeroptions.ui index 3718af3407ec..b318e5a04d0f 100644 --- a/sd/uiconfig/sdraw/ui/printeroptions.ui +++ b/sd/uiconfig/sdraw/ui/printeroptions.ui @@ -66,7 +66,9 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Contents</property> - <property name="use_markup">True</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> </child> </object> @@ -158,7 +160,9 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Color</property> - <property name="use_markup">True</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> </child> </object> @@ -269,7 +273,9 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Size</property> - <property name="use_markup">True</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> </child> </object> diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml index 13c69399b06d..de67010ce9ff 100644 --- a/sd/uiconfig/simpress/menubar/menubar.xml +++ b/sd/uiconfig/simpress/menubar/menubar.xml @@ -13,6 +13,9 @@ <menu:menuitem menu:id=".uno:SaveAs"/> <menu:menuitem menu:id=".uno:SaveAsTemplate"/> <menu:menuitem menu:id=".uno:SaveAll"/> + <menu:menuitem menu:id=".uno:CheckOut"/> + <menu:menuitem menu:id=".uno:CancelCheckOut"/> + <menu:menuitem menu:id=".uno:CheckIn"/> <menu:menuseparator/> <menu:menuitem menu:id=".uno:Reload"/> <menu:menuitem menu:id=".uno:VersionDialog"/> diff --git a/sd/uiconfig/simpress/toolbar/drawingobjectbar.xml b/sd/uiconfig/simpress/toolbar/drawingobjectbar.xml index 4c322a9028b6..512b135176c4 100644 --- a/sd/uiconfig/simpress/toolbar/drawingobjectbar.xml +++ b/sd/uiconfig/simpress/toolbar/drawingobjectbar.xml @@ -18,4 +18,14 @@ <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:FillShadow" toolbar:helpid="10299"/> <toolbar:toolbaritem xlink:href=".uno:ImageMapDialog" toolbar:visible="false" toolbar:helpid="10371"/> -</toolbar:toolbar>
\ No newline at end of file + <toolbar:toolbarseparator/> + <toolbar:toolbaritem xlink:href=".uno:ToggleObjectRotateMode" toolbar:helpid="helpid:10129" toolbar:style="radio" /> + <toolbar:toolbaritem xlink:href=".uno:TransformDialog" toolbar:helpid="helpid:10087" toolbar:visible="false" /> + <toolbar:toolbaritem xlink:href=".uno:Mirror" toolbar:helpid="helpid:27085" toolbar:visible="false" /> + <toolbar:toolbaritem xlink:href=".uno:ObjectAlign" toolbar:helpid="helpid:10130" toolbar:style="dropdown" /> + <toolbar:toolbaritem xlink:href=".uno:ObjectPosition" toolbar:helpid="helpid:27022" toolbar:style="dropdown" /> + <toolbar:toolbarseparator/> + <toolbar:toolbaritem xlink:href=".uno:CustomAnimation" toolbar:helpid="helpid:27328" toolbar:style="auto" toolbar:visible="false" /> + <toolbar:toolbaritem xlink:href=".uno:AnimationEffects" toolbar:helpid="helpid:27063" /> + <toolbar:toolbaritem xlink:href=".uno:Window3D" toolbar:helpid="helpid:10644" toolbar:style="auto" toolbar:visible="false" /> +</toolbar:toolbar> diff --git a/sd/uiconfig/simpress/toolbar/graphicobjectbar.xml b/sd/uiconfig/simpress/toolbar/graphicobjectbar.xml index 93312f0d9c29..23f6a440ff6c 100644 --- a/sd/uiconfig/simpress/toolbar/graphicobjectbar.xml +++ b/sd/uiconfig/simpress/toolbar/graphicobjectbar.xml @@ -14,4 +14,13 @@ <toolbar:toolbaritem xlink:href=".uno:FillShadow" toolbar:helpid="helpid:10299" /> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:Crop" toolbar:helpid="helpid:10883" /> + <toolbar:toolbarseparator/> + <toolbar:toolbaritem xlink:href=".uno:ToggleObjectRotateMode" toolbar:helpid="helpid:10129" toolbar:style="radio" /> + <toolbar:toolbaritem xlink:href=".uno:TransformDialog" toolbar:helpid="helpid:10087" toolbar:visible="false" /> + <toolbar:toolbaritem xlink:href=".uno:Mirror" toolbar:helpid="helpid:27085" toolbar:visible="false" /> + <toolbar:toolbaritem xlink:href=".uno:ObjectAlign" toolbar:helpid="helpid:10130" toolbar:style="dropdown" /> + <toolbar:toolbaritem xlink:href=".uno:ObjectPosition" toolbar:helpid="helpid:27022" toolbar:style="dropdown" /> + <toolbar:toolbarseparator/> + <toolbar:toolbaritem xlink:href=".uno:CustomAnimation" toolbar:helpid="helpid:27328" toolbar:style="auto" toolbar:visible="false" /> + <toolbar:toolbaritem xlink:href=".uno:AnimationEffects" toolbar:helpid="helpid:27063" /> </toolbar:toolbar> diff --git a/sd/uiconfig/simpress/toolbar/textobjectbar.xml b/sd/uiconfig/simpress/toolbar/textobjectbar.xml index f91767c983ed..ca988b2d65b9 100644 --- a/sd/uiconfig/simpress/toolbar/textobjectbar.xml +++ b/sd/uiconfig/simpress/toolbar/textobjectbar.xml @@ -42,4 +42,4 @@ <toolbar:toolbaritem xlink:href=".uno:InsertSymbol" toolbar:visible="false" toolbar:helpid="27019"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:Color" toolbar:helpid="10017"/> -</toolbar:toolbar>
\ No newline at end of file +</toolbar:toolbar> diff --git a/sd/uiconfig/simpress/toolbar/toolbar.xml b/sd/uiconfig/simpress/toolbar/toolbar.xml index 25bffb7e72bb..eb053f347634 100644 --- a/sd/uiconfig/simpress/toolbar/toolbar.xml +++ b/sd/uiconfig/simpress/toolbar/toolbar.xml @@ -32,18 +32,9 @@ <toolbar:toolbaritem xlink:href=".uno:InsertGraphic" toolbar:helpid="helpid:10241" /> <toolbar:toolbaritem xlink:href=".uno:Gallery" toolbar:helpid="helpid:5960" /> <toolbar:toolbarseparator/> - <toolbar:toolbaritem xlink:href=".uno:ToggleObjectRotateMode" toolbar:helpid="helpid:10129" toolbar:style="radio" /> - <toolbar:toolbaritem xlink:href=".uno:TransformDialog" toolbar:helpid="helpid:10087" toolbar:visible="false" /> - <toolbar:toolbaritem xlink:href=".uno:Mirror" toolbar:helpid="helpid:27085" toolbar:visible="false" /> - <toolbar:toolbaritem xlink:href=".uno:ObjectAlign" toolbar:helpid="helpid:10130" toolbar:style="dropdown" /> - <toolbar:toolbaritem xlink:href=".uno:ObjectPosition" toolbar:helpid="helpid:27022" toolbar:style="dropdown" /> - <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:InsertToolbox" toolbar:helpid="helpid:27318" toolbar:style="radio dropdown" toolbar:visible="false" /> <toolbar:toolbaritem xlink:href=".uno:Config" toolbar:helpid="helpid:10593" toolbar:style="dropdown" toolbar:visible="false" /> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:ExtrusionToggle" toolbar:helpid="10960"/> - <toolbar:toolbaritem xlink:href=".uno:CustomAnimation" toolbar:helpid="helpid:27328" toolbar:style="auto" toolbar:visible="false" /> - <toolbar:toolbaritem xlink:href=".uno:AnimationEffects" toolbar:helpid="helpid:27063" /> <toolbar:toolbaritem xlink:href=".uno:AnimationObjects" toolbar:helpid="helpid:27062" toolbar:style="auto" toolbar:visible="false" /> - <toolbar:toolbaritem xlink:href=".uno:Window3D" toolbar:helpid="helpid:10644" toolbar:style="auto" toolbar:visible="false" /> -</toolbar:toolbar>
\ No newline at end of file +</toolbar:toolbar> diff --git a/sd/uiconfig/simpress/ui/printeroptions.ui b/sd/uiconfig/simpress/ui/printeroptions.ui index 99117c5a3e22..838b5c003e06 100644 --- a/sd/uiconfig/simpress/ui/printeroptions.ui +++ b/sd/uiconfig/simpress/ui/printeroptions.ui @@ -83,7 +83,9 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Contents</property> - <property name="use_markup">True</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> </child> </object> @@ -175,7 +177,9 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Color</property> - <property name="use_markup">True</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> </child> </object> @@ -286,7 +290,9 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="label" translatable="yes">Size</property> - <property name="use_markup">True</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> </child> </object> diff --git a/sd/workben/custompanel/ctp_panel.cxx b/sd/workben/custompanel/ctp_panel.cxx index 85a976313ed9..bfe6b18b5db0 100644 --- a/sd/workben/custompanel/ctp_panel.cxx +++ b/sd/workben/custompanel/ctp_panel.cxx @@ -23,7 +23,7 @@ #include <com/sun/star/drawing/framework/XPane.hpp> #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/awt/XWindowPeer.hpp> -#include <com/sun/star/awt/XToolkit.hpp> +#include <com/sun/star/awt/Toolkit.hpp> #include <com/sun/star/awt/WindowClass.hpp> #include <com/sun/star/awt/WindowAttribute.hpp> #include <com/sun/star/awt/PosSize.hpp> @@ -83,10 +83,7 @@ namespace sd { namespace colortoolpanel { ENSURE_OR_THROW( i_rContext.is(), "illegal component context" ); Reference< XMultiComponentFactory > xFactory( i_rContext->getServiceManager(), UNO_SET_THROW ); - Reference< XToolkit > xToolkit( xFactory->createInstanceWithContext( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.Toolkit" ) ), - i_rContext - ), UNO_QUERY_THROW ); + Reference< XToolkit2 > xToolkit = Toolkit::create(i_rContext); WindowDescriptor aWindow; aWindow.Type = WindowClass_SIMPLE; |