diff --git a/vcl/Package_theme_definitions.mk b/vcl/Package_theme_definitions.mk
index 4dc31caf9b5a..b51f60555165 100644
--- a/vcl/Package_theme_definitions.mk
+++ b/vcl/Package_theme_definitions.mk
@@ -40,6 +40,8 @@ $(eval $(call gb_Package_add_files,vcl_theme_definitions,$(LIBO_SHARE_FOLDER)/th
tabitem-first-selected.svgx \
tabitem-middle-selected.svgx \
tabitem-last-selected.svgx \
+ scrollbar-horizontal.svgx \
+ scrollbar-vertical.svgx \
))
# vim: set noet sw=4 ts=4:
diff --git a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
index 33d139e1fc21..0067fed75954 100644
--- a/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
+++ b/vcl/source/gdi/FileDefinitionWidgetDraw.cxx
@@ -203,9 +203,16 @@ void drawFromDrawCommands(gfx::DrawRoot const& rDrawRoot, SalGraphics& rGraphics
aPolyPolygon.transform(basegfx::utils::createTranslateB2DHomMatrix(
-aPolyPolygonRange.getMinX(), -aPolyPolygonRange.getMinY()));
- aPolyPolygon.transform(basegfx::utils::createScaleB2DHomMatrix(
- aFinalRectangle.getWidth() / aPolyPolygonRange.getWidth(),
- aFinalRectangle.getHeight() / aPolyPolygonRange.getHeight()));
+
+ double fScaleX = 1.0;
+ double fScaleY = 1.0;
+ if (aPolyPolygonRange.getWidth() > 0.0)
+ fScaleX = aFinalRectangle.getWidth() / aPolyPolygonRange.getWidth();
+ if (aPolyPolygonRange.getHeight() > 0.0)
+ fScaleY = aFinalRectangle.getHeight() / aPolyPolygonRange.getHeight();
+
+ aPolyPolygon.transform(basegfx::utils::createScaleB2DHomMatrix(fScaleX, fScaleY));
+
aPolyPolygon.transform(basegfx::utils::createTranslateB2DHomMatrix(
aFinalRectangle.getMinX() - 0.5, aFinalRectangle.getMinY() - 0.5));
@@ -698,6 +705,24 @@ bool FileDefinitionWidgetDraw::getNativeControlRegion(
rNativeContentRegion = rBoundingControlRegion;
return true;
}
+ break;
+ case ControlType::Scrollbar:
+ {
+ if (ePart == ControlPart::ButtonUp || ePart == ControlPart::ButtonDown
+ || ePart == ControlPart::ButtonLeft || ePart == ControlPart::ButtonRight)
+ {
+ rNativeContentRegion = tools::Rectangle(aLocation, Size(0, 0));
+ rNativeBoundingRegion = rNativeContentRegion;
+ return true;
+ }
+ else
+ {
+ rNativeBoundingRegion = rBoundingControlRegion;
+ rNativeContentRegion = rNativeBoundingRegion;
+ return true;
+ }
+ }
+ break;
default:
break;
diff --git a/vcl/uiconfig/theme_definitions/definition.xml b/vcl/uiconfig/theme_definitions/definition.xml
index 90ffbc32ca06..99df7524b8d2 100644
--- a/vcl/uiconfig/theme_definitions/definition.xml
+++ b/vcl/uiconfig/theme_definitions/definition.xml
@@ -227,14 +227,12 @@
-
-
+
-
-
+
@@ -247,22 +245,22 @@
-
+
-
+
-
+
-
+
diff --git a/vcl/uiconfig/theme_definitions/scrollbar-horizontal.svgx b/vcl/uiconfig/theme_definitions/scrollbar-horizontal.svgx
new file mode 100644
index 000000000000..4bdcd409dc20
--- /dev/null
+++ b/vcl/uiconfig/theme_definitions/scrollbar-horizontal.svgx
@@ -0,0 +1,4 @@
+
diff --git a/vcl/uiconfig/theme_definitions/scrollbar-vertical.svgx b/vcl/uiconfig/theme_definitions/scrollbar-vertical.svgx
new file mode 100644
index 000000000000..b4a885d9138d
--- /dev/null
+++ b/vcl/uiconfig/theme_definitions/scrollbar-vertical.svgx
@@ -0,0 +1,4 @@
+