Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
0bc8e678
Kaydet (Commit)
0bc8e678
authored
Mar 25, 2015
tarafından
Jan Holesovsky
Kaydeden (comit)
Miklos Vajna
Mar 30, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sc tiled editing: Make the selections work with zoom too.
Change-Id: I22d95fb2328acb81b8ece45e140da4094fc10026
üst
7fa8f72a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
13 deletions
+19
-13
gridwin.cxx
sc/source/ui/view/gridwin.cxx
+19
-13
No files found.
sc/source/ui/view/gridwin.cxx
Dosyayı görüntüle @
0bc8e678
...
...
@@ -5745,38 +5745,44 @@ void ScGridWindow::UpdateCopySourceOverlay()
SetMapMode( aOldMode );
}
/// Turn the selection ranges rR
ang
es into the LibreOfficeKit selection, and call the callback.
static
void
updateLibreOfficeKitSelection
(
Sc
DrawLayer
*
pDrawLayer
,
const
std
::
vector
<
basegfx
::
B2DRange
>&
rRang
es
)
/// Turn the selection ranges rR
ectangl
es into the LibreOfficeKit selection, and call the callback.
static void updateLibreOfficeKitSelection(Sc
ViewData* pViewData, ScDrawLayer* pDrawLayer, const std::vector<Rectangle>& rRectangl
es)
{
if (!pDrawLayer->isTiledRendering())
return;
basegfx
::
B2DRange
aBoundingBox
;
double nPPTX = pViewData->GetPPTX();
double nPPTY = pViewData->GetPPTY();
Rectangle aBoundingBox;
std::stringstream ss;
bool bIsFirst = true;
for
(
const
auto
&
rRange
:
rRang
es
)
for (
auto aRectangle : rRectangl
es)
{
aBoundingBox
.
expand
(
rRange
);
aRectangle.Right() += 1;
aRectangle.Bottom() += 1;
aBoundingBox.Union(aRectangle);
if (bIsFirst)
bIsFirst = false;
else
ss << "; ";
Rectangle
aRect
(
rRange
.
getMinX
()
/
HMM_PER_TWIPS
,
rRange
.
getMinY
()
/
HMM_PER_TWIPS
,
rRange
.
getMaxX
()
/
HMM_PER_TWIPS
,
rRange
.
getMaxY
()
/
HMM_PER_TWIPS
);
Rectangle aRect(
aRectangle.Left() / nPPTX, aRectangle.Top() / nPPTY
,
aRectangle.Right() / nPPTX, aRectangle.Bottom() / nPPTY
);
ss << aRect.toString().getStr();
}
// selection start handle
Rectangle
aStart
(
aBoundingBox
.
getMinX
()
/
HMM_PER_TWIPS
,
aBoundingBox
.
getMinY
()
/
HMM_PER_TWIPS
,
aBoundingBox
.
getMinX
()
/
HMM_PER_TWIPS
,
(
aBoundingBox
.
getMinY
()
/
HMM_PER_TWIPS
)
+
256
);
Rectangle aStart(aBoundingBox.
Left() / nPPTX, aBoundingBox.Top() / nPPTY
,
aBoundingBox.
Left() / nPPTX, (aBoundingBox.Top() / nPPTY
) + 256);
pDrawLayer->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_START, aStart.toString().getStr());
// selection end handle
Rectangle
aEnd
(
aBoundingBox
.
getMaxX
()
/
HMM_PER_TWIPS
,
(
aBoundingBox
.
getMaxY
()
/
HMM_PER_TWIPS
)
-
256
,
aBoundingBox
.
getMaxX
()
/
HMM_PER_TWIPS
,
aBoundingBox
.
getMaxY
()
/
HMM_PER_TWIPS
);
Rectangle aEnd(aBoundingBox.
Right() / nPPTX, (aBoundingBox.Bottom() / nPPTY
) - 256,
aBoundingBox.
Right() / nPPTX, aBoundingBox.Bottom() / nPPTY
);
pDrawLayer->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION_END, aEnd.toString().getStr());
// the selection itself
...
...
@@ -5938,7 +5944,7 @@ void ScGridWindow::UpdateCursorOverlay()
// (once for the cell only, and then for the selection)
if (!pViewData->GetMarkData().IsMarked() && !pViewData->GetMarkData().IsMultiMarked())
{
updateLibreOfficeKitSelection
(
p
Doc
->
GetDrawLayer
(),
aRange
s
);
updateLibreOfficeKitSelection(p
ViewData, pDoc->GetDrawLayer(), aPixelRect
s);
}
}
}
...
...
@@ -6008,7 +6014,7 @@ void ScGridWindow::UpdateSelectionOverlay()
mpOOSelection->append(*pOverlay);
// notify the LibreOfficeKit too
updateLibreOfficeKitSelection
(
p
Doc
->
GetDrawLayer
(),
aRange
s
);
updateLibreOfficeKitSelection(p
ViewData, pDoc->GetDrawLayer(), aPixelRect
s);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment