[Libreoffice-commits] core.git: chart2/source offapi/com

Noel Grandin noel at peralex.com
Wed May 22 05:59:54 PDT 2013


 chart2/source/model/main/Title.cxx     |    8 ++++----
 chart2/source/model/main/Title.hxx     |    8 ++++----
 offapi/com/sun/star/chart2/XTitle2.idl |    5 +++--
 3 files changed, 11 insertions(+), 10 deletions(-)

New commits:
commit 03c3cd90930d6fb7d0f498e4b21871b1746d9b2d
Author: Noel Grandin <noel at peralex.com>
Date:   Wed May 22 14:34:28 2013 +0200

    fix maybevoid attributes
    
    ..from commit d256dbede60533369d1aac64cca34721183f6a8a
    "Convert chart2::Title service to new style"
    
    Change-Id: Ib4b8a9126f1042c7d0b8cc07505444f25fe9c55a

diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx
index 5eb9686..70db368 100644
--- a/chart2/source/model/main/Title.cxx
+++ b/chart2/source/model/main/Title.cxx
@@ -386,18 +386,18 @@ double Title::getPropertyDouble(const OUString& aPropertyName) throw (css::uno::
    return b;
 }
 
-awt::Size Title::getReferencePageSize() throw(css::uno::RuntimeException)
+beans::Optional<awt::Size> Title::getReferencePageSize() throw(css::uno::RuntimeException)
 {
    uno::Any any = getPropertyValue("ReferencePageSize");
-   awt::Size b;
+   beans::Optional<awt::Size> b;
    any >>= b;
    return b;
 }
 
-chart2::RelativePosition Title::getRelativePosition() throw(css::uno::RuntimeException)
+beans::Optional<chart2::RelativePosition> Title::getRelativePosition() throw(css::uno::RuntimeException)
 {
    uno::Any any = getPropertyValue("RelativePosition");
-   chart2::RelativePosition b;
+   beans::Optional<chart2::RelativePosition> b;
    any >>= b;
    return b;
 }
diff --git a/chart2/source/model/main/Title.hxx b/chart2/source/model/main/Title.hxx
index 32c7c17..62a2e0cd 100644
--- a/chart2/source/model/main/Title.hxx
+++ b/chart2/source/model/main/Title.hxx
@@ -89,11 +89,11 @@ public:
         { return getPropertyBool("StackCharacters"); }
     virtual void SAL_CALL setStackCharacters(sal_Bool p1) throw(css::uno::RuntimeException)
         { setPropertyBool("StackCharacters", p1); }
-    virtual com::sun::star::chart2::RelativePosition SAL_CALL getRelativePosition() throw(css::uno::RuntimeException);
-    virtual void SAL_CALL setRelativePosition(const com::sun::star::chart2::RelativePosition& p1) throw(css::uno::RuntimeException)
+    virtual css::beans::Optional<com::sun::star::chart2::RelativePosition> SAL_CALL getRelativePosition() throw(css::uno::RuntimeException);
+    virtual void SAL_CALL setRelativePosition(const css::beans::Optional<css::chart2::RelativePosition>& p1) throw(css::uno::RuntimeException)
         { setPropertyValue("RelativePosition", css::uno::Any(p1)); }
-    virtual com::sun::star::awt::Size SAL_CALL getReferencePageSize() throw(css::uno::RuntimeException);
-    virtual void SAL_CALL setReferencePageSize(const com::sun::star::awt::Size& p1) throw(css::uno::RuntimeException)
+    virtual css::beans::Optional<com::sun::star::awt::Size> SAL_CALL getReferencePageSize() throw(css::uno::RuntimeException);
+    virtual void SAL_CALL setReferencePageSize(const css::beans::Optional<css::awt::Size>& p1) throw(css::uno::RuntimeException)
         { setPropertyValue("ReferencePageSize", css::uno::Any(p1)); }
 
 
diff --git a/offapi/com/sun/star/chart2/XTitle2.idl b/offapi/com/sun/star/chart2/XTitle2.idl
index d993f75..64019d2 100644
--- a/offapi/com/sun/star/chart2/XTitle2.idl
+++ b/offapi/com/sun/star/chart2/XTitle2.idl
@@ -23,6 +23,7 @@
 #include <com/sun/star/chart2/XTitle.idl>
 #include <com/sun/star/chart2/RelativePosition.idl>
 #include <com/sun/star/beans/XPropertySet.idl>
+#include <com/sun/star/beans/Optional.idl>
 #include <com/sun/star/drawing/LineProperties.idl>
 #include <com/sun/star/drawing/FillProperties.idl>
 //FIXME does not exist <com/sun/star/layout/LayoutElement.idl>
@@ -67,7 +68,7 @@ interface XTitle2
         <p>If a relative position is given the title is not automatically placed,
         but instead is placed relative on the page.</p>
      */
-    [attribute] ::com::sun::star::chart2::RelativePosition RelativePosition;
+    [attribute] ::com::sun::star::beans::Optional<::com::sun::star::chart2::RelativePosition> RelativePosition;
 
 
     /** contains the size of the page at the time when properties were
@@ -76,7 +77,7 @@ interface XTitle2
         <p>This way it is possible to resize objects (like text) in
         the view without modifying the model.</p>
      */
-    [attribute]  com::sun::star::awt::Size   ReferencePageSize;
+    [attribute]  ::com::sun::star::beans::Optional<com::sun::star::awt::Size>   ReferencePageSize;
 };
 
 }; }; }; };


More information about the Libreoffice-commits mailing list