[Libreoffice-commits] core.git: postprocess/qa sc/source sd/source sw/source
Stephan Bergmann
sbergman at redhat.com
Mon Jul 13 04:48:22 PDT 2015
postprocess/qa/services.cxx | 11 +++++++++++
sc/source/ui/unoobj/docuno.cxx | 5 ++++-
sd/source/ui/unoidl/unomodel.cxx | 9 ++++++---
sw/source/uibase/uno/unotxdoc.cxx | 13 ++++++++-----
4 files changed, 29 insertions(+), 9 deletions(-)
New commits:
commit 61a3be76c221c822b189d20e9269ec5caf1aadcc
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jul 13 13:44:06 2015 +0200
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
diff --git a/postprocess/qa/services.cxx b/postprocess/qa/services.cxx
index ec26474..35e5b10 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 27b72ee..a1bf527 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 04c61c1..b67c321 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 9a31a3b..d453ad8 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -1766,11 +1766,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 )
More information about the Libreoffice-commits
mailing list