summaryrefslogtreecommitdiff
path: root/chart2/source/model/main/Diagram.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-15 09:08:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-15 13:24:43 +0000
commit8d024174dcb95c86400f47556738d092487ce429 (patch)
tree419f12b2adfd490e6fcf09d5640853562cd54e68 /chart2/source/model/main/Diagram.cxx
parent720c77bdb53a83a276f423c75ee163d7c1b191ca (diff)
move getDiagramPositioningMode inside chart2::Diagram
and also switch to using getFastPropertyValue Change-Id: Idef712def160abb500770aceedf6d94d385e5da3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148906 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source/model/main/Diagram.cxx')
-rw-r--r--chart2/source/model/main/Diagram.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index 17cf8ecd63ae..7fbc3459fc49 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -702,6 +702,25 @@ css::uno::Sequence< OUString > SAL_CALL Diagram::getSupportedServiceNames()
"com.sun.star.beans.PropertySet" };
}
+DiagramPositioningMode Diagram::getDiagramPositioningMode()
+{
+ DiagramPositioningMode eMode = DiagramPositioningMode_AUTO;
+ chart2::RelativePosition aRelPos;
+ chart2::RelativeSize aRelSize;
+ if( (getFastPropertyValue(PROP_DIAGRAM_REL_POS) >>= aRelPos ) &&
+ (getFastPropertyValue(PROP_DIAGRAM_REL_SIZE) >>= aRelSize ) )
+ {
+ bool bPosSizeExcludeAxes=false;
+ getFastPropertyValue(PROP_DIAGRAM_POSSIZE_EXCLUDE_LABELS) >>= bPosSizeExcludeAxes;
+ if( bPosSizeExcludeAxes )
+ eMode = DiagramPositioningMode_EXCLUDING;
+ else
+ eMode = DiagramPositioningMode_INCLUDING;
+ }
+ return eMode;
+}
+
+
} // namespace chart
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *