diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-07-13 13:44:06 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-07-13 15:22:57 +0000 |
commit | 24d0bf5bc012abf6c1cb480c173055d61352d5b0 (patch) | |
tree | 007e6aaf5ac4e3f6f3dd854cdd0b62741e80d1aa | |
parent | 818d9bb2d1c7db06402a8a1cb5ab378b81ddeecb (diff) |
tdf#92668: Revert some implementation names, for backwards compatibility
These implementation names of Calc, Draw, Impress, and Writer documents are the
most likely to be checked by existing third-party code, so revert the
corresponding parts of 3099c70b11c7e5b80fe4dbe3dc99171fb38c6fc2 "Fix various
XServiceInfo implementations" (and instead add fixups in CppunitTest_serives).
Change-Id: I1a760adbf4c89a1b4477d6e628abba8d2028ccfe
(cherry picked from commit 61a3be76c221c822b189d20e9269ec5caf1aadcc)
Reviewed-on: https://gerrit.libreoffice.org/17011
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | postprocess/qa/services.cxx | 11 | ||||
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 5 | ||||
-rw-r--r-- | sd/source/ui/unoidl/unomodel.cxx | 9 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 13 |
4 files changed, 29 insertions, 9 deletions
diff --git a/postprocess/qa/services.cxx b/postprocess/qa/services.cxx index ec264744efa2..35e5b106d15c 100644 --- a/postprocess/qa/services.cxx +++ b/postprocess/qa/services.cxx @@ -365,6 +365,17 @@ void Test::createInstance( expImpl = "com.sun.star.svtools.OfficeFolderPicker"; expServs = {"com.sun.star.ui.dialogs.OfficeFolderPicker"}; #endif + } else if (expImpl == "com.sun.star.comp.Calc.SpreadsheetDocument") { + expImpl = "ScModelObj"; + } else if (expImpl == "com.sun.star.comp.Draw.DrawingDocument" + || expImpl == "com.sun.star.comp.Draw.PresentationDocument") + { + expImpl = "SdXImpressDocument"; + } else if (expImpl == "com.sun.star.comp.Writer.GlobalDocument" + || expImpl == "com.sun.star.comp.Writer.TextDocument" + || expImpl == "com.sun.star.comp.Writer.WebDocument") + { + expImpl = "SwXTextDocument"; } CPPUNIT_ASSERT_EQUAL_MESSAGE( (OString( diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 537517626e47..6d148dab9af0 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2435,7 +2435,10 @@ uno::Sequence<OUString> SAL_CALL ScModelObj::getAvailableServiceNames() // XServiceInfo OUString SAL_CALL ScModelObj::getImplementationName() throw(uno::RuntimeException, std::exception) { - return OUString( "com.sun.star.comp.Calc.SpreadsheetDocument" ); + return OUString( "ScModelObj" ); + /* // Matching the .component information: + return OUString( "com.sun.star.comp.Calc.SpreadsheetDocument" ); + */ } sal_Bool SAL_CALL ScModelObj::supportsService( const OUString& rServiceName ) diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index ff4bb93ff49e..7a9bf2af2671 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1184,9 +1184,12 @@ uno::Sequence< OUString > SAL_CALL SdXImpressDocument::getAvailableServiceNames( OUString SAL_CALL SdXImpressDocument::getImplementationName() throw(uno::RuntimeException, std::exception) { - return mbImpressDoc - ? OUString("com.sun.star.comp.Draw.PresentationDocument") - : OUString("com.sun.star.comp.Draw.DrawingDocument"); + return OUString( "SdXImpressDocument" ); + /* // Matching the .component information: + return mbImpressDoc + ? OUString("com.sun.star.comp.Draw.PresentationDocument") + : OUString("com.sun.star.comp.Draw.DrawingDocument"); + */ } sal_Bool SAL_CALL SdXImpressDocument::supportsService( const OUString& ServiceName ) diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index b7cdf1d300fe..c19976c05289 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -1768,11 +1768,14 @@ Sequence< OUString > SwXTextDocument::getAvailableServiceNames() OUString SwXTextDocument::getImplementationName() throw( RuntimeException, std::exception ) { - return PTR_CAST(SwGlobalDocShell, pDocShell) != nullptr - ? OUString("com.sun.star.comp.Writer.GlobalDocument") - : PTR_CAST(SwWebDocShell, pDocShell) != nullptr - ? OUString("com.sun.star.comp.Writer.WebDocument") - : OUString("com.sun.star.comp.Writer.TextDocument"); + return OUString("SwXTextDocument"); + /* // Matching the .component information: + return PTR_CAST(SwGlobalDocShell, pDocShell) != nullptr + ? OUString("com.sun.star.comp.Writer.GlobalDocument") + : PTR_CAST(SwWebDocShell, pDocShell) != nullptr + ? OUString("com.sun.star.comp.Writer.WebDocument") + : OUString("com.sun.star.comp.Writer.TextDocument"); + */ } sal_Bool SwXTextDocument::supportsService(const OUString& rServiceName) throw( RuntimeException, std::exception ) |