Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Krita
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tusooa Zhu
Krita
Commits
b60d7d87
Commit
b60d7d87
authored
Feb 19, 2012
by
Dimitrios T. Tanis
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into kexi-features-tanis
parents
01439469
905e78cf
Changes
41
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
186 additions
and
77 deletions
+186
-77
krita/kritapart.desktop
krita/kritapart.desktop
+1
-0
krita/plugins/extensions/dockers/artisticcolorselector/krita_artisticcolorselector.desktop
...artisticcolorselector/krita_artisticcolorselector.desktop
+1
-0
krita/plugins/extensions/dockers/imagedocker/kritaimagedocker.desktop
...s/extensions/dockers/imagedocker/kritaimagedocker.desktop
+1
-0
krita/plugins/extensions/dockers/tasksetdocker/krita_tasksetdocker.desktop
...ensions/dockers/tasksetdocker/krita_tasksetdocker.desktop
+1
-0
krita/plugins/extensions/imagesplit/kritaimagesplit.desktop
krita/plugins/extensions/imagesplit/kritaimagesplit.desktop
+1
-0
krita/plugins/filters/roundcorners/kis_round_corners_filter.cpp
...plugins/filters/roundcorners/kis_round_corners_filter.cpp
+0
-1
krita/ui/tool/kis_tool.h
krita/ui/tool/kis_tool.h
+1
-0
krita/ui/tool/kis_tool_freehand.cc
krita/ui/tool/kis_tool_freehand.cc
+16
-15
krita/ui/tool/kis_tool_freehand.h
krita/ui/tool/kis_tool_freehand.h
+1
-0
krita/ui/tool/kis_tool_paint.cc
krita/ui/tool/kis_tool_paint.cc
+13
-4
libs/flake/KoImageCollection.cpp
libs/flake/KoImageCollection.cpp
+30
-15
libs/flake/KoImageCollection.h
libs/flake/KoImageCollection.h
+9
-0
libs/flake/KoImageData.cpp
libs/flake/KoImageData.cpp
+24
-2
libs/flake/KoImageData_p.cpp
libs/flake/KoImageData_p.cpp
+2
-1
libs/kotext/KoDocumentRdfBase.cpp
libs/kotext/KoDocumentRdfBase.cpp
+1
-12
libs/kotext/KoTextEditor.cpp
libs/kotext/KoTextEditor.cpp
+1
-1
libs/kotext/commands/ChangeListCommand.cpp
libs/kotext/commands/ChangeListCommand.cpp
+6
-1
libs/kotext/commands/ChangeTrackedDeleteCommand.cpp
libs/kotext/commands/ChangeTrackedDeleteCommand.cpp
+1
-1
libs/kotext/commands/TextPasteCommand.cpp
libs/kotext/commands/TextPasteCommand.cpp
+1
-1
libs/kotext/texteditingplugin.desktop
libs/kotext/texteditingplugin.desktop
+1
-0
libs/main/calligradocker.desktop
libs/main/calligradocker.desktop
+1
-0
libs/main/kodocinfopropspage.desktop
libs/main/kodocinfopropspage.desktop
+1
-0
libs/textlayout/KoTextLayoutArea.cpp
libs/textlayout/KoTextLayoutArea.cpp
+4
-4
libs/textlayout/KoTextLayoutArea_paint.cpp
libs/textlayout/KoTextLayoutArea_paint.cpp
+1
-1
plugins/chartshape/ChartProxyModel.cpp
plugins/chartshape/ChartProxyModel.cpp
+10
-0
plugins/chartshape/ChartProxyModel.h
plugins/chartshape/ChartProxyModel.h
+6
-0
plugins/chartshape/ChartShape.cpp
plugins/chartshape/ChartShape.cpp
+10
-4
plugins/chartshape/PlotArea.cpp
plugins/chartshape/PlotArea.cpp
+3
-0
plugins/chartshape/kchartpart.desktop
plugins/chartshape/kchartpart.desktop
+1
-0
plugins/dockers/calligradockers.desktop
plugins/dockers/calligradockers.desktop
+2
-0
plugins/formulashape/kformulapart.desktop
plugins/formulashape/kformulapart.desktop
+2
-0
plugins/kexi/spreadsheet/keximigrate_spreadsheet.desktop
plugins/kexi/spreadsheet/keximigrate_spreadsheet.desktop
+2
-0
plugins/mapshape/mapshape.desktop
plugins/mapshape/mapshape.desktop
+1
-0
plugins/reporting/barcode/koreport_barcodeplugin.desktop
plugins/reporting/barcode/koreport_barcodeplugin.desktop
+2
-0
plugins/reporting/chart/koreport_chartplugin.desktop
plugins/reporting/chart/koreport_chartplugin.desktop
+2
-0
plugins/textediting/spellcheck/SpellCheck.cpp
plugins/textediting/spellcheck/SpellCheck.cpp
+6
-3
plugins/textediting/spellcheck/SpellCheck.h
plugins/textediting/spellcheck/SpellCheck.h
+6
-1
plugins/textediting/spellcheck/SpellCheckMenu.cpp
plugins/textediting/spellcheck/SpellCheckMenu.cpp
+4
-2
plugins/textediting/spellcheck/SpellCheckMenu.h
plugins/textediting/spellcheck/SpellCheckMenu.h
+3
-1
plugins/textshape/TextTool.cpp
plugins/textshape/TextTool.cpp
+3
-3
plugins/textshape/dialogs/StylesWidget.cpp
plugins/textshape/dialogs/StylesWidget.cpp
+4
-4
No files found.
krita/kritapart.desktop
View file @
b60d7d87
...
...
@@ -12,6 +12,7 @@ Name[fr]=Composant manipulation d'images et dessin de Calligra
Name[it]=Componente per il disegno e la manipolazione di immagini di Calligra
Name[nb]=Calligra-komponent for maling og bildemanipulasjon
Name[nds]=Calligra-Komponent för't Malen un Bildbewerken
Name[nl]=Calligra-component voor tekenen en afbeeldingsbewerking
Name[pl]=Składnik malowania i edycji obrazu dla Calligry
Name[pt]=Componente de Edição e Pintura de Imagens do Calligra
Name[pt_BR]=Componente de Edição e Pintura de Imagens do Calligra
...
...
krita/plugins/extensions/dockers/artisticcolorselector/krita_artisticcolorselector.desktop
View file @
b60d7d87
...
...
@@ -8,6 +8,7 @@ Name[et]=Kunstniku värvivalija
Name[it]=Selettore colore artistico
Name[nb]=Artistisk Fargevelger
Name[nds]=Smuck Klöörköör
Name[nl]=Artistieke kleurenkiezer
Name[pl]=Artystyczne wybieranie kolorów
Name[pt]=Selector de cores artísticas
Name[pt_BR]=Seletor de cores artísticas
...
...
krita/plugins/extensions/dockers/imagedocker/kritaimagedocker.desktop
View file @
b60d7d87
...
...
@@ -27,6 +27,7 @@ Comment[es]=Acoplable de imágenes de referencia
Comment[et]=Kõrvutuspiltide dokk
Comment[it]=Area di aggancio per le immagini di riferimento
Comment[nb]=Dokker for referansebilder
Comment[nl]=Vastzetten voor referentie-afbeeldingen
Comment[pl]=Dokowanie dla odniesionych obrazów
Comment[pt]=Área das imagens de referência
Comment[pt_BR]=Acoplador para imagens de referência
...
...
krita/plugins/extensions/dockers/tasksetdocker/krita_tasksetdocker.desktop
View file @
b60d7d87
...
...
@@ -7,6 +7,7 @@ Name[es]=Acoplable de conjunto de tareas
Name[et]=Ülesandekogumi dokk
Name[it]=Area di aggancio taskset
Name[nb]=Dokker for oppgavesett
Name[nl]=Vastzetter voor takenset
Name[pl]=Dokowanie zestawu zadań
Name[pt]=Área dos Conjuntos de Tarefas
Name[pt_BR]=Área dos conjuntos de tarefas
...
...
krita/plugins/extensions/imagesplit/kritaimagesplit.desktop
View file @
b60d7d87
...
...
@@ -8,6 +8,7 @@ Name[es]=Divisor de imágenes
Name[et]=Pildipoolitaja
Name[it]=Divisore di immagini
Name[nb]=Bildedeler
Name[nl]=Splitser van afbeeldingen
Name[pl]=Podzielnik obrazu
Name[pt]=Divisor de Imagens
Name[pt_BR]=Divisão da imagem
...
...
krita/plugins/filters/roundcorners/kis_round_corners_filter.cpp
View file @
b60d7d87
...
...
@@ -62,7 +62,6 @@ void KisRoundCornersFilter::process(KisPaintDeviceSP device,
KoUpdater
*
progressUpdater
)
const
{
QPoint
srcTopLeft
=
applyRect
.
topLeft
();
Q_UNUSED
(
config
);
Q_ASSERT
(
!
device
.
isNull
());
...
...
krita/ui/tool/kis_tool.h
View file @
b60d7d87
...
...
@@ -200,6 +200,7 @@ protected:
protected:
enum
ToolMode
{
HOVER_MODE
,
SECONDARY_HOVER_MODE
,
PAINT_MODE
,
SECONDARY_PAINT_MODE
,
MIRROR_AXIS_SETUP_MODE
,
...
...
krita/ui/tool/kis_tool_freehand.cc
View file @
b60d7d87
...
...
@@ -292,6 +292,7 @@ void KisToolFreehand::keyPressEvent(QKeyEvent *event)
{
if
(
mode
()
!=
KisTool
::
PAINT_MODE
)
{
KisToolPaint
::
keyPressEvent
(
event
);
updateOutlineRect
();
return
;
}
...
...
@@ -302,6 +303,7 @@ void KisToolFreehand::keyReleaseEvent(QKeyEvent* event)
{
if
(
mode
()
!=
KisTool
::
PAINT_MODE
)
{
KisToolPaint
::
keyReleaseEvent
(
event
);
updateOutlineRect
();
return
;
}
...
...
@@ -405,20 +407,7 @@ void KisToolFreehand::paint(QPainter& gc, const KoViewConverter &converter)
#endif
{
KisPaintOpSettings
::
OutlineMode
outlineMode
;
outlineMode
=
KisPaintOpSettings
::
CursorIsNotOutline
;
if
(
m_explicitShowOutline
||
mode
()
==
KisTool
::
GESTURE_MODE
||
(
cfg
.
cursorStyle
()
==
CURSOR_STYLE_OUTLINE
&&
(
mode
()
==
HOVER_MODE
||
(
mode
()
==
PAINT_MODE
&&
cfg
.
showOutlineWhilePainting
()))))
{
outlineMode
=
KisPaintOpSettings
::
CursorIsOutline
;
}
QPainterPath
path
=
getOutlinePath
(
m_outlineDocPoint
,
outlineMode
);
paintToolOutline
(
&
gc
,
pixelToView
(
path
));
paintToolOutline
(
&
gc
,
pixelToView
(
m_currentOutline
));
}
}
...
...
@@ -490,7 +479,19 @@ void KisToolFreehand::decreaseBrushSize()
void
KisToolFreehand
::
updateOutlineRect
()
{
QRectF
outlinePixelRect
=
getOutlinePath
(
m_outlineDocPoint
,
KisPaintOpSettings
::
CursorIsOutline
).
boundingRect
();
KisConfig
cfg
;
KisPaintOpSettings
::
OutlineMode
outlineMode
;
outlineMode
=
KisPaintOpSettings
::
CursorIsNotOutline
;
if
(
m_explicitShowOutline
||
mode
()
==
KisTool
::
GESTURE_MODE
||
(
cfg
.
cursorStyle
()
==
CURSOR_STYLE_OUTLINE
&&
(
mode
()
==
HOVER_MODE
||
(
mode
()
==
PAINT_MODE
&&
cfg
.
showOutlineWhilePainting
()))))
{
outlineMode
=
KisPaintOpSettings
::
CursorIsOutline
;
}
m_currentOutline
=
getOutlinePath
(
m_outlineDocPoint
,
outlineMode
);
QRectF
outlinePixelRect
=
m_currentOutline
.
boundingRect
();
QRectF
outlineDocRect
=
currentImage
()
->
pixelToDocument
(
outlinePixelRect
);
if
(
!
m_oldOutlineRect
.
isEmpty
())
{
...
...
krita/ui/tool/kis_tool_freehand.h
View file @
b60d7d87
...
...
@@ -134,6 +134,7 @@ private:
QPointF
m_outlineDocPoint
;
QTimer
m_outlineTimer
;
QRectF
m_oldOutlineRect
;
QPainterPath
m_currentOutline
;
bool
m_explicitShowOutline
;
KAction
*
m_increaseBrushSize
;
...
...
krita/ui/tool/kis_tool_paint.cc
View file @
b60d7d87
...
...
@@ -170,7 +170,7 @@ void KisToolPaint::mousePressEvent(KoPointerEvent *event)
useCursor
(
KisCursor
::
crossCursor
());
canvas
()
->
resourceManager
()
->
setResource
(
KisCanvasResourceProvider
::
MirrorAxisCenter
,
convertToPixelCoord
(
event
->
point
));
}
else
if
(
mode
()
==
KisTool
::
HOVER_MODE
&&
else
if
(
mode
()
==
KisTool
::
SECONDARY_
HOVER_MODE
&&
(
event
->
button
()
==
Qt
::
LeftButton
||
event
->
button
()
==
Qt
::
RightButton
)
&&
event
->
modifiers
()
&
Qt
::
ControlModifier
&&
!
specialModifierActive
())
{
...
...
@@ -213,12 +213,19 @@ void KisToolPaint::mouseMoveEvent(KoPointerEvent *event)
void
KisToolPaint
::
mouseReleaseEvent
(
KoPointerEvent
*
event
)
{
if
(
mode
()
==
KisTool
::
SECONDARY_PAINT_MODE
||
mode
()
==
KisTool
::
MIRROR_AXIS_SETUP_MODE
)
{
if
(
mode
()
==
KisTool
::
MIRROR_AXIS_SETUP_MODE
)
{
setMode
(
KisTool
::
HOVER_MODE
);
resetCursorStyle
();
event
->
accept
();
}
else
{
}
else
if
(
mode
()
==
KisTool
::
SECONDARY_PAINT_MODE
)
{
if
(
event
->
modifiers
()
&
Qt
::
ControlModifier
)
{
setMode
(
KisTool
::
SECONDARY_HOVER_MODE
);
}
else
{
setMode
(
KisTool
::
HOVER_MODE
);
resetCursorStyle
();
}
event
->
accept
();
}
else
{
KisTool
::
mouseReleaseEvent
(
event
);
}
}
...
...
@@ -227,6 +234,7 @@ void KisToolPaint::keyPressEvent(QKeyEvent *event)
{
if
((
event
->
key
()
==
Qt
::
Key_Control
)
&&
(
event
->
modifiers
()
==
Qt
::
ControlModifier
))
{
useCursor
(
KisCursor
::
pickerCursor
());
setMode
(
KisTool
::
SECONDARY_HOVER_MODE
);
}
else
if
((
event
->
key
()
==
Qt
::
Key_Control
||
event
->
key
()
==
Qt
::
Key_Shift
))
{
if
(
event
->
modifiers
()
==
(
Qt
::
ShiftModifier
|
Qt
::
ControlModifier
))
{
useCursor
(
KisCursor
::
crossCursor
());
...
...
@@ -239,6 +247,7 @@ void KisToolPaint::keyReleaseEvent(QKeyEvent* event)
{
if
(
mode
()
!=
KisTool
::
PAINT_MODE
){
resetCursorStyle
();
setMode
(
KisTool
::
HOVER_MODE
);
}
KisTool
::
keyReleaseEvent
(
event
);
}
...
...
libs/flake/KoImageCollection.cpp
View file @
b60d7d87
...
...
@@ -64,45 +64,46 @@ bool KoImageCollection::completeLoading(KoStore *store)
bool
KoImageCollection
::
completeSaving
(
KoStore
*
store
,
KoXmlWriter
*
manifestWriter
,
KoShapeSavingContext
*
context
)
{
QMap
<
qint64
,
QString
>
images
(
context
->
imagesToSave
());
QMap
<
qint64
,
QString
>::
iterator
i
t
(
images
.
begin
());
QMap
<
qint64
,
QString
>
images
ToSave
(
context
->
imagesToSave
());
QMap
<
qint64
,
QString
>::
iterator
i
magesToSaveIter
(
imagesToSave
.
begin
());
QMap
<
qint64
,
KoImageDataPrivate
*>::
iterator
dataIt
(
d
->
images
.
begin
());
QMap
<
qint64
,
KoImageDataPrivate
*>::
iterator
knownImagesIter
(
d
->
images
.
begin
());
while
(
i
t
!=
images
.
end
())
{
if
(
dataIt
==
d
->
images
.
end
())
{
while
(
i
magesToSaveIter
!=
imagesToSave
.
end
())
{
if
(
knownImagesIter
==
d
->
images
.
end
())
{
// this should not happen
kWarning
(
30006
)
<<
"image not found"
;
Q_ASSERT
(
0
);
break
;
}
else
if
(
dataIt
.
key
()
==
it
.
key
())
{
KoImageDataPrivate
*
imageData
=
dataIt
.
value
();
else
if
(
knownImagesIter
.
key
()
==
imagesToSaveIter
.
key
())
{
KoImageDataPrivate
*
imageData
=
knownImagesIter
.
value
();
if
(
imageData
->
imageLocation
.
isValid
())
{
// TODO store url
Q_ASSERT
(
0
);
// not implemented yet
}
else
if
(
store
->
open
(
i
t
.
value
()))
{
else
if
(
store
->
open
(
i
magesToSaveIter
.
value
()))
{
KoStoreDevice
device
(
store
);
bool
ok
=
imageData
->
saveData
(
device
);
store
->
close
();
// TODO error handling
if
(
ok
)
{
const
QString
mimetype
(
KMimeType
::
findByPath
(
i
t
.
value
(),
0
,
true
)
->
name
());
manifestWriter
->
addManifestEntry
(
i
t
.
value
(),
mimetype
);
const
QString
mimetype
(
KMimeType
::
findByPath
(
i
magesToSaveIter
.
value
(),
0
,
true
)
->
name
());
manifestWriter
->
addManifestEntry
(
i
magesToSaveIter
.
value
(),
mimetype
);
}
else
{
kWarning
(
30006
)
<<
"saving image"
<<
i
t
.
value
()
<<
"failed"
;
kWarning
(
30006
)
<<
"saving image"
<<
i
magesToSaveIter
.
value
()
<<
"failed"
;
}
}
else
{
kWarning
(
30006
)
<<
"saving image failed: open store failed"
;
}
++
dataIt
;
++
i
t
;
}
else
if
(
dataIt
.
key
()
<
it
.
key
())
{
++
dataIt
;
++
knownImagesIter
;
++
i
magesToSaveIter
;
}
else
if
(
knownImagesIter
.
key
()
<
imagesToSaveIter
.
key
())
{
++
knownImagesIter
;
}
else
{
// this should not happen
kWarning
(
30006
)
<<
"image not found"
;
abort
();
Q_ASSERT
(
0
);
}
}
...
...
@@ -207,6 +208,20 @@ int KoImageCollection::count() const
return
d
->
images
.
count
();
}
void
KoImageCollection
::
update
(
qint64
oldKey
,
qint64
newKey
)
{
if
(
oldKey
==
newKey
)
{
return
;
}
if
(
d
->
images
.
contains
(
oldKey
))
{
KoImageDataPrivate
*
imageData
=
d
->
images
[
oldKey
];
d
->
images
.
remove
(
oldKey
);
d
->
images
.
insert
(
newKey
,
imageData
);
}
Q_ASSERT
(
d
->
images
.
contains
(
newKey
));
Q_ASSERT
(
!
d
->
images
.
contains
(
oldKey
));
}
void
KoImageCollection
::
removeOnKey
(
qint64
imageDataKey
)
{
d
->
images
.
remove
(
imageDataKey
);
...
...
libs/flake/KoImageCollection.h
View file @
b60d7d87
...
...
@@ -105,6 +105,15 @@ public:
*/
int
count
()
const
;
/**
* Update the imagecollection: the imagedata object with the old
* key will now be associated with the new key.
*
* @param the key by which the object is known in the collection
* @param they new key by which the object should be known
*/
void
update
(
qint64
oldKey
,
qint64
newKey
);
private:
KoImageData
*
cacheImage
(
KoImageData
*
data
);
...
...
libs/flake/KoImageData.cpp
View file @
b60d7d87
...
...
@@ -167,10 +167,14 @@ bool KoImageData::hasCachedImage() const
void
KoImageData
::
setImage
(
const
QImage
&
image
,
KoImageCollection
*
collection
)
{
Q_ASSERT
(
!
image
.
isNull
());
qint64
oldKey
=
0
;
if
(
d
)
{
oldKey
=
d
->
key
;
}
Q_ASSERT
(
!
image
.
isNull
());
if
(
collection
)
{
// let the collection first check if it already has one. If it doesn't it'll call this method
// again and we
'
ll go to the other clause
// again and well go to the other clause
KoImageData
*
other
=
collection
->
createImageData
(
image
);
this
->
operator
=
(
*
other
);
delete
other
;
...
...
@@ -209,7 +213,12 @@ void KoImageData::setImage(const QImage &image, KoImageCollection *collection)
md5
.
addData
(
ba
);
d
->
key
=
KoImageDataPrivate
::
generateKey
(
md5
.
result
());
}
if
(
oldKey
!=
0
&&
d
->
collection
)
{
d
->
collection
->
update
(
oldKey
,
d
->
key
);
}
}
}
void
KoImageData
::
setExternalImage
(
const
QUrl
&
location
,
KoImageCollection
*
collection
)
...
...
@@ -231,7 +240,11 @@ void KoImageData::setExternalImage(const QUrl &location, KoImageCollection *coll
d
->
setSuffix
(
location
.
toEncoded
());
QCryptographicHash
md5
(
QCryptographicHash
::
Md5
);
md5
.
addData
(
location
.
toEncoded
());
qint64
oldKey
=
d
->
key
;
d
->
key
=
KoImageDataPrivate
::
generateKey
(
md5
.
result
());
if
(
oldKey
!=
0
&&
d
->
collection
)
{
d
->
collection
->
update
(
oldKey
,
d
->
key
);
}
d
->
dataStoreState
=
KoImageDataPrivate
::
StateNotLoaded
;
}
}
...
...
@@ -268,7 +281,11 @@ void KoImageData::setImage(const QString &url, KoStore *store, KoImageCollection
if
(
d
->
image
.
loadFromData
(
data
))
{
QCryptographicHash
md5
(
QCryptographicHash
::
Md5
);
md5
.
addData
(
data
);
qint64
oldKey
=
d
->
key
;
d
->
key
=
KoImageDataPrivate
::
generateKey
(
md5
.
result
());
if
(
oldKey
!=
0
&&
d
->
collection
)
{
d
->
collection
->
update
(
oldKey
,
d
->
key
);
}
d
->
dataStoreState
=
KoImageDataPrivate
::
StateImageOnly
;
return
;
}
...
...
@@ -326,7 +343,12 @@ void KoImageData::setImage(const QByteArray &imageData, KoImageCollection *colle
}
QCryptographicHash
md5
(
QCryptographicHash
::
Md5
);
md5
.
addData
(
imageData
);
qint64
oldKey
=
d
->
key
;
d
->
key
=
KoImageDataPrivate
::
generateKey
(
md5
.
result
());
if
(
oldKey
!=
0
&&
d
->
collection
)
{
d
->
collection
->
update
(
oldKey
,
d
->
key
);
}
}
}
...
...
libs/flake/KoImageData_p.cpp
View file @
b60d7d87
...
...
@@ -131,9 +131,10 @@ void KoImageDataPrivate::copyToTemporary(QIODevice &device)
}
while
(
bytes
>
0
);
}
key
=
KoImageDataPrivate
::
generateKey
(
md5
.
result
());
temporaryFile
->
close
();
QFileInfo
fi
(
*
temporaryFile
);
//
QFileInfo fi(*temporaryFile);
dataStoreState
=
StateNotLoaded
;
}
...
...
libs/kotext/KoDocumentRdfBase.cpp
View file @
b60d7d87
...
...
@@ -40,19 +40,8 @@ const Soprano::Model *KoDocumentRdfBase::model() const
void
KoDocumentRdfBase
::
linkToResourceManager
(
KoDocumentResourceManager
*
rm
)
{
QVariant
variant
;
variant
.
setValue
<
void
*>
(
this
);
variant
.
setValue
<
QObject
*>
(
this
);
rm
->
setResource
(
KoText
::
DocumentRdf
,
variant
);
kDebug
(
30015
)
<<
"setrm, rm"
<<
rm
;
// // DEBUG
// {
// if (!rm->hasResource(KoText::DocumentRdf)) {
// kDebug(30015) << "can not read back!";
// }
// KoDocumentRdfBase* b = static_cast<KoDocumentRdfBase*>(rm->resource(KoText::DocumentRdf).value<void*>());
// kDebug(30015) << "read back" << b;
// }
}
void
KoDocumentRdfBase
::
updateInlineRdfStatements
(
const
QTextDocument
*
qdoc
)
...
...
libs/kotext/KoTextEditor.cpp
View file @
b60d7d87
...
...
@@ -1235,7 +1235,7 @@ bool KoTextEditor::paste(KoTextEditor *editor,
KoDocumentRdfBase
*
rdf
=
0
;
if
(
shapeController
->
resourceManager
()
->
hasResource
(
KoText
::
DocumentRdf
))
{
rdf
=
static_cast
<
KoDocumentRdfBase
*>
(
shapeController
->
resourceManager
()
->
resource
(
KoText
::
DocumentRdf
).
value
<
void
*>
());
rdf
=
qobject_cast
<
KoDocumentRdfBase
*>
(
shapeController
->
resourceManager
()
->
resource
(
KoText
::
DocumentRdf
).
value
<
QObject
*>
());
saveHelper
.
setRdfModel
(
rdf
->
model
());
}
...
...
libs/kotext/commands/ChangeListCommand.cpp
View file @
b60d7d87
...
...
@@ -52,10 +52,15 @@ ChangeListCommand::ChangeListCommand(const QTextCursor &cursor, const KoListLeve
KoListLevelProperties
llp
;
llp
.
setLevel
(
lev
);
llp
.
setStyle
(
style
);
llp
.
setListItemPrefix
(
levelProperties
.
listItemPrefix
());
llp
.
setListItemSuffix
(
levelProperties
.
listItemSuffix
());
if
(
KoListStyle
::
isNumberingStyle
(
style
))
{
llp
.
setStartValue
(
1
);
llp
.
setRelativeBulletSize
(
100
);
//we take the default value for numbering bullets as 100
llp
.
setListItemSuffix
(
"."
);
if
(
llp
.
listItemSuffix
().
isEmpty
())
{
llp
.
setListItemSuffix
(
"."
);
}
}
else
if
(
style
==
KoListStyle
::
CustomCharItem
)
{
llp
.
setRelativeBulletSize
(
100
);
//we take the default value for numbering bullets as 100
...
...
libs/kotext/commands/ChangeTrackedDeleteCommand.cpp
View file @
b60d7d87
...
...
@@ -81,7 +81,7 @@ ChangeTrackedDeleteCommand::ChangeTrackedDeleteCommand(DeleteMode mode,
m_removedElements
()
{
setText
(
i18nc
(
"(qtundo-format)"
,
"Delete"
));
m_rdf
=
static_cast
<
KoDocumentRdfBase
*>
(
shapeController
->
resourceManager
()
->
resource
(
KoText
::
DocumentRdf
).
value
<
void
*>
());
m_rdf
=
qobject_cast
<
KoDocumentRdfBase
*>
(
shapeController
->
resourceManager
()
->
resource
(
KoText
::
DocumentRdf
).
value
<
QObject
*>
());
}
void
ChangeTrackedDeleteCommand
::
undo
()
...
...
libs/kotext/commands/TextPasteCommand.cpp
View file @
b60d7d87
...
...
@@ -55,7 +55,7 @@ TextPasteCommand::TextPasteCommand(const QMimeData *mimeData,
m_pasteAsText
(
pasteAsText
),
m_first
(
true
)
{
m_rdf
=
static_cast
<
KoDocumentRdfBase
*>
(
shapeController
->
resourceManager
()
->
resource
(
KoText
::
DocumentRdf
).
value
<
void
*>
());
m_rdf
=
qobject_cast
<
KoDocumentRdfBase
*>
(
shapeController
->
resourceManager
()
->
resource
(
KoText
::
DocumentRdf
).
value
<
QObject
*>
());
if
(
m_pasteAsText
)
setText
(
i18nc
(
"(qtundo-format)"
,
"Paste As Text"
));
...
...
libs/kotext/texteditingplugin.desktop
View file @
b60d7d87
...
...
@@ -11,6 +11,7 @@ Name[fr]=Module externe d'édition de texte pour l'outil texte de Calligra
Name[it]=Estensione di modifica del testo per lo strumento di testo di Calligra
Name[nb]=Programtillegg for tekstredigering for Calligra tekstverktøy
Name[nds]=Textbewerk-Moduul för dat Calligra-Textwarktüüch
Name[nl]=Tekstbewerkingsplug-in voor het tekstgereedschap van Calligra
Name[pl]=Wtyczka edycji tekstu dla narzędzia tekstu Calligra
Name[pt]='Plugin' de edição de texto para a ferramenta de texto do Calligra
Name[pt_BR]=Plugin de edição de texto para a ferramenta de texto do Calligra
...
...
libs/main/calligradocker.desktop
View file @
b60d7d87
...
...
@@ -11,6 +11,7 @@ Name[fr]=Module externe de panneaux pour Calligra
Name[it]=Estensione per i ganci di Calligra
Name[nb]=Calligra dokker-programtillegg
Name[nds]=Calligra-Dockermoduul
Name[nl]=Calligra-plug-in voor vastzetter
Name[pl]=Wtyczka dokowania dla Calligra
Name[pt]='Plugin' de Área Acoplável do Calligra
Name[pt_BR]=Plugin acoplável do Calligra
...
...
libs/main/kodocinfopropspage.desktop
View file @
b60d7d87
...
...
@@ -14,6 +14,7 @@ Name[it]=Pagina proprietà informazioni documento Calligra
Name[kk]=Calligra құжатының қасиеттер мәліметінің беті
Name[nb]=Calligra dokumentinformasjonsside
Name[nds]=Dokmentinformatschonen-Egenschappensiet för Calligra
Name[nl]=Document-info-eigenschappen-pagina van Calligra
Name[pl]=Strona właściwości informacji o dokumencie dla Calligra
Name[pt]=Página de Propriedades do Documento do Calligra
Name[pt_BR]=Página de propriedades do documento do Calligra
...
...
libs/textlayout/KoTextLayoutArea.cpp
View file @
b60d7d87
...
...
@@ -352,7 +352,7 @@ QRectF KoTextLayoutArea::selectionBoundingBox(QTextCursor &cursor) const
}
}
}
// if the full paragraph is selected to add it to the rect. This makes sure we get a rect for the case
// if the full paragraph is selected to add it to the rect. This makes sure we get a rect for the case
// where the end of the selection lies is a different area.
if
(
cursor
.
selectionEnd
()
>=
block
.
position
()
+
block
.
length
()
&&
cursor
.
selectionStart
()
<=
block
.
position
())
{
QTextLine
line
=
block
.
layout
()
->
lineForTextPosition
(
block
.
length
()
-
1
);
...
...
@@ -1004,7 +1004,7 @@ bool KoTextLayoutArea::layoutBlock(FrameIterator *cursor)
qreal
presentationListTabValue
(
0.0
);
// for use in presentationListTabWorkaround
// For some lists we need to add a special list tab according to odf 1.2 19.830
// For some lists we need to add a special list tab according to odf 1.2 19.830
if
(
textList
&&
listFormat
.
intProperty
(
KoListStyle
::
LabelFollowedBy
)
==
KoListStyle
::
ListTab
)
{
qreal
listTab
=
0
;
if
(
listFormat
.
hasProperty
(
KoListStyle
::
TabStopPosition
))
{
...
...
@@ -1201,7 +1201,7 @@ bool KoTextLayoutArea::layoutBlock(FrameIterator *cursor)
runAroundHelper
.
setLine
(
this
,
line
);
runAroundHelper
.
setObstructions
(
documentLayout
()
->
currentObstructions
());
QRectF
anchoringRect
=
m_blockRects
.
last
();
qDebug
()
<<
anchoringRect
.
top
()
<<
m_anchoringParagraphTop
;
//
qDebug() << anchoringRect.top() << m_anchoringParagraphTop;
anchoringRect
.
setTop
(
m_anchoringParagraphTop
);
documentLayout
()
->
setAnchoringParagraphRect
(
anchoringRect
);
documentLayout
()
->
setAnchoringLayoutEnvironmentRect
(
layoutEnvironmentRect
());
...
...
@@ -1243,7 +1243,7 @@ bool KoTextLayoutArea::layoutBlock(FrameIterator *cursor)
}
if
(
documentLayout
()
->
anchoringSoftBreak
()
<=
block
.
position
()
+
line
.
textStart
()
+
line
.
textLength
())
{
//don't add an anchor that has been moved away
//don't add an anchor that has been moved away
line
.
setNumColumns
(
documentLayout
()
->
anchoringSoftBreak
()
-
block
.
position
()
-
line
.
textStart
(),
line
.
width
());
softBreak
=
true
;
// if the softBreakPos is at the start of the block stop here so
...
...
libs/textlayout/KoTextLayoutArea_paint.cpp
View file @
b60d7d87
...
...
@@ -72,7 +72,7 @@ extern int qt_defaultDpiY();
void
KoTextLayoutArea
::
paint
(
QPainter
*
painter
,
const
KoTextDocumentLayout
::
PaintContext
&
context
)
{
if
(
m_startOfArea
==
0
)
// We have not been layouted yet
if
(
m_startOfArea
==
0
||
m_endOfArea
==
0
)
// We have not been layouted yet
return
;
/*
...
...
plugins/chartshape/ChartProxyModel.cpp
View file @
b60d7d87
...
...
@@ -858,6 +858,9 @@ void ChartProxyModel::invalidateDataSets()
void
ChartProxyModel
::
beginLoading
()
{
Q_ASSERT
(
!
d
->
isLoading
);
beginResetModel
();
// FIXME: invalidateDataSets() used to be called explicitly at the beginning
// of ChartShape::loadOdf(). Now beginLoading() is called instead.
// So, is invalidateDataSets() still necessary here?
...
...
@@ -873,6 +876,13 @@ void ChartProxyModel::endLoading()
// Doing this here is wrong, the data set's cell regions set in
// DataSet::loadOdf() would get overridden.
// d->rebuildDataMap();
endResetModel
();
}
bool
ChartProxyModel
::
isLoading
()
const
{
return
d
->
isLoading
;
}
void
ChartProxyModel
::
setDataDirection
(
Qt
::
Orientation
orientation
)
...
...
plugins/chartshape/ChartProxyModel.h
View file @
b60d7d87
...
...
@@ -185,6 +185,12 @@ public:
*/
void
endLoading
();
/**
* Returns true if beginLoading() got called and endLoading() not
* yet what means we are in a longer loading process.
*/
bool
isLoading
()
const
;
public
slots
:
/**
* Connected to dataChanged() signal of source models in TableSource.
...
...
plugins/chartshape/ChartShape.cpp
View file @
b60d7d87
...
...
@@ -902,6 +902,8 @@ bool ChartShape::loadEmbeddedDocument( KoStore *store,
bool
ChartShape
::
loadOdf
(
const
KoXmlElement
&
element
,
KoShapeLoadingContext
&
context
)
{
//struct Timer{QTime t;Timer(){t.start();} ~Timer(){qDebug()<<">>>>>"<<t.elapsed();}} timer;
// Load common attributes of (frame) shapes. If you change here,
// don't forget to also change in saveOdf().
loadOdfAttributes
(
element
,
context
,
OdfAllAttributes
);
...
...
@@ -925,7 +927,14 @@ bool ChartShape::loadOdfFrameElement( const KoXmlElement &element,
bool
ChartShape
::
loadOdfChartElement
(
const
KoXmlElement
&
chartElement
,
KoShapeLoadingContext
&
context
)
{
proxyModel
()
->
beginLoading
();
// Use a helper-class created on the stack to be sure a we always leave
// this method with a call to endLoading proxyModel()->endLoading()
struct
ProxyModelLoadState
{
ChartProxyModel
*
m
;
ProxyModelLoadState
(
ChartProxyModel
*
m
)
:
m
(
m
)
{
m
->
beginLoading
();
}
~
ProxyModelLoadState
()
{
m
->
endLoading
();
}
};
ProxyModelLoadState
proxyModelLoadState
(
proxyModel
());
// The shared data will automatically be deleted in the destructor
// of KoShapeLoadingContext
...
...
@@ -1003,7 +1012,6 @@ bool ChartShape::loadOdfChartElement( const KoXmlElement &chartElement,
return
false
;
}
// 2. Load the data
// int dimensions = numDimensions( chartType );
// qDebug() << "DIMENSIONS" << dimensions;
...
...
@@ -1072,8 +1080,6 @@ bool ChartShape::loadOdfChartElement( const KoXmlElement &chartElement,
requestRepaint
();
proxyModel
()
->
endLoading
();
return
true
;
}
...
...
plugins/chartshape/PlotArea.cpp
View file @
b60d7d87
...
...
@@ -294,6 +294,9 @@ void PlotArea::plotAreaInit()
void
PlotArea
::
proxyModelStructureChanged
()
{
if
(
proxyModel
()
->
isLoading
())
return
;
Q_ASSERT
(
xAxis
()
);
Q_ASSERT
(
yAxis
()
);
QMap
<
DataSet
*
,
Axis
*>
attachedAxes
;
...
...
plugins/chartshape/kchartpart.desktop
View file @
b60d7d87
...
...
@@ -10,6 +10,7 @@ Name[et]=Calligra diagrammikomponent
Name[fr]=Composant gestion de projets de Calligra
Name[it]=Componente di Calligra Chart
Name[nb]=Calligra diagram-komponent
Name[nl]=Grafiekencomponent van Calligra
Name[pl]=Składnik wykresów dla Calligry