Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7fe5d6ad
Commit
7fe5d6ad
authored
Jun 17, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Jun 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Fixed calculations for the paragraph format dialog.
parent
2ee7bcc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
wordpad.c
programs/wordpad/wordpad.c
+25
-4
No files found.
programs/wordpad/wordpad.c
View file @
7fe5d6ad
...
...
@@ -1415,7 +1415,7 @@ static INT_PTR CALLBACK paraformat_proc(HWND hWnd, UINT message, WPARAM wParam,
pf
.
cbSize
=
sizeof
(
pf
);
pf
.
dwMask
=
PFM_ALIGNMENT
|
PFM_OFFSET
|
PFM_RIGHTINDENT
|
PFM_
OFFSE
TINDENT
;
PFM_
STAR
TINDENT
;
SendMessageW
(
hEditorWnd
,
EM_GETPARAFORMAT
,
0
,
(
LPARAM
)
&
pf
);
if
(
pf
.
wAlignment
==
PFA_RIGHT
)
...
...
@@ -1425,11 +1425,11 @@ static INT_PTR CALLBACK paraformat_proc(HWND hWnd, UINT message, WPARAM wParam,
SendMessageW
(
hListWnd
,
CB_SETCURSEL
,
index
,
0
);
number_with_units
(
buffer
,
pf
.
dxOffset
);
number_with_units
(
buffer
,
pf
.
dx
StartIndent
+
pf
.
dx
Offset
);
SetWindowTextW
(
hLeftWnd
,
buffer
);
number_with_units
(
buffer
,
pf
.
dxRightIndent
);
SetWindowTextW
(
hRightWnd
,
buffer
);
number_with_units
(
buffer
,
pf
.
dxStartIndent
-
pf
.
dxOffset
);
number_with_units
(
buffer
,
-
pf
.
dxOffset
);
SetWindowTextW
(
hFirstWnd
,
buffer
);
}
break
;
...
...
@@ -1467,9 +1467,30 @@ static INT_PTR CALLBACK paraformat_proc(HWND hWnd, UINT message, WPARAM wParam,
return
FALSE
;
}
else
{
if
(
pf
.
dxOffset
+
pf
.
dxStartIndent
<
0
&&
pf
.
dxStartIndent
<
0
)
{
/* The first line is before the left edge, so
* make sure it is at the left edge. */
pf
.
dxOffset
=
-
pf
.
dxStartIndent
;
}
else
if
(
pf
.
dxOffset
<
0
)
{
/* The second and following lines are before
* the left edge, so set it to be at the left
* edge, and adjust the first line since it
* is relative to it. */
pf
.
dxStartIndent
=
max
(
pf
.
dxStartIndent
+
pf
.
dxOffset
,
0
);
pf
.
dxOffset
=
0
;
}
/* Internally the dxStartIndent is the absolute
* offset for the first line and dxOffset is
* to it value as opposed how it is displayed with
* the first line being the relative value.
* These two lines make the adjustments. */
pf
.
dxStartIndent
=
pf
.
dxStartIndent
+
pf
.
dxOffset
;
pf
.
dxOffset
=
pf
.
dxOffset
-
pf
.
dxStartIndent
;
pf
.
cbSize
=
sizeof
(
pf
);
pf
.
dwMask
=
PFM_OFFSET
|
PFM_
OFFSE
TINDENT
|
PFM_RIGHTINDENT
;
pf
.
dwMask
=
PFM_OFFSET
|
PFM_
STAR
TINDENT
|
PFM_RIGHTINDENT
;
SendMessageW
(
hEditorWnd
,
EM_SETPARAFORMAT
,
0
,
(
LPARAM
)
&
pf
);
}
}
...
...
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