summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/Outliner.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view/Outliner.cxx')
-rw-r--r--sd/source/ui/view/Outliner.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 9b2619ae4e14..c70bb15cd1f8 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -797,6 +797,17 @@ bool SdOutliner::SearchAndReplaceOnce(std::vector<sd::SearchSelection>* pSelecti
std::vector<::tools::Rectangle> aLogicRects;
pOutlinerView->GetSelectionRectangles(aLogicRects);
+ // convert to twips if in 100thmm (seems as if LibreOfficeKit is based on twips?). Do this
+ // here where we have the only place needing this, *not* in ImpEditView::GetSelectionRectangles
+ // which makes that method unusable for others
+ if (pOutlinerView->GetWindow() && MapUnit::Map100thMM == pOutlinerView->GetWindow()->GetMapMode().GetMapUnit())
+ {
+ for (tools::Rectangle& rRectangle : aLogicRects)
+ {
+ rRectangle = OutputDevice::LogicToLogic(rRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
+ }
+ }
+
std::vector<OString> aLogicRectStrings;
std::transform(aLogicRects.begin(), aLogicRects.end(), std::back_inserter(aLogicRectStrings), [](const ::tools::Rectangle& rRectangle) { return rRectangle.toString(); });
OString sRectangles = comphelper::string::join("; ", aLogicRectStrings);