summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2008-03-12 10:52:10 +0000
committerRüdiger Timm <rt@openoffice.org>2008-03-12 10:52:10 +0000
commit25f3a26ecd90af9cd7428b31145c3088e0477216 (patch)
treec6dd074a611d21b73f9d34f9561206daf6f21df8 /sd/source/ui/unoidl
parent9545d2d4b3c595bd1f6177b7117722ff418b14ef (diff)
INTEGRATION: CWS impresstables2 (1.100.18); FILE MERGED
2008/03/11 18:45:21 cl 1.100.18.10: RESYNC: (1.106-1.107); FILE MERGED 2008/02/21 14:39:59 cl 1.100.18.9: #i68103# fixed a wrong lenght 2008/02/20 17:46:13 cl 1.100.18.8: RESYNC: (1.105-1.106); FILE MERGED 2008/02/13 20:18:55 cl 1.100.18.7: #i68103# import table shapes only in impress and draw 2007/12/01 19:19:54 cl 1.100.18.6: RESYNC: (1.102-1.105); FILE MERGED 2007/08/07 12:37:33 cl 1.100.18.5: fixed merge conflicts 2007/08/01 15:20:41 cl 1.100.18.4: RESYNC: (1.101-1.102); FILE MERGED 2007/07/26 18:12:25 cl 1.100.18.3: #i68103# moved implementation of api sheets to core 2007/06/27 15:16:39 cl 1.100.18.2: RESYNC: (1.100-1.101); FILE MERGED 2007/04/18 15:17:01 cl 1.100.18.1: #i72702# updated api for table shapes
Diffstat (limited to 'sd/source/ui/unoidl')
-rw-r--r--sd/source/ui/unoidl/unomodel.cxx44
1 files changed, 17 insertions, 27 deletions
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index beee8d4d3434..073b9ad39b44 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: unomodel.cxx,v $
*
- * $Revision: 1.107 $
+ * $Revision: 1.108 $
*
- * last change: $Author: kz $ $Date: 2008-03-05 16:48:59 $
+ * last change: $Author: rt $ $Date: 2008-03-12 11:52:10 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -171,10 +171,8 @@
#include <unopres.hxx>
#include <unocpres.hxx>
#include <unoobj.hxx>
-#include <unostyls.hxx>
#include <stlpool.hxx>
#include <unopback.hxx>
-#include <unogstyl.hxx>
#include <unokywds.hxx>
#ifndef SD_FRAME_VIEW_HXX
#include "FrameView.hxx"
@@ -1020,12 +1018,6 @@ uno::Reference< uno::XInterface > SAL_CALL SdXImpressDocument::createInstance( c
static_cast<uno::XWeak*>(new SdUnoPageBackground( mpDoc )));
}
- if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.style.Style") ) )
- {
- uno::Reference<uno::XInterface> xStyle(
- static_cast<uno::XWeak*>(new SdUnoGraphicStyle()));
- return xStyle;
- }
if( 0 == aServiceSpecifier.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Defaults") ) )
{
if( !mxDrawingPool.is() )
@@ -1182,6 +1174,10 @@ uno::Reference< uno::XInterface > SAL_CALL SdXImpressDocument::createInstance( c
{
nType = OBJ_TEXT;
}
+ else if( aType.EqualsAscii( "TableShape", 26, 10 ) )
+ {
+ nType = OBJ_TABLE;
+ }
else
{
throw lang::ServiceNotRegisteredException();
@@ -1196,6 +1192,14 @@ uno::Reference< uno::XInterface > SAL_CALL SdXImpressDocument::createInstance( c
xRet = (uno::XWeak*)pShape;
}
+ else if( aServiceSpecifier.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.TableShape") ) )
+ {
+ SvxShape* pShape = CreateSvxShapeByTypeAndInventor( OBJ_TABLE, SdrInventor );
+ if( pShape && !mbClipBoard )
+ pShape->SetShapeType(aServiceSpecifier);
+
+ xRet = (uno::XWeak*)pShape;
+ }
else
{
xRet = SvxFmMSFactory::createInstance( aServiceSpecifier );
@@ -1223,7 +1227,7 @@ uno::Sequence< OUString > SAL_CALL SdXImpressDocument::getAvailableServiceNames(
const uno::Sequence< OUString > aSNS_ORG( SvxFmMSFactory::getAvailableServiceNames() );
- uno::Sequence< OUString > aSNS( mbImpressDoc ? (30 + 4) : (18 + 4) );
+ uno::Sequence< OUString > aSNS( mbImpressDoc ? (34) : (19) );
sal_uInt16 i(0);
@@ -1236,7 +1240,6 @@ uno::Sequence< OUString > SAL_CALL SdXImpressDocument::getAvailableServiceNames(
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.NumberingRules"));
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.Background"));
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.Settings"));
- aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.style.Style"));
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM(sUNO_Service_ImageMapRectangleObject));
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM(sUNO_Service_ImageMapCircleObject));
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM(sUNO_Service_ImageMapPolygonObject));
@@ -1247,6 +1250,7 @@ uno::Sequence< OUString > SAL_CALL SdXImpressDocument::getAvailableServiceNames(
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ImportGraphicObjectResolver"));
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ExportEmbeddedObjectResolver"));
aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.ImportEmbeddedObjectResolver"));
+ aSNS[i++] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.TableShape"));
if(mbImpressDoc)
{
@@ -1512,11 +1516,7 @@ uno::Reference< container::XNameAccess > SAL_CALL SdXImpressDocument::getStyleFa
if( NULL == mpDoc )
throw lang::DisposedException();
- uno::Reference< container::XNameAccess > xStyles(mxStyleFamilies);
-
- if( !xStyles.is() )
- mxStyleFamilies = xStyles = new SdUnoStyleFamilies( this );
-
+ uno::Reference< container::XNameAccess > xStyles( dynamic_cast< container::XNameAccess* >( mpDoc->GetStyleSheetPool()) );
return xStyles;
}
@@ -2243,16 +2243,6 @@ void SAL_CALL SdXImpressDocument::dispose() throw (::com::sun::star::uno::Runtim
SfxBaseModel::dispose();
mbDisposed = true;
- uno::Reference< container::XNameAccess > xStyles(mxStyleFamilies);
- if( xStyles.is() )
- {
- uno::Reference< lang::XComponent > xComp( xStyles, uno::UNO_QUERY );
- if( xComp.is() )
- xComp->dispose();
-
- xStyles = 0;
- }
-
uno::Reference< presentation::XPresentation > xPresentation( mxPresentation );
if( xPresentation.is() )
{