summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2007-06-26 12:41:44 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2007-06-26 12:41:44 +0000
commit7116ad4204b91a0e3fd2a3d73ca508bc2933cea3 (patch)
tree4734a2e47005a76f14def8b9dfa7c9f1ba9efda9
parentf48ad3a4bc600d3033232b4a332339a8325f8048 (diff)
INTEGRATION: CWS impressalternativtext (1.13.70); FILE MERGED
2007/05/24 13:17:20 cl 1.13.70.1: #i68100# adding Title and Description to layers
-rw-r--r--sd/source/ui/unoidl/unolayer.cxx35
1 files changed, 33 insertions, 2 deletions
diff --git a/sd/source/ui/unoidl/unolayer.cxx b/sd/source/ui/unoidl/unolayer.cxx
index 15b71526cced..53c87e7eb177 100644
--- a/sd/source/ui/unoidl/unolayer.cxx
+++ b/sd/source/ui/unoidl/unolayer.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: unolayer.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: vg $ $Date: 2007-01-09 11:34:39 $
+ * last change: $Author: hr $ $Date: 2007-06-26 13:41:44 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -117,6 +117,8 @@ using namespace ::com::sun::star;
#define WID_LAYER_PRINTABLE 2
#define WID_LAYER_VISIBLE 3
#define WID_LAYER_NAME 4
+#define WID_LAYER_TITLE 5
+#define WID_LAYER_DESC 6
const SfxItemPropertyMap* ImplGetSdLayerPropertyMap()
{
@@ -126,6 +128,8 @@ const SfxItemPropertyMap* ImplGetSdLayerPropertyMap()
{ MAP_CHAR_LEN(UNO_NAME_LAYER_PRINTABLE), WID_LAYER_PRINTABLE,&::getBooleanCppuType(), 0, 0 },
{ MAP_CHAR_LEN(UNO_NAME_LAYER_VISIBLE), WID_LAYER_VISIBLE, &::getBooleanCppuType(), 0, 0 },
{ MAP_CHAR_LEN(UNO_NAME_LAYER_NAME), WID_LAYER_NAME, &::getCppuType((const OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN("Title"), WID_LAYER_TITLE, &::getCppuType((const OUString*)0), 0, 0 },
+ { MAP_CHAR_LEN("Description"), WID_LAYER_DESC, &::getCppuType((const OUString*)0), 0, 0 },
{ 0,0,0,0,0,0}
};
@@ -281,6 +285,27 @@ void SAL_CALL SdLayer::setPropertyValue( const OUString& aPropertyName, const un
pLayerManager->UpdateLayerView();
break;
}
+
+ case WID_LAYER_TITLE:
+ {
+ OUString sTitle;
+ if(!(aValue >>= sTitle))
+ throw lang::IllegalArgumentException();
+
+ pLayer->SetTitle(sTitle);
+ break;
+ }
+
+ case WID_LAYER_DESC:
+ {
+ OUString sDescription;
+ if(!(aValue >>= sDescription))
+ throw lang::IllegalArgumentException();
+
+ pLayer->SetDescription(sDescription);
+ break;
+ }
+
default:
throw beans::UnknownPropertyException();
}
@@ -320,6 +345,12 @@ uno::Any SAL_CALL SdLayer::getPropertyValue( const OUString& PropertyName )
aValue <<= aRet;
break;
}
+ case WID_LAYER_TITLE:
+ aValue <<= OUString( pLayer->GetTitle() );
+ break;
+ case WID_LAYER_DESC:
+ aValue <<= OUString( pLayer->GetDescription() );
+ break;
default:
throw beans::UnknownPropertyException();
}